@merkl/api 0.10.116 → 0.10.117

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/dist/database/api/.generated/default.d.ts +1 -1
  2. package/dist/database/api/.generated/edge.d.ts +1 -1
  3. package/dist/database/api/.generated/index.d.ts +335 -311
  4. package/dist/database/api/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
  5. package/dist/database/api/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
  6. package/dist/database/api/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
  7. package/dist/database/api/.generated/package.json +15 -2
  8. package/dist/database/api/.generated/runtime/library.d.ts +195 -79
  9. package/dist/database/api/.generated/schema.prisma +1 -1
  10. package/dist/database/api/.generated/wasm.d.ts +1 -1
  11. package/dist/database/engine/.generated/default.d.ts +1 -1
  12. package/dist/database/engine/.generated/edge.d.ts +1 -1
  13. package/dist/database/engine/.generated/index.d.ts +16 -104
  14. package/dist/database/engine/.generated/libquery_engine-debian-openssl-1.1.x.so.node +0 -0
  15. package/dist/database/engine/.generated/libquery_engine-linux-arm64-openssl-1.1.x.so.node +0 -0
  16. package/dist/database/engine/.generated/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
  17. package/dist/database/engine/.generated/package.json +14 -1
  18. package/dist/database/engine/.generated/runtime/library.d.ts +195 -79
  19. package/dist/database/engine/.generated/wasm.d.ts +1 -1
  20. package/dist/src/eden/index.d.ts +470 -414
  21. package/dist/src/index.d.ts +160 -138
  22. package/dist/src/modules/v4/accounting/accounting.controller.d.ts +1 -1
  23. package/dist/src/modules/v4/accounting/accounting.repository.d.ts +8 -8
  24. package/dist/src/modules/v4/accounting/accounting.service.d.ts +1 -1
  25. package/dist/src/modules/v4/blacklist/blacklist.controller.d.ts +2 -2
  26. package/dist/src/modules/v4/blacklist/blacklist.repository.d.ts +2 -2
  27. package/dist/src/modules/v4/blacklist/blacklist.service.d.ts +2 -2
  28. package/dist/src/modules/v4/campaign/campaign.controller.d.ts +14 -14
  29. package/dist/src/modules/v4/campaign/campaign.repository.d.ts +27 -27
  30. package/dist/src/modules/v4/campaign/campaign.service.d.ts +28 -28
  31. package/dist/src/modules/v4/chain/chain.controller.d.ts +5 -5
  32. package/dist/src/modules/v4/chain/chain.repository.d.ts +6 -6
  33. package/dist/src/modules/v4/chain/chain.service.d.ts +5 -5
  34. package/dist/src/modules/v4/explorer/explorer.repository.d.ts +2 -2
  35. package/dist/src/modules/v4/explorer/explorer.service.d.ts +2 -2
  36. package/dist/src/modules/v4/merklRoot/merklRoot.controller.d.ts +22 -3
  37. package/dist/src/modules/v4/merklRoot/merklRoot.repository.d.ts +4 -4
  38. package/dist/src/modules/v4/merklRoot/merklRoot.service.d.ts +4 -4
  39. package/dist/src/modules/v4/opportunity/opportunity.controller.d.ts +36 -36
  40. package/dist/src/modules/v4/opportunity/opportunity.repository.d.ts +94 -94
  41. package/dist/src/modules/v4/opportunity/opportunity.service.d.ts +57 -57
  42. package/dist/src/modules/v4/price/price.controller.d.ts +8 -8
  43. package/dist/src/modules/v4/price/price.repository.d.ts +10 -10
  44. package/dist/src/modules/v4/price/price.service.d.ts +8 -8
  45. package/dist/src/modules/v4/protocol/protocol.repository.d.ts +12 -12
  46. package/dist/src/modules/v4/reward/reward.controller.d.ts +11 -8
  47. package/dist/src/modules/v4/reward/reward.model.d.ts +9 -9
  48. package/dist/src/modules/v4/reward/reward.repository.d.ts +42 -39
  49. package/dist/src/modules/v4/reward/reward.service.d.ts +133 -130
  50. package/dist/src/modules/v4/router.d.ts +160 -138
  51. package/dist/src/modules/v4/status/status.controller.d.ts +17 -17
  52. package/dist/src/modules/v4/status/status.repository.d.ts +32 -32
  53. package/dist/src/modules/v4/status/status.service.d.ts +20 -20
  54. package/dist/src/modules/v4/user/user.controller.d.ts +44 -44
  55. package/dist/src/modules/v4/user/user.repository.d.ts +3 -3
  56. package/dist/src/modules/v4/user/user.service.d.ts +3 -3
  57. package/dist/src/routes/v3/ERC20Campaigns.d.ts +160 -138
  58. package/dist/src/routes/v3/blacklist.d.ts +160 -138
  59. package/dist/src/routes/v3/campaigns.d.ts +160 -138
  60. package/dist/src/routes/v3/campaignsInfo.d.ts +160 -138
  61. package/dist/src/routes/v3/multiChainPositions.d.ts +160 -138
  62. package/dist/src/routes/v3/opportunity.d.ts +160 -138
  63. package/dist/src/routes/v3/positions.d.ts +160 -138
  64. package/dist/src/routes/v3/rewards.d.ts +160 -138
  65. package/dist/src/routes/v3/rootForTimestamp.d.ts +2 -2
  66. package/dist/src/routes/v3/updates.d.ts +160 -138
  67. package/dist/src/routes/v3/userRewards.d.ts +160 -138
  68. package/dist/tsconfig.package.tsbuildinfo +1 -1
  69. package/package.json +3 -3
  70. package/dist/src/libs/campaigns/getRewards.d.ts +0 -29
@@ -56,6 +56,13 @@ export declare type Args<T, F extends Operation> = T extends {
56
56
 
57
57
  export declare type Args_3<T, F extends Operation> = Args<T, F>;
58
58
 
59
+ /**
60
+ * Original `quaint::ValueType` enum tag from Prisma's `quaint`.
61
+ * Query arguments marked with this type are sanitized before being sent to the database.
62
+ * Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined.
63
+ */
64
+ declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time';
65
+
59
66
  /**
60
67
  * Attributes is a map from string to attribute values.
61
68
  *
@@ -94,7 +101,7 @@ declare type BatchQuery = {
94
101
  args: JsArgs | RawQueryArgs;
95
102
  };
96
103
 
97
- declare type BatchQueryEngineResult<T> = QueryEngineResult<T> | Error;
104
+ declare type BatchQueryEngineResult<T> = QueryEngineResultData<T> | Error;
98
105
 
99
106
  declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise<any>;
100
107
 
@@ -140,6 +147,15 @@ export declare type ClientOptionDef = undefined | {
140
147
  [K in string]: any;
141
148
  };
142
149
 
150
+ export declare type ClientOtherOps = {
151
+ $queryRaw<T = unknown>(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<T>;
152
+ $queryRawTyped<T>(query: TypedSql<unknown[], T>): PrismaPromise<T[]>;
153
+ $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): PrismaPromise<T>;
154
+ $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<number>;
155
+ $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise<number>;
156
+ $runCommandRaw(command: InputJsonObject): PrismaPromise<JsonObject>;
157
+ };
158
+
143
159
  declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum];
144
160
 
145
161
  declare const ColumnTypeEnum: {
@@ -250,7 +266,36 @@ export declare type Count<O> = {
250
266
  [K in keyof O]: Count<number>;
251
267
  } & {};
252
268
 
253
- declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch;
269
+ /**
270
+ * Custom fetch function for `DataProxyEngine`.
271
+ *
272
+ * We can't use the actual type of `globalThis.fetch` because this will result
273
+ * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle
274
+ * for the client runtime. We can only use such types in internal types that
275
+ * don't end up exported anywhere.
276
+
277
+ * It's also not possible to write a definition of `fetch` that would accept the
278
+ * actual `fetch` function from different environments such as Node.js and
279
+ * Cloudflare Workers (with their extensions to `RequestInit` and `Response`).
280
+ * `fetch` is used in both covariant and contravariant positions in
281
+ * `CustomDataProxyFetch`, making it invariant, so we need the exact same type.
282
+ * Even if we removed the argument and left `fetch` in covariant position only,
283
+ * then for an extension-supplied function to be assignable to `customDataProxyFetch`,
284
+ * the platform-specific (or custom) `fetch` function needs to be assignable
285
+ * to our `fetch` definition. This, in turn, requires the third-party `Response`
286
+ * to be a subtype of our `Response` (which is not a problem, we could declare
287
+ * a minimal `Response` type that only includes what we use) *and* requires the
288
+ * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we
289
+ * have to declare all properties any `RequestInit` implementation in existence
290
+ * could possibly have), which is not possible.
291
+ *
292
+ * Since `@prisma/extension-accelerate` redefines the type of
293
+ * `__internalParams.customDataProxyFetch` to its own type anyway (probably for
294
+ * exactly this reason), our definition is never actually used and is completely
295
+ * ignored, so it doesn't matter, and we can just use `unknown` as the type of
296
+ * `fetch` here.
297
+ */
298
+ declare type CustomDataProxyFetch = (fetch: unknown) => unknown;
254
299
 
255
300
  declare class DataLoader<T = unknown> {
256
301
  private options;
@@ -603,6 +648,8 @@ declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Clien
603
648
 
604
649
  declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"];
605
650
 
651
+ export declare function deserializeJsonResponse(result: unknown): unknown;
652
+
606
653
  export declare type DevTypeMapDef = {
607
654
  meta: {
608
655
  modelProps: string;
@@ -671,6 +718,7 @@ export declare namespace DMMF {
671
718
  export type Model = ReadonlyDeep_2<{
672
719
  name: string;
673
720
  dbName: string | null;
721
+ schema: string | null;
674
722
  fields: Field[];
675
723
  uniqueFields: string[][];
676
724
  uniqueIndexes: uniqueIndex[];
@@ -696,6 +744,12 @@ export declare namespace DMMF {
696
744
  * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
697
745
  */
698
746
  type: string;
747
+ /**
748
+ * Native database type, if specified.
749
+ * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`,
750
+ * `@db.Text` is encoded as `['Text', []]`.
751
+ */
752
+ nativeType?: [string, string[]] | null;
699
753
  dbName?: string | null;
700
754
  hasDefaultValue: boolean;
701
755
  default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
@@ -707,7 +761,7 @@ export declare namespace DMMF {
707
761
  }>;
708
762
  export type FieldDefault = ReadonlyDeep_2<{
709
763
  name: string;
710
- args: any[];
764
+ args: Array<string | number>;
711
765
  }>;
712
766
  export type FieldDefaultScalar = string | boolean | number;
713
767
  export type Index = ReadonlyDeep_2<{
@@ -852,11 +906,13 @@ export declare namespace DMMF {
852
906
  }
853
907
  }
854
908
 
909
+ export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel;
910
+
855
911
  export declare interface DriverAdapter extends Queryable {
856
912
  /**
857
913
  * Starts new transaction.
858
914
  */
859
- startTransaction(): Promise<Result_4<Transaction>>;
915
+ transactionContext(): Promise<Result_4<TransactionContext>>;
860
916
  /**
861
917
  * Optional method that returns extra connection info
862
918
  */
@@ -879,7 +935,7 @@ export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeM
879
935
  } & {
880
936
  [P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs, ClientOptions>;
881
937
  } & {
882
- [P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]: <R = GetResult<TypeMap['other']['payload'], any, P & Operation, ClientOptions>>(...args: ToTuple<TypeMap['other']['operations'][P]['args']>) => PrismaPromise<R>;
938
+ [P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never;
883
939
  } & {
884
940
  [P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs, ClientOptions>[P];
885
941
  } & {
@@ -1017,7 +1073,7 @@ declare interface Engine<InteractiveTransactionPayload = unknown> {
1017
1073
  start(): Promise<void>;
1018
1074
  stop(): Promise<void>;
1019
1075
  version(forceRun?: boolean): Promise<string> | string;
1020
- request<T>(query: JsonQuery, options: RequestOptions_2<InteractiveTransactionPayload>): Promise<QueryEngineResult<T>>;
1076
+ request<T>(query: JsonQuery, options: RequestOptions<InteractiveTransactionPayload>): Promise<QueryEngineResultData<T>>;
1021
1077
  requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
1022
1078
  transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise<Transaction_2.InteractiveTransactionInfo<unknown>>;
1023
1079
  transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
@@ -1121,6 +1177,7 @@ declare type EngineSpan = {
1121
1177
  trace_id: string;
1122
1178
  span_id: string;
1123
1179
  }[];
1180
+ kind: EngineSpanKind;
1124
1181
  };
1125
1182
 
1126
1183
  declare type EngineSpanEvent = {
@@ -1128,6 +1185,8 @@ declare type EngineSpanEvent = {
1128
1185
  spans: EngineSpan[];
1129
1186
  };
1130
1187
 
1188
+ declare type EngineSpanKind = 'client' | 'internal';
1189
+
1131
1190
  declare type EnvPaths = {
1132
1191
  rootEnvPath: string | null;
1133
1192
  schemaEnvPath: string | undefined;
@@ -1282,6 +1341,8 @@ declare namespace Extensions_2 {
1282
1341
  export {
1283
1342
  InternalArgs,
1284
1343
  DefaultArgs,
1344
+ GetPayloadResultExtensionKeys,
1345
+ GetPayloadResultExtensionObject,
1285
1346
  GetPayloadResult,
1286
1347
  GetSelect,
1287
1348
  GetOmit,
@@ -1310,6 +1371,7 @@ declare namespace Extensions_2 {
1310
1371
  DevTypeMapDef,
1311
1372
  DevTypeMapFnDef,
1312
1373
  ClientOptionDef,
1374
+ ClientOtherOps,
1313
1375
  TypeMapCbDef,
1314
1376
  ModelKey,
1315
1377
  RequiredExtensionArgs as UserArgs
@@ -1322,8 +1384,6 @@ export declare type ExtractGlobalOmit<Options, ModelName extends string> = Optio
1322
1384
  };
1323
1385
  } ? GlobalOmit : {};
1324
1386
 
1325
- declare type Fetch = typeof nodeFetch;
1326
-
1327
1387
  /**
1328
1388
  * A reference to a specific field of a specific model
1329
1389
  */
@@ -1387,7 +1447,7 @@ export declare type GetFindResult<P extends OperationPayload, A, ClientOptions>
1387
1447
  } & Record<string, unknown> | {
1388
1448
  include: infer I extends object;
1389
1449
  } & Record<string, unknown> ? {
1390
- [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 {
1450
+ [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 {
1391
1451
  scalars: {
1392
1452
  [k in K]: infer O;
1393
1453
  };
@@ -1406,14 +1466,18 @@ export declare type GetGroupByResult<P extends OperationPayload, A> = A extends
1406
1466
  [K in A['by']]: P['scalars'][K];
1407
1467
  }> : {}[];
1408
1468
 
1409
- export declare type GetOmit<BaseKeys extends string, R extends InternalArgs['result'][string]> = {
1410
- [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean;
1469
+ export declare type GetOmit<BaseKeys extends string, R extends InternalArgs['result'][string], ExtraType = never> = {
1470
+ [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType;
1411
1471
  };
1412
1472
 
1413
- 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 : {
1414
- [K in KR | keyof Base]: K extends KR ? R[K] extends () => {
1473
+ export declare type GetPayloadResult<Base extends Record<any, any>, R extends InternalArgs['result'][string]> = Omit<Base, GetPayloadResultExtensionKeys<R>> & GetPayloadResultExtensionObject<R>;
1474
+
1475
+ export declare type GetPayloadResultExtensionKeys<R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = KR;
1476
+
1477
+ export declare type GetPayloadResultExtensionObject<R extends InternalArgs['result'][string]> = {
1478
+ [K in GetPayloadResultExtensionKeys<R>]: R[K] extends () => {
1415
1479
  compute: (...args: any) => infer C;
1416
- } ? C : never : Base[K];
1480
+ } ? C : never;
1417
1481
  };
1418
1482
 
1419
1483
  export declare function getPrismaClient(config: GetPrismaClientConfig): {
@@ -1494,6 +1558,11 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1494
1558
  * @returns
1495
1559
  */
1496
1560
  $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
1561
+ /**
1562
+ * Counterpart to $queryRaw, that returns strongly typed results
1563
+ * @param typedSql
1564
+ */
1565
+ $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown>;
1497
1566
  /**
1498
1567
  * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections
1499
1568
  * @see https://github.com/prisma/prisma/issues/7142
@@ -1646,6 +1715,7 @@ export declare type GetResult<Payload extends OperationPayload, Args, OperationN
1646
1715
  count: GetCountResult<Args>;
1647
1716
  groupBy: GetGroupByResult<Payload, Args>;
1648
1717
  $queryRaw: unknown;
1718
+ $queryRawTyped: unknown;
1649
1719
  $executeRaw: number;
1650
1720
  $queryRawUnsafe: unknown;
1651
1721
  $executeRawUnsafe: number;
@@ -1696,6 +1766,38 @@ declare type HandleErrorParams = {
1696
1766
  */
1697
1767
  declare type HrTime = [number, number];
1698
1768
 
1769
+ /**
1770
+ * Matches a JSON array.
1771
+ * Unlike \`JsonArray\`, readonly arrays are assignable to this type.
1772
+ */
1773
+ export declare interface InputJsonArray extends ReadonlyArray<InputJsonValue | null> {
1774
+ }
1775
+
1776
+ /**
1777
+ * Matches a JSON object.
1778
+ * Unlike \`JsonObject\`, this type allows undefined and read-only properties.
1779
+ */
1780
+ export declare type InputJsonObject = {
1781
+ readonly [Key in string]?: InputJsonValue | null;
1782
+ };
1783
+
1784
+ /**
1785
+ * Matches any valid value that can be used as an input for operations like
1786
+ * create and update as the value of a JSON field. Unlike \`JsonValue\`, this
1787
+ * type allows read-only arrays and read-only object properties and disallows
1788
+ * \`null\` at the top level.
1789
+ *
1790
+ * \`null\` cannot be used as the value of a JSON field because its meaning
1791
+ * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or
1792
+ * \`Prisma.DbNull\` to clear the JSON value and set the field to the database
1793
+ * NULL value instead.
1794
+ *
1795
+ * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values
1796
+ */
1797
+ export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | {
1798
+ toJSON(): unknown;
1799
+ };
1800
+
1699
1801
  declare type InteractiveTransactionInfo<Payload = unknown> = {
1700
1802
  /**
1701
1803
  * Transaction ID returned by the query engine.
@@ -1768,7 +1870,7 @@ declare type InternalRequestParams = {
1768
1870
  /** Used to convert args for middleware and back */
1769
1871
  middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>;
1770
1872
  /** Used for Accelerate client extension via Data Proxy */
1771
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
1873
+ customDataProxyFetch?: CustomDataProxyFetch;
1772
1874
  } & Omit<QueryMiddlewareParams, 'runInTransaction'>;
1773
1875
 
1774
1876
  declare enum IsolationLevel {
@@ -1779,6 +1881,10 @@ declare enum IsolationLevel {
1779
1881
  Serializable = "Serializable"
1780
1882
  }
1781
1883
 
1884
+ declare function isSkip(value: unknown): value is Skip;
1885
+
1886
+ export declare function isTypedSql(value: unknown): value is UnknownTypedSql;
1887
+
1782
1888
  export declare type ITXClientDenyList = (typeof denylist)[number];
1783
1889
 
1784
1890
  export declare const itxClientDenyList: readonly (string | symbol)[];
@@ -1801,7 +1907,7 @@ export declare type JsArgs = {
1801
1907
  [argName: string]: JsInputValue;
1802
1908
  };
1803
1909
 
1804
- export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | {
1910
+ export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | Skip | {
1805
1911
  [key: string]: JsInputValue;
1806
1912
  };
1807
1913
 
@@ -1809,10 +1915,14 @@ declare type JsonArgumentValue = number | string | boolean | null | RawTaggedVal
1809
1915
  [key: string]: JsonArgumentValue;
1810
1916
  };
1811
1917
 
1918
+ /**
1919
+ * From https://github.com/sindresorhus/type-fest/
1920
+ * Matches a JSON array.
1921
+ */
1812
1922
  export declare interface JsonArray extends Array<JsonValue> {
1813
1923
  }
1814
1924
 
1815
- declare type JsonBatchQuery = {
1925
+ export declare type JsonBatchQuery = {
1816
1926
  batch: JsonQuery[];
1817
1927
  transaction?: {
1818
1928
  isolationLevel?: Transaction_2.IsolationLevel;
@@ -1831,11 +1941,16 @@ declare type JsonFieldSelection = {
1831
1941
  declare class JsonNull extends NullTypesEnumValue {
1832
1942
  }
1833
1943
 
1944
+ /**
1945
+ * From https://github.com/sindresorhus/type-fest/
1946
+ * Matches a JSON object.
1947
+ * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from.
1948
+ */
1834
1949
  export declare type JsonObject = {
1835
1950
  [Key in string]?: JsonValue;
1836
1951
  };
1837
1952
 
1838
- declare type JsonQuery = {
1953
+ export declare type JsonQuery = {
1839
1954
  modelName?: string;
1840
1955
  action: JsonQueryAction;
1841
1956
  query: JsonFieldSelection;
@@ -1850,6 +1965,10 @@ declare type JsonSelectionSet = {
1850
1965
  [fieldName: string]: boolean | JsonFieldSelection;
1851
1966
  };
1852
1967
 
1968
+ /**
1969
+ * From https://github.com/sindresorhus/type-fest/
1970
+ * Matches any valid JSON value.
1971
+ */
1853
1972
  export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null;
1854
1973
 
1855
1974
  export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | {
@@ -1947,6 +2066,8 @@ declare type LogLevel = 'info' | 'query' | 'warn' | 'error';
1947
2066
  */
1948
2067
  export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
1949
2068
 
2069
+ export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql<any[], unknown>;
2070
+
1950
2071
  /**
1951
2072
  * Class that holds the list of all extensions, applied to particular instance,
1952
2073
  * as well as resolved versions of the components that need to apply on
@@ -2079,37 +2200,6 @@ export declare type Narrowable = string | number | bigint | boolean | [];
2079
2200
 
2080
2201
  export declare type NeverToUnknown<T> = [T] extends [never] ? unknown : T;
2081
2202
 
2082
- /**
2083
- * Imitates `fetch` via `https` to only suit our needs, it does nothing more.
2084
- * This is because we cannot bundle `node-fetch` as it uses many other Node.js
2085
- * utilities, while also bloating our bundles. This approach is much leaner.
2086
- * @param url
2087
- * @param options
2088
- * @returns
2089
- */
2090
- declare function nodeFetch(url: string, options?: RequestOptions): Promise<RequestResponse>;
2091
-
2092
- declare class NodeHeaders {
2093
- readonly headers: Map<string, string>;
2094
- constructor(init?: Record<any, any>);
2095
- append(name: string, value: string): void;
2096
- delete(name: string): void;
2097
- get(name: string): string | null;
2098
- has(name: string): boolean;
2099
- set(name: string, value: string): void;
2100
- forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void;
2101
- }
2102
-
2103
- /**
2104
- * @deprecated Please don´t rely on type checks to this error anymore.
2105
- * This will become a regular `PrismaClientKnownRequestError` with code `P2025`
2106
- * in the future major version of the client.
2107
- * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`.
2108
- */
2109
- export declare class NotFoundError extends PrismaClientKnownRequestError {
2110
- constructor(message: string, clientVersion: string);
2111
- }
2112
-
2113
2203
  declare class NullTypesEnumValue extends ObjectEnumValue {
2114
2204
  _getNamespace(): string;
2115
2205
  }
@@ -2144,7 +2234,7 @@ export declare const objectEnumValues: {
2144
2234
 
2145
2235
  declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"];
2146
2236
 
2147
- export declare type Omission = Record<string, boolean>;
2237
+ export declare type Omission = Record<string, boolean | Skip>;
2148
2238
 
2149
2239
  declare type Omit_2<T, K extends string | number | symbol> = {
2150
2240
  [P in keyof T as P extends K ? never : P]: T[P];
@@ -2385,6 +2475,8 @@ declare type PrismaPromiseInteractiveTransaction<PayloadType = unknown> = {
2385
2475
 
2386
2476
  declare type PrismaPromiseTransaction<PayloadType = unknown> = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction<PayloadType>;
2387
2477
 
2478
+ export declare const PrivateResultType: unique symbol;
2479
+
2388
2480
  declare namespace Public {
2389
2481
  export {
2390
2482
  validator
@@ -2406,6 +2498,7 @@ declare namespace Public_2 {
2406
2498
  declare type Query = {
2407
2499
  sql: string;
2408
2500
  args: Array<unknown>;
2501
+ argTypes: Array<ArgType>;
2409
2502
  };
2410
2503
 
2411
2504
  declare interface Queryable {
@@ -2476,9 +2569,8 @@ declare type QueryEngineRequest = {
2476
2569
  variables: Object;
2477
2570
  };
2478
2571
 
2479
- declare type QueryEngineResult<T> = {
2572
+ declare type QueryEngineResultData<T> = {
2480
2573
  data: T;
2481
- elapsed: number;
2482
2574
  };
2483
2575
 
2484
2576
  declare type QueryEngineTelemetry = {
@@ -2537,7 +2629,7 @@ export declare type RawParameters = {
2537
2629
  values: string;
2538
2630
  };
2539
2631
 
2540
- export declare type RawQueryArgs = Sql | [query: string, ...values: RawValue[]];
2632
+ export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]];
2541
2633
 
2542
2634
  declare type RawTaggedValue = {
2543
2635
  $type: 'Raw';
@@ -2571,7 +2663,7 @@ declare type RequestBatchOptions<InteractiveTransactionPayload> = {
2571
2663
  traceparent?: string;
2572
2664
  numTry?: number;
2573
2665
  containsWrite: boolean;
2574
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
2666
+ customDataProxyFetch?: CustomDataProxyFetch;
2575
2667
  };
2576
2668
 
2577
2669
  declare interface RequestError {
@@ -2591,7 +2683,7 @@ declare class RequestHandler {
2591
2683
  private logEmitter?;
2592
2684
  constructor(client: Client, logEmitter?: LogEmitter);
2593
2685
  request(params: RequestParams): Promise<any>;
2594
- mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult<any>): any;
2686
+ mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData<any>): any;
2595
2687
  /**
2596
2688
  * Handles the error and logs it, logging the error is done synchronously waiting for the event
2597
2689
  * handlers to finish.
@@ -2603,18 +2695,12 @@ declare class RequestHandler {
2603
2695
  get [Symbol.toStringTag](): string;
2604
2696
  }
2605
2697
 
2606
- declare type RequestOptions = {
2607
- method?: string;
2608
- headers?: Record<string, string>;
2609
- body?: string;
2610
- };
2611
-
2612
- declare type RequestOptions_2<InteractiveTransactionPayload> = {
2698
+ declare type RequestOptions<InteractiveTransactionPayload> = {
2613
2699
  traceparent?: string;
2614
2700
  numTry?: number;
2615
2701
  interactiveTransaction?: InteractiveTransactionOptions<InteractiveTransactionPayload>;
2616
2702
  isWrite: boolean;
2617
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
2703
+ customDataProxyFetch?: CustomDataProxyFetch;
2618
2704
  };
2619
2705
 
2620
2706
  declare type RequestParams = {
@@ -2632,17 +2718,7 @@ declare type RequestParams = {
2632
2718
  otelParentCtx?: Context;
2633
2719
  otelChildCtx?: Context;
2634
2720
  globalOmit?: GlobalOmitOptions;
2635
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
2636
- };
2637
-
2638
- declare type RequestResponse = {
2639
- ok: boolean;
2640
- url: string;
2641
- statusText?: string;
2642
- status: number;
2643
- headers: NodeHeaders;
2644
- text: () => Promise<string>;
2645
- json: () => Promise<any>;
2721
+ customDataProxyFetch?: CustomDataProxyFetch;
2646
2722
  };
2647
2723
 
2648
2724
  declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions;
@@ -2753,7 +2829,7 @@ export declare type Return<T> = T extends (...args: any[]) => infer R ? R : T;
2753
2829
 
2754
2830
  declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown";
2755
2831
 
2756
- declare type RuntimeDataModel = {
2832
+ export declare type RuntimeDataModel = {
2757
2833
  readonly models: Record<string, RuntimeModel>;
2758
2834
  readonly enums: Record<string, RuntimeEnum>;
2759
2835
  readonly types: Record<string, RuntimeModel>;
@@ -2781,9 +2857,32 @@ export declare type SelectField<P extends SelectablePayloadFields<any, any>, K e
2781
2857
  composites: Record<K, any>;
2782
2858
  } ? P['composites'][K] : never;
2783
2859
 
2784
- declare type Selection_2 = Record<string, boolean | JsArgs>;
2860
+ declare type Selection_2 = Record<string, boolean | Skip | JsArgs>;
2785
2861
  export { Selection_2 as Selection }
2786
2862
 
2863
+ export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery;
2864
+
2865
+ declare type SerializeParams = {
2866
+ runtimeDataModel: RuntimeDataModel;
2867
+ modelName?: string;
2868
+ action: Action;
2869
+ args?: JsArgs;
2870
+ extensions?: MergedExtensionsList;
2871
+ callsite?: CallSite;
2872
+ clientMethod: string;
2873
+ clientVersion: string;
2874
+ errorFormat: ErrorFormat;
2875
+ previewFeatures: string[];
2876
+ globalOmit?: GlobalOmitOptions;
2877
+ };
2878
+
2879
+ declare class Skip {
2880
+ constructor(param?: symbol);
2881
+ ifUndefined<T>(value: T | undefined): T | Skip;
2882
+ }
2883
+
2884
+ export declare const skip: Skip;
2885
+
2787
2886
  /**
2788
2887
  * An interface that represents a span. A span represents a single operation
2789
2888
  * within a trace. Examples of span might include remote procedure calls or a
@@ -3136,6 +3235,13 @@ declare namespace Transaction_2 {
3136
3235
  }
3137
3236
  }
3138
3237
 
3238
+ declare interface TransactionContext extends Queryable {
3239
+ /**
3240
+ * Starts new transaction.
3241
+ */
3242
+ startTransaction(): Promise<Result_4<Transaction>>;
3243
+ }
3244
+
3139
3245
  declare type TransactionHeaders = {
3140
3246
  traceparent?: string;
3141
3247
  };
@@ -3152,6 +3258,13 @@ declare type TransactionOptions_2<InteractiveTransactionPayload> = {
3152
3258
  options: BatchTransactionOptions;
3153
3259
  };
3154
3260
 
3261
+ export declare class TypedSql<Values extends readonly unknown[], Result> {
3262
+ [PrivateResultType]: Result;
3263
+ constructor(sql: string, values: Values);
3264
+ get sql(): string;
3265
+ get values(): Values;
3266
+ }
3267
+
3155
3268
  export declare type TypeMapCbDef = Fn<{
3156
3269
  extArgs: InternalArgs;
3157
3270
  clientOptions: ClientOptionDef;
@@ -3166,6 +3279,10 @@ declare namespace Types {
3166
3279
  Extensions_2 as Extensions,
3167
3280
  Utils,
3168
3281
  Public_2 as Public,
3282
+ isSkip,
3283
+ Skip,
3284
+ skip,
3285
+ UnknownTypedSql,
3169
3286
  OperationPayload as Payload
3170
3287
  }
3171
3288
  }
@@ -3176,6 +3293,8 @@ declare type UnknownErrorParams = {
3176
3293
  batchRequestIdx?: number;
3177
3294
  };
3178
3295
 
3296
+ export declare type UnknownTypedSql = TypedSql<unknown[], unknown>;
3297
+
3179
3298
  declare type Unpacker = (data: any) => any;
3180
3299
 
3181
3300
  export declare type UnwrapPayload<P> = {} extends P ? unknown : {
@@ -3214,9 +3333,6 @@ declare namespace Utils {
3214
3333
  Narrow,
3215
3334
  Exact,
3216
3335
  Cast,
3217
- JsonObject,
3218
- JsonArray,
3219
- JsonValue,
3220
3336
  Record_2 as Record,
3221
3337
  UnwrapPromise,
3222
3338
  UnwrapTuple,
@@ -1 +1 @@
1
- export * from './index'
1
+ export * from "./index"