@creator.co/creatorco-prisma-client 1.0.74 → 1.0.75
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/default.d.ts +1 -1
- package/edge.d.ts +1 -1
- package/edge.js +16 -11
- package/index-browser.js +9 -5
- package/index.d.ts +5799 -7610
- package/index.js +16 -11
- package/libquery_engine-darwin-arm64.dylib.node +0 -0
- package/libquery_engine-darwin.dylib.node +0 -0
- package/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
- package/libquery_engine-linux-arm64-openssl-1.0.x.so.node +0 -0
- package/libquery_engine-linux-arm64-openssl-3.0.x.so.node +0 -0
- package/libquery_engine-linux-musl-arm64-openssl-1.1.x.so.node +0 -0
- package/libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node +0 -0
- package/package.json +14 -1
- package/query_engine-windows.dll.node +0 -0
- package/runtime/edge-esm.js +21 -18
- package/runtime/edge.js +21 -18
- package/runtime/index-browser.js +1 -1
- package/runtime/library.d.ts +296 -87
- package/runtime/library.js +65 -62
- package/runtime/react-native.js +31 -28
- package/runtime/wasm.js +22 -19
- package/schema.prisma +15 -12
- package/wasm.d.ts +1 -1
- package/wasm.js +9 -5
package/runtime/library.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ 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'>;
|
|
27
|
+
|
|
26
28
|
export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum';
|
|
27
29
|
|
|
28
30
|
export declare type AllModelsToStringIndex<TypeMap extends TypeMapDef, Args extends Record<string, any>, K extends PropertyKey> = Args extends {
|
|
@@ -36,6 +38,10 @@ export declare type AllModelsToStringIndex<TypeMap extends TypeMapDef, Args exte
|
|
|
36
38
|
declare class AnyNull extends NullTypesEnumValue {
|
|
37
39
|
}
|
|
38
40
|
|
|
41
|
+
export declare type ApplyOmit<T, OmitConfig> = Compute<{
|
|
42
|
+
[K in keyof T as OmitValue<OmitConfig, K> extends true ? never : K]: T[K];
|
|
43
|
+
}>;
|
|
44
|
+
|
|
39
45
|
export declare type Args<T, F extends Operation> = T extends {
|
|
40
46
|
[K: symbol]: {
|
|
41
47
|
types: {
|
|
@@ -50,6 +56,13 @@ export declare type Args<T, F extends Operation> = T extends {
|
|
|
50
56
|
|
|
51
57
|
export declare type Args_3<T, F extends Operation> = Args<T, F>;
|
|
52
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Original `quaint::ValueType` enum tag from Prisma's `quaint`.
|
|
61
|
+
* Query arguments marked with this type are sanitized before being sent to the database.
|
|
62
|
+
* Notice while a query argument may be `null`, `ArgType` is guaranteed to be defined.
|
|
63
|
+
*/
|
|
64
|
+
declare type ArgType = 'Int32' | 'Int64' | 'Float' | 'Double' | 'Text' | 'Enum' | 'EnumArray' | 'Bytes' | 'Boolean' | 'Char' | 'Array' | 'Numeric' | 'Json' | 'Xml' | 'Uuid' | 'DateTime' | 'Date' | 'Time';
|
|
65
|
+
|
|
53
66
|
/**
|
|
54
67
|
* Attributes is a map from string to attribute values.
|
|
55
68
|
*
|
|
@@ -66,7 +79,9 @@ declare interface Attributes {
|
|
|
66
79
|
*/
|
|
67
80
|
declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
|
68
81
|
|
|
69
|
-
export declare type BaseDMMF =
|
|
82
|
+
export declare type BaseDMMF = {
|
|
83
|
+
readonly datamodel: Omit<DMMF.Datamodel, 'indexes'>;
|
|
84
|
+
};
|
|
70
85
|
|
|
71
86
|
declare type BatchArgs = {
|
|
72
87
|
queries: BatchQuery[];
|
|
@@ -126,7 +141,20 @@ export declare type ClientArgs = {
|
|
|
126
141
|
client: ClientArg;
|
|
127
142
|
};
|
|
128
143
|
|
|
129
|
-
export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin<never, never, never>;
|
|
144
|
+
export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin<never, never, never, never>;
|
|
145
|
+
|
|
146
|
+
export declare type ClientOptionDef = undefined | {
|
|
147
|
+
[K in string]: any;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export declare type ClientOtherOps = {
|
|
151
|
+
$queryRaw<T = unknown>(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<T>;
|
|
152
|
+
$queryRawTyped<T>(query: TypedSql<unknown[], T>): PrismaPromise<T[]>;
|
|
153
|
+
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): PrismaPromise<T>;
|
|
154
|
+
$executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<number>;
|
|
155
|
+
$executeRawUnsafe(query: string, ...values: any[]): PrismaPromise<number>;
|
|
156
|
+
$runCommandRaw(command: InputJsonObject): PrismaPromise<JsonObject>;
|
|
157
|
+
};
|
|
130
158
|
|
|
131
159
|
declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum];
|
|
132
160
|
|
|
@@ -188,6 +216,8 @@ declare type ConnectionInfo = {
|
|
|
188
216
|
maxBindValues?: number;
|
|
189
217
|
};
|
|
190
218
|
|
|
219
|
+
declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'sqlserver' | 'cockroachdb';
|
|
220
|
+
|
|
191
221
|
declare interface Context {
|
|
192
222
|
/**
|
|
193
223
|
* Get a value from the context.
|
|
@@ -575,9 +605,13 @@ export declare interface DecimalJsLike {
|
|
|
575
605
|
|
|
576
606
|
export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>;
|
|
577
607
|
|
|
578
|
-
export declare type DefaultSelection<
|
|
579
|
-
|
|
580
|
-
}
|
|
608
|
+
export declare type DefaultSelection<Payload extends OperationPayload, Args = {}, ClientOptions = {}> = Args extends {
|
|
609
|
+
omit: infer LocalOmit;
|
|
610
|
+
} ? ApplyOmit<UnwrapPayload<{
|
|
611
|
+
default: Payload;
|
|
612
|
+
}>['default'], PatchFlat<LocalOmit, ExtractGlobalOmit<ClientOptions, Uncapitalize<Payload['name']>>>> : ApplyOmit<UnwrapPayload<{
|
|
613
|
+
default: Payload;
|
|
614
|
+
}>['default'], ExtractGlobalOmit<ClientOptions, Uncapitalize<Payload['name']>>>;
|
|
581
615
|
|
|
582
616
|
export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void;
|
|
583
617
|
|
|
@@ -585,6 +619,8 @@ declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Clien
|
|
|
585
619
|
|
|
586
620
|
declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"];
|
|
587
621
|
|
|
622
|
+
export declare function deserializeJsonResponse(result: unknown): unknown;
|
|
623
|
+
|
|
588
624
|
export declare type DevTypeMapDef = {
|
|
589
625
|
meta: {
|
|
590
626
|
modelProps: string;
|
|
@@ -640,6 +676,7 @@ export declare namespace DMMF {
|
|
|
640
676
|
models: Model[];
|
|
641
677
|
enums: DatamodelEnum[];
|
|
642
678
|
types: Model[];
|
|
679
|
+
indexes: Index[];
|
|
643
680
|
}>;
|
|
644
681
|
export type uniqueIndex = ReadonlyDeep_2<{
|
|
645
682
|
name: string;
|
|
@@ -691,6 +728,24 @@ export declare namespace DMMF {
|
|
|
691
728
|
args: any[];
|
|
692
729
|
}>;
|
|
693
730
|
export type FieldDefaultScalar = string | boolean | number;
|
|
731
|
+
export type Index = ReadonlyDeep_2<{
|
|
732
|
+
model: string;
|
|
733
|
+
type: IndexType;
|
|
734
|
+
isDefinedOnField: boolean;
|
|
735
|
+
name?: string;
|
|
736
|
+
dbName?: string;
|
|
737
|
+
algorithm?: string;
|
|
738
|
+
clustered?: boolean;
|
|
739
|
+
fields: IndexField[];
|
|
740
|
+
}>;
|
|
741
|
+
export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext';
|
|
742
|
+
export type IndexField = ReadonlyDeep_2<{
|
|
743
|
+
name: string;
|
|
744
|
+
sortOrder?: SortOrder;
|
|
745
|
+
length?: number;
|
|
746
|
+
operatorClass?: string;
|
|
747
|
+
}>;
|
|
748
|
+
export type SortOrder = 'asc' | 'desc';
|
|
694
749
|
export type Schema = ReadonlyDeep_2<{
|
|
695
750
|
rootQueryType?: string;
|
|
696
751
|
rootMutationType?: string;
|
|
@@ -815,11 +870,13 @@ export declare namespace DMMF {
|
|
|
815
870
|
}
|
|
816
871
|
}
|
|
817
872
|
|
|
873
|
+
export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel;
|
|
874
|
+
|
|
818
875
|
export declare interface DriverAdapter extends Queryable {
|
|
819
876
|
/**
|
|
820
877
|
* Starts new transaction.
|
|
821
878
|
*/
|
|
822
|
-
|
|
879
|
+
transactionContext(): Promise<Result_4<TransactionContext>>;
|
|
823
880
|
/**
|
|
824
881
|
* Optional method that returns extra connection info
|
|
825
882
|
*/
|
|
@@ -827,36 +884,38 @@ export declare interface DriverAdapter extends Queryable {
|
|
|
827
884
|
}
|
|
828
885
|
|
|
829
886
|
/** Client */
|
|
830
|
-
export declare type DynamicClientExtensionArgs<C_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any
|
|
887
|
+
export declare type DynamicClientExtensionArgs<C_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
|
|
831
888
|
[P in keyof C_]: unknown;
|
|
832
889
|
} & {
|
|
833
890
|
[K: symbol]: {
|
|
834
|
-
ctx: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList> & {
|
|
835
|
-
$parent: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>;
|
|
891
|
+
ctx: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList> & {
|
|
892
|
+
$parent: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList>;
|
|
836
893
|
};
|
|
837
894
|
};
|
|
838
895
|
};
|
|
839
896
|
|
|
840
|
-
export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any
|
|
897
|
+
export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
|
|
841
898
|
[P in keyof ExtArgs['client']]: Return<ExtArgs['client'][P]>;
|
|
842
899
|
} & {
|
|
843
|
-
[P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs>;
|
|
900
|
+
[P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs, ClientOptions>;
|
|
844
901
|
} & {
|
|
845
|
-
[P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]:
|
|
902
|
+
[P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never;
|
|
846
903
|
} & {
|
|
847
|
-
[P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs>[P];
|
|
904
|
+
[P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs, ClientOptions>[P];
|
|
848
905
|
} & {
|
|
849
906
|
[K: symbol]: {
|
|
850
907
|
types: TypeMap['other'];
|
|
851
908
|
};
|
|
852
909
|
};
|
|
853
910
|
|
|
854
|
-
export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any
|
|
855
|
-
$extends: ExtendsHook<'extends', TypeMapCb, ExtArgs
|
|
911
|
+
export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
|
|
912
|
+
$extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call<TypeMapCb, {
|
|
913
|
+
extArgs: ExtArgs;
|
|
914
|
+
}>, ClientOptions>;
|
|
856
915
|
$transaction<P extends PrismaPromise<any>[]>(arg: [...P], options?: {
|
|
857
916
|
isolationLevel?: TypeMap['meta']['txIsolationLevel'];
|
|
858
917
|
}): Promise<UnwrapTuple<P>>;
|
|
859
|
-
$transaction<R>(fn: (client: Omit<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>) => Promise<R>, options?: {
|
|
918
|
+
$transaction<R>(fn: (client: Omit<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>, ITXClientDenyList>) => Promise<R>, options?: {
|
|
860
919
|
maxWait?: number;
|
|
861
920
|
timeout?: number;
|
|
862
921
|
isolationLevel?: TypeMap['meta']['txIsolationLevel'];
|
|
@@ -866,7 +925,7 @@ export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef
|
|
|
866
925
|
};
|
|
867
926
|
|
|
868
927
|
/** Model */
|
|
869
|
-
export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any
|
|
928
|
+
export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, ClientOptions> = {
|
|
870
929
|
[K in keyof M_]: K extends '$allModels' ? {
|
|
871
930
|
[P in keyof M_[K]]?: unknown;
|
|
872
931
|
} & {
|
|
@@ -875,8 +934,8 @@ export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, Ty
|
|
|
875
934
|
[P in keyof M_[K]]?: unknown;
|
|
876
935
|
} & {
|
|
877
936
|
[K: symbol]: {
|
|
878
|
-
ctx: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, K>, ExtArgs> & {
|
|
879
|
-
$parent: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>;
|
|
937
|
+
ctx: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, K>, ExtArgs, ClientOptions> & {
|
|
938
|
+
$parent: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>;
|
|
880
939
|
} & {
|
|
881
940
|
$name: ModelKey<TypeMap, K>;
|
|
882
941
|
} & {
|
|
@@ -889,26 +948,26 @@ export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, Ty
|
|
|
889
948
|
} : never;
|
|
890
949
|
};
|
|
891
950
|
|
|
892
|
-
export declare type DynamicModelExtensionFluentApi<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, Null> = {
|
|
951
|
+
export declare type DynamicModelExtensionFluentApi<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, Null, ClientOptions> = {
|
|
893
952
|
[K in keyof TypeMap['model'][M]['payload']['objects']]: <A>(args?: Exact<A, Path<TypeMap['model'][M]['operations'][P]['args']['select'], [K]>>) => PrismaPromise<Path<DynamicModelExtensionFnResultBase<TypeMap, M, {
|
|
894
953
|
select: {
|
|
895
954
|
[P in K]: A;
|
|
896
955
|
};
|
|
897
|
-
}, P>, [K]> | Null> & DynamicModelExtensionFluentApi<TypeMap, (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], P, Null | Select<TypeMap['model'][M]['payload']['objects'][K], null
|
|
956
|
+
}, P, ClientOptions>, [K]> | Null> & DynamicModelExtensionFluentApi<TypeMap, (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], P, Null | Select<TypeMap['model'][M]['payload']['objects'][K], null>, ClientOptions>;
|
|
898
957
|
};
|
|
899
958
|
|
|
900
|
-
export declare type DynamicModelExtensionFnResult<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, Null
|
|
959
|
+
export declare type DynamicModelExtensionFnResult<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, Null, ClientOptions> = P extends FluentOperation ? DynamicModelExtensionFluentApi<TypeMap, M, P, Null, ClientOptions> & PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P, ClientOptions> | Null> : PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P, ClientOptions>>;
|
|
901
960
|
|
|
902
|
-
export declare type DynamicModelExtensionFnResultBase<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey> = GetResult<TypeMap['model'][M]['payload'], A, P & Operation>;
|
|
961
|
+
export declare type DynamicModelExtensionFnResultBase<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, ClientOptions> = GetResult<TypeMap['model'][M]['payload'], A, P & Operation, ClientOptions>;
|
|
903
962
|
|
|
904
963
|
export declare type DynamicModelExtensionFnResultNull<P extends PropertyKey> = P extends 'findUnique' | 'findFirst' ? null : never;
|
|
905
964
|
|
|
906
|
-
export declare type DynamicModelExtensionOperationFn<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey> = {} extends TypeMap['model'][M]['operations'][P]['args'] ? <A extends TypeMap['model'][M]['operations'][P]['args']>(args?: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P> : <A extends TypeMap['model'][M]['operations'][P]['args']>(args: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P>;
|
|
965
|
+
export declare type DynamicModelExtensionOperationFn<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, ClientOptions> = {} extends TypeMap['model'][M]['operations'][P]['args'] ? <A extends TypeMap['model'][M]['operations'][P]['args']>(args?: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>, ClientOptions> : <A extends TypeMap['model'][M]['operations'][P]['args']>(args: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>, ClientOptions>;
|
|
907
966
|
|
|
908
|
-
export declare type DynamicModelExtensionThis<TypeMap extends TypeMapDef, M extends PropertyKey, ExtArgs extends Record<string, any
|
|
967
|
+
export declare type DynamicModelExtensionThis<TypeMap extends TypeMapDef, M extends PropertyKey, ExtArgs extends Record<string, any>, ClientOptions> = {
|
|
909
968
|
[P in keyof ExtArgs['model'][Uncapitalize<M & string>]]: Return<ExtArgs['model'][Uncapitalize<M & string>][P]>;
|
|
910
969
|
} & {
|
|
911
|
-
[P in Exclude<keyof TypeMap['model'][M]['operations'], keyof ExtArgs['model'][Uncapitalize<M & string>]>]: DynamicModelExtensionOperationFn<TypeMap, M, P>;
|
|
970
|
+
[P in Exclude<keyof TypeMap['model'][M]['operations'], keyof ExtArgs['model'][Uncapitalize<M & string>]>]: DynamicModelExtensionOperationFn<TypeMap, M, P, ClientOptions>;
|
|
912
971
|
} & {
|
|
913
972
|
[P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize<M & string>]>]: TypeMap['model'][M]['fields'];
|
|
914
973
|
} & {
|
|
@@ -956,7 +1015,7 @@ export declare type DynamicResultExtensionArgs<R_, TypeMap extends TypeMapDef> =
|
|
|
956
1015
|
|
|
957
1016
|
export declare type DynamicResultExtensionData<TypeMap extends TypeMapDef, M extends PropertyKey, S> = GetFindResult<TypeMap['model'][M]['payload'], {
|
|
958
1017
|
select: S;
|
|
959
|
-
}>;
|
|
1018
|
+
}, {}>;
|
|
960
1019
|
|
|
961
1020
|
export declare type DynamicResultExtensionNeeds<TypeMap extends TypeMapDef, M extends PropertyKey, S> = {
|
|
962
1021
|
[K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never;
|
|
@@ -1082,6 +1141,7 @@ declare type EngineSpan = {
|
|
|
1082
1141
|
trace_id: string;
|
|
1083
1142
|
span_id: string;
|
|
1084
1143
|
}[];
|
|
1144
|
+
kind: EngineSpanKind;
|
|
1085
1145
|
};
|
|
1086
1146
|
|
|
1087
1147
|
declare type EngineSpanEvent = {
|
|
@@ -1089,6 +1149,13 @@ declare type EngineSpanEvent = {
|
|
|
1089
1149
|
spans: EngineSpan[];
|
|
1090
1150
|
};
|
|
1091
1151
|
|
|
1152
|
+
declare type EngineSpanKind = 'client' | 'internal';
|
|
1153
|
+
|
|
1154
|
+
declare type EnvPaths = {
|
|
1155
|
+
rootEnvPath: string | null;
|
|
1156
|
+
schemaEnvPath: string | undefined;
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1092
1159
|
declare interface EnvValue {
|
|
1093
1160
|
fromEnvVar: null | string;
|
|
1094
1161
|
value: null | string;
|
|
@@ -1192,7 +1259,7 @@ declare type ExtendedSpanOptions = SpanOptions & {
|
|
|
1192
1259
|
/** $extends, defineExtension */
|
|
1193
1260
|
export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, TypeMap extends TypeMapDef = Call<TypeMapCb, {
|
|
1194
1261
|
extArgs: ExtArgs;
|
|
1195
|
-
}
|
|
1262
|
+
}>, ClientOptions = {}> {
|
|
1196
1263
|
extArgs: ExtArgs;
|
|
1197
1264
|
<R_ extends {
|
|
1198
1265
|
[K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
|
|
@@ -1202,7 +1269,7 @@ export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeM
|
|
|
1202
1269
|
[K in TypeMap['meta']['modelProps'] | '$allModels' | keyof TypeMap['other']['operations'] | '$allOperations']?: unknown;
|
|
1203
1270
|
}, C_ extends {
|
|
1204
1271
|
[K in string]?: unknown;
|
|
1205
|
-
}, C, Args extends InternalArgs = InternalArgs<R, M, {}, C>, MergedArgs extends InternalArgs = MergeExtArgs<TypeMap, ExtArgs, Args>>(extension: ((client: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>) => {
|
|
1272
|
+
}, C, Args extends InternalArgs = InternalArgs<R, M, {}, C>, MergedArgs extends InternalArgs = MergeExtArgs<TypeMap, ExtArgs, Args>>(extension: ((client: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs, ClientOptions>) => {
|
|
1206
1273
|
$extends: {
|
|
1207
1274
|
extArgs: Args;
|
|
1208
1275
|
};
|
|
@@ -1210,12 +1277,12 @@ export declare interface ExtendsHook<Variant extends 'extends' | 'define', TypeM
|
|
|
1210
1277
|
name?: string;
|
|
1211
1278
|
query?: DynamicQueryExtensionArgs<Q_, TypeMap>;
|
|
1212
1279
|
result?: DynamicResultExtensionArgs<R_, TypeMap> & R;
|
|
1213
|
-
model?: DynamicModelExtensionArgs<M_, TypeMap, TypeMapCb, ExtArgs> & M;
|
|
1214
|
-
client?: DynamicClientExtensionArgs<C_, TypeMap, TypeMapCb, ExtArgs> & C;
|
|
1280
|
+
model?: DynamicModelExtensionArgs<M_, TypeMap, TypeMapCb, ExtArgs, ClientOptions> & M;
|
|
1281
|
+
client?: DynamicClientExtensionArgs<C_, TypeMap, TypeMapCb, ExtArgs, ClientOptions> & C;
|
|
1215
1282
|
}): {
|
|
1216
1283
|
extends: DynamicClientExtensionThis<Call<TypeMapCb, {
|
|
1217
1284
|
extArgs: MergedArgs;
|
|
1218
|
-
}>, TypeMapCb, MergedArgs>;
|
|
1285
|
+
}>, TypeMapCb, MergedArgs, ClientOptions>;
|
|
1219
1286
|
define: (client: any) => {
|
|
1220
1287
|
$extends: {
|
|
1221
1288
|
extArgs: Args;
|
|
@@ -1238,6 +1305,8 @@ declare namespace Extensions_2 {
|
|
|
1238
1305
|
export {
|
|
1239
1306
|
InternalArgs,
|
|
1240
1307
|
DefaultArgs,
|
|
1308
|
+
GetPayloadResultExtensionKeys,
|
|
1309
|
+
GetPayloadResultExtensionObject,
|
|
1241
1310
|
GetPayloadResult,
|
|
1242
1311
|
GetSelect,
|
|
1243
1312
|
GetOmit,
|
|
@@ -1265,12 +1334,20 @@ declare namespace Extensions_2 {
|
|
|
1265
1334
|
TypeMapDef,
|
|
1266
1335
|
DevTypeMapDef,
|
|
1267
1336
|
DevTypeMapFnDef,
|
|
1337
|
+
ClientOptionDef,
|
|
1338
|
+
ClientOtherOps,
|
|
1268
1339
|
TypeMapCbDef,
|
|
1269
1340
|
ModelKey,
|
|
1270
1341
|
RequiredExtensionArgs as UserArgs
|
|
1271
1342
|
}
|
|
1272
1343
|
}
|
|
1273
1344
|
|
|
1345
|
+
export declare type ExtractGlobalOmit<Options, ModelName extends string> = Options extends {
|
|
1346
|
+
omit: {
|
|
1347
|
+
[K in ModelName]: infer GlobalOmit;
|
|
1348
|
+
};
|
|
1349
|
+
} ? GlobalOmit : {};
|
|
1350
|
+
|
|
1274
1351
|
declare type Fetch = typeof nodeFetch;
|
|
1275
1352
|
|
|
1276
1353
|
/**
|
|
@@ -1309,6 +1386,8 @@ declare interface GeneratorConfig {
|
|
|
1309
1386
|
};
|
|
1310
1387
|
binaryTargets: BinaryTargetsEnvValue[];
|
|
1311
1388
|
previewFeatures: string[];
|
|
1389
|
+
envPaths?: EnvPaths;
|
|
1390
|
+
sourceFilePath: string;
|
|
1312
1391
|
}
|
|
1313
1392
|
|
|
1314
1393
|
export declare type GetAggregateResult<P extends OperationPayload, A> = {
|
|
@@ -1329,9 +1408,19 @@ export declare type GetCountResult<A> = A extends {
|
|
|
1329
1408
|
|
|
1330
1409
|
declare function getExtensionContext<T>(that: T): Context_2<T>;
|
|
1331
1410
|
|
|
1332
|
-
export declare type GetFindResult<P extends OperationPayload, A> = A extends {
|
|
1333
|
-
|
|
1334
|
-
}
|
|
1411
|
+
export declare type GetFindResult<P extends OperationPayload, A, ClientOptions> = Equals<A, any> extends 1 ? DefaultSelection<P, A, ClientOptions> : A extends {
|
|
1412
|
+
select: infer S extends object;
|
|
1413
|
+
} & Record<string, unknown> | {
|
|
1414
|
+
include: infer I extends object;
|
|
1415
|
+
} & Record<string, unknown> ? {
|
|
1416
|
+
[K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K], ClientOptions> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K], ClientOptions>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O, {}, ClientOptions> | SelectField<P, K> & null : never : P extends {
|
|
1417
|
+
scalars: {
|
|
1418
|
+
[k in K]: infer O;
|
|
1419
|
+
};
|
|
1420
|
+
} ? O : K extends '_count' ? Count<P['objects']> : never;
|
|
1421
|
+
} & (A extends {
|
|
1422
|
+
include: any;
|
|
1423
|
+
} & Record<string, unknown> ? DefaultSelection<P, A, ClientOptions> : unknown) : DefaultSelection<P, A, ClientOptions>;
|
|
1335
1424
|
|
|
1336
1425
|
export declare type GetGroupByResult<P extends OperationPayload, A> = A extends {
|
|
1337
1426
|
by: string[];
|
|
@@ -1343,14 +1432,18 @@ export declare type GetGroupByResult<P extends OperationPayload, A> = A extends
|
|
|
1343
1432
|
[K in A['by']]: P['scalars'][K];
|
|
1344
1433
|
}> : {}[];
|
|
1345
1434
|
|
|
1346
|
-
export declare type GetOmit<BaseKeys extends string, R extends InternalArgs['result'][string]> = {
|
|
1347
|
-
[K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean;
|
|
1435
|
+
export declare type GetOmit<BaseKeys extends string, R extends InternalArgs['result'][string], ExtraType = never> = {
|
|
1436
|
+
[K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType;
|
|
1348
1437
|
};
|
|
1349
1438
|
|
|
1350
|
-
export declare type GetPayloadResult<Base extends Record<any, any>, R extends InternalArgs['result'][string]
|
|
1351
|
-
|
|
1439
|
+
export declare type GetPayloadResult<Base extends Record<any, any>, R extends InternalArgs['result'][string]> = Omit<Base, GetPayloadResultExtensionKeys<R>> & GetPayloadResultExtensionObject<R>;
|
|
1440
|
+
|
|
1441
|
+
export declare type GetPayloadResultExtensionKeys<R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = KR;
|
|
1442
|
+
|
|
1443
|
+
export declare type GetPayloadResultExtensionObject<R extends InternalArgs['result'][string]> = {
|
|
1444
|
+
[K in GetPayloadResultExtensionKeys<R>]: R[K] extends () => {
|
|
1352
1445
|
compute: (...args: any) => infer C;
|
|
1353
|
-
} ? C : never
|
|
1446
|
+
} ? C : never;
|
|
1354
1447
|
};
|
|
1355
1448
|
|
|
1356
1449
|
export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
@@ -1369,6 +1462,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1369
1462
|
_middlewares: MiddlewareHandler<QueryMiddleware>;
|
|
1370
1463
|
_previewFeatures: string[];
|
|
1371
1464
|
_activeProvider: string;
|
|
1465
|
+
_globalOmit?: GlobalOmitOptions | undefined;
|
|
1372
1466
|
_extensions: MergedExtensionsList;
|
|
1373
1467
|
_engine: Engine;
|
|
1374
1468
|
/**
|
|
@@ -1420,7 +1514,7 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1420
1514
|
/**
|
|
1421
1515
|
* Executes a raw query and returns selected data
|
|
1422
1516
|
*/
|
|
1423
|
-
$queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>): Promise<
|
|
1517
|
+
$queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper<unknown, unknown>): Promise<any>;
|
|
1424
1518
|
/**
|
|
1425
1519
|
* Executes a raw query provided through a safe tag function
|
|
1426
1520
|
* @see https://github.com/prisma/prisma/issues/7142
|
|
@@ -1430,6 +1524,11 @@ export declare function getPrismaClient(config: GetPrismaClientConfig): {
|
|
|
1430
1524
|
* @returns
|
|
1431
1525
|
*/
|
|
1432
1526
|
$queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2<unknown>;
|
|
1527
|
+
/**
|
|
1528
|
+
* Counterpart to $queryRaw, that returns strongly typed results
|
|
1529
|
+
* @param typedSql
|
|
1530
|
+
*/
|
|
1531
|
+
$queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2<unknown>;
|
|
1433
1532
|
/**
|
|
1434
1533
|
* Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections
|
|
1435
1534
|
* @see https://github.com/prisma/prisma/issues/7142
|
|
@@ -1504,7 +1603,7 @@ declare type GetPrismaClientConfig = {
|
|
|
1504
1603
|
clientVersion: string;
|
|
1505
1604
|
engineVersion: string;
|
|
1506
1605
|
datasourceNames: string[];
|
|
1507
|
-
activeProvider:
|
|
1606
|
+
activeProvider: ActiveConnectorType;
|
|
1508
1607
|
/**
|
|
1509
1608
|
* The contents of the schema encoded into a string
|
|
1510
1609
|
* @remarks only used for the purpose of data proxy
|
|
@@ -1564,31 +1663,32 @@ declare type GetPrismaClientConfig = {
|
|
|
1564
1663
|
engineWasm?: WasmLoadingConfig;
|
|
1565
1664
|
};
|
|
1566
1665
|
|
|
1567
|
-
export declare type GetResult<
|
|
1568
|
-
findUnique: GetFindResult<
|
|
1569
|
-
findUniqueOrThrow: GetFindResult<
|
|
1570
|
-
findFirst: GetFindResult<
|
|
1571
|
-
findFirstOrThrow: GetFindResult<
|
|
1572
|
-
findMany: GetFindResult<
|
|
1573
|
-
create: GetFindResult<
|
|
1666
|
+
export declare type GetResult<Payload extends OperationPayload, Args, OperationName extends Operation = 'findUniqueOrThrow', ClientOptions = {}> = {
|
|
1667
|
+
findUnique: GetFindResult<Payload, Args, ClientOptions> | null;
|
|
1668
|
+
findUniqueOrThrow: GetFindResult<Payload, Args, ClientOptions>;
|
|
1669
|
+
findFirst: GetFindResult<Payload, Args, ClientOptions> | null;
|
|
1670
|
+
findFirstOrThrow: GetFindResult<Payload, Args, ClientOptions>;
|
|
1671
|
+
findMany: GetFindResult<Payload, Args, ClientOptions>[];
|
|
1672
|
+
create: GetFindResult<Payload, Args, ClientOptions>;
|
|
1574
1673
|
createMany: GetBatchResult;
|
|
1575
|
-
createManyAndReturn: GetFindResult<
|
|
1576
|
-
update: GetFindResult<
|
|
1674
|
+
createManyAndReturn: GetFindResult<Payload, Args, ClientOptions>[];
|
|
1675
|
+
update: GetFindResult<Payload, Args, ClientOptions>;
|
|
1577
1676
|
updateMany: GetBatchResult;
|
|
1578
|
-
upsert: GetFindResult<
|
|
1579
|
-
delete: GetFindResult<
|
|
1677
|
+
upsert: GetFindResult<Payload, Args, ClientOptions>;
|
|
1678
|
+
delete: GetFindResult<Payload, Args, ClientOptions>;
|
|
1580
1679
|
deleteMany: GetBatchResult;
|
|
1581
|
-
aggregate: GetAggregateResult<
|
|
1582
|
-
count: GetCountResult<
|
|
1583
|
-
groupBy: GetGroupByResult<
|
|
1680
|
+
aggregate: GetAggregateResult<Payload, Args>;
|
|
1681
|
+
count: GetCountResult<Args>;
|
|
1682
|
+
groupBy: GetGroupByResult<Payload, Args>;
|
|
1584
1683
|
$queryRaw: unknown;
|
|
1684
|
+
$queryRawTyped: unknown;
|
|
1585
1685
|
$executeRaw: number;
|
|
1586
1686
|
$queryRawUnsafe: unknown;
|
|
1587
1687
|
$executeRawUnsafe: number;
|
|
1588
1688
|
$runCommandRaw: JsonObject;
|
|
1589
1689
|
findRaw: JsonObject;
|
|
1590
1690
|
aggregateRaw: JsonObject;
|
|
1591
|
-
}[
|
|
1691
|
+
}[OperationName];
|
|
1592
1692
|
|
|
1593
1693
|
export declare function getRuntime(): GetRuntimeOutput;
|
|
1594
1694
|
|
|
@@ -1602,19 +1702,11 @@ export declare type GetSelect<Base extends Record<any, any>, R extends InternalA
|
|
|
1602
1702
|
[K in KR | keyof Base]?: K extends KR ? boolean : Base[K];
|
|
1603
1703
|
};
|
|
1604
1704
|
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
}
|
|
1610
|
-
[K in keyof S | keyof I as (S & I)[K] extends false | undefined | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K]>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? GetFindResult<O, (S & I)[K]> | SelectField<P, K> & null : never : K extends '_count' ? Count<GetFindResult<P, (S & I)[K]>> : never : P extends SelectablePayloadFields<K, (infer O)[]> ? O extends OperationPayload ? DefaultSelection<O>[] : never : P extends SelectablePayloadFields<K, infer O | null> ? O extends OperationPayload ? DefaultSelection<O> | SelectField<P, K> & null : never : P extends {
|
|
1611
|
-
scalars: {
|
|
1612
|
-
[k in K]: infer O;
|
|
1613
|
-
};
|
|
1614
|
-
} ? O : K extends '_count' ? Count<P['objects']> : never;
|
|
1615
|
-
} & (A extends {
|
|
1616
|
-
include: any;
|
|
1617
|
-
} & Record<string, unknown> ? DefaultSelection<P> : unknown) : DefaultSelection<P>;
|
|
1705
|
+
declare type GlobalOmitOptions = {
|
|
1706
|
+
[modelName: string]: {
|
|
1707
|
+
[fieldName: string]: boolean;
|
|
1708
|
+
};
|
|
1709
|
+
};
|
|
1618
1710
|
|
|
1619
1711
|
declare type HandleErrorParams = {
|
|
1620
1712
|
args: JsArgs;
|
|
@@ -1623,6 +1715,7 @@ declare type HandleErrorParams = {
|
|
|
1623
1715
|
callsite?: CallSite;
|
|
1624
1716
|
transaction?: PrismaPromiseTransaction;
|
|
1625
1717
|
modelName?: string;
|
|
1718
|
+
globalOmit?: GlobalOmitOptions;
|
|
1626
1719
|
};
|
|
1627
1720
|
|
|
1628
1721
|
/**
|
|
@@ -1639,6 +1732,38 @@ declare type HandleErrorParams = {
|
|
|
1639
1732
|
*/
|
|
1640
1733
|
declare type HrTime = [number, number];
|
|
1641
1734
|
|
|
1735
|
+
/**
|
|
1736
|
+
* Matches a JSON array.
|
|
1737
|
+
* Unlike \`JsonArray\`, readonly arrays are assignable to this type.
|
|
1738
|
+
*/
|
|
1739
|
+
export declare interface InputJsonArray extends ReadonlyArray<InputJsonValue | null> {
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Matches a JSON object.
|
|
1744
|
+
* Unlike \`JsonObject\`, this type allows undefined and read-only properties.
|
|
1745
|
+
*/
|
|
1746
|
+
export declare type InputJsonObject = {
|
|
1747
|
+
readonly [Key in string]?: InputJsonValue | null;
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* Matches any valid value that can be used as an input for operations like
|
|
1752
|
+
* create and update as the value of a JSON field. Unlike \`JsonValue\`, this
|
|
1753
|
+
* type allows read-only arrays and read-only object properties and disallows
|
|
1754
|
+
* \`null\` at the top level.
|
|
1755
|
+
*
|
|
1756
|
+
* \`null\` cannot be used as the value of a JSON field because its meaning
|
|
1757
|
+
* would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or
|
|
1758
|
+
* \`Prisma.DbNull\` to clear the JSON value and set the field to the database
|
|
1759
|
+
* NULL value instead.
|
|
1760
|
+
*
|
|
1761
|
+
* @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values
|
|
1762
|
+
*/
|
|
1763
|
+
export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | {
|
|
1764
|
+
toJSON(): unknown;
|
|
1765
|
+
};
|
|
1766
|
+
|
|
1642
1767
|
declare type InteractiveTransactionInfo<Payload = unknown> = {
|
|
1643
1768
|
/**
|
|
1644
1769
|
* Transaction ID returned by the query engine.
|
|
@@ -1722,6 +1847,10 @@ declare enum IsolationLevel {
|
|
|
1722
1847
|
Serializable = "Serializable"
|
|
1723
1848
|
}
|
|
1724
1849
|
|
|
1850
|
+
declare function isSkip(value: unknown): value is Skip;
|
|
1851
|
+
|
|
1852
|
+
export declare function isTypedSql(value: unknown): value is UnknownTypedSql;
|
|
1853
|
+
|
|
1725
1854
|
export declare type ITXClientDenyList = (typeof denylist)[number];
|
|
1726
1855
|
|
|
1727
1856
|
export declare const itxClientDenyList: readonly (string | symbol)[];
|
|
@@ -1744,7 +1873,7 @@ export declare type JsArgs = {
|
|
|
1744
1873
|
[argName: string]: JsInputValue;
|
|
1745
1874
|
};
|
|
1746
1875
|
|
|
1747
|
-
export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | {
|
|
1876
|
+
export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef<string, unknown> | JsInputValue[] | Skip | {
|
|
1748
1877
|
[key: string]: JsInputValue;
|
|
1749
1878
|
};
|
|
1750
1879
|
|
|
@@ -1752,10 +1881,14 @@ declare type JsonArgumentValue = number | string | boolean | null | RawTaggedVal
|
|
|
1752
1881
|
[key: string]: JsonArgumentValue;
|
|
1753
1882
|
};
|
|
1754
1883
|
|
|
1884
|
+
/**
|
|
1885
|
+
* From https://github.com/sindresorhus/type-fest/
|
|
1886
|
+
* Matches a JSON array.
|
|
1887
|
+
*/
|
|
1755
1888
|
export declare interface JsonArray extends Array<JsonValue> {
|
|
1756
1889
|
}
|
|
1757
1890
|
|
|
1758
|
-
declare type JsonBatchQuery = {
|
|
1891
|
+
export declare type JsonBatchQuery = {
|
|
1759
1892
|
batch: JsonQuery[];
|
|
1760
1893
|
transaction?: {
|
|
1761
1894
|
isolationLevel?: Transaction_2.IsolationLevel;
|
|
@@ -1774,11 +1907,16 @@ declare type JsonFieldSelection = {
|
|
|
1774
1907
|
declare class JsonNull extends NullTypesEnumValue {
|
|
1775
1908
|
}
|
|
1776
1909
|
|
|
1910
|
+
/**
|
|
1911
|
+
* From https://github.com/sindresorhus/type-fest/
|
|
1912
|
+
* Matches a JSON object.
|
|
1913
|
+
* This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from.
|
|
1914
|
+
*/
|
|
1777
1915
|
export declare type JsonObject = {
|
|
1778
1916
|
[Key in string]?: JsonValue;
|
|
1779
1917
|
};
|
|
1780
1918
|
|
|
1781
|
-
declare type JsonQuery = {
|
|
1919
|
+
export declare type JsonQuery = {
|
|
1782
1920
|
modelName?: string;
|
|
1783
1921
|
action: JsonQueryAction;
|
|
1784
1922
|
query: JsonFieldSelection;
|
|
@@ -1793,6 +1931,10 @@ declare type JsonSelectionSet = {
|
|
|
1793
1931
|
[fieldName: string]: boolean | JsonFieldSelection;
|
|
1794
1932
|
};
|
|
1795
1933
|
|
|
1934
|
+
/**
|
|
1935
|
+
* From https://github.com/sindresorhus/type-fest/
|
|
1936
|
+
* Matches any valid JSON value.
|
|
1937
|
+
*/
|
|
1796
1938
|
export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null;
|
|
1797
1939
|
|
|
1798
1940
|
export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | {
|
|
@@ -1890,6 +2032,8 @@ declare type LogLevel = 'info' | 'query' | 'warn' | 'error';
|
|
|
1890
2032
|
*/
|
|
1891
2033
|
export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
|
|
1892
2034
|
|
|
2035
|
+
export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql<any[], unknown>;
|
|
2036
|
+
|
|
1893
2037
|
/**
|
|
1894
2038
|
* Class that holds the list of all extensions, applied to particular instance,
|
|
1895
2039
|
* as well as resolved versions of the components that need to apply on
|
|
@@ -2087,16 +2231,19 @@ export declare const objectEnumValues: {
|
|
|
2087
2231
|
|
|
2088
2232
|
declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"];
|
|
2089
2233
|
|
|
2090
|
-
export declare type Omission = Record<string, boolean>;
|
|
2234
|
+
export declare type Omission = Record<string, boolean | Skip>;
|
|
2091
2235
|
|
|
2092
2236
|
declare type Omit_2<T, K extends string | number | symbol> = {
|
|
2093
2237
|
[P in keyof T as P extends K ? never : P]: T[P];
|
|
2094
2238
|
};
|
|
2095
2239
|
export { Omit_2 as Omit }
|
|
2096
2240
|
|
|
2241
|
+
export declare type OmitValue<Omit, Key> = Key extends keyof Omit ? Omit[Key] : false;
|
|
2242
|
+
|
|
2097
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';
|
|
2098
2244
|
|
|
2099
2245
|
export declare type OperationPayload = {
|
|
2246
|
+
name: string;
|
|
2100
2247
|
scalars: {
|
|
2101
2248
|
[ScalarName in string]: unknown;
|
|
2102
2249
|
};
|
|
@@ -2220,6 +2367,7 @@ export declare type PrismaClientOptions = {
|
|
|
2220
2367
|
* Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
|
|
2221
2368
|
*/
|
|
2222
2369
|
log?: Array<LogLevel | LogDefinition>;
|
|
2370
|
+
omit?: GlobalOmitOptions;
|
|
2223
2371
|
/**
|
|
2224
2372
|
* @internal
|
|
2225
2373
|
* You probably don't want to use this. \`__internal\` is used by internal tooling.
|
|
@@ -2324,6 +2472,8 @@ declare type PrismaPromiseInteractiveTransaction<PayloadType = unknown> = {
|
|
|
2324
2472
|
|
|
2325
2473
|
declare type PrismaPromiseTransaction<PayloadType = unknown> = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction<PayloadType>;
|
|
2326
2474
|
|
|
2475
|
+
export declare const PrivateResultType: unique symbol;
|
|
2476
|
+
|
|
2327
2477
|
declare namespace Public {
|
|
2328
2478
|
export {
|
|
2329
2479
|
validator
|
|
@@ -2345,6 +2495,7 @@ declare namespace Public_2 {
|
|
|
2345
2495
|
declare type Query = {
|
|
2346
2496
|
sql: string;
|
|
2347
2497
|
args: Array<unknown>;
|
|
2498
|
+
argTypes: Array<ArgType>;
|
|
2348
2499
|
};
|
|
2349
2500
|
|
|
2350
2501
|
declare interface Queryable {
|
|
@@ -2476,7 +2627,7 @@ export declare type RawParameters = {
|
|
|
2476
2627
|
values: string;
|
|
2477
2628
|
};
|
|
2478
2629
|
|
|
2479
|
-
export declare type RawQueryArgs = Sql | [query: string, ...values: RawValue[]];
|
|
2630
|
+
export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]];
|
|
2480
2631
|
|
|
2481
2632
|
declare type RawTaggedValue = {
|
|
2482
2633
|
$type: 'Raw';
|
|
@@ -2536,7 +2687,7 @@ declare class RequestHandler {
|
|
|
2536
2687
|
* handlers to finish.
|
|
2537
2688
|
*/
|
|
2538
2689
|
handleAndLogRequestError(params: HandleErrorParams): never;
|
|
2539
|
-
handleRequestError({ error, clientMethod, callsite, transaction, args, modelName }: HandleErrorParams): never;
|
|
2690
|
+
handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never;
|
|
2540
2691
|
sanitizeMessage(message: any): any;
|
|
2541
2692
|
unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any;
|
|
2542
2693
|
get [Symbol.toStringTag](): string;
|
|
@@ -2570,6 +2721,7 @@ declare type RequestParams = {
|
|
|
2570
2721
|
unpacker?: Unpacker;
|
|
2571
2722
|
otelParentCtx?: Context;
|
|
2572
2723
|
otelChildCtx?: Context;
|
|
2724
|
+
globalOmit?: GlobalOmitOptions;
|
|
2573
2725
|
customDataProxyFetch?: (fetch: Fetch) => Fetch;
|
|
2574
2726
|
};
|
|
2575
2727
|
|
|
@@ -2608,6 +2760,7 @@ export declare type Result<T, A, F extends Operation> = T extends {
|
|
|
2608
2760
|
composites: {};
|
|
2609
2761
|
objects: {};
|
|
2610
2762
|
scalars: {};
|
|
2763
|
+
name: '';
|
|
2611
2764
|
}, {}, F>;
|
|
2612
2765
|
|
|
2613
2766
|
export declare type Result_2<T, A, F extends Operation> = Result<T, A, F>;
|
|
@@ -2617,19 +2770,20 @@ declare namespace Result_3 {
|
|
|
2617
2770
|
Operation,
|
|
2618
2771
|
FluentOperation,
|
|
2619
2772
|
Count,
|
|
2620
|
-
TrueKeys,
|
|
2621
2773
|
GetFindResult,
|
|
2622
|
-
GetSelectIncludeResult,
|
|
2623
2774
|
SelectablePayloadFields,
|
|
2624
2775
|
SelectField,
|
|
2625
2776
|
DefaultSelection,
|
|
2626
2777
|
UnwrapPayload,
|
|
2778
|
+
ApplyOmit,
|
|
2779
|
+
OmitValue,
|
|
2627
2780
|
GetCountResult,
|
|
2628
2781
|
Aggregate,
|
|
2629
2782
|
GetAggregateResult,
|
|
2630
2783
|
GetBatchResult,
|
|
2631
2784
|
GetGroupByResult,
|
|
2632
|
-
GetResult
|
|
2785
|
+
GetResult,
|
|
2786
|
+
ExtractGlobalOmit
|
|
2633
2787
|
}
|
|
2634
2788
|
}
|
|
2635
2789
|
|
|
@@ -2689,7 +2843,7 @@ export declare type Return<T> = T extends (...args: any[]) => infer R ? R : T;
|
|
|
2689
2843
|
|
|
2690
2844
|
declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown";
|
|
2691
2845
|
|
|
2692
|
-
declare type RuntimeDataModel = {
|
|
2846
|
+
export declare type RuntimeDataModel = {
|
|
2693
2847
|
readonly models: Record<string, RuntimeModel>;
|
|
2694
2848
|
readonly enums: Record<string, RuntimeEnum>;
|
|
2695
2849
|
readonly types: Record<string, RuntimeModel>;
|
|
@@ -2717,9 +2871,32 @@ export declare type SelectField<P extends SelectablePayloadFields<any, any>, K e
|
|
|
2717
2871
|
composites: Record<K, any>;
|
|
2718
2872
|
} ? P['composites'][K] : never;
|
|
2719
2873
|
|
|
2720
|
-
declare type Selection_2 = Record<string, boolean | JsArgs>;
|
|
2874
|
+
declare type Selection_2 = Record<string, boolean | Skip | JsArgs>;
|
|
2721
2875
|
export { Selection_2 as Selection }
|
|
2722
2876
|
|
|
2877
|
+
export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, }: SerializeParams): JsonQuery;
|
|
2878
|
+
|
|
2879
|
+
declare type SerializeParams = {
|
|
2880
|
+
runtimeDataModel: RuntimeDataModel;
|
|
2881
|
+
modelName?: string;
|
|
2882
|
+
action: Action;
|
|
2883
|
+
args?: JsArgs;
|
|
2884
|
+
extensions?: MergedExtensionsList;
|
|
2885
|
+
callsite?: CallSite;
|
|
2886
|
+
clientMethod: string;
|
|
2887
|
+
clientVersion: string;
|
|
2888
|
+
errorFormat: ErrorFormat;
|
|
2889
|
+
previewFeatures: string[];
|
|
2890
|
+
globalOmit?: GlobalOmitOptions;
|
|
2891
|
+
};
|
|
2892
|
+
|
|
2893
|
+
declare class Skip {
|
|
2894
|
+
constructor(param?: symbol);
|
|
2895
|
+
ifUndefined<T>(value: T | undefined): T | Skip;
|
|
2896
|
+
}
|
|
2897
|
+
|
|
2898
|
+
export declare const skip: Skip;
|
|
2899
|
+
|
|
2723
2900
|
/**
|
|
2724
2901
|
* An interface that represents a span. A span represents a single operation
|
|
2725
2902
|
* within a trace. Examples of span might include remote procedure calls or a
|
|
@@ -2768,6 +2945,24 @@ declare interface Span {
|
|
|
2768
2945
|
* @param [startTime] start time of the event.
|
|
2769
2946
|
*/
|
|
2770
2947
|
addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this;
|
|
2948
|
+
/**
|
|
2949
|
+
* Adds a single link to the span.
|
|
2950
|
+
*
|
|
2951
|
+
* Links added after the creation will not affect the sampling decision.
|
|
2952
|
+
* It is preferred span links be added at span creation.
|
|
2953
|
+
*
|
|
2954
|
+
* @param link the link to add.
|
|
2955
|
+
*/
|
|
2956
|
+
addLink(link: Link): this;
|
|
2957
|
+
/**
|
|
2958
|
+
* Adds multiple links to the span.
|
|
2959
|
+
*
|
|
2960
|
+
* Links added after the creation will not affect the sampling decision.
|
|
2961
|
+
* It is preferred span links be added at span creation.
|
|
2962
|
+
*
|
|
2963
|
+
* @param links the links to add.
|
|
2964
|
+
*/
|
|
2965
|
+
addLinks(links: Link[]): this;
|
|
2771
2966
|
/**
|
|
2772
2967
|
* Sets a status to the span. If used, this will override the default Span
|
|
2773
2968
|
* status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value
|
|
@@ -3054,6 +3249,13 @@ declare namespace Transaction_2 {
|
|
|
3054
3249
|
}
|
|
3055
3250
|
}
|
|
3056
3251
|
|
|
3252
|
+
declare interface TransactionContext extends Queryable {
|
|
3253
|
+
/**
|
|
3254
|
+
* Starts new transaction.
|
|
3255
|
+
*/
|
|
3256
|
+
startTransaction(): Promise<Result_4<Transaction>>;
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3057
3259
|
declare type TransactionHeaders = {
|
|
3058
3260
|
traceparent?: string;
|
|
3059
3261
|
};
|
|
@@ -3070,12 +3272,16 @@ declare type TransactionOptions_2<InteractiveTransactionPayload> = {
|
|
|
3070
3272
|
options: BatchTransactionOptions;
|
|
3071
3273
|
};
|
|
3072
3274
|
|
|
3073
|
-
export declare
|
|
3074
|
-
[
|
|
3075
|
-
|
|
3275
|
+
export declare class TypedSql<Values extends readonly unknown[], Result> {
|
|
3276
|
+
[PrivateResultType]: Result;
|
|
3277
|
+
constructor(sql: string, values: Values);
|
|
3278
|
+
get sql(): string;
|
|
3279
|
+
get values(): Values;
|
|
3280
|
+
}
|
|
3076
3281
|
|
|
3077
3282
|
export declare type TypeMapCbDef = Fn<{
|
|
3078
3283
|
extArgs: InternalArgs;
|
|
3284
|
+
clientOptions: ClientOptionDef;
|
|
3079
3285
|
}, TypeMapDef>;
|
|
3080
3286
|
|
|
3081
3287
|
/** Shared */
|
|
@@ -3087,6 +3293,10 @@ declare namespace Types {
|
|
|
3087
3293
|
Extensions_2 as Extensions,
|
|
3088
3294
|
Utils,
|
|
3089
3295
|
Public_2 as Public,
|
|
3296
|
+
isSkip,
|
|
3297
|
+
Skip,
|
|
3298
|
+
skip,
|
|
3299
|
+
UnknownTypedSql,
|
|
3090
3300
|
OperationPayload as Payload
|
|
3091
3301
|
}
|
|
3092
3302
|
}
|
|
@@ -3097,6 +3307,8 @@ declare type UnknownErrorParams = {
|
|
|
3097
3307
|
batchRequestIdx?: number;
|
|
3098
3308
|
};
|
|
3099
3309
|
|
|
3310
|
+
export declare type UnknownTypedSql = TypedSql<unknown[], unknown>;
|
|
3311
|
+
|
|
3100
3312
|
declare type Unpacker = (data: any) => any;
|
|
3101
3313
|
|
|
3102
3314
|
export declare type UnwrapPayload<P> = {} extends P ? unknown : {
|
|
@@ -3135,9 +3347,6 @@ declare namespace Utils {
|
|
|
3135
3347
|
Narrow,
|
|
3136
3348
|
Exact,
|
|
3137
3349
|
Cast,
|
|
3138
|
-
JsonObject,
|
|
3139
|
-
JsonArray,
|
|
3140
|
-
JsonValue,
|
|
3141
3350
|
Record_2 as Record,
|
|
3142
3351
|
UnwrapPromise,
|
|
3143
3352
|
UnwrapTuple,
|