prisma 5.20.0-dev.2 → 5.20.0-dev.21

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.
@@ -121,6 +121,13 @@ declare interface BinaryTargetsEnvValue {
121
121
  native?: boolean;
122
122
  }
123
123
 
124
+ declare interface BoundDriverAdapter extends Queryable, WithTransaction {
125
+ /**
126
+ * Optional method that returns extra connection info
127
+ */
128
+ getConnectionInfo?(): Result_4<ConnectionInfo>;
129
+ }
130
+
124
131
  export declare type Call<F extends Fn, P> = (F & {
125
132
  params: P;
126
133
  })['returns'];
@@ -868,11 +875,7 @@ export declare namespace DMMF {
868
875
  }
869
876
  }
870
877
 
871
- export declare interface DriverAdapter extends Queryable {
872
- /**
873
- * Starts new transaction.
874
- */
875
- startTransaction(): Promise<Result_4<Transaction>>;
878
+ export declare interface DriverAdapter extends Queryable, WithTransactionDeprecated, WithTransaction {
876
879
  /**
877
880
  * Optional method that returns extra connection info
878
881
  */
@@ -1184,7 +1187,7 @@ declare type Error_2 = {
1184
1187
  message: string;
1185
1188
  };
1186
1189
 
1187
- declare interface ErrorCapturingDriverAdapter extends DriverAdapter {
1190
+ declare interface ErrorCapturingDriverAdapter extends BoundDriverAdapter {
1188
1191
  readonly errorRegistry: ErrorRegistry;
1189
1192
  }
1190
1193
 
@@ -1298,6 +1301,8 @@ declare namespace Extensions_2 {
1298
1301
  export {
1299
1302
  InternalArgs,
1300
1303
  DefaultArgs,
1304
+ GetPayloadResultExtensionKeys,
1305
+ GetPayloadResultExtensionObject,
1301
1306
  GetPayloadResult,
1302
1307
  GetSelect,
1303
1308
  GetOmit,
@@ -1404,7 +1409,7 @@ export declare type GetFindResult<P extends OperationPayload, A, ClientOptions>
1404
1409
  } & Record<string, unknown> | {
1405
1410
  include: infer I extends object;
1406
1411
  } & Record<string, unknown> ? {
1407
- [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], ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K], ClientOptions>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions> | SelectField<P, K> & null : never : P extends {
1412
+ [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K], ClientOptions>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions> | SelectField<P, K> & null : never : P extends {
1408
1413
  scalars: {
1409
1414
  [k in K]: infer O;
1410
1415
  };
@@ -1423,14 +1428,18 @@ export declare type GetGroupByResult<P extends OperationPayload, A> = A extends
1423
1428
  [K in A['by']]: P['scalars'][K];
1424
1429
  }> : {}[];
1425
1430
 
1426
- export declare type GetOmit<BaseKeys extends string, R extends InternalArgs['result'][string]> = {
1427
- [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean;
1431
+ export declare type GetOmit<BaseKeys extends string, R extends InternalArgs['result'][string], ExtraType = never> = {
1432
+ [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType;
1428
1433
  };
1429
1434
 
1430
- 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 : {
1431
- [K in KR | keyof Base]: K extends KR ? R[K] extends () => {
1435
+ export declare type GetPayloadResult<Base extends Record<any, any>, R extends InternalArgs['result'][string]> = Omit<Base, GetPayloadResultExtensionKeys<R>> & GetPayloadResultExtensionObject<R>;
1436
+
1437
+ export declare type GetPayloadResultExtensionKeys<R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = KR;
1438
+
1439
+ export declare type GetPayloadResultExtensionObject<R extends InternalArgs['result'][string]> = {
1440
+ [K in GetPayloadResultExtensionKeys<R>]: R[K] extends () => {
1432
1441
  compute: (...args: any) => infer C;
1433
- } ? C : never : Base[K];
1442
+ } ? C : never;
1434
1443
  };
1435
1444
 
1436
1445
  export declare function getPrismaClient(config: GetPrismaClientConfig): {
@@ -1834,6 +1843,8 @@ declare enum IsolationLevel {
1834
1843
  Serializable = "Serializable"
1835
1844
  }
1836
1845
 
1846
+ declare function isSkip(value: unknown): value is Skip;
1847
+
1837
1848
  export declare type ITXClientDenyList = (typeof denylist)[number];
1838
1849
 
1839
1850
  export declare const itxClientDenyList: readonly (string | symbol)[];
@@ -1856,7 +1867,7 @@ export declare type JsArgs = {
1856
1867
  [argName: string]: JsInputValue;
1857
1868
  };
1858
1869
 
1859
- export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | {
1870
+ export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | Skip | {
1860
1871
  [key: string]: JsInputValue;
1861
1872
  };
1862
1873
 
@@ -2214,7 +2225,7 @@ export declare const objectEnumValues: {
2214
2225
 
2215
2226
  declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"];
2216
2227
 
2217
- export declare type Omission = Record<string, boolean>;
2228
+ export declare type Omission = Record<string, boolean | Skip>;
2218
2229
 
2219
2230
  declare type Omit_2<T, K extends string | number | symbol> = {
2220
2231
  [P in keyof T as P extends K ? never : P]: T[P];
@@ -2854,9 +2865,16 @@ export declare type SelectField<P extends SelectablePayloadFields<any, any>, K e
2854
2865
  composites: Record<K, any>;
2855
2866
  } ? P['composites'][K] : never;
2856
2867
 
2857
- declare type Selection_2 = Record<string, boolean | JsArgs>;
2868
+ declare type Selection_2 = Record<string, boolean | Skip | JsArgs>;
2858
2869
  export { Selection_2 as Selection }
2859
2870
 
2871
+ declare class Skip {
2872
+ constructor(param?: symbol);
2873
+ ifUndefined<T>(value: T | undefined): T | Skip;
2874
+ }
2875
+
2876
+ export declare const skip: Skip;
2877
+
2860
2878
  /**
2861
2879
  * An interface that represents a span. A span represents a single operation
2862
2880
  * within a trace. Examples of span might include remote procedure calls or a
@@ -3209,6 +3227,13 @@ declare namespace Transaction_2 {
3209
3227
  }
3210
3228
  }
3211
3229
 
3230
+ declare interface TransactionContext extends Queryable {
3231
+ /**
3232
+ * Starts new transaction.
3233
+ */
3234
+ startTransaction(): Promise<Result_4<Transaction>>;
3235
+ }
3236
+
3212
3237
  declare type TransactionHeaders = {
3213
3238
  traceparent?: string;
3214
3239
  };
@@ -3246,6 +3271,9 @@ declare namespace Types {
3246
3271
  Extensions_2 as Extensions,
3247
3272
  Utils,
3248
3273
  Public_2 as Public,
3274
+ isSkip,
3275
+ Skip,
3276
+ skip,
3249
3277
  UnknownTypedSql,
3250
3278
  OperationPayload as Payload
3251
3279
  }
@@ -3350,4 +3378,20 @@ declare type WasmLoadingConfig = {
3350
3378
  getQueryEngineWasmModule: () => Promise<unknown>;
3351
3379
  };
3352
3380
 
3381
+ declare interface WithTransaction extends Queryable {
3382
+ /**
3383
+ * Starts new transaction.
3384
+ * If `startTransaction` is not defined, `transactionContext` must be defined.
3385
+ */
3386
+ transactionContext?(): Promise<Result_4<TransactionContext>>;
3387
+ }
3388
+
3389
+ declare interface WithTransactionDeprecated extends Queryable {
3390
+ /**
3391
+ * Starts new transaction.
3392
+ * @deprecated Use `transactionContext` instead.
3393
+ */
3394
+ startTransaction?(): Promise<Result_4<Transaction>>;
3395
+ }
3396
+
3353
3397
  export { }