@cerbos/orm-prisma 3.3.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +83 -6
  2. package/lib/index.d.ts +29 -2
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +1459 -114
  5. package/lib/index.js.map +1 -1
  6. package/package.json +19 -13
  7. package/src/adversarial.test.ts +586 -0
  8. package/src/generated/prisma/commonInputTypes.ts +26 -0
  9. package/src/generated/prisma/internal/class.ts +9 -9
  10. package/src/generated/prisma/internal/prismaNamespace.ts +89 -19
  11. package/src/generated/prisma/internal/prismaNamespaceBrowser.ts +2 -1
  12. package/src/generated/prisma/models/Category.ts +1 -1
  13. package/src/generated/prisma/models/Label.ts +1 -1
  14. package/src/generated/prisma/models/NestedResource.ts +1 -1
  15. package/src/generated/prisma/models/NextLevelNestedResource.ts +1 -1
  16. package/src/generated/prisma/models/Resource.ts +62 -2
  17. package/src/generated/prisma/models/SubCategory.ts +1 -1
  18. package/src/generated/prisma/models/Tag.ts +1 -1
  19. package/src/generated/prisma/models/User.ts +1 -1
  20. package/src/generated/prisma-adversarial/browser.ts +44 -0
  21. package/src/generated/prisma-adversarial/client.ts +66 -0
  22. package/src/generated/prisma-adversarial/commonInputTypes.ts +352 -0
  23. package/src/generated/prisma-adversarial/enums.ts +15 -0
  24. package/src/generated/prisma-adversarial/internal/class.ts +244 -0
  25. package/src/generated/prisma-adversarial/internal/prismaNamespace.ts +1156 -0
  26. package/src/generated/prisma-adversarial/internal/prismaNamespaceBrowser.ts +140 -0
  27. package/src/generated/prisma-adversarial/models/AdversarialCategory.ts +1401 -0
  28. package/src/generated/prisma-adversarial/models/AdversarialLabel.ts +1272 -0
  29. package/src/generated/prisma-adversarial/models/AdversarialResource.ts +1665 -0
  30. package/src/generated/prisma-adversarial/models/AdversarialSubCategory.ts +1401 -0
  31. package/src/generated/prisma-adversarial/models/AdversarialTag.ts +1307 -0
  32. package/src/generated/prisma-adversarial/models.ts +16 -0
  33. package/src/generated/prisma-adversarial-v6/client.d.ts +1 -0
  34. package/src/generated/prisma-adversarial-v6/default.d.ts +1 -0
  35. package/src/generated/prisma-adversarial-v6/edge.d.ts +1 -0
  36. package/src/generated/prisma-adversarial-v6/index.d.ts +8640 -0
  37. package/src/generated/prisma-adversarial-v6/runtime/index-browser.d.ts +370 -0
  38. package/src/generated/prisma-adversarial-v6/runtime/library.d.ts +3982 -0
  39. package/src/generated/prisma-adversarial-v6/wasm.d.ts +1 -0
  40. package/src/generated/prisma-v6/index.d.ts +90 -3
  41. package/src/index.test.ts +3199 -636
  42. package/src/index.ts +2055 -148
  43. package/src/test-setup.adversarial.v6.ts +5 -0
  44. package/src/test-setup.adversarial.v7.ts +12 -0
@@ -0,0 +1,1156 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * WARNING: This is an internal file that is subject to change!
8
+ *
9
+ * 🛑 Under no circumstances should you import this file directly! 🛑
10
+ *
11
+ * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file.
12
+ * While this enables partial backward compatibility, it is not part of the stable public API.
13
+ *
14
+ * If you are looking for your Models, Enums, and Input Types, please import them from the respective
15
+ * model files in the `model` directory!
16
+ */
17
+
18
+ import * as runtime from "@prisma/client/runtime/client"
19
+ import type * as Prisma from "../models.js"
20
+ import { type PrismaClient } from "./class.js"
21
+
22
+ export type * from '../models.js'
23
+
24
+ export type DMMF = typeof runtime.DMMF
25
+
26
+ export type PrismaPromise<T> = runtime.Types.Public.PrismaPromise<T>
27
+
28
+ /**
29
+ * Prisma Errors
30
+ */
31
+
32
+ export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
33
+ export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError
34
+
35
+ export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
36
+ export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError
37
+
38
+ export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
39
+ export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
40
+
41
+ export const PrismaClientInitializationError = runtime.PrismaClientInitializationError
42
+ export type PrismaClientInitializationError = runtime.PrismaClientInitializationError
43
+
44
+ export const PrismaClientValidationError = runtime.PrismaClientValidationError
45
+ export type PrismaClientValidationError = runtime.PrismaClientValidationError
46
+
47
+ /**
48
+ * Re-export of sql-template-tag
49
+ */
50
+ export const sql = runtime.sqltag
51
+ export const empty = runtime.empty
52
+ export const join = runtime.join
53
+ export const raw = runtime.raw
54
+ export const Sql = runtime.Sql
55
+ export type Sql = runtime.Sql
56
+
57
+
58
+
59
+ /**
60
+ * Decimal.js
61
+ */
62
+ export const Decimal = runtime.Decimal
63
+ export type Decimal = runtime.Decimal
64
+
65
+ export type DecimalJsLike = runtime.DecimalJsLike
66
+
67
+ /**
68
+ * Extensions
69
+ */
70
+ export type Extension = runtime.Types.Extensions.UserArgs
71
+ export const getExtensionContext = runtime.Extensions.getExtensionContext
72
+ export type Args<T, F extends runtime.Operation> = runtime.Types.Public.Args<T, F>
73
+ export type Payload<T, F extends runtime.Operation = never> = runtime.Types.Public.Payload<T, F>
74
+ export type Result<T, A, F extends runtime.Operation> = runtime.Types.Public.Result<T, A, F>
75
+ export type Exact<A, W> = runtime.Types.Public.Exact<A, W>
76
+
77
+ export type PrismaVersion = {
78
+ client: string
79
+ engine: string
80
+ }
81
+
82
+ /**
83
+ * Prisma Client JS version: 7.9.1
84
+ * Query Engine version: e922089b7d7502aff4249d5da3420f6fa55fc6ad
85
+ */
86
+ export const prismaVersion: PrismaVersion = {
87
+ client: "7.9.1",
88
+ engine: "e922089b7d7502aff4249d5da3420f6fa55fc6ad"
89
+ }
90
+
91
+ /**
92
+ * Utility Types
93
+ */
94
+
95
+ export type Bytes = runtime.Bytes
96
+ export type JsonObject = runtime.JsonObject
97
+ export type JsonArray = runtime.JsonArray
98
+ export type JsonValue = runtime.JsonValue
99
+ export type InputJsonObject = runtime.InputJsonObject
100
+ export type InputJsonArray = runtime.InputJsonArray
101
+ export type InputJsonValue = runtime.InputJsonValue
102
+
103
+
104
+ export const NullTypes = {
105
+ DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull),
106
+ JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull),
107
+ AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull),
108
+ }
109
+ /**
110
+ * Helper for filtering JSON entries that have `null` on the database (empty on the db)
111
+ *
112
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
113
+ */
114
+ export const DbNull = runtime.DbNull
115
+
116
+ /**
117
+ * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
118
+ *
119
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
120
+ */
121
+ export const JsonNull = runtime.JsonNull
122
+
123
+ /**
124
+ * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
125
+ *
126
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
127
+ */
128
+ export const AnyNull = runtime.AnyNull
129
+
130
+
131
+ type SelectAndInclude = {
132
+ select: any
133
+ include: any
134
+ }
135
+
136
+ type SelectAndOmit = {
137
+ select: any
138
+ omit: any
139
+ }
140
+
141
+ /**
142
+ * From T, pick a set of properties whose keys are in the union K
143
+ */
144
+ type Prisma__Pick<T, K extends keyof T> = {
145
+ [P in K]: T[P];
146
+ };
147
+
148
+ export type Enumerable<T> = T | Array<T>;
149
+
150
+ /**
151
+ * Subset
152
+ * @desc From `T` pick properties that exist in `U`. Simple version of Intersection
153
+ */
154
+ export type Subset<T, U> = {
155
+ [key in keyof T]: key extends keyof U ? T[key] : never;
156
+ };
157
+
158
+ /**
159
+ * Resolved type of the argument passed to the `PrismaClient` constructor.
160
+ *
161
+ * When called without a narrower options type (the common case), this resolves
162
+ * to `PrismaClientOptions` directly, which produces a clear TypeScript error
163
+ * message (`not assignable to parameter of type 'PrismaClientOptions'`) when
164
+ * the argument is missing or incomplete. When the user supplies a narrower
165
+ * options type (e.g. via a literal), it falls back to `Subset` to keep
166
+ * filtering out unknown properties.
167
+ */
168
+ export type PrismaClientConstructorArgs<Options extends PrismaClientOptions> =
169
+ [PrismaClientOptions] extends [Options] ? PrismaClientOptions : Subset<Options, PrismaClientOptions>;
170
+
171
+ /**
172
+ * SelectSubset
173
+ * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
174
+ * Additionally, it validates, if both select and include are present. If the case, it errors.
175
+ */
176
+ export type SelectSubset<T, U> = {
177
+ [key in keyof T]: key extends keyof U ? T[key] : never
178
+ } &
179
+ (T extends SelectAndInclude
180
+ ? 'Please either choose `select` or `include`.'
181
+ : T extends SelectAndOmit
182
+ ? 'Please either choose `select` or `omit`.'
183
+ : {})
184
+
185
+ /**
186
+ * Subset + Intersection
187
+ * @desc From `T` pick properties that exist in `U` and intersect `K`
188
+ */
189
+ export type SubsetIntersection<T, U, K> = {
190
+ [key in keyof T]: key extends keyof U ? T[key] : never
191
+ } &
192
+ K
193
+
194
+ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
195
+
196
+ /**
197
+ * XOR is needed to have a real mutually exclusive union type
198
+ * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
199
+ */
200
+ export type XOR<T, U> =
201
+ T extends object ?
202
+ U extends object ?
203
+ ((Without<T, U> & U) | (Without<U, T> & T)) & object
204
+ : U : T
205
+
206
+
207
+ /**
208
+ * Is T a Record?
209
+ */
210
+ type IsObject<T extends any> = T extends Array<any>
211
+ ? False
212
+ : T extends Date
213
+ ? False
214
+ : T extends Uint8Array
215
+ ? False
216
+ : T extends BigInt
217
+ ? False
218
+ : T extends object
219
+ ? True
220
+ : False
221
+
222
+
223
+ /**
224
+ * If it's T[], return T
225
+ */
226
+ export type UnEnumerate<T extends unknown> = T extends Array<infer U> ? U : T
227
+
228
+ /**
229
+ * From ts-toolbelt
230
+ */
231
+
232
+ type __Either<O extends object, K extends Key> = Omit<O, K> &
233
+ {
234
+ // Merge all but K
235
+ [P in K]: Prisma__Pick<O, P & keyof O> // With K possibilities
236
+ }[K]
237
+
238
+ type EitherStrict<O extends object, K extends Key> = Strict<__Either<O, K>>
239
+
240
+ type EitherLoose<O extends object, K extends Key> = ComputeRaw<__Either<O, K>>
241
+
242
+ type _Either<
243
+ O extends object,
244
+ K extends Key,
245
+ strict extends Boolean
246
+ > = {
247
+ 1: EitherStrict<O, K>
248
+ 0: EitherLoose<O, K>
249
+ }[strict]
250
+
251
+ export type Either<
252
+ O extends object,
253
+ K extends Key,
254
+ strict extends Boolean = 1
255
+ > = O extends unknown ? _Either<O, K, strict> : never
256
+
257
+ export type Union = any
258
+
259
+ export type PatchUndefined<O extends object, O1 extends object> = {
260
+ [K in keyof O]: O[K] extends undefined ? At<O1, K> : O[K]
261
+ } & {}
262
+
263
+ /** Helper Types for "Merge" **/
264
+ export type IntersectOf<U extends Union> = (
265
+ U extends unknown ? (k: U) => void : never
266
+ ) extends (k: infer I) => void
267
+ ? I
268
+ : never
269
+
270
+ export type Overwrite<O extends object, O1 extends object> = {
271
+ [K in keyof O]: K extends keyof O1 ? O1[K] : O[K];
272
+ } & {};
273
+
274
+ type _Merge<U extends object> = IntersectOf<Overwrite<U, {
275
+ [K in keyof U]-?: At<U, K>;
276
+ }>>;
277
+
278
+ type Key = string | number | symbol;
279
+ type AtStrict<O extends object, K extends Key> = O[K & keyof O];
280
+ type AtLoose<O extends object, K extends Key> = O extends unknown ? AtStrict<O, K> : never;
281
+ export type At<O extends object, K extends Key, strict extends Boolean = 1> = {
282
+ 1: AtStrict<O, K>;
283
+ 0: AtLoose<O, K>;
284
+ }[strict];
285
+
286
+ export type ComputeRaw<A extends any> = A extends Function ? A : {
287
+ [K in keyof A]: A[K];
288
+ } & {};
289
+
290
+ export type OptionalFlat<O> = {
291
+ [K in keyof O]?: O[K];
292
+ } & {};
293
+
294
+ type _Record<K extends keyof any, T> = {
295
+ [P in K]: T;
296
+ };
297
+
298
+ // cause typescript not to expand types and preserve names
299
+ type NoExpand<T> = T extends unknown ? T : never;
300
+
301
+ // this type assumes the passed object is entirely optional
302
+ export type AtLeast<O extends object, K extends string> = NoExpand<
303
+ O extends unknown
304
+ ? | (K extends keyof O ? { [P in K]: O[P] } & O : O)
305
+ | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O
306
+ : never>;
307
+
308
+ type _Strict<U, _U = U> = U extends unknown ? U & OptionalFlat<_Record<Exclude<Keys<_U>, keyof U>, never>> : never;
309
+
310
+ export type Strict<U extends object> = ComputeRaw<_Strict<U>>;
311
+ /** End Helper Types for "Merge" **/
312
+
313
+ export type Merge<U extends object> = ComputeRaw<_Merge<Strict<U>>>;
314
+
315
+ export type Boolean = True | False
316
+
317
+ export type True = 1
318
+
319
+ export type False = 0
320
+
321
+ export type Not<B extends Boolean> = {
322
+ 0: 1
323
+ 1: 0
324
+ }[B]
325
+
326
+ export type Extends<A1 extends any, A2 extends any> = [A1] extends [never]
327
+ ? 0 // anything `never` is false
328
+ : A1 extends A2
329
+ ? 1
330
+ : 0
331
+
332
+ export type Has<U extends Union, U1 extends Union> = Not<
333
+ Extends<Exclude<U1, U>, U1>
334
+ >
335
+
336
+ export type Or<B1 extends Boolean, B2 extends Boolean> = {
337
+ 0: {
338
+ 0: 0
339
+ 1: 1
340
+ }
341
+ 1: {
342
+ 0: 1
343
+ 1: 1
344
+ }
345
+ }[B1][B2]
346
+
347
+ export type Keys<U extends Union> = U extends unknown ? keyof U : never
348
+
349
+ export type GetScalarType<T, O> = O extends object ? {
350
+ [P in keyof T]: P extends keyof O
351
+ ? O[P]
352
+ : never
353
+ } : never
354
+
355
+ type FieldPaths<
356
+ T,
357
+ U = Omit<T, '_avg' | '_sum' | '_count' | '_min' | '_max'>
358
+ > = IsObject<T> extends True ? U : T
359
+
360
+ export type GetHavingFields<T> = {
361
+ [K in keyof T]: Or<
362
+ Or<Extends<'OR', K>, Extends<'AND', K>>,
363
+ Extends<'NOT', K>
364
+ > extends True
365
+ ? // infer is only needed to not hit TS limit
366
+ // based on the brilliant idea of Pierre-Antoine Mills
367
+ // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437
368
+ T[K] extends infer TK
369
+ ? GetHavingFields<UnEnumerate<TK> extends object ? Merge<UnEnumerate<TK>> : never>
370
+ : never
371
+ : {} extends FieldPaths<T[K]>
372
+ ? never
373
+ : K
374
+ }[keyof T]
375
+
376
+ /**
377
+ * Convert tuple to union
378
+ */
379
+ type _TupleToUnion<T> = T extends (infer E)[] ? E : never
380
+ type TupleToUnion<K extends readonly any[]> = _TupleToUnion<K>
381
+ export type MaybeTupleToUnion<T> = T extends any[] ? TupleToUnion<T> : T
382
+
383
+ /**
384
+ * Like `Pick`, but additionally can also accept an array of keys
385
+ */
386
+ export type PickEnumerable<T, K extends Enumerable<keyof T> | keyof T> = Prisma__Pick<T, MaybeTupleToUnion<K>>
387
+
388
+ /**
389
+ * Exclude all keys with underscores
390
+ */
391
+ export type ExcludeUnderscoreKeys<T extends string> = T extends `_${string}` ? never : T
392
+
393
+
394
+ export type FieldRef<Model, FieldType> = runtime.FieldRef<Model, FieldType>
395
+
396
+ type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRef<Model, FieldType>
397
+
398
+
399
+ export const ModelName = {
400
+ AdversarialResource: 'AdversarialResource',
401
+ AdversarialTag: 'AdversarialTag',
402
+ AdversarialCategory: 'AdversarialCategory',
403
+ AdversarialSubCategory: 'AdversarialSubCategory',
404
+ AdversarialLabel: 'AdversarialLabel'
405
+ } as const
406
+
407
+ export type ModelName = (typeof ModelName)[keyof typeof ModelName]
408
+
409
+
410
+
411
+ export interface TypeMapCb<GlobalOmitOptions = {}> extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record<string, any>> {
412
+ returns: TypeMap<this['params']['extArgs'], GlobalOmitOptions>
413
+ }
414
+
415
+ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> = {
416
+ globalOmitOptions: {
417
+ omit: GlobalOmitOptions
418
+ }
419
+ meta: {
420
+ modelProps: "adversarialResource" | "adversarialTag" | "adversarialCategory" | "adversarialSubCategory" | "adversarialLabel"
421
+ txIsolationLevel: TransactionIsolationLevel
422
+ }
423
+ model: {
424
+ AdversarialResource: {
425
+ payload: Prisma.$AdversarialResourcePayload<ExtArgs>
426
+ fields: Prisma.AdversarialResourceFieldRefs
427
+ operations: {
428
+ findUnique: {
429
+ args: Prisma.AdversarialResourceFindUniqueArgs<ExtArgs>
430
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload> | null
431
+ }
432
+ findUniqueOrThrow: {
433
+ args: Prisma.AdversarialResourceFindUniqueOrThrowArgs<ExtArgs>
434
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>
435
+ }
436
+ findFirst: {
437
+ args: Prisma.AdversarialResourceFindFirstArgs<ExtArgs>
438
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload> | null
439
+ }
440
+ findFirstOrThrow: {
441
+ args: Prisma.AdversarialResourceFindFirstOrThrowArgs<ExtArgs>
442
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>
443
+ }
444
+ findMany: {
445
+ args: Prisma.AdversarialResourceFindManyArgs<ExtArgs>
446
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>[]
447
+ }
448
+ create: {
449
+ args: Prisma.AdversarialResourceCreateArgs<ExtArgs>
450
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>
451
+ }
452
+ createMany: {
453
+ args: Prisma.AdversarialResourceCreateManyArgs<ExtArgs>
454
+ result: BatchPayload
455
+ }
456
+ createManyAndReturn: {
457
+ args: Prisma.AdversarialResourceCreateManyAndReturnArgs<ExtArgs>
458
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>[]
459
+ }
460
+ delete: {
461
+ args: Prisma.AdversarialResourceDeleteArgs<ExtArgs>
462
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>
463
+ }
464
+ update: {
465
+ args: Prisma.AdversarialResourceUpdateArgs<ExtArgs>
466
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>
467
+ }
468
+ deleteMany: {
469
+ args: Prisma.AdversarialResourceDeleteManyArgs<ExtArgs>
470
+ result: BatchPayload
471
+ }
472
+ updateMany: {
473
+ args: Prisma.AdversarialResourceUpdateManyArgs<ExtArgs>
474
+ result: BatchPayload
475
+ }
476
+ updateManyAndReturn: {
477
+ args: Prisma.AdversarialResourceUpdateManyAndReturnArgs<ExtArgs>
478
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>[]
479
+ }
480
+ upsert: {
481
+ args: Prisma.AdversarialResourceUpsertArgs<ExtArgs>
482
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialResourcePayload>
483
+ }
484
+ aggregate: {
485
+ args: Prisma.AdversarialResourceAggregateArgs<ExtArgs>
486
+ result: runtime.Types.Utils.Optional<Prisma.AggregateAdversarialResource>
487
+ }
488
+ groupBy: {
489
+ args: Prisma.AdversarialResourceGroupByArgs<ExtArgs>
490
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialResourceGroupByOutputType>[]
491
+ }
492
+ count: {
493
+ args: Prisma.AdversarialResourceCountArgs<ExtArgs>
494
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialResourceCountAggregateOutputType> | number
495
+ }
496
+ }
497
+ }
498
+ AdversarialTag: {
499
+ payload: Prisma.$AdversarialTagPayload<ExtArgs>
500
+ fields: Prisma.AdversarialTagFieldRefs
501
+ operations: {
502
+ findUnique: {
503
+ args: Prisma.AdversarialTagFindUniqueArgs<ExtArgs>
504
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload> | null
505
+ }
506
+ findUniqueOrThrow: {
507
+ args: Prisma.AdversarialTagFindUniqueOrThrowArgs<ExtArgs>
508
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>
509
+ }
510
+ findFirst: {
511
+ args: Prisma.AdversarialTagFindFirstArgs<ExtArgs>
512
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload> | null
513
+ }
514
+ findFirstOrThrow: {
515
+ args: Prisma.AdversarialTagFindFirstOrThrowArgs<ExtArgs>
516
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>
517
+ }
518
+ findMany: {
519
+ args: Prisma.AdversarialTagFindManyArgs<ExtArgs>
520
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>[]
521
+ }
522
+ create: {
523
+ args: Prisma.AdversarialTagCreateArgs<ExtArgs>
524
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>
525
+ }
526
+ createMany: {
527
+ args: Prisma.AdversarialTagCreateManyArgs<ExtArgs>
528
+ result: BatchPayload
529
+ }
530
+ createManyAndReturn: {
531
+ args: Prisma.AdversarialTagCreateManyAndReturnArgs<ExtArgs>
532
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>[]
533
+ }
534
+ delete: {
535
+ args: Prisma.AdversarialTagDeleteArgs<ExtArgs>
536
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>
537
+ }
538
+ update: {
539
+ args: Prisma.AdversarialTagUpdateArgs<ExtArgs>
540
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>
541
+ }
542
+ deleteMany: {
543
+ args: Prisma.AdversarialTagDeleteManyArgs<ExtArgs>
544
+ result: BatchPayload
545
+ }
546
+ updateMany: {
547
+ args: Prisma.AdversarialTagUpdateManyArgs<ExtArgs>
548
+ result: BatchPayload
549
+ }
550
+ updateManyAndReturn: {
551
+ args: Prisma.AdversarialTagUpdateManyAndReturnArgs<ExtArgs>
552
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>[]
553
+ }
554
+ upsert: {
555
+ args: Prisma.AdversarialTagUpsertArgs<ExtArgs>
556
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialTagPayload>
557
+ }
558
+ aggregate: {
559
+ args: Prisma.AdversarialTagAggregateArgs<ExtArgs>
560
+ result: runtime.Types.Utils.Optional<Prisma.AggregateAdversarialTag>
561
+ }
562
+ groupBy: {
563
+ args: Prisma.AdversarialTagGroupByArgs<ExtArgs>
564
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialTagGroupByOutputType>[]
565
+ }
566
+ count: {
567
+ args: Prisma.AdversarialTagCountArgs<ExtArgs>
568
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialTagCountAggregateOutputType> | number
569
+ }
570
+ }
571
+ }
572
+ AdversarialCategory: {
573
+ payload: Prisma.$AdversarialCategoryPayload<ExtArgs>
574
+ fields: Prisma.AdversarialCategoryFieldRefs
575
+ operations: {
576
+ findUnique: {
577
+ args: Prisma.AdversarialCategoryFindUniqueArgs<ExtArgs>
578
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload> | null
579
+ }
580
+ findUniqueOrThrow: {
581
+ args: Prisma.AdversarialCategoryFindUniqueOrThrowArgs<ExtArgs>
582
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>
583
+ }
584
+ findFirst: {
585
+ args: Prisma.AdversarialCategoryFindFirstArgs<ExtArgs>
586
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload> | null
587
+ }
588
+ findFirstOrThrow: {
589
+ args: Prisma.AdversarialCategoryFindFirstOrThrowArgs<ExtArgs>
590
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>
591
+ }
592
+ findMany: {
593
+ args: Prisma.AdversarialCategoryFindManyArgs<ExtArgs>
594
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>[]
595
+ }
596
+ create: {
597
+ args: Prisma.AdversarialCategoryCreateArgs<ExtArgs>
598
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>
599
+ }
600
+ createMany: {
601
+ args: Prisma.AdversarialCategoryCreateManyArgs<ExtArgs>
602
+ result: BatchPayload
603
+ }
604
+ createManyAndReturn: {
605
+ args: Prisma.AdversarialCategoryCreateManyAndReturnArgs<ExtArgs>
606
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>[]
607
+ }
608
+ delete: {
609
+ args: Prisma.AdversarialCategoryDeleteArgs<ExtArgs>
610
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>
611
+ }
612
+ update: {
613
+ args: Prisma.AdversarialCategoryUpdateArgs<ExtArgs>
614
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>
615
+ }
616
+ deleteMany: {
617
+ args: Prisma.AdversarialCategoryDeleteManyArgs<ExtArgs>
618
+ result: BatchPayload
619
+ }
620
+ updateMany: {
621
+ args: Prisma.AdversarialCategoryUpdateManyArgs<ExtArgs>
622
+ result: BatchPayload
623
+ }
624
+ updateManyAndReturn: {
625
+ args: Prisma.AdversarialCategoryUpdateManyAndReturnArgs<ExtArgs>
626
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>[]
627
+ }
628
+ upsert: {
629
+ args: Prisma.AdversarialCategoryUpsertArgs<ExtArgs>
630
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialCategoryPayload>
631
+ }
632
+ aggregate: {
633
+ args: Prisma.AdversarialCategoryAggregateArgs<ExtArgs>
634
+ result: runtime.Types.Utils.Optional<Prisma.AggregateAdversarialCategory>
635
+ }
636
+ groupBy: {
637
+ args: Prisma.AdversarialCategoryGroupByArgs<ExtArgs>
638
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialCategoryGroupByOutputType>[]
639
+ }
640
+ count: {
641
+ args: Prisma.AdversarialCategoryCountArgs<ExtArgs>
642
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialCategoryCountAggregateOutputType> | number
643
+ }
644
+ }
645
+ }
646
+ AdversarialSubCategory: {
647
+ payload: Prisma.$AdversarialSubCategoryPayload<ExtArgs>
648
+ fields: Prisma.AdversarialSubCategoryFieldRefs
649
+ operations: {
650
+ findUnique: {
651
+ args: Prisma.AdversarialSubCategoryFindUniqueArgs<ExtArgs>
652
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload> | null
653
+ }
654
+ findUniqueOrThrow: {
655
+ args: Prisma.AdversarialSubCategoryFindUniqueOrThrowArgs<ExtArgs>
656
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>
657
+ }
658
+ findFirst: {
659
+ args: Prisma.AdversarialSubCategoryFindFirstArgs<ExtArgs>
660
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload> | null
661
+ }
662
+ findFirstOrThrow: {
663
+ args: Prisma.AdversarialSubCategoryFindFirstOrThrowArgs<ExtArgs>
664
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>
665
+ }
666
+ findMany: {
667
+ args: Prisma.AdversarialSubCategoryFindManyArgs<ExtArgs>
668
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>[]
669
+ }
670
+ create: {
671
+ args: Prisma.AdversarialSubCategoryCreateArgs<ExtArgs>
672
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>
673
+ }
674
+ createMany: {
675
+ args: Prisma.AdversarialSubCategoryCreateManyArgs<ExtArgs>
676
+ result: BatchPayload
677
+ }
678
+ createManyAndReturn: {
679
+ args: Prisma.AdversarialSubCategoryCreateManyAndReturnArgs<ExtArgs>
680
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>[]
681
+ }
682
+ delete: {
683
+ args: Prisma.AdversarialSubCategoryDeleteArgs<ExtArgs>
684
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>
685
+ }
686
+ update: {
687
+ args: Prisma.AdversarialSubCategoryUpdateArgs<ExtArgs>
688
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>
689
+ }
690
+ deleteMany: {
691
+ args: Prisma.AdversarialSubCategoryDeleteManyArgs<ExtArgs>
692
+ result: BatchPayload
693
+ }
694
+ updateMany: {
695
+ args: Prisma.AdversarialSubCategoryUpdateManyArgs<ExtArgs>
696
+ result: BatchPayload
697
+ }
698
+ updateManyAndReturn: {
699
+ args: Prisma.AdversarialSubCategoryUpdateManyAndReturnArgs<ExtArgs>
700
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>[]
701
+ }
702
+ upsert: {
703
+ args: Prisma.AdversarialSubCategoryUpsertArgs<ExtArgs>
704
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialSubCategoryPayload>
705
+ }
706
+ aggregate: {
707
+ args: Prisma.AdversarialSubCategoryAggregateArgs<ExtArgs>
708
+ result: runtime.Types.Utils.Optional<Prisma.AggregateAdversarialSubCategory>
709
+ }
710
+ groupBy: {
711
+ args: Prisma.AdversarialSubCategoryGroupByArgs<ExtArgs>
712
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialSubCategoryGroupByOutputType>[]
713
+ }
714
+ count: {
715
+ args: Prisma.AdversarialSubCategoryCountArgs<ExtArgs>
716
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialSubCategoryCountAggregateOutputType> | number
717
+ }
718
+ }
719
+ }
720
+ AdversarialLabel: {
721
+ payload: Prisma.$AdversarialLabelPayload<ExtArgs>
722
+ fields: Prisma.AdversarialLabelFieldRefs
723
+ operations: {
724
+ findUnique: {
725
+ args: Prisma.AdversarialLabelFindUniqueArgs<ExtArgs>
726
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload> | null
727
+ }
728
+ findUniqueOrThrow: {
729
+ args: Prisma.AdversarialLabelFindUniqueOrThrowArgs<ExtArgs>
730
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>
731
+ }
732
+ findFirst: {
733
+ args: Prisma.AdversarialLabelFindFirstArgs<ExtArgs>
734
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload> | null
735
+ }
736
+ findFirstOrThrow: {
737
+ args: Prisma.AdversarialLabelFindFirstOrThrowArgs<ExtArgs>
738
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>
739
+ }
740
+ findMany: {
741
+ args: Prisma.AdversarialLabelFindManyArgs<ExtArgs>
742
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>[]
743
+ }
744
+ create: {
745
+ args: Prisma.AdversarialLabelCreateArgs<ExtArgs>
746
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>
747
+ }
748
+ createMany: {
749
+ args: Prisma.AdversarialLabelCreateManyArgs<ExtArgs>
750
+ result: BatchPayload
751
+ }
752
+ createManyAndReturn: {
753
+ args: Prisma.AdversarialLabelCreateManyAndReturnArgs<ExtArgs>
754
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>[]
755
+ }
756
+ delete: {
757
+ args: Prisma.AdversarialLabelDeleteArgs<ExtArgs>
758
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>
759
+ }
760
+ update: {
761
+ args: Prisma.AdversarialLabelUpdateArgs<ExtArgs>
762
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>
763
+ }
764
+ deleteMany: {
765
+ args: Prisma.AdversarialLabelDeleteManyArgs<ExtArgs>
766
+ result: BatchPayload
767
+ }
768
+ updateMany: {
769
+ args: Prisma.AdversarialLabelUpdateManyArgs<ExtArgs>
770
+ result: BatchPayload
771
+ }
772
+ updateManyAndReturn: {
773
+ args: Prisma.AdversarialLabelUpdateManyAndReturnArgs<ExtArgs>
774
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>[]
775
+ }
776
+ upsert: {
777
+ args: Prisma.AdversarialLabelUpsertArgs<ExtArgs>
778
+ result: runtime.Types.Utils.PayloadToResult<Prisma.$AdversarialLabelPayload>
779
+ }
780
+ aggregate: {
781
+ args: Prisma.AdversarialLabelAggregateArgs<ExtArgs>
782
+ result: runtime.Types.Utils.Optional<Prisma.AggregateAdversarialLabel>
783
+ }
784
+ groupBy: {
785
+ args: Prisma.AdversarialLabelGroupByArgs<ExtArgs>
786
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialLabelGroupByOutputType>[]
787
+ }
788
+ count: {
789
+ args: Prisma.AdversarialLabelCountArgs<ExtArgs>
790
+ result: runtime.Types.Utils.Optional<Prisma.AdversarialLabelCountAggregateOutputType> | number
791
+ }
792
+ }
793
+ }
794
+ }
795
+ } & {
796
+ other: {
797
+ payload: any
798
+ operations: {
799
+ $executeRaw: {
800
+ args: [query: TemplateStringsArray | Sql, ...values: any[]],
801
+ result: any
802
+ }
803
+ $executeRawUnsafe: {
804
+ args: [query: string, ...values: any[]],
805
+ result: any
806
+ }
807
+ $queryRaw: {
808
+ args: [query: TemplateStringsArray | Sql, ...values: any[]],
809
+ result: any
810
+ }
811
+ $queryRawUnsafe: {
812
+ args: [query: string, ...values: any[]],
813
+ result: any
814
+ }
815
+ }
816
+ }
817
+ }
818
+
819
+ /**
820
+ * Enums
821
+ */
822
+
823
+ export const TransactionIsolationLevel = runtime.makeStrictEnum({
824
+ Serializable: 'Serializable'
825
+ } as const)
826
+
827
+ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
828
+
829
+
830
+ export const AdversarialResourceScalarFieldEnum = {
831
+ id: 'id',
832
+ aBool: 'aBool',
833
+ aString: 'aString',
834
+ aNumber: 'aNumber',
835
+ aDouble: 'aDouble',
836
+ aOptionalString: 'aOptionalString',
837
+ createdBy: 'createdBy',
838
+ scope: 'scope',
839
+ createdAt: 'createdAt'
840
+ } as const
841
+
842
+ export type AdversarialResourceScalarFieldEnum = (typeof AdversarialResourceScalarFieldEnum)[keyof typeof AdversarialResourceScalarFieldEnum]
843
+
844
+
845
+ export const AdversarialTagScalarFieldEnum = {
846
+ id: 'id',
847
+ tagId: 'tagId',
848
+ name: 'name',
849
+ resourceId: 'resourceId'
850
+ } as const
851
+
852
+ export type AdversarialTagScalarFieldEnum = (typeof AdversarialTagScalarFieldEnum)[keyof typeof AdversarialTagScalarFieldEnum]
853
+
854
+
855
+ export const AdversarialCategoryScalarFieldEnum = {
856
+ id: 'id',
857
+ name: 'name',
858
+ resourceId: 'resourceId'
859
+ } as const
860
+
861
+ export type AdversarialCategoryScalarFieldEnum = (typeof AdversarialCategoryScalarFieldEnum)[keyof typeof AdversarialCategoryScalarFieldEnum]
862
+
863
+
864
+ export const AdversarialSubCategoryScalarFieldEnum = {
865
+ id: 'id',
866
+ name: 'name',
867
+ categoryId: 'categoryId'
868
+ } as const
869
+
870
+ export type AdversarialSubCategoryScalarFieldEnum = (typeof AdversarialSubCategoryScalarFieldEnum)[keyof typeof AdversarialSubCategoryScalarFieldEnum]
871
+
872
+
873
+ export const AdversarialLabelScalarFieldEnum = {
874
+ id: 'id',
875
+ name: 'name',
876
+ subCategoryId: 'subCategoryId'
877
+ } as const
878
+
879
+ export type AdversarialLabelScalarFieldEnum = (typeof AdversarialLabelScalarFieldEnum)[keyof typeof AdversarialLabelScalarFieldEnum]
880
+
881
+
882
+ export const SortOrder = {
883
+ asc: 'asc',
884
+ desc: 'desc'
885
+ } as const
886
+
887
+ export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
888
+
889
+
890
+ export const NullsOrder = {
891
+ first: 'first',
892
+ last: 'last'
893
+ } as const
894
+
895
+ export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
896
+
897
+
898
+
899
+ /**
900
+ * Field references
901
+ */
902
+
903
+
904
+ /**
905
+ * Reference to a field of type 'String'
906
+ */
907
+ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'>
908
+
909
+
910
+
911
+ /**
912
+ * Reference to a field of type 'Boolean'
913
+ */
914
+ export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'>
915
+
916
+
917
+
918
+ /**
919
+ * Reference to a field of type 'Int'
920
+ */
921
+ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'>
922
+
923
+
924
+
925
+ /**
926
+ * Reference to a field of type 'Float'
927
+ */
928
+ export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'>
929
+
930
+
931
+
932
+ /**
933
+ * Reference to a field of type 'DateTime'
934
+ */
935
+ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'>
936
+
937
+
938
+ /**
939
+ * Batch Payload for updateMany & deleteMany & createMany
940
+ */
941
+ export type BatchPayload = {
942
+ count: number
943
+ }
944
+
945
+ export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs>
946
+ export type DefaultPrismaClient = PrismaClient
947
+ export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
948
+ /**
949
+ * Options common to all variants of `PrismaClientOptions`, regardless of whether you connect to your database through a driver adapter or through Prisma Accelerate.
950
+ */
951
+ export interface PrismaClientBaseOptions {
952
+ /**
953
+ * @default "colorless"
954
+ */
955
+ errorFormat?: ErrorFormat
956
+ /**
957
+ * @example
958
+ * ```
959
+ * // Shorthand for `emit: 'stdout'`
960
+ * log: ['query', 'info', 'warn', 'error']
961
+ *
962
+ * // Emit as events only
963
+ * log: [
964
+ * { emit: 'event', level: 'query' },
965
+ * { emit: 'event', level: 'info' },
966
+ * { emit: 'event', level: 'warn' }
967
+ * { emit: 'event', level: 'error' }
968
+ * ]
969
+ *
970
+ * / Emit as events and log to stdout
971
+ * og: [
972
+ * { emit: 'stdout', level: 'query' },
973
+ * { emit: 'stdout', level: 'info' },
974
+ * { emit: 'stdout', level: 'warn' }
975
+ * { emit: 'stdout', level: 'error' }
976
+ *
977
+ * ```
978
+ * Read more in our [docs](https://pris.ly/d/logging).
979
+ */
980
+ log?: (LogLevel | LogDefinition)[]
981
+ /**
982
+ * The default values for transactionOptions
983
+ * maxWait ?= 2000
984
+ * timeout ?= 5000
985
+ */
986
+ transactionOptions?: {
987
+ maxWait?: number
988
+ timeout?: number
989
+ isolationLevel?: TransactionIsolationLevel
990
+ }
991
+ /**
992
+ * Global configuration for omitting model fields by default.
993
+ *
994
+ * @example
995
+ * ```
996
+ * const prisma = new PrismaClient({
997
+ * omit: {
998
+ * user: {
999
+ * password: true
1000
+ * }
1001
+ * }
1002
+ * })
1003
+ * ```
1004
+ */
1005
+ omit?: GlobalOmitConfig
1006
+ /**
1007
+ * SQL commenter plugins that add metadata to SQL queries as comments.
1008
+ * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/
1009
+ *
1010
+ * @example
1011
+ * ```
1012
+ * const prisma = new PrismaClient({
1013
+ * adapter,
1014
+ * comments: [
1015
+ * traceContext(),
1016
+ * queryInsights(),
1017
+ * ],
1018
+ * })
1019
+ * ```
1020
+ */
1021
+ comments?: runtime.SqlCommenterPlugin[]
1022
+ /**
1023
+ * Optional maximum size for the query plan cache. If not provided, a default size will be used.
1024
+ * A value of `0` can be used to disable the cache entirely. A higher cache size can improve
1025
+ * performance for applications that execute a large number of unique queries, while a smaller
1026
+ * cache size can reduce memory usage.
1027
+ *
1028
+ * @example
1029
+ * ```
1030
+ * const prisma = new PrismaClient({
1031
+ * adapter,
1032
+ * queryPlanCacheMaxSize: 100,
1033
+ * })
1034
+ * ```
1035
+ */
1036
+ queryPlanCacheMaxSize?: number
1037
+ }
1038
+
1039
+ /**
1040
+ * `PrismaClient` options for connecting to your database through Prisma Accelerate instead of a driver adapter.
1041
+ *
1042
+ * Learn more: https://pris.ly/d/accelerate
1043
+ */
1044
+ export interface PrismaClientOptionsWithAccelerateUrl extends PrismaClientBaseOptions {
1045
+ /**
1046
+ * The Prisma Accelerate connection URL. Use this option to connect to your database through Prisma Accelerate instead of using a driver adapter to connect directly.
1047
+ *
1048
+ * Learn more: https://pris.ly/d/accelerate
1049
+ */
1050
+ accelerateUrl: string
1051
+ adapter?: never
1052
+ }
1053
+
1054
+ /**
1055
+ * `PrismaClient` options for connecting to your database through a driver adapter. This is the common case in Prisma 7.
1056
+ *
1057
+ * Learn more: https://pris.ly/d/driver-adapters
1058
+ */
1059
+ export interface PrismaClientOptionsWithAdapter extends PrismaClientBaseOptions {
1060
+ /**
1061
+ * A driver adapter that PrismaClient uses to connect to your database, such as the ones provided by `@prisma/adapter-pg`, `@prisma/adapter-libsql`, `@prisma/adapter-planetscale`, etc.
1062
+ *
1063
+ * A driver adapter is **required** unless you connect to your database through Prisma Accelerate (in which case use `accelerateUrl` instead).
1064
+ *
1065
+ * Learn more: https://pris.ly/d/driver-adapters
1066
+ *
1067
+ * @example
1068
+ * ```ts
1069
+ * import { PrismaPg } from '@prisma/adapter-pg'
1070
+ * import { PrismaClient } from './generated/prisma/client'
1071
+ *
1072
+ * const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
1073
+ * const prisma = new PrismaClient({ adapter })
1074
+ * ```
1075
+ */
1076
+ adapter: runtime.SqlDriverAdapterFactory
1077
+ accelerateUrl?: never
1078
+ }
1079
+
1080
+ /**
1081
+ * Options passed to the `PrismaClient` constructor.
1082
+ *
1083
+ * A driver adapter (or, alternatively, a Prisma Accelerate URL) is **required**. See {@link PrismaClientOptionsWithAdapter} and {@link PrismaClientOptionsWithAccelerateUrl} for the two variants. All other properties live in {@link PrismaClientBaseOptions} and are optional.
1084
+ *
1085
+ * Learn more about driver adapters: https://pris.ly/d/driver-adapters
1086
+ */
1087
+ export type PrismaClientOptions = PrismaClientOptionsWithAccelerateUrl | PrismaClientOptionsWithAdapter
1088
+ export type GlobalOmitConfig = {
1089
+ adversarialResource?: Prisma.AdversarialResourceOmit
1090
+ adversarialTag?: Prisma.AdversarialTagOmit
1091
+ adversarialCategory?: Prisma.AdversarialCategoryOmit
1092
+ adversarialSubCategory?: Prisma.AdversarialSubCategoryOmit
1093
+ adversarialLabel?: Prisma.AdversarialLabelOmit
1094
+ }
1095
+
1096
+ /* Types for Logging */
1097
+ export type LogLevel = 'info' | 'query' | 'warn' | 'error'
1098
+ export type LogDefinition = {
1099
+ level: LogLevel
1100
+ emit: 'stdout' | 'event'
1101
+ }
1102
+
1103
+ export type CheckIsLogLevel<T> = T extends LogLevel ? T : never;
1104
+
1105
+ export type GetLogType<T> = CheckIsLogLevel<
1106
+ T extends LogDefinition ? T['level'] : T
1107
+ >;
1108
+
1109
+ export type GetEvents<T extends any[]> = T extends Array<LogLevel | LogDefinition>
1110
+ ? GetLogType<T[number]>
1111
+ : never;
1112
+
1113
+ export type QueryEvent = {
1114
+ timestamp: Date
1115
+ query: string
1116
+ params: string
1117
+ duration: number
1118
+ target: string
1119
+ }
1120
+
1121
+ export type LogEvent = {
1122
+ timestamp: Date
1123
+ message: string
1124
+ target: string
1125
+ }
1126
+ /* End Types for Logging */
1127
+
1128
+
1129
+ export type PrismaAction =
1130
+ | 'findUnique'
1131
+ | 'findUniqueOrThrow'
1132
+ | 'findMany'
1133
+ | 'findFirst'
1134
+ | 'findFirstOrThrow'
1135
+ | 'create'
1136
+ | 'createMany'
1137
+ | 'createManyAndReturn'
1138
+ | 'update'
1139
+ | 'updateMany'
1140
+ | 'updateManyAndReturn'
1141
+ | 'upsert'
1142
+ | 'delete'
1143
+ | 'deleteMany'
1144
+ | 'executeRaw'
1145
+ | 'queryRaw'
1146
+ | 'aggregate'
1147
+ | 'count'
1148
+ | 'runCommandRaw'
1149
+ | 'findRaw'
1150
+ | 'groupBy'
1151
+
1152
+ /**
1153
+ * `PrismaClient` proxy available in interactive transactions.
1154
+ */
1155
+ export type TransactionClient = Omit<DefaultPrismaClient, runtime.ITXClientDenyList>
1156
+