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