@prisma/client 7.9.0-dev.12 → 7.9.0-dev.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/client",
3
- "version": "7.9.0-dev.12",
3
+ "version": "7.9.0-dev.13",
4
4
  "description": "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
5
5
  "keywords": [
6
6
  "ORM",
@@ -212,41 +212,41 @@
212
212
  "typescript": "5.4.5",
213
213
  "undici": "7.4.0",
214
214
  "zx": "8.4.1",
215
- "@prisma/adapter-better-sqlite3": "7.9.0-dev.12",
216
- "@prisma/adapter-mariadb": "7.9.0-dev.12",
217
- "@prisma/adapter-d1": "7.9.0-dev.12",
218
- "@prisma/adapter-mssql": "7.9.0-dev.12",
219
- "@prisma/adapter-libsql": "7.9.0-dev.12",
220
- "@prisma/adapter-pg": "7.9.0-dev.12",
221
- "@prisma/adapter-planetscale": "7.9.0-dev.12",
222
- "@prisma/client-common": "7.9.0-dev.12",
223
- "@prisma/adapter-neon": "7.9.0-dev.12",
224
- "@prisma/client-engine-runtime": "7.9.0-dev.12",
225
- "@prisma/client-generator-ts": "7.9.0-dev.12",
226
- "@prisma/config": "7.9.0-dev.12",
227
- "@prisma/client-generator-js": "7.9.0-dev.12",
228
- "@prisma/dmmf": "7.9.0-dev.12",
229
- "@prisma/debug": "7.9.0-dev.12",
230
- "@prisma/engines": "7.9.0-dev.12",
231
- "@prisma/driver-adapter-utils": "7.9.0-dev.12",
232
- "@prisma/fetch-engine": "7.9.0-dev.12",
233
- "@prisma/generator": "7.9.0-dev.12",
234
- "@prisma/generator-helper": "7.9.0-dev.12",
235
- "@prisma/instrumentation-contract": "7.9.0-dev.12",
236
- "@prisma/get-platform": "7.9.0-dev.12",
237
- "@prisma/internals": "7.9.0-dev.12",
238
- "@prisma/json-protocol": "7.9.0-dev.12",
239
- "@prisma/migrate": "7.9.0-dev.12",
240
- "@prisma/instrumentation": "7.9.0-dev.12",
241
- "@prisma/param-graph-builder": "7.9.0-dev.12",
242
- "@prisma/param-graph": "7.9.0-dev.12",
243
- "@prisma/sqlcommenter": "7.9.0-dev.12",
244
- "@prisma/query-plan-executor": "7.9.0-dev.12",
245
- "@prisma/ts-builders": "7.9.0-dev.12",
246
- "@prisma/sqlcommenter-trace-context": "7.9.0-dev.12"
215
+ "@prisma/adapter-better-sqlite3": "7.9.0-dev.13",
216
+ "@prisma/adapter-d1": "7.9.0-dev.13",
217
+ "@prisma/adapter-mariadb": "7.9.0-dev.13",
218
+ "@prisma/adapter-libsql": "7.9.0-dev.13",
219
+ "@prisma/adapter-mssql": "7.9.0-dev.13",
220
+ "@prisma/adapter-neon": "7.9.0-dev.13",
221
+ "@prisma/adapter-pg": "7.9.0-dev.13",
222
+ "@prisma/adapter-planetscale": "7.9.0-dev.13",
223
+ "@prisma/client-common": "7.9.0-dev.13",
224
+ "@prisma/client-engine-runtime": "7.9.0-dev.13",
225
+ "@prisma/client-generator-js": "7.9.0-dev.13",
226
+ "@prisma/client-generator-ts": "7.9.0-dev.13",
227
+ "@prisma/debug": "7.9.0-dev.13",
228
+ "@prisma/config": "7.9.0-dev.13",
229
+ "@prisma/driver-adapter-utils": "7.9.0-dev.13",
230
+ "@prisma/dmmf": "7.9.0-dev.13",
231
+ "@prisma/engines": "7.9.0-dev.13",
232
+ "@prisma/generator": "7.9.0-dev.13",
233
+ "@prisma/fetch-engine": "7.9.0-dev.13",
234
+ "@prisma/generator-helper": "7.9.0-dev.13",
235
+ "@prisma/get-platform": "7.9.0-dev.13",
236
+ "@prisma/instrumentation": "7.9.0-dev.13",
237
+ "@prisma/instrumentation-contract": "7.9.0-dev.13",
238
+ "@prisma/json-protocol": "7.9.0-dev.13",
239
+ "@prisma/internals": "7.9.0-dev.13",
240
+ "@prisma/param-graph": "7.9.0-dev.13",
241
+ "@prisma/param-graph-builder": "7.9.0-dev.13",
242
+ "@prisma/migrate": "7.9.0-dev.13",
243
+ "@prisma/query-plan-executor": "7.9.0-dev.13",
244
+ "@prisma/sqlcommenter": "7.9.0-dev.13",
245
+ "@prisma/sqlcommenter-trace-context": "7.9.0-dev.13",
246
+ "@prisma/ts-builders": "7.9.0-dev.13"
247
247
  },
248
248
  "dependencies": {
249
- "@prisma/client-runtime-utils": "7.9.0-dev.12"
249
+ "@prisma/client-runtime-utils": "7.9.0-dev.13"
250
250
  },
251
251
  "peerDependencies": {
252
252
  "prisma": "*",
@@ -144,7 +144,7 @@ export declare type BaseDMMF = {
144
144
  declare type BatchArgs = {
145
145
  queries: BatchQuery[];
146
146
  transaction?: {
147
- isolationLevel?: IsolationLevel_2;
147
+ isolationLevel?: IsolationLevel;
148
148
  };
149
149
  };
150
150
 
@@ -172,7 +172,7 @@ declare type BatchQueryOptionsCbArgs = {
172
172
  declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse;
173
173
 
174
174
  declare type BatchTransactionOptions = {
175
- isolationLevel?: Transaction_2.IsolationLevel;
175
+ isolationLevel?: Transaction.IsolationLevel;
176
176
  maxWait?: number;
177
177
  timeout?: number;
178
178
  };
@@ -761,9 +761,9 @@ declare interface Engine<InteractiveTransactionPayload = unknown> {
761
761
  version(forceRun?: boolean): Promise<string> | string;
762
762
  request<T>(query: JsonQuery, options: RequestOptions<InteractiveTransactionPayload>): Promise<QueryEngineResultData<T>>;
763
763
  requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
764
- transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise<Transaction_2.InteractiveTransactionInfo<unknown>>;
765
- transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
766
- transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
764
+ transaction(action: 'start', headers: Transaction.TransactionHeaders, options: Transaction.Options): Promise<Transaction.InteractiveTransactionInfo<unknown>>;
765
+ transaction(action: 'commit', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo<unknown>): Promise<void>;
766
+ transaction(action: 'rollback', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo<unknown>): Promise<void>;
767
767
  }
768
768
 
769
769
  declare interface EngineConfig {
@@ -775,7 +775,7 @@ declare interface EngineConfig {
775
775
  previewFeatures?: string[];
776
776
  activeProvider?: string;
777
777
  logEmitter: LogEmitter;
778
- transactionOptions: Transaction_2.Options;
778
+ transactionOptions: Transaction.Options;
779
779
  /**
780
780
  * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`.
781
781
  */
@@ -1487,7 +1487,7 @@ declare type InteractiveTransactionInfo<Payload = unknown> = {
1487
1487
  payload: Payload;
1488
1488
  };
1489
1489
 
1490
- declare type InteractiveTransactionOptions<Payload> = Transaction_2.InteractiveTransactionInfo<Payload>;
1490
+ declare type InteractiveTransactionOptions<Payload> = Transaction.InteractiveTransactionInfo<Payload>;
1491
1491
 
1492
1492
  export declare type InternalArgs<R = {
1493
1493
  [K in string]: {
@@ -1557,9 +1557,9 @@ export { isJsonNull }
1557
1557
 
1558
1558
  export { isObjectEnumValue }
1559
1559
 
1560
- declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
1560
+ declare type IsolationLevel = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable';
1561
1561
 
1562
- declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable';
1562
+ declare type IsolationLevel_2 = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
1563
1563
 
1564
1564
  declare function isSkip(value: unknown): value is Skip;
1565
1565
 
@@ -1613,7 +1613,7 @@ export declare interface JsonArray extends Array<JsonValue> {
1613
1613
  export declare type JsonBatchQuery = {
1614
1614
  batch: JsonQuery[];
1615
1615
  transaction?: {
1616
- isolationLevel?: IsolationLevel_2;
1616
+ isolationLevel?: IsolationLevel;
1617
1617
  };
1618
1618
  };
1619
1619
 
@@ -1930,7 +1930,7 @@ declare type Options = {
1930
1930
  /** Timeout for the transaction body */
1931
1931
  timeout?: number;
1932
1932
  /** Transaction isolation level */
1933
- isolationLevel?: IsolationLevel_2;
1933
+ isolationLevel?: IsolationLevel;
1934
1934
  /**
1935
1935
  * Used for nested interactive transactions. When provided, the engine may
1936
1936
  * re-use an existing open transaction instead of opening a new one.
@@ -2004,29 +2004,12 @@ declare type PrimaryKey = ReadonlyDeep_2<{
2004
2004
  fields: string[];
2005
2005
  }>;
2006
2006
 
2007
- export { PrismaClientInitializationError }
2008
-
2009
- export { PrismaClientKnownRequestError }
2010
-
2011
2007
  /**
2012
- * Since Prisma 7, a PrismaClient needs either an adapter or an accelerateUrl.
2013
- * The two options are mutually exclusive.
2008
+ * Options common to all variants of `PrismaClientOptions`, regardless of
2009
+ * whether you connect to your database through a driver adapter or through
2010
+ * Prisma Accelerate.
2014
2011
  */
2015
- declare type PrismaClientMutuallyExclusiveOptions = {
2016
- /**
2017
- * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`.
2018
- */
2019
- adapter: SqlDriverAdapterFactory;
2020
- accelerateUrl?: never;
2021
- } | {
2022
- /**
2023
- * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database.
2024
- */
2025
- accelerateUrl: string;
2026
- adapter?: never;
2027
- };
2028
-
2029
- export declare type PrismaClientOptions = PrismaClientMutuallyExclusiveOptions & {
2012
+ declare interface PrismaClientBaseOptions {
2030
2013
  /**
2031
2014
  * @default "colorless"
2032
2015
  */
@@ -2036,7 +2019,7 @@ export declare type PrismaClientOptions = PrismaClientMutuallyExclusiveOptions &
2036
2019
  * maxWait ?= 2000
2037
2020
  * timeout ?= 5000
2038
2021
  */
2039
- transactionOptions?: Transaction_2.Options;
2022
+ transactionOptions?: Transaction.Options;
2040
2023
  /**
2041
2024
  * @example
2042
2025
  * \`\`\`
@@ -2094,7 +2077,71 @@ export declare type PrismaClientOptions = PrismaClientMutuallyExclusiveOptions &
2094
2077
  /** This can be used for testing purposes */
2095
2078
  configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig;
2096
2079
  };
2097
- };
2080
+ }
2081
+
2082
+ export { PrismaClientInitializationError }
2083
+
2084
+ export { PrismaClientKnownRequestError }
2085
+
2086
+ /**
2087
+ * Options passed to the `PrismaClient` constructor.
2088
+ *
2089
+ * A driver adapter (or, alternatively, a Prisma Accelerate URL) is **required**.
2090
+ * See {@link PrismaClientOptionsWithAdapter} and
2091
+ * {@link PrismaClientOptionsWithAccelerateUrl} for the two variants. All other
2092
+ * properties live in {@link PrismaClientBaseOptions} and are optional.
2093
+ *
2094
+ * Learn more about driver adapters: https://pris.ly/d/driver-adapters
2095
+ */
2096
+ export declare type PrismaClientOptions = PrismaClientOptionsWithAccelerateUrl | PrismaClientOptionsWithAdapter;
2097
+
2098
+ /**
2099
+ * `PrismaClient` options for connecting to your database through Prisma
2100
+ * Accelerate instead of a driver adapter.
2101
+ *
2102
+ * Learn more: https://pris.ly/d/accelerate
2103
+ */
2104
+ declare interface PrismaClientOptionsWithAccelerateUrl extends PrismaClientBaseOptions {
2105
+ /**
2106
+ * The Prisma Accelerate connection URL. Use this option to connect to
2107
+ * your database through Prisma Accelerate instead of using a driver
2108
+ * adapter to connect directly.
2109
+ *
2110
+ * Learn more: https://pris.ly/d/accelerate
2111
+ */
2112
+ accelerateUrl: string;
2113
+ adapter?: never;
2114
+ }
2115
+
2116
+ /**
2117
+ * `PrismaClient` options for connecting to your database through a driver
2118
+ * adapter. This is the common case in Prisma 7.
2119
+ *
2120
+ * Learn more: https://pris.ly/d/driver-adapters
2121
+ */
2122
+ declare interface PrismaClientOptionsWithAdapter extends PrismaClientBaseOptions {
2123
+ /**
2124
+ * A driver adapter that PrismaClient uses to connect to your database,
2125
+ * such as the ones provided by `@prisma/adapter-pg`,
2126
+ * `@prisma/adapter-libsql`, `@prisma/adapter-planetscale`, etc.
2127
+ *
2128
+ * A driver adapter is **required** unless you connect to your database
2129
+ * through Prisma Accelerate (in which case use `accelerateUrl` instead).
2130
+ *
2131
+ * Learn more: https://pris.ly/d/driver-adapters
2132
+ *
2133
+ * @example
2134
+ * ```ts
2135
+ * import { PrismaPg } from '@prisma/adapter-pg'
2136
+ * import { PrismaClient } from './generated/prisma/client'
2137
+ *
2138
+ * const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
2139
+ * const prisma = new PrismaClient({ adapter })
2140
+ * ```
2141
+ */
2142
+ adapter: SqlDriverAdapterFactory;
2143
+ accelerateUrl?: never;
2144
+ }
2098
2145
 
2099
2146
  export { PrismaClientRustPanicError }
2100
2147
 
@@ -2148,7 +2195,7 @@ declare interface PrismaPromise_2<TResult, TSpec extends PrismaOperationSpec<unk
2148
2195
  declare type PrismaPromiseBatchTransaction = {
2149
2196
  kind: 'batch';
2150
2197
  id: number;
2151
- isolationLevel?: IsolationLevel_2;
2198
+ isolationLevel?: IsolationLevel;
2152
2199
  maxWait?: number;
2153
2200
  timeout?: number;
2154
2201
  index: number;
@@ -3075,7 +3122,7 @@ declare interface SqlDriverAdapter extends SqlQueryable {
3075
3122
  /**
3076
3123
  * Start new transaction.
3077
3124
  */
3078
- startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
3125
+ startTransaction(isolationLevel?: IsolationLevel_2): Promise<Transaction_2>;
3079
3126
  /**
3080
3127
  * Optional method that returns extra connection info
3081
3128
  */
@@ -3178,7 +3225,16 @@ declare interface TracingHelper {
3178
3225
  runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
3179
3226
  }
3180
3227
 
3181
- declare interface Transaction extends AdapterInfo, SqlQueryable {
3228
+ declare namespace Transaction {
3229
+ export {
3230
+ IsolationLevel,
3231
+ Options,
3232
+ InteractiveTransactionInfo,
3233
+ TransactionHeaders
3234
+ }
3235
+ }
3236
+
3237
+ declare interface Transaction_2 extends AdapterInfo, SqlQueryable {
3182
3238
  /**
3183
3239
  * Transaction options.
3184
3240
  */
@@ -3205,15 +3261,6 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
3205
3261
  releaseSavepoint?(name: string): Promise<void>;
3206
3262
  }
3207
3263
 
3208
- declare namespace Transaction_2 {
3209
- export {
3210
- IsolationLevel_2 as IsolationLevel,
3211
- Options,
3212
- InteractiveTransactionInfo,
3213
- TransactionHeaders
3214
- }
3215
- }
3216
-
3217
3264
  declare type TransactionHeaders = {
3218
3265
  traceparent?: string;
3219
3266
  };
@@ -144,7 +144,7 @@ export declare type BaseDMMF = {
144
144
  declare type BatchArgs = {
145
145
  queries: BatchQuery[];
146
146
  transaction?: {
147
- isolationLevel?: IsolationLevel_2;
147
+ isolationLevel?: IsolationLevel;
148
148
  };
149
149
  };
150
150
 
@@ -172,7 +172,7 @@ declare type BatchQueryOptionsCbArgs = {
172
172
  declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse;
173
173
 
174
174
  declare type BatchTransactionOptions = {
175
- isolationLevel?: Transaction_2.IsolationLevel;
175
+ isolationLevel?: Transaction.IsolationLevel;
176
176
  maxWait?: number;
177
177
  timeout?: number;
178
178
  };
@@ -761,9 +761,9 @@ declare interface Engine<InteractiveTransactionPayload = unknown> {
761
761
  version(forceRun?: boolean): Promise<string> | string;
762
762
  request<T>(query: JsonQuery, options: RequestOptions<InteractiveTransactionPayload>): Promise<QueryEngineResultData<T>>;
763
763
  requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
764
- transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise<Transaction_2.InteractiveTransactionInfo<unknown>>;
765
- transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
766
- transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
764
+ transaction(action: 'start', headers: Transaction.TransactionHeaders, options: Transaction.Options): Promise<Transaction.InteractiveTransactionInfo<unknown>>;
765
+ transaction(action: 'commit', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo<unknown>): Promise<void>;
766
+ transaction(action: 'rollback', headers: Transaction.TransactionHeaders, info: Transaction.InteractiveTransactionInfo<unknown>): Promise<void>;
767
767
  }
768
768
 
769
769
  declare interface EngineConfig {
@@ -775,7 +775,7 @@ declare interface EngineConfig {
775
775
  previewFeatures?: string[];
776
776
  activeProvider?: string;
777
777
  logEmitter: LogEmitter;
778
- transactionOptions: Transaction_2.Options;
778
+ transactionOptions: Transaction.Options;
779
779
  /**
780
780
  * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`.
781
781
  */
@@ -1487,7 +1487,7 @@ declare type InteractiveTransactionInfo<Payload = unknown> = {
1487
1487
  payload: Payload;
1488
1488
  };
1489
1489
 
1490
- declare type InteractiveTransactionOptions<Payload> = Transaction_2.InteractiveTransactionInfo<Payload>;
1490
+ declare type InteractiveTransactionOptions<Payload> = Transaction.InteractiveTransactionInfo<Payload>;
1491
1491
 
1492
1492
  export declare type InternalArgs<R = {
1493
1493
  [K in string]: {
@@ -1557,9 +1557,9 @@ export { isJsonNull }
1557
1557
 
1558
1558
  export { isObjectEnumValue }
1559
1559
 
1560
- declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
1560
+ declare type IsolationLevel = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable';
1561
1561
 
1562
- declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable';
1562
+ declare type IsolationLevel_2 = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE';
1563
1563
 
1564
1564
  declare function isSkip(value: unknown): value is Skip;
1565
1565
 
@@ -1613,7 +1613,7 @@ export declare interface JsonArray extends Array<JsonValue> {
1613
1613
  export declare type JsonBatchQuery = {
1614
1614
  batch: JsonQuery[];
1615
1615
  transaction?: {
1616
- isolationLevel?: IsolationLevel_2;
1616
+ isolationLevel?: IsolationLevel;
1617
1617
  };
1618
1618
  };
1619
1619
 
@@ -1930,7 +1930,7 @@ declare type Options = {
1930
1930
  /** Timeout for the transaction body */
1931
1931
  timeout?: number;
1932
1932
  /** Transaction isolation level */
1933
- isolationLevel?: IsolationLevel_2;
1933
+ isolationLevel?: IsolationLevel;
1934
1934
  /**
1935
1935
  * Used for nested interactive transactions. When provided, the engine may
1936
1936
  * re-use an existing open transaction instead of opening a new one.
@@ -2004,29 +2004,12 @@ declare type PrimaryKey = ReadonlyDeep_2<{
2004
2004
  fields: string[];
2005
2005
  }>;
2006
2006
 
2007
- export { PrismaClientInitializationError }
2008
-
2009
- export { PrismaClientKnownRequestError }
2010
-
2011
2007
  /**
2012
- * Since Prisma 7, a PrismaClient needs either an adapter or an accelerateUrl.
2013
- * The two options are mutually exclusive.
2008
+ * Options common to all variants of `PrismaClientOptions`, regardless of
2009
+ * whether you connect to your database through a driver adapter or through
2010
+ * Prisma Accelerate.
2014
2011
  */
2015
- declare type PrismaClientMutuallyExclusiveOptions = {
2016
- /**
2017
- * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`.
2018
- */
2019
- adapter: SqlDriverAdapterFactory;
2020
- accelerateUrl?: never;
2021
- } | {
2022
- /**
2023
- * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database.
2024
- */
2025
- accelerateUrl: string;
2026
- adapter?: never;
2027
- };
2028
-
2029
- export declare type PrismaClientOptions = PrismaClientMutuallyExclusiveOptions & {
2012
+ declare interface PrismaClientBaseOptions {
2030
2013
  /**
2031
2014
  * @default "colorless"
2032
2015
  */
@@ -2036,7 +2019,7 @@ export declare type PrismaClientOptions = PrismaClientMutuallyExclusiveOptions &
2036
2019
  * maxWait ?= 2000
2037
2020
  * timeout ?= 5000
2038
2021
  */
2039
- transactionOptions?: Transaction_2.Options;
2022
+ transactionOptions?: Transaction.Options;
2040
2023
  /**
2041
2024
  * @example
2042
2025
  * \`\`\`
@@ -2094,7 +2077,71 @@ export declare type PrismaClientOptions = PrismaClientMutuallyExclusiveOptions &
2094
2077
  /** This can be used for testing purposes */
2095
2078
  configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig;
2096
2079
  };
2097
- };
2080
+ }
2081
+
2082
+ export { PrismaClientInitializationError }
2083
+
2084
+ export { PrismaClientKnownRequestError }
2085
+
2086
+ /**
2087
+ * Options passed to the `PrismaClient` constructor.
2088
+ *
2089
+ * A driver adapter (or, alternatively, a Prisma Accelerate URL) is **required**.
2090
+ * See {@link PrismaClientOptionsWithAdapter} and
2091
+ * {@link PrismaClientOptionsWithAccelerateUrl} for the two variants. All other
2092
+ * properties live in {@link PrismaClientBaseOptions} and are optional.
2093
+ *
2094
+ * Learn more about driver adapters: https://pris.ly/d/driver-adapters
2095
+ */
2096
+ export declare type PrismaClientOptions = PrismaClientOptionsWithAccelerateUrl | PrismaClientOptionsWithAdapter;
2097
+
2098
+ /**
2099
+ * `PrismaClient` options for connecting to your database through Prisma
2100
+ * Accelerate instead of a driver adapter.
2101
+ *
2102
+ * Learn more: https://pris.ly/d/accelerate
2103
+ */
2104
+ declare interface PrismaClientOptionsWithAccelerateUrl extends PrismaClientBaseOptions {
2105
+ /**
2106
+ * The Prisma Accelerate connection URL. Use this option to connect to
2107
+ * your database through Prisma Accelerate instead of using a driver
2108
+ * adapter to connect directly.
2109
+ *
2110
+ * Learn more: https://pris.ly/d/accelerate
2111
+ */
2112
+ accelerateUrl: string;
2113
+ adapter?: never;
2114
+ }
2115
+
2116
+ /**
2117
+ * `PrismaClient` options for connecting to your database through a driver
2118
+ * adapter. This is the common case in Prisma 7.
2119
+ *
2120
+ * Learn more: https://pris.ly/d/driver-adapters
2121
+ */
2122
+ declare interface PrismaClientOptionsWithAdapter extends PrismaClientBaseOptions {
2123
+ /**
2124
+ * A driver adapter that PrismaClient uses to connect to your database,
2125
+ * such as the ones provided by `@prisma/adapter-pg`,
2126
+ * `@prisma/adapter-libsql`, `@prisma/adapter-planetscale`, etc.
2127
+ *
2128
+ * A driver adapter is **required** unless you connect to your database
2129
+ * through Prisma Accelerate (in which case use `accelerateUrl` instead).
2130
+ *
2131
+ * Learn more: https://pris.ly/d/driver-adapters
2132
+ *
2133
+ * @example
2134
+ * ```ts
2135
+ * import { PrismaPg } from '@prisma/adapter-pg'
2136
+ * import { PrismaClient } from './generated/prisma/client'
2137
+ *
2138
+ * const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
2139
+ * const prisma = new PrismaClient({ adapter })
2140
+ * ```
2141
+ */
2142
+ adapter: SqlDriverAdapterFactory;
2143
+ accelerateUrl?: never;
2144
+ }
2098
2145
 
2099
2146
  export { PrismaClientRustPanicError }
2100
2147
 
@@ -2148,7 +2195,7 @@ declare interface PrismaPromise_2<TResult, TSpec extends PrismaOperationSpec<unk
2148
2195
  declare type PrismaPromiseBatchTransaction = {
2149
2196
  kind: 'batch';
2150
2197
  id: number;
2151
- isolationLevel?: IsolationLevel_2;
2198
+ isolationLevel?: IsolationLevel;
2152
2199
  maxWait?: number;
2153
2200
  timeout?: number;
2154
2201
  index: number;
@@ -3075,7 +3122,7 @@ declare interface SqlDriverAdapter extends SqlQueryable {
3075
3122
  /**
3076
3123
  * Start new transaction.
3077
3124
  */
3078
- startTransaction(isolationLevel?: IsolationLevel): Promise<Transaction>;
3125
+ startTransaction(isolationLevel?: IsolationLevel_2): Promise<Transaction_2>;
3079
3126
  /**
3080
3127
  * Optional method that returns extra connection info
3081
3128
  */
@@ -3178,7 +3225,16 @@ declare interface TracingHelper {
3178
3225
  runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
3179
3226
  }
3180
3227
 
3181
- declare interface Transaction extends AdapterInfo, SqlQueryable {
3228
+ declare namespace Transaction {
3229
+ export {
3230
+ IsolationLevel,
3231
+ Options,
3232
+ InteractiveTransactionInfo,
3233
+ TransactionHeaders
3234
+ }
3235
+ }
3236
+
3237
+ declare interface Transaction_2 extends AdapterInfo, SqlQueryable {
3182
3238
  /**
3183
3239
  * Transaction options.
3184
3240
  */
@@ -3205,15 +3261,6 @@ declare interface Transaction extends AdapterInfo, SqlQueryable {
3205
3261
  releaseSavepoint?(name: string): Promise<void>;
3206
3262
  }
3207
3263
 
3208
- declare namespace Transaction_2 {
3209
- export {
3210
- IsolationLevel_2 as IsolationLevel,
3211
- Options,
3212
- InteractiveTransactionInfo,
3213
- TransactionHeaders
3214
- }
3215
- }
3216
-
3217
3264
  declare type TransactionHeaders = {
3218
3265
  traceparent?: string;
3219
3266
  };