prisma 6.6.0-integration-refactor-schema-path-less-migrate-class.1 → 6.6.0-integration-push-xmzqvqxpztks.2

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.
@@ -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 DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw';
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<DMMF.Datamodel, 'indexes'>;
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?: Transaction_2.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): any;
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 type Document = ReadonlyDeep_2<{
712
- datamodel: Datamodel;
713
- schema: Schema;
714
- mappings: Mappings;
715
- }>;
716
- export type Mappings = ReadonlyDeep_2<{
717
- modelOperations: ModelMapping[];
718
- otherOperations: {
719
- read: string[];
720
- write: string[];
721
- };
722
- }>;
723
- export type OtherOperationMappings = ReadonlyDeep_2<{
724
- read: string[];
725
- write: string[];
726
- }>;
727
- export type DatamodelEnum = ReadonlyDeep_2<{
728
- name: string;
729
- values: EnumValue[];
730
- dbName?: string | null;
731
- documentation?: string;
732
- }>;
733
- export type SchemaEnum = ReadonlyDeep_2<{
734
- name: string;
735
- values: string[];
736
- }>;
737
- export type EnumValue = ReadonlyDeep_2<{
738
- name: string;
739
- dbName: string | null;
740
- }>;
741
- export type Datamodel = ReadonlyDeep_2<{
742
- models: Model[];
743
- enums: DatamodelEnum[];
744
- types: Model[];
745
- indexes: Index[];
746
- }>;
747
- export type uniqueIndex = ReadonlyDeep_2<{
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
- export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF.Datamodel): RuntimeDataModel;
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 interface DriverAdapter extends SqlQueryable {
952
- /**
953
- * Execute multiple SQL statements separated by semicolon.
954
- */
955
- executeScript(script: string): Promise<void>;
956
- /**
957
- * Start new transaction.
958
- */
959
- transactionContext(): Promise<TransactionContext>;
960
- /**
961
- * Optional method that returns extra connection info
962
- */
963
- getConnectionInfo?(): ConnectionInfo;
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
- * Dispose of the connection and release any resources.
828
+ * Instantiate a driver adapter.
966
829
  */
967
- dispose(): Promise<void>;
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?: ErrorCapturingSqlConnection;
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): any;
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 ErrorCapturingSqlConnection extends ErrorCapturingInterface<DriverAdapter> {
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
- export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete';
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,21 @@ 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
+ };
1830
+ fields: SchemaArg[];
1831
+ }>;
1832
+
1833
+ declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>;
1834
+
1878
1835
  declare type InteractiveTransactionInfo<Payload = unknown> = {
1879
1836
  /**
1880
1837
  * Transaction ID returned by the query engine.
@@ -1950,13 +1907,7 @@ declare type InternalRequestParams = {
1950
1907
  customDataProxyFetch?: CustomDataProxyFetch;
1951
1908
  } & Omit<QueryMiddlewareParams, 'runInTransaction'>;
1952
1909
 
1953
- declare const enum IsolationLevel {
1954
- ReadUncommitted = "ReadUncommitted",
1955
- ReadCommitted = "ReadCommitted",
1956
- RepeatableRead = "RepeatableRead",
1957
- Snapshot = "Snapshot",
1958
- Serializable = "Serializable"
1959
- }
1910
+ declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
1960
1911
 
1961
1912
  declare function isSkip(value: unknown): value is Skip;
1962
1913
 
@@ -2002,7 +1953,7 @@ export declare interface JsonArray extends Array<JsonValue> {
2002
1953
  export declare type JsonBatchQuery = {
2003
1954
  batch: JsonQuery[];
2004
1955
  transaction?: {
2005
- isolationLevel?: Transaction_2.IsolationLevel;
1956
+ isolationLevel?: IsolationLevel;
2006
1957
  };
2007
1958
  };
2008
1959
 
@@ -2145,6 +2096,14 @@ export declare function makeStrictEnum<T extends Record<PropertyKey, string | nu
2145
2096
 
2146
2097
  export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql<any[], unknown>;
2147
2098
 
2099
+ declare type Mappings = ReadonlyDeep_2<{
2100
+ modelOperations: ModelMapping[];
2101
+ otherOperations: {
2102
+ read: string[];
2103
+ write: string[];
2104
+ };
2105
+ }>;
2106
+
2148
2107
  /**
2149
2108
  * Class that holds the list of all extensions, applied to particular instance,
2150
2109
  * as well as resolved versions of the components that need to apply on
@@ -2244,6 +2203,40 @@ declare class MiddlewareHandler<M extends Function> {
2244
2203
  length(): number;
2245
2204
  }
2246
2205
 
2206
+ declare type Model = ReadonlyDeep_2<{
2207
+ name: string;
2208
+ dbName: string | null;
2209
+ schema: string | null;
2210
+ fields: Field[];
2211
+ uniqueFields: string[][];
2212
+ uniqueIndexes: uniqueIndex[];
2213
+ documentation?: string;
2214
+ primaryKey: PrimaryKey | null;
2215
+ isGenerated?: boolean;
2216
+ }>;
2217
+
2218
+ declare enum ModelAction {
2219
+ findUnique = "findUnique",
2220
+ findUniqueOrThrow = "findUniqueOrThrow",
2221
+ findFirst = "findFirst",
2222
+ findFirstOrThrow = "findFirstOrThrow",
2223
+ findMany = "findMany",
2224
+ create = "create",
2225
+ createMany = "createMany",
2226
+ createManyAndReturn = "createManyAndReturn",
2227
+ update = "update",
2228
+ updateMany = "updateMany",
2229
+ updateManyAndReturn = "updateManyAndReturn",
2230
+ upsert = "upsert",
2231
+ delete = "delete",
2232
+ deleteMany = "deleteMany",
2233
+ groupBy = "groupBy",
2234
+ count = "count",// TODO: count does not actually exist in DMMF
2235
+ aggregate = "aggregate",
2236
+ findRaw = "findRaw",
2237
+ aggregateRaw = "aggregateRaw"
2238
+ }
2239
+
2247
2240
  export declare type ModelArg = {
2248
2241
  [MethodName in string]: unknown;
2249
2242
  };
@@ -2256,6 +2249,30 @@ export declare type ModelArgs = {
2256
2249
 
2257
2250
  export declare type ModelKey<TypeMap extends TypeMapDef, M extends PropertyKey> = M extends keyof TypeMap['model'] ? M : Capitalize<M & string>;
2258
2251
 
2252
+ declare type ModelMapping = ReadonlyDeep_2<{
2253
+ model: string;
2254
+ plural: string;
2255
+ findUnique?: string | null;
2256
+ findUniqueOrThrow?: string | null;
2257
+ findFirst?: string | null;
2258
+ findFirstOrThrow?: string | null;
2259
+ findMany?: string | null;
2260
+ create?: string | null;
2261
+ createMany?: string | null;
2262
+ createManyAndReturn?: string | null;
2263
+ update?: string | null;
2264
+ updateMany?: string | null;
2265
+ updateManyAndReturn?: string | null;
2266
+ upsert?: string | null;
2267
+ delete?: string | null;
2268
+ deleteMany?: string | null;
2269
+ aggregate?: string | null;
2270
+ groupBy?: string | null;
2271
+ count?: string | null;
2272
+ findRaw?: string | null;
2273
+ aggregateRaw?: string | null;
2274
+ }>;
2275
+
2259
2276
  export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise<any>;
2260
2277
 
2261
2278
  export declare type ModelQueryOptionsCbArgs = {
@@ -2281,11 +2298,6 @@ declare class NullTypesEnumValue extends ObjectEnumValue {
2281
2298
  _getNamespace(): string;
2282
2299
  }
2283
2300
 
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
2301
  /**
2290
2302
  * Base class for unique values of object-valued enums.
2291
2303
  */
@@ -2364,6 +2376,18 @@ export declare type Or<A extends 1 | 0, B extends 1 | 0> = {
2364
2376
  };
2365
2377
  }[A][B];
2366
2378
 
2379
+ declare type OtherOperationMappings = ReadonlyDeep_2<{
2380
+ read: string[];
2381
+ write: string[];
2382
+ }>;
2383
+
2384
+ declare type OutputType = ReadonlyDeep_2<{
2385
+ name: string;
2386
+ fields: SchemaField[];
2387
+ }>;
2388
+
2389
+ declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>;
2390
+
2367
2391
  export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>;
2368
2392
 
2369
2393
  export declare type Param<out $Type, $Value extends string> = {
@@ -2391,6 +2415,11 @@ declare type Pick_2<T, K extends string | number | symbol> = {
2391
2415
  };
2392
2416
  export { Pick_2 as Pick }
2393
2417
 
2418
+ declare type PrimaryKey = ReadonlyDeep_2<{
2419
+ name: string | null;
2420
+ fields: string[];
2421
+ }>;
2422
+
2394
2423
  export declare class PrismaClientInitializationError extends Error {
2395
2424
  clientVersion: string;
2396
2425
  errorCode?: string;
@@ -2416,7 +2445,7 @@ export declare type PrismaClientOptions = {
2416
2445
  /**
2417
2446
  * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale.
2418
2447
  */
2419
- adapter?: DriverAdapter | null;
2448
+ adapter?: SqlDriverAdapterFactory | null;
2420
2449
  /**
2421
2450
  * Overwrites the datasource url from your schema.prisma file
2422
2451
  */
@@ -2581,6 +2610,12 @@ declare namespace Public_2 {
2581
2610
  }
2582
2611
  }
2583
2612
 
2613
+ declare type Query = ReadonlyDeep_2<{
2614
+ name: string;
2615
+ args: SchemaArg[];
2616
+ output: QueryOutput;
2617
+ }>;
2618
+
2584
2619
  declare interface Queryable<Query, Result> extends AdapterInfo {
2585
2620
  /**
2586
2621
  * Execute a query and return its result.
@@ -2609,7 +2644,7 @@ declare type QueryCompilerOptions = {
2609
2644
  declare type QueryEngineBatchGraphQLRequest = {
2610
2645
  batch: QueryEngineRequest[];
2611
2646
  transaction?: boolean;
2612
- isolationLevel?: Transaction_2.IsolationLevel;
2647
+ isolationLevel?: IsolationLevel;
2613
2648
  };
2614
2649
 
2615
2650
  declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery;
@@ -2622,12 +2657,12 @@ declare type QueryEngineConfig = {
2622
2657
  datasourceOverrides: Record<string, string>;
2623
2658
  env: Record<string, string | undefined>;
2624
2659
  logLevel: QueryEngineLogLevel;
2625
- engineProtocol: EngineProtocol;
2660
+ engineProtocol: QueryEngineProtocol;
2626
2661
  enableTracing: boolean;
2627
2662
  };
2628
2663
 
2629
2664
  declare interface QueryEngineConstructor {
2630
- new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlConnection): QueryEngineInstance;
2665
+ new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingSqlDriverAdapter): QueryEngineInstance;
2631
2666
  }
2632
2667
 
2633
2668
  declare type QueryEngineInstance = {
@@ -2649,6 +2684,8 @@ declare type QueryEngineInstance = {
2649
2684
 
2650
2685
  declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off';
2651
2686
 
2687
+ declare type QueryEngineProtocol = 'graphql' | 'json';
2688
+
2652
2689
  declare type QueryEngineRequest = {
2653
2690
  query: string;
2654
2691
  variables: Object;
@@ -2701,6 +2738,12 @@ export declare type QueryOptionsCbArgs = {
2701
2738
  query: (args: JsArgs | RawQueryArgs) => Promise<unknown>;
2702
2739
  };
2703
2740
 
2741
+ declare type QueryOutput = ReadonlyDeep_2<{
2742
+ name: string;
2743
+ isRequired: boolean;
2744
+ isList: boolean;
2745
+ }>;
2746
+
2704
2747
  /**
2705
2748
  * Create raw SQL statement.
2706
2749
  */
@@ -2841,8 +2884,6 @@ export declare type Result_2<T, A, F extends Operation> = Result<T, A, F>;
2841
2884
 
2842
2885
  declare namespace Result_3 {
2843
2886
  export {
2844
- Operation,
2845
- FluentOperation,
2846
2887
  Count,
2847
2888
  GetFindResult,
2848
2889
  SelectablePayloadFields,
@@ -2899,12 +2940,55 @@ export declare type RuntimeDataModel = {
2899
2940
  readonly types: Record<string, RuntimeModel>;
2900
2941
  };
2901
2942
 
2902
- declare type RuntimeEnum = Omit<DMMF.DatamodelEnum, 'name'>;
2943
+ declare type RuntimeEnum = Omit<DMMF_2.DatamodelEnum, 'name'>;
2903
2944
 
2904
- declare type RuntimeModel = Omit<DMMF.Model, 'name'>;
2945
+ declare type RuntimeModel = Omit<DMMF_2.Model, 'name'>;
2905
2946
 
2906
2947
  declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | '';
2907
2948
 
2949
+ declare type Schema = ReadonlyDeep_2<{
2950
+ rootQueryType?: string;
2951
+ rootMutationType?: string;
2952
+ inputObjectTypes: {
2953
+ model?: InputType[];
2954
+ prisma: InputType[];
2955
+ };
2956
+ outputObjectTypes: {
2957
+ model: OutputType[];
2958
+ prisma: OutputType[];
2959
+ };
2960
+ enumTypes: {
2961
+ model?: SchemaEnum[];
2962
+ prisma: SchemaEnum[];
2963
+ };
2964
+ fieldRefTypes: {
2965
+ prisma?: FieldRefType[];
2966
+ };
2967
+ }>;
2968
+
2969
+ declare type SchemaArg = ReadonlyDeep_2<{
2970
+ name: string;
2971
+ comment?: string;
2972
+ isNullable: boolean;
2973
+ isRequired: boolean;
2974
+ inputTypes: InputTypeRef[];
2975
+ deprecation?: Deprecation;
2976
+ }>;
2977
+
2978
+ declare type SchemaEnum = ReadonlyDeep_2<{
2979
+ name: string;
2980
+ values: string[];
2981
+ }>;
2982
+
2983
+ declare type SchemaField = ReadonlyDeep_2<{
2984
+ name: string;
2985
+ isNullable?: boolean;
2986
+ outputType: OutputTypeRef;
2987
+ args: SchemaArg[];
2988
+ deprecation?: Deprecation;
2989
+ documentation?: string;
2990
+ }>;
2991
+
2908
2992
  export declare type Select<T, U> = T extends U ? T : never;
2909
2993
 
2910
2994
  export declare type SelectablePayloadFields<K extends PropertyKey, O> = {
@@ -2949,6 +3033,8 @@ declare class Skip {
2949
3033
 
2950
3034
  export declare const skip: Skip;
2951
3035
 
3036
+ declare type SortOrder = 'asc' | 'desc';
3037
+
2952
3038
  /**
2953
3039
  * An interface that represents a span. A span represents a single operation
2954
3040
  * within a trace. Examples of span might include remote procedure calls or a
@@ -3217,6 +3303,29 @@ export declare class Sql {
3217
3303
  };
3218
3304
  }
3219
3305
 
3306
+ declare interface SqlDriverAdapter extends SqlQueryable {
3307
+ /**
3308
+ * Execute multiple SQL statements separated by semicolon.
3309
+ */
3310
+ executeScript(script: string): Promise<void>;
3311
+ /**
3312
+ * Start new transaction.
3313
+ */
3314
+ startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
3315
+ /**
3316
+ * Optional method that returns extra connection info
3317
+ */
3318
+ getConnectionInfo?(): ConnectionInfo;
3319
+ /**
3320
+ * Dispose of the connection and release any resources.
3321
+ */
3322
+ dispose(): Promise<void>;
3323
+ }
3324
+
3325
+ export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory<SqlQuery, SqlResultSet> {
3326
+ connect(): Promise<SqlDriverAdapter>;
3327
+ }
3328
+
3220
3329
  declare type SqlQuery = {
3221
3330
  sql: string;
3222
3331
  args: Array<unknown>;
@@ -3325,20 +3434,12 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
3325
3434
 
3326
3435
  declare namespace Transaction_2 {
3327
3436
  export {
3328
- IsolationLevel,
3329
3437
  TransactionOptions_2 as Options,
3330
3438
  InteractiveTransactionInfo,
3331
3439
  TransactionHeaders
3332
3440
  }
3333
3441
  }
3334
3442
 
3335
- declare interface TransactionContext extends AdapterInfo, SqlQueryable {
3336
- /**
3337
- * Start new transaction.
3338
- */
3339
- startTransaction(): Promise<Transaction>;
3340
- }
3341
-
3342
3443
  declare type TransactionHeaders = {
3343
3444
  traceparent?: string;
3344
3445
  };
@@ -3375,6 +3476,13 @@ export declare type TypeMapCbDef = Fn<{
3375
3476
  /** Shared */
3376
3477
  export declare type TypeMapDef = Record<any, any>;
3377
3478
 
3479
+ declare type TypeRef<AllowedLocations extends FieldLocation> = {
3480
+ isList: boolean;
3481
+ type: string;
3482
+ location: AllowedLocations;
3483
+ namespace?: FieldNamespace;
3484
+ };
3485
+
3378
3486
  declare namespace Types {
3379
3487
  export {
3380
3488
  Result_3 as Result,
@@ -3390,6 +3498,11 @@ declare namespace Types {
3390
3498
  }
3391
3499
  export { Types }
3392
3500
 
3501
+ declare type uniqueIndex = ReadonlyDeep_2<{
3502
+ name: string;
3503
+ fields: string[];
3504
+ }>;
3505
+
3393
3506
  declare type UnknownErrorParams = {
3394
3507
  clientVersion: string;
3395
3508
  batchRequestIdx?: number;