prisma 6.6.0-dev.8 → 6.6.0-dev.80
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/build/index.js +4023 -1167
- package/build/prisma_schema_build_bg.wasm +0 -0
- package/build/public/assets/index.js +1 -1
- package/package.json +21 -19
- package/preinstall/index.js +4 -4
- package/prisma-client/generator-build/index.js +15448 -9300
- package/prisma-client/package.json +16 -15
- package/prisma-client/runtime/binary.js +120 -120
- package/prisma-client/runtime/client.d.ts +404 -290
- package/prisma-client/runtime/client.js +41 -38
- package/prisma-client/runtime/edge-esm.js +18 -18
- package/prisma-client/runtime/edge.js +18 -18
- package/prisma-client/runtime/index-browser.js +1 -1
- package/prisma-client/runtime/library.d.ts +404 -290
- package/prisma-client/runtime/library.js +65 -65
- package/prisma-client/runtime/query_engine_bg.mysql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.postgresql.js +2 -2
- package/prisma-client/runtime/query_engine_bg.sqlite.js +2 -2
- package/prisma-client/runtime/react-native.d.ts +404 -290
- package/prisma-client/runtime/react-native.js +27 -27
- package/prisma-client/scripts/default-index.js +3 -3
@@ -23,7 +23,7 @@ declare type AccelerateEngineConfig = {
|
|
23
23
|
|
24
24
|
declare type AccelerateUtils = EngineConfig['accelerateUtils'];
|
25
25
|
|
26
|
-
export declare type Action = keyof typeof
|
26
|
+
export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw';
|
27
27
|
|
28
28
|
declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres' | 'prisma+postgres'>;
|
29
29
|
|
@@ -91,7 +91,7 @@ declare interface Attributes {
|
|
91
91
|
declare type AttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
|
92
92
|
|
93
93
|
export declare type BaseDMMF = {
|
94
|
-
readonly datamodel: Omit<
|
94
|
+
readonly datamodel: Omit<DMMF_2.Datamodel, 'indexes'>;
|
95
95
|
};
|
96
96
|
|
97
97
|
declare type BatchArgs = {
|
@@ -123,7 +123,7 @@ declare type BatchQueryOptionsCbArgs = {
|
|
123
123
|
};
|
124
124
|
|
125
125
|
declare type BatchTransactionOptions = {
|
126
|
-
isolationLevel?:
|
126
|
+
isolationLevel?: IsolationLevel;
|
127
127
|
};
|
128
128
|
|
129
129
|
declare interface BinaryTargetsEnvValue {
|
@@ -209,7 +209,7 @@ declare type CompilerWasmLoadingConfig = {
|
|
209
209
|
* WASM-bindgen runtime for corresponding module
|
210
210
|
*/
|
211
211
|
getRuntime: () => {
|
212
|
-
__wbg_set_wasm(exports: unknown):
|
212
|
+
__wbg_set_wasm(exports: unknown): void;
|
213
213
|
QueryCompiler: QueryCompilerConstructor;
|
214
214
|
};
|
215
215
|
/**
|
@@ -347,6 +347,22 @@ declare type DataLoaderOptions<T> = {
|
|
347
347
|
batchOrder: (requestA: T, requestB: T) => number;
|
348
348
|
};
|
349
349
|
|
350
|
+
declare type Datamodel = ReadonlyDeep_2<{
|
351
|
+
models: Model[];
|
352
|
+
enums: DatamodelEnum[];
|
353
|
+
types: Model[];
|
354
|
+
indexes: Index[];
|
355
|
+
}>;
|
356
|
+
|
357
|
+
declare type DatamodelEnum = ReadonlyDeep_2<{
|
358
|
+
name: string;
|
359
|
+
values: EnumValue[];
|
360
|
+
dbName?: string | null;
|
361
|
+
documentation?: string;
|
362
|
+
}>;
|
363
|
+
|
364
|
+
declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum;
|
365
|
+
|
350
366
|
declare type Datasource = {
|
351
367
|
url?: string;
|
352
368
|
};
|
@@ -681,6 +697,12 @@ declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Clien
|
|
681
697
|
|
682
698
|
declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"];
|
683
699
|
|
700
|
+
declare type Deprecation = ReadonlyDeep_2<{
|
701
|
+
sinceVersion: string;
|
702
|
+
reason: string;
|
703
|
+
plannedRemovalVersion?: string;
|
704
|
+
}>;
|
705
|
+
|
684
706
|
declare type DeserializedResponse = Array<Record<string, unknown>>;
|
685
707
|
|
686
708
|
export declare function deserializeJsonResponse(result: unknown): unknown;
|
@@ -708,263 +730,104 @@ export declare type DevTypeMapFnDef = {
|
|
708
730
|
};
|
709
731
|
|
710
732
|
export declare namespace DMMF {
|
711
|
-
export
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
name: string;
|
749
|
-
fields: string[];
|
750
|
-
}>;
|
751
|
-
export type PrimaryKey = ReadonlyDeep_2<{
|
752
|
-
name: string | null;
|
753
|
-
fields: string[];
|
754
|
-
}>;
|
755
|
-
export type Model = ReadonlyDeep_2<{
|
756
|
-
name: string;
|
757
|
-
dbName: string | null;
|
758
|
-
schema: string | null;
|
759
|
-
fields: Field[];
|
760
|
-
uniqueFields: string[][];
|
761
|
-
uniqueIndexes: uniqueIndex[];
|
762
|
-
documentation?: string;
|
763
|
-
primaryKey: PrimaryKey | null;
|
764
|
-
isGenerated?: boolean;
|
765
|
-
}>;
|
766
|
-
export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported';
|
767
|
-
export type FieldNamespace = 'model' | 'prisma';
|
768
|
-
export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes';
|
769
|
-
export type Field = ReadonlyDeep_2<{
|
770
|
-
kind: FieldKind;
|
771
|
-
name: string;
|
772
|
-
isRequired: boolean;
|
773
|
-
isList: boolean;
|
774
|
-
isUnique: boolean;
|
775
|
-
isId: boolean;
|
776
|
-
isReadOnly: boolean;
|
777
|
-
isGenerated?: boolean;
|
778
|
-
isUpdatedAt?: boolean;
|
779
|
-
/**
|
780
|
-
* Describes the data type in the same the way it is defined in the Prisma schema:
|
781
|
-
* BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
|
782
|
-
*/
|
783
|
-
type: string;
|
784
|
-
/**
|
785
|
-
* Native database type, if specified.
|
786
|
-
* For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`,
|
787
|
-
* `@db.Text` is encoded as `['Text', []]`.
|
788
|
-
*/
|
789
|
-
nativeType?: [string, string[]] | null;
|
790
|
-
dbName?: string | null;
|
791
|
-
hasDefaultValue: boolean;
|
792
|
-
default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
|
793
|
-
relationFromFields?: string[];
|
794
|
-
relationToFields?: string[];
|
795
|
-
relationOnDelete?: string;
|
796
|
-
relationOnUpdate?: string;
|
797
|
-
relationName?: string;
|
798
|
-
documentation?: string;
|
799
|
-
}>;
|
800
|
-
export type FieldDefault = ReadonlyDeep_2<{
|
801
|
-
name: string;
|
802
|
-
args: Array<string | number>;
|
803
|
-
}>;
|
804
|
-
export type FieldDefaultScalar = string | boolean | number;
|
805
|
-
export type Index = ReadonlyDeep_2<{
|
806
|
-
model: string;
|
807
|
-
type: IndexType;
|
808
|
-
isDefinedOnField: boolean;
|
809
|
-
name?: string;
|
810
|
-
dbName?: string;
|
811
|
-
algorithm?: string;
|
812
|
-
clustered?: boolean;
|
813
|
-
fields: IndexField[];
|
814
|
-
}>;
|
815
|
-
export type IndexType = 'id' | 'normal' | 'unique' | 'fulltext';
|
816
|
-
export type IndexField = ReadonlyDeep_2<{
|
817
|
-
name: string;
|
818
|
-
sortOrder?: SortOrder;
|
819
|
-
length?: number;
|
820
|
-
operatorClass?: string;
|
821
|
-
}>;
|
822
|
-
export type SortOrder = 'asc' | 'desc';
|
823
|
-
export type Schema = ReadonlyDeep_2<{
|
824
|
-
rootQueryType?: string;
|
825
|
-
rootMutationType?: string;
|
826
|
-
inputObjectTypes: {
|
827
|
-
model?: InputType[];
|
828
|
-
prisma: InputType[];
|
829
|
-
};
|
830
|
-
outputObjectTypes: {
|
831
|
-
model: OutputType[];
|
832
|
-
prisma: OutputType[];
|
833
|
-
};
|
834
|
-
enumTypes: {
|
835
|
-
model?: SchemaEnum[];
|
836
|
-
prisma: SchemaEnum[];
|
837
|
-
};
|
838
|
-
fieldRefTypes: {
|
839
|
-
prisma?: FieldRefType[];
|
840
|
-
};
|
841
|
-
}>;
|
842
|
-
export type Query = ReadonlyDeep_2<{
|
843
|
-
name: string;
|
844
|
-
args: SchemaArg[];
|
845
|
-
output: QueryOutput;
|
846
|
-
}>;
|
847
|
-
export type QueryOutput = ReadonlyDeep_2<{
|
848
|
-
name: string;
|
849
|
-
isRequired: boolean;
|
850
|
-
isList: boolean;
|
851
|
-
}>;
|
852
|
-
export type TypeRef<AllowedLocations extends FieldLocation> = {
|
853
|
-
isList: boolean;
|
854
|
-
type: string;
|
855
|
-
location: AllowedLocations;
|
856
|
-
namespace?: FieldNamespace;
|
857
|
-
};
|
858
|
-
export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>;
|
859
|
-
export type SchemaArg = ReadonlyDeep_2<{
|
860
|
-
name: string;
|
861
|
-
comment?: string;
|
862
|
-
isNullable: boolean;
|
863
|
-
isRequired: boolean;
|
864
|
-
inputTypes: InputTypeRef[];
|
865
|
-
deprecation?: Deprecation;
|
866
|
-
}>;
|
867
|
-
export type OutputType = ReadonlyDeep_2<{
|
868
|
-
name: string;
|
869
|
-
fields: SchemaField[];
|
870
|
-
}>;
|
871
|
-
export type SchemaField = ReadonlyDeep_2<{
|
872
|
-
name: string;
|
873
|
-
isNullable?: boolean;
|
874
|
-
outputType: OutputTypeRef;
|
875
|
-
args: SchemaArg[];
|
876
|
-
deprecation?: Deprecation;
|
877
|
-
documentation?: string;
|
878
|
-
}>;
|
879
|
-
export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>;
|
880
|
-
export type Deprecation = ReadonlyDeep_2<{
|
881
|
-
sinceVersion: string;
|
882
|
-
reason: string;
|
883
|
-
plannedRemovalVersion?: string;
|
884
|
-
}>;
|
885
|
-
export type InputType = ReadonlyDeep_2<{
|
886
|
-
name: string;
|
887
|
-
constraints: {
|
888
|
-
maxNumFields: number | null;
|
889
|
-
minNumFields: number | null;
|
890
|
-
fields?: string[];
|
891
|
-
};
|
892
|
-
meta?: {
|
893
|
-
source?: string;
|
894
|
-
};
|
895
|
-
fields: SchemaArg[];
|
896
|
-
}>;
|
897
|
-
export type FieldRefType = ReadonlyDeep_2<{
|
898
|
-
name: string;
|
899
|
-
allowTypes: FieldRefAllowType[];
|
900
|
-
fields: SchemaArg[];
|
901
|
-
}>;
|
902
|
-
export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>;
|
903
|
-
export type ModelMapping = ReadonlyDeep_2<{
|
904
|
-
model: string;
|
905
|
-
plural: string;
|
906
|
-
findUnique?: string | null;
|
907
|
-
findUniqueOrThrow?: string | null;
|
908
|
-
findFirst?: string | null;
|
909
|
-
findFirstOrThrow?: string | null;
|
910
|
-
findMany?: string | null;
|
911
|
-
create?: string | null;
|
912
|
-
createMany?: string | null;
|
913
|
-
createManyAndReturn?: string | null;
|
914
|
-
update?: string | null;
|
915
|
-
updateMany?: string | null;
|
916
|
-
updateManyAndReturn?: string | null;
|
917
|
-
upsert?: string | null;
|
918
|
-
delete?: string | null;
|
919
|
-
deleteMany?: string | null;
|
920
|
-
aggregate?: string | null;
|
921
|
-
groupBy?: string | null;
|
922
|
-
count?: string | null;
|
923
|
-
findRaw?: string | null;
|
924
|
-
aggregateRaw?: string | null;
|
925
|
-
}>;
|
926
|
-
export enum ModelAction {
|
927
|
-
findUnique = "findUnique",
|
928
|
-
findUniqueOrThrow = "findUniqueOrThrow",
|
929
|
-
findFirst = "findFirst",
|
930
|
-
findFirstOrThrow = "findFirstOrThrow",
|
931
|
-
findMany = "findMany",
|
932
|
-
create = "create",
|
933
|
-
createMany = "createMany",
|
934
|
-
createManyAndReturn = "createManyAndReturn",
|
935
|
-
update = "update",
|
936
|
-
updateMany = "updateMany",
|
937
|
-
updateManyAndReturn = "updateManyAndReturn",
|
938
|
-
upsert = "upsert",
|
939
|
-
delete = "delete",
|
940
|
-
deleteMany = "deleteMany",
|
941
|
-
groupBy = "groupBy",
|
942
|
-
count = "count",// TODO: count does not actually exist, why?
|
943
|
-
aggregate = "aggregate",
|
944
|
-
findRaw = "findRaw",
|
945
|
-
aggregateRaw = "aggregateRaw"
|
733
|
+
export {
|
734
|
+
datamodelEnumToSchemaEnum,
|
735
|
+
Document_2 as Document,
|
736
|
+
Mappings,
|
737
|
+
OtherOperationMappings,
|
738
|
+
DatamodelEnum,
|
739
|
+
SchemaEnum,
|
740
|
+
EnumValue,
|
741
|
+
Datamodel,
|
742
|
+
uniqueIndex,
|
743
|
+
PrimaryKey,
|
744
|
+
Model,
|
745
|
+
FieldKind,
|
746
|
+
FieldNamespace,
|
747
|
+
FieldLocation,
|
748
|
+
Field,
|
749
|
+
FieldDefault,
|
750
|
+
FieldDefaultScalar,
|
751
|
+
Index,
|
752
|
+
IndexType,
|
753
|
+
IndexField,
|
754
|
+
SortOrder,
|
755
|
+
Schema,
|
756
|
+
Query,
|
757
|
+
QueryOutput,
|
758
|
+
TypeRef,
|
759
|
+
InputTypeRef,
|
760
|
+
SchemaArg,
|
761
|
+
OutputType,
|
762
|
+
SchemaField,
|
763
|
+
OutputTypeRef,
|
764
|
+
Deprecation,
|
765
|
+
InputType,
|
766
|
+
FieldRefType,
|
767
|
+
FieldRefAllowType,
|
768
|
+
ModelMapping,
|
769
|
+
ModelAction
|
946
770
|
}
|
947
771
|
}
|
948
772
|
|
949
|
-
|
773
|
+
declare namespace DMMF_2 {
|
774
|
+
export {
|
775
|
+
datamodelEnumToSchemaEnum,
|
776
|
+
Document_2 as Document,
|
777
|
+
Mappings,
|
778
|
+
OtherOperationMappings,
|
779
|
+
DatamodelEnum,
|
780
|
+
SchemaEnum,
|
781
|
+
EnumValue,
|
782
|
+
Datamodel,
|
783
|
+
uniqueIndex,
|
784
|
+
PrimaryKey,
|
785
|
+
Model,
|
786
|
+
FieldKind,
|
787
|
+
FieldNamespace,
|
788
|
+
FieldLocation,
|
789
|
+
Field,
|
790
|
+
FieldDefault,
|
791
|
+
FieldDefaultScalar,
|
792
|
+
Index,
|
793
|
+
IndexType,
|
794
|
+
IndexField,
|
795
|
+
SortOrder,
|
796
|
+
Schema,
|
797
|
+
Query,
|
798
|
+
QueryOutput,
|
799
|
+
TypeRef,
|
800
|
+
InputTypeRef,
|
801
|
+
SchemaArg,
|
802
|
+
OutputType,
|
803
|
+
SchemaField,
|
804
|
+
OutputTypeRef,
|
805
|
+
Deprecation,
|
806
|
+
InputType,
|
807
|
+
FieldRefType,
|
808
|
+
FieldRefAllowType,
|
809
|
+
ModelMapping,
|
810
|
+
ModelAction
|
811
|
+
}
|
812
|
+
}
|
950
813
|
|
951
|
-
export declare
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
814
|
+
export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF_2.Datamodel): RuntimeDataModel;
|
815
|
+
|
816
|
+
declare type Document_2 = ReadonlyDeep_2<{
|
817
|
+
datamodel: Datamodel;
|
818
|
+
schema: Schema;
|
819
|
+
mappings: Mappings;
|
820
|
+
}>;
|
821
|
+
|
822
|
+
/**
|
823
|
+
* A generic driver adapter factory that allows the user to instantiate a
|
824
|
+
* driver adapter. The query and result types are specific to the adapter.
|
825
|
+
*/
|
826
|
+
declare interface DriverAdapterFactory<Query, Result> extends AdapterInfo {
|
964
827
|
/**
|
965
|
-
*
|
828
|
+
* Instantiate a driver adapter.
|
966
829
|
*/
|
967
|
-
|
830
|
+
connect(): Promise<Queryable<Query, Result>>;
|
968
831
|
}
|
969
832
|
|
970
833
|
/** Client */
|
@@ -1161,7 +1024,7 @@ declare interface EngineConfig {
|
|
1161
1024
|
* rather than Prisma's Rust drivers.
|
1162
1025
|
* @remarks only used by LibraryEngine.ts
|
1163
1026
|
*/
|
1164
|
-
adapter?:
|
1027
|
+
adapter?: SqlDriverAdapterFactory;
|
1165
1028
|
/**
|
1166
1029
|
* The contents of the schema encoded into a string
|
1167
1030
|
* @remarks only used by DataProxyEngine.ts
|
@@ -1215,8 +1078,6 @@ declare type EngineEvent<E extends EngineEventType> = E extends QueryEventType ?
|
|
1215
1078
|
|
1216
1079
|
declare type EngineEventType = QueryEventType | LogEventType;
|
1217
1080
|
|
1218
|
-
declare type EngineProtocol = 'graphql' | 'json';
|
1219
|
-
|
1220
1081
|
declare type EngineSpan = {
|
1221
1082
|
id: EngineSpanId;
|
1222
1083
|
parentId: string | null;
|
@@ -1237,7 +1098,7 @@ declare type EngineWasmLoadingConfig = {
|
|
1237
1098
|
* WASM-bindgen runtime for corresponding module
|
1238
1099
|
*/
|
1239
1100
|
getRuntime: () => {
|
1240
|
-
__wbg_set_wasm(exports: unknown):
|
1101
|
+
__wbg_set_wasm(exports: unknown): void;
|
1241
1102
|
QueryEngine: QueryEngineConstructor;
|
1242
1103
|
};
|
1243
1104
|
/**
|
@@ -1250,6 +1111,11 @@ declare type EngineWasmLoadingConfig = {
|
|
1250
1111
|
getQueryEngineWasmModule: () => Promise<unknown>;
|
1251
1112
|
};
|
1252
1113
|
|
1114
|
+
declare type EnumValue = ReadonlyDeep_2<{
|
1115
|
+
name: string;
|
1116
|
+
dbName: string | null;
|
1117
|
+
}>;
|
1118
|
+
|
1253
1119
|
declare type EnvPaths = {
|
1254
1120
|
rootEnvPath: string | null;
|
1255
1121
|
schemaEnvPath: string | undefined;
|
@@ -1268,6 +1134,9 @@ declare type Error_2 = {
|
|
1268
1134
|
} | {
|
1269
1135
|
kind: 'UnsupportedNativeDataType';
|
1270
1136
|
type: string;
|
1137
|
+
} | {
|
1138
|
+
kind: 'InvalidIsolationLevel';
|
1139
|
+
level: string;
|
1271
1140
|
} | {
|
1272
1141
|
kind: 'postgres';
|
1273
1142
|
code: string;
|
@@ -1296,7 +1165,7 @@ declare type ErrorCapturingInterface<T> = {
|
|
1296
1165
|
[K in keyof T]: ErrorCapturingFunction<T[K]>;
|
1297
1166
|
};
|
1298
1167
|
|
1299
|
-
declare interface
|
1168
|
+
declare interface ErrorCapturingSqlDriverAdapter extends ErrorCapturingInterface<SqlDriverAdapter> {
|
1300
1169
|
readonly errorRegistry: ErrorRegistry;
|
1301
1170
|
}
|
1302
1171
|
|
@@ -1453,6 +1322,51 @@ export declare type ExtractGlobalOmit<Options, ModelName extends string> = Optio
|
|
1453
1322
|
};
|
1454
1323
|
} ? GlobalOmit : {};
|
1455
1324
|
|
1325
|
+
declare type Field = ReadonlyDeep_2<{
|
1326
|
+
kind: FieldKind;
|
1327
|
+
name: string;
|
1328
|
+
isRequired: boolean;
|
1329
|
+
isList: boolean;
|
1330
|
+
isUnique: boolean;
|
1331
|
+
isId: boolean;
|
1332
|
+
isReadOnly: boolean;
|
1333
|
+
isGenerated?: boolean;
|
1334
|
+
isUpdatedAt?: boolean;
|
1335
|
+
/**
|
1336
|
+
* Describes the data type in the same the way it is defined in the Prisma schema:
|
1337
|
+
* BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
|
1338
|
+
*/
|
1339
|
+
type: string;
|
1340
|
+
/**
|
1341
|
+
* Native database type, if specified.
|
1342
|
+
* For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`,
|
1343
|
+
* `@db.Text` is encoded as `['Text', []]`.
|
1344
|
+
*/
|
1345
|
+
nativeType?: [string, string[]] | null;
|
1346
|
+
dbName?: string | null;
|
1347
|
+
hasDefaultValue: boolean;
|
1348
|
+
default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
|
1349
|
+
relationFromFields?: string[];
|
1350
|
+
relationToFields?: string[];
|
1351
|
+
relationOnDelete?: string;
|
1352
|
+
relationOnUpdate?: string;
|
1353
|
+
relationName?: string;
|
1354
|
+
documentation?: string;
|
1355
|
+
}>;
|
1356
|
+
|
1357
|
+
declare type FieldDefault = ReadonlyDeep_2<{
|
1358
|
+
name: string;
|
1359
|
+
args: Array<string | number>;
|
1360
|
+
}>;
|
1361
|
+
|
1362
|
+
declare type FieldDefaultScalar = string | boolean | number;
|
1363
|
+
|
1364
|
+
declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported';
|
1365
|
+
|
1366
|
+
declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes';
|
1367
|
+
|
1368
|
+
declare type FieldNamespace = 'model' | 'prisma';
|
1369
|
+
|
1456
1370
|
/**
|
1457
1371
|
* A reference to a specific field of a specific model
|
1458
1372
|
*/
|
@@ -1463,7 +1377,15 @@ export declare interface FieldRef<Model, FieldType> {
|
|
1463
1377
|
readonly isList: boolean;
|
1464
1378
|
}
|
1465
1379
|
|
1466
|
-
|
1380
|
+
declare type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>;
|
1381
|
+
|
1382
|
+
declare type FieldRefType = ReadonlyDeep_2<{
|
1383
|
+
name: string;
|
1384
|
+
allowTypes: FieldRefAllowType[];
|
1385
|
+
fields: SchemaArg[];
|
1386
|
+
}>;
|
1387
|
+
|
1388
|
+
declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete';
|
1467
1389
|
|
1468
1390
|
export declare interface Fn<Params = unknown, Returns = unknown> {
|
1469
1391
|
params: Params;
|
@@ -1843,6 +1765,26 @@ declare type HrTime = [number, number];
|
|
1843
1765
|
*/
|
1844
1766
|
declare type HrTime_2 = [number, number];
|
1845
1767
|
|
1768
|
+
declare type Index = ReadonlyDeep_2<{
|
1769
|
+
model: string;
|
1770
|
+
type: IndexType;
|
1771
|
+
isDefinedOnField: boolean;
|
1772
|
+
name?: string;
|
1773
|
+
dbName?: string;
|
1774
|
+
algorithm?: string;
|
1775
|
+
clustered?: boolean;
|
1776
|
+
fields: IndexField[];
|
1777
|
+
}>;
|
1778
|
+
|
1779
|
+
declare type IndexField = ReadonlyDeep_2<{
|
1780
|
+
name: string;
|
1781
|
+
sortOrder?: SortOrder;
|
1782
|
+
length?: number;
|
1783
|
+
operatorClass?: string;
|
1784
|
+
}>;
|
1785
|
+
|
1786
|
+
declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext';
|
1787
|
+
|
1846
1788
|
/**
|
1847
1789
|
* Matches a JSON array.
|
1848
1790
|
* Unlike \`JsonArray\`, readonly arrays are assignable to this type.
|
@@ -1875,6 +1817,22 @@ export declare type InputJsonValue = string | number | boolean | InputJsonObject
|
|
1875
1817
|
toJSON(): unknown;
|
1876
1818
|
};
|
1877
1819
|
|
1820
|
+
declare type InputType = ReadonlyDeep_2<{
|
1821
|
+
name: string;
|
1822
|
+
constraints: {
|
1823
|
+
maxNumFields: number | null;
|
1824
|
+
minNumFields: number | null;
|
1825
|
+
fields?: string[];
|
1826
|
+
};
|
1827
|
+
meta?: {
|
1828
|
+
source?: string;
|
1829
|
+
grouping?: string;
|
1830
|
+
};
|
1831
|
+
fields: SchemaArg[];
|
1832
|
+
}>;
|
1833
|
+
|
1834
|
+
declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>;
|
1835
|
+
|
1878
1836
|
declare type InteractiveTransactionInfo<Payload = unknown> = {
|
1879
1837
|
/**
|
1880
1838
|
* Transaction ID returned by the query engine.
|
@@ -1950,13 +1908,7 @@ declare type InternalRequestParams = {
|
|
1950
1908
|
customDataProxyFetch?: CustomDataProxyFetch;
|
1951
1909
|
} & Omit<QueryMiddlewareParams, 'runInTransaction'>;
|
1952
1910
|
|
1953
|
-
declare
|
1954
|
-
ReadUncommitted = "ReadUncommitted",
|
1955
|
-
ReadCommitted = "ReadCommitted",
|
1956
|
-
RepeatableRead = "RepeatableRead",
|
1957
|
-
Snapshot = "Snapshot",
|
1958
|
-
Serializable = "Serializable"
|
1959
|
-
}
|
1911
|
+
declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
|
1960
1912
|
|
1961
1913
|
declare function isSkip(value: unknown): value is Skip;
|
1962
1914
|
|
@@ -2002,7 +1954,7 @@ export declare interface JsonArray extends Array<JsonValue> {
|
|
2002
1954
|
export declare type JsonBatchQuery = {
|
2003
1955
|
batch: JsonQuery[];
|
2004
1956
|
transaction?: {
|
2005
|
-
isolationLevel?:
|
1957
|
+
isolationLevel?: IsolationLevel;
|
2006
1958
|
};
|
2007
1959
|
};
|
2008
1960
|
|
@@ -2145,6 +2097,14 @@ export declare function makeStrictEnum<T extends Record<PropertyKey, string | nu
|
|
2145
2097
|
|
2146
2098
|
export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql<any[], unknown>;
|
2147
2099
|
|
2100
|
+
declare type Mappings = ReadonlyDeep_2<{
|
2101
|
+
modelOperations: ModelMapping[];
|
2102
|
+
otherOperations: {
|
2103
|
+
read: string[];
|
2104
|
+
write: string[];
|
2105
|
+
};
|
2106
|
+
}>;
|
2107
|
+
|
2148
2108
|
/**
|
2149
2109
|
* Class that holds the list of all extensions, applied to particular instance,
|
2150
2110
|
* as well as resolved versions of the components that need to apply on
|
@@ -2244,6 +2204,40 @@ declare class MiddlewareHandler<M extends Function> {
|
|
2244
2204
|
length(): number;
|
2245
2205
|
}
|
2246
2206
|
|
2207
|
+
declare type Model = ReadonlyDeep_2<{
|
2208
|
+
name: string;
|
2209
|
+
dbName: string | null;
|
2210
|
+
schema: string | null;
|
2211
|
+
fields: Field[];
|
2212
|
+
uniqueFields: string[][];
|
2213
|
+
uniqueIndexes: uniqueIndex[];
|
2214
|
+
documentation?: string;
|
2215
|
+
primaryKey: PrimaryKey | null;
|
2216
|
+
isGenerated?: boolean;
|
2217
|
+
}>;
|
2218
|
+
|
2219
|
+
declare enum ModelAction {
|
2220
|
+
findUnique = "findUnique",
|
2221
|
+
findUniqueOrThrow = "findUniqueOrThrow",
|
2222
|
+
findFirst = "findFirst",
|
2223
|
+
findFirstOrThrow = "findFirstOrThrow",
|
2224
|
+
findMany = "findMany",
|
2225
|
+
create = "create",
|
2226
|
+
createMany = "createMany",
|
2227
|
+
createManyAndReturn = "createManyAndReturn",
|
2228
|
+
update = "update",
|
2229
|
+
updateMany = "updateMany",
|
2230
|
+
updateManyAndReturn = "updateManyAndReturn",
|
2231
|
+
upsert = "upsert",
|
2232
|
+
delete = "delete",
|
2233
|
+
deleteMany = "deleteMany",
|
2234
|
+
groupBy = "groupBy",
|
2235
|
+
count = "count",// TODO: count does not actually exist in DMMF
|
2236
|
+
aggregate = "aggregate",
|
2237
|
+
findRaw = "findRaw",
|
2238
|
+
aggregateRaw = "aggregateRaw"
|
2239
|
+
}
|
2240
|
+
|
2247
2241
|
export declare type ModelArg = {
|
2248
2242
|
[MethodName in string]: unknown;
|
2249
2243
|
};
|
@@ -2256,6 +2250,30 @@ export declare type ModelArgs = {
|
|
2256
2250
|
|
2257
2251
|
export declare type ModelKey<TypeMap extends TypeMapDef, M extends PropertyKey> = M extends keyof TypeMap['model'] ? M : Capitalize<M & string>;
|
2258
2252
|
|
2253
|
+
declare type ModelMapping = ReadonlyDeep_2<{
|
2254
|
+
model: string;
|
2255
|
+
plural: string;
|
2256
|
+
findUnique?: string | null;
|
2257
|
+
findUniqueOrThrow?: string | null;
|
2258
|
+
findFirst?: string | null;
|
2259
|
+
findFirstOrThrow?: string | null;
|
2260
|
+
findMany?: string | null;
|
2261
|
+
create?: string | null;
|
2262
|
+
createMany?: string | null;
|
2263
|
+
createManyAndReturn?: string | null;
|
2264
|
+
update?: string | null;
|
2265
|
+
updateMany?: string | null;
|
2266
|
+
updateManyAndReturn?: string | null;
|
2267
|
+
upsert?: string | null;
|
2268
|
+
delete?: string | null;
|
2269
|
+
deleteMany?: string | null;
|
2270
|
+
aggregate?: string | null;
|
2271
|
+
groupBy?: string | null;
|
2272
|
+
count?: string | null;
|
2273
|
+
findRaw?: string | null;
|
2274
|
+
aggregateRaw?: string | null;
|
2275
|
+
}>;
|
2276
|
+
|
2259
2277
|
export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise<any>;
|
2260
2278
|
|
2261
2279
|
export declare type ModelQueryOptionsCbArgs = {
|
@@ -2281,11 +2299,6 @@ declare class NullTypesEnumValue extends ObjectEnumValue {
|
|
2281
2299
|
_getNamespace(): string;
|
2282
2300
|
}
|
2283
2301
|
|
2284
|
-
/**
|
2285
|
-
* List of Prisma enums that must use unique objects instead of strings as their values.
|
2286
|
-
*/
|
2287
|
-
export declare const objectEnumNames: string[];
|
2288
|
-
|
2289
2302
|
/**
|
2290
2303
|
* Base class for unique values of object-valued enums.
|
2291
2304
|
*/
|
@@ -2364,6 +2377,18 @@ export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
|
|
2364
2377
|
};
|
2365
2378
|
}[A][B];
|
2366
2379
|
|
2380
|
+
declare type OtherOperationMappings = ReadonlyDeep_2<{
|
2381
|
+
read: string[];
|
2382
|
+
write: string[];
|
2383
|
+
}>;
|
2384
|
+
|
2385
|
+
declare type OutputType = ReadonlyDeep_2<{
|
2386
|
+
name: string;
|
2387
|
+
fields: SchemaField[];
|
2388
|
+
}>;
|
2389
|
+
|
2390
|
+
declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>;
|
2391
|
+
|
2367
2392
|
export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>;
|
2368
2393
|
|
2369
2394
|
export declare type Param<out $Type, $Value extends string> = {
|
@@ -2391,6 +2416,11 @@ declare type Pick_2<T, K extends string | number | symbol> = {
|
|
2391
2416
|
};
|
2392
2417
|
export { Pick_2 as Pick }
|
2393
2418
|
|
2419
|
+
declare type PrimaryKey = ReadonlyDeep_2<{
|
2420
|
+
name: string | null;
|
2421
|
+
fields: string[];
|
2422
|
+
}>;
|
2423
|
+
|
2394
2424
|
export declare class PrismaClientInitializationError extends Error {
|
2395
2425
|
clientVersion: string;
|
2396
2426
|
errorCode?: string;
|
@@ -2416,7 +2446,7 @@ export declare type PrismaClientOptions = {
|
|
2416
2446
|
/**
|
2417
2447
|
* Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale.
|
2418
2448
|
*/
|
2419
|
-
adapter?:
|
2449
|
+
adapter?: SqlDriverAdapterFactory | null;
|
2420
2450
|
/**
|
2421
2451
|
* Overwrites the datasource url from your schema.prisma file
|
2422
2452
|
*/
|
@@ -2581,6 +2611,12 @@ declare namespace Public_2 {
|
|
2581
2611
|
}
|
2582
2612
|
}
|
2583
2613
|
|
2614
|
+
declare type Query = ReadonlyDeep_2<{
|
2615
|
+
name: string;
|
2616
|
+
args: SchemaArg[];
|
2617
|
+
output: QueryOutput;
|
2618
|
+
}>;
|
2619
|
+
|
2584
2620
|
declare interface Queryable<Query, Result> extends AdapterInfo {
|
2585
2621
|
/**
|
2586
2622
|
* Execute a query and return its result.
|
@@ -2609,7 +2645,7 @@ declare type QueryCompilerOptions = {
|
|
2609
2645
|
declare type QueryEngineBatchGraphQLRequest = {
|
2610
2646
|
batch: QueryEngineRequest[];
|
2611
2647
|
transaction?: boolean;
|
2612
|
-
isolationLevel?:
|
2648
|
+
isolationLevel?: IsolationLevel;
|
2613
2649
|
};
|
2614
2650
|
|
2615
2651
|
declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery;
|
@@ -2622,12 +2658,12 @@ declare type QueryEngineConfig = {
|
|
2622
2658
|
datasourceOverrides: Record<string, string>;
|
2623
2659
|
env: Record<string, string | undefined>;
|
2624
2660
|
logLevel: QueryEngineLogLevel;
|
2625
|
-
engineProtocol:
|
2661
|
+
engineProtocol: QueryEngineProtocol;
|
2626
2662
|
enableTracing: boolean;
|
2627
2663
|
};
|
2628
2664
|
|
2629
2665
|
declare interface QueryEngineConstructor {
|
2630
|
-
new (config: QueryEngineConfig, logger: (log: string) => void, adapter?:
|
2666
|
+
new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlDriverAdapter): QueryEngineInstance;
|
2631
2667
|
}
|
2632
2668
|
|
2633
2669
|
declare type QueryEngineInstance = {
|
@@ -2649,6 +2685,8 @@ declare type QueryEngineInstance = {
|
|
2649
2685
|
|
2650
2686
|
declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off';
|
2651
2687
|
|
2688
|
+
declare type QueryEngineProtocol = 'graphql' | 'json';
|
2689
|
+
|
2652
2690
|
declare type QueryEngineRequest = {
|
2653
2691
|
query: string;
|
2654
2692
|
variables: Object;
|
@@ -2701,6 +2739,12 @@ export declare type QueryOptionsCbArgs = {
|
|
2701
2739
|
query: (args: JsArgs | RawQueryArgs) => Promise<unknown>;
|
2702
2740
|
};
|
2703
2741
|
|
2742
|
+
declare type QueryOutput = ReadonlyDeep_2<{
|
2743
|
+
name: string;
|
2744
|
+
isRequired: boolean;
|
2745
|
+
isList: boolean;
|
2746
|
+
}>;
|
2747
|
+
|
2704
2748
|
/**
|
2705
2749
|
* Create raw SQL statement.
|
2706
2750
|
*/
|
@@ -2841,8 +2885,6 @@ export declare type Result_2<T, A, F extends Operation> = Result<T, A, F>;
|
|
2841
2885
|
|
2842
2886
|
declare namespace Result_3 {
|
2843
2887
|
export {
|
2844
|
-
Operation,
|
2845
|
-
FluentOperation,
|
2846
2888
|
Count,
|
2847
2889
|
GetFindResult,
|
2848
2890
|
SelectablePayloadFields,
|
@@ -2899,12 +2941,55 @@ export declare type RuntimeDataModel = {
|
|
2899
2941
|
readonly types: Record<string, RuntimeModel>;
|
2900
2942
|
};
|
2901
2943
|
|
2902
|
-
declare type RuntimeEnum = Omit<
|
2944
|
+
declare type RuntimeEnum = Omit<DMMF_2.DatamodelEnum, 'name'>;
|
2903
2945
|
|
2904
|
-
declare type RuntimeModel = Omit<
|
2946
|
+
declare type RuntimeModel = Omit<DMMF_2.Model, 'name'>;
|
2905
2947
|
|
2906
2948
|
declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | '';
|
2907
2949
|
|
2950
|
+
declare type Schema = ReadonlyDeep_2<{
|
2951
|
+
rootQueryType?: string;
|
2952
|
+
rootMutationType?: string;
|
2953
|
+
inputObjectTypes: {
|
2954
|
+
model?: InputType[];
|
2955
|
+
prisma: InputType[];
|
2956
|
+
};
|
2957
|
+
outputObjectTypes: {
|
2958
|
+
model: OutputType[];
|
2959
|
+
prisma: OutputType[];
|
2960
|
+
};
|
2961
|
+
enumTypes: {
|
2962
|
+
model?: SchemaEnum[];
|
2963
|
+
prisma: SchemaEnum[];
|
2964
|
+
};
|
2965
|
+
fieldRefTypes: {
|
2966
|
+
prisma?: FieldRefType[];
|
2967
|
+
};
|
2968
|
+
}>;
|
2969
|
+
|
2970
|
+
declare type SchemaArg = ReadonlyDeep_2<{
|
2971
|
+
name: string;
|
2972
|
+
comment?: string;
|
2973
|
+
isNullable: boolean;
|
2974
|
+
isRequired: boolean;
|
2975
|
+
inputTypes: InputTypeRef[];
|
2976
|
+
deprecation?: Deprecation;
|
2977
|
+
}>;
|
2978
|
+
|
2979
|
+
declare type SchemaEnum = ReadonlyDeep_2<{
|
2980
|
+
name: string;
|
2981
|
+
values: string[];
|
2982
|
+
}>;
|
2983
|
+
|
2984
|
+
declare type SchemaField = ReadonlyDeep_2<{
|
2985
|
+
name: string;
|
2986
|
+
isNullable?: boolean;
|
2987
|
+
outputType: OutputTypeRef;
|
2988
|
+
args: SchemaArg[];
|
2989
|
+
deprecation?: Deprecation;
|
2990
|
+
documentation?: string;
|
2991
|
+
}>;
|
2992
|
+
|
2908
2993
|
export declare type Select<T, U> = T extends U ? T : never;
|
2909
2994
|
|
2910
2995
|
export declare type SelectablePayloadFields<K extends PropertyKey, O> = {
|
@@ -2949,6 +3034,8 @@ declare class Skip {
|
|
2949
3034
|
|
2950
3035
|
export declare const skip: Skip;
|
2951
3036
|
|
3037
|
+
declare type SortOrder = 'asc' | 'desc';
|
3038
|
+
|
2952
3039
|
/**
|
2953
3040
|
* An interface that represents a span. A span represents a single operation
|
2954
3041
|
* within a trace. Examples of span might include remote procedure calls or a
|
@@ -3217,6 +3304,29 @@ export declare class Sql {
|
|
3217
3304
|
};
|
3218
3305
|
}
|
3219
3306
|
|
3307
|
+
declare interface SqlDriverAdapter extends SqlQueryable {
|
3308
|
+
/**
|
3309
|
+
* Execute multiple SQL statements separated by semicolon.
|
3310
|
+
*/
|
3311
|
+
executeScript(script: string): Promise<void>;
|
3312
|
+
/**
|
3313
|
+
* Start new transaction.
|
3314
|
+
*/
|
3315
|
+
startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
|
3316
|
+
/**
|
3317
|
+
* Optional method that returns extra connection info
|
3318
|
+
*/
|
3319
|
+
getConnectionInfo?(): ConnectionInfo;
|
3320
|
+
/**
|
3321
|
+
* Dispose of the connection and release any resources.
|
3322
|
+
*/
|
3323
|
+
dispose(): Promise<void>;
|
3324
|
+
}
|
3325
|
+
|
3326
|
+
export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory<SqlQuery, SqlResultSet> {
|
3327
|
+
connect(): Promise<SqlDriverAdapter>;
|
3328
|
+
}
|
3329
|
+
|
3220
3330
|
declare type SqlQuery = {
|
3221
3331
|
sql: string;
|
3222
3332
|
args: Array<unknown>;
|
@@ -3325,20 +3435,12 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
|
|
3325
3435
|
|
3326
3436
|
declare namespace Transaction_2 {
|
3327
3437
|
export {
|
3328
|
-
IsolationLevel,
|
3329
3438
|
TransactionOptions_2 as Options,
|
3330
3439
|
InteractiveTransactionInfo,
|
3331
3440
|
TransactionHeaders
|
3332
3441
|
}
|
3333
3442
|
}
|
3334
3443
|
|
3335
|
-
declare interface TransactionContext extends AdapterInfo, SqlQueryable {
|
3336
|
-
/**
|
3337
|
-
* Start new transaction.
|
3338
|
-
*/
|
3339
|
-
startTransaction(): Promise<Transaction>;
|
3340
|
-
}
|
3341
|
-
|
3342
3444
|
declare type TransactionHeaders = {
|
3343
3445
|
traceparent?: string;
|
3344
3446
|
};
|
@@ -3375,6 +3477,13 @@ export declare type TypeMapCbDef = Fn<{
|
|
3375
3477
|
/** Shared */
|
3376
3478
|
export declare type TypeMapDef = Record<any, any>;
|
3377
3479
|
|
3480
|
+
declare type TypeRef<AllowedLocations extends FieldLocation> = {
|
3481
|
+
isList: boolean;
|
3482
|
+
type: string;
|
3483
|
+
location: AllowedLocations;
|
3484
|
+
namespace?: FieldNamespace;
|
3485
|
+
};
|
3486
|
+
|
3378
3487
|
declare namespace Types {
|
3379
3488
|
export {
|
3380
3489
|
Result_3 as Result,
|
@@ -3390,6 +3499,11 @@ declare namespace Types {
|
|
3390
3499
|
}
|
3391
3500
|
export { Types }
|
3392
3501
|
|
3502
|
+
declare type uniqueIndex = ReadonlyDeep_2<{
|
3503
|
+
name: string;
|
3504
|
+
fields: string[];
|
3505
|
+
}>;
|
3506
|
+
|
3393
3507
|
declare type UnknownErrorParams = {
|
3394
3508
|
clientVersion: string;
|
3395
3509
|
batchRequestIdx?: number;
|