@creator.co/creatorco-prisma-client 1.0.1

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.
@@ -0,0 +1,3011 @@
1
+ /**
2
+ * @param this
3
+ */
4
+ declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client;
5
+
6
+ export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw';
7
+
8
+ export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum';
9
+
10
+ export declare type AllModelsToStringIndex<TypeMap extends TypeMapDef, Args extends Record<string, any>, K extends PropertyKey> = Args extends {
11
+ [P in K]: {
12
+ $allModels: infer AllModels;
13
+ };
14
+ } ? {
15
+ [P in K]: Record<TypeMap['meta']['modelProps'], AllModels>;
16
+ } : {};
17
+
18
+ declare class AnyNull extends NullTypesEnumValue {
19
+ }
20
+
21
+ export declare type Args<T, F extends Operation> = T extends {
22
+ [K: symbol]: {
23
+ types: {
24
+ operations: {
25
+ [K in F]: {
26
+ args: any;
27
+ };
28
+ };
29
+ };
30
+ };
31
+ } ? T[symbol]['types']['operations'][F]['args'] : any;
32
+
33
+ export declare type Args_3<T, F extends Operation> = Args<T, F>;
34
+
35
+ /**
36
+ * Attributes is a map from string to attribute values.
37
+ *
38
+ * Note: only the own enumerable keys are counted as valid attribute keys.
39
+ */
40
+ declare interface Attributes {
41
+ [attributeKey: string]: AttributeValue | undefined;
42
+ }
43
+
44
+ /**
45
+ * Attribute values may be any non-nullish primitive value except an object.
46
+ *
47
+ * null or undefined attribute values are invalid and will result in undefined behavior.
48
+ */
49
+ declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
50
+
51
+ export declare type BaseDMMF = Pick<DMMF.Document, 'datamodel'>;
52
+
53
+ declare type BatchArgs = {
54
+ queries: BatchQuery[];
55
+ transaction?: {
56
+ isolationLevel?: IsolationLevel;
57
+ };
58
+ };
59
+
60
+ declare type BatchInternalParams = {
61
+ requests: RequestParams[];
62
+ customDataProxyFetch?: CustomDataProxyFetch;
63
+ };
64
+
65
+ declare type BatchQuery = {
66
+ model: string | undefined;
67
+ operation: string;
68
+ args: JsArgs | RawQueryArgs;
69
+ };
70
+
71
+ declare type BatchQueryEngineResult<T> = QueryEngineResult<T> | Error;
72
+
73
+ declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise<any>;
74
+
75
+ declare type BatchQueryOptionsCbArgs = {
76
+ args: BatchArgs;
77
+ query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise<unknown[]>;
78
+ __internalParams: BatchInternalParams;
79
+ };
80
+
81
+ declare type BatchTransactionOptions = {
82
+ isolationLevel?: Transaction.IsolationLevel;
83
+ };
84
+
85
+ declare interface BinaryTargetsEnvValue {
86
+ fromEnvVar: string | null;
87
+ value: string;
88
+ native?: boolean;
89
+ }
90
+
91
+ export declare type Call<F extends Fn, P> = (F & {
92
+ params: P;
93
+ })['returns'];
94
+
95
+ declare interface CallSite {
96
+ getLocation(): LocationInFile | null;
97
+ }
98
+
99
+ export declare type Cast<A, W> = A extends W ? A : W;
100
+
101
+ declare type Client = ReturnType<typeof getPrismaClient> extends new () => infer T ? T : never;
102
+
103
+ export declare type ClientArg = {
104
+ [MethodName in string]: unknown;
105
+ };
106
+
107
+ export declare type ClientArgs = {
108
+ client: ClientArg;
109
+ };
110
+
111
+ export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin<never, never, never>;
112
+
113
+ declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum];
114
+
115
+ declare const ColumnTypeEnum: {
116
+ readonly Int32: 0;
117
+ readonly Int64: 1;
118
+ readonly Float: 2;
119
+ readonly Double: 3;
120
+ readonly Numeric: 4;
121
+ readonly Boolean: 5;
122
+ readonly Character: 6;
123
+ readonly Text: 7;
124
+ readonly Date: 8;
125
+ readonly Time: 9;
126
+ readonly DateTime: 10;
127
+ readonly Json: 11;
128
+ readonly Enum: 12;
129
+ readonly Bytes: 13;
130
+ readonly Set: 14;
131
+ readonly Uuid: 15;
132
+ readonly Int32Array: 64;
133
+ readonly Int64Array: 65;
134
+ readonly FloatArray: 66;
135
+ readonly DoubleArray: 67;
136
+ readonly NumericArray: 68;
137
+ readonly BooleanArray: 69;
138
+ readonly CharacterArray: 70;
139
+ readonly TextArray: 71;
140
+ readonly DateArray: 72;
141
+ readonly TimeArray: 73;
142
+ readonly DateTimeArray: 74;
143
+ readonly JsonArray: 75;
144
+ readonly EnumArray: 76;
145
+ readonly BytesArray: 77;
146
+ readonly UuidArray: 78;
147
+ readonly UnknownNumber: 128;
148
+ };
149
+
150
+ export declare type Compute<T> = T extends Function ? T : {
151
+ [K in keyof T]: T[K];
152
+ } & unknown;
153
+
154
+ export declare type ComputeDeep<T> = T extends Function ? T : {
155
+ [K in keyof T]: ComputeDeep<T[K]>;
156
+ } & unknown;
157
+
158
+ declare type ComputedField = {
159
+ name: string;
160
+ needs: string[];
161
+ compute: ResultArgsFieldCompute;
162
+ };
163
+
164
+ declare type ComputedFieldsMap = {
165
+ [fieldName: string]: ComputedField;
166
+ };
167
+
168
+ declare interface Context {
169
+ /**
170
+ * Get a value from the context.
171
+ *
172
+ * @param key key which identifies a context value
173
+ */
174
+ getValue(key: symbol): unknown;
175
+ /**
176
+ * Create a new context which inherits from this context and has
177
+ * the given key set to the given value.
178
+ *
179
+ * @param key context key for which to set the value
180
+ * @param value value to set for the given key
181
+ */
182
+ setValue(key: symbol, value: unknown): Context;
183
+ /**
184
+ * Return a new context which inherits from this context but does
185
+ * not contain a value for the given key.
186
+ *
187
+ * @param key context key for which to clear a value
188
+ */
189
+ deleteValue(key: symbol): Context;
190
+ }
191
+
192
+ declare type Context_2<T> = T extends {
193
+ [K: symbol]: {
194
+ ctx: infer C;
195
+ };
196
+ } ? C & T & {
197
+ /**
198
+ * @deprecated Use `$name` instead.
199
+ */
200
+ name?: string;
201
+ $name?: string;
202
+ $parent?: unknown;
203
+ } : T & {
204
+ /**
205
+ * @deprecated Use `$name` instead.
206
+ */
207
+ name?: string;
208
+ $name?: string;
209
+ $parent?: unknown;
210
+ };
211
+
212
+ export declare type Count<O> = {
213
+ [K in keyof O]: Count<number>;
214
+ } & {};
215
+
216
+ declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch;
217
+
218
+ declare class DataLoader<T = unknown> {
219
+ private options;
220
+ batches: {
221
+ [key: string]: Job[];
222
+ };
223
+ private tickActive;
224
+ constructor(options: DataLoaderOptions<T>);
225
+ request(request: T): Promise<any>;
226
+ private dispatchBatches;
227
+ get [Symbol.toStringTag](): string;
228
+ }
229
+
230
+ declare type DataLoaderOptions<T> = {
231
+ singleLoader: (request: T) => Promise<any>;
232
+ batchLoader: (request: T[]) => Promise<any[]>;
233
+ batchBy: (request: T) => string | undefined;
234
+ batchOrder: (requestA: T, requestB: T) => number;
235
+ };
236
+
237
+ declare type Datasource = {
238
+ url?: string;
239
+ };
240
+
241
+ declare type Datasources = {
242
+ [name in string]: Datasource;
243
+ };
244
+
245
+ declare class DbNull extends NullTypesEnumValue {
246
+ }
247
+
248
+ export declare interface Debug {
249
+ (namespace: string): Debugger;
250
+ disable: () => string;
251
+ enable: (namespace: string) => void;
252
+ enabled: (namespace: string) => boolean;
253
+ log: (...args: any[]) => any;
254
+ formatters: Record<string, ((value: any) => string) | undefined>;
255
+ }
256
+
257
+ declare interface Debugger {
258
+ (format: any, ...args: any[]): void;
259
+ log: (...args: any[]) => any;
260
+ extend: (namespace: string, delimiter?: string) => Debugger;
261
+ color: string | number;
262
+ enabled: boolean;
263
+ namespace: string;
264
+ }
265
+
266
+ export declare namespace Decimal {
267
+ export type Constructor = typeof Decimal;
268
+ export type Instance = Decimal;
269
+ export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
270
+ export type Modulo = Rounding | 9;
271
+ export type Value = string | number | Decimal;
272
+
273
+ // http://mikemcl.github.io/decimal.js/#constructor-properties
274
+ export interface Config {
275
+ precision?: number;
276
+ rounding?: Rounding;
277
+ toExpNeg?: number;
278
+ toExpPos?: number;
279
+ minE?: number;
280
+ maxE?: number;
281
+ crypto?: boolean;
282
+ modulo?: Modulo;
283
+ defaults?: boolean;
284
+ }
285
+ }
286
+
287
+ export declare class Decimal {
288
+ readonly d: number[];
289
+ readonly e: number;
290
+ readonly s: number;
291
+
292
+ constructor(n: Decimal.Value);
293
+
294
+ absoluteValue(): Decimal;
295
+ abs(): Decimal;
296
+
297
+ ceil(): Decimal;
298
+
299
+ clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
300
+ clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
301
+
302
+ comparedTo(n: Decimal.Value): number;
303
+ cmp(n: Decimal.Value): number;
304
+
305
+ cosine(): Decimal;
306
+ cos(): Decimal;
307
+
308
+ cubeRoot(): Decimal;
309
+ cbrt(): Decimal;
310
+
311
+ decimalPlaces(): number;
312
+ dp(): number;
313
+
314
+ dividedBy(n: Decimal.Value): Decimal;
315
+ div(n: Decimal.Value): Decimal;
316
+
317
+ dividedToIntegerBy(n: Decimal.Value): Decimal;
318
+ divToInt(n: Decimal.Value): Decimal;
319
+
320
+ equals(n: Decimal.Value): boolean;
321
+ eq(n: Decimal.Value): boolean;
322
+
323
+ floor(): Decimal;
324
+
325
+ greaterThan(n: Decimal.Value): boolean;
326
+ gt(n: Decimal.Value): boolean;
327
+
328
+ greaterThanOrEqualTo(n: Decimal.Value): boolean;
329
+ gte(n: Decimal.Value): boolean;
330
+
331
+ hyperbolicCosine(): Decimal;
332
+ cosh(): Decimal;
333
+
334
+ hyperbolicSine(): Decimal;
335
+ sinh(): Decimal;
336
+
337
+ hyperbolicTangent(): Decimal;
338
+ tanh(): Decimal;
339
+
340
+ inverseCosine(): Decimal;
341
+ acos(): Decimal;
342
+
343
+ inverseHyperbolicCosine(): Decimal;
344
+ acosh(): Decimal;
345
+
346
+ inverseHyperbolicSine(): Decimal;
347
+ asinh(): Decimal;
348
+
349
+ inverseHyperbolicTangent(): Decimal;
350
+ atanh(): Decimal;
351
+
352
+ inverseSine(): Decimal;
353
+ asin(): Decimal;
354
+
355
+ inverseTangent(): Decimal;
356
+ atan(): Decimal;
357
+
358
+ isFinite(): boolean;
359
+
360
+ isInteger(): boolean;
361
+ isInt(): boolean;
362
+
363
+ isNaN(): boolean;
364
+
365
+ isNegative(): boolean;
366
+ isNeg(): boolean;
367
+
368
+ isPositive(): boolean;
369
+ isPos(): boolean;
370
+
371
+ isZero(): boolean;
372
+
373
+ lessThan(n: Decimal.Value): boolean;
374
+ lt(n: Decimal.Value): boolean;
375
+
376
+ lessThanOrEqualTo(n: Decimal.Value): boolean;
377
+ lte(n: Decimal.Value): boolean;
378
+
379
+ logarithm(n?: Decimal.Value): Decimal;
380
+ log(n?: Decimal.Value): Decimal;
381
+
382
+ minus(n: Decimal.Value): Decimal;
383
+ sub(n: Decimal.Value): Decimal;
384
+
385
+ modulo(n: Decimal.Value): Decimal;
386
+ mod(n: Decimal.Value): Decimal;
387
+
388
+ naturalExponential(): Decimal;
389
+ exp(): Decimal;
390
+
391
+ naturalLogarithm(): Decimal;
392
+ ln(): Decimal;
393
+
394
+ negated(): Decimal;
395
+ neg(): Decimal;
396
+
397
+ plus(n: Decimal.Value): Decimal;
398
+ add(n: Decimal.Value): Decimal;
399
+
400
+ precision(includeZeros?: boolean): number;
401
+ sd(includeZeros?: boolean): number;
402
+
403
+ round(): Decimal;
404
+
405
+ sine() : Decimal;
406
+ sin() : Decimal;
407
+
408
+ squareRoot(): Decimal;
409
+ sqrt(): Decimal;
410
+
411
+ tangent() : Decimal;
412
+ tan() : Decimal;
413
+
414
+ times(n: Decimal.Value): Decimal;
415
+ mul(n: Decimal.Value) : Decimal;
416
+
417
+ toBinary(significantDigits?: number): string;
418
+ toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
419
+
420
+ toDecimalPlaces(decimalPlaces?: number): Decimal;
421
+ toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
422
+ toDP(decimalPlaces?: number): Decimal;
423
+ toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
424
+
425
+ toExponential(decimalPlaces?: number): string;
426
+ toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
427
+
428
+ toFixed(decimalPlaces?: number): string;
429
+ toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
430
+
431
+ toFraction(max_denominator?: Decimal.Value): Decimal[];
432
+
433
+ toHexadecimal(significantDigits?: number): string;
434
+ toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
435
+ toHex(significantDigits?: number): string;
436
+ toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
437
+
438
+ toJSON(): string;
439
+
440
+ toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
441
+
442
+ toNumber(): number;
443
+
444
+ toOctal(significantDigits?: number): string;
445
+ toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
446
+
447
+ toPower(n: Decimal.Value): Decimal;
448
+ pow(n: Decimal.Value): Decimal;
449
+
450
+ toPrecision(significantDigits?: number): string;
451
+ toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
452
+
453
+ toSignificantDigits(significantDigits?: number): Decimal;
454
+ toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
455
+ toSD(significantDigits?: number): Decimal;
456
+ toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
457
+
458
+ toString(): string;
459
+
460
+ truncated(): Decimal;
461
+ trunc(): Decimal;
462
+
463
+ valueOf(): string;
464
+
465
+ static abs(n: Decimal.Value): Decimal;
466
+ static acos(n: Decimal.Value): Decimal;
467
+ static acosh(n: Decimal.Value): Decimal;
468
+ static add(x: Decimal.Value, y: Decimal.Value): Decimal;
469
+ static asin(n: Decimal.Value): Decimal;
470
+ static asinh(n: Decimal.Value): Decimal;
471
+ static atan(n: Decimal.Value): Decimal;
472
+ static atanh(n: Decimal.Value): Decimal;
473
+ static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
474
+ static cbrt(n: Decimal.Value): Decimal;
475
+ static ceil(n: Decimal.Value): Decimal;
476
+ static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
477
+ static clone(object?: Decimal.Config): Decimal.Constructor;
478
+ static config(object: Decimal.Config): Decimal.Constructor;
479
+ static cos(n: Decimal.Value): Decimal;
480
+ static cosh(n: Decimal.Value): Decimal;
481
+ static div(x: Decimal.Value, y: Decimal.Value): Decimal;
482
+ static exp(n: Decimal.Value): Decimal;
483
+ static floor(n: Decimal.Value): Decimal;
484
+ static hypot(...n: Decimal.Value[]): Decimal;
485
+ static isDecimal(object: any): object is Decimal;
486
+ static ln(n: Decimal.Value): Decimal;
487
+ static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
488
+ static log2(n: Decimal.Value): Decimal;
489
+ static log10(n: Decimal.Value): Decimal;
490
+ static max(...n: Decimal.Value[]): Decimal;
491
+ static min(...n: Decimal.Value[]): Decimal;
492
+ static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
493
+ static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
494
+ static noConflict(): Decimal.Constructor; // Browser only
495
+ static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
496
+ static random(significantDigits?: number): Decimal;
497
+ static round(n: Decimal.Value): Decimal;
498
+ static set(object: Decimal.Config): Decimal.Constructor;
499
+ static sign(n: Decimal.Value): number;
500
+ static sin(n: Decimal.Value): Decimal;
501
+ static sinh(n: Decimal.Value): Decimal;
502
+ static sqrt(n: Decimal.Value): Decimal;
503
+ static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
504
+ static sum(...n: Decimal.Value[]): Decimal;
505
+ static tan(n: Decimal.Value): Decimal;
506
+ static tanh(n: Decimal.Value): Decimal;
507
+ static trunc(n: Decimal.Value): Decimal;
508
+
509
+ static readonly default?: Decimal.Constructor;
510
+ static readonly Decimal?: Decimal.Constructor;
511
+
512
+ static readonly precision: number;
513
+ static readonly rounding: Decimal.Rounding;
514
+ static readonly toExpNeg: number;
515
+ static readonly toExpPos: number;
516
+ static readonly minE: number;
517
+ static readonly maxE: number;
518
+ static readonly crypto: boolean;
519
+ static readonly modulo: Decimal.Modulo;
520
+
521
+ static readonly ROUND_UP: 0;
522
+ static readonly ROUND_DOWN: 1;
523
+ static readonly ROUND_CEIL: 2;
524
+ static readonly ROUND_FLOOR: 3;
525
+ static readonly ROUND_HALF_UP: 4;
526
+ static readonly ROUND_HALF_DOWN: 5;
527
+ static readonly ROUND_HALF_EVEN: 6;
528
+ static readonly ROUND_HALF_CEIL: 7;
529
+ static readonly ROUND_HALF_FLOOR: 8;
530
+ static readonly EUCLID: 9;
531
+ }
532
+
533
+ /**
534
+ * Interface for any Decimal.js-like library
535
+ * Allows us to accept Decimal.js from different
536
+ * versions and some compatible alternatives
537
+ */
538
+ export declare interface DecimalJsLike {
539
+ d: number[];
540
+ e: number;
541
+ s: number;
542
+ toFixed(): string;
543
+ }
544
+
545
+ export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>;
546
+
547
+ export declare type DefaultSelection<P> = UnwrapPayload<{
548
+ default: P;
549
+ }>['default'];
550
+
551
+ export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void;
552
+
553
+ declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client;
554
+
555
+ declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"];
556
+
557
+ export declare type DevTypeMapDef = {
558
+ meta: {
559
+ modelProps: string;
560
+ };
561
+ model: {
562
+ [Model in PropertyKey]: {
563
+ [Operation in PropertyKey]: DevTypeMapFnDef;
564
+ };
565
+ };
566
+ other: {
567
+ [Operation in PropertyKey]: DevTypeMapFnDef;
568
+ };
569
+ };
570
+
571
+ export declare type DevTypeMapFnDef = {
572
+ args: any;
573
+ result: any;
574
+ payload: OperationPayload;
575
+ };
576
+
577
+ declare interface Dictionary<T> {
578
+ [key: string]: T;
579
+ }
580
+
581
+ declare type Dictionary_2<T> = {
582
+ [key: string]: T | undefined;
583
+ };
584
+
585
+ export declare namespace DMMF {
586
+ export interface Document {
587
+ datamodel: Datamodel;
588
+ schema: Schema;
589
+ mappings: Mappings;
590
+ }
591
+ export interface Mappings {
592
+ modelOperations: ModelMapping[];
593
+ otherOperations: {
594
+ read: string[];
595
+ write: string[];
596
+ };
597
+ }
598
+ export interface OtherOperationMappings {
599
+ read: string[];
600
+ write: string[];
601
+ }
602
+ export interface DatamodelEnum {
603
+ name: string;
604
+ values: EnumValue[];
605
+ dbName?: string | null;
606
+ documentation?: string;
607
+ }
608
+ export interface SchemaEnum {
609
+ name: string;
610
+ values: string[];
611
+ }
612
+ export interface EnumValue {
613
+ name: string;
614
+ dbName: string | null;
615
+ }
616
+ export interface Datamodel {
617
+ models: Model[];
618
+ enums: DatamodelEnum[];
619
+ types: Model[];
620
+ }
621
+ export interface uniqueIndex {
622
+ name: string;
623
+ fields: string[];
624
+ }
625
+ export interface PrimaryKey {
626
+ name: string | null;
627
+ fields: string[];
628
+ }
629
+ export interface Model {
630
+ name: string;
631
+ dbName: string | null;
632
+ fields: Field[];
633
+ uniqueFields: string[][];
634
+ uniqueIndexes: uniqueIndex[];
635
+ documentation?: string;
636
+ primaryKey: PrimaryKey | null;
637
+ isGenerated?: boolean;
638
+ }
639
+ export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported';
640
+ export type FieldNamespace = 'model' | 'prisma';
641
+ export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes';
642
+ export interface Field {
643
+ kind: FieldKind;
644
+ name: string;
645
+ isRequired: boolean;
646
+ isList: boolean;
647
+ isUnique: boolean;
648
+ isId: boolean;
649
+ isReadOnly: boolean;
650
+ isGenerated?: boolean;
651
+ isUpdatedAt?: boolean;
652
+ /**
653
+ * Describes the data type in the same the way it is defined in the Prisma schema:
654
+ * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
655
+ */
656
+ type: string;
657
+ dbName?: string | null;
658
+ hasDefaultValue: boolean;
659
+ default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
660
+ relationFromFields?: string[];
661
+ relationToFields?: string[];
662
+ relationOnDelete?: string;
663
+ relationName?: string;
664
+ documentation?: string;
665
+ }
666
+ export interface FieldDefault {
667
+ name: string;
668
+ args: any[];
669
+ }
670
+ export type FieldDefaultScalar = string | boolean | number;
671
+ export interface Schema {
672
+ rootQueryType?: string;
673
+ rootMutationType?: string;
674
+ inputObjectTypes: {
675
+ model?: InputType[];
676
+ prisma: InputType[];
677
+ };
678
+ outputObjectTypes: {
679
+ model: OutputType[];
680
+ prisma: OutputType[];
681
+ };
682
+ enumTypes: {
683
+ model?: SchemaEnum[];
684
+ prisma: SchemaEnum[];
685
+ };
686
+ fieldRefTypes: {
687
+ prisma?: FieldRefType[];
688
+ };
689
+ }
690
+ export interface Query {
691
+ name: string;
692
+ args: SchemaArg[];
693
+ output: QueryOutput;
694
+ }
695
+ export interface QueryOutput {
696
+ name: string;
697
+ isRequired: boolean;
698
+ isList: boolean;
699
+ }
700
+ export type TypeRef<AllowedLocations extends FieldLocation> = {
701
+ isList: boolean;
702
+ type: string;
703
+ location: AllowedLocations;
704
+ namespace?: FieldNamespace;
705
+ };
706
+ export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>;
707
+ export interface SchemaArg {
708
+ name: string;
709
+ comment?: string;
710
+ isNullable: boolean;
711
+ isRequired: boolean;
712
+ inputTypes: InputTypeRef[];
713
+ deprecation?: Deprecation;
714
+ }
715
+ export interface OutputType {
716
+ name: string;
717
+ fields: SchemaField[];
718
+ }
719
+ export interface SchemaField {
720
+ name: string;
721
+ isNullable?: boolean;
722
+ outputType: OutputTypeRef;
723
+ args: SchemaArg[];
724
+ deprecation?: Deprecation;
725
+ documentation?: string;
726
+ }
727
+ export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>;
728
+ export interface Deprecation {
729
+ sinceVersion: string;
730
+ reason: string;
731
+ plannedRemovalVersion?: string;
732
+ }
733
+ export interface InputType {
734
+ name: string;
735
+ constraints: {
736
+ maxNumFields: number | null;
737
+ minNumFields: number | null;
738
+ fields?: string[];
739
+ };
740
+ meta?: {
741
+ source?: string;
742
+ };
743
+ fields: SchemaArg[];
744
+ }
745
+ export interface FieldRefType {
746
+ name: string;
747
+ allowTypes: FieldRefAllowType[];
748
+ fields: SchemaArg[];
749
+ }
750
+ export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>;
751
+ export interface ModelMapping {
752
+ model: string;
753
+ plural: string;
754
+ findUnique?: string | null;
755
+ findUniqueOrThrow?: string | null;
756
+ findFirst?: string | null;
757
+ findFirstOrThrow?: string | null;
758
+ findMany?: string | null;
759
+ create?: string | null;
760
+ createMany?: string | null;
761
+ update?: string | null;
762
+ updateMany?: string | null;
763
+ upsert?: string | null;
764
+ delete?: string | null;
765
+ deleteMany?: string | null;
766
+ aggregate?: string | null;
767
+ groupBy?: string | null;
768
+ count?: string | null;
769
+ findRaw?: string | null;
770
+ aggregateRaw?: string | null;
771
+ }
772
+ export enum ModelAction {
773
+ findUnique = "findUnique",
774
+ findUniqueOrThrow = "findUniqueOrThrow",
775
+ findFirst = "findFirst",
776
+ findFirstOrThrow = "findFirstOrThrow",
777
+ findMany = "findMany",
778
+ create = "create",
779
+ createMany = "createMany",
780
+ update = "update",
781
+ updateMany = "updateMany",
782
+ upsert = "upsert",
783
+ delete = "delete",
784
+ deleteMany = "deleteMany",
785
+ groupBy = "groupBy",
786
+ count = "count",
787
+ aggregate = "aggregate",
788
+ findRaw = "findRaw",
789
+ aggregateRaw = "aggregateRaw"
790
+ }
791
+ }
792
+
793
+ export declare class DMMFClass implements DMMF.Document {
794
+ document: DMMF.Document;
795
+ private compositeNames;
796
+ private inputTypesByName;
797
+ readonly typeAndModelMap: Dictionary<DMMF.Model>;
798
+ readonly mappingsMap: Dictionary<DMMF.ModelMapping>;
799
+ readonly outputTypeMap: NamespacedTypeMap<DMMF.OutputType>;
800
+ readonly rootFieldMap: Dictionary<DMMF.SchemaField>;
801
+ constructor(document: DMMF.Document);
802
+ get datamodel(): DMMF.Datamodel;
803
+ get mappings(): DMMF.Mappings;
804
+ get schema(): DMMF.Schema;
805
+ get inputObjectTypes(): {
806
+ model?: DMMF.InputType[] | undefined;
807
+ prisma: DMMF.InputType[];
808
+ };
809
+ get outputObjectTypes(): {
810
+ model: DMMF.OutputType[];
811
+ prisma: DMMF.OutputType[];
812
+ };
813
+ isComposite(modelOrTypeName: string): boolean;
814
+ getOtherOperationNames(): string[];
815
+ hasEnumInNamespace(enumName: string, namespace: DMMF.FieldNamespace): boolean;
816
+ resolveInputObjectType(ref: DMMF.InputTypeRef): DMMF.InputType | undefined;
817
+ resolveOutputObjectType(ref: DMMF.OutputTypeRef): DMMF.OutputType | undefined;
818
+ private buildModelMap;
819
+ private buildTypeMap;
820
+ private buildTypeModelMap;
821
+ private buildMappingsMap;
822
+ private buildMergedOutputTypeMap;
823
+ private buildRootFieldMap;
824
+ private buildInputTypesMap;
825
+ }
826
+
827
+ export declare interface DriverAdapter extends Queryable {
828
+ /**
829
+ * Starts new transation.
830
+ */
831
+ startTransaction(): Promise<Result_3<Transaction_2>>;
832
+ /**
833
+ * Closes the connection to the database, if any.
834
+ */
835
+ close: () => Promise<Result_3<void>>;
836
+ }
837
+
838
+ /** Client */
839
+ export declare type DynamicClientExtensionArgs<C_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
840
+ [P in keyof C_]: unknown;
841
+ } & {
842
+ [K: symbol]: {
843
+ ctx: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList> & {
844
+ $parent: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>;
845
+ };
846
+ };
847
+ };
848
+
849
+ export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
850
+ [P in keyof ExtArgs['client']]: Return<ExtArgs['client'][P]>;
851
+ } & {
852
+ [P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs>;
853
+ } & {
854
+ [P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]: <R = GetResult<TypeMap['other']['payload'], any, P & Operation>>(...args: ToTuple<TypeMap['other']['operations'][P]['args']>) => PrismaPromise<R>;
855
+ } & {
856
+ [P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs>[P];
857
+ } & {
858
+ [K: symbol]: {
859
+ types: TypeMap['other'];
860
+ };
861
+ };
862
+
863
+ export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
864
+ $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs>;
865
+ $transaction<P extends PrismaPromise<any>[]>(arg: [...P], options?: {
866
+ isolationLevel?: TypeMap['meta']['txIsolationLevel'];
867
+ }): Promise<UnwrapTuple<P>>;
868
+ $transaction<R>(fn: (client: Omit<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>) => Promise<R>, options?: {
869
+ maxWait?: number;
870
+ timeout?: number;
871
+ isolationLevel?: TypeMap['meta']['txIsolationLevel'];
872
+ }): Promise<R>;
873
+ $disconnect(): Promise<void>;
874
+ $connect(): Promise<void>;
875
+ };
876
+
877
+ /** Model */
878
+ export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
879
+ [K in keyof M_]: K extends '$allModels' ? {
880
+ [P in keyof M_[K]]?: unknown;
881
+ } & {
882
+ [K: symbol]: {};
883
+ } : K extends TypeMap['meta']['modelProps'] ? {
884
+ [P in keyof M_[K]]?: unknown;
885
+ } & {
886
+ [K: symbol]: {
887
+ ctx: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, K>, ExtArgs> & {
888
+ $parent: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>;
889
+ } & {
890
+ $name: ModelKey<TypeMap, K>;
891
+ } & {
892
+ /**
893
+ * @deprecated Use `$name` instead.
894
+ */
895
+ name: ModelKey<TypeMap, K>;
896
+ };
897
+ };
898
+ } : never;
899
+ };
900
+
901
+ export declare type DynamicModelExtensionFluentApi<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, Null> = {
902
+ [K in keyof TypeMap['model'][M]['payload']['objects']]: <A>(args?: Exact<A, Path<TypeMap['model'][M]['operations'][P]['args']['select'], [K]>>) => PrismaPromise<Path<DynamicModelExtensionFnResultBase<TypeMap, M, {
903
+ select: {
904
+ [P in K]: A;
905
+ };
906
+ }, P>, [K]> | Null> & DynamicModelExtensionFluentApi<TypeMap, (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], P, Null | Select<TypeMap['model'][M]['payload']['objects'][K], null>>;
907
+ };
908
+
909
+ export declare type DynamicModelExtensionFnResult<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, Null = DynamicModelExtensionFnResultNull<P>> = P extends FluentOperation ? DynamicModelExtensionFluentApi<TypeMap, M, P, Null> & PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P> | Null> : PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P>>;
910
+
911
+ export declare type DynamicModelExtensionFnResultBase<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey> = GetResult<TypeMap['model'][M]['payload'], A, P & Operation>;
912
+
913
+ export declare type DynamicModelExtensionFnResultNull<P extends PropertyKey> = P extends 'findUnique' | 'findFirst' ? null : never;
914
+
915
+ export declare type DynamicModelExtensionOperationFn<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey> = {} extends TypeMap['model'][M]['operations'][P]['args'] ? <A extends TypeMap['model'][M]['operations'][P]['args']>(args?: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P> : <A extends TypeMap['model'][M]['operations'][P]['args']>(args: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P>;
916
+
917
+ export declare type DynamicModelExtensionThis<TypeMap extends TypeMapDef, M extends PropertyKey, ExtArgs extends Record<string, any>> = {
918
+ [P in keyof ExtArgs['model'][Uncapitalize<M & string>]]: Return<ExtArgs['model'][Uncapitalize<M & string>][P]>;
919
+ } & {
920
+ [P in Exclude<keyof TypeMap['model'][M]['operations'], keyof ExtArgs['model'][Uncapitalize<M & string>]>]: DynamicModelExtensionOperationFn<TypeMap, M, P>;
921
+ } & {
922
+ [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize<M & string>]>]: TypeMap['model'][M]['fields'];
923
+ } & {
924
+ [K: symbol]: {
925
+ types: TypeMap['model'][M];
926
+ };
927
+ };
928
+
929
+ /** Query */
930
+ export declare type DynamicQueryExtensionArgs<Q_, TypeMap extends TypeMapDef> = {
931
+ [K in keyof Q_]: K extends '$allOperations' ? (args: {
932
+ model?: string;
933
+ operation: string;
934
+ args: any;
935
+ query: (args: any) => PrismaPromise<any>;
936
+ }) => Promise<any> : K extends '$allModels' ? {
937
+ [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb<TypeMap, 'model', keyof TypeMap['model'], keyof TypeMap['model'][keyof TypeMap['model']]['operations']> : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb<TypeMap, 'model', keyof TypeMap['model'], P> : never;
938
+ } : K extends TypeMap['meta']['modelProps'] ? {
939
+ [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb<TypeMap, 'model', ModelKey<TypeMap, K>, keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations']> : P extends keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations'] ? DynamicQueryExtensionCb<TypeMap, 'model', ModelKey<TypeMap, K>, P> : never;
940
+ } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never;
941
+ };
942
+
943
+ export declare type DynamicQueryExtensionCb<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = <A extends DynamicQueryExtensionCbArgs<TypeMap, _0, _1, _2>>(args: A) => Promise<TypeMap[_0][_1][_2]['result']>;
944
+
945
+ export declare type DynamicQueryExtensionCbArgs<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = (_1 extends unknown ? _2 extends unknown ? {
946
+ args: DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>;
947
+ model: _0 extends 0 ? undefined : _1;
948
+ operation: _2;
949
+ query: <A extends DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>>(args: A) => PrismaPromise<TypeMap[_0][_1]['operations'][_2]['result']>;
950
+ } : never : never) & {
951
+ query: (args: DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>) => PrismaPromise<TypeMap[_0][_1]['operations'][_2]['result']>;
952
+ };
953
+
954
+ export declare type DynamicQueryExtensionCbArgsArgs<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args'];
955
+
956
+ /** Result */
957
+ export declare type DynamicResultExtensionArgs<R_, TypeMap extends TypeMapDef> = {
958
+ [K in keyof R_]: {
959
+ [P in keyof R_[K]]?: {
960
+ needs?: DynamicResultExtensionNeeds<TypeMap, ModelKey<TypeMap, K>, R_[K][P]>;
961
+ compute(data: DynamicResultExtensionData<TypeMap, ModelKey<TypeMap, K>, R_[K][P]>): any;
962
+ };
963
+ };
964
+ };
965
+
966
+ export declare type DynamicResultExtensionData<TypeMap extends TypeMapDef, M extends PropertyKey, S> = GetFindResult<TypeMap['model'][M]['payload'], {
967
+ select: S;
968
+ }>;
969
+
970
+ export declare type DynamicResultExtensionNeeds<TypeMap extends TypeMapDef, M extends PropertyKey, S> = {
971
+ [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never;
972
+ } & {
973
+ [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean;
974
+ };
975
+
976
+ /**
977
+ * Placeholder value for "no text".
978
+ */
979
+ export declare const empty: Sql;
980
+
981
+ export declare type EmptyToUnknown<T> = T;
982
+
983
+ declare abstract class Engine<InteractiveTransactionPayload = unknown> {
984
+ abstract on(event: EngineEventType, listener: (args?: any) => any): void;
985
+ abstract start(): Promise<void>;
986
+ abstract stop(): Promise<void>;
987
+ abstract version(forceRun?: boolean): Promise<string> | string;
988
+ abstract request<T>(query: JsonQuery, options: RequestOptions<InteractiveTransactionPayload>): Promise<QueryEngineResult<T>>;
989
+ abstract requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
990
+ abstract transaction(action: 'start', headers: Transaction.TransactionHeaders, options?: Transaction.Options): Promise<Transaction.InteractiveTransactionInfo<unknown>>;
991
+ abstract transaction(action: 'commit', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo<unknown>): Promise<void>;
992
+ abstract transaction(action: 'rollback', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo<unknown>): Promise<void>;
993
+ abstract metrics(options: MetricsOptionsJson): Promise<Metrics>;
994
+ abstract metrics(options: MetricsOptionsPrometheus): Promise<string>;
995
+ }
996
+
997
+ declare interface EngineConfig {
998
+ cwd: string;
999
+ dirname: string;
1000
+ datamodelPath: string;
1001
+ enableDebugLogs?: boolean;
1002
+ allowTriggerPanic?: boolean;
1003
+ prismaPath?: string;
1004
+ generator?: GeneratorConfig;
1005
+ overrideDatasources: Datasources;
1006
+ showColors?: boolean;
1007
+ logQueries?: boolean;
1008
+ logLevel?: 'info' | 'warn';
1009
+ env: Record<string, string>;
1010
+ flags?: string[];
1011
+ clientVersion: string;
1012
+ engineVersion: string;
1013
+ previewFeatures?: string[];
1014
+ engineEndpoint?: string;
1015
+ activeProvider?: string;
1016
+ logEmitter: EventEmitter;
1017
+ /**
1018
+ * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`.
1019
+ * If set, this is only used in the library engine, and all queries would be performed through it,
1020
+ * rather than Prisma's Rust drivers.
1021
+ */
1022
+ adapter?: ErrorCapturingDriverAdapter;
1023
+ /**
1024
+ * The contents of the schema encoded into a string
1025
+ * @remarks only used for the purpose of data proxy
1026
+ */
1027
+ inlineSchema: string;
1028
+ /**
1029
+ * The contents of the datasource url saved in a string
1030
+ * @remarks only used for the purpose of data proxy
1031
+ */
1032
+ inlineDatasources: GetPrismaClientConfig['inlineDatasources'];
1033
+ /**
1034
+ * The string hash that was produced for a given schema
1035
+ * @remarks only used for the purpose of data proxy
1036
+ */
1037
+ inlineSchemaHash: string;
1038
+ /**
1039
+ * The helper for interaction with OTEL tracing
1040
+ * @remarks enabling is determined by the client and @prisma/instrumentation package
1041
+ */
1042
+ tracingHelper: TracingHelper;
1043
+ /**
1044
+ * Information about whether we have not found a schema.prisma file in the
1045
+ * default location, and that we fell back to finding the schema.prisma file
1046
+ * in the current working directory. This usually means it has been bundled.
1047
+ */
1048
+ isBundled?: boolean;
1049
+ /**
1050
+ * Loads the raw wasm module for the wasm query engine. This configuration is
1051
+ * generated specifically for each type of client, eg. Node.js client and Edge
1052
+ * clients will have different implementations.
1053
+ * @remarks this is a callback on purpose, we only load the wasm if needed.
1054
+ */
1055
+ getQueryEngineWasmModule?: () => Promise<unknown>;
1056
+ }
1057
+
1058
+ declare type EngineEventType = 'query' | 'info' | 'warn' | 'error' | 'beforeExit';
1059
+
1060
+ declare type EngineSpan = {
1061
+ span: boolean;
1062
+ name: string;
1063
+ trace_id: string;
1064
+ span_id: string;
1065
+ parent_span_id: string;
1066
+ start_time: [number, number];
1067
+ end_time: [number, number];
1068
+ attributes?: Record<string, string>;
1069
+ links?: {
1070
+ trace_id: string;
1071
+ span_id: string;
1072
+ }[];
1073
+ };
1074
+
1075
+ declare type EngineSpanEvent = {
1076
+ span: boolean;
1077
+ spans: EngineSpan[];
1078
+ };
1079
+
1080
+ declare interface EnvValue {
1081
+ fromEnvVar: null | string;
1082
+ value: null | string;
1083
+ }
1084
+
1085
+ export declare type Equals<A, B> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? 1 : 0;
1086
+
1087
+ declare type Error_2 = {
1088
+ kind: 'GenericJs';
1089
+ id: number;
1090
+ } | {
1091
+ kind: 'UnsupportedNativeDataType';
1092
+ type: string;
1093
+ } | {
1094
+ kind: 'Postgres';
1095
+ code: string;
1096
+ severity: string;
1097
+ message: string;
1098
+ detail: string | undefined;
1099
+ column: string | undefined;
1100
+ hint: string | undefined;
1101
+ } | {
1102
+ kind: 'Mysql';
1103
+ code: number;
1104
+ message: string;
1105
+ state: string;
1106
+ } | {
1107
+ kind: 'Sqlite';
1108
+ /**
1109
+ * Sqlite extended error code: https://www.sqlite.org/rescode.html
1110
+ */
1111
+ extendedCode: number;
1112
+ message: string;
1113
+ };
1114
+
1115
+ declare interface ErrorCapturingDriverAdapter extends DriverAdapter {
1116
+ readonly errorRegistry: ErrorRegistry;
1117
+ }
1118
+
1119
+ declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal';
1120
+
1121
+ declare type ErrorRecord = {
1122
+ error: unknown;
1123
+ };
1124
+
1125
+ declare interface ErrorRegistry {
1126
+ consumeError(id: number): ErrorRecord | undefined;
1127
+ }
1128
+
1129
+ declare interface ErrorWithBatchIndex {
1130
+ batchRequestIdx?: number;
1131
+ }
1132
+
1133
+ declare interface EventEmitter {
1134
+ on(event: string, listener: (...args: any[]) => void): unknown;
1135
+ emit(event: string, args?: any): boolean;
1136
+ }
1137
+
1138
+ export declare type Exact<A, W> = (A extends unknown ? (W extends A ? {
1139
+ [K in keyof A]: Exact<A[K], W[K]>;
1140
+ } : W) : never) | (A extends Narrowable ? A : never);
1141
+
1142
+ /**
1143
+ * Defines Exception.
1144
+ *
1145
+ * string or an object with one of (message or name or code) and optional stack
1146
+ */
1147
+ declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string;
1148
+
1149
+ declare interface ExceptionWithCode {
1150
+ code: string | number;
1151
+ name?: string;
1152
+ message?: string;
1153
+ stack?: string;
1154
+ }
1155
+
1156
+ declare interface ExceptionWithMessage {
1157
+ code?: string | number;
1158
+ message: string;
1159
+ name?: string;
1160
+ stack?: string;
1161
+ }
1162
+
1163
+ declare interface ExceptionWithName {
1164
+ code?: string | number;
1165
+ message?: string;
1166
+ name: string;
1167
+ stack?: string;
1168
+ }
1169
+
1170
+ declare type ExtendedSpanOptions = SpanOptions & {
1171
+ /** The name of the span */
1172
+ name: string;
1173
+ internal?: boolean;
1174
+ middleware?: boolean;
1175
+ /** Whether it propagates context (?=true) */
1176
+ active?: boolean;
1177
+ /** The context to append the span to */
1178
+ context?: Context;
1179
+ };
1180
+
1181
+ /** $extends, defineExtension */
1182
+ export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, TypeMap extends TypeMapDef = Call<TypeMapCb, {
1183
+ extArgs: ExtArgs;
1184
+ }>> {
1185
+ extArgs: ExtArgs;
1186
+ <R_ extends {
1187
+ [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
1188
+ }, R, M_ extends {
1189
+ [K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
1190
+ }, M, Q_ extends {
1191
+ [K in TypeMap['meta']['modelProps'] | '$allModels' | keyof TypeMap['other']['operations'] | '$allOperations']?: unknown;
1192
+ }, C_ extends {
1193
+ [K in string]?: unknown;
1194
+ }, C, Args extends InternalArgs = InternalArgs<R, M, {}, C>, MergedArgs extends InternalArgs = MergeExtArgs<TypeMap, ExtArgs, Args>>(extension: ((client: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>) => {
1195
+ $extends: {
1196
+ extArgs: Args;
1197
+ };
1198
+ }) | {
1199
+ name?: string;
1200
+ query?: DynamicQueryExtensionArgs<Q_, TypeMap>;
1201
+ result?: DynamicResultExtensionArgs<R_, TypeMap> & R;
1202
+ model?: DynamicModelExtensionArgs<M_, TypeMap, TypeMapCb, ExtArgs> & M;
1203
+ client?: DynamicClientExtensionArgs<C_, TypeMap, TypeMapCb, ExtArgs> & C;
1204
+ }): {
1205
+ extends: DynamicClientExtensionThis<Call<TypeMapCb, {
1206
+ extArgs: MergedArgs;
1207
+ }>, TypeMapCb, MergedArgs>;
1208
+ define: (client: any) => {
1209
+ $extends: {
1210
+ extArgs: Args;
1211
+ };
1212
+ };
1213
+ }[Variant];
1214
+ }
1215
+
1216
+ export declare type ExtensionArgs = Optional<RequiredExtensionArgs>;
1217
+
1218
+ declare namespace Extensions {
1219
+ export {
1220
+ defineExtension,
1221
+ getExtensionContext
1222
+ }
1223
+ }
1224
+ export { Extensions }
1225
+
1226
+ declare namespace Extensions_2 {
1227
+ export {
1228
+ InternalArgs,
1229
+ DefaultArgs,
1230
+ GetPayloadResult,
1231
+ GetSelect,
1232
+ DynamicQueryExtensionArgs,
1233
+ DynamicQueryExtensionCb,
1234
+ DynamicQueryExtensionCbArgs,
1235
+ DynamicQueryExtensionCbArgsArgs,
1236
+ DynamicResultExtensionArgs,
1237
+ DynamicResultExtensionNeeds,
1238
+ DynamicResultExtensionData,
1239
+ DynamicModelExtensionArgs,
1240
+ DynamicModelExtensionThis,
1241
+ DynamicModelExtensionOperationFn,
1242
+ DynamicModelExtensionFnResult,
1243
+ DynamicModelExtensionFnResultBase,
1244
+ DynamicModelExtensionFluentApi,
1245
+ DynamicModelExtensionFnResultNull,
1246
+ DynamicClientExtensionArgs,
1247
+ DynamicClientExtensionThis,
1248
+ ClientBuiltInProp,
1249
+ DynamicClientExtensionThisBuiltin,
1250
+ ExtendsHook,
1251
+ MergeExtArgs,
1252
+ AllModelsToStringIndex,
1253
+ TypeMapDef,
1254
+ DevTypeMapDef,
1255
+ DevTypeMapFnDef,
1256
+ TypeMapCbDef,
1257
+ ModelKey,
1258
+ RequiredExtensionArgs as UserArgs
1259
+ }
1260
+ }
1261
+
1262
+ declare type Fetch = typeof nodeFetch;
1263
+
1264
+ /**
1265
+ * A reference to a specific field of a specific model
1266
+ */
1267
+ export declare interface FieldRef<Model, FieldType> {
1268
+ readonly modelName: Model;
1269
+ readonly name: string;
1270
+ readonly typeName: FieldType;
1271
+ readonly isList: boolean;
1272
+ }
1273
+
1274
+ export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete';
1275
+
1276
+ export declare interface Fn<Params = unknown, Returns = unknown> {
1277
+ params: Params;
1278
+ returns: Returns;
1279
+ }
1280
+
1281
+ declare interface GeneratorConfig {
1282
+ name: string;
1283
+ output: EnvValue | null;
1284
+ isCustomOutput?: boolean;
1285
+ provider: EnvValue;
1286
+ config: Dictionary_2<string | string[]>;
1287
+ binaryTargets: BinaryTargetsEnvValue[];
1288
+ previewFeatures: string[];
1289
+ }
1290
+
1291
+ export declare type GetAggregateResult<P extends OperationPayload, A> = {
1292
+ [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count<A[K]> : {
1293
+ [J in keyof A[K] & string]: P['scalars'][J] | null;
1294
+ };
1295
+ };
1296
+
1297
+ export declare type GetBatchResult = {
1298
+ count: number;
1299
+ };
1300
+
1301
+ export declare type GetCountResult<A> = A extends {
1302
+ select: infer S;
1303
+ } ? (S extends true ? number : Count<S>) : number;
1304
+
1305
+ declare function getExtensionContext<T>(that: T): Context_2<T>;
1306
+
1307
+ export declare type GetFindResult<P extends OperationPayload, A> = Equals<A, any> extends 1 ? DefaultSelection<P> : A extends {
1308
+ select: infer S extends object;
1309
+ } & Record<string, unknown> | {
1310
+ include: infer I extends object;
1311
+ } & Record<string, unknown> ? {
1312
+ [K in keyof S | keyof I as (S & I)[K] extends false | undefined | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K]>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K]> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K]>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O> | SelectField<P, K> & null : never : P extends {
1313
+ scalars: {
1314
+ [k in K]: infer O;
1315
+ };
1316
+ } ? O : K extends '_count' ? Count<P['objects']> : never;
1317
+ } & (A extends {
1318
+ include: any;
1319
+ } & Record<string, unknown> ? DefaultSelection<P> : unknown) : DefaultSelection<P>;
1320
+
1321
+ export declare type GetGroupByResult<P extends OperationPayload, A> = A extends {
1322
+ by: string[];
1323
+ } ? Array<GetAggregateResult<P, A> & {
1324
+ [K in A['by'][number]]: P['scalars'][K];
1325
+ }> : A extends {
1326
+ by: string;
1327
+ } ? Array<GetAggregateResult<P, A> & {
1328
+ [K in A['by']]: P['scalars'][K];
1329
+ }> : {}[];
1330
+
1331
+ export declare type GetPayloadResult<Base extends Record<any, any>, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = unknown extends R ? Base : {
1332
+ [K in KR | keyof Base]: K extends KR ? R[K] extends () => {
1333
+ compute: (...args: any) => infer C;
1334
+ } ? C : never : Base[K];
1335
+ };
1336
+
1337
+ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1338
+ new (optionsArg?: PrismaClientOptions): {
1339
+ _runtimeDataModel: RuntimeDataModel;
1340
+ _requestHandler: RequestHandler;
1341
+ _connectionPromise?: Promise<any> | undefined;
1342
+ _disconnectionPromise?: Promise<any> | undefined;
1343
+ _engineConfig: EngineConfig;
1344
+ _clientVersion: string;
1345
+ _errorFormat: ErrorFormat;
1346
+ _tracingHelper: TracingHelper;
1347
+ _metrics: MetricsClient;
1348
+ _middlewares: MiddlewareHandler<QueryMiddleware>;
1349
+ _previewFeatures: string[];
1350
+ _activeProvider: string;
1351
+ _extensions: MergedExtensionsList;
1352
+ _engine: Engine;
1353
+ /**
1354
+ * A fully constructed/applied Client that references the parent
1355
+ * PrismaClient. This is used for Client extensions only.
1356
+ */
1357
+ _appliedParent: any;
1358
+ _createPrismaPromise: PrismaPromiseFactory;
1359
+ /**
1360
+ * Hook a middleware into the client
1361
+ * @param middleware to hook
1362
+ */
1363
+ $use(middleware: QueryMiddleware): void;
1364
+ $on(eventType: EngineEventType, callback: (event: any) => void): void;
1365
+ $connect(): Promise<void>;
1366
+ /**
1367
+ * Disconnect from the database
1368
+ */
1369
+ $disconnect(): Promise<void>;
1370
+ /**
1371
+ * Executes a raw query and always returns a number
1372
+ */
1373
+ $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>): Promise<number>;
1374
+ /**
1375
+ * Executes a raw query provided through a safe tag function
1376
+ * @see https://github.com/prisma/prisma/issues/7142
1377
+ *
1378
+ * @param query
1379
+ * @param values
1380
+ * @returns
1381
+ */
1382
+ $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
1383
+ /**
1384
+ * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections
1385
+ * @see https://github.com/prisma/prisma/issues/7142
1386
+ *
1387
+ * @param query
1388
+ * @param values
1389
+ * @returns
1390
+ */
1391
+ $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
1392
+ /**
1393
+ * Executes a raw command only for MongoDB
1394
+ *
1395
+ * @param command
1396
+ * @returns
1397
+ */
1398
+ $runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown>;
1399
+ /**
1400
+ * Executes a raw query and returns selected data
1401
+ */
1402
+ $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>): Promise<unknown[]>;
1403
+ /**
1404
+ * Executes a raw query provided through a safe tag function
1405
+ * @see https://github.com/prisma/prisma/issues/7142
1406
+ *
1407
+ * @param query
1408
+ * @param values
1409
+ * @returns
1410
+ */
1411
+ $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
1412
+ /**
1413
+ * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections
1414
+ * @see https://github.com/prisma/prisma/issues/7142
1415
+ *
1416
+ * @param query
1417
+ * @param values
1418
+ * @returns
1419
+ */
1420
+ $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
1421
+ /**
1422
+ * Execute a batch of requests in a transaction
1423
+ * @param requests
1424
+ * @param options
1425
+ */
1426
+ _transactionWithArray({ promises, options, }: {
1427
+ promises: Array<PrismaPromise_2<any>>;
1428
+ options?: BatchTransactionOptions | undefined;
1429
+ }): Promise<any>;
1430
+ /**
1431
+ * Perform a long-running transaction
1432
+ * @param callback
1433
+ * @param options
1434
+ * @returns
1435
+ */
1436
+ _transactionWithCallback({ callback, options, }: {
1437
+ callback: (client: Client) => Promise<unknown>;
1438
+ options?: Options_2 | undefined;
1439
+ }): Promise<unknown>;
1440
+ _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client;
1441
+ /**
1442
+ * Execute queries within a transaction
1443
+ * @param input a callback or a query list
1444
+ * @param options to set timeouts (callback)
1445
+ * @returns
1446
+ */
1447
+ $transaction(input: any, options?: any): Promise<any>;
1448
+ /**
1449
+ * Runs the middlewares over params before executing a request
1450
+ * @param internalParams
1451
+ * @returns
1452
+ */
1453
+ _request(internalParams: InternalRequestParams): Promise<any>;
1454
+ _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise<any>;
1455
+ readonly $metrics: MetricsClient;
1456
+ /**
1457
+ * Shortcut for checking a preview flag
1458
+ * @param feature preview flag
1459
+ * @returns
1460
+ */
1461
+ _hasPreviewFlag(feature: string): boolean;
1462
+ $extends: typeof $extends;
1463
+ readonly [Symbol.toStringTag]: string;
1464
+ };
1465
+ };
1466
+
1467
+ /**
1468
+ * Config that is stored into the generated client. When the generated client is
1469
+ * loaded, this same config is passed to {@link getPrismaClient} which creates a
1470
+ * closure with that config around a non-instantiated [[PrismaClient]].
1471
+ */
1472
+ declare type GetPrismaClientConfig = {
1473
+ runtimeDataModel: RuntimeDataModel;
1474
+ generator?: GeneratorConfig;
1475
+ relativeEnvPaths: {
1476
+ rootEnvPath?: string | null;
1477
+ schemaEnvPath?: string | null;
1478
+ };
1479
+ relativePath: string;
1480
+ dirname: string;
1481
+ filename?: string;
1482
+ clientVersion: string;
1483
+ engineVersion: string;
1484
+ datasourceNames: string[];
1485
+ activeProvider: string;
1486
+ /**
1487
+ * The contents of the schema encoded into a string
1488
+ * @remarks only used for the purpose of data proxy
1489
+ */
1490
+ inlineSchema: string;
1491
+ /**
1492
+ * A special env object just for the data proxy edge runtime.
1493
+ * Allows bundlers to inject their own env variables (Vercel).
1494
+ * Allows platforms to declare global variables as env (Workers).
1495
+ * @remarks only used for the purpose of data proxy
1496
+ */
1497
+ injectableEdgeEnv?: () => LoadedEnv;
1498
+ /**
1499
+ * The contents of the datasource url saved in a string.
1500
+ * This can either be an env var name or connection string.
1501
+ * It is needed by the client to connect to the Data Proxy.
1502
+ * @remarks only used for the purpose of data proxy
1503
+ */
1504
+ inlineDatasources: {
1505
+ [name in string]: {
1506
+ url: EnvValue;
1507
+ };
1508
+ };
1509
+ /**
1510
+ * The string hash that was produced for a given schema
1511
+ * @remarks only used for the purpose of data proxy
1512
+ */
1513
+ inlineSchemaHash: string;
1514
+ /**
1515
+ * A marker to indicate that the client was not generated via `prisma
1516
+ * generate` but was generated via `generate --postinstall` script instead.
1517
+ * @remarks used to error for Vercel/Netlify for schema caching issues
1518
+ */
1519
+ postinstall?: boolean;
1520
+ /**
1521
+ * Information about the CI where the Prisma Client has been generated. The
1522
+ * name of the CI environment is stored at generation time because CI
1523
+ * information is not always available at runtime. Moreover, the edge client
1524
+ * has no notion of environment variables, so this works around that.
1525
+ * @remarks used to error for Vercel/Netlify for schema caching issues
1526
+ */
1527
+ ciName?: string;
1528
+ /**
1529
+ * Information about whether we have not found a schema.prisma file in the
1530
+ * default location, and that we fell back to finding the schema.prisma file
1531
+ * in the current working directory. This usually means it has been bundled.
1532
+ */
1533
+ isBundled?: boolean;
1534
+ /**
1535
+ * A boolean that is `true` when the client was generated with --no-engine. At
1536
+ * runtime, this means the client will be bound to be using the Data Proxy.
1537
+ */
1538
+ noEngine?: boolean;
1539
+ /**
1540
+ * Loads the raw wasm module for the wasm query engine. This configuration is
1541
+ * generated specifically for each type of client, eg. Node.js client and Edge
1542
+ * clients will have different implementations.
1543
+ * @remarks this is a callback on purpose, we only load the wasm if needed.
1544
+ */
1545
+ getQueryEngineWasmModule?: () => Promise<unknown>;
1546
+ };
1547
+
1548
+ export declare type GetResult<P extends OperationPayload, A, O extends Operation = 'findUniqueOrThrow'> = {
1549
+ findUnique: GetFindResult<P, A> | null;
1550
+ findUniqueOrThrow: GetFindResult<P, A>;
1551
+ findFirst: GetFindResult<P, A> | null;
1552
+ findFirstOrThrow: GetFindResult<P, A>;
1553
+ findMany: GetFindResult<P, A>[];
1554
+ create: GetFindResult<P, A>;
1555
+ createMany: GetBatchResult;
1556
+ update: GetFindResult<P, A>;
1557
+ updateMany: GetBatchResult;
1558
+ upsert: GetFindResult<P, A>;
1559
+ delete: GetFindResult<P, A>;
1560
+ deleteMany: GetBatchResult;
1561
+ aggregate: GetAggregateResult<P, A>;
1562
+ count: GetCountResult<A>;
1563
+ groupBy: GetGroupByResult<P, A>;
1564
+ $queryRaw: unknown;
1565
+ $executeRaw: number;
1566
+ $queryRawUnsafe: unknown;
1567
+ $executeRawUnsafe: number;
1568
+ $runCommandRaw: JsonObject;
1569
+ findRaw: JsonObject;
1570
+ aggregateRaw: JsonObject;
1571
+ }[O];
1572
+
1573
+ export declare type GetSelect<Base extends Record<any, any>, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = {
1574
+ [K in KR | keyof Base]?: K extends KR ? boolean : Base[K];
1575
+ };
1576
+
1577
+ declare type HandleErrorParams = {
1578
+ args: JsArgs;
1579
+ error: any;
1580
+ clientMethod: string;
1581
+ callsite?: CallSite;
1582
+ transaction?: PrismaPromiseTransaction;
1583
+ };
1584
+
1585
+ /**
1586
+ * Defines High-Resolution Time.
1587
+ *
1588
+ * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970.
1589
+ * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds.
1590
+ * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150.
1591
+ * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds:
1592
+ * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210.
1593
+ * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds:
1594
+ * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
1595
+ * This is represented in HrTime format as [1609504210, 150000000].
1596
+ */
1597
+ declare type HrTime = [number, number];
1598
+
1599
+ declare type InteractiveTransactionInfo<Payload = unknown> = {
1600
+ /**
1601
+ * Transaction ID returned by the query engine.
1602
+ */
1603
+ id: string;
1604
+ /**
1605
+ * Arbitrary payload the meaning of which depends on the `Engine` implementation.
1606
+ * For example, `DataProxyEngine` needs to associate different API endpoints with transactions.
1607
+ * In `LibraryEngine` and `BinaryEngine` it is currently not used.
1608
+ */
1609
+ payload: Payload;
1610
+ };
1611
+
1612
+ declare type InteractiveTransactionOptions<Payload> = Transaction.InteractiveTransactionInfo<Payload>;
1613
+
1614
+ export declare type InternalArgs<R = {
1615
+ [K in string]: {
1616
+ [K in string]: unknown;
1617
+ };
1618
+ }, M = {
1619
+ [K in string]: {
1620
+ [K in string]: unknown;
1621
+ };
1622
+ }, Q = {
1623
+ [K in string]: {
1624
+ [K in string]: unknown;
1625
+ };
1626
+ }, C = {
1627
+ [K in string]: unknown;
1628
+ }> = {
1629
+ result: {
1630
+ [K in keyof R]: {
1631
+ [P in keyof R[K]]: () => R[K][P];
1632
+ };
1633
+ };
1634
+ model: {
1635
+ [K in keyof M]: {
1636
+ [P in keyof M[K]]: () => M[K][P];
1637
+ };
1638
+ };
1639
+ query: {
1640
+ [K in keyof Q]: {
1641
+ [P in keyof Q[K]]: () => Q[K][P];
1642
+ };
1643
+ };
1644
+ client: {
1645
+ [K in keyof C]: () => C[K];
1646
+ };
1647
+ };
1648
+
1649
+ declare type InternalRequestParams = {
1650
+ /**
1651
+ * The original client method being called.
1652
+ * Even though the rootField / operation can be changed,
1653
+ * this method stays as it is, as it's what the user's
1654
+ * code looks like
1655
+ */
1656
+ clientMethod: string;
1657
+ /**
1658
+ * Name of js model that triggered the request. Might be used
1659
+ * for warnings or error messages
1660
+ */
1661
+ jsModelName?: string;
1662
+ callsite?: CallSite;
1663
+ transaction?: PrismaPromiseTransaction;
1664
+ unpacker?: Unpacker;
1665
+ otelParentCtx?: Context;
1666
+ /** Used to "desugar" a user input into an "expanded" one */
1667
+ argsMapper?: (args?: UserArgs_2) => UserArgs_2;
1668
+ /** Used to convert args for middleware and back */
1669
+ middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>;
1670
+ /** Used for Accelerate client extension via Data Proxy */
1671
+ customDataProxyFetch?: (fetch: Fetch) => Fetch;
1672
+ } & Omit<QueryMiddlewareParams, 'runInTransaction'>;
1673
+
1674
+ declare enum IsolationLevel {
1675
+ ReadUncommitted = "ReadUncommitted",
1676
+ ReadCommitted = "ReadCommitted",
1677
+ RepeatableRead = "RepeatableRead",
1678
+ Snapshot = "Snapshot",
1679
+ Serializable = "Serializable"
1680
+ }
1681
+
1682
+ export declare type ITXClientDenyList = (typeof denylist)[number];
1683
+
1684
+ export declare const itxClientDenyList: readonly (string | symbol)[];
1685
+
1686
+ declare interface Job {
1687
+ resolve: (data: any) => void;
1688
+ reject: (data: any) => void;
1689
+ request: any;
1690
+ }
1691
+
1692
+ /**
1693
+ * Create a SQL query for a list of values.
1694
+ */
1695
+ export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql;
1696
+
1697
+ export declare type JsArgs = {
1698
+ select?: Selection_2;
1699
+ include?: Selection_2;
1700
+ [argName: string]: JsInputValue;
1701
+ };
1702
+
1703
+ export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | {
1704
+ [key: string]: JsInputValue;
1705
+ };
1706
+
1707
+ declare type JsonArgumentValue = number | string | boolean | null | JsonTaggedValue | JsonArgumentValue[] | {
1708
+ [key: string]: JsonArgumentValue;
1709
+ };
1710
+
1711
+ export declare interface JsonArray extends Array<JsonValue> {
1712
+ }
1713
+
1714
+ export declare interface JsonConvertible {
1715
+ toJSON(): unknown;
1716
+ }
1717
+
1718
+ declare type JsonFieldSelection = {
1719
+ arguments?: Record<string, JsonArgumentValue>;
1720
+ selection: JsonSelectionSet;
1721
+ };
1722
+
1723
+ declare class JsonNull extends NullTypesEnumValue {
1724
+ }
1725
+
1726
+ export declare type JsonObject = {
1727
+ [Key in string]?: JsonValue;
1728
+ };
1729
+
1730
+ declare type JsonQuery = {
1731
+ modelName?: string;
1732
+ action: JsonQueryAction;
1733
+ query: JsonFieldSelection;
1734
+ };
1735
+
1736
+ declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw';
1737
+
1738
+ declare type JsonSelectionSet = {
1739
+ $scalars?: boolean;
1740
+ $composites?: boolean;
1741
+ } & {
1742
+ [fieldName: string]: boolean | JsonFieldSelection;
1743
+ };
1744
+
1745
+ declare type JsonTaggedValue = {
1746
+ $type: 'Json';
1747
+ value: string;
1748
+ };
1749
+
1750
+ export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null;
1751
+
1752
+ export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | {
1753
+ [key: string]: JsOutputValue;
1754
+ };
1755
+
1756
+ export declare type JsPromise<T> = Promise<T> & {};
1757
+
1758
+ declare type KnownErrorParams = {
1759
+ code: string;
1760
+ clientVersion: string;
1761
+ meta?: Record<string, unknown>;
1762
+ batchRequestIdx?: number;
1763
+ };
1764
+
1765
+ /**
1766
+ * A pointer from the current {@link Span} to another span in the same trace or
1767
+ * in a different trace.
1768
+ * Few examples of Link usage.
1769
+ * 1. Batch Processing: A batch of elements may contain elements associated
1770
+ * with one or more traces/spans. Since there can only be one parent
1771
+ * SpanContext, Link is used to keep reference to SpanContext of all
1772
+ * elements in the batch.
1773
+ * 2. Public Endpoint: A SpanContext in incoming client request on a public
1774
+ * endpoint is untrusted from service provider perspective. In such case it
1775
+ * is advisable to start a new trace with appropriate sampling decision.
1776
+ * However, it is desirable to associate incoming SpanContext to new trace
1777
+ * initiated on service provider side so two traces (from Client and from
1778
+ * Service Provider) can be correlated.
1779
+ */
1780
+ declare interface Link {
1781
+ /** The {@link SpanContext} of a linked span. */
1782
+ context: SpanContext;
1783
+ /** A set of {@link SpanAttributes} on the link. */
1784
+ attributes?: SpanAttributes;
1785
+ /** Count of attributes of the link that were dropped due to collection limits */
1786
+ droppedAttributesCount?: number;
1787
+ }
1788
+
1789
+ declare type LoadedEnv = {
1790
+ message?: string;
1791
+ parsed: {
1792
+ [x: string]: string;
1793
+ };
1794
+ } | undefined;
1795
+
1796
+ declare type LocationInFile = {
1797
+ fileName: string;
1798
+ lineNumber: number | null;
1799
+ columnNumber: number | null;
1800
+ };
1801
+
1802
+ declare type LogDefinition = {
1803
+ level: LogLevel;
1804
+ emit: 'stdout' | 'event';
1805
+ };
1806
+
1807
+ declare type LogLevel = 'info' | 'query' | 'warn' | 'error';
1808
+
1809
+ /**
1810
+ * Generates more strict variant of an enum which, unlike regular enum,
1811
+ * throws on non-existing property access. This can be useful in following situations:
1812
+ * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input
1813
+ * - enum values are generated dynamically from DMMF.
1814
+ *
1815
+ * In that case, if using normal enums and no compile-time typechecking, using non-existing property
1816
+ * will result in `undefined` value being used, which will be accepted. Using strict enum
1817
+ * in this case will help to have a runtime exception, telling you that you are probably doing something wrong.
1818
+ *
1819
+ * Note: if you need to check for existence of a value in the enum you can still use either
1820
+ * `in` operator or `hasOwnProperty` function.
1821
+ *
1822
+ * @param definition
1823
+ * @returns
1824
+ */
1825
+ export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
1826
+
1827
+ /**
1828
+ * Class that holds the list of all extensions, applied to particular instance,
1829
+ * as well as resolved versions of the components that need to apply on
1830
+ * different levels. Main idea of this class: avoid re-resolving as much of the
1831
+ * stuff as possible when new extensions are added while also delaying the
1832
+ * resolve until the point it is actually needed. For example, computed fields
1833
+ * of the model won't be resolved unless the model is actually queried. Neither
1834
+ * adding extensions with `client` component only cause other components to
1835
+ * recompute.
1836
+ */
1837
+ declare class MergedExtensionsList {
1838
+ private head?;
1839
+ private constructor();
1840
+ static empty(): MergedExtensionsList;
1841
+ static single(extension: ExtensionArgs): MergedExtensionsList;
1842
+ isEmpty(): boolean;
1843
+ append(extension: ExtensionArgs): MergedExtensionsList;
1844
+ getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined;
1845
+ getAllClientExtensions(): ClientArg | undefined;
1846
+ getAllModelExtensions(dmmfModelName: string): ModelArg | undefined;
1847
+ getAllQueryCallbacks(jsModelName: string, operation: string): any;
1848
+ getAllBatchQueryCallbacks(): BatchQueryOptionsCb[];
1849
+ }
1850
+
1851
+ export declare type MergeExtArgs<TypeMap extends TypeMapDef, ExtArgs extends Record<any, any>, Args extends Record<any, any>> = ComputeDeep<ExtArgs & Args & AllModelsToStringIndex<TypeMap, Args, 'result'> & AllModelsToStringIndex<TypeMap, Args, 'model'>>;
1852
+
1853
+ export declare type Metric<T> = {
1854
+ key: string;
1855
+ value: T;
1856
+ labels: Record<string, string>;
1857
+ description: string;
1858
+ };
1859
+
1860
+ export declare type MetricHistogram = {
1861
+ buckets: MetricHistogramBucket[];
1862
+ sum: number;
1863
+ count: number;
1864
+ };
1865
+
1866
+ export declare type MetricHistogramBucket = [maxValue: number, count: number];
1867
+
1868
+ export declare type Metrics = {
1869
+ counters: Metric<number>[];
1870
+ gauges: Metric<number>[];
1871
+ histograms: Metric<MetricHistogram>[];
1872
+ };
1873
+
1874
+ export declare class MetricsClient {
1875
+ private _engine;
1876
+ constructor(engine: Engine);
1877
+ /**
1878
+ * Returns all metrics gathered up to this point in prometheus format.
1879
+ * Result of this call can be exposed directly to prometheus scraping endpoint
1880
+ *
1881
+ * @param options
1882
+ * @returns
1883
+ */
1884
+ prometheus(options?: MetricsOptions): Promise<string>;
1885
+ /**
1886
+ * Returns all metrics gathered up to this point in prometheus format.
1887
+ *
1888
+ * @param options
1889
+ * @returns
1890
+ */
1891
+ json(options?: MetricsOptions): Promise<Metrics>;
1892
+ }
1893
+
1894
+ declare type MetricsOptions = {
1895
+ /**
1896
+ * Labels to add to every metrics in key-value format
1897
+ */
1898
+ globalLabels?: Record<string, string>;
1899
+ };
1900
+
1901
+ declare type MetricsOptionsCommon = {
1902
+ globalLabels?: Record<string, string>;
1903
+ };
1904
+
1905
+ declare type MetricsOptionsJson = {
1906
+ format: 'json';
1907
+ } & MetricsOptionsCommon;
1908
+
1909
+ declare type MetricsOptionsPrometheus = {
1910
+ format: 'prometheus';
1911
+ } & MetricsOptionsCommon;
1912
+
1913
+ declare type MiddlewareArgsMapper<RequestArgs, MiddlewareArgs> = {
1914
+ requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs;
1915
+ middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs;
1916
+ };
1917
+
1918
+ declare class MiddlewareHandler<M extends Function> {
1919
+ private _middlewares;
1920
+ use(middleware: M): void;
1921
+ get(id: number): M | undefined;
1922
+ has(id: number): boolean;
1923
+ length(): number;
1924
+ }
1925
+
1926
+ export declare type ModelArg = {
1927
+ [MethodName in string]: unknown;
1928
+ };
1929
+
1930
+ export declare type ModelArgs = {
1931
+ model: {
1932
+ [ModelName in string]: ModelArg;
1933
+ };
1934
+ };
1935
+
1936
+ export declare type ModelKey<TypeMap extends TypeMapDef, M extends PropertyKey> = M extends keyof TypeMap['model'] ? M : Capitalize<M & string>;
1937
+
1938
+ export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise<any>;
1939
+
1940
+ export declare type ModelQueryOptionsCbArgs = {
1941
+ model: string;
1942
+ operation: string;
1943
+ args: JsArgs;
1944
+ query: (args: JsArgs) => Promise<unknown>;
1945
+ };
1946
+
1947
+ export declare type NameArgs = {
1948
+ name?: string;
1949
+ };
1950
+
1951
+ declare type NamespacedTypeMap<T> = {
1952
+ prisma: Record<string, T>;
1953
+ model: Record<string, T>;
1954
+ };
1955
+
1956
+ export declare type Narrow<A> = {
1957
+ [K in keyof A]: A[K] extends Function ? A[K] : Narrow<A[K]>;
1958
+ } | (A extends Narrowable ? A : never);
1959
+
1960
+ export declare type Narrowable = string | number | bigint | boolean | [];
1961
+
1962
+ export declare type NeverToUnknown<T> = [T] extends [never] ? unknown : T;
1963
+
1964
+ /**
1965
+ * Imitates `fetch` via `https` to only suit our needs, it does nothing more.
1966
+ * This is because we cannot bundle `node-fetch` as it uses many other Node.js
1967
+ * utilities, while also bloating our bundles. This approach is much leaner.
1968
+ * @param url
1969
+ * @param options
1970
+ * @returns
1971
+ */
1972
+ declare function nodeFetch(url: string, options?: RequestOptions_2): Promise<RequestResponse>;
1973
+
1974
+ declare class NodeHeaders {
1975
+ readonly headers: Map<string, string>;
1976
+ constructor(init?: Record<any, any>);
1977
+ append(name: string, value: string): void;
1978
+ delete(name: string): void;
1979
+ get(name: string): string | null;
1980
+ has(name: string): boolean;
1981
+ set(name: string, value: string): void;
1982
+ forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void;
1983
+ }
1984
+
1985
+ /**
1986
+ * @deprecated Please don´t rely on type checks to this error anymore.
1987
+ * This will become a regular `PrismaClientKnownRequestError` with code `P2025`
1988
+ * in the future major version of the client.
1989
+ * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`.
1990
+ */
1991
+ export declare class NotFoundError extends PrismaClientKnownRequestError {
1992
+ constructor(message: string, clientVersion: string);
1993
+ }
1994
+
1995
+ declare class NullTypesEnumValue extends ObjectEnumValue {
1996
+ _getNamespace(): string;
1997
+ }
1998
+
1999
+ /**
2000
+ * List of Prisma enums that must use unique objects instead of strings as their values.
2001
+ */
2002
+ export declare const objectEnumNames: string[];
2003
+
2004
+ /**
2005
+ * Base class for unique values of object-valued enums.
2006
+ */
2007
+ export declare abstract class ObjectEnumValue {
2008
+ constructor(arg?: symbol);
2009
+ abstract _getNamespace(): string;
2010
+ _getName(): string;
2011
+ toString(): string;
2012
+ }
2013
+
2014
+ export declare const objectEnumValues: {
2015
+ classes: {
2016
+ DbNull: typeof DbNull;
2017
+ JsonNull: typeof JsonNull;
2018
+ AnyNull: typeof AnyNull;
2019
+ };
2020
+ instances: {
2021
+ DbNull: DbNull;
2022
+ JsonNull: JsonNull;
2023
+ AnyNull: AnyNull;
2024
+ };
2025
+ };
2026
+
2027
+ declare type Omit_2<T, K extends string | number | symbol> = {
2028
+ [P in keyof T as P extends K ? never : P]: T[P];
2029
+ };
2030
+ export { Omit_2 as Omit }
2031
+
2032
+ export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw';
2033
+
2034
+ export declare type OperationPayload = {
2035
+ scalars: {
2036
+ [ScalarName in string]: unknown;
2037
+ };
2038
+ objects: {
2039
+ [ObjectName in string]: unknown;
2040
+ };
2041
+ composites: {
2042
+ [CompositeName in string]: unknown;
2043
+ };
2044
+ };
2045
+
2046
+ export declare type Optional<O, K extends keyof any = keyof O> = {
2047
+ [P in K & keyof O]?: O[P];
2048
+ } & {
2049
+ [P in Exclude<keyof O, K>]: O[P];
2050
+ };
2051
+
2052
+ export declare type OptionalFlat<T> = {
2053
+ [K in keyof T]?: T[K];
2054
+ };
2055
+
2056
+ export declare type OptionalKeys<O> = {
2057
+ [K in keyof O]-?: {} extends Pick_2<O, K> ? K : never;
2058
+ }[keyof O];
2059
+
2060
+ declare type Options = {
2061
+ clientVersion: string;
2062
+ };
2063
+
2064
+ /**
2065
+ * maxWait ?= 2000
2066
+ * timeout ?= 5000
2067
+ */
2068
+ declare type Options_2 = {
2069
+ maxWait?: number;
2070
+ timeout?: number;
2071
+ isolationLevel?: IsolationLevel;
2072
+ };
2073
+
2074
+ export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
2075
+ 0: {
2076
+ 0: 0;
2077
+ 1: 1;
2078
+ };
2079
+ 1: {
2080
+ 0: 1;
2081
+ 1: 1;
2082
+ };
2083
+ }[A][B];
2084
+
2085
+ export declare type PatchFlat<O1, O2> = O1 & Omit_2<O2, keyof O1>;
2086
+
2087
+ export declare type Path<O, P, Default = never> = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path<O[K], R> : Default : O : never;
2088
+
2089
+ export declare type Payload<T, F extends Operation = never> = T extends {
2090
+ [K: symbol]: {
2091
+ types: {
2092
+ payload: any;
2093
+ };
2094
+ };
2095
+ } ? T[symbol]['types']['payload'] : any;
2096
+
2097
+ export declare type PayloadToResult<P, O extends Record_2<any, any> = RenameAndNestPayloadKeys<P>> = {
2098
+ [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult<O[K][K][number]>[] : O[K][K] extends object ? PayloadToResult<O[K][K]> : O[K][K];
2099
+ };
2100
+
2101
+ declare type Pick_2<T, K extends string | number | symbol> = {
2102
+ [P in keyof T as P extends K ? P : never]: T[P];
2103
+ };
2104
+ export { Pick_2 as Pick }
2105
+
2106
+ export declare class PrismaClientInitializationError extends Error {
2107
+ clientVersion: string;
2108
+ errorCode?: string;
2109
+ retryable?: boolean;
2110
+ constructor(message: string, clientVersion: string, errorCode?: string);
2111
+ get [Symbol.toStringTag](): string;
2112
+ }
2113
+
2114
+ export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex {
2115
+ code: string;
2116
+ meta?: Record<string, unknown>;
2117
+ clientVersion: string;
2118
+ batchRequestIdx?: number;
2119
+ constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams);
2120
+ get [Symbol.toStringTag](): string;
2121
+ }
2122
+
2123
+ export declare type PrismaClientOptions = {
2124
+ /**
2125
+ * Overwrites the primary datasource url from your schema.prisma file
2126
+ */
2127
+ datasourceUrl?: string;
2128
+ /**
2129
+ * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale.
2130
+ */
2131
+ adapter?: DriverAdapter;
2132
+ /**
2133
+ * Overwrites the datasource url from your schema.prisma file
2134
+ */
2135
+ datasources?: Datasources;
2136
+ /**
2137
+ * @default "colorless"
2138
+ */
2139
+ errorFormat?: ErrorFormat;
2140
+ /**
2141
+ * @example
2142
+ * \`\`\`
2143
+ * // Defaults to stdout
2144
+ * log: ['query', 'info', 'warn']
2145
+ *
2146
+ * // Emit as events
2147
+ * log: [
2148
+ * { emit: 'stdout', level: 'query' },
2149
+ * { emit: 'stdout', level: 'info' },
2150
+ * { emit: 'stdout', level: 'warn' }
2151
+ * ]
2152
+ * \`\`\`
2153
+ * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
2154
+ */
2155
+ log?: Array<LogLevel | LogDefinition>;
2156
+ /**
2157
+ * @internal
2158
+ * You probably don't want to use this. \`__internal\` is used by internal tooling.
2159
+ */
2160
+ __internal?: {
2161
+ debug?: boolean;
2162
+ engine?: {
2163
+ cwd?: string;
2164
+ binaryPath?: string;
2165
+ endpoint?: string;
2166
+ allowTriggerPanic?: boolean;
2167
+ };
2168
+ };
2169
+ };
2170
+
2171
+ export declare class PrismaClientRustPanicError extends Error {
2172
+ clientVersion: string;
2173
+ constructor(message: string, clientVersion: string);
2174
+ get [Symbol.toStringTag](): string;
2175
+ }
2176
+
2177
+ export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex {
2178
+ clientVersion: string;
2179
+ batchRequestIdx?: number;
2180
+ constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams);
2181
+ get [Symbol.toStringTag](): string;
2182
+ }
2183
+
2184
+ export declare class PrismaClientValidationError extends Error {
2185
+ name: string;
2186
+ clientVersion: string;
2187
+ constructor(message: string, { clientVersion }: Options);
2188
+ get [Symbol.toStringTag](): string;
2189
+ }
2190
+
2191
+ export declare interface PrismaPromise<T> extends Promise<T> {
2192
+ [Symbol.toStringTag]: 'PrismaPromise';
2193
+ }
2194
+
2195
+ /**
2196
+ * Prisma's `Promise` that is backwards-compatible. All additions on top of the
2197
+ * original `Promise` are optional so that it can be backwards-compatible.
2198
+ * @see [[createPrismaPromise]]
2199
+ */
2200
+ declare interface PrismaPromise_2<A> extends Promise<A> {
2201
+ /**
2202
+ * Extension of the original `.then` function
2203
+ * @param onfulfilled same as regular promises
2204
+ * @param onrejected same as regular promises
2205
+ * @param transaction transaction options
2206
+ */
2207
+ then<R1 = A, R2 = never>(onfulfilled?: (value: A) => R1 | PromiseLike<R1>, onrejected?: (error: unknown) => R2 | PromiseLike<R2>, transaction?: PrismaPromiseTransaction): Promise<R1 | R2>;
2208
+ /**
2209
+ * Extension of the original `.catch` function
2210
+ * @param onrejected same as regular promises
2211
+ * @param transaction transaction options
2212
+ */
2213
+ catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<A | R>;
2214
+ /**
2215
+ * Extension of the original `.finally` function
2216
+ * @param onfinally same as regular promises
2217
+ * @param transaction transaction options
2218
+ */
2219
+ finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<A>;
2220
+ /**
2221
+ * Called when executing a batch of regular tx
2222
+ * @param transaction transaction options for batch tx
2223
+ */
2224
+ requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike<unknown>;
2225
+ }
2226
+
2227
+ declare type PrismaPromiseBatchTransaction = {
2228
+ kind: 'batch';
2229
+ id: number;
2230
+ isolationLevel?: IsolationLevel;
2231
+ index: number;
2232
+ lock: PromiseLike<void>;
2233
+ };
2234
+
2235
+ declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2<unknown>;
2236
+
2237
+ /**
2238
+ * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which
2239
+ * is essentially a proxy for `Promise`. All the transaction-compatible client
2240
+ * methods return one, this allows for pre-preparing queries without executing
2241
+ * them until `.then` is called. It's the foundation of Prisma's query batching.
2242
+ * @param callback that will be wrapped within our promise implementation
2243
+ * @see [[PrismaPromise]]
2244
+ * @returns
2245
+ */
2246
+ declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2<unknown>;
2247
+
2248
+ declare type PrismaPromiseInteractiveTransaction<PayloadType = unknown> = {
2249
+ kind: 'itx';
2250
+ id: string;
2251
+ payload: PayloadType;
2252
+ };
2253
+
2254
+ declare type PrismaPromiseTransaction<PayloadType = unknown> = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction<PayloadType>;
2255
+
2256
+ declare namespace Public {
2257
+ export {
2258
+ validator
2259
+ }
2260
+ }
2261
+ export { Public }
2262
+
2263
+ declare namespace Public_2 {
2264
+ export {
2265
+ Args,
2266
+ Result,
2267
+ Payload,
2268
+ PrismaPromise,
2269
+ Operation,
2270
+ Exact
2271
+ }
2272
+ }
2273
+
2274
+ declare type Query = {
2275
+ sql: string;
2276
+ args: Array<unknown>;
2277
+ };
2278
+
2279
+ declare interface Queryable {
2280
+ readonly flavour: 'mysql' | 'postgres' | 'sqlite';
2281
+ /**
2282
+ * Execute a query given as SQL, interpolating the given parameters,
2283
+ * and returning the type-aware result set of the query.
2284
+ *
2285
+ * This is the preferred way of executing `SELECT` queries.
2286
+ */
2287
+ queryRaw(params: Query): Promise<Result_3<ResultSet>>;
2288
+ /**
2289
+ * Execute a query given as SQL, interpolating the given parameters,
2290
+ * and returning the number of affected rows.
2291
+ *
2292
+ * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries,
2293
+ * as well as transactional queries.
2294
+ */
2295
+ executeRaw(params: Query): Promise<Result_3<number>>;
2296
+ }
2297
+
2298
+ declare type QueryEngineResult<T> = {
2299
+ data: T;
2300
+ elapsed: number;
2301
+ };
2302
+
2303
+ declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise<unknown>) => Promise<unknown>;
2304
+
2305
+ declare type QueryMiddlewareParams = {
2306
+ /** The model this is executed on */
2307
+ model?: string;
2308
+ /** The action that is being handled */
2309
+ action: Action;
2310
+ /** TODO what is this */
2311
+ dataPath: string[];
2312
+ /** TODO what is this */
2313
+ runInTransaction: boolean;
2314
+ args?: UserArgs_2;
2315
+ };
2316
+
2317
+ export declare type QueryOptions = {
2318
+ query: {
2319
+ [ModelName in string]: {
2320
+ [ModelAction in string]: ModelQueryOptionsCb;
2321
+ } | QueryOptionsCb;
2322
+ };
2323
+ };
2324
+
2325
+ export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise<any>;
2326
+
2327
+ export declare type QueryOptionsCbArgs = {
2328
+ model?: string;
2329
+ operation: string;
2330
+ args: JsArgs | RawQueryArgs;
2331
+ query: (args: JsArgs | RawQueryArgs) => Promise<unknown>;
2332
+ };
2333
+
2334
+ /**
2335
+ * Create raw SQL statement.
2336
+ */
2337
+ export declare function raw(value: string): Sql;
2338
+
2339
+ export declare type RawParameters = {
2340
+ __prismaRawParameters__: true;
2341
+ values: string;
2342
+ };
2343
+
2344
+ export declare type RawQueryArgs = Sql | [query: string, ...values: RawValue[]];
2345
+
2346
+ /**
2347
+ * Supported value or SQL instance.
2348
+ */
2349
+ export declare type RawValue = Value | Sql;
2350
+
2351
+ export declare type ReadonlyDeep<T> = {
2352
+ readonly [K in keyof T]: ReadonlyDeep<T[K]>;
2353
+ };
2354
+
2355
+ declare type Record_2<T extends string | number | symbol, U> = {
2356
+ [P in T]: U;
2357
+ };
2358
+ export { Record_2 as Record }
2359
+
2360
+ export declare type RenameAndNestPayloadKeys<P> = {
2361
+ [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K];
2362
+ };
2363
+
2364
+ declare type RequestBatchOptions<InteractiveTransactionPayload> = {
2365
+ transaction?: TransactionOptions<InteractiveTransactionPayload>;
2366
+ traceparent?: string;
2367
+ numTry?: number;
2368
+ containsWrite: boolean;
2369
+ customDataProxyFetch?: (fetch: Fetch) => Fetch;
2370
+ };
2371
+
2372
+ declare class RequestHandler {
2373
+ client: Client;
2374
+ dataloader: DataLoader<RequestParams>;
2375
+ private logEmitter?;
2376
+ constructor(client: Client, logEmitter?: EventEmitter);
2377
+ request(params: RequestParams): Promise<any>;
2378
+ mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult<any>): any;
2379
+ /**
2380
+ * Handles the error and logs it, logging the error is done synchronously waiting for the event
2381
+ * handlers to finish.
2382
+ */
2383
+ handleAndLogRequestError(params: HandleErrorParams): never;
2384
+ handleRequestError({ error, clientMethod, callsite, transaction, args }: HandleErrorParams): never;
2385
+ sanitizeMessage(message: any): any;
2386
+ unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any;
2387
+ get [Symbol.toStringTag](): string;
2388
+ }
2389
+
2390
+ declare type RequestOptions<InteractiveTransactionPayload> = {
2391
+ traceparent?: string;
2392
+ numTry?: number;
2393
+ interactiveTransaction?: InteractiveTransactionOptions<InteractiveTransactionPayload>;
2394
+ isWrite: boolean;
2395
+ customDataProxyFetch?: (fetch: Fetch) => Fetch;
2396
+ };
2397
+
2398
+ declare type RequestOptions_2 = {
2399
+ method?: string;
2400
+ headers?: Record<string, string>;
2401
+ body?: string;
2402
+ };
2403
+
2404
+ declare type RequestParams = {
2405
+ modelName?: string;
2406
+ action: Action;
2407
+ protocolQuery: JsonQuery;
2408
+ dataPath: string[];
2409
+ clientMethod: string;
2410
+ callsite?: CallSite;
2411
+ transaction?: PrismaPromiseTransaction;
2412
+ extensions: MergedExtensionsList;
2413
+ args?: any;
2414
+ headers?: Record<string, string>;
2415
+ unpacker?: Unpacker;
2416
+ otelParentCtx?: Context;
2417
+ otelChildCtx?: Context;
2418
+ customDataProxyFetch?: (fetch: Fetch) => Fetch;
2419
+ };
2420
+
2421
+ declare type RequestResponse = {
2422
+ ok: boolean;
2423
+ url: string;
2424
+ statusText?: string;
2425
+ status: number;
2426
+ headers: NodeHeaders;
2427
+ text: () => Promise<string>;
2428
+ json: () => Promise<any>;
2429
+ };
2430
+
2431
+ declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions;
2432
+ export { RequiredExtensionArgs }
2433
+ export { RequiredExtensionArgs as UserArgs }
2434
+
2435
+ export declare type RequiredKeys<O> = {
2436
+ [K in keyof O]-?: {} extends Pick_2<O, K> ? never : K;
2437
+ }[keyof O];
2438
+
2439
+ export declare type Result<T, A, F extends Operation> = T extends {
2440
+ [K: symbol]: {
2441
+ types: {
2442
+ payload: any;
2443
+ };
2444
+ };
2445
+ } ? GetResult<T[symbol]['types']['payload'], A, F> : GetResult<{
2446
+ composites: {};
2447
+ objects: {};
2448
+ scalars: {};
2449
+ }, {}, F>;
2450
+
2451
+ export declare type Result_2<T, A, F extends Operation> = Result<T, A, F>;
2452
+
2453
+ declare type Result_3<T> = {
2454
+ map<U>(fn: (value: T) => U): Result_3<U>;
2455
+ flatMap<U>(fn: (value: T) => Result_3<U>): Result_3<U>;
2456
+ } & ({
2457
+ readonly ok: true;
2458
+ readonly value: T;
2459
+ } | {
2460
+ readonly ok: false;
2461
+ readonly error: Error_2;
2462
+ });
2463
+
2464
+ declare namespace Result_4 {
2465
+ export {
2466
+ Operation,
2467
+ FluentOperation,
2468
+ Count,
2469
+ GetFindResult,
2470
+ SelectablePayloadFields,
2471
+ SelectField,
2472
+ DefaultSelection,
2473
+ UnwrapPayload,
2474
+ GetCountResult,
2475
+ Aggregate,
2476
+ GetAggregateResult,
2477
+ GetBatchResult,
2478
+ GetGroupByResult,
2479
+ GetResult
2480
+ }
2481
+ }
2482
+
2483
+ export declare type ResultArg = {
2484
+ [FieldName in string]: ResultFieldDefinition;
2485
+ };
2486
+
2487
+ export declare type ResultArgs = {
2488
+ result: {
2489
+ [ModelName in string]: ResultArg;
2490
+ };
2491
+ };
2492
+
2493
+ export declare type ResultArgsFieldCompute = (model: any) => unknown;
2494
+
2495
+ export declare type ResultFieldDefinition = {
2496
+ needs?: {
2497
+ [FieldName in string]: boolean;
2498
+ };
2499
+ compute: ResultArgsFieldCompute;
2500
+ };
2501
+
2502
+ declare interface ResultSet {
2503
+ /**
2504
+ * List of column types appearing in a database query, in the same order as `columnNames`.
2505
+ * They are used within the Query Engine to convert values from JS to Quaint values.
2506
+ */
2507
+ columnTypes: Array<ColumnType>;
2508
+ /**
2509
+ * List of column names appearing in a database query, in the same order as `columnTypes`.
2510
+ */
2511
+ columnNames: Array<string>;
2512
+ /**
2513
+ * List of rows retrieved from a database query.
2514
+ * Each row is a list of values, whose length matches `columnNames` and `columnTypes`.
2515
+ */
2516
+ rows: Array<Array<unknown>>;
2517
+ /**
2518
+ * The last ID of an `INSERT` statement, if any.
2519
+ * This is required for `AUTO_INCREMENT` columns in MySQL and SQLite-flavoured databases.
2520
+ */
2521
+ lastInsertId?: string;
2522
+ }
2523
+
2524
+ export declare type Return<T> = T extends (...args: any[]) => infer R ? R : T;
2525
+
2526
+ declare type RuntimeDataModel = {
2527
+ readonly models: Record<string, RuntimeModel>;
2528
+ readonly enums: Record<string, RuntimeEnum>;
2529
+ readonly types: Record<string, RuntimeModel>;
2530
+ };
2531
+
2532
+ declare type RuntimeEnum = Omit<DMMF.DatamodelEnum, 'name'>;
2533
+
2534
+ declare type RuntimeModel = Omit<DMMF.Model, 'name'>;
2535
+
2536
+ export declare type Select<T, U> = T extends U ? T : never;
2537
+
2538
+ export declare type SelectablePayloadFields<K extends PropertyKey, O> = {
2539
+ objects: {
2540
+ [k in K]: O;
2541
+ };
2542
+ } | {
2543
+ composites: {
2544
+ [k in K]: O;
2545
+ };
2546
+ };
2547
+
2548
+ export declare type SelectField<P extends SelectablePayloadFields<any, any>, K extends PropertyKey> = P extends {
2549
+ objects: Record<K, any>;
2550
+ } ? P['objects'][K] : P extends {
2551
+ composites: Record<K, any>;
2552
+ } ? P['composites'][K] : never;
2553
+
2554
+ declare type Selection_2 = Record<string, boolean | JsArgs>;
2555
+ export { Selection_2 as Selection }
2556
+
2557
+ /**
2558
+ * An interface that represents a span. A span represents a single operation
2559
+ * within a trace. Examples of span might include remote procedure calls or a
2560
+ * in-process function calls to sub-components. A Trace has a single, top-level
2561
+ * "root" Span that in turn may have zero or more child Spans, which in turn
2562
+ * may have children.
2563
+ *
2564
+ * Spans are created by the {@link Tracer.startSpan} method.
2565
+ */
2566
+ declare interface Span {
2567
+ /**
2568
+ * Returns the {@link SpanContext} object associated with this Span.
2569
+ *
2570
+ * Get an immutable, serializable identifier for this span that can be used
2571
+ * to create new child spans. Returned SpanContext is usable even after the
2572
+ * span ends.
2573
+ *
2574
+ * @returns the SpanContext object associated with this Span.
2575
+ */
2576
+ spanContext(): SpanContext;
2577
+ /**
2578
+ * Sets an attribute to the span.
2579
+ *
2580
+ * Sets a single Attribute with the key and value passed as arguments.
2581
+ *
2582
+ * @param key the key for this attribute.
2583
+ * @param value the value for this attribute. Setting a value null or
2584
+ * undefined is invalid and will result in undefined behavior.
2585
+ */
2586
+ setAttribute(key: string, value: SpanAttributeValue): this;
2587
+ /**
2588
+ * Sets attributes to the span.
2589
+ *
2590
+ * @param attributes the attributes that will be added.
2591
+ * null or undefined attribute values
2592
+ * are invalid and will result in undefined behavior.
2593
+ */
2594
+ setAttributes(attributes: SpanAttributes): this;
2595
+ /**
2596
+ * Adds an event to the Span.
2597
+ *
2598
+ * @param name the name of the event.
2599
+ * @param [attributesOrStartTime] the attributes that will be added; these are
2600
+ * associated with this event. Can be also a start time
2601
+ * if type is {@type TimeInput} and 3rd param is undefined
2602
+ * @param [startTime] start time of the event.
2603
+ */
2604
+ addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this;
2605
+ /**
2606
+ * Sets a status to the span. If used, this will override the default Span
2607
+ * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value
2608
+ * of previous calls to SetStatus on the Span.
2609
+ *
2610
+ * @param status the SpanStatus to set.
2611
+ */
2612
+ setStatus(status: SpanStatus): this;
2613
+ /**
2614
+ * Updates the Span name.
2615
+ *
2616
+ * This will override the name provided via {@link Tracer.startSpan}.
2617
+ *
2618
+ * Upon this update, any sampling behavior based on Span name will depend on
2619
+ * the implementation.
2620
+ *
2621
+ * @param name the Span name.
2622
+ */
2623
+ updateName(name: string): this;
2624
+ /**
2625
+ * Marks the end of Span execution.
2626
+ *
2627
+ * Call to End of a Span MUST not have any effects on child spans. Those may
2628
+ * still be running and can be ended later.
2629
+ *
2630
+ * Do not return `this`. The Span generally should not be used after it
2631
+ * is ended so chaining is not desired in this context.
2632
+ *
2633
+ * @param [endTime] the time to set as Span's end time. If not provided,
2634
+ * use the current time as the span's end time.
2635
+ */
2636
+ end(endTime?: TimeInput): void;
2637
+ /**
2638
+ * Returns the flag whether this span will be recorded.
2639
+ *
2640
+ * @returns true if this Span is active and recording information like events
2641
+ * with the `AddEvent` operation and attributes using `setAttributes`.
2642
+ */
2643
+ isRecording(): boolean;
2644
+ /**
2645
+ * Sets exception as a span event
2646
+ * @param exception the exception the only accepted values are string or Error
2647
+ * @param [time] the time to set as Span's event time. If not provided,
2648
+ * use the current time.
2649
+ */
2650
+ recordException(exception: Exception, time?: TimeInput): void;
2651
+ }
2652
+
2653
+ /**
2654
+ * @deprecated please use {@link Attributes}
2655
+ */
2656
+ declare type SpanAttributes = Attributes;
2657
+
2658
+ /**
2659
+ * @deprecated please use {@link AttributeValue}
2660
+ */
2661
+ declare type SpanAttributeValue = AttributeValue;
2662
+
2663
+ declare type SpanCallback<R> = (span?: Span, context?: Context) => R;
2664
+
2665
+ /**
2666
+ * A SpanContext represents the portion of a {@link Span} which must be
2667
+ * serialized and propagated along side of a {@link Baggage}.
2668
+ */
2669
+ declare interface SpanContext {
2670
+ /**
2671
+ * The ID of the trace that this span belongs to. It is worldwide unique
2672
+ * with practically sufficient probability by being made as 16 randomly
2673
+ * generated bytes, encoded as a 32 lowercase hex characters corresponding to
2674
+ * 128 bits.
2675
+ */
2676
+ traceId: string;
2677
+ /**
2678
+ * The ID of the Span. It is globally unique with practically sufficient
2679
+ * probability by being made as 8 randomly generated bytes, encoded as a 16
2680
+ * lowercase hex characters corresponding to 64 bits.
2681
+ */
2682
+ spanId: string;
2683
+ /**
2684
+ * Only true if the SpanContext was propagated from a remote parent.
2685
+ */
2686
+ isRemote?: boolean;
2687
+ /**
2688
+ * Trace flags to propagate.
2689
+ *
2690
+ * It is represented as 1 byte (bitmap). Bit to represent whether trace is
2691
+ * sampled or not. When set, the least significant bit documents that the
2692
+ * caller may have recorded trace data. A caller who does not record trace
2693
+ * data out-of-band leaves this flag unset.
2694
+ *
2695
+ * see {@link TraceFlags} for valid flag values.
2696
+ */
2697
+ traceFlags: number;
2698
+ /**
2699
+ * Tracing-system-specific info to propagate.
2700
+ *
2701
+ * The tracestate field value is a `list` as defined below. The `list` is a
2702
+ * series of `list-members` separated by commas `,`, and a list-member is a
2703
+ * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
2704
+ * surrounding `list-members` are ignored. There can be a maximum of 32
2705
+ * `list-members` in a `list`.
2706
+ * More Info: https://www.w3.org/TR/trace-context/#tracestate-field
2707
+ *
2708
+ * Examples:
2709
+ * Single tracing system (generic format):
2710
+ * tracestate: rojo=00f067aa0ba902b7
2711
+ * Multiple tracing systems (with different formatting):
2712
+ * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE
2713
+ */
2714
+ traceState?: TraceState;
2715
+ }
2716
+
2717
+ declare enum SpanKind {
2718
+ /** Default value. Indicates that the span is used internally. */
2719
+ INTERNAL = 0,
2720
+ /**
2721
+ * Indicates that the span covers server-side handling of an RPC or other
2722
+ * remote request.
2723
+ */
2724
+ SERVER = 1,
2725
+ /**
2726
+ * Indicates that the span covers the client-side wrapper around an RPC or
2727
+ * other remote request.
2728
+ */
2729
+ CLIENT = 2,
2730
+ /**
2731
+ * Indicates that the span describes producer sending a message to a
2732
+ * broker. Unlike client and server, there is no direct critical path latency
2733
+ * relationship between producer and consumer spans.
2734
+ */
2735
+ PRODUCER = 3,
2736
+ /**
2737
+ * Indicates that the span describes consumer receiving a message from a
2738
+ * broker. Unlike client and server, there is no direct critical path latency
2739
+ * relationship between producer and consumer spans.
2740
+ */
2741
+ CONSUMER = 4
2742
+ }
2743
+
2744
+ /**
2745
+ * Options needed for span creation
2746
+ */
2747
+ declare interface SpanOptions {
2748
+ /**
2749
+ * The SpanKind of a span
2750
+ * @default {@link SpanKind.INTERNAL}
2751
+ */
2752
+ kind?: SpanKind;
2753
+ /** A span's attributes */
2754
+ attributes?: SpanAttributes;
2755
+ /** {@link Link}s span to other spans */
2756
+ links?: Link[];
2757
+ /** A manually specified start time for the created `Span` object. */
2758
+ startTime?: TimeInput;
2759
+ /** The new span should be a root span. (Ignore parent from context). */
2760
+ root?: boolean;
2761
+ }
2762
+
2763
+ declare interface SpanStatus {
2764
+ /** The status code of this message. */
2765
+ code: SpanStatusCode;
2766
+ /** A developer-facing error message. */
2767
+ message?: string;
2768
+ }
2769
+
2770
+ /**
2771
+ * An enumeration of status codes.
2772
+ */
2773
+ declare enum SpanStatusCode {
2774
+ /**
2775
+ * The default status.
2776
+ */
2777
+ UNSET = 0,
2778
+ /**
2779
+ * The operation has been validated by an Application developer or
2780
+ * Operator to have completed successfully.
2781
+ */
2782
+ OK = 1,
2783
+ /**
2784
+ * The operation contains an error.
2785
+ */
2786
+ ERROR = 2
2787
+ }
2788
+
2789
+ /**
2790
+ * A SQL instance can be nested within each other to build SQL strings.
2791
+ */
2792
+ export declare class Sql {
2793
+ readonly values: Value[];
2794
+ readonly strings: string[];
2795
+ constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]);
2796
+ get text(): string;
2797
+ get sql(): string;
2798
+ inspect(): {
2799
+ text: string;
2800
+ sql: string;
2801
+ values: unknown[];
2802
+ };
2803
+ }
2804
+
2805
+ /**
2806
+ * Create a SQL object from a template string.
2807
+ */
2808
+ export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql;
2809
+
2810
+ /**
2811
+ * Defines TimeInput.
2812
+ *
2813
+ * hrtime, epoch milliseconds, performance.now() or Date
2814
+ */
2815
+ declare type TimeInput = HrTime | number | Date;
2816
+
2817
+ export declare type ToTuple<T> = T extends any[] ? T : [T];
2818
+
2819
+ declare interface TraceState {
2820
+ /**
2821
+ * Create a new TraceState which inherits from this TraceState and has the
2822
+ * given key set.
2823
+ * The new entry will always be added in the front of the list of states.
2824
+ *
2825
+ * @param key key of the TraceState entry.
2826
+ * @param value value of the TraceState entry.
2827
+ */
2828
+ set(key: string, value: string): TraceState;
2829
+ /**
2830
+ * Return a new TraceState which inherits from this TraceState but does not
2831
+ * contain the given key.
2832
+ *
2833
+ * @param key the key for the TraceState entry to be removed.
2834
+ */
2835
+ unset(key: string): TraceState;
2836
+ /**
2837
+ * Returns the value to which the specified key is mapped, or `undefined` if
2838
+ * this map contains no mapping for the key.
2839
+ *
2840
+ * @param key with which the specified value is to be associated.
2841
+ * @returns the value to which the specified key is mapped, or `undefined` if
2842
+ * this map contains no mapping for the key.
2843
+ */
2844
+ get(key: string): string | undefined;
2845
+ /**
2846
+ * Serializes the TraceState to a `list` as defined below. The `list` is a
2847
+ * series of `list-members` separated by commas `,`, and a list-member is a
2848
+ * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
2849
+ * surrounding `list-members` are ignored. There can be a maximum of 32
2850
+ * `list-members` in a `list`.
2851
+ *
2852
+ * @returns the serialized string.
2853
+ */
2854
+ serialize(): string;
2855
+ }
2856
+
2857
+ declare interface TracingHelper {
2858
+ isEnabled(): boolean;
2859
+ getTraceParent(context?: Context): string;
2860
+ createEngineSpan(engineSpanEvent: EngineSpanEvent): void;
2861
+ getActiveContext(): Context | undefined;
2862
+ runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
2863
+ }
2864
+
2865
+ declare namespace Transaction {
2866
+ export {
2867
+ IsolationLevel,
2868
+ Options_2 as Options,
2869
+ InteractiveTransactionInfo,
2870
+ TransactionHeaders
2871
+ }
2872
+ }
2873
+
2874
+ declare interface Transaction_2 extends Queryable {
2875
+ /**
2876
+ * Transaction options.
2877
+ */
2878
+ readonly options: TransactionOptions_2;
2879
+ /**
2880
+ * Commit the transaction.
2881
+ */
2882
+ commit(): Promise<Result_3<void>>;
2883
+ /**
2884
+ * Rolls back the transaction.
2885
+ */
2886
+ rollback(): Promise<Result_3<void>>;
2887
+ /**
2888
+ * Discards and closes the transaction which may or may not have been committed or rolled back.
2889
+ * This operation must be synchronous. If the implementation requires calling creating new
2890
+ * asynchronous tasks on the event loop, the driver is responsible for handling the errors
2891
+ * appropriately to ensure they don't crash the application.
2892
+ */
2893
+ dispose(): Result_3<void>;
2894
+ }
2895
+
2896
+ declare type TransactionHeaders = {
2897
+ traceparent?: string;
2898
+ };
2899
+
2900
+ declare type TransactionOptions<InteractiveTransactionPayload> = {
2901
+ kind: 'itx';
2902
+ options: InteractiveTransactionOptions<InteractiveTransactionPayload>;
2903
+ } | {
2904
+ kind: 'batch';
2905
+ options: BatchTransactionOptions;
2906
+ };
2907
+
2908
+ declare type TransactionOptions_2 = {
2909
+ usePhantomQuery: boolean;
2910
+ };
2911
+
2912
+ export declare type TypeMapCbDef = Fn<{
2913
+ extArgs: InternalArgs;
2914
+ }, TypeMapDef>;
2915
+
2916
+ /** Shared */
2917
+ export declare type TypeMapDef = Record<any, any>;
2918
+
2919
+ declare namespace Types {
2920
+ export {
2921
+ Result_4 as Result,
2922
+ Extensions_2 as Extensions,
2923
+ Utils,
2924
+ Public_2 as Public,
2925
+ OperationPayload as Payload
2926
+ }
2927
+ }
2928
+ export { Types }
2929
+
2930
+ declare type UnknownErrorParams = {
2931
+ clientVersion: string;
2932
+ batchRequestIdx?: number;
2933
+ };
2934
+
2935
+ declare type Unpacker = (data: any) => any;
2936
+
2937
+ export declare type UnwrapPayload<P> = {} extends P ? unknown : {
2938
+ [K in keyof P]: P[K] extends {
2939
+ scalars: infer S;
2940
+ composites: infer C;
2941
+ }[] ? Array<S & UnwrapPayload<C>> : P[K] extends {
2942
+ scalars: infer S;
2943
+ composites: infer C;
2944
+ } | null ? S & UnwrapPayload<C> | Select<P[K], null> : never;
2945
+ };
2946
+
2947
+ export declare type UnwrapPromise<P> = P extends Promise<infer R> ? R : P;
2948
+
2949
+ export declare type UnwrapTuple<Tuple extends readonly unknown[]> = {
2950
+ [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise<infer X> ? X : UnwrapPromise<Tuple[K]> : UnwrapPromise<Tuple[K]>;
2951
+ };
2952
+
2953
+ /**
2954
+ * Input that flows from the user into the Client.
2955
+ */
2956
+ declare type UserArgs_2 = any;
2957
+
2958
+ declare namespace Utils {
2959
+ export {
2960
+ EmptyToUnknown,
2961
+ NeverToUnknown,
2962
+ PatchFlat,
2963
+ Omit_2 as Omit,
2964
+ Pick_2 as Pick,
2965
+ ComputeDeep,
2966
+ Compute,
2967
+ OptionalFlat,
2968
+ ReadonlyDeep,
2969
+ Narrowable,
2970
+ Narrow,
2971
+ Exact,
2972
+ Cast,
2973
+ JsonObject,
2974
+ JsonArray,
2975
+ JsonValue,
2976
+ Record_2 as Record,
2977
+ UnwrapPromise,
2978
+ UnwrapTuple,
2979
+ Path,
2980
+ Fn,
2981
+ Call,
2982
+ RequiredKeys,
2983
+ OptionalKeys,
2984
+ Optional,
2985
+ Return,
2986
+ ToTuple,
2987
+ RenameAndNestPayloadKeys,
2988
+ PayloadToResult,
2989
+ Select,
2990
+ Equals,
2991
+ Or,
2992
+ JsPromise
2993
+ }
2994
+ }
2995
+
2996
+ declare function validator<V>(): <S>(select: Exact<S, V>) => S;
2997
+
2998
+ declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): <S>(select: Exact<S, Args<C[M], O>>) => S;
2999
+
3000
+ declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation, P extends keyof Args<C[M], O>>(client: C, model: M, operation: O, prop: P): <S>(select: Exact<S, Args<C[M], O>[P]>) => S;
3001
+
3002
+ /**
3003
+ * Values supported by SQL engine.
3004
+ */
3005
+ export declare type Value = unknown;
3006
+
3007
+ export declare function warnEnvConflicts(envPaths: any): void;
3008
+
3009
+ export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void;
3010
+
3011
+ export { }