expo-backend-types 0.32.0-EXPO-308-auth.1 → 0.32.0-EXPO-315-Marcelo-Tinelli.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.
- package/dist/src/exports.d.ts +2 -3
- package/dist/src/exports.js +2 -3
- package/dist/src/i18n/es.d.ts +63 -20
- package/dist/src/i18n/es.js +63 -20
- package/dist/src/i18n/es.js.map +1 -1
- package/dist/src/location/dto/find-all-location.dto.js +2 -2
- package/dist/src/{schema/location.schema.js → location/dto/location.dto.js} +2 -2
- package/dist/src/location/exports.d.ts +1 -0
- package/dist/src/location/exports.js +1 -0
- package/dist/src/message/dto/non-read-messages.dto.d.ts +2 -2
- package/dist/src/message/dto/non-read-messages.dto.js +2 -2
- package/dist/src/message/dto/send-message-to-phone.dto.d.ts +2 -2
- package/dist/src/message/dto/send-message-to-phone.dto.js +2 -2
- package/dist/src/message/dto/template.dto.d.ts +2 -2
- package/dist/src/profile/dto/create-profile.dto.d.ts +14 -48
- package/dist/src/profile/dto/create-profile.dto.js +7 -9
- package/dist/src/profile/dto/delete-profile.dto.d.ts +6 -30
- package/dist/src/profile/dto/delete-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-all-profile.dto.d.ts +7 -47
- package/dist/src/profile/dto/find-all-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-by-date-range-profile.dto.d.ts +11 -75
- package/dist/src/profile/dto/find-by-date-range-profile.dto.js +3 -3
- package/dist/src/profile/dto/find-by-id-profile.dto.d.ts +13 -32
- package/dist/src/profile/dto/find-by-id-profile.dto.js +5 -7
- package/dist/src/profile/dto/find-by-phone-number.dto.d.ts +6 -30
- package/dist/src/profile/dto/find-by-phone-number.dto.js +2 -2
- package/dist/src/profile/dto/find-by-tag-groups-profile.dto.d.ts +7 -47
- package/dist/src/profile/dto/find-by-tag-groups-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-by-tags-profile.dto.d.ts +7 -47
- package/dist/src/profile/dto/find-by-tags-profile.dto.js +2 -2
- package/dist/src/profile/dto/find-trash.dto.d.ts +3 -7
- package/dist/src/profile/dto/find-trash.dto.js +2 -2
- package/dist/src/profile/dto/find-with-active-chat.dto.d.ts +7 -47
- package/dist/src/profile/dto/find-with-active-chat.dto.js +2 -2
- package/dist/src/profile/dto/profile.dto.d.ts +30 -44
- package/dist/src/profile/dto/profile.dto.js +63 -6
- package/dist/src/profile/dto/update-profile.dto.d.ts +12 -54
- package/dist/src/profile/dto/update-profile.dto.js +6 -9
- package/dist/src/shared/dto-modification/zod-without-dates.d.ts +4 -2
- package/dist/src/shared/dto-modification/zod-without-dates.js +0 -8
- package/dist/src/shared/dto-modification/zod-without-dates.js.map +1 -1
- package/dist/src/tag/dto/massive-allocation.dto.d.ts +7 -47
- package/dist/src/tag/dto/massive-allocation.dto.js +3 -3
- package/dist/src/tag/dto/massive-deallocation.dto.d.ts +7 -47
- package/dist/src/tag/dto/massive-deallocation.dto.js +3 -3
- package/dist/src/ticket/dto/create-ticket.dto.d.ts +130 -0
- package/dist/src/ticket/dto/create-ticket.dto.js +20 -0
- package/dist/src/ticket/dto/delete-ticket.dto.d.ts +73 -0
- package/dist/src/ticket/dto/delete-ticket.dto.js +10 -0
- package/dist/src/ticket/dto/find-all-tickets.dto.d.ts +196 -0
- package/dist/src/ticket/dto/find-all-tickets.dto.js +23 -0
- package/dist/src/ticket/dto/find-by-event-ticket.dto.d.ts +196 -0
- package/dist/src/ticket/dto/find-by-event-ticket.dto.js +23 -0
- package/dist/src/ticket/dto/find-by-id-ticket.dto.d.ts +196 -0
- package/dist/src/ticket/dto/find-by-id-ticket.dto.js +20 -0
- package/dist/src/ticket/dto/find-by-mail-ticket.dto.d.ts +196 -0
- package/dist/src/ticket/dto/find-by-mail-ticket.dto.js +23 -0
- package/dist/src/ticket/dto/find-ticket.dto.d.ts +73 -0
- package/dist/src/ticket/dto/find-ticket.dto.js +10 -0
- package/dist/src/ticket/dto/generate-pdf.dto.d.ts +7 -0
- package/dist/src/ticket/dto/generate-pdf.dto.js +13 -0
- package/dist/src/ticket/dto/ticket.dto.d.ts +74 -0
- package/dist/src/ticket/dto/ticket.dto.js +29 -0
- package/dist/src/ticket/dto/update-ticket.dto.d.ts +121 -0
- package/dist/src/ticket/dto/update-ticket.dto.js +21 -0
- package/dist/src/ticket/exports.d.ts +10 -0
- package/dist/src/{otp → ticket}/exports.js +10 -2
- package/dist/types/prisma-schema/edge.js +47 -38
- package/dist/types/prisma-schema/index-browser.js +32 -18
- package/dist/types/prisma-schema/index.d.ts +4311 -5988
- package/dist/types/prisma-schema/index.js +47 -38
- package/dist/types/prisma-schema/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
- package/dist/types/prisma-schema/package.json +2 -8
- package/dist/types/prisma-schema/runtime/edge-esm.js +18 -18
- package/dist/types/prisma-schema/runtime/edge.js +18 -18
- package/dist/types/prisma-schema/runtime/index-browser.d.ts +1 -3
- package/dist/types/prisma-schema/runtime/index-browser.js +3 -3
- package/dist/types/prisma-schema/runtime/library.d.ts +153 -205
- package/dist/types/prisma-schema/runtime/library.js +55 -55
- package/dist/types/prisma-schema/runtime/react-native.js +26 -26
- package/dist/types/prisma-schema/runtime/wasm.js +17 -17
- package/dist/types/prisma-schema/schema.prisma +32 -23
- package/dist/types/prisma-schema/wasm.js +32 -18
- package/dist/types/schema.d.ts +334 -316
- package/package.json +41 -32
- package/dist/src/image/constants.d.ts +0 -5
- package/dist/src/image/constants.js +0 -9
- package/dist/src/mi-expo/dto/get-me.dto.d.ts +0 -337
- package/dist/src/mi-expo/dto/get-me.dto.js +0 -16
- package/dist/src/mi-expo/dto/login-with-phone.dto.d.ts +0 -311
- package/dist/src/mi-expo/dto/login-with-phone.dto.js +0 -29
- package/dist/src/mi-expo/dto/login.dto.d.ts +0 -327
- package/dist/src/mi-expo/dto/login.dto.js +0 -31
- package/dist/src/mi-expo/dto/update-me.dto.d.ts +0 -352
- package/dist/src/mi-expo/dto/update-me.dto.js +0 -31
- package/dist/src/mi-expo/exports.d.ts +0 -4
- package/dist/src/mi-expo/exports.js +0 -21
- package/dist/src/otp/constants.d.ts +0 -2
- package/dist/src/otp/constants.js +0 -6
- package/dist/src/otp/dto/send-otp.dto.d.ts +0 -158
- package/dist/src/otp/dto/send-otp.dto.js +0 -35
- package/dist/src/otp/dto/verify-otp.dto.d.ts +0 -455
- package/dist/src/otp/dto/verify-otp.dto.js +0 -46
- package/dist/src/otp/exports.d.ts +0 -2
- package/dist/src/prisma/constants.d.ts +0 -1
- package/dist/src/prisma/constants.js +0 -5
- package/dist/src/schema/exports.d.ts +0 -2
- package/dist/src/schema/exports.js +0 -19
- package/dist/src/schema/profile.schema.d.ts +0 -74
- package/dist/src/schema/profile.schema.js +0 -133
- package/dist/src/webhook/constants.d.ts +0 -1
- package/dist/src/webhook/constants.js +0 -5
- /package/dist/src/{schema/location.schema.d.ts → location/dto/location.dto.d.ts} +0 -0
@@ -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'>;
|
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> =
|
104
|
+
declare type BatchQueryEngineResult<T> = QueryEngineResult<T> | Error;
|
105
105
|
|
106
106
|
declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise<any>;
|
107
107
|
|
@@ -193,24 +193,6 @@ 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
|
-
|
214
196
|
export declare type Compute<T> = T extends Function ? T : {
|
215
197
|
[K in keyof T]: T[K];
|
216
198
|
} & unknown;
|
@@ -234,7 +216,7 @@ declare type ConnectionInfo = {
|
|
234
216
|
maxBindValues?: number;
|
235
217
|
};
|
236
218
|
|
237
|
-
declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | '
|
219
|
+
declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb';
|
238
220
|
|
239
221
|
declare interface Context {
|
240
222
|
/**
|
@@ -284,38 +266,7 @@ export declare type Count<O> = {
|
|
284
266
|
[K in keyof O]: Count<number>;
|
285
267
|
} & {};
|
286
268
|
|
287
|
-
|
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;
|
269
|
+
declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch;
|
319
270
|
|
320
271
|
declare class DataLoader<T = unknown> {
|
321
272
|
private options;
|
@@ -373,8 +324,6 @@ declare function debugCreate(namespace: string): ((...args: any[]) => void) & {
|
|
373
324
|
extend: () => void;
|
374
325
|
};
|
375
326
|
|
376
|
-
export declare function Decimal(n: Decimal.Value): Decimal;
|
377
|
-
|
378
327
|
export declare namespace Decimal {
|
379
328
|
export type Constructor = typeof Decimal;
|
380
329
|
export type Instance = Decimal;
|
@@ -670,12 +619,8 @@ declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Clien
|
|
670
619
|
|
671
620
|
declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"];
|
672
621
|
|
673
|
-
declare type DeserializedResponse = Array<Record<string, unknown>>;
|
674
|
-
|
675
622
|
export declare function deserializeJsonResponse(result: unknown): unknown;
|
676
623
|
|
677
|
-
export declare function deserializeRawResult(response: RawResponse): DeserializedResponse;
|
678
|
-
|
679
624
|
export declare type DevTypeMapDef = {
|
680
625
|
meta: {
|
681
626
|
modelProps: string;
|
@@ -744,7 +689,6 @@ export declare namespace DMMF {
|
|
744
689
|
export type Model = ReadonlyDeep_2<{
|
745
690
|
name: string;
|
746
691
|
dbName: string | null;
|
747
|
-
schema: string | null;
|
748
692
|
fields: Field[];
|
749
693
|
uniqueFields: string[][];
|
750
694
|
uniqueIndexes: uniqueIndex[];
|
@@ -770,25 +714,18 @@ export declare namespace DMMF {
|
|
770
714
|
* BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
|
771
715
|
*/
|
772
716
|
type: string;
|
773
|
-
/**
|
774
|
-
* Native database type, if specified.
|
775
|
-
* For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`,
|
776
|
-
* `@db.Text` is encoded as `['Text', []]`.
|
777
|
-
*/
|
778
|
-
nativeType?: [string, string[]] | null;
|
779
717
|
dbName?: string | null;
|
780
718
|
hasDefaultValue: boolean;
|
781
719
|
default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
|
782
720
|
relationFromFields?: string[];
|
783
721
|
relationToFields?: string[];
|
784
722
|
relationOnDelete?: string;
|
785
|
-
relationOnUpdate?: string;
|
786
723
|
relationName?: string;
|
787
724
|
documentation?: string;
|
788
725
|
}>;
|
789
726
|
export type FieldDefault = ReadonlyDeep_2<{
|
790
727
|
name: string;
|
791
|
-
args:
|
728
|
+
args: any[];
|
792
729
|
}>;
|
793
730
|
export type FieldDefaultScalar = string | boolean | number;
|
794
731
|
export type Index = ReadonlyDeep_2<{
|
@@ -902,7 +839,6 @@ export declare namespace DMMF {
|
|
902
839
|
createManyAndReturn?: string | null;
|
903
840
|
update?: string | null;
|
904
841
|
updateMany?: string | null;
|
905
|
-
updateManyAndReturn?: string | null;
|
906
842
|
upsert?: string | null;
|
907
843
|
delete?: string | null;
|
908
844
|
deleteMany?: string | null;
|
@@ -923,7 +859,6 @@ export declare namespace DMMF {
|
|
923
859
|
createManyAndReturn = "createManyAndReturn",
|
924
860
|
update = "update",
|
925
861
|
updateMany = "updateMany",
|
926
|
-
updateManyAndReturn = "updateManyAndReturn",
|
927
862
|
upsert = "upsert",
|
928
863
|
delete = "delete",
|
929
864
|
deleteMany = "deleteMany",
|
@@ -1102,7 +1037,7 @@ declare interface Engine<InteractiveTransactionPayload = unknown> {
|
|
1102
1037
|
start(): Promise<void>;
|
1103
1038
|
stop(): Promise<void>;
|
1104
1039
|
version(forceRun?: boolean): Promise<string> | string;
|
1105
|
-
request<T>(query: JsonQuery, options:
|
1040
|
+
request<T>(query: JsonQuery, options: RequestOptions_2<InteractiveTransactionPayload>): Promise<QueryEngineResult<T>>;
|
1106
1041
|
requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
|
1107
1042
|
transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise<Transaction_2.InteractiveTransactionInfo<unknown>>;
|
1108
1043
|
transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
|
@@ -1120,9 +1055,6 @@ declare interface EngineConfig {
|
|
1120
1055
|
allowTriggerPanic?: boolean;
|
1121
1056
|
prismaPath?: string;
|
1122
1057
|
generator?: GeneratorConfig;
|
1123
|
-
/**
|
1124
|
-
* @remarks this field is used internally by Policy, do not rename or remove
|
1125
|
-
*/
|
1126
1058
|
overrideDatasources: Datasources;
|
1127
1059
|
showColors?: boolean;
|
1128
1060
|
logQueries?: boolean;
|
@@ -1151,7 +1083,6 @@ declare interface EngineConfig {
|
|
1151
1083
|
/**
|
1152
1084
|
* The contents of the datasource url saved in a string
|
1153
1085
|
* @remarks only used by DataProxyEngine.ts
|
1154
|
-
* @remarks this field is used internally by Policy, do not rename or remove
|
1155
1086
|
*/
|
1156
1087
|
inlineDatasources: GetPrismaClientConfig['inlineDatasources'];
|
1157
1088
|
/**
|
@@ -1173,8 +1104,7 @@ declare interface EngineConfig {
|
|
1173
1104
|
/**
|
1174
1105
|
* Web Assembly module loading configuration
|
1175
1106
|
*/
|
1176
|
-
engineWasm?:
|
1177
|
-
compilerWasm?: CompilerWasmLoadingConfig;
|
1107
|
+
engineWasm?: WasmLoadingConfig;
|
1178
1108
|
/**
|
1179
1109
|
* Allows Accelerate to use runtime utilities from the client. These are
|
1180
1110
|
* necessary for the AccelerateEngine to function correctly.
|
@@ -1199,38 +1129,28 @@ declare type EngineEventType = QueryEventType | LogEventType;
|
|
1199
1129
|
declare type EngineProtocol = 'graphql' | 'json';
|
1200
1130
|
|
1201
1131
|
declare type EngineSpan = {
|
1202
|
-
|
1203
|
-
parentId: string | null;
|
1132
|
+
span: boolean;
|
1204
1133
|
name: string;
|
1205
|
-
|
1206
|
-
|
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
|
+
}[];
|
1207
1144
|
kind: EngineSpanKind;
|
1208
|
-
attributes?: Record<string, unknown>;
|
1209
|
-
links?: EngineSpanId[];
|
1210
1145
|
};
|
1211
1146
|
|
1212
|
-
declare type
|
1147
|
+
declare type EngineSpanEvent = {
|
1148
|
+
span: boolean;
|
1149
|
+
spans: EngineSpan[];
|
1150
|
+
};
|
1213
1151
|
|
1214
1152
|
declare type EngineSpanKind = 'client' | 'internal';
|
1215
1153
|
|
1216
|
-
declare type EngineWasmLoadingConfig = {
|
1217
|
-
/**
|
1218
|
-
* WASM-bindgen runtime for corresponding module
|
1219
|
-
*/
|
1220
|
-
getRuntime: () => {
|
1221
|
-
__wbg_set_wasm(exports: unknown): any;
|
1222
|
-
QueryEngine: QueryEngineConstructor;
|
1223
|
-
};
|
1224
|
-
/**
|
1225
|
-
* Loads the raw wasm module for the wasm query engine. This configuration is
|
1226
|
-
* generated specifically for each type of client, eg. Node.js client and Edge
|
1227
|
-
* clients will have different implementations.
|
1228
|
-
* @remarks this is a callback on purpose, we only load the wasm if needed.
|
1229
|
-
* @remarks only used by LibraryEngine
|
1230
|
-
*/
|
1231
|
-
getQueryEngineWasmModule: () => Promise<unknown>;
|
1232
|
-
};
|
1233
|
-
|
1234
1154
|
declare type EnvPaths = {
|
1235
1155
|
rootEnvPath: string | null;
|
1236
1156
|
schemaEnvPath: string | undefined;
|
@@ -1250,7 +1170,7 @@ declare type Error_2 = {
|
|
1250
1170
|
kind: 'UnsupportedNativeDataType';
|
1251
1171
|
type: string;
|
1252
1172
|
} | {
|
1253
|
-
kind: '
|
1173
|
+
kind: 'Postgres';
|
1254
1174
|
code: string;
|
1255
1175
|
severity: string;
|
1256
1176
|
message: string;
|
@@ -1258,12 +1178,12 @@ declare type Error_2 = {
|
|
1258
1178
|
column: string | undefined;
|
1259
1179
|
hint: string | undefined;
|
1260
1180
|
} | {
|
1261
|
-
kind: '
|
1181
|
+
kind: 'Mysql';
|
1262
1182
|
code: number;
|
1263
1183
|
message: string;
|
1264
1184
|
state: string;
|
1265
1185
|
} | {
|
1266
|
-
kind: '
|
1186
|
+
kind: 'Sqlite';
|
1267
1187
|
/**
|
1268
1188
|
* Sqlite extended error code: https://www.sqlite.org/rescode.html
|
1269
1189
|
*/
|
@@ -1428,6 +1348,8 @@ export declare type ExtractGlobalOmit<Options, ModelName extends string> = Optio
|
|
1428
1348
|
};
|
1429
1349
|
} ? GlobalOmit : {};
|
1430
1350
|
|
1351
|
+
declare type Fetch = typeof nodeFetch;
|
1352
|
+
|
1431
1353
|
/**
|
1432
1354
|
* A reference to a specific field of a specific model
|
1433
1355
|
*/
|
@@ -1474,7 +1396,7 @@ export declare type GetAggregateResult<P extends OperationPayload, A> = {
|
|
1474
1396
|
};
|
1475
1397
|
};
|
1476
1398
|
|
1477
|
-
declare function getBatchRequestPayload(batch: JsonQuery[], transaction?:
|
1399
|
+
declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2<unknown>): QueryEngineBatchRequest;
|
1478
1400
|
|
1479
1401
|
export declare type GetBatchResult = {
|
1480
1402
|
count: number;
|
@@ -1498,9 +1420,7 @@ export declare type GetFindResult<P extends OperationPayload, A, ClientOptions>
|
|
1498
1420
|
} ? O : K extends '_count' ? Count<P['objects']> : never;
|
1499
1421
|
} & (A extends {
|
1500
1422
|
include: any;
|
1501
|
-
} & Record<string, unknown> ? DefaultSelection<P, A
|
1502
|
-
omit: A['omit'];
|
1503
|
-
}, ClientOptions> : unknown) : DefaultSelection<P, A, ClientOptions>;
|
1423
|
+
} & Record<string, unknown> ? DefaultSelection<P, A, ClientOptions> : unknown) : DefaultSelection<P, A, ClientOptions>;
|
1504
1424
|
|
1505
1425
|
export declare type GetGroupByResult<P extends OperationPayload, A> = A extends {
|
1506
1426
|
by: string[];
|
@@ -1538,14 +1458,12 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
1538
1458
|
_clientVersion: string;
|
1539
1459
|
_errorFormat: ErrorFormat;
|
1540
1460
|
_tracingHelper: TracingHelper;
|
1461
|
+
_metrics: MetricsClient;
|
1541
1462
|
_middlewares: MiddlewareHandler<QueryMiddleware>;
|
1542
1463
|
_previewFeatures: string[];
|
1543
1464
|
_activeProvider: string;
|
1544
1465
|
_globalOmit?: GlobalOmitOptions | undefined;
|
1545
1466
|
_extensions: MergedExtensionsList;
|
1546
|
-
/**
|
1547
|
-
* @remarks This is used internally by Policy, do not rename or remove
|
1548
|
-
*/
|
1549
1467
|
_engine: Engine;
|
1550
1468
|
/**
|
1551
1469
|
* A fully constructed/applied Client that references the parent
|
@@ -1576,7 +1494,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
1576
1494
|
* @param values
|
1577
1495
|
* @returns
|
1578
1496
|
*/
|
1579
|
-
$executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown
|
1497
|
+
$executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
|
1580
1498
|
/**
|
1581
1499
|
* Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections
|
1582
1500
|
* @see https://github.com/prisma/prisma/issues/7142
|
@@ -1585,14 +1503,14 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
1585
1503
|
* @param values
|
1586
1504
|
* @returns
|
1587
1505
|
*/
|
1588
|
-
$executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown
|
1506
|
+
$executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
|
1589
1507
|
/**
|
1590
1508
|
* Executes a raw command only for MongoDB
|
1591
1509
|
*
|
1592
1510
|
* @param command
|
1593
1511
|
* @returns
|
1594
1512
|
*/
|
1595
|
-
$runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown
|
1513
|
+
$runCommandRaw(command: Record<string, JsInputValue>): PrismaPromise_2<unknown>;
|
1596
1514
|
/**
|
1597
1515
|
* Executes a raw query and returns selected data
|
1598
1516
|
*/
|
@@ -1605,12 +1523,12 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
1605
1523
|
* @param values
|
1606
1524
|
* @returns
|
1607
1525
|
*/
|
1608
|
-
$queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown
|
1526
|
+
$queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
|
1609
1527
|
/**
|
1610
1528
|
* Counterpart to $queryRaw, that returns strongly typed results
|
1611
1529
|
* @param typedSql
|
1612
1530
|
*/
|
1613
|
-
$queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown
|
1531
|
+
$queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown>;
|
1614
1532
|
/**
|
1615
1533
|
* Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections
|
1616
1534
|
* @see https://github.com/prisma/prisma/issues/7142
|
@@ -1619,7 +1537,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
1619
1537
|
* @param values
|
1620
1538
|
* @returns
|
1621
1539
|
*/
|
1622
|
-
$queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown
|
1540
|
+
$queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2<unknown>;
|
1623
1541
|
/**
|
1624
1542
|
* Execute a batch of requests in a transaction
|
1625
1543
|
* @param requests
|
@@ -1637,7 +1555,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
1637
1555
|
*/
|
1638
1556
|
_transactionWithCallback({ callback, options, }: {
|
1639
1557
|
callback: (client: Client) => Promise<unknown>;
|
1640
|
-
options?:
|
1558
|
+
options?: Options;
|
1641
1559
|
}): Promise<unknown>;
|
1642
1560
|
_createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client;
|
1643
1561
|
/**
|
@@ -1654,7 +1572,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
1654
1572
|
*/
|
1655
1573
|
_request(internalParams: InternalRequestParams): Promise<any>;
|
1656
1574
|
_executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise<any>;
|
1657
|
-
$metrics: MetricsClient;
|
1575
|
+
readonly $metrics: MetricsClient;
|
1658
1576
|
/**
|
1659
1577
|
* Shortcut for checking a preview flag
|
1660
1578
|
* @param feature preview flag
|
@@ -1742,8 +1660,7 @@ declare type GetPrismaClientConfig = {
|
|
1742
1660
|
/**
|
1743
1661
|
* Optional wasm loading configuration
|
1744
1662
|
*/
|
1745
|
-
engineWasm?:
|
1746
|
-
compilerWasm?: CompilerWasmLoadingConfig;
|
1663
|
+
engineWasm?: WasmLoadingConfig;
|
1747
1664
|
};
|
1748
1665
|
|
1749
1666
|
export declare type GetResult<Payload extends OperationPayload, Args, OperationName extends Operation = 'findUniqueOrThrow', ClientOptions = {}> = {
|
@@ -1757,7 +1674,6 @@ export declare type GetResult<Payload extends OperationPayload, Args, OperationN
|
|
1757
1674
|
createManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
|
1758
1675
|
update: GetFindResult<Payload, Args, ClientOptions>;
|
1759
1676
|
updateMany: GetBatchResult;
|
1760
|
-
updateManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
|
1761
1677
|
upsert: GetFindResult<Payload, Args, ClientOptions>;
|
1762
1678
|
delete: GetFindResult<Payload, Args, ClientOptions>;
|
1763
1679
|
deleteMany: GetBatchResult;
|
@@ -1802,8 +1718,6 @@ declare type HandleErrorParams = {
|
|
1802
1718
|
globalOmit?: GlobalOmitOptions;
|
1803
1719
|
};
|
1804
1720
|
|
1805
|
-
declare type HrTime = [number, number];
|
1806
|
-
|
1807
1721
|
/**
|
1808
1722
|
* Defines High-Resolution Time.
|
1809
1723
|
*
|
@@ -1816,7 +1730,7 @@ declare type HrTime = [number, number];
|
|
1816
1730
|
* HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000.
|
1817
1731
|
* This is represented in HrTime format as [1609504210, 150000000].
|
1818
1732
|
*/
|
1819
|
-
declare type
|
1733
|
+
declare type HrTime = [number, number];
|
1820
1734
|
|
1821
1735
|
/**
|
1822
1736
|
* Matches a JSON array.
|
@@ -1922,10 +1836,10 @@ declare type InternalRequestParams = {
|
|
1922
1836
|
/** Used to convert args for middleware and back */
|
1923
1837
|
middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>;
|
1924
1838
|
/** Used for Accelerate client extension via Data Proxy */
|
1925
|
-
customDataProxyFetch?:
|
1839
|
+
customDataProxyFetch?: (fetch: Fetch) => Fetch;
|
1926
1840
|
} & Omit<QueryMiddlewareParams, 'runInTransaction'>;
|
1927
1841
|
|
1928
|
-
declare
|
1842
|
+
declare enum IsolationLevel {
|
1929
1843
|
ReadUncommitted = "ReadUncommitted",
|
1930
1844
|
ReadCommitted = "ReadCommitted",
|
1931
1845
|
RepeatableRead = "RepeatableRead",
|
@@ -2008,7 +1922,7 @@ export declare type JsonQuery = {
|
|
2008
1922
|
query: JsonFieldSelection;
|
2009
1923
|
};
|
2010
1924
|
|
2011
|
-
declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | '
|
1925
|
+
declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw';
|
2012
1926
|
|
2013
1927
|
declare type JsonSelectionSet = {
|
2014
1928
|
$scalars?: boolean;
|
@@ -2168,8 +2082,8 @@ export declare type Metrics = {
|
|
2168
2082
|
};
|
2169
2083
|
|
2170
2084
|
export declare class MetricsClient {
|
2171
|
-
private
|
2172
|
-
constructor(
|
2085
|
+
private _engine;
|
2086
|
+
constructor(engine: Engine);
|
2173
2087
|
/**
|
2174
2088
|
* Returns all metrics gathered up to this point in prometheus format.
|
2175
2089
|
* Result of this call can be exposed directly to prometheus scraping endpoint
|
@@ -2252,6 +2166,37 @@ export declare type Narrowable = string | number | bigint | boolean | [];
|
|
2252
2166
|
|
2253
2167
|
export declare type NeverToUnknown<T> = [T] extends [never] ? unknown : T;
|
2254
2168
|
|
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
|
+
|
2255
2200
|
declare class NullTypesEnumValue extends ObjectEnumValue {
|
2256
2201
|
_getNamespace(): string;
|
2257
2202
|
}
|
@@ -2295,7 +2240,7 @@ export { Omit_2 as Omit }
|
|
2295
2240
|
|
2296
2241
|
export declare type OmitValue<Omit, Key> = Key extends keyof Omit ? Omit[Key] : false;
|
2297
2242
|
|
2298
|
-
export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | '
|
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';
|
2299
2244
|
|
2300
2245
|
export declare type OperationPayload = {
|
2301
2246
|
name: string;
|
@@ -2325,6 +2270,12 @@ export declare type OptionalKeys<O> = {
|
|
2325
2270
|
}[keyof O];
|
2326
2271
|
|
2327
2272
|
declare type Options = {
|
2273
|
+
maxWait?: number;
|
2274
|
+
timeout?: number;
|
2275
|
+
isolationLevel?: IsolationLevel;
|
2276
|
+
};
|
2277
|
+
|
2278
|
+
declare type Options_2 = {
|
2328
2279
|
clientVersion: string;
|
2329
2280
|
};
|
2330
2281
|
|
@@ -2339,12 +2290,6 @@ export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
|
|
2339
2290
|
};
|
2340
2291
|
}[A][B];
|
2341
2292
|
|
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
|
-
|
2348
2293
|
export declare type PatchFlat<O1, O2> = O1 & Omit_2<O2, keyof O1>;
|
2349
2294
|
|
2350
2295
|
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;
|
@@ -2456,18 +2401,12 @@ export declare class PrismaClientUnknownRequestError extends Error implements Er
|
|
2456
2401
|
export declare class PrismaClientValidationError extends Error {
|
2457
2402
|
name: string;
|
2458
2403
|
clientVersion: string;
|
2459
|
-
constructor(message: string, { clientVersion }:
|
2404
|
+
constructor(message: string, { clientVersion }: Options_2);
|
2460
2405
|
get [Symbol.toStringTag](): string;
|
2461
2406
|
}
|
2462
2407
|
|
2463
2408
|
declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError;
|
2464
2409
|
|
2465
|
-
declare type PrismaOperationSpec<TArgs, TAction = string> = {
|
2466
|
-
args: TArgs;
|
2467
|
-
action: TAction;
|
2468
|
-
model: string;
|
2469
|
-
};
|
2470
|
-
|
2471
2410
|
export declare interface PrismaPromise<T> extends Promise<T> {
|
2472
2411
|
[Symbol.toStringTag]: 'PrismaPromise';
|
2473
2412
|
}
|
@@ -2477,27 +2416,26 @@ export declare interface PrismaPromise<T> extends Promise<T> {
|
|
2477
2416
|
* original `Promise` are optional so that it can be backwards-compatible.
|
2478
2417
|
* @see [[createPrismaPromise]]
|
2479
2418
|
*/
|
2480
|
-
declare interface PrismaPromise_2<
|
2481
|
-
get spec(): TSpec;
|
2419
|
+
declare interface PrismaPromise_2<A> extends Promise<A> {
|
2482
2420
|
/**
|
2483
2421
|
* Extension of the original `.then` function
|
2484
2422
|
* @param onfulfilled same as regular promises
|
2485
2423
|
* @param onrejected same as regular promises
|
2486
2424
|
* @param transaction transaction options
|
2487
2425
|
*/
|
2488
|
-
then<R1 =
|
2426
|
+
then<R1 = A, R2 = never>(onfulfilled?: (value: A) => R1 | PromiseLike<R1>, onrejected?: (error: unknown) => R2 | PromiseLike<R2>, transaction?: PrismaPromiseTransaction): Promise<R1 | R2>;
|
2489
2427
|
/**
|
2490
2428
|
* Extension of the original `.catch` function
|
2491
2429
|
* @param onrejected same as regular promises
|
2492
2430
|
* @param transaction transaction options
|
2493
2431
|
*/
|
2494
|
-
catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<
|
2432
|
+
catch<R = never>(onrejected?: ((reason: any) => R | PromiseLike<R>) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<A | R>;
|
2495
2433
|
/**
|
2496
2434
|
* Extension of the original `.finally` function
|
2497
2435
|
* @param onfinally same as regular promises
|
2498
2436
|
* @param transaction transaction options
|
2499
2437
|
*/
|
2500
|
-
finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<
|
2438
|
+
finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise<A>;
|
2501
2439
|
/**
|
2502
2440
|
* Called when executing a batch of regular tx
|
2503
2441
|
* @param transaction transaction options for batch tx
|
@@ -2513,7 +2451,7 @@ declare type PrismaPromiseBatchTransaction = {
|
|
2513
2451
|
lock: PromiseLike<void>;
|
2514
2452
|
};
|
2515
2453
|
|
2516
|
-
declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) =>
|
2454
|
+
declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2<unknown>;
|
2517
2455
|
|
2518
2456
|
/**
|
2519
2457
|
* Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which
|
@@ -2524,7 +2462,7 @@ declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) =>
|
|
2524
2462
|
* @see [[PrismaPromise]]
|
2525
2463
|
* @returns
|
2526
2464
|
*/
|
2527
|
-
declare type PrismaPromiseFactory =
|
2465
|
+
declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2<unknown>;
|
2528
2466
|
|
2529
2467
|
declare type PrismaPromiseInteractiveTransaction<PayloadType = unknown> = {
|
2530
2468
|
kind: 'itx';
|
@@ -2536,8 +2474,6 @@ declare type PrismaPromiseTransaction<PayloadType = unknown> = PrismaPromiseBatc
|
|
2536
2474
|
|
2537
2475
|
export declare const PrivateResultType: unique symbol;
|
2538
2476
|
|
2539
|
-
declare type Provider = 'mysql' | 'postgres' | 'sqlite';
|
2540
|
-
|
2541
2477
|
declare namespace Public {
|
2542
2478
|
export {
|
2543
2479
|
validator
|
@@ -2563,7 +2499,7 @@ declare type Query = {
|
|
2563
2499
|
};
|
2564
2500
|
|
2565
2501
|
declare interface Queryable {
|
2566
|
-
readonly provider:
|
2502
|
+
readonly provider: 'mysql' | 'postgres' | 'sqlite';
|
2567
2503
|
readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {});
|
2568
2504
|
/**
|
2569
2505
|
* Execute a query given as SQL, interpolating the given parameters,
|
@@ -2582,20 +2518,6 @@ declare interface Queryable {
|
|
2582
2518
|
executeRaw(params: Query): Promise<Result_4<number>>;
|
2583
2519
|
}
|
2584
2520
|
|
2585
|
-
declare type QueryCompiler = {
|
2586
|
-
compile(request: string): Promise<string>;
|
2587
|
-
};
|
2588
|
-
|
2589
|
-
declare interface QueryCompilerConstructor {
|
2590
|
-
new (options: QueryCompilerOptions): QueryCompiler;
|
2591
|
-
}
|
2592
|
-
|
2593
|
-
declare type QueryCompilerOptions = {
|
2594
|
-
datamodel: string;
|
2595
|
-
provider: Provider;
|
2596
|
-
connectionInfo: ConnectionInfo;
|
2597
|
-
};
|
2598
|
-
|
2599
2521
|
declare type QueryEngineBatchGraphQLRequest = {
|
2600
2522
|
batch: QueryEngineRequest[];
|
2601
2523
|
transaction?: boolean;
|
@@ -2612,8 +2534,8 @@ declare type QueryEngineConfig = {
|
|
2612
2534
|
datasourceOverrides: Record<string, string>;
|
2613
2535
|
env: Record<string, string | undefined>;
|
2614
2536
|
logLevel: QueryEngineLogLevel;
|
2537
|
+
telemetry?: QueryEngineTelemetry;
|
2615
2538
|
engineProtocol: EngineProtocol;
|
2616
|
-
enableTracing: boolean;
|
2617
2539
|
};
|
2618
2540
|
|
2619
2541
|
declare interface QueryEngineConstructor {
|
@@ -2621,20 +2543,20 @@ declare interface QueryEngineConstructor {
|
|
2621
2543
|
}
|
2622
2544
|
|
2623
2545
|
declare type QueryEngineInstance = {
|
2624
|
-
connect(headers: string
|
2625
|
-
disconnect(headers: string
|
2546
|
+
connect(headers: string): Promise<void>;
|
2547
|
+
disconnect(headers: string): Promise<void>;
|
2626
2548
|
/**
|
2627
2549
|
* @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest`
|
2628
2550
|
* @param headersStr JSON.stringified `QueryEngineRequestHeaders`
|
2629
2551
|
*/
|
2630
|
-
query(requestStr: string, headersStr: string, transactionId
|
2631
|
-
sdlSchema
|
2632
|
-
|
2633
|
-
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2637
|
-
|
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>;
|
2638
2560
|
};
|
2639
2561
|
|
2640
2562
|
declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off';
|
@@ -2644,8 +2566,14 @@ declare type QueryEngineRequest = {
|
|
2644
2566
|
variables: Object;
|
2645
2567
|
};
|
2646
2568
|
|
2647
|
-
declare type
|
2569
|
+
declare type QueryEngineResult<T> = {
|
2648
2570
|
data: T;
|
2571
|
+
elapsed: number;
|
2572
|
+
};
|
2573
|
+
|
2574
|
+
declare type QueryEngineTelemetry = {
|
2575
|
+
enabled: Boolean;
|
2576
|
+
endpoint: string;
|
2649
2577
|
};
|
2650
2578
|
|
2651
2579
|
declare type QueryEvent = {
|
@@ -2658,8 +2586,6 @@ declare type QueryEvent = {
|
|
2658
2586
|
|
2659
2587
|
declare type QueryEventType = 'query';
|
2660
2588
|
|
2661
|
-
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';
|
2662
|
-
|
2663
2589
|
declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise<unknown>) => Promise<unknown>;
|
2664
2590
|
|
2665
2591
|
declare type QueryMiddlewareParams = {
|
@@ -2703,12 +2629,6 @@ export declare type RawParameters = {
|
|
2703
2629
|
|
2704
2630
|
export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]];
|
2705
2631
|
|
2706
|
-
declare type RawResponse = {
|
2707
|
-
columns: string[];
|
2708
|
-
types: QueryIntrospectionBuiltinType[];
|
2709
|
-
rows: unknown[][];
|
2710
|
-
};
|
2711
|
-
|
2712
2632
|
declare type RawTaggedValue = {
|
2713
2633
|
$type: 'Raw';
|
2714
2634
|
value: unknown;
|
@@ -2737,11 +2657,11 @@ export declare type RenameAndNestPayloadKeys<P> = {
|
|
2737
2657
|
};
|
2738
2658
|
|
2739
2659
|
declare type RequestBatchOptions<InteractiveTransactionPayload> = {
|
2740
|
-
transaction?:
|
2660
|
+
transaction?: TransactionOptions_2<InteractiveTransactionPayload>;
|
2741
2661
|
traceparent?: string;
|
2742
2662
|
numTry?: number;
|
2743
2663
|
containsWrite: boolean;
|
2744
|
-
customDataProxyFetch?:
|
2664
|
+
customDataProxyFetch?: (fetch: Fetch) => Fetch;
|
2745
2665
|
};
|
2746
2666
|
|
2747
2667
|
declare interface RequestError {
|
@@ -2761,7 +2681,7 @@ declare class RequestHandler {
|
|
2761
2681
|
private logEmitter?;
|
2762
2682
|
constructor(client: Client, logEmitter?: LogEmitter);
|
2763
2683
|
request(params: RequestParams): Promise<any>;
|
2764
|
-
mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response:
|
2684
|
+
mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult<any>): any;
|
2765
2685
|
/**
|
2766
2686
|
* Handles the error and logs it, logging the error is done synchronously waiting for the event
|
2767
2687
|
* handlers to finish.
|
@@ -2773,12 +2693,18 @@ declare class RequestHandler {
|
|
2773
2693
|
get [Symbol.toStringTag](): string;
|
2774
2694
|
}
|
2775
2695
|
|
2776
|
-
declare type RequestOptions
|
2696
|
+
declare type RequestOptions = {
|
2697
|
+
method?: string;
|
2698
|
+
headers?: Record<string, string>;
|
2699
|
+
body?: string;
|
2700
|
+
};
|
2701
|
+
|
2702
|
+
declare type RequestOptions_2<InteractiveTransactionPayload> = {
|
2777
2703
|
traceparent?: string;
|
2778
2704
|
numTry?: number;
|
2779
2705
|
interactiveTransaction?: InteractiveTransactionOptions<InteractiveTransactionPayload>;
|
2780
2706
|
isWrite: boolean;
|
2781
|
-
customDataProxyFetch?:
|
2707
|
+
customDataProxyFetch?: (fetch: Fetch) => Fetch;
|
2782
2708
|
};
|
2783
2709
|
|
2784
2710
|
declare type RequestParams = {
|
@@ -2796,7 +2722,17 @@ declare type RequestParams = {
|
|
2796
2722
|
otelParentCtx?: Context;
|
2797
2723
|
otelChildCtx?: Context;
|
2798
2724
|
globalOmit?: GlobalOmitOptions;
|
2799
|
-
customDataProxyFetch?:
|
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>;
|
2800
2736
|
};
|
2801
2737
|
|
2802
2738
|
declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions;
|
@@ -3239,7 +3175,7 @@ export declare function sqltag(strings: readonly string[], ...values: readonly R
|
|
3239
3175
|
*
|
3240
3176
|
* hrtime, epoch milliseconds, performance.now() or Date
|
3241
3177
|
*/
|
3242
|
-
declare type TimeInput =
|
3178
|
+
declare type TimeInput = HrTime | number | Date;
|
3243
3179
|
|
3244
3180
|
export declare type ToTuple<T> = T extends any[] ? T : [T];
|
3245
3181
|
|
@@ -3284,7 +3220,7 @@ declare interface TraceState {
|
|
3284
3220
|
declare interface TracingHelper {
|
3285
3221
|
isEnabled(): boolean;
|
3286
3222
|
getTraceParent(context?: Context): string;
|
3287
|
-
|
3223
|
+
createEngineSpan(engineSpanEvent: EngineSpanEvent): void;
|
3288
3224
|
getActiveContext(): Context | undefined;
|
3289
3225
|
runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
|
3290
3226
|
}
|
@@ -3307,7 +3243,7 @@ declare interface Transaction extends Queryable {
|
|
3307
3243
|
declare namespace Transaction_2 {
|
3308
3244
|
export {
|
3309
3245
|
IsolationLevel,
|
3310
|
-
|
3246
|
+
Options,
|
3311
3247
|
InteractiveTransactionInfo,
|
3312
3248
|
TransactionHeaders
|
3313
3249
|
}
|
@@ -3328,13 +3264,7 @@ declare type TransactionOptions = {
|
|
3328
3264
|
usePhantomQuery: boolean;
|
3329
3265
|
};
|
3330
3266
|
|
3331
|
-
declare type TransactionOptions_2 = {
|
3332
|
-
maxWait?: number;
|
3333
|
-
timeout?: number;
|
3334
|
-
isolationLevel?: IsolationLevel;
|
3335
|
-
};
|
3336
|
-
|
3337
|
-
declare type TransactionOptions_3<InteractiveTransactionPayload> = {
|
3267
|
+
declare type TransactionOptions_2<InteractiveTransactionPayload> = {
|
3338
3268
|
kind: 'itx';
|
3339
3269
|
options: InteractiveTransactionOptions<InteractiveTransactionPayload>;
|
3340
3270
|
} | {
|
@@ -3452,4 +3382,22 @@ export declare function warnEnvConflicts(envPaths: any): void;
|
|
3452
3382
|
|
3453
3383
|
export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void;
|
3454
3384
|
|
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
|
+
|
3455
3403
|
export { }
|