prismaNamespace.ts 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. /* !!! This is code generated by Prisma. Do not edit directly. !!! */
  2. /* eslint-disable */
  3. // @ts-nocheck
  4. /*
  5. * WARNING: This is an internal file that is subject to change!
  6. *
  7. * 🛑 Under no circumstances should you import this file directly! 🛑
  8. *
  9. * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file.
  10. * While this enables partial backward compatibility, it is not part of the stable public API.
  11. *
  12. * If you are looking for your Models, Enums, and Input Types, please import them from the respective
  13. * model files in the `model` directory!
  14. */
  15. import * as runtime from "@prisma/client/runtime/library"
  16. import type * as Prisma from "../models.ts"
  17. import { type PrismaClient } from "./class.ts"
  18. export type * from '../models.ts'
  19. export type DMMF = typeof runtime.DMMF
  20. export type PrismaPromise<T> = runtime.Types.Public.PrismaPromise<T>
  21. /**
  22. * Prisma Errors
  23. */
  24. export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
  25. export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
  26. export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
  27. export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
  28. export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
  29. export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
  30. export const PrismaClientInitializationError = runtime.PrismaClientInitializationError
  31. export type PrismaClientInitializationError = runtime.PrismaClientInitializationError
  32. export const PrismaClientValidationError = runtime.PrismaClientValidationError
  33. export type PrismaClientValidationError = runtime.PrismaClientValidationError
  34. /**
  35. * Re-export of sql-template-tag
  36. */
  37. export const sql = runtime.sqltag
  38. export const empty = runtime.empty
  39. export const join = runtime.join
  40. export const raw = runtime.raw
  41. export const Sql = runtime.Sql
  42. export type Sql = runtime.Sql
  43. /**
  44. * Decimal.js
  45. */
  46. export const Decimal = runtime.Decimal
  47. export type Decimal = runtime.Decimal
  48. export type DecimalJsLike = runtime.DecimalJsLike
  49. /**
  50. * Metrics
  51. */
  52. export type Metrics = runtime.Metrics
  53. export type Metric<T> = runtime.Metric<T>
  54. export type MetricHistogram = runtime.MetricHistogram
  55. export type MetricHistogramBucket = runtime.MetricHistogramBucket
  56. /**
  57. * Extensions
  58. */
  59. export type Extension = runtime.Types.Extensions.UserArgs
  60. export const getExtensionContext = runtime.Extensions.getExtensionContext
  61. export type Args<T, F extends runtime.Operation> = runtime.Types.Public.Args<T, F>
  62. export type Payload<T, F extends runtime.Operation = never> = runtime.Types.Public.Payload<T, F>
  63. export type Result<T, A, F extends runtime.Operation> = runtime.Types.Public.Result<T, A, F>
  64. export type Exact<A, W> = runtime.Types.Public.Exact<A, W>
  65. export type PrismaVersion = {
  66. client: string
  67. engine: string
  68. }
  69. /**
  70. * Prisma Client JS version: 6.17.1
  71. * Query Engine version: 272a37d34178c2894197e17273bf937f25acdeac
  72. */
  73. export const prismaVersion: PrismaVersion = {
  74. client: "6.17.1",
  75. engine: "272a37d34178c2894197e17273bf937f25acdeac"
  76. }
  77. /**
  78. * Utility Types
  79. */
  80. export type JsonObject = runtime.JsonObject
  81. export type JsonArray = runtime.JsonArray
  82. export type JsonValue = runtime.JsonValue
  83. export type InputJsonObject = runtime.InputJsonObject
  84. export type InputJsonArray = runtime.InputJsonArray
  85. export type InputJsonValue = runtime.InputJsonValue
  86. export const NullTypes = {
  87. DbNull: runtime.objectEnumValues.classes.DbNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull),
  88. JsonNull: runtime.objectEnumValues.classes.JsonNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull),
  89. AnyNull: runtime.objectEnumValues.classes.AnyNull as (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull),
  90. }
  91. /**
  92. * Helper for filtering JSON entries that have `null` on the database (empty on the db)
  93. *
  94. * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
  95. */
  96. export const DbNull = runtime.objectEnumValues.instances.DbNull
  97. /**
  98. * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
  99. *
  100. * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
  101. */
  102. export const JsonNull = runtime.objectEnumValues.instances.JsonNull
  103. /**
  104. * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
  105. *
  106. * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
  107. */
  108. export const AnyNull = runtime.objectEnumValues.instances.AnyNull
  109. type SelectAndInclude = {
  110. select: any
  111. include: any
  112. }
  113. type SelectAndOmit = {
  114. select: any
  115. omit: any
  116. }
  117. /**
  118. * From T, pick a set of properties whose keys are in the union K
  119. */
  120. type Prisma__Pick<T, K extends keyof T> = {
  121. [P in K]: T[P];
  122. };
  123. export type Enumerable<T> = T | Array<T>;
  124. /**
  125. * Subset
  126. * @desc From `T` pick properties that exist in `U`. Simple version of Intersection
  127. */
  128. export type Subset<T, U> = {
  129. [key in keyof T]: key extends keyof U ? T[key] : never;
  130. };
  131. /**
  132. * SelectSubset
  133. * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
  134. * Additionally, it validates, if both select and include are present. If the case, it errors.
  135. */
  136. export type SelectSubset<T, U> = {
  137. [key in keyof T]: key extends keyof U ? T[key] : never
  138. } &
  139. (T extends SelectAndInclude
  140. ? 'Please either choose `select` or `include`.'
  141. : T extends SelectAndOmit
  142. ? 'Please either choose `select` or `omit`.'
  143. : {})
  144. /**
  145. * Subset + Intersection
  146. * @desc From `T` pick properties that exist in `U` and intersect `K`
  147. */
  148. export type SubsetIntersection<T, U, K> = {
  149. [key in keyof T]: key extends keyof U ? T[key] : never
  150. } &
  151. K
  152. type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
  153. /**
  154. * XOR is needed to have a real mutually exclusive union type
  155. * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
  156. */
  157. export type XOR<T, U> =
  158. T extends object ?
  159. U extends object ?
  160. (Without<T, U> & U) | (Without<U, T> & T)
  161. : U : T
  162. /**
  163. * Is T a Record?
  164. */
  165. type IsObject<T extends any> = T extends Array<any>
  166. ? False
  167. : T extends Date
  168. ? False
  169. : T extends Uint8Array
  170. ? False
  171. : T extends BigInt
  172. ? False
  173. : T extends object
  174. ? True
  175. : False
  176. /**
  177. * If it's T[], return T
  178. */
  179. export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T
  180. /**
  181. * From ts-toolbelt
  182. */
  183. type __Either<O extends object, K extends Key> = Omit<O, K> &
  184. {
  185. // Merge all but K
  186. [P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
  187. }[K]
  188. type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>
  189. type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>
  190. type _Either<
  191. O extends object,
  192. K extends Key,
  193. strict extends Boolean
  194. > = {
  195. 1: EitherStrict<O, K>
  196. 0: EitherLoose<O, K>
  197. }[strict]
  198. export type Either<
  199. O extends object,
  200. K extends Key,
  201. strict extends Boolean = 1
  202. > = O extends unknown ? _Either<O, K, strict> : never
  203. export type Union = any
  204. export type PatchUndefined<O extends object, O1 extends object> = {
  205. [K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
  206. } & {}
  207. /** Helper Types for "Merge" **/
  208. export type IntersectOf<U extends Union> = (
  209. U extends unknown ? (k: U) => void : never
  210. ) extends (k: infer I) => void
  211. ? I
  212. : never
  213. export type Overwrite<O extends object, O1 extends object> = {
  214. [K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
  215. } & {};
  216. type _Merge<U extends object> = IntersectOf<Overwrite<U, {
  217. [K in keyof U]-?: At<U, K>;
  218. }>>;
  219. type Key = string | number | symbol;
  220. type AtStrict<O extends object, K extends Key> = O[K & keyof O];
  221. type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
  222. export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
  223. 1: AtStrict<O, K>;
  224. 0: AtLoose<O, K>;
  225. }[strict];
  226. export type ComputeRaw<A extends any> = A extends Function ? A : {
  227. [K in keyof A]: A[K];
  228. } & {};
  229. export type OptionalFlat<O> = {
  230. [K in keyof O]?: O[K];
  231. } & {};
  232. type _Record<K extends keyof any, T> = {
  233. [P in K]: T;
  234. };
  235. // cause typescript not to expand types and preserve names
  236. type NoExpand<T> = T extends unknown ? T : never;
  237. // this type assumes the passed object is entirely optional
  238. export type AtLeast<O extends object, K extends string> = NoExpand<
  239. O extends unknown
  240. ? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
  241. | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O
  242. : never>;
  243. type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;
  244. export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
  245. /** End Helper Types for "Merge" **/
  246. export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;
  247. export type Boolean = True | False
  248. export type True = 1
  249. export type False = 0
  250. export type Not<B extends Boolean> = {
  251. 0: 1
  252. 1: 0
  253. }[B]
  254. export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
  255. ? 0 // anything `never` is false
  256. : A1 extends A2
  257. ? 1
  258. : 0
  259. export type Has<U extends Union, U1 extends Union> = Not<
  260. Extends<Exclude<U1, U>, U1>
  261. >
  262. export type Or<B1 extends Boolean, B2 extends Boolean> = {
  263. 0: {
  264. 0: 0
  265. 1: 1
  266. }
  267. 1: {
  268. 0: 1
  269. 1: 1
  270. }
  271. }[B1][B2]
  272. export type Keys<U extends Union> = U extends unknown ? keyof U : never
  273. export type GetScalarType<T, O> = O extends object ? {
  274. [P in keyof T]: P extends keyof O
  275. ? O[P]
  276. : never
  277. } : never
  278. type FieldPaths<
  279. T,
  280. U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
  281. > = IsObject<T> extends True ? U : T
  282. export type GetHavingFields<T> = {
  283. [K in keyof T]: Or<
  284. Or<Extends<'OR', K>, Extends<'AND', K>>,
  285. Extends<'NOT', K>
  286. > extends True
  287. ? // infer is only needed to not hit TS limit
  288. // based on the brilliant idea of Pierre-Antoine Mills
  289. // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
  290. T[K] extends infer TK
  291. ? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
  292. : never
  293. : {} extends FieldPaths<T[K]>
  294. ? never
  295. : K
  296. }[keyof T]
  297. /**
  298. * Convert tuple to union
  299. */
  300. type _TupleToUnion<T> = T extends (infer E)[] ? E : never
  301. type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
  302. export type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T
  303. /**
  304. * Like `Pick`, but additionally can also accept an array of keys
  305. */
  306. export type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>
  307. /**
  308. * Exclude all keys with underscores
  309. */
  310. export type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T
  311. export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>
  312. type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>
  313. export const ModelName = {
  314. ShortLink: 'ShortLink'
  315. } as const
  316. export type ModelName = (typeof ModelName)[keyof typeof ModelName]
  317. export interface TypeMapCb<GlobalOmitOptions = {}> extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record<string, any>> {
  318. returns: TypeMap<this['params']['extArgs'], GlobalOmitOptions>
  319. }
  320. export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
  321. globalOmitOptions: {
  322. omit: GlobalOmitOptions
  323. }
  324. meta: {
  325. modelProps: "shortLink"
  326. txIsolationLevel: TransactionIsolationLevel
  327. }
  328. model: {
  329. ShortLink: {
  330. payload: Prisma.$ShortLinkPayload<ExtArgs>
  331. fields: Prisma.ShortLinkFieldRefs
  332. operations: {
  333. findUnique: {
  334. args: Prisma.ShortLinkFindUniqueArgs<ExtArgs>
  335. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload> | null
  336. }
  337. findUniqueOrThrow: {
  338. args: Prisma.ShortLinkFindUniqueOrThrowArgs<ExtArgs>
  339. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>
  340. }
  341. findFirst: {
  342. args: Prisma.ShortLinkFindFirstArgs<ExtArgs>
  343. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload> | null
  344. }
  345. findFirstOrThrow: {
  346. args: Prisma.ShortLinkFindFirstOrThrowArgs<ExtArgs>
  347. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>
  348. }
  349. findMany: {
  350. args: Prisma.ShortLinkFindManyArgs<ExtArgs>
  351. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>[]
  352. }
  353. create: {
  354. args: Prisma.ShortLinkCreateArgs<ExtArgs>
  355. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>
  356. }
  357. createMany: {
  358. args: Prisma.ShortLinkCreateManyArgs<ExtArgs>
  359. result: BatchPayload
  360. }
  361. createManyAndReturn: {
  362. args: Prisma.ShortLinkCreateManyAndReturnArgs<ExtArgs>
  363. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>[]
  364. }
  365. delete: {
  366. args: Prisma.ShortLinkDeleteArgs<ExtArgs>
  367. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>
  368. }
  369. update: {
  370. args: Prisma.ShortLinkUpdateArgs<ExtArgs>
  371. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>
  372. }
  373. deleteMany: {
  374. args: Prisma.ShortLinkDeleteManyArgs<ExtArgs>
  375. result: BatchPayload
  376. }
  377. updateMany: {
  378. args: Prisma.ShortLinkUpdateManyArgs<ExtArgs>
  379. result: BatchPayload
  380. }
  381. updateManyAndReturn: {
  382. args: Prisma.ShortLinkUpdateManyAndReturnArgs<ExtArgs>
  383. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>[]
  384. }
  385. upsert: {
  386. args: Prisma.ShortLinkUpsertArgs<ExtArgs>
  387. result: runtime.Types.Utils.PayloadToResult<Prisma.$ShortLinkPayload>
  388. }
  389. aggregate: {
  390. args: Prisma.ShortLinkAggregateArgs<ExtArgs>
  391. result: runtime.Types.Utils.Optional<Prisma.AggregateShortLink>
  392. }
  393. groupBy: {
  394. args: Prisma.ShortLinkGroupByArgs<ExtArgs>
  395. result: runtime.Types.Utils.Optional<Prisma.ShortLinkGroupByOutputType>[]
  396. }
  397. count: {
  398. args: Prisma.ShortLinkCountArgs<ExtArgs>
  399. result: runtime.Types.Utils.Optional<Prisma.ShortLinkCountAggregateOutputType> | number
  400. }
  401. }
  402. }
  403. }
  404. } & {
  405. other: {
  406. payload: any
  407. operations: {
  408. $executeRaw: {
  409. args: [query: TemplateStringsArray | Sql, ...values: any[]],
  410. result: any
  411. }
  412. $executeRawUnsafe: {
  413. args: [query: string, ...values: any[]],
  414. result: any
  415. }
  416. $queryRaw: {
  417. args: [query: TemplateStringsArray | Sql, ...values: any[]],
  418. result: any
  419. }
  420. $queryRawUnsafe: {
  421. args: [query: string, ...values: any[]],
  422. result: any
  423. }
  424. }
  425. }
  426. }
  427. /**
  428. * Enums
  429. */
  430. export const TransactionIsolationLevel = runtime.makeStrictEnum({
  431. Serializable: 'Serializable'
  432. } as const)
  433. export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
  434. export const ShortLinkScalarFieldEnum = {
  435. id: 'id',
  436. shortCode: 'shortCode',
  437. fullUrl: 'fullUrl',
  438. createdAt: 'createdAt',
  439. updatedAt: 'updatedAt'
  440. } as const
  441. export type ShortLinkScalarFieldEnum = (typeof ShortLinkScalarFieldEnum)[keyof typeof ShortLinkScalarFieldEnum]
  442. export const SortOrder = {
  443. asc: 'asc',
  444. desc: 'desc'
  445. } as const
  446. export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
  447. /**
  448. * Field references
  449. */
  450. /**
  451. * Reference to a field of type 'String'
  452. */
  453. export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
  454. /**
  455. * Reference to a field of type 'DateTime'
  456. */
  457. export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
  458. /**
  459. * Reference to a field of type 'Int'
  460. */
  461. export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
  462. /**
  463. * Batch Payload for updateMany & deleteMany & createMany
  464. */
  465. export type BatchPayload = {
  466. count: number
  467. }
  468. export type Datasource = {
  469. url?: string
  470. }
  471. export type Datasources = {
  472. db?: Datasource
  473. }
  474. export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs>
  475. export type DefaultPrismaClient = PrismaClient
  476. export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
  477. export interface PrismaClientOptions {
  478. /**
  479. * Overwrites the datasource url from your schema.prisma file
  480. */
  481. datasources?: Datasources
  482. /**
  483. * Overwrites the datasource url from your schema.prisma file
  484. */
  485. datasourceUrl?: string
  486. /**
  487. * @default "colorless"
  488. */
  489. errorFormat?: ErrorFormat
  490. /**
  491. * @example
  492. * ```
  493. * // Shorthand for `emit: 'stdout'`
  494. * log: ['query', 'info', 'warn', 'error']
  495. *
  496. * // Emit as events only
  497. * log: [
  498. * { emit: 'event', level: 'query' },
  499. * { emit: 'event', level: 'info' },
  500. * { emit: 'event', level: 'warn' }
  501. * { emit: 'event', level: 'error' }
  502. * ]
  503. *
  504. * / Emit as events and log to stdout
  505. * og: [
  506. * { emit: 'stdout', level: 'query' },
  507. * { emit: 'stdout', level: 'info' },
  508. * { emit: 'stdout', level: 'warn' }
  509. * { emit: 'stdout', level: 'error' }
  510. *
  511. * ```
  512. * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
  513. */
  514. log?: (LogLevel | LogDefinition)[]
  515. /**
  516. * The default values for transactionOptions
  517. * maxWait ?= 2000
  518. * timeout ?= 5000
  519. */
  520. transactionOptions?: {
  521. maxWait?: number
  522. timeout?: number
  523. isolationLevel?: TransactionIsolationLevel
  524. }
  525. /**
  526. * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`
  527. */
  528. adapter?: runtime.SqlDriverAdapterFactory | null
  529. /**
  530. * Global configuration for omitting model fields by default.
  531. *
  532. * @example
  533. * ```
  534. * const prisma = new PrismaClient({
  535. * omit: {
  536. * user: {
  537. * password: true
  538. * }
  539. * }
  540. * })
  541. * ```
  542. */
  543. omit?: GlobalOmitConfig
  544. }
  545. export type GlobalOmitConfig = {
  546. shortLink?: Prisma.ShortLinkOmit
  547. }
  548. /* Types for Logging */
  549. export type LogLevel = 'info' | 'query' | 'warn' | 'error'
  550. export type LogDefinition = {
  551. level: LogLevel
  552. emit: 'stdout' | 'event'
  553. }
  554. export type CheckIsLogLevel<T> = T extends LogLevel ? T : never;
  555. export type GetLogType<T> = CheckIsLogLevel<
  556. T extends LogDefinition ? T['level'] : T
  557. >;
  558. export type GetEvents<T extends any[]> = T extends Array<LogLevel | LogDefinition>
  559. ? GetLogType<T[number]>
  560. : never;
  561. export type QueryEvent = {
  562. timestamp: Date
  563. query: string
  564. params: string
  565. duration: number
  566. target: string
  567. }
  568. export type LogEvent = {
  569. timestamp: Date
  570. message: string
  571. target: string
  572. }
  573. /* End Types for Logging */
  574. export type PrismaAction =
  575. | 'findUnique'
  576. | 'findUniqueOrThrow'
  577. | 'findMany'
  578. | 'findFirst'
  579. | 'findFirstOrThrow'
  580. | 'create'
  581. | 'createMany'
  582. | 'createManyAndReturn'
  583. | 'update'
  584. | 'updateMany'
  585. | 'updateManyAndReturn'
  586. | 'upsert'
  587. | 'delete'
  588. | 'deleteMany'
  589. | 'executeRaw'
  590. | 'queryRaw'
  591. | 'aggregate'
  592. | 'count'
  593. | 'runCommandRaw'
  594. | 'findRaw'
  595. | 'groupBy'
  596. /**
  597. * `PrismaClient` proxy available in interactive transactions.
  598. */
  599. export type TransactionClient = Omit<DefaultPrismaClient, runtime.ITXClientDenyList>