prisma 6.6.0-dev.5 → 6.6.0-dev.52
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 +1069 -1175
- package/build/prisma_schema_build_bg.wasm +0 -0
- package/build/public/assets/index.js +1 -1
- package/package.json +19 -17
- package/preinstall/index.js +4 -4
- package/prisma-client/generator-build/index.js +231 -229
- package/prisma-client/package.json +13 -11
- package/prisma-client/runtime/binary.js +120 -120
- package/prisma-client/runtime/client.d.ts +353 -273
- package/prisma-client/runtime/client.js +38 -38
- package/prisma-client/runtime/edge-esm.js +18 -18
- package/prisma-client/runtime/edge.js +18 -18
- package/prisma-client/runtime/library.d.ts +353 -273
- package/prisma-client/runtime/library.js +56 -56
- 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 +353 -273
- package/prisma-client/runtime/react-native.js +23 -23
- package/prisma-client/scripts/default-index.js +3 -3
@@ -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 {
|
@@ -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;
|
@@ -707,264 +729,65 @@ export declare type DevTypeMapFnDef = {
|
|
707
729
|
payload: OperationPayload;
|
708
730
|
};
|
709
731
|
|
710
|
-
|
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"
|
732
|
+
declare namespace DMMF {
|
733
|
+
export {
|
734
|
+
datamodelEnumToSchemaEnum,
|
735
|
+
Datamodel,
|
736
|
+
DatamodelEnum,
|
737
|
+
Deprecation,
|
738
|
+
Document_2 as Document,
|
739
|
+
EnumValue,
|
740
|
+
Field,
|
741
|
+
FieldDefault,
|
742
|
+
FieldDefaultScalar,
|
743
|
+
FieldKind,
|
744
|
+
FieldLocation,
|
745
|
+
FieldNamespace,
|
746
|
+
FieldRefAllowType,
|
747
|
+
FieldRefType,
|
748
|
+
Index,
|
749
|
+
IndexField,
|
750
|
+
IndexType,
|
751
|
+
InputType,
|
752
|
+
InputTypeRef,
|
753
|
+
Mappings,
|
754
|
+
Model,
|
755
|
+
ModelAction,
|
756
|
+
ModelMapping,
|
757
|
+
OtherOperationMappings,
|
758
|
+
OutputType,
|
759
|
+
OutputTypeRef,
|
760
|
+
PrimaryKey,
|
761
|
+
Query,
|
762
|
+
QueryOutput,
|
763
|
+
Schema,
|
764
|
+
SchemaArg,
|
765
|
+
SchemaEnum,
|
766
|
+
SchemaField,
|
767
|
+
SortOrder,
|
768
|
+
TypeRef,
|
769
|
+
uniqueIndex
|
946
770
|
}
|
947
771
|
}
|
772
|
+
export { DMMF }
|
948
773
|
|
949
774
|
export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel;
|
950
775
|
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
*/
|
963
|
-
getConnectionInfo?(): ConnectionInfo;
|
776
|
+
declare type Document_2 = ReadonlyDeep_2<{
|
777
|
+
datamodel: Datamodel;
|
778
|
+
schema: Schema;
|
779
|
+
mappings: Mappings;
|
780
|
+
}>;
|
781
|
+
|
782
|
+
/**
|
783
|
+
* A generic driver adapter factory that allows the user to instantiate a
|
784
|
+
* driver adapter. The query and result types are specific to the adapter.
|
785
|
+
*/
|
786
|
+
declare interface DriverAdapterFactory<Query, Result> extends AdapterInfo {
|
964
787
|
/**
|
965
|
-
*
|
788
|
+
* Instantiate a driver adapter.
|
966
789
|
*/
|
967
|
-
|
790
|
+
connect(): Promise<Queryable<Query, Result>>;
|
968
791
|
}
|
969
792
|
|
970
793
|
/** Client */
|
@@ -1161,7 +984,7 @@ declare interface EngineConfig {
|
|
1161
984
|
* rather than Prisma's Rust drivers.
|
1162
985
|
* @remarks only used by LibraryEngine.ts
|
1163
986
|
*/
|
1164
|
-
adapter?:
|
987
|
+
adapter?: SqlDriverAdapterFactory;
|
1165
988
|
/**
|
1166
989
|
* The contents of the schema encoded into a string
|
1167
990
|
* @remarks only used by DataProxyEngine.ts
|
@@ -1250,6 +1073,11 @@ declare type EngineWasmLoadingConfig = {
|
|
1250
1073
|
getQueryEngineWasmModule: () => Promise<unknown>;
|
1251
1074
|
};
|
1252
1075
|
|
1076
|
+
declare type EnumValue = ReadonlyDeep_2<{
|
1077
|
+
name: string;
|
1078
|
+
dbName: string | null;
|
1079
|
+
}>;
|
1080
|
+
|
1253
1081
|
declare type EnvPaths = {
|
1254
1082
|
rootEnvPath: string | null;
|
1255
1083
|
schemaEnvPath: string | undefined;
|
@@ -1268,6 +1096,9 @@ declare type Error_2 = {
|
|
1268
1096
|
} | {
|
1269
1097
|
kind: 'UnsupportedNativeDataType';
|
1270
1098
|
type: string;
|
1099
|
+
} | {
|
1100
|
+
kind: 'InvalidIsolationLevel';
|
1101
|
+
level: string;
|
1271
1102
|
} | {
|
1272
1103
|
kind: 'postgres';
|
1273
1104
|
code: string;
|
@@ -1296,7 +1127,7 @@ declare type ErrorCapturingInterface<T> = {
|
|
1296
1127
|
[K in keyof T]: ErrorCapturingFunction<T[K]>;
|
1297
1128
|
};
|
1298
1129
|
|
1299
|
-
declare interface
|
1130
|
+
declare interface ErrorCapturingSqlDriverAdapter extends ErrorCapturingInterface<SqlDriverAdapter> {
|
1300
1131
|
readonly errorRegistry: ErrorRegistry;
|
1301
1132
|
}
|
1302
1133
|
|
@@ -1453,6 +1284,51 @@ export declare type ExtractGlobalOmit<Options, ModelName extends string> = Optio
|
|
1453
1284
|
};
|
1454
1285
|
} ? GlobalOmit : {};
|
1455
1286
|
|
1287
|
+
declare type Field = ReadonlyDeep_2<{
|
1288
|
+
kind: FieldKind;
|
1289
|
+
name: string;
|
1290
|
+
isRequired: boolean;
|
1291
|
+
isList: boolean;
|
1292
|
+
isUnique: boolean;
|
1293
|
+
isId: boolean;
|
1294
|
+
isReadOnly: boolean;
|
1295
|
+
isGenerated?: boolean;
|
1296
|
+
isUpdatedAt?: boolean;
|
1297
|
+
/**
|
1298
|
+
* Describes the data type in the same the way it is defined in the Prisma schema:
|
1299
|
+
* BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName
|
1300
|
+
*/
|
1301
|
+
type: string;
|
1302
|
+
/**
|
1303
|
+
* Native database type, if specified.
|
1304
|
+
* For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`,
|
1305
|
+
* `@db.Text` is encoded as `['Text', []]`.
|
1306
|
+
*/
|
1307
|
+
nativeType?: [string, string[]] | null;
|
1308
|
+
dbName?: string | null;
|
1309
|
+
hasDefaultValue: boolean;
|
1310
|
+
default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[];
|
1311
|
+
relationFromFields?: string[];
|
1312
|
+
relationToFields?: string[];
|
1313
|
+
relationOnDelete?: string;
|
1314
|
+
relationOnUpdate?: string;
|
1315
|
+
relationName?: string;
|
1316
|
+
documentation?: string;
|
1317
|
+
}>;
|
1318
|
+
|
1319
|
+
declare type FieldDefault = ReadonlyDeep_2<{
|
1320
|
+
name: string;
|
1321
|
+
args: Array<string | number>;
|
1322
|
+
}>;
|
1323
|
+
|
1324
|
+
declare type FieldDefaultScalar = string | boolean | number;
|
1325
|
+
|
1326
|
+
declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported';
|
1327
|
+
|
1328
|
+
declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes';
|
1329
|
+
|
1330
|
+
declare type FieldNamespace = 'model' | 'prisma';
|
1331
|
+
|
1456
1332
|
/**
|
1457
1333
|
* A reference to a specific field of a specific model
|
1458
1334
|
*/
|
@@ -1463,6 +1339,14 @@ export declare interface FieldRef<Model, FieldType> {
|
|
1463
1339
|
readonly isList: boolean;
|
1464
1340
|
}
|
1465
1341
|
|
1342
|
+
declare type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>;
|
1343
|
+
|
1344
|
+
declare type FieldRefType = ReadonlyDeep_2<{
|
1345
|
+
name: string;
|
1346
|
+
allowTypes: FieldRefAllowType[];
|
1347
|
+
fields: SchemaArg[];
|
1348
|
+
}>;
|
1349
|
+
|
1466
1350
|
export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete';
|
1467
1351
|
|
1468
1352
|
export declare interface Fn<Params = unknown, Returns = unknown> {
|
@@ -1843,6 +1727,26 @@ declare type HrTime = [number, number];
|
|
1843
1727
|
*/
|
1844
1728
|
declare type HrTime_2 = [number, number];
|
1845
1729
|
|
1730
|
+
declare type Index = ReadonlyDeep_2<{
|
1731
|
+
model: string;
|
1732
|
+
type: IndexType;
|
1733
|
+
isDefinedOnField: boolean;
|
1734
|
+
name?: string;
|
1735
|
+
dbName?: string;
|
1736
|
+
algorithm?: string;
|
1737
|
+
clustered?: boolean;
|
1738
|
+
fields: IndexField[];
|
1739
|
+
}>;
|
1740
|
+
|
1741
|
+
declare type IndexField = ReadonlyDeep_2<{
|
1742
|
+
name: string;
|
1743
|
+
sortOrder?: SortOrder;
|
1744
|
+
length?: number;
|
1745
|
+
operatorClass?: string;
|
1746
|
+
}>;
|
1747
|
+
|
1748
|
+
declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext';
|
1749
|
+
|
1846
1750
|
/**
|
1847
1751
|
* Matches a JSON array.
|
1848
1752
|
* Unlike \`JsonArray\`, readonly arrays are assignable to this type.
|
@@ -1875,6 +1779,21 @@ export declare type InputJsonValue = string | number | boolean | InputJsonObject
|
|
1875
1779
|
toJSON(): unknown;
|
1876
1780
|
};
|
1877
1781
|
|
1782
|
+
declare type InputType = ReadonlyDeep_2<{
|
1783
|
+
name: string;
|
1784
|
+
constraints: {
|
1785
|
+
maxNumFields: number | null;
|
1786
|
+
minNumFields: number | null;
|
1787
|
+
fields?: string[];
|
1788
|
+
};
|
1789
|
+
meta?: {
|
1790
|
+
source?: string;
|
1791
|
+
};
|
1792
|
+
fields: SchemaArg[];
|
1793
|
+
}>;
|
1794
|
+
|
1795
|
+
declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>;
|
1796
|
+
|
1878
1797
|
declare type InteractiveTransactionInfo<Payload = unknown> = {
|
1879
1798
|
/**
|
1880
1799
|
* Transaction ID returned by the query engine.
|
@@ -1950,13 +1869,7 @@ declare type InternalRequestParams = {
|
|
1950
1869
|
customDataProxyFetch?: CustomDataProxyFetch;
|
1951
1870
|
} & Omit<QueryMiddlewareParams, 'runInTransaction'>;
|
1952
1871
|
|
1953
|
-
declare
|
1954
|
-
ReadUncommitted = "ReadUncommitted",
|
1955
|
-
ReadCommitted = "ReadCommitted",
|
1956
|
-
RepeatableRead = "RepeatableRead",
|
1957
|
-
Snapshot = "Snapshot",
|
1958
|
-
Serializable = "Serializable"
|
1959
|
-
}
|
1872
|
+
declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
|
1960
1873
|
|
1961
1874
|
declare function isSkip(value: unknown): value is Skip;
|
1962
1875
|
|
@@ -2002,7 +1915,7 @@ export declare interface JsonArray extends Array<JsonValue> {
|
|
2002
1915
|
export declare type JsonBatchQuery = {
|
2003
1916
|
batch: JsonQuery[];
|
2004
1917
|
transaction?: {
|
2005
|
-
isolationLevel?:
|
1918
|
+
isolationLevel?: IsolationLevel;
|
2006
1919
|
};
|
2007
1920
|
};
|
2008
1921
|
|
@@ -2145,6 +2058,14 @@ export declare function makeStrictEnum<T extends Record<PropertyKey, string | nu
|
|
2145
2058
|
|
2146
2059
|
export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql<any[], unknown>;
|
2147
2060
|
|
2061
|
+
declare type Mappings = ReadonlyDeep_2<{
|
2062
|
+
modelOperations: ModelMapping[];
|
2063
|
+
otherOperations: {
|
2064
|
+
read: string[];
|
2065
|
+
write: string[];
|
2066
|
+
};
|
2067
|
+
}>;
|
2068
|
+
|
2148
2069
|
/**
|
2149
2070
|
* Class that holds the list of all extensions, applied to particular instance,
|
2150
2071
|
* as well as resolved versions of the components that need to apply on
|
@@ -2244,6 +2165,40 @@ declare class MiddlewareHandler<M extends Function> {
|
|
2244
2165
|
length(): number;
|
2245
2166
|
}
|
2246
2167
|
|
2168
|
+
declare type Model = ReadonlyDeep_2<{
|
2169
|
+
name: string;
|
2170
|
+
dbName: string | null;
|
2171
|
+
schema: string | null;
|
2172
|
+
fields: Field[];
|
2173
|
+
uniqueFields: string[][];
|
2174
|
+
uniqueIndexes: uniqueIndex[];
|
2175
|
+
documentation?: string;
|
2176
|
+
primaryKey: PrimaryKey | null;
|
2177
|
+
isGenerated?: boolean;
|
2178
|
+
}>;
|
2179
|
+
|
2180
|
+
declare enum ModelAction {
|
2181
|
+
findUnique = "findUnique",
|
2182
|
+
findUniqueOrThrow = "findUniqueOrThrow",
|
2183
|
+
findFirst = "findFirst",
|
2184
|
+
findFirstOrThrow = "findFirstOrThrow",
|
2185
|
+
findMany = "findMany",
|
2186
|
+
create = "create",
|
2187
|
+
createMany = "createMany",
|
2188
|
+
createManyAndReturn = "createManyAndReturn",
|
2189
|
+
update = "update",
|
2190
|
+
updateMany = "updateMany",
|
2191
|
+
updateManyAndReturn = "updateManyAndReturn",
|
2192
|
+
upsert = "upsert",
|
2193
|
+
delete = "delete",
|
2194
|
+
deleteMany = "deleteMany",
|
2195
|
+
groupBy = "groupBy",
|
2196
|
+
count = "count",// TODO: count does not actually exist in DMMF
|
2197
|
+
aggregate = "aggregate",
|
2198
|
+
findRaw = "findRaw",
|
2199
|
+
aggregateRaw = "aggregateRaw"
|
2200
|
+
}
|
2201
|
+
|
2247
2202
|
export declare type ModelArg = {
|
2248
2203
|
[MethodName in string]: unknown;
|
2249
2204
|
};
|
@@ -2256,6 +2211,30 @@ export declare type ModelArgs = {
|
|
2256
2211
|
|
2257
2212
|
export declare type ModelKey<TypeMap extends TypeMapDef, M extends PropertyKey> = M extends keyof TypeMap['model'] ? M : Capitalize<M & string>;
|
2258
2213
|
|
2214
|
+
declare type ModelMapping = ReadonlyDeep_2<{
|
2215
|
+
model: string;
|
2216
|
+
plural: string;
|
2217
|
+
findUnique?: string | null;
|
2218
|
+
findUniqueOrThrow?: string | null;
|
2219
|
+
findFirst?: string | null;
|
2220
|
+
findFirstOrThrow?: string | null;
|
2221
|
+
findMany?: string | null;
|
2222
|
+
create?: string | null;
|
2223
|
+
createMany?: string | null;
|
2224
|
+
createManyAndReturn?: string | null;
|
2225
|
+
update?: string | null;
|
2226
|
+
updateMany?: string | null;
|
2227
|
+
updateManyAndReturn?: string | null;
|
2228
|
+
upsert?: string | null;
|
2229
|
+
delete?: string | null;
|
2230
|
+
deleteMany?: string | null;
|
2231
|
+
aggregate?: string | null;
|
2232
|
+
groupBy?: string | null;
|
2233
|
+
count?: string | null;
|
2234
|
+
findRaw?: string | null;
|
2235
|
+
aggregateRaw?: string | null;
|
2236
|
+
}>;
|
2237
|
+
|
2259
2238
|
export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise<any>;
|
2260
2239
|
|
2261
2240
|
export declare type ModelQueryOptionsCbArgs = {
|
@@ -2364,6 +2343,18 @@ export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
|
|
2364
2343
|
};
|
2365
2344
|
}[A][B];
|
2366
2345
|
|
2346
|
+
declare type OtherOperationMappings = ReadonlyDeep_2<{
|
2347
|
+
read: string[];
|
2348
|
+
write: string[];
|
2349
|
+
}>;
|
2350
|
+
|
2351
|
+
declare type OutputType = ReadonlyDeep_2<{
|
2352
|
+
name: string;
|
2353
|
+
fields: SchemaField[];
|
2354
|
+
}>;
|
2355
|
+
|
2356
|
+
declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>;
|
2357
|
+
|
2367
2358
|
export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>;
|
2368
2359
|
|
2369
2360
|
export declare type Param<out $Type, $Value extends string> = {
|
@@ -2391,6 +2382,11 @@ declare type Pick_2<T, K extends string | number | symbol> = {
|
|
2391
2382
|
};
|
2392
2383
|
export { Pick_2 as Pick }
|
2393
2384
|
|
2385
|
+
declare type PrimaryKey = ReadonlyDeep_2<{
|
2386
|
+
name: string | null;
|
2387
|
+
fields: string[];
|
2388
|
+
}>;
|
2389
|
+
|
2394
2390
|
export declare class PrismaClientInitializationError extends Error {
|
2395
2391
|
clientVersion: string;
|
2396
2392
|
errorCode?: string;
|
@@ -2416,7 +2412,7 @@ export declare type PrismaClientOptions = {
|
|
2416
2412
|
/**
|
2417
2413
|
* Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale.
|
2418
2414
|
*/
|
2419
|
-
adapter?:
|
2415
|
+
adapter?: SqlDriverAdapterFactory | null;
|
2420
2416
|
/**
|
2421
2417
|
* Overwrites the datasource url from your schema.prisma file
|
2422
2418
|
*/
|
@@ -2581,6 +2577,12 @@ declare namespace Public_2 {
|
|
2581
2577
|
}
|
2582
2578
|
}
|
2583
2579
|
|
2580
|
+
declare type Query = ReadonlyDeep_2<{
|
2581
|
+
name: string;
|
2582
|
+
args: SchemaArg[];
|
2583
|
+
output: QueryOutput;
|
2584
|
+
}>;
|
2585
|
+
|
2584
2586
|
declare interface Queryable<Query, Result> extends AdapterInfo {
|
2585
2587
|
/**
|
2586
2588
|
* Execute a query and return its result.
|
@@ -2609,7 +2611,7 @@ declare type QueryCompilerOptions = {
|
|
2609
2611
|
declare type QueryEngineBatchGraphQLRequest = {
|
2610
2612
|
batch: QueryEngineRequest[];
|
2611
2613
|
transaction?: boolean;
|
2612
|
-
isolationLevel?:
|
2614
|
+
isolationLevel?: IsolationLevel;
|
2613
2615
|
};
|
2614
2616
|
|
2615
2617
|
declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery;
|
@@ -2627,7 +2629,7 @@ declare type QueryEngineConfig = {
|
|
2627
2629
|
};
|
2628
2630
|
|
2629
2631
|
declare interface QueryEngineConstructor {
|
2630
|
-
new (config: QueryEngineConfig, logger: (log: string) => void, adapter?:
|
2632
|
+
new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlDriverAdapter): QueryEngineInstance;
|
2631
2633
|
}
|
2632
2634
|
|
2633
2635
|
declare type QueryEngineInstance = {
|
@@ -2701,6 +2703,12 @@ export declare type QueryOptionsCbArgs = {
|
|
2701
2703
|
query: (args: JsArgs | RawQueryArgs) => Promise<unknown>;
|
2702
2704
|
};
|
2703
2705
|
|
2706
|
+
declare type QueryOutput = ReadonlyDeep_2<{
|
2707
|
+
name: string;
|
2708
|
+
isRequired: boolean;
|
2709
|
+
isList: boolean;
|
2710
|
+
}>;
|
2711
|
+
|
2704
2712
|
/**
|
2705
2713
|
* Create raw SQL statement.
|
2706
2714
|
*/
|
@@ -2905,6 +2913,49 @@ declare type RuntimeModel = Omit<DMMF.Model, 'name'>;
|
|
2905
2913
|
|
2906
2914
|
declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | '';
|
2907
2915
|
|
2916
|
+
declare type Schema = ReadonlyDeep_2<{
|
2917
|
+
rootQueryType?: string;
|
2918
|
+
rootMutationType?: string;
|
2919
|
+
inputObjectTypes: {
|
2920
|
+
model?: InputType[];
|
2921
|
+
prisma: InputType[];
|
2922
|
+
};
|
2923
|
+
outputObjectTypes: {
|
2924
|
+
model: OutputType[];
|
2925
|
+
prisma: OutputType[];
|
2926
|
+
};
|
2927
|
+
enumTypes: {
|
2928
|
+
model?: SchemaEnum[];
|
2929
|
+
prisma: SchemaEnum[];
|
2930
|
+
};
|
2931
|
+
fieldRefTypes: {
|
2932
|
+
prisma?: FieldRefType[];
|
2933
|
+
};
|
2934
|
+
}>;
|
2935
|
+
|
2936
|
+
declare type SchemaArg = ReadonlyDeep_2<{
|
2937
|
+
name: string;
|
2938
|
+
comment?: string;
|
2939
|
+
isNullable: boolean;
|
2940
|
+
isRequired: boolean;
|
2941
|
+
inputTypes: InputTypeRef[];
|
2942
|
+
deprecation?: Deprecation;
|
2943
|
+
}>;
|
2944
|
+
|
2945
|
+
declare type SchemaEnum = ReadonlyDeep_2<{
|
2946
|
+
name: string;
|
2947
|
+
values: string[];
|
2948
|
+
}>;
|
2949
|
+
|
2950
|
+
declare type SchemaField = ReadonlyDeep_2<{
|
2951
|
+
name: string;
|
2952
|
+
isNullable?: boolean;
|
2953
|
+
outputType: OutputTypeRef;
|
2954
|
+
args: SchemaArg[];
|
2955
|
+
deprecation?: Deprecation;
|
2956
|
+
documentation?: string;
|
2957
|
+
}>;
|
2958
|
+
|
2908
2959
|
export declare type Select<T, U> = T extends U ? T : never;
|
2909
2960
|
|
2910
2961
|
export declare type SelectablePayloadFields<K extends PropertyKey, O> = {
|
@@ -2949,6 +3000,8 @@ declare class Skip {
|
|
2949
3000
|
|
2950
3001
|
export declare const skip: Skip;
|
2951
3002
|
|
3003
|
+
declare type SortOrder = 'asc' | 'desc';
|
3004
|
+
|
2952
3005
|
/**
|
2953
3006
|
* An interface that represents a span. A span represents a single operation
|
2954
3007
|
* within a trace. Examples of span might include remote procedure calls or a
|
@@ -3217,6 +3270,29 @@ export declare class Sql {
|
|
3217
3270
|
};
|
3218
3271
|
}
|
3219
3272
|
|
3273
|
+
declare interface SqlDriverAdapter extends SqlQueryable {
|
3274
|
+
/**
|
3275
|
+
* Execute multiple SQL statements separated by semicolon.
|
3276
|
+
*/
|
3277
|
+
executeScript(script: string): Promise<void>;
|
3278
|
+
/**
|
3279
|
+
* Start new transaction.
|
3280
|
+
*/
|
3281
|
+
startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
|
3282
|
+
/**
|
3283
|
+
* Optional method that returns extra connection info
|
3284
|
+
*/
|
3285
|
+
getConnectionInfo?(): ConnectionInfo;
|
3286
|
+
/**
|
3287
|
+
* Dispose of the connection and release any resources.
|
3288
|
+
*/
|
3289
|
+
dispose(): Promise<void>;
|
3290
|
+
}
|
3291
|
+
|
3292
|
+
export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory<SqlQuery, SqlResultSet> {
|
3293
|
+
connect(): Promise<SqlDriverAdapter>;
|
3294
|
+
}
|
3295
|
+
|
3220
3296
|
declare type SqlQuery = {
|
3221
3297
|
sql: string;
|
3222
3298
|
args: Array<unknown>;
|
@@ -3325,20 +3401,12 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
|
|
3325
3401
|
|
3326
3402
|
declare namespace Transaction_2 {
|
3327
3403
|
export {
|
3328
|
-
IsolationLevel,
|
3329
3404
|
TransactionOptions_2 as Options,
|
3330
3405
|
InteractiveTransactionInfo,
|
3331
3406
|
TransactionHeaders
|
3332
3407
|
}
|
3333
3408
|
}
|
3334
3409
|
|
3335
|
-
declare interface TransactionContext extends AdapterInfo, SqlQueryable {
|
3336
|
-
/**
|
3337
|
-
* Start new transaction.
|
3338
|
-
*/
|
3339
|
-
startTransaction(): Promise<Transaction>;
|
3340
|
-
}
|
3341
|
-
|
3342
3410
|
declare type TransactionHeaders = {
|
3343
3411
|
traceparent?: string;
|
3344
3412
|
};
|
@@ -3375,6 +3443,13 @@ export declare type TypeMapCbDef = Fn<{
|
|
3375
3443
|
/** Shared */
|
3376
3444
|
export declare type TypeMapDef = Record<any, any>;
|
3377
3445
|
|
3446
|
+
declare type TypeRef<AllowedLocations extends FieldLocation> = {
|
3447
|
+
isList: boolean;
|
3448
|
+
type: string;
|
3449
|
+
location: AllowedLocations;
|
3450
|
+
namespace?: FieldNamespace;
|
3451
|
+
};
|
3452
|
+
|
3378
3453
|
declare namespace Types {
|
3379
3454
|
export {
|
3380
3455
|
Result_3 as Result,
|
@@ -3390,6 +3465,11 @@ declare namespace Types {
|
|
3390
3465
|
}
|
3391
3466
|
export { Types }
|
3392
3467
|
|
3468
|
+
declare type uniqueIndex = ReadonlyDeep_2<{
|
3469
|
+
name: string;
|
3470
|
+
fields: string[];
|
3471
|
+
}>;
|
3472
|
+
|
3393
3473
|
declare type UnknownErrorParams = {
|
3394
3474
|
clientVersion: string;
|
3395
3475
|
batchRequestIdx?: number;
|