fix: align prisma client typing
This commit is contained in:
parent
307a291c71
commit
514b190a65
32 changed files with 106 additions and 34430 deletions
|
|
@ -1,104 +0,0 @@
|
|||
|
||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||
/* eslint-disable */
|
||||
// biome-ignore-all lint: generated file
|
||||
// @ts-nocheck
|
||||
/*
|
||||
* This file should be your main import to use Prisma-related types and utilities in a browser.
|
||||
* Use it to get access to models, enums, and input types.
|
||||
*
|
||||
* This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
|
||||
* See `client.ts` for the standard, server-side entry point.
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
|
||||
import * as Prisma from './internal/prismaNamespaceBrowser'
|
||||
export { Prisma }
|
||||
export * as $Enums from './enums'
|
||||
export * from './enums';
|
||||
/**
|
||||
* Model Team
|
||||
*
|
||||
*/
|
||||
export type Team = Prisma.TeamModel
|
||||
/**
|
||||
* Model TeamMember
|
||||
*
|
||||
*/
|
||||
export type TeamMember = Prisma.TeamMemberModel
|
||||
/**
|
||||
* Model Company
|
||||
*
|
||||
*/
|
||||
export type Company = Prisma.CompanyModel
|
||||
/**
|
||||
* Model User
|
||||
*
|
||||
*/
|
||||
export type User = Prisma.UserModel
|
||||
/**
|
||||
* Model Queue
|
||||
*
|
||||
*/
|
||||
export type Queue = Prisma.QueueModel
|
||||
/**
|
||||
* Model Ticket
|
||||
*
|
||||
*/
|
||||
export type Ticket = Prisma.TicketModel
|
||||
/**
|
||||
* Model ReportExportSchedule
|
||||
*
|
||||
*/
|
||||
export type ReportExportSchedule = Prisma.ReportExportScheduleModel
|
||||
/**
|
||||
* Model ReportExportRun
|
||||
*
|
||||
*/
|
||||
export type ReportExportRun = Prisma.ReportExportRunModel
|
||||
/**
|
||||
* Model TicketEvent
|
||||
*
|
||||
*/
|
||||
export type TicketEvent = Prisma.TicketEventModel
|
||||
/**
|
||||
* Model TicketComment
|
||||
*
|
||||
*/
|
||||
export type TicketComment = Prisma.TicketCommentModel
|
||||
/**
|
||||
* Model SlaPolicy
|
||||
*
|
||||
*/
|
||||
export type SlaPolicy = Prisma.SlaPolicyModel
|
||||
/**
|
||||
* Model AuthUser
|
||||
*
|
||||
*/
|
||||
export type AuthUser = Prisma.AuthUserModel
|
||||
/**
|
||||
* Model AuthSession
|
||||
*
|
||||
*/
|
||||
export type AuthSession = Prisma.AuthSessionModel
|
||||
/**
|
||||
* Model AuthAccount
|
||||
*
|
||||
*/
|
||||
export type AuthAccount = Prisma.AuthAccountModel
|
||||
/**
|
||||
* Model AuthInvite
|
||||
*
|
||||
*/
|
||||
export type AuthInvite = Prisma.AuthInviteModel
|
||||
/**
|
||||
* Model AuthInviteEvent
|
||||
*
|
||||
*/
|
||||
export type AuthInviteEvent = Prisma.AuthInviteEventModel
|
||||
/**
|
||||
* Model AuthVerification
|
||||
*
|
||||
*/
|
||||
export type AuthVerification = Prisma.AuthVerificationModel
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||
/* eslint-disable */
|
||||
// biome-ignore-all lint: generated file
|
||||
// @ts-nocheck
|
||||
/*
|
||||
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
|
||||
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
|
||||
import * as process from 'node:process'
|
||||
import * as path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
import * as runtime from "@prisma/client/runtime/client"
|
||||
import * as $Enums from "./enums"
|
||||
import * as $Class from "./internal/class"
|
||||
import * as Prisma from "./internal/prismaNamespace"
|
||||
|
||||
export * as $Enums from './enums'
|
||||
export * from "./enums"
|
||||
/**
|
||||
* ## Prisma Client
|
||||
*
|
||||
* Type-safe database client for TypeScript
|
||||
* @example
|
||||
* ```
|
||||
* const prisma = new PrismaClient()
|
||||
* // Fetch zero or more Teams
|
||||
* const teams = await prisma.team.findMany()
|
||||
* ```
|
||||
*
|
||||
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
|
||||
*/
|
||||
export const PrismaClient = $Class.getPrismaClientClass()
|
||||
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
||||
export { Prisma }
|
||||
|
||||
/**
|
||||
* Model Team
|
||||
*
|
||||
*/
|
||||
export type Team = Prisma.TeamModel
|
||||
/**
|
||||
* Model TeamMember
|
||||
*
|
||||
*/
|
||||
export type TeamMember = Prisma.TeamMemberModel
|
||||
/**
|
||||
* Model Company
|
||||
*
|
||||
*/
|
||||
export type Company = Prisma.CompanyModel
|
||||
/**
|
||||
* Model User
|
||||
*
|
||||
*/
|
||||
export type User = Prisma.UserModel
|
||||
/**
|
||||
* Model Queue
|
||||
*
|
||||
*/
|
||||
export type Queue = Prisma.QueueModel
|
||||
/**
|
||||
* Model Ticket
|
||||
*
|
||||
*/
|
||||
export type Ticket = Prisma.TicketModel
|
||||
/**
|
||||
* Model ReportExportSchedule
|
||||
*
|
||||
*/
|
||||
export type ReportExportSchedule = Prisma.ReportExportScheduleModel
|
||||
/**
|
||||
* Model ReportExportRun
|
||||
*
|
||||
*/
|
||||
export type ReportExportRun = Prisma.ReportExportRunModel
|
||||
/**
|
||||
* Model TicketEvent
|
||||
*
|
||||
*/
|
||||
export type TicketEvent = Prisma.TicketEventModel
|
||||
/**
|
||||
* Model TicketComment
|
||||
*
|
||||
*/
|
||||
export type TicketComment = Prisma.TicketCommentModel
|
||||
/**
|
||||
* Model SlaPolicy
|
||||
*
|
||||
*/
|
||||
export type SlaPolicy = Prisma.SlaPolicyModel
|
||||
/**
|
||||
* Model AuthUser
|
||||
*
|
||||
*/
|
||||
export type AuthUser = Prisma.AuthUserModel
|
||||
/**
|
||||
* Model AuthSession
|
||||
*
|
||||
*/
|
||||
export type AuthSession = Prisma.AuthSessionModel
|
||||
/**
|
||||
* Model AuthAccount
|
||||
*
|
||||
*/
|
||||
export type AuthAccount = Prisma.AuthAccountModel
|
||||
/**
|
||||
* Model AuthInvite
|
||||
*
|
||||
*/
|
||||
export type AuthInvite = Prisma.AuthInviteModel
|
||||
/**
|
||||
* Model AuthInviteEvent
|
||||
*
|
||||
*/
|
||||
export type AuthInviteEvent = Prisma.AuthInviteEventModel
|
||||
/**
|
||||
* Model AuthVerification
|
||||
*
|
||||
*/
|
||||
export type AuthVerification = Prisma.AuthVerificationModel
|
||||
|
|
@ -1,769 +0,0 @@
|
|||
|
||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||
/* eslint-disable */
|
||||
// biome-ignore-all lint: generated file
|
||||
// @ts-nocheck
|
||||
/*
|
||||
* This file exports various common sort, input & filter types that are not directly linked to a particular model.
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
|
||||
import type * as runtime from "@prisma/client/runtime/client"
|
||||
import * as $Enums from "./enums"
|
||||
import type * as Prisma from "./internal/prismaNamespace"
|
||||
|
||||
|
||||
export type StringFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[]
|
||||
notIn?: string[]
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type StringNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||
}
|
||||
|
||||
export type DateTimeFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
notIn?: Date[] | string[]
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||
}
|
||||
|
||||
export type SortOrderInput = {
|
||||
sort: Prisma.SortOrder
|
||||
nulls?: Prisma.NullsOrder
|
||||
}
|
||||
|
||||
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[]
|
||||
notIn?: string[]
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
notIn?: Date[] | string[]
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type BoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type FloatNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
||||
}
|
||||
|
||||
export type EnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CompanyStateRegistrationType | Prisma.EnumCompanyStateRegistrationTypeFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.CompanyStateRegistrationType[] | null
|
||||
notIn?: $Enums.CompanyStateRegistrationType[] | null
|
||||
not?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel> | $Enums.CompanyStateRegistrationType | null
|
||||
}
|
||||
|
||||
export type JsonNullableFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonNullableFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonNullableFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type FloatNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumCompanyStateRegistrationTypeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CompanyStateRegistrationType | Prisma.EnumCompanyStateRegistrationTypeFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.CompanyStateRegistrationType[] | null
|
||||
notIn?: $Enums.CompanyStateRegistrationType[] | null
|
||||
not?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableWithAggregatesFilter<$PrismaModel> | $Enums.CompanyStateRegistrationType | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedJsonNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedJsonNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumUserRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UserRole | Prisma.EnumUserRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UserRole[]
|
||||
notIn?: $Enums.UserRole[]
|
||||
not?: Prisma.NestedEnumUserRoleFilter<$PrismaModel> | $Enums.UserRole
|
||||
}
|
||||
|
||||
export type EnumUserRoleWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UserRole | Prisma.EnumUserRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UserRole[]
|
||||
notIn?: $Enums.UserRole[]
|
||||
not?: Prisma.NestedEnumUserRoleWithAggregatesFilter<$PrismaModel> | $Enums.UserRole
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumUserRoleFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumUserRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type IntFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type EnumTicketStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketStatus | Prisma.EnumTicketStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketStatus[]
|
||||
notIn?: $Enums.TicketStatus[]
|
||||
not?: Prisma.NestedEnumTicketStatusFilter<$PrismaModel> | $Enums.TicketStatus
|
||||
}
|
||||
|
||||
export type EnumTicketPriorityFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketPriority | Prisma.EnumTicketPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketPriority[]
|
||||
notIn?: $Enums.TicketPriority[]
|
||||
not?: Prisma.NestedEnumTicketPriorityFilter<$PrismaModel> | $Enums.TicketPriority
|
||||
}
|
||||
|
||||
export type EnumTicketChannelFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketChannel | Prisma.EnumTicketChannelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketChannel[]
|
||||
notIn?: $Enums.TicketChannel[]
|
||||
not?: Prisma.NestedEnumTicketChannelFilter<$PrismaModel> | $Enums.TicketChannel
|
||||
}
|
||||
|
||||
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | null
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
||||
}
|
||||
|
||||
export type IntNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||
}
|
||||
|
||||
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumTicketStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketStatus | Prisma.EnumTicketStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketStatus[]
|
||||
notIn?: $Enums.TicketStatus[]
|
||||
not?: Prisma.NestedEnumTicketStatusWithAggregatesFilter<$PrismaModel> | $Enums.TicketStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTicketStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTicketStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumTicketPriorityWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketPriority | Prisma.EnumTicketPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketPriority[]
|
||||
notIn?: $Enums.TicketPriority[]
|
||||
not?: Prisma.NestedEnumTicketPriorityWithAggregatesFilter<$PrismaModel> | $Enums.TicketPriority
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTicketPriorityFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTicketPriorityFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumTicketChannelWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketChannel | Prisma.EnumTicketChannelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketChannel[]
|
||||
notIn?: $Enums.TicketChannel[]
|
||||
not?: Prisma.NestedEnumTicketChannelWithAggregatesFilter<$PrismaModel> | $Enums.TicketChannel
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTicketChannelFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTicketChannelFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | null
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type JsonWithAggregatesFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonWithAggregatesFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumCommentVisibilityFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CommentVisibility | Prisma.EnumCommentVisibilityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CommentVisibility[]
|
||||
notIn?: $Enums.CommentVisibility[]
|
||||
not?: Prisma.NestedEnumCommentVisibilityFilter<$PrismaModel> | $Enums.CommentVisibility
|
||||
}
|
||||
|
||||
export type EnumCommentVisibilityWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CommentVisibility | Prisma.EnumCommentVisibilityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CommentVisibility[]
|
||||
notIn?: $Enums.CommentVisibility[]
|
||||
not?: Prisma.NestedEnumCommentVisibilityWithAggregatesFilter<$PrismaModel> | $Enums.CommentVisibility
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCommentVisibilityFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCommentVisibilityFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedStringFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[]
|
||||
notIn?: string[]
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||
}
|
||||
|
||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||
}
|
||||
|
||||
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
notIn?: Date[] | string[]
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||
}
|
||||
|
||||
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
in?: string[]
|
||||
notIn?: string[]
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedIntFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||
in?: string[] | null
|
||||
notIn?: string[] | null
|
||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||
}
|
||||
|
||||
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
in?: Date[] | string[]
|
||||
notIn?: Date[] | string[]
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedBoolFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||
}
|
||||
|
||||
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedFloatNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
||||
}
|
||||
|
||||
export type NestedEnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CompanyStateRegistrationType | Prisma.EnumCompanyStateRegistrationTypeFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.CompanyStateRegistrationType[] | null
|
||||
notIn?: $Enums.CompanyStateRegistrationType[] | null
|
||||
not?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel> | $Enums.CompanyStateRegistrationType | null
|
||||
}
|
||||
|
||||
export type NestedFloatNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedFloatNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumCompanyStateRegistrationTypeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CompanyStateRegistrationType | Prisma.EnumCompanyStateRegistrationTypeFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.CompanyStateRegistrationType[] | null
|
||||
notIn?: $Enums.CompanyStateRegistrationType[] | null
|
||||
not?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableWithAggregatesFilter<$PrismaModel> | $Enums.CompanyStateRegistrationType | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCompanyStateRegistrationTypeNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedJsonNullableFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<NestedJsonNullableFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type NestedEnumUserRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UserRole | Prisma.EnumUserRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UserRole[]
|
||||
notIn?: $Enums.UserRole[]
|
||||
not?: Prisma.NestedEnumUserRoleFilter<$PrismaModel> | $Enums.UserRole
|
||||
}
|
||||
|
||||
export type NestedEnumUserRoleWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UserRole | Prisma.EnumUserRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UserRole[]
|
||||
notIn?: $Enums.UserRole[]
|
||||
not?: Prisma.NestedEnumUserRoleWithAggregatesFilter<$PrismaModel> | $Enums.UserRole
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumUserRoleFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumUserRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumTicketStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketStatus | Prisma.EnumTicketStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketStatus[]
|
||||
notIn?: $Enums.TicketStatus[]
|
||||
not?: Prisma.NestedEnumTicketStatusFilter<$PrismaModel> | $Enums.TicketStatus
|
||||
}
|
||||
|
||||
export type NestedEnumTicketPriorityFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketPriority | Prisma.EnumTicketPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketPriority[]
|
||||
notIn?: $Enums.TicketPriority[]
|
||||
not?: Prisma.NestedEnumTicketPriorityFilter<$PrismaModel> | $Enums.TicketPriority
|
||||
}
|
||||
|
||||
export type NestedEnumTicketChannelFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketChannel | Prisma.EnumTicketChannelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketChannel[]
|
||||
notIn?: $Enums.TicketChannel[]
|
||||
not?: Prisma.NestedEnumTicketChannelFilter<$PrismaModel> | $Enums.TicketChannel
|
||||
}
|
||||
|
||||
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | null
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
||||
}
|
||||
|
||||
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedFloatFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
notIn?: number[]
|
||||
lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedFloatFilter<$PrismaModel> | number
|
||||
}
|
||||
|
||||
export type NestedEnumTicketStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketStatus | Prisma.EnumTicketStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketStatus[]
|
||||
notIn?: $Enums.TicketStatus[]
|
||||
not?: Prisma.NestedEnumTicketStatusWithAggregatesFilter<$PrismaModel> | $Enums.TicketStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTicketStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTicketStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumTicketPriorityWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketPriority | Prisma.EnumTicketPriorityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketPriority[]
|
||||
notIn?: $Enums.TicketPriority[]
|
||||
not?: Prisma.NestedEnumTicketPriorityWithAggregatesFilter<$PrismaModel> | $Enums.TicketPriority
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTicketPriorityFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTicketPriorityFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumTicketChannelWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TicketChannel | Prisma.EnumTicketChannelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TicketChannel[]
|
||||
notIn?: $Enums.TicketChannel[]
|
||||
not?: Prisma.NestedEnumTicketChannelWithAggregatesFilter<$PrismaModel> | $Enums.TicketChannel
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTicketChannelFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTicketChannelFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||
in?: Date[] | string[] | null
|
||||
notIn?: Date[] | string[] | null
|
||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedJsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<NestedJsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type NestedJsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type NestedEnumCommentVisibilityFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CommentVisibility | Prisma.EnumCommentVisibilityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CommentVisibility[]
|
||||
notIn?: $Enums.CommentVisibility[]
|
||||
not?: Prisma.NestedEnumCommentVisibilityFilter<$PrismaModel> | $Enums.CommentVisibility
|
||||
}
|
||||
|
||||
export type NestedEnumCommentVisibilityWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CommentVisibility | Prisma.EnumCommentVisibilityFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CommentVisibility[]
|
||||
notIn?: $Enums.CommentVisibility[]
|
||||
not?: Prisma.NestedEnumCommentVisibilityWithAggregatesFilter<$PrismaModel> | $Enums.CommentVisibility
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCommentVisibilityFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCommentVisibilityFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
|
||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||
/* eslint-disable */
|
||||
// biome-ignore-all lint: generated file
|
||||
// @ts-nocheck
|
||||
/*
|
||||
* This file exports all enum related types from the schema.
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
|
||||
export const UserRole = {
|
||||
ADMIN: 'ADMIN',
|
||||
MANAGER: 'MANAGER',
|
||||
AGENT: 'AGENT',
|
||||
COLLABORATOR: 'COLLABORATOR'
|
||||
} as const
|
||||
|
||||
export type UserRole = (typeof UserRole)[keyof typeof UserRole]
|
||||
|
||||
|
||||
export const TicketStatus = {
|
||||
PENDING: 'PENDING',
|
||||
AWAITING_ATTENDANCE: 'AWAITING_ATTENDANCE',
|
||||
PAUSED: 'PAUSED',
|
||||
RESOLVED: 'RESOLVED'
|
||||
} as const
|
||||
|
||||
export type TicketStatus = (typeof TicketStatus)[keyof typeof TicketStatus]
|
||||
|
||||
|
||||
export const TicketPriority = {
|
||||
LOW: 'LOW',
|
||||
MEDIUM: 'MEDIUM',
|
||||
HIGH: 'HIGH',
|
||||
URGENT: 'URGENT'
|
||||
} as const
|
||||
|
||||
export type TicketPriority = (typeof TicketPriority)[keyof typeof TicketPriority]
|
||||
|
||||
|
||||
export const TicketChannel = {
|
||||
EMAIL: 'EMAIL',
|
||||
WHATSAPP: 'WHATSAPP',
|
||||
CHAT: 'CHAT',
|
||||
PHONE: 'PHONE',
|
||||
API: 'API',
|
||||
MANUAL: 'MANUAL'
|
||||
} as const
|
||||
|
||||
export type TicketChannel = (typeof TicketChannel)[keyof typeof TicketChannel]
|
||||
|
||||
|
||||
export const CommentVisibility = {
|
||||
PUBLIC: 'PUBLIC',
|
||||
INTERNAL: 'INTERNAL'
|
||||
} as const
|
||||
|
||||
export type CommentVisibility = (typeof CommentVisibility)[keyof typeof CommentVisibility]
|
||||
|
||||
|
||||
export const CompanyStateRegistrationType = {
|
||||
STANDARD: 'STANDARD',
|
||||
EXEMPT: 'EXEMPT',
|
||||
SIMPLES: 'SIMPLES'
|
||||
} as const
|
||||
|
||||
export type CompanyStateRegistrationType = (typeof CompanyStateRegistrationType)[keyof typeof CompanyStateRegistrationType]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
|
|
@ -1,441 +0,0 @@
|
|||
|
||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||
/* eslint-disable */
|
||||
// biome-ignore-all lint: generated file
|
||||
// @ts-nocheck
|
||||
/*
|
||||
* WARNING: This is an internal file that is subject to change!
|
||||
*
|
||||
* 🛑 Under no circumstances should you import this file directly! 🛑
|
||||
*
|
||||
* All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file.
|
||||
* While this enables partial backward compatibility, it is not part of the stable public API.
|
||||
*
|
||||
* If you are looking for your Models, Enums, and Input Types, please import them from the respective
|
||||
* model files in the `model` directory!
|
||||
*/
|
||||
|
||||
import * as runtime from "@prisma/client/runtime/index-browser"
|
||||
|
||||
export type * from '../models'
|
||||
export type * from './prismaNamespace'
|
||||
|
||||
export const Decimal = runtime.Decimal
|
||||
|
||||
|
||||
export const NullTypes = {
|
||||
DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
|
||||
JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
|
||||
AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
|
||||
}
|
||||
/**
|
||||
* Helper for filtering JSON entries that have `null` on the database (empty on the db)
|
||||
*
|
||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
||||
*/
|
||||
export const DbNull = runtime.DbNull
|
||||
|
||||
/**
|
||||
* Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
|
||||
*
|
||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
||||
*/
|
||||
export const JsonNull = runtime.JsonNull
|
||||
|
||||
/**
|
||||
* Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
|
||||
*
|
||||
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
|
||||
*/
|
||||
export const AnyNull = runtime.AnyNull
|
||||
|
||||
|
||||
export const ModelName = {
|
||||
Team: 'Team',
|
||||
TeamMember: 'TeamMember',
|
||||
Company: 'Company',
|
||||
User: 'User',
|
||||
Queue: 'Queue',
|
||||
Ticket: 'Ticket',
|
||||
ReportExportSchedule: 'ReportExportSchedule',
|
||||
ReportExportRun: 'ReportExportRun',
|
||||
TicketEvent: 'TicketEvent',
|
||||
TicketComment: 'TicketComment',
|
||||
SlaPolicy: 'SlaPolicy',
|
||||
AuthUser: 'AuthUser',
|
||||
AuthSession: 'AuthSession',
|
||||
AuthAccount: 'AuthAccount',
|
||||
AuthInvite: 'AuthInvite',
|
||||
AuthInviteEvent: 'AuthInviteEvent',
|
||||
AuthVerification: 'AuthVerification'
|
||||
} as const
|
||||
|
||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||
|
||||
/*
|
||||
* Enums
|
||||
*/
|
||||
|
||||
export const TransactionIsolationLevel = {
|
||||
Serializable: 'Serializable'
|
||||
} as const
|
||||
|
||||
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
||||
|
||||
|
||||
export const TeamScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
name: 'name',
|
||||
description: 'description',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type TeamScalarFieldEnum = (typeof TeamScalarFieldEnum)[keyof typeof TeamScalarFieldEnum]
|
||||
|
||||
|
||||
export const TeamMemberScalarFieldEnum = {
|
||||
teamId: 'teamId',
|
||||
userId: 'userId',
|
||||
isLead: 'isLead',
|
||||
assignedAt: 'assignedAt'
|
||||
} as const
|
||||
|
||||
export type TeamMemberScalarFieldEnum = (typeof TeamMemberScalarFieldEnum)[keyof typeof TeamMemberScalarFieldEnum]
|
||||
|
||||
|
||||
export const CompanyScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
name: 'name',
|
||||
slug: 'slug',
|
||||
provisioningCode: 'provisioningCode',
|
||||
isAvulso: 'isAvulso',
|
||||
contractedHoursPerMonth: 'contractedHoursPerMonth',
|
||||
cnpj: 'cnpj',
|
||||
domain: 'domain',
|
||||
phone: 'phone',
|
||||
description: 'description',
|
||||
address: 'address',
|
||||
legalName: 'legalName',
|
||||
tradeName: 'tradeName',
|
||||
stateRegistration: 'stateRegistration',
|
||||
stateRegistrationType: 'stateRegistrationType',
|
||||
primaryCnae: 'primaryCnae',
|
||||
timezone: 'timezone',
|
||||
businessHours: 'businessHours',
|
||||
supportEmail: 'supportEmail',
|
||||
billingEmail: 'billingEmail',
|
||||
contactPreferences: 'contactPreferences',
|
||||
clientDomains: 'clientDomains',
|
||||
communicationChannels: 'communicationChannels',
|
||||
fiscalAddress: 'fiscalAddress',
|
||||
hasBranches: 'hasBranches',
|
||||
regulatedEnvironments: 'regulatedEnvironments',
|
||||
privacyPolicyAccepted: 'privacyPolicyAccepted',
|
||||
privacyPolicyReference: 'privacyPolicyReference',
|
||||
privacyPolicyMetadata: 'privacyPolicyMetadata',
|
||||
contacts: 'contacts',
|
||||
locations: 'locations',
|
||||
contracts: 'contracts',
|
||||
sla: 'sla',
|
||||
tags: 'tags',
|
||||
customFields: 'customFields',
|
||||
notes: 'notes',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type CompanyScalarFieldEnum = (typeof CompanyScalarFieldEnum)[keyof typeof CompanyScalarFieldEnum]
|
||||
|
||||
|
||||
export const UserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
name: 'name',
|
||||
email: 'email',
|
||||
role: 'role',
|
||||
jobTitle: 'jobTitle',
|
||||
managerId: 'managerId',
|
||||
timezone: 'timezone',
|
||||
avatarUrl: 'avatarUrl',
|
||||
companyId: 'companyId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
||||
|
||||
|
||||
export const QueueScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
name: 'name',
|
||||
slug: 'slug',
|
||||
teamId: 'teamId',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type QueueScalarFieldEnum = (typeof QueueScalarFieldEnum)[keyof typeof QueueScalarFieldEnum]
|
||||
|
||||
|
||||
export const TicketScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
reference: 'reference',
|
||||
subject: 'subject',
|
||||
summary: 'summary',
|
||||
status: 'status',
|
||||
priority: 'priority',
|
||||
channel: 'channel',
|
||||
queueId: 'queueId',
|
||||
requesterId: 'requesterId',
|
||||
assigneeId: 'assigneeId',
|
||||
slaPolicyId: 'slaPolicyId',
|
||||
companyId: 'companyId',
|
||||
slaSnapshot: 'slaSnapshot',
|
||||
slaResponseDueAt: 'slaResponseDueAt',
|
||||
slaSolutionDueAt: 'slaSolutionDueAt',
|
||||
slaResponseStatus: 'slaResponseStatus',
|
||||
slaSolutionStatus: 'slaSolutionStatus',
|
||||
slaPausedAt: 'slaPausedAt',
|
||||
slaPausedBy: 'slaPausedBy',
|
||||
slaPausedMs: 'slaPausedMs',
|
||||
dueAt: 'dueAt',
|
||||
firstResponseAt: 'firstResponseAt',
|
||||
resolvedAt: 'resolvedAt',
|
||||
closedAt: 'closedAt',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type TicketScalarFieldEnum = (typeof TicketScalarFieldEnum)[keyof typeof TicketScalarFieldEnum]
|
||||
|
||||
|
||||
export const ReportExportScheduleScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
name: 'name',
|
||||
reportKeys: 'reportKeys',
|
||||
range: 'range',
|
||||
companyId: 'companyId',
|
||||
companyName: 'companyName',
|
||||
format: 'format',
|
||||
frequency: 'frequency',
|
||||
dayOfWeek: 'dayOfWeek',
|
||||
dayOfMonth: 'dayOfMonth',
|
||||
hour: 'hour',
|
||||
minute: 'minute',
|
||||
timezone: 'timezone',
|
||||
recipients: 'recipients',
|
||||
status: 'status',
|
||||
lastRunAt: 'lastRunAt',
|
||||
nextRunAt: 'nextRunAt',
|
||||
createdBy: 'createdBy',
|
||||
updatedBy: 'updatedBy',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type ReportExportScheduleScalarFieldEnum = (typeof ReportExportScheduleScalarFieldEnum)[keyof typeof ReportExportScheduleScalarFieldEnum]
|
||||
|
||||
|
||||
export const ReportExportRunScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
scheduleId: 'scheduleId',
|
||||
status: 'status',
|
||||
startedAt: 'startedAt',
|
||||
completedAt: 'completedAt',
|
||||
error: 'error',
|
||||
artifacts: 'artifacts'
|
||||
} as const
|
||||
|
||||
export type ReportExportRunScalarFieldEnum = (typeof ReportExportRunScalarFieldEnum)[keyof typeof ReportExportRunScalarFieldEnum]
|
||||
|
||||
|
||||
export const TicketEventScalarFieldEnum = {
|
||||
id: 'id',
|
||||
ticketId: 'ticketId',
|
||||
type: 'type',
|
||||
payload: 'payload',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type TicketEventScalarFieldEnum = (typeof TicketEventScalarFieldEnum)[keyof typeof TicketEventScalarFieldEnum]
|
||||
|
||||
|
||||
export const TicketCommentScalarFieldEnum = {
|
||||
id: 'id',
|
||||
ticketId: 'ticketId',
|
||||
authorId: 'authorId',
|
||||
visibility: 'visibility',
|
||||
body: 'body',
|
||||
attachments: 'attachments',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type TicketCommentScalarFieldEnum = (typeof TicketCommentScalarFieldEnum)[keyof typeof TicketCommentScalarFieldEnum]
|
||||
|
||||
|
||||
export const SlaPolicyScalarFieldEnum = {
|
||||
id: 'id',
|
||||
tenantId: 'tenantId',
|
||||
name: 'name',
|
||||
description: 'description',
|
||||
timeToFirstResponse: 'timeToFirstResponse',
|
||||
timeToResolution: 'timeToResolution',
|
||||
calendar: 'calendar',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type SlaPolicyScalarFieldEnum = (typeof SlaPolicyScalarFieldEnum)[keyof typeof SlaPolicyScalarFieldEnum]
|
||||
|
||||
|
||||
export const AuthUserScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
email: 'email',
|
||||
emailVerified: 'emailVerified',
|
||||
image: 'image',
|
||||
role: 'role',
|
||||
tenantId: 'tenantId',
|
||||
avatarUrl: 'avatarUrl',
|
||||
machinePersona: 'machinePersona',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type AuthUserScalarFieldEnum = (typeof AuthUserScalarFieldEnum)[keyof typeof AuthUserScalarFieldEnum]
|
||||
|
||||
|
||||
export const AuthSessionScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
token: 'token',
|
||||
expiresAt: 'expiresAt',
|
||||
ipAddress: 'ipAddress',
|
||||
userAgent: 'userAgent',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type AuthSessionScalarFieldEnum = (typeof AuthSessionScalarFieldEnum)[keyof typeof AuthSessionScalarFieldEnum]
|
||||
|
||||
|
||||
export const AuthAccountScalarFieldEnum = {
|
||||
id: 'id',
|
||||
userId: 'userId',
|
||||
accountId: 'accountId',
|
||||
providerId: 'providerId',
|
||||
accessToken: 'accessToken',
|
||||
refreshToken: 'refreshToken',
|
||||
accessTokenExpiresAt: 'accessTokenExpiresAt',
|
||||
refreshTokenExpiresAt: 'refreshTokenExpiresAt',
|
||||
scope: 'scope',
|
||||
idToken: 'idToken',
|
||||
password: 'password',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type AuthAccountScalarFieldEnum = (typeof AuthAccountScalarFieldEnum)[keyof typeof AuthAccountScalarFieldEnum]
|
||||
|
||||
|
||||
export const AuthInviteScalarFieldEnum = {
|
||||
id: 'id',
|
||||
email: 'email',
|
||||
name: 'name',
|
||||
role: 'role',
|
||||
tenantId: 'tenantId',
|
||||
token: 'token',
|
||||
status: 'status',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt',
|
||||
createdById: 'createdById',
|
||||
acceptedAt: 'acceptedAt',
|
||||
acceptedById: 'acceptedById',
|
||||
revokedAt: 'revokedAt',
|
||||
revokedById: 'revokedById',
|
||||
revokedReason: 'revokedReason'
|
||||
} as const
|
||||
|
||||
export type AuthInviteScalarFieldEnum = (typeof AuthInviteScalarFieldEnum)[keyof typeof AuthInviteScalarFieldEnum]
|
||||
|
||||
|
||||
export const AuthInviteEventScalarFieldEnum = {
|
||||
id: 'id',
|
||||
inviteId: 'inviteId',
|
||||
type: 'type',
|
||||
payload: 'payload',
|
||||
actorId: 'actorId',
|
||||
createdAt: 'createdAt'
|
||||
} as const
|
||||
|
||||
export type AuthInviteEventScalarFieldEnum = (typeof AuthInviteEventScalarFieldEnum)[keyof typeof AuthInviteEventScalarFieldEnum]
|
||||
|
||||
|
||||
export const AuthVerificationScalarFieldEnum = {
|
||||
id: 'id',
|
||||
identifier: 'identifier',
|
||||
value: 'value',
|
||||
expiresAt: 'expiresAt',
|
||||
createdAt: 'createdAt',
|
||||
updatedAt: 'updatedAt'
|
||||
} as const
|
||||
|
||||
export type AuthVerificationScalarFieldEnum = (typeof AuthVerificationScalarFieldEnum)[keyof typeof AuthVerificationScalarFieldEnum]
|
||||
|
||||
|
||||
export const SortOrder = {
|
||||
asc: 'asc',
|
||||
desc: 'desc'
|
||||
} as const
|
||||
|
||||
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
||||
|
||||
|
||||
export const NullableJsonNullValueInput = {
|
||||
DbNull: 'DbNull',
|
||||
JsonNull: 'JsonNull'
|
||||
} as const
|
||||
|
||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||
|
||||
|
||||
export const JsonNullValueInput = {
|
||||
JsonNull: 'JsonNull'
|
||||
} as const
|
||||
|
||||
export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
|
||||
|
||||
|
||||
export const NullsOrder = {
|
||||
first: 'first',
|
||||
last: 'last'
|
||||
} as const
|
||||
|
||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||
|
||||
|
||||
export const JsonNullValueFilter = {
|
||||
DbNull: 'DbNull',
|
||||
JsonNull: 'JsonNull',
|
||||
AnyNull: 'AnyNull'
|
||||
} as const
|
||||
|
||||
export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
|
||||
|
||||
|
||||
export const QueryMode = {
|
||||
default: 'default',
|
||||
insensitive: 'insensitive'
|
||||
} as const
|
||||
|
||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
||||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
|
||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
||||
/* eslint-disable */
|
||||
// biome-ignore-all lint: generated file
|
||||
// @ts-nocheck
|
||||
/*
|
||||
* This is a barrel export file for all models and their related types.
|
||||
*
|
||||
* 🟢 You can import this file directly.
|
||||
*/
|
||||
export type * from './models/Team'
|
||||
export type * from './models/TeamMember'
|
||||
export type * from './models/Company'
|
||||
export type * from './models/User'
|
||||
export type * from './models/Queue'
|
||||
export type * from './models/Ticket'
|
||||
export type * from './models/ReportExportSchedule'
|
||||
export type * from './models/ReportExportRun'
|
||||
export type * from './models/TicketEvent'
|
||||
export type * from './models/TicketComment'
|
||||
export type * from './models/SlaPolicy'
|
||||
export type * from './models/AuthUser'
|
||||
export type * from './models/AuthSession'
|
||||
export type * from './models/AuthAccount'
|
||||
export type * from './models/AuthInvite'
|
||||
export type * from './models/AuthInviteEvent'
|
||||
export type * from './models/AuthVerification'
|
||||
export type * from './commonInputTypes'
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1,10 +1,20 @@
|
|||
import path from "node:path"
|
||||
|
||||
import { PrismaClient } from "@/generated/prisma/client"
|
||||
import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"
|
||||
import { PrismaClient, Prisma } from "@/generated/prisma/client"
|
||||
|
||||
type PrismaClientInstance = InstanceType<typeof PrismaClient>
|
||||
type TransactionCallback = Extract<
|
||||
Parameters<PrismaClientInstance["$transaction"]>[0],
|
||||
(tx: PrismaClientInstance) => Promise<unknown>
|
||||
>
|
||||
export type PrismaTransactionClient = TransactionCallback extends (tx: infer Client) => Promise<unknown>
|
||||
? Client
|
||||
: never
|
||||
export type PrismaDelegateClient = PrismaClientInstance
|
||||
|
||||
declare global {
|
||||
var prisma: PrismaClient | undefined
|
||||
var prisma: PrismaClientInstance | undefined
|
||||
}
|
||||
|
||||
// Resolve a robust DATABASE_URL for all runtimes (prod/dev)
|
||||
|
|
@ -72,4 +82,21 @@ if (process.env.NODE_ENV !== "production") {
|
|||
console.log("[prisma] Using database:", resolvedDatabaseUrl)
|
||||
}
|
||||
|
||||
export * from "@/generated/prisma/client"
|
||||
export { Prisma }
|
||||
|
||||
type PrismaKnownErrorLike = {
|
||||
code?: string
|
||||
meta?: Record<string, unknown>
|
||||
message?: string
|
||||
}
|
||||
|
||||
export function asPrismaKnownError(error: unknown): PrismaKnownErrorLike | null {
|
||||
if (!error || typeof error !== "object") {
|
||||
return null
|
||||
}
|
||||
const candidate = error as PrismaKnownErrorLike
|
||||
if (typeof candidate.code !== "string") {
|
||||
return null
|
||||
}
|
||||
return candidate
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
import { Prisma, type Company, prisma } from "@/lib/prisma"
|
||||
import type { Prisma as PrismaTypes } from "@/generated/prisma/client"
|
||||
import { Prisma, asPrismaKnownError } from "@/lib/prisma"
|
||||
import type { PrismaDelegateClient } from "@/lib/prisma"
|
||||
import { prisma } from "@/lib/prisma"
|
||||
import { ZodError } from "zod"
|
||||
|
||||
import {
|
||||
|
|
@ -9,6 +12,10 @@ import {
|
|||
type CompanyStateRegistrationTypeOption,
|
||||
} from "@/lib/schemas/company"
|
||||
|
||||
type DbCompany = Awaited<ReturnType<PrismaDelegateClient["company"]["create"]>>
|
||||
type CompanyFindManyArgs = Parameters<PrismaDelegateClient["company"]["findMany"]>[0]
|
||||
type CompanyCreatePayload = Parameters<PrismaDelegateClient["company"]["create"]>[0]["data"]
|
||||
|
||||
export type NormalizedCompany = CompanyFormValues & {
|
||||
id: string
|
||||
provisioningCode: string | null
|
||||
|
|
@ -16,8 +23,6 @@ export type NormalizedCompany = CompanyFormValues & {
|
|||
updatedAt: string
|
||||
}
|
||||
|
||||
type CompanyCreatePayload = Omit<Prisma.CompanyCreateInput, "provisioningCode">
|
||||
|
||||
// Local representation of the DB enum to avoid relying on Prisma enum exports
|
||||
type DbCompanyStateRegistrationType = "STANDARD" | "EXEMPT" | "SIMPLES"
|
||||
|
||||
|
|
@ -71,7 +76,26 @@ const STATE_REGISTRATION_TYPE_FROM_PRISMA: Record<
|
|||
SIMPLES: "simples",
|
||||
}
|
||||
|
||||
const JSON_NULL_VALUE = Prisma.JsonNull as unknown as Prisma.InputJsonValue
|
||||
type PrismaJsonInput = PrismaTypes.InputJsonValue | PrismaTypes.NullableJsonNullValueInput
|
||||
|
||||
const JSON_NULL_VALUE: PrismaTypes.NullableJsonNullValueInput = Prisma.JsonNull
|
||||
|
||||
function toJsonInput(value: unknown): PrismaJsonInput {
|
||||
if (value === null || value === undefined) {
|
||||
return JSON_NULL_VALUE
|
||||
}
|
||||
if (value === Prisma.JsonNull || value === Prisma.DbNull) {
|
||||
return value
|
||||
}
|
||||
return value as PrismaTypes.InputJsonValue
|
||||
}
|
||||
|
||||
function asJsonRecord(value: PrismaTypes.JsonValue | null | undefined): Record<string, unknown> | undefined {
|
||||
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
||||
return undefined
|
||||
}
|
||||
return value as Record<string, unknown>
|
||||
}
|
||||
|
||||
const COMPANY_LEGACY_SELECT = {
|
||||
id: true,
|
||||
|
|
@ -81,13 +105,12 @@ const COMPANY_LEGACY_SELECT = {
|
|||
isAvulso: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
} satisfies Prisma.CompanySelect
|
||||
|
||||
type LegacyCompanyRow = Prisma.CompanyGetPayload<{ select: typeof COMPANY_LEGACY_SELECT }>
|
||||
} as const
|
||||
|
||||
function isMissingProvisioningCodeColumn(error: unknown): boolean {
|
||||
if (error instanceof Prisma.PrismaClientKnownRequestError && error.code === "P2022") {
|
||||
const meta = error.meta as Record<string, unknown> | undefined
|
||||
const knownError = asPrismaKnownError(error)
|
||||
if (knownError && knownError.code === "P2022") {
|
||||
const meta = knownError.meta as Record<string, unknown> | undefined
|
||||
const metaColumn =
|
||||
typeof meta?.column === "string"
|
||||
? meta.column
|
||||
|
|
@ -97,15 +120,16 @@ function isMissingProvisioningCodeColumn(error: unknown): boolean {
|
|||
? meta.model
|
||||
: null
|
||||
if (metaColumn && metaColumn.toLowerCase().includes("provisioningcode")) return true
|
||||
if (error.message.toLowerCase().includes("provisioningcode")) return true
|
||||
if (knownError.message?.toLowerCase().includes("provisioningcode")) return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function isMissingCompanyTable(error: unknown): boolean {
|
||||
if (error instanceof Prisma.PrismaClientKnownRequestError) {
|
||||
if (error.code === "P2021") return true
|
||||
const message = error.message.toLowerCase()
|
||||
const knownError = asPrismaKnownError(error)
|
||||
if (knownError) {
|
||||
if (knownError.code === "P2021") return true
|
||||
const message = knownError.message?.toLowerCase() ?? ""
|
||||
if (message.includes("table") && message.includes("company") && message.includes("does not exist")) {
|
||||
return true
|
||||
}
|
||||
|
|
@ -113,7 +137,7 @@ function isMissingCompanyTable(error: unknown): boolean {
|
|||
return false
|
||||
}
|
||||
|
||||
export async function safeCompanyFindMany(args: Prisma.CompanyFindManyArgs): Promise<Company[]> {
|
||||
export async function safeCompanyFindMany(args: CompanyFindManyArgs = {} as CompanyFindManyArgs): Promise<DbCompany[]> {
|
||||
try {
|
||||
return await prisma.company.findMany(args)
|
||||
} catch (error) {
|
||||
|
|
@ -124,14 +148,15 @@ export async function safeCompanyFindMany(args: Prisma.CompanyFindManyArgs): Pro
|
|||
throw error
|
||||
}
|
||||
|
||||
if (args.select || args.include) {
|
||||
const hasProjection = Boolean(args?.select || args?.include)
|
||||
if (hasProjection) {
|
||||
throw error
|
||||
}
|
||||
|
||||
const legacyRows = (await prisma.company.findMany({
|
||||
const legacyRows = await prisma.company.findMany({
|
||||
...args,
|
||||
select: COMPANY_LEGACY_SELECT,
|
||||
})) as LegacyCompanyRow[]
|
||||
})
|
||||
|
||||
return legacyRows.map(
|
||||
(row) => ({
|
||||
|
|
@ -174,7 +199,7 @@ export async function safeCompanyFindMany(args: Prisma.CompanyFindManyArgs): Pro
|
|||
notes: null,
|
||||
createdAt: row.createdAt,
|
||||
updatedAt: row.updatedAt,
|
||||
}) as Company
|
||||
}) as DbCompany
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -326,11 +351,20 @@ export function buildCompanyData(payload: CompanyFormValues, tenantId: string):
|
|||
|
||||
const communicationChannels = mergeChannelsWithPrimary(payload)
|
||||
const privacyPolicyMetadata = payload.privacyPolicy?.metadata ?? null
|
||||
const contactPreferencesPayload =
|
||||
payload.contactPreferences || payload.supportEmail || payload.billingEmail
|
||||
? {
|
||||
...(payload.contactPreferences ?? {}),
|
||||
supportEmail: payload.supportEmail ?? null,
|
||||
billingEmail: payload.billingEmail ?? null,
|
||||
}
|
||||
: null
|
||||
|
||||
const data: CompanyCreatePayload = {
|
||||
tenantId,
|
||||
name: payload.name.trim(),
|
||||
slug: payload.slug.trim(),
|
||||
provisioningCode: payload.slug.trim(),
|
||||
isAvulso: payload.isAvulso ?? false,
|
||||
contractedHoursPerMonth: payload.contractedHoursPerMonth ?? null,
|
||||
cnpj: payload.cnpj ?? null,
|
||||
|
|
@ -344,40 +378,31 @@ export function buildCompanyData(payload: CompanyFormValues, tenantId: string):
|
|||
stateRegistrationType,
|
||||
primaryCnae: payload.primaryCnae ?? null,
|
||||
timezone: payload.businessHours?.timezone ?? null,
|
||||
businessHours: payload.businessHours ?? JSON_NULL_VALUE,
|
||||
businessHours: toJsonInput(payload.businessHours),
|
||||
supportEmail: payload.supportEmail ?? null,
|
||||
billingEmail: payload.billingEmail ?? null,
|
||||
contactPreferences:
|
||||
payload.contactPreferences || payload.supportEmail || payload.billingEmail
|
||||
? ({
|
||||
...payload.contactPreferences,
|
||||
supportEmail: payload.supportEmail ?? null,
|
||||
billingEmail: payload.billingEmail ?? null,
|
||||
} satisfies Prisma.InputJsonValue)
|
||||
: JSON_NULL_VALUE,
|
||||
clientDomains: payload.clientDomains,
|
||||
communicationChannels,
|
||||
fiscalAddress: payload.fiscalAddress ?? JSON_NULL_VALUE,
|
||||
contactPreferences: toJsonInput(contactPreferencesPayload),
|
||||
clientDomains: toJsonInput(payload.clientDomains),
|
||||
communicationChannels: toJsonInput(communicationChannels),
|
||||
fiscalAddress: toJsonInput(payload.fiscalAddress),
|
||||
hasBranches: payload.hasBranches ?? false,
|
||||
regulatedEnvironments: payload.regulatedEnvironments,
|
||||
regulatedEnvironments: toJsonInput(payload.regulatedEnvironments),
|
||||
privacyPolicyAccepted: payload.privacyPolicy?.accepted ?? false,
|
||||
privacyPolicyReference: payload.privacyPolicy?.reference ?? null,
|
||||
privacyPolicyMetadata: privacyPolicyMetadata
|
||||
? (privacyPolicyMetadata as Prisma.InputJsonValue)
|
||||
: JSON_NULL_VALUE,
|
||||
contacts: payload.contacts,
|
||||
locations: payload.locations,
|
||||
contracts: payload.contracts,
|
||||
sla: payload.sla ?? JSON_NULL_VALUE,
|
||||
tags: payload.tags,
|
||||
customFields: payload.customFields,
|
||||
privacyPolicyMetadata: toJsonInput(privacyPolicyMetadata),
|
||||
contacts: toJsonInput(payload.contacts),
|
||||
locations: toJsonInput(payload.locations),
|
||||
contracts: toJsonInput(payload.contracts),
|
||||
sla: toJsonInput(payload.sla),
|
||||
tags: toJsonInput(payload.tags),
|
||||
customFields: toJsonInput(payload.customFields),
|
||||
notes: payload.notes ?? null,
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
export function normalizeCompany(company: Company): NormalizedCompany {
|
||||
export function normalizeCompany(company: DbCompany): NormalizedCompany {
|
||||
const communicationChannels = normalizeChannels(
|
||||
company.communicationChannels as CompanyCommunicationChannels | null | undefined
|
||||
)
|
||||
|
|
@ -413,9 +438,7 @@ export function normalizeCompany(company: Company): NormalizedCompany {
|
|||
privacyPolicy: {
|
||||
accepted: Boolean(company.privacyPolicyAccepted),
|
||||
reference: company.privacyPolicyReference ?? null,
|
||||
metadata: company.privacyPolicyMetadata
|
||||
? (company.privacyPolicyMetadata as Record<string, unknown>)
|
||||
: undefined,
|
||||
metadata: asJsonRecord(company.privacyPolicyMetadata),
|
||||
},
|
||||
contacts: (company.contacts as CompanyFormValues["contacts"]) ?? [],
|
||||
locations: (company.locations as CompanyFormValues["locations"]) ?? [],
|
||||
|
|
@ -443,14 +466,14 @@ export function normalizeCompany(company: Company): NormalizedCompany {
|
|||
}
|
||||
}
|
||||
|
||||
export async function fetchCompaniesByTenant(tenantId: string): Promise<Company[]> {
|
||||
export async function fetchCompaniesByTenant(tenantId: string): Promise<DbCompany[]> {
|
||||
return safeCompanyFindMany({
|
||||
where: { tenantId },
|
||||
orderBy: { name: "asc" },
|
||||
})
|
||||
}
|
||||
|
||||
export async function fetchCompanyById(id: string): Promise<Company | null> {
|
||||
export async function fetchCompanyById(id: string): Promise<DbCompany | null> {
|
||||
const rows = await safeCompanyFindMany({
|
||||
where: { id },
|
||||
take: 1,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { AuthInvite, AuthInviteEvent } from "@/lib/prisma"
|
||||
import type { AuthInvite, AuthInviteEvent } from "@/generated/prisma/client"
|
||||
|
||||
import { ROLE_OPTIONS, type RoleOption, normalizeRole } from "@/lib/authz"
|
||||
import { DEFAULT_TENANT_ID } from "@/lib/constants"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
"use server"
|
||||
|
||||
import type { Prisma } from "@/lib/prisma"
|
||||
|
||||
import type { Prisma as PrismaTypes } from "@/generated/prisma/client"
|
||||
import { prisma } from "@/lib/prisma"
|
||||
import { env } from "@/lib/env"
|
||||
import { sendSmtpMail } from "@/server/email-smtp"
|
||||
|
|
@ -62,7 +61,7 @@ export async function runReportSchedules(
|
|||
): Promise<RunReportSchedulesResult> {
|
||||
const now = options.now ?? new Date()
|
||||
|
||||
const where: Prisma.ReportExportScheduleWhereInput = {
|
||||
const where: PrismaTypes.ReportExportScheduleWhereInput = {
|
||||
status: "ACTIVE",
|
||||
}
|
||||
if (options.tenantId) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import "server-only"
|
||||
|
||||
import { addMonths, addWeeks, isBefore } from "date-fns"
|
||||
import type { ReportExportRun, ReportExportSchedule } from "@/lib/prisma"
|
||||
import type { ReportExportRun, ReportExportSchedule } from "@/generated/prisma/client"
|
||||
import { REPORT_EXPORT_DEFINITIONS, type ReportExportKey } from "@/lib/report-definitions"
|
||||
|
||||
type SerializableSchedule = ReportExportSchedule & {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue