expo-backend-types 0.30.0-EXPO-311-EB-Modificar-DB-schema.1 → 0.30.0-EXPO-308-auth.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/src/auth/dto/login-mi-expo.dto.d.ts +327 -0
  2. package/dist/src/auth/dto/login-mi-expo.dto.js +31 -0
  3. package/dist/src/exports.d.ts +1 -0
  4. package/dist/src/exports.js +1 -0
  5. package/dist/src/i18n/es.d.ts +19 -0
  6. package/dist/src/i18n/es.js +19 -0
  7. package/dist/src/i18n/es.js.map +1 -1
  8. package/dist/src/image/constants.d.ts +5 -0
  9. package/dist/src/image/constants.js +9 -0
  10. package/dist/src/message/dto/non-read-messages.dto.d.ts +2 -2
  11. package/dist/src/message/dto/send-message-to-phone.dto.d.ts +2 -2
  12. package/dist/src/otp/constants.d.ts +2 -0
  13. package/dist/src/otp/constants.js +6 -0
  14. package/dist/src/otp/dto/send-otp.dto.d.ts +158 -0
  15. package/dist/src/otp/dto/send-otp.dto.js +35 -0
  16. package/dist/src/otp/dto/verify-otp.dto.d.ts +286 -0
  17. package/dist/src/otp/dto/verify-otp.dto.js +28 -0
  18. package/dist/src/otp/exports.d.ts +2 -0
  19. package/dist/src/otp/exports.js +19 -0
  20. package/dist/src/prisma/constants.d.ts +1 -0
  21. package/dist/src/prisma/constants.js +5 -0
  22. package/dist/src/profile/dto/create-profile.dto.d.ts +26 -10
  23. package/dist/src/profile/dto/delete-profile.dto.d.ts +28 -4
  24. package/dist/src/profile/dto/find-all-profile.dto.d.ts +44 -4
  25. package/dist/src/profile/dto/find-by-date-range-profile.dto.d.ts +72 -8
  26. package/dist/src/profile/dto/find-by-id-profile.dto.d.ts +28 -4
  27. package/dist/src/profile/dto/find-by-phone-number.dto.d.ts +28 -4
  28. package/dist/src/profile/dto/find-by-tag-groups-profile.dto.d.ts +44 -4
  29. package/dist/src/profile/dto/find-by-tags-profile.dto.d.ts +44 -4
  30. package/dist/src/profile/dto/find-trash.dto.d.ts +7 -3
  31. package/dist/src/profile/dto/find-with-active-chat.dto.d.ts +44 -4
  32. package/dist/src/profile/dto/profile.dto.d.ts +90 -2
  33. package/dist/src/profile/dto/profile.dto.js +75 -4
  34. package/dist/src/profile/dto/update-profile.dto.d.ts +32 -8
  35. package/dist/src/tag/dto/massive-allocation.dto.d.ts +44 -4
  36. package/dist/src/tag/dto/massive-deallocation.dto.d.ts +44 -4
  37. package/dist/src/webhook/constants.d.ts +1 -0
  38. package/dist/src/webhook/constants.js +5 -0
  39. package/dist/types/prisma-schema/edge.js +38 -24
  40. package/dist/types/prisma-schema/index-browser.js +18 -9
  41. package/dist/types/prisma-schema/index.d.ts +3862 -511
  42. package/dist/types/prisma-schema/index.js +38 -24
  43. package/dist/types/prisma-schema/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  44. package/dist/types/prisma-schema/package.json +2 -2
  45. package/dist/types/prisma-schema/runtime/edge-esm.js +18 -18
  46. package/dist/types/prisma-schema/runtime/edge.js +18 -18
  47. package/dist/types/prisma-schema/runtime/index-browser.d.ts +1 -1
  48. package/dist/types/prisma-schema/runtime/library.d.ts +177 -133
  49. package/dist/types/prisma-schema/runtime/library.js +51 -51
  50. package/dist/types/prisma-schema/runtime/react-native.js +26 -26
  51. package/dist/types/prisma-schema/runtime/wasm.js +19 -19
  52. package/dist/types/prisma-schema/schema.prisma +22 -1
  53. package/dist/types/prisma-schema/wasm.js +18 -9
  54. package/dist/types/schema.d.ts +277 -2
  55. package/package.json +15 -14
@@ -23,7 +23,7 @@ declare type AccelerateEngineConfig = {
23
23
 
24
24
  export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw';
25
25
 
26
- declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres'>;
26
+ declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres' | 'prisma+postgres'>;
27
27
 
28
28
  export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum';
29
29
 
@@ -101,7 +101,7 @@ declare type BatchQuery = {
101
101
  args: JsArgs | RawQueryArgs;
102
102
  };
103
103
 
104
- declare type BatchQueryEngineResult<T> = QueryEngineResult<T> | Error;
104
+ declare type BatchQueryEngineResult<T> = QueryEngineResultData<T> | Error;
105
105
 
106
106
  declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise<any>;
107
107
 
@@ -193,6 +193,24 @@ declare const ColumnTypeEnum: {
193
193
  readonly UnknownNumber: 128;
194
194
  };
195
195
 
196
+ declare type CompilerWasmLoadingConfig = {
197
+ /**
198
+ * WASM-bindgen runtime for corresponding module
199
+ */
200
+ getRuntime: () => {
201
+ __wbg_set_wasm(exports: unknown): any;
202
+ QueryCompiler: QueryCompilerConstructor;
203
+ };
204
+ /**
205
+ * Loads the raw wasm module for the wasm compiler engine. This configuration is
206
+ * generated specifically for each type of client, eg. Node.js client and Edge
207
+ * clients will have different implementations.
208
+ * @remarks this is a callback on purpose, we only load the wasm if needed.
209
+ * @remarks only used by ClientEngine
210
+ */
211
+ getQueryCompilerWasmModule: () => Promise<unknown>;
212
+ };
213
+
196
214
  export declare type Compute<T> = T extends Function ? T : {
197
215
  [K in keyof T]: T[K];
198
216
  } & unknown;
@@ -216,7 +234,7 @@ declare type ConnectionInfo = {
216
234
  maxBindValues?: number;
217
235
  };
218
236
 
219
- declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb';
237
+ declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb';
220
238
 
221
239
  declare interface Context {
222
240
  /**
@@ -266,7 +284,38 @@ export declare type Count<O> = {
266
284
  [K in keyof O]: Count<number>;
267
285
  } & {};
268
286
 
269
- declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch;
287
+ export declare function createParam(name: string): Param<unknown, string>;
288
+
289
+ /**
290
+ * Custom fetch function for `DataProxyEngine`.
291
+ *
292
+ * We can't use the actual type of `globalThis.fetch` because this will result
293
+ * in API Extractor referencing Node.js type definitions in the `.d.ts` bundle
294
+ * for the client runtime. We can only use such types in internal types that
295
+ * don't end up exported anywhere.
296
+
297
+ * It's also not possible to write a definition of `fetch` that would accept the
298
+ * actual `fetch` function from different environments such as Node.js and
299
+ * Cloudflare Workers (with their extensions to `RequestInit` and `Response`).
300
+ * `fetch` is used in both covariant and contravariant positions in
301
+ * `CustomDataProxyFetch`, making it invariant, so we need the exact same type.
302
+ * Even if we removed the argument and left `fetch` in covariant position only,
303
+ * then for an extension-supplied function to be assignable to `customDataProxyFetch`,
304
+ * the platform-specific (or custom) `fetch` function needs to be assignable
305
+ * to our `fetch` definition. This, in turn, requires the third-party `Response`
306
+ * to be a subtype of our `Response` (which is not a problem, we could declare
307
+ * a minimal `Response` type that only includes what we use) *and* requires the
308
+ * third-party `RequestInit` to be a supertype of our `RequestInit` (i.e. we
309
+ * have to declare all properties any `RequestInit` implementation in existence
310
+ * could possibly have), which is not possible.
311
+ *
312
+ * Since `@prisma/extension-accelerate` redefines the type of
313
+ * `__internalParams.customDataProxyFetch` to its own type anyway (probably for
314
+ * exactly this reason), our definition is never actually used and is completely
315
+ * ignored, so it doesn't matter, and we can just use `unknown` as the type of
316
+ * `fetch` here.
317
+ */
318
+ declare type CustomDataProxyFetch = (fetch: unknown) => unknown;
270
319
 
271
320
  declare class DataLoader<T = unknown> {
272
321
  private options;
@@ -619,8 +668,12 @@ declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Clien
619
668
 
620
669
  declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"];
621
670
 
671
+ declare type DeserializedResponse = Array<Record<string, unknown>>;
672
+
622
673
  export declare function deserializeJsonResponse(result: unknown): unknown;
623
674
 
675
+ export declare function deserializeRawResult(response: RawResponse): DeserializedResponse;
676
+
624
677
  export declare type DevTypeMapDef = {
625
678
  meta: {
626
679
  modelProps: string;
@@ -689,6 +742,7 @@ export declare namespace DMMF {
689
742
  export type Model = ReadonlyDeep_2<{
690
743
  name: string;
691
744
  dbName: string | null;
745
+ schema: string | null;
692
746
  fields: Field[];
693
747
  uniqueFields: string[][];
694
748
  uniqueIndexes: uniqueIndex[];
@@ -714,18 +768,25 @@ export declare namespace DMMF {
714
768
  * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
715
769
  */
716
770
  type: string;
771
+ /**
772
+ * Native database type, if specified.
773
+ * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`,
774
+ * `@db.Text` is encoded as `['Text', []]`.
775
+ */
776
+ nativeType?: [string, string[]] | null;
717
777
  dbName?: string | null;
718
778
  hasDefaultValue: boolean;
719
779
  default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
720
780
  relationFromFields?: string[];
721
781
  relationToFields?: string[];
722
782
  relationOnDelete?: string;
783
+ relationOnUpdate?: string;
723
784
  relationName?: string;
724
785
  documentation?: string;
725
786
  }>;
726
787
  export type FieldDefault = ReadonlyDeep_2<{
727
788
  name: string;
728
- args: any[];
789
+ args: Array<string | number>;
729
790
  }>;
730
791
  export type FieldDefaultScalar = string | boolean | number;
731
792
  export type Index = ReadonlyDeep_2<{
@@ -839,6 +900,7 @@ export declare namespace DMMF {
839
900
  createManyAndReturn?: string | null;
840
901
  update?: string | null;
841
902
  updateMany?: string | null;
903
+ updateManyAndReturn?: string | null;
842
904
  upsert?: string | null;
843
905
  delete?: string | null;
844
906
  deleteMany?: string | null;
@@ -859,6 +921,7 @@ export declare namespace DMMF {
859
921
  createManyAndReturn = "createManyAndReturn",
860
922
  update = "update",
861
923
  updateMany = "updateMany",
924
+ updateManyAndReturn = "updateManyAndReturn",
862
925
  upsert = "upsert",
863
926
  delete = "delete",
864
927
  deleteMany = "deleteMany",
@@ -1037,7 +1100,7 @@ declare interface Engine<InteractiveTransactionPayload = unknown> {
1037
1100
  start(): Promise<void>;
1038
1101
  stop(): Promise<void>;
1039
1102
  version(forceRun?: boolean): Promise<string> | string;
1040
- request<T>(query: JsonQuery, options: RequestOptions_2<InteractiveTransactionPayload>): Promise<QueryEngineResult<T>>;
1103
+ request<T>(query: JsonQuery, options: RequestOptions<InteractiveTransactionPayload>): Promise<QueryEngineResultData<T>>;
1041
1104
  requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
1042
1105
  transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise<Transaction_2.InteractiveTransactionInfo<unknown>>;
1043
1106
  transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
@@ -1104,7 +1167,8 @@ declare interface EngineConfig {
1104
1167
  /**
1105
1168
  * Web Assembly module loading configuration
1106
1169
  */
1107
- engineWasm?: WasmLoadingConfig;
1170
+ engineWasm?: EngineWasmLoadingConfig;
1171
+ compilerWasm?: CompilerWasmLoadingConfig;
1108
1172
  /**
1109
1173
  * Allows Accelerate to use runtime utilities from the client. These are
1110
1174
  * necessary for the AccelerateEngine to function correctly.
@@ -1129,28 +1193,38 @@ declare type EngineEventType = QueryEventType | LogEventType;
1129
1193
  declare type EngineProtocol = 'graphql' | 'json';
1130
1194
 
1131
1195
  declare type EngineSpan = {
1132
- span: boolean;
1196
+ id: EngineSpanId;
1197
+ parentId: string | null;
1133
1198
  name: string;
1134
- trace_id: string;
1135
- span_id: string;
1136
- parent_span_id: string;
1137
- start_time: [number, number];
1138
- end_time: [number, number];
1139
- attributes?: Record<string, string>;
1140
- links?: {
1141
- trace_id: string;
1142
- span_id: string;
1143
- }[];
1199
+ startTime: HrTime;
1200
+ endTime: HrTime;
1144
1201
  kind: EngineSpanKind;
1202
+ attributes?: Record<string, unknown>;
1203
+ links?: EngineSpanId[];
1145
1204
  };
1146
1205
 
1147
- declare type EngineSpanEvent = {
1148
- span: boolean;
1149
- spans: EngineSpan[];
1150
- };
1206
+ declare type EngineSpanId = string;
1151
1207
 
1152
1208
  declare type EngineSpanKind = 'client' | 'internal';
1153
1209
 
1210
+ declare type EngineWasmLoadingConfig = {
1211
+ /**
1212
+ * WASM-bindgen runtime for corresponding module
1213
+ */
1214
+ getRuntime: () => {
1215
+ __wbg_set_wasm(exports: unknown): any;
1216
+ QueryEngine: QueryEngineConstructor;
1217
+ };
1218
+ /**
1219
+ * Loads the raw wasm module for the wasm query engine. This configuration is
1220
+ * generated specifically for each type of client, eg. Node.js client and Edge
1221
+ * clients will have different implementations.
1222
+ * @remarks this is a callback on purpose, we only load the wasm if needed.
1223
+ * @remarks only used by LibraryEngine
1224
+ */
1225
+ getQueryEngineWasmModule: () => Promise<unknown>;
1226
+ };
1227
+
1154
1228
  declare type EnvPaths = {
1155
1229
  rootEnvPath: string | null;
1156
1230
  schemaEnvPath: string | undefined;
@@ -1348,8 +1422,6 @@ export declare type ExtractGlobalOmit<Options, ModelName extends string> = Optio
1348
1422
  };
1349
1423
  } ? GlobalOmit : {};
1350
1424
 
1351
- declare type Fetch = typeof nodeFetch;
1352
-
1353
1425
  /**
1354
1426
  * A reference to a specific field of a specific model
1355
1427
  */
@@ -1360,6 +1432,8 @@ export declare interface FieldRef<Model, FieldType> {
1360
1432
  readonly isList: boolean;
1361
1433
  }
1362
1434
 
1435
+ declare type Flavour = 'mysql' | 'postgres' | 'sqlite';
1436
+
1363
1437
  export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete';
1364
1438
 
1365
1439
  export declare interface Fn<Params = unknown, Returns = unknown> {
@@ -1420,7 +1494,9 @@ export declare type GetFindResult<P extends OperationPayload, A, ClientOptions>
1420
1494
  } ? O : K extends '_count' ? Count<P['objects']> : never;
1421
1495
  } & (A extends {
1422
1496
  include: any;
1423
- } & Record<string, unknown> ? DefaultSelection<P, A, ClientOptions> : unknown) : DefaultSelection<P, A, ClientOptions>;
1497
+ } & Record<string, unknown> ? DefaultSelection<P, A & {
1498
+ omit: A['omit'];
1499
+ }, ClientOptions> : unknown) : DefaultSelection<P, A, ClientOptions>;
1424
1500
 
1425
1501
  export declare type GetGroupByResult<P extends OperationPayload, A> = A extends {
1426
1502
  by: string[];
@@ -1494,7 +1570,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1494
1570
  * @param values
1495
1571
  * @returns
1496
1572
  */
1497
- $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
1573
+ $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown, any>;
1498
1574
  /**
1499
1575
  * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections
1500
1576
  * @see https://github.com/prisma/prisma/issues/7142
@@ -1503,14 +1579,14 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1503
1579
  * @param values
1504
1580
  * @returns
1505
1581
  */
1506
- $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
1582
+ $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown, any>;
1507
1583
  /**
1508
1584
  * Executes a raw command only for MongoDB
1509
1585
  *
1510
1586
  * @param command
1511
1587
  * @returns
1512
1588
  */
1513
- $runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown>;
1589
+ $runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown, any>;
1514
1590
  /**
1515
1591
  * Executes a raw query and returns selected data
1516
1592
  */
@@ -1523,12 +1599,12 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1523
1599
  * @param values
1524
1600
  * @returns
1525
1601
  */
1526
- $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
1602
+ $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown, any>;
1527
1603
  /**
1528
1604
  * Counterpart to $queryRaw, that returns strongly typed results
1529
1605
  * @param typedSql
1530
1606
  */
1531
- $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown>;
1607
+ $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown, any>;
1532
1608
  /**
1533
1609
  * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections
1534
1610
  * @see https://github.com/prisma/prisma/issues/7142
@@ -1537,7 +1613,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
1537
1613
  * @param values
1538
1614
  * @returns
1539
1615
  */
1540
- $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
1616
+ $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown, any>;
1541
1617
  /**
1542
1618
  * Execute a batch of requests in a transaction
1543
1619
  * @param requests
@@ -1660,7 +1736,8 @@ declare type GetPrismaClientConfig = {
1660
1736
  /**
1661
1737
  * Optional wasm loading configuration
1662
1738
  */
1663
- engineWasm?: WasmLoadingConfig;
1739
+ engineWasm?: EngineWasmLoadingConfig;
1740
+ compilerWasm?: CompilerWasmLoadingConfig;
1664
1741
  };
1665
1742
 
1666
1743
  export declare type GetResult<Payload extends OperationPayload, Args, OperationName extends Operation = 'findUniqueOrThrow', ClientOptions = {}> = {
@@ -1674,6 +1751,7 @@ export declare type GetResult<Payload extends OperationPayload, Args, OperationN
1674
1751
  createManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
1675
1752
  update: GetFindResult<Payload, Args, ClientOptions>;
1676
1753
  updateMany: GetBatchResult;
1754
+ updateManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
1677
1755
  upsert: GetFindResult<Payload, Args, ClientOptions>;
1678
1756
  delete: GetFindResult<Payload, Args, ClientOptions>;
1679
1757
  deleteMany: GetBatchResult;
@@ -1718,6 +1796,8 @@ declare type HandleErrorParams = {
1718
1796
  globalOmit?: GlobalOmitOptions;
1719
1797
  };
1720
1798
 
1799
+ declare type HrTime = [number, number];
1800
+
1721
1801
  /**
1722
1802
  * Defines High-Resolution Time.
1723
1803
  *
@@ -1730,7 +1810,7 @@ declare type HandleErrorParams = {
1730
1810
  * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
1731
1811
  * This is represented in HrTime format as [1609504210, 150000000].
1732
1812
  */
1733
- declare type HrTime = [number, number];
1813
+ declare type HrTime_2 = [number, number];
1734
1814
 
1735
1815
  /**
1736
1816
  * Matches a JSON array.
@@ -1836,7 +1916,7 @@ declare type InternalRequestParams = {
1836
1916
  /** Used to convert args for middleware and back */
1837
1917
  middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>;
1838
1918
  /** Used for Accelerate client extension via Data Proxy */
1839
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
1919
+ customDataProxyFetch?: CustomDataProxyFetch;
1840
1920
  } & Omit<QueryMiddlewareParams, 'runInTransaction'>;
1841
1921
 
1842
1922
  declare enum IsolationLevel {
@@ -1922,7 +2002,7 @@ export declare type JsonQuery = {
1922
2002
  query: JsonFieldSelection;
1923
2003
  };
1924
2004
 
1925
- declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw';
2005
+ declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw';
1926
2006
 
1927
2007
  declare type JsonSelectionSet = {
1928
2008
  $scalars?: boolean;
@@ -2166,37 +2246,6 @@ export declare type Narrowable = string | number | bigint | boolean | [];
2166
2246
 
2167
2247
  export declare type NeverToUnknown<T> = [T] extends [never] ? unknown : T;
2168
2248
 
2169
- /**
2170
- * Imitates `fetch` via `https` to only suit our needs, it does nothing more.
2171
- * This is because we cannot bundle `node-fetch` as it uses many other Node.js
2172
- * utilities, while also bloating our bundles. This approach is much leaner.
2173
- * @param url
2174
- * @param options
2175
- * @returns
2176
- */
2177
- declare function nodeFetch(url: string, options?: RequestOptions): Promise<RequestResponse>;
2178
-
2179
- declare class NodeHeaders {
2180
- readonly headers: Map<string, string>;
2181
- constructor(init?: Record<any, any>);
2182
- append(name: string, value: string): void;
2183
- delete(name: string): void;
2184
- get(name: string): string | null;
2185
- has(name: string): boolean;
2186
- set(name: string, value: string): void;
2187
- forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void;
2188
- }
2189
-
2190
- /**
2191
- * @deprecated Please don´t rely on type checks to this error anymore.
2192
- * This will become a regular `PrismaClientKnownRequestError` with code `P2025`
2193
- * in the future major version of the client.
2194
- * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`.
2195
- */
2196
- export declare class NotFoundError extends PrismaClientKnownRequestError {
2197
- constructor(message: string, clientVersion: string);
2198
- }
2199
-
2200
2249
  declare class NullTypesEnumValue extends ObjectEnumValue {
2201
2250
  _getNamespace(): string;
2202
2251
  }
@@ -2240,7 +2289,7 @@ export { Omit_2 as Omit }
2240
2289
 
2241
2290
  export declare type OmitValue<Omit, Key> = Key extends keyof Omit ? Omit[Key] : false;
2242
2291
 
2243
- export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw';
2292
+ export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw';
2244
2293
 
2245
2294
  export declare type OperationPayload = {
2246
2295
  name: string;
@@ -2290,6 +2339,12 @@ export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
2290
2339
  };
2291
2340
  }[A][B];
2292
2341
 
2342
+ export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>;
2343
+
2344
+ export declare type Param<out $Type, $Value extends string> = {
2345
+ readonly name: $Value;
2346
+ };
2347
+
2293
2348
  export declare type PatchFlat<O1, O2> = O1 & Omit_2<O2, keyof O1>;
2294
2349
 
2295
2350
  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;
@@ -2407,6 +2462,12 @@ export declare class PrismaClientValidationError extends Error {
2407
2462
 
2408
2463
  declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError;
2409
2464
 
2465
+ declare type PrismaOperationSpec<TArgs, TAction = string> = {
2466
+ args: TArgs;
2467
+ action: TAction;
2468
+ model: string;
2469
+ };
2470
+
2410
2471
  export declare interface PrismaPromise<T> extends Promise<T> {
2411
2472
  [Symbol.toStringTag]: 'PrismaPromise';
2412
2473
  }
@@ -2416,26 +2477,27 @@ export declare interface PrismaPromise<T> extends Promise<T> {
2416
2477
  * original `Promise` are optional so that it can be backwards-compatible.
2417
2478
  * @see [[createPrismaPromise]]
2418
2479
  */
2419
- declare interface PrismaPromise_2<A> extends Promise<A> {
2480
+ declare interface PrismaPromise_2<TResult, TSpec extends PrismaOperationSpec<unknown> = any> extends Promise<TResult> {
2481
+ get spec(): TSpec;
2420
2482
  /**
2421
2483
  * Extension of the original `.then` function
2422
2484
  * @param onfulfilled same as regular promises
2423
2485
  * @param onrejected same as regular promises
2424
2486
  * @param transaction transaction options
2425
2487
  */
2426
- then<R1 = A, R2 = never>(onfulfilled?: (value: A) => R1 | PromiseLike<R1>, onrejected?: (error: unknown) => R2 | PromiseLike<R2>, transaction?: PrismaPromiseTransaction): Promise<R1 | R2>;
2488
+ then<R1 = TResult, R2 = never>(onfulfilled?: (value: TResult) => R1 | PromiseLike<R1>, onrejected?: (error: unknown) => R2 | PromiseLike<R2>, transaction?: PrismaPromiseTransaction): Promise<R1 | R2>;
2427
2489
  /**
2428
2490
  * Extension of the original `.catch` function
2429
2491
  * @param onrejected same as regular promises
2430
2492
  * @param transaction transaction options
2431
2493
  */
2432
- catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<A | R>;
2494
+ catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<TResult | R>;
2433
2495
  /**
2434
2496
  * Extension of the original `.finally` function
2435
2497
  * @param onfinally same as regular promises
2436
2498
  * @param transaction transaction options
2437
2499
  */
2438
- finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<A>;
2500
+ finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<TResult>;
2439
2501
  /**
2440
2502
  * Called when executing a batch of regular tx
2441
2503
  * @param transaction transaction options for batch tx
@@ -2451,7 +2513,7 @@ declare type PrismaPromiseBatchTransaction = {
2451
2513
  lock: PromiseLike<void>;
2452
2514
  };
2453
2515
 
2454
- declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2<unknown>;
2516
+ declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise<unknown>;
2455
2517
 
2456
2518
  /**
2457
2519
  * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which
@@ -2462,7 +2524,7 @@ declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) =>
2462
2524
  * @see [[PrismaPromise]]
2463
2525
  * @returns
2464
2526
  */
2465
- declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2<unknown>;
2527
+ declare type PrismaPromiseFactory = <T extends PrismaOperationSpec<unknown>>(callback: PrismaPromiseCallback, op?: T) => PrismaPromise_2<unknown>;
2466
2528
 
2467
2529
  declare type PrismaPromiseInteractiveTransaction<PayloadType = unknown> = {
2468
2530
  kind: 'itx';
@@ -2499,7 +2561,7 @@ declare type Query = {
2499
2561
  };
2500
2562
 
2501
2563
  declare interface Queryable {
2502
- readonly provider: 'mysql' | 'postgres' | 'sqlite';
2564
+ readonly provider: Flavour;
2503
2565
  readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {});
2504
2566
  /**
2505
2567
  * Execute a query given as SQL, interpolating the given parameters,
@@ -2518,6 +2580,20 @@ declare interface Queryable {
2518
2580
  executeRaw(params: Query): Promise<Result_4<number>>;
2519
2581
  }
2520
2582
 
2583
+ declare type QueryCompiler = {
2584
+ compile(request: string): Promise<string>;
2585
+ };
2586
+
2587
+ declare interface QueryCompilerConstructor {
2588
+ new (options: QueryCompilerOptions): QueryCompiler;
2589
+ }
2590
+
2591
+ declare type QueryCompilerOptions = {
2592
+ datamodel: string;
2593
+ flavour: Flavour;
2594
+ connectionInfo: ConnectionInfo;
2595
+ };
2596
+
2521
2597
  declare type QueryEngineBatchGraphQLRequest = {
2522
2598
  batch: QueryEngineRequest[];
2523
2599
  transaction?: boolean;
@@ -2534,8 +2610,8 @@ declare type QueryEngineConfig = {
2534
2610
  datasourceOverrides: Record<string, string>;
2535
2611
  env: Record<string, string | undefined>;
2536
2612
  logLevel: QueryEngineLogLevel;
2537
- telemetry?: QueryEngineTelemetry;
2538
2613
  engineProtocol: EngineProtocol;
2614
+ enableTracing: boolean;
2539
2615
  };
2540
2616
 
2541
2617
  declare interface QueryEngineConstructor {
@@ -2543,20 +2619,20 @@ declare interface QueryEngineConstructor {
2543
2619
  }
2544
2620
 
2545
2621
  declare type QueryEngineInstance = {
2546
- connect(headers: string): Promise<void>;
2547
- disconnect(headers: string): Promise<void>;
2622
+ connect(headers: string, requestId: string): Promise<void>;
2623
+ disconnect(headers: string, requestId: string): Promise<void>;
2548
2624
  /**
2549
2625
  * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest`
2550
2626
  * @param headersStr JSON.stringified `QueryEngineRequestHeaders`
2551
2627
  */
2552
- query(requestStr: string, headersStr: string, transactionId?: string): Promise<string>;
2553
- sdlSchema(): Promise<string>;
2554
- dmmf(traceparent: string): Promise<string>;
2555
- startTransaction(options: string, traceHeaders: string): Promise<string>;
2556
- commitTransaction(id: string, traceHeaders: string): Promise<string>;
2557
- rollbackTransaction(id: string, traceHeaders: string): Promise<string>;
2558
- metrics(options: string): Promise<string>;
2559
- applyPendingMigrations(): Promise<void>;
2628
+ query(requestStr: string, headersStr: string, transactionId: string | undefined, requestId: string): Promise<string>;
2629
+ sdlSchema?(): Promise<string>;
2630
+ startTransaction(options: string, traceHeaders: string, requestId: string): Promise<string>;
2631
+ commitTransaction(id: string, traceHeaders: string, requestId: string): Promise<string>;
2632
+ rollbackTransaction(id: string, traceHeaders: string, requestId: string): Promise<string>;
2633
+ metrics?(options: string): Promise<string>;
2634
+ applyPendingMigrations?(): Promise<void>;
2635
+ trace(requestId: string): Promise<string | null>;
2560
2636
  };
2561
2637
 
2562
2638
  declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off';
@@ -2566,14 +2642,8 @@ declare type QueryEngineRequest = {
2566
2642
  variables: Object;
2567
2643
  };
2568
2644
 
2569
- declare type QueryEngineResult<T> = {
2645
+ declare type QueryEngineResultData<T> = {
2570
2646
  data: T;
2571
- elapsed: number;
2572
- };
2573
-
2574
- declare type QueryEngineTelemetry = {
2575
- enabled: Boolean;
2576
- endpoint: string;
2577
2647
  };
2578
2648
 
2579
2649
  declare type QueryEvent = {
@@ -2586,6 +2656,8 @@ declare type QueryEvent = {
2586
2656
 
2587
2657
  declare type QueryEventType = 'query';
2588
2658
 
2659
+ declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown';
2660
+
2589
2661
  declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise<unknown>) => Promise<unknown>;
2590
2662
 
2591
2663
  declare type QueryMiddlewareParams = {
@@ -2629,6 +2701,12 @@ export declare type RawParameters = {
2629
2701
 
2630
2702
  export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]];
2631
2703
 
2704
+ declare type RawResponse = {
2705
+ columns: string[];
2706
+ types: QueryIntrospectionBuiltinType[];
2707
+ rows: unknown[][];
2708
+ };
2709
+
2632
2710
  declare type RawTaggedValue = {
2633
2711
  $type: 'Raw';
2634
2712
  value: unknown;
@@ -2661,7 +2739,7 @@ declare type RequestBatchOptions<InteractiveTransactionPayload> = {
2661
2739
  traceparent?: string;
2662
2740
  numTry?: number;
2663
2741
  containsWrite: boolean;
2664
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
2742
+ customDataProxyFetch?: CustomDataProxyFetch;
2665
2743
  };
2666
2744
 
2667
2745
  declare interface RequestError {
@@ -2681,7 +2759,7 @@ declare class RequestHandler {
2681
2759
  private logEmitter?;
2682
2760
  constructor(client: Client, logEmitter?: LogEmitter);
2683
2761
  request(params: RequestParams): Promise<any>;
2684
- mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult<any>): any;
2762
+ mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData<any>): any;
2685
2763
  /**
2686
2764
  * Handles the error and logs it, logging the error is done synchronously waiting for the event
2687
2765
  * handlers to finish.
@@ -2693,18 +2771,12 @@ declare class RequestHandler {
2693
2771
  get [Symbol.toStringTag](): string;
2694
2772
  }
2695
2773
 
2696
- declare type RequestOptions = {
2697
- method?: string;
2698
- headers?: Record<string, string>;
2699
- body?: string;
2700
- };
2701
-
2702
- declare type RequestOptions_2<InteractiveTransactionPayload> = {
2774
+ declare type RequestOptions<InteractiveTransactionPayload> = {
2703
2775
  traceparent?: string;
2704
2776
  numTry?: number;
2705
2777
  interactiveTransaction?: InteractiveTransactionOptions<InteractiveTransactionPayload>;
2706
2778
  isWrite: boolean;
2707
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
2779
+ customDataProxyFetch?: CustomDataProxyFetch;
2708
2780
  };
2709
2781
 
2710
2782
  declare type RequestParams = {
@@ -2722,17 +2794,7 @@ declare type RequestParams = {
2722
2794
  otelParentCtx?: Context;
2723
2795
  otelChildCtx?: Context;
2724
2796
  globalOmit?: GlobalOmitOptions;
2725
- customDataProxyFetch?: (fetch: Fetch) => Fetch;
2726
- };
2727
-
2728
- declare type RequestResponse = {
2729
- ok: boolean;
2730
- url: string;
2731
- statusText?: string;
2732
- status: number;
2733
- headers: NodeHeaders;
2734
- text: () => Promise<string>;
2735
- json: () => Promise<any>;
2797
+ customDataProxyFetch?: CustomDataProxyFetch;
2736
2798
  };
2737
2799
 
2738
2800
  declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions;
@@ -3175,7 +3237,7 @@ export declare function sqltag(strings: readonly string[], ...values: readonly R
3175
3237
  *
3176
3238
  * hrtime, epoch milliseconds, performance.now() or Date
3177
3239
  */
3178
- declare type TimeInput = HrTime | number | Date;
3240
+ declare type TimeInput = HrTime_2 | number | Date;
3179
3241
 
3180
3242
  export declare type ToTuple<T> = T extends any[] ? T : [T];
3181
3243
 
@@ -3220,7 +3282,7 @@ declare interface TraceState {
3220
3282
  declare interface TracingHelper {
3221
3283
  isEnabled(): boolean;
3222
3284
  getTraceParent(context?: Context): string;
3223
- createEngineSpan(engineSpanEvent: EngineSpanEvent): void;
3285
+ dispatchEngineSpans(spans: EngineSpan[]): void;
3224
3286
  getActiveContext(): Context | undefined;
3225
3287
  runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
3226
3288
  }
@@ -3382,22 +3444,4 @@ export declare function warnEnvConflicts(envPaths: any): void;
3382
3444
 
3383
3445
  export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void;
3384
3446
 
3385
- declare type WasmLoadingConfig = {
3386
- /**
3387
- * WASM-bindgen runtime for corresponding module
3388
- */
3389
- getRuntime: () => {
3390
- __wbg_set_wasm(exports: unknown): any;
3391
- QueryEngine: QueryEngineConstructor;
3392
- };
3393
- /**
3394
- * Loads the raw wasm module for the wasm query engine. This configuration is
3395
- * generated specifically for each type of client, eg. Node.js client and Edge
3396
- * clients will have different implementations.
3397
- * @remarks this is a callback on purpose, we only load the wasm if needed.
3398
- * @remarks only used by LibraryEngine.ts
3399
- */
3400
- getQueryEngineWasmModule: () => Promise<unknown>;
3401
- };
3402
-
3403
3447
  export { }