import { AnyNull } from '@prisma/client-runtime-utils'; import { AnyNullClass } from '@prisma/client-runtime-utils'; import { DbNull } from '@prisma/client-runtime-utils'; import { DbNullClass } from '@prisma/client-runtime-utils'; import { Decimal } from '@prisma/client-runtime-utils'; import { empty } from '@prisma/client-runtime-utils'; import { isAnyNull } from '@prisma/client-runtime-utils'; import { isDbNull } from '@prisma/client-runtime-utils'; import { isJsonNull } from '@prisma/client-runtime-utils'; import { isObjectEnumValue } from '@prisma/client-runtime-utils'; import { join } from '@prisma/client-runtime-utils'; import { JsonNull } from '@prisma/client-runtime-utils'; import { JsonNullClass } from '@prisma/client-runtime-utils'; import { NullTypes } from '@prisma/client-runtime-utils'; import { ObjectEnumValue } from '@prisma/client-runtime-utils'; import { PrismaClientInitializationError } from '@prisma/client-runtime-utils'; import { PrismaClientKnownRequestError } from '@prisma/client-runtime-utils'; import { PrismaClientRustPanicError } from '@prisma/client-runtime-utils'; import { PrismaClientUnknownRequestError } from '@prisma/client-runtime-utils'; import { PrismaClientValidationError } from '@prisma/client-runtime-utils'; import { raw } from '@prisma/client-runtime-utils'; import { RawValue } from '@prisma/client-runtime-utils'; import { Sql } from '@prisma/client-runtime-utils'; import { sql as sqltag } from '@prisma/client-runtime-utils'; import { Value } from '@prisma/client-runtime-utils'; /** * @param this */ declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; /** * Used by `@prisma/extension-accelerate` until we migrate it to a better API. */ declare interface AccelerateEngineConfig extends EngineConfig { /** * Allows Accelerate to use runtime utilities from the client. These are * necessary for `@prisma/extension-accelerate` to function correctly. * See */ accelerateUtils: { resolveDatasourceUrl: () => string; }; } /** * A stripped down interface of `fetch` that `@prisma/extension-accelerate` * relies on. It must be in sync with the corresponding definition in the * Accelerate extension. * * This is the actual interface exposed by the extension. We can't use the * custom fetch function provided by it as normal fetch because the API is * different. Notably, `headers` must be an object and not a `Headers` * instance, and `url` must be a `string` and not a `URL`. * * The return type is `Response` but we can't specify this in an exported type * because it would end up referencing external types from `@types/node` or DOM * which can fail typechecking depending on TypeScript configuration in a user's * project. */ declare type AccelerateExtensionFetch = (url: string, options: { body?: string; method?: string; headers: Record; }) => Promise; declare type AccelerateExtensionFetchDecorator = (fetch: AccelerateExtensionFetch) => AccelerateExtensionFetch; export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; declare type ActiveConnectorType = Exclude; /** * An interface that exposes some basic information about the * adapter like its name and provider type. */ declare interface AdapterInfo { readonly provider: Provider; readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); } export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { [P in K]: { $allModels: infer AllModels; }; } ? { [P in K]: Record; } : {}; export { AnyNull } export { AnyNullClass } export declare type ApplyOmit = Compute<{ [K in keyof T as OmitValue extends true ? never : K]: T[K]; }>; export declare type Args = T extends { [K: symbol]: { types: { operations: { [K in F]: { args: any; }; }; }; }; } ? T[symbol]['types']['operations'][F]['args'] : any; export declare type Args_3 = Args; declare type ArgScalarType = 'string' | 'int' | 'bigint' | 'float' | 'decimal' | 'boolean' | 'enum' | 'uuid' | 'json' | 'datetime' | 'bytes' | 'unknown'; declare type ArgType = { scalarType: ArgScalarType; dbType?: string; arity: Arity; }; declare type Arity = 'scalar' | 'list'; /** * Attributes is a map from string to attribute values. * * Note: only the own enumerable keys are counted as valid attribute keys. */ declare interface Attributes { [attributeKey: string]: AttributeValue | undefined; } /** * Attribute values may be any non-nullish primitive value except an object. * * null or undefined attribute values are invalid and will result in undefined behavior. */ declare type AttributeValue = string | number | boolean | Array | Array | Array; export declare type BaseDMMF = { readonly datamodel: Omit; }; declare type BatchArgs = { queries: BatchQuery[]; transaction?: { isolationLevel?: IsolationLevel_2; }; }; declare type BatchInternalParams = { requests: RequestParams[]; customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare type BatchQuery = { model: string | undefined; operation: string; args: JsArgs | RawQueryArgs; }; declare type BatchQueryEngineResult = QueryEngineResultData | Error; declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; declare type BatchQueryOptionsCbArgs = { args: BatchArgs; query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; __internalParams: BatchInternalParams; }; declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse; declare type BatchTransactionOptions = { isolationLevel?: Transaction_2.IsolationLevel; maxWait?: number; timeout?: number; }; /** * Equivalent to `Uint8Array` before TypeScript 5.7, and `Uint8Array` in TypeScript 5.7 and beyond. */ export declare type Bytes = ReturnType; export declare type Call = (F & { params: P; })['returns']; declare interface CallSite { getLocation(): LocationInFile | null; } export declare type Cast = A extends W ? A : W; declare type Client = ReturnType extends new (optionsArg: PrismaClientOptions) => infer T ? T : never; export declare type ClientArg = { [MethodName in string]: unknown; }; export declare type ClientArgs = { client: ClientArg; }; export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; export declare type ClientOptionDef = undefined | { [K in string]: any; }; export declare type ClientOtherOps = { $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; $queryRawTyped(query: TypedSql): PrismaPromise; $queryRawUnsafe(query: string, ...values: any[]): PrismaPromise; $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise; $executeRawUnsafe(query: string, ...values: any[]): PrismaPromise; $runCommandRaw(command: InputJsonObject): PrismaPromise; }; declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; declare const ColumnTypeEnum: { readonly Int32: 0; readonly Int64: 1; readonly Float: 2; readonly Double: 3; readonly Numeric: 4; readonly Boolean: 5; readonly Character: 6; readonly Text: 7; readonly Date: 8; readonly Time: 9; readonly DateTime: 10; readonly Json: 11; readonly Enum: 12; readonly Bytes: 13; readonly Set: 14; readonly Uuid: 15; readonly Int32Array: 64; readonly Int64Array: 65; readonly FloatArray: 66; readonly DoubleArray: 67; readonly NumericArray: 68; readonly BooleanArray: 69; readonly CharacterArray: 70; readonly TextArray: 71; readonly DateArray: 72; readonly TimeArray: 73; readonly DateTimeArray: 74; readonly JsonArray: 75; readonly EnumArray: 76; readonly BytesArray: 77; readonly UuidArray: 78; readonly UnknownNumber: 128; }; declare type CompactedBatchResponse = { type: 'compacted'; plan: QueryPlanNode; arguments: Record[]; nestedSelection: string[]; keys: string[]; expectNonEmpty: boolean; }; declare type CompilerWasmLoadingConfig = { /** * WASM-bindgen runtime for corresponding module */ getRuntime: () => Promise<{ __wbg_set_wasm(exports: unknown): void; QueryCompiler: QueryCompilerConstructor; }>; /** * Loads the raw wasm module for the wasm compiler engine. This configuration is * generated specifically for each type of client, eg. Node.js client and Edge * clients will have different implementations. * @remarks this is a callback on purpose, we only load the wasm if needed. * @remarks only used by ClientEngine */ getQueryCompilerWasmModule: () => Promise; importName: string; }; export declare type Compute = T extends Function ? T : { [K in keyof T]: T[K]; } & unknown; export declare type ComputeDeep = T extends Function ? T : { [K in keyof T]: ComputeDeep; } & unknown; declare type ComputedField = { name: string; needs: string[]; compute: ResultArgsFieldCompute; }; declare type ComputedFieldsMap = { [fieldName: string]: ComputedField; }; declare type ConnectionInfo = { schemaName?: string; maxBindValues?: number; supportsRelationJoins: boolean; }; declare type ConnectorType = 'mysql' | 'mongodb' | 'sqlite' | 'postgresql' | 'postgres' | 'prisma+postgres' | 'sqlserver' | 'cockroachdb'; declare interface Context { /** * Get a value from the context. * * @param key key which identifies a context value */ getValue(key: symbol): unknown; /** * Create a new context which inherits from this context and has * the given key set to the given value. * * @param key context key for which to set the value * @param value value to set for the given key */ setValue(key: symbol, value: unknown): Context; /** * Return a new context which inherits from this context but does * not contain a value for the given key. * * @param key context key for which to clear a value */ deleteValue(key: symbol): Context; } declare type Context_2 = T extends { [K: symbol]: { ctx: infer C; }; } ? C & T & { /** * @deprecated Use `$name` instead. */ name?: string; $name?: string; $parent?: unknown; } : T & { /** * @deprecated Use `$name` instead. */ name?: string; $name?: string; $parent?: unknown; }; export declare type Count = { [K in keyof O]: Count; } & {}; export declare function createParam(name: string): Param; declare class DataLoader { private options; batches: { [key: string]: Job[]; }; private tickActive; constructor(options: DataLoaderOptions); request(request: T): Promise; private dispatchBatches; get [Symbol.toStringTag](): string; } declare type DataLoaderOptions = { singleLoader: (request: T) => Promise; batchLoader: (request: T[]) => Promise; batchBy: (request: T) => string | undefined; batchOrder: (requestA: T, requestB: T) => number; }; declare type Datamodel = ReadonlyDeep_2<{ models: Model[]; enums: DatamodelEnum[]; types: Model[]; indexes: Index[]; }>; declare type DatamodelEnum = ReadonlyDeep_2<{ name: string; values: EnumValue[]; dbName?: string | null; documentation?: string; }>; declare function datamodelEnumToSchemaEnum(datamodelEnum: DatamodelEnum): SchemaEnum; declare type DataRule = { type: 'rowCountEq'; args: number; } | { type: 'rowCountNeq'; args: number; } | { type: 'affectedRowCountEq'; args: number; } | { type: 'never'; }; export { DbNull } export { DbNullClass } export declare const Debug: typeof debugCreate & { enable(namespace: any): void; disable(): any; enabled(namespace: string): boolean; log: (...args: string[]) => void; formatters: {}; }; /** * Create a new debug instance with the given namespace. * * @example * ```ts * import Debug from '@prisma/debug' * const debug = Debug('prisma:client') * debug('Hello World') * ``` */ declare function debugCreate(namespace: string): ((...args: any[]) => void) & { color: string; enabled: boolean; namespace: string; log: (...args: string[]) => void; extend: () => void; }; export { Decimal } /** * Interface for any Decimal.js-like library * Allows us to accept Decimal.js from different * versions and some compatible alternatives */ export declare interface DecimalJsLike { d: number[]; e: number; s: number; toFixed(): string; } export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; export declare type DefaultSelection = Args extends { omit: infer LocalOmit; } ? ApplyOmit['default'], PatchFlat>>> : ApplyOmit['default'], ExtractGlobalOmit>>; export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; declare const denylist: readonly ["$connect", "$disconnect", "$on", "$use", "$extends"]; declare type Deprecation = ReadonlyDeep_2<{ sinceVersion: string; reason: string; plannedRemovalVersion?: string; }>; declare type DeserializedResponse = Array>; export declare function deserializeJsonObject(result: unknown): unknown; export declare function deserializeRawResult(response: RawResponse): DeserializedResponse; export declare type DevTypeMapDef = { meta: { modelProps: string; }; model: { [Model in PropertyKey]: { [Operation in PropertyKey]: DevTypeMapFnDef; }; }; other: { [Operation in PropertyKey]: DevTypeMapFnDef; }; }; export declare type DevTypeMapFnDef = { args: any; result: any; payload: OperationPayload; }; export declare namespace DMMF { export { datamodelEnumToSchemaEnum, Datamodel, DatamodelEnum, Deprecation, Document_2 as Document, EnumValue, Field, FieldDefault, FieldDefaultScalar, FieldKind, FieldLocation, FieldNamespace, FieldRefAllowType, FieldRefType, Index, IndexField, IndexType, InputType, InputTypeRef, Mappings, Model, ModelAction, ModelMapping, OtherOperationMappings, OutputType, OutputTypeRef, PrimaryKey, Query, QueryOutput, ReadonlyDeep_2 as ReadonlyDeep, Schema, SchemaArg, SchemaEnum, SchemaField, SortOrder, TypeRef, uniqueIndex } } declare namespace DMMF_2 { export { datamodelEnumToSchemaEnum, Datamodel, DatamodelEnum, Deprecation, Document_2 as Document, EnumValue, Field, FieldDefault, FieldDefaultScalar, FieldKind, FieldLocation, FieldNamespace, FieldRefAllowType, FieldRefType, Index, IndexField, IndexType, InputType, InputTypeRef, Mappings, Model, ModelAction, ModelMapping, OtherOperationMappings, OutputType, OutputTypeRef, PrimaryKey, Query, QueryOutput, ReadonlyDeep_2 as ReadonlyDeep, Schema, SchemaArg, SchemaEnum, SchemaField, SortOrder, TypeRef, uniqueIndex } } export declare function dmmfToRuntimeDataModel(dmmfDataModel: DMMF_2.Datamodel): RuntimeDataModel; declare type Document_2 = ReadonlyDeep_2<{ datamodel: Datamodel; schema: Schema; mappings: Mappings; }>; /** * A generic driver adapter factory that allows the user to instantiate a * driver adapter. The query and result types are specific to the adapter. */ declare interface DriverAdapterFactory extends AdapterInfo { /** * Instantiate a driver adapter. */ connect(): Promise>; } declare type DynamicArgType = ArgType | { arity: 'tuple'; elements: ArgType[]; }; /** Client */ export declare type DynamicClientExtensionArgs> = { [P in keyof C_]: unknown; } & { [K: symbol]: { ctx: Optional, ITXClientDenyList> & { $parent: Optional, ITXClientDenyList>; }; }; }; export declare type DynamicClientExtensionThis> = { [P in keyof ExtArgs['client']]: Return; } & { [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; } & { [P in Exclude]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never; } & { [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; } & { [K: symbol]: { types: TypeMap['other']; }; }; export declare type DynamicClientExtensionThisBuiltin> = { $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call>; $transaction

[]>(arg: [...P], options?: { maxWait?: number; timeout?: number; isolationLevel?: TypeMap['meta']['txIsolationLevel']; }): Promise>; $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { maxWait?: number; timeout?: number; isolationLevel?: TypeMap['meta']['txIsolationLevel']; }): Promise; $disconnect(): Promise; $connect(): Promise; }; /** Model */ export declare type DynamicModelExtensionArgs> = { [K in keyof M_]: K extends '$allModels' ? { [P in keyof M_[K]]?: unknown; } & { [K: symbol]: {}; } : K extends TypeMap['meta']['modelProps'] ? { [P in keyof M_[K]]?: unknown; } & { [K: symbol]: { ctx: DynamicModelExtensionThis, ExtArgs> & { $parent: DynamicClientExtensionThis; } & { $name: ModelKey; } & { /** * @deprecated Use `$name` instead. */ name: ModelKey; }; }; } : never; }; export declare type DynamicModelExtensionFluentApi = { [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; }; export declare type DynamicModelExtensionFnResult = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; export declare type DynamicModelExtensionFnResultBase = GetResult; export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult> : (args: Exact) => DynamicModelExtensionFnResult>; export declare type DynamicModelExtensionThis> = { [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; } & { [P in Exclude]>]: DynamicModelExtensionOperationFn; } & { [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; } & { [K: symbol]: { types: TypeMap['model'][M]; }; }; /** Query */ export declare type DynamicQueryExtensionArgs = { [K in keyof Q_]: K extends '$allOperations' ? (args: { model?: string; operation: string; args: any; query: (args: any) => PrismaPromise; }) => Promise : K extends '$allModels' ? { [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; } : K extends TypeMap['meta']['modelProps'] ? { [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; }; export declare type DynamicQueryExtensionCb = >(args: A) => Promise; export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { args: DynamicQueryExtensionCbArgsArgs; model: _0 extends 0 ? undefined : _1; operation: _2; query: >(args: A) => PrismaPromise; } : never : never) & { query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; }; export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; /** Result */ export declare type DynamicResultExtensionArgs = { [K in keyof R_]: { [P in keyof R_[K]]?: { needs?: DynamicResultExtensionNeeds, R_[K][P]>; compute(data: DynamicResultExtensionData, R_[K][P]>): any; }; }; }; export declare type DynamicResultExtensionData = GetFindResult; export declare type DynamicResultExtensionNeeds = { [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; } & { [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; }; export { empty } export declare type EmptyToUnknown = T; declare interface Engine { /** The name of the engine. This is meant to be consumed externally */ readonly name: string; onBeforeExit(callback: () => Promise): void; start(): Promise; stop(): Promise; version(forceRun?: boolean): Promise | string; request(query: JsonQuery, options: RequestOptions): Promise>; requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; } declare interface EngineConfig { enableDebugLogs?: boolean; prismaPath?: string; logQueries?: boolean; logLevel?: 'info' | 'warn'; clientVersion: string; previewFeatures?: string[]; activeProvider?: string; logEmitter: LogEmitter; transactionOptions: Transaction_2.Options; /** * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. */ adapter?: SqlDriverAdapterFactory; /** * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. */ accelerateUrl?: string; /** * The contents of the schema encoded into a string */ inlineSchema: string; /** * The helper for interaction with OTEL tracing * @remarks enabling is determined by the client and @prisma/instrumentation package */ tracingHelper: TracingHelper; /** * Web Assembly module loading configuration */ compilerWasm?: CompilerWasmLoadingConfig; /** * SQL commenter plugins that add metadata to SQL queries as comments. * Each plugin receives query context and returns key-value pairs. */ sqlCommenters?: SqlCommenterPlugin[]; /** * Parameterization schema (ParamGraph) for schema-aware query parameterization. * Enables precise parameterization based on DMMF metadata. */ parameterizationSchema: SerializedParamGraph; /** * Runtime data model for enum lookups during parameterization. */ runtimeDataModel: RuntimeDataModel; /** * Optional maximum size for the query plan cache. If not provided, a default size will be used. * A value of `0` can be used to disable the cache entirely. A higher cache size can improve * performance for applications that execute a large number of unique queries, while a smaller * cache size can reduce memory usage. */ queryPlanCacheMaxSize?: number; } declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; declare type EngineEventType = QueryEventType | LogEventType; declare type EngineSpan = { id: EngineSpanId; parentId: string | null; name: string; startTime: HrTime; endTime: HrTime; kind: EngineSpanKind; attributes?: Record; links?: EngineSpanId[]; }; declare type EngineSpanId = string; declare type EngineSpanKind = 'client' | 'internal'; declare type EnumValue = ReadonlyDeep_2<{ name: string; dbName: string | null; }>; export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; export declare type Exact = (A extends unknown ? (W extends A ? { [K in keyof A]: Exact; } : W) : never) | (A extends Narrowable ? A : never); /** * Defines Exception. * * string or an object with one of (message or name or code) and optional stack */ declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; declare interface ExceptionWithCode { code: string | number; name?: string; message?: string; stack?: string; } declare interface ExceptionWithMessage { code?: string | number; message: string; name?: string; stack?: string; } declare interface ExceptionWithName { code?: string | number; message?: string; name: string; stack?: string; } declare type ExtendedEventType = LogLevel | 'beforeExit'; declare interface ExtendedSpanOptions extends SpanOptions { /** The name of the span */ name: string; internal?: boolean; /** Whether it propagates context (?=true) */ active?: boolean; /** The context to append the span to */ context?: Context; } /** $extends, defineExtension */ export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { extArgs: ExtArgs; , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { $extends: { extArgs: Args; }; }) | { name?: string; query?: DynamicQueryExtensionArgs; result?: DynamicResultExtensionArgs & R; model?: DynamicModelExtensionArgs & M; client?: DynamicClientExtensionArgs & C; }): { extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; define: (client: any) => { $extends: { extArgs: Args; }; }; }[Variant]; } export declare type ExtensionArgs = Optional; declare namespace Extensions { export { defineExtension, getExtensionContext } } export { Extensions } declare namespace Extensions_2 { export { InternalArgs, DefaultArgs, GetPayloadResultExtensionKeys, GetPayloadResultExtensionObject, GetPayloadResult, GetSelect, GetOmit, DynamicQueryExtensionArgs, DynamicQueryExtensionCb, DynamicQueryExtensionCbArgs, DynamicQueryExtensionCbArgsArgs, DynamicResultExtensionArgs, DynamicResultExtensionNeeds, DynamicResultExtensionData, DynamicModelExtensionArgs, DynamicModelExtensionThis, DynamicModelExtensionOperationFn, DynamicModelExtensionFnResult, DynamicModelExtensionFnResultBase, DynamicModelExtensionFluentApi, DynamicModelExtensionFnResultNull, DynamicClientExtensionArgs, DynamicClientExtensionThis, ClientBuiltInProp, DynamicClientExtensionThisBuiltin, ExtendsHook, MergeExtArgs, AllModelsToStringIndex, TypeMapDef, DevTypeMapDef, DevTypeMapFnDef, ClientOptionDef, ClientOtherOps, TypeMapCbDef, ModelKey, RequiredExtensionArgs as UserArgs } } export declare type ExtractGlobalOmit = Options extends { omit: { [K in ModelName]: infer GlobalOmit; }; } ? GlobalOmit : {}; declare type Field = ReadonlyDeep_2<{ kind: FieldKind; name: string; isRequired: boolean; isList: boolean; isUnique: boolean; isId: boolean; isReadOnly: boolean; isGenerated?: boolean; isUpdatedAt?: boolean; /** * Describes the data type in the same the way it is defined in the Prisma schema: * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName */ type: string; /** * Native database type, if specified. * For example, `@db.VarChar(191)` is encoded as `['VarChar', ['191']]`, * `@db.Text` is encoded as `['Text', []]`. */ nativeType?: [string, string[]] | null; dbName?: string | null; hasDefaultValue: boolean; default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; relationFromFields?: string[]; relationToFields?: string[]; relationOnDelete?: string; relationOnUpdate?: string; relationName?: string; documentation?: string; }>; declare type FieldDefault = ReadonlyDeep_2<{ name: string; args: Array; }>; declare type FieldDefaultScalar = string | boolean | number; declare type FieldInitializer = { type: 'value'; value: PrismaValue; } | { type: 'lastInsertId'; }; declare type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; declare type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; declare type FieldNamespace = 'model' | 'prisma'; declare type FieldOperation = { type: 'set'; value: PrismaValue; } | { type: 'add'; value: PrismaValue; } | { type: 'subtract'; value: PrismaValue; } | { type: 'multiply'; value: PrismaValue; } | { type: 'divide'; value: PrismaValue; }; /** * A reference to a specific field of a specific model */ export declare interface FieldRef { readonly modelName: Model; readonly name: string; readonly typeName: FieldType; readonly isList: boolean; } declare type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; declare type FieldRefType = ReadonlyDeep_2<{ name: string; allowTypes: FieldRefAllowType[]; fields: SchemaArg[]; }>; declare type FieldScalarType = { type: 'string' | 'int' | 'bigint' | 'float' | 'boolean' | 'json' | 'object' | 'datetime' | 'decimal' | 'unsupported'; } | { type: 'enum'; name: string; } | { type: 'bytes'; encoding: 'array' | 'base64' | 'hex'; }; declare type FieldType = { arity: Arity; } & FieldScalarType; declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; export declare interface Fn { params: Params; returns: Returns; } declare type Fragment = { type: 'stringChunk'; chunk: string; } | { type: 'parameter'; } | { type: 'parameterTuple'; itemPrefix: string; itemSeparator: string; itemSuffix: string; } | { type: 'parameterTupleList'; itemPrefix: string; itemSeparator: string; itemSuffix: string; groupSeparator: string; }; export declare type GetAggregateResult

= { [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { [J in keyof A[K] & string]: P['scalars'][J] | null; }; }; export declare type GetBatchResult = { count: number; }; export declare type GetCountResult = A extends { select: infer S; } ? (S extends true ? number : Count) : number; declare function getExtensionContext(that: T): Context_2; export declare type GetFindResult

= Equals extends 1 ? DefaultSelection : A extends { select: infer S extends object; } & Record | { include: infer I extends object; } & Record ? { [K in keyof S | keyof I as (S & I)[K] extends false | undefined | Skip | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { scalars: { [k in K]: infer O; }; } ? O : K extends '_count' ? Count : never; } & (A extends { include: any; } & Record ? DefaultSelection : unknown) : DefaultSelection; export declare type GetGroupByResult

= A extends { by: string[]; } ? Array & { [K in A['by'][number]]: P['scalars'][K]; }> : A extends { by: string; } ? Array & { [K in A['by']]: P['scalars'][K]; }> : {}[]; export declare type GetOmit = { [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean | ExtraType; }; export declare type GetPayloadResult, R extends InternalArgs['result'][string]> = Omit> & GetPayloadResultExtensionObject; export declare type GetPayloadResultExtensionKeys = KR; export declare type GetPayloadResultExtensionObject = { [K in GetPayloadResultExtensionKeys]: R[K] extends () => { compute: (...args: any) => infer C; } ? C : never; }; export declare function getPrismaClient(config: GetPrismaClientConfig): { new (optionsArg: PrismaClientOptions): { _originalClient: any; _runtimeDataModel: RuntimeDataModel; _requestHandler: RequestHandler; _connectionPromise?: Promise | undefined; _disconnectionPromise?: Promise | undefined; _engineConfig: EngineConfig; _accelerateEngineConfig: AccelerateEngineConfig; _clientVersion: string; _errorFormat: ErrorFormat; _tracingHelper: TracingHelper; _previewFeatures: string[]; _activeProvider: string; _globalOmit?: GlobalOmitOptions | undefined; _extensions: MergedExtensionsList; /** * @remarks This is used internally by Policy, do not rename or remove */ _engine: Engine; /** * A fully constructed/applied Client that references the parent * PrismaClient. This is used for Client extensions only. */ _appliedParent: any; _createPrismaPromise: PrismaPromiseFactory; $on(eventType: E, callback: EventCallback): any; $connect(): Promise; /** * Disconnect from the database */ $disconnect(): Promise; /** * Executes a raw query and always returns a number */ $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; /** * Executes a raw query provided through a safe tag function * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; /** * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; /** * Executes a raw command only for MongoDB * * @param command * @returns */ $runCommandRaw(command: Record): PrismaPromise_2; /** * Executes a raw query and returns selected data */ $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; /** * Executes a raw query provided through a safe tag function * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; /** * Counterpart to $queryRaw, that returns strongly typed results * @param typedSql */ $queryRawTyped(typedSql: UnknownTypedSql): PrismaPromise_2; /** * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; /** * Execute a batch of requests in a transaction * @param requests * @param options */ _transactionWithArray({ promises, options, }: { promises: Array>; options?: BatchTransactionOptions; }): Promise; /** * Perform a long-running transaction * @param callback * @param options * @returns */ _transactionWithCallback({ callback, options, }: { callback: (client: Client) => Promise; options?: Options; }): Promise; _createItxClient(transaction: PrismaPromiseInteractiveTransaction, scopeId: string, scopeState: ItxScopeState): Client; /** * Execute queries within a transaction * @param input a callback or a query list * @param options to set timeouts (callback) * @returns */ $transaction(input: any, options?: any): Promise; /** * Runs the middlewares over params before executing a request * @param internalParams * @returns */ _request(internalParams: InternalRequestParams): Promise; _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; /** * Shortcut for checking a preview flag * @param feature preview flag * @returns */ _hasPreviewFlag(feature: string): boolean; $extends: typeof $extends; readonly [Symbol.toStringTag]: string; }; }; /** * Config that is stored into the generated client. When the generated client is * loaded, this same config is passed to {@link getPrismaClient} which creates a * closure with that config around a non-instantiated [[PrismaClient]]. */ export declare type GetPrismaClientConfig = { runtimeDataModel: RuntimeDataModel; previewFeatures: string[]; clientVersion: string; engineVersion: string; activeProvider: ActiveConnectorType; /** * The contents of the schema encoded into a string */ inlineSchema: string; /** * Optional wasm loading configuration */ compilerWasm?: CompilerWasmLoadingConfig; /** * Parameterization schema for schema-aware query parameterization. * Enables precise parameterization based on DMMF metadata. */ parameterizationSchema: SerializedParamGraph; }; export declare type GetResult = { findUnique: GetFindResult | null; findUniqueOrThrow: GetFindResult; findFirst: GetFindResult | null; findFirstOrThrow: GetFindResult; findMany: GetFindResult[]; create: GetFindResult; createMany: GetBatchResult; createManyAndReturn: GetFindResult[]; update: GetFindResult; updateMany: GetBatchResult; updateManyAndReturn: GetFindResult[]; upsert: GetFindResult; delete: GetFindResult; deleteMany: GetBatchResult; aggregate: GetAggregateResult; count: GetCountResult; groupBy: GetGroupByResult; $queryRaw: unknown; $queryRawTyped: unknown; $executeRaw: number; $queryRawUnsafe: unknown; $executeRawUnsafe: number; $runCommandRaw: JsonObject; findRaw: JsonObject; aggregateRaw: JsonObject; }[OperationName]; export declare function getRuntime(): GetRuntimeOutput; declare type GetRuntimeOutput = { id: RuntimeName; prettyName: string; isEdge: boolean; }; export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; }; declare type GlobalOmitOptions = { [modelName: string]: { [fieldName: string]: boolean; }; }; declare type HandleErrorParams = { args: JsArgs; error: any; clientMethod: string; callsite?: CallSite; transaction?: PrismaPromiseTransaction; modelName?: string; globalOmit?: GlobalOmitOptions; }; declare type HrTime = [number, number]; /** * Defines High-Resolution Time. * * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. * This is represented in HrTime format as [1609504210, 150000000]. */ declare type HrTime_2 = [number, number]; declare type Index = ReadonlyDeep_2<{ model: string; type: IndexType; isDefinedOnField: boolean; name?: string; dbName?: string; algorithm?: string; clustered?: boolean; fields: IndexField[]; }>; declare type IndexField = ReadonlyDeep_2<{ name: string; sortOrder?: SortOrder; length?: number; operatorClass?: string; }>; declare type IndexType = 'id' | 'normal' | 'unique' | 'fulltext'; declare type InMemoryOps = { pagination: Pagination | null; distinct: string[] | null; reverse: boolean; linkingFields: string[] | null; nested: Record; }; /** * Matches a JSON array. * Unlike \`JsonArray\`, readonly arrays are assignable to this type. */ export declare interface InputJsonArray extends ReadonlyArray { } /** * Matches a JSON object. * Unlike \`JsonObject\`, this type allows undefined and read-only properties. */ export declare type InputJsonObject = { readonly [Key in string]?: InputJsonValue | null; }; /** * Matches any valid value that can be used as an input for operations like * create and update as the value of a JSON field. Unlike \`JsonValue\`, this * type allows read-only arrays and read-only object properties and disallows * \`null\` at the top level. * * \`null\` cannot be used as the value of a JSON field because its meaning * would be ambiguous. Use \`Prisma.JsonNull\` to store the JSON null value or * \`Prisma.DbNull\` to clear the JSON value and set the field to the database * NULL value instead. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values */ export declare type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { toJSON(): unknown; }; declare type InputType = ReadonlyDeep_2<{ name: string; constraints: { maxNumFields: number | null; minNumFields: number | null; fields?: string[]; }; meta?: { source?: string; grouping?: string; }; fields: SchemaArg[]; }>; declare type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; declare type InteractiveTransactionInfo = { /** * Transaction ID returned by the query engine. */ id: string; /** * Arbitrary payload the meaning of which depends on the `Engine` implementation. * It is currently not used in `LibraryEngine`. */ payload: Payload; }; declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; export declare type InternalArgs = { result: { [K in keyof R]: { [P in keyof R[K]]: () => R[K][P]; }; }; model: { [K in keyof M]: { [P in keyof M[K]]: () => M[K][P]; }; }; query: { [K in keyof Q]: { [P in keyof Q[K]]: () => Q[K][P]; }; }; client: { [K in keyof C]: () => C[K]; }; }; declare type InternalRequestParams = { /** * The original client method being called. * Even though the rootField / operation can be changed, * this method stays as it is, as it's what the user's * code looks like */ clientMethod: string; /** * Name of js model that triggered the request. Might be used * for warnings or error messages */ jsModelName?: string; callsite?: CallSite; transaction?: PrismaPromiseTransaction; unpacker?: Unpacker; otelParentCtx?: Context; /** Used to "desugar" a user input into an "expanded" one */ argsMapper?: (args?: UserArgs_2) => UserArgs_2; /** Used to convert args for middleware and back */ middlewareArgsMapper?: MiddlewareArgsMapper; /** Used for Accelerate client extension via Data Proxy */ customDataProxyFetch?: AccelerateExtensionFetchDecorator; } & Omit; export { isAnyNull } export { isDbNull } export { isJsonNull } export { isObjectEnumValue } declare type IsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SNAPSHOT' | 'SERIALIZABLE'; declare type IsolationLevel_2 = 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Snapshot' | 'Serializable'; declare function isSkip(value: unknown): value is Skip; export declare function isTypedSql(value: unknown): value is UnknownTypedSql; export declare type ITXClientDenyList = (typeof denylist)[number]; export declare const itxClientDenyList: readonly (string | symbol)[]; declare type ItxScopeState = { stack: string[]; }; declare interface Job { resolve: (data: any) => void; reject: (data: any) => void; request: any; } export { join } declare type JoinExpression = { child: QueryPlanNode; on: [left: string, right: string][]; parentField: string; isRelationUnique: boolean; }; export declare type JsArgs = { select?: Selection_2; include?: Selection_2; omit?: Omission; [argName: string]: JsInputValue; }; export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | Skip | { [key: string]: JsInputValue; }; declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { [key: string]: JsonArgumentValue; }; /** * From https://github.com/sindresorhus/type-fest/ * Matches a JSON array. */ export declare interface JsonArray extends Array { } export declare type JsonBatchQuery = { batch: JsonQuery[]; transaction?: { isolationLevel?: IsolationLevel_2; }; }; export declare interface JsonConvertible { toJSON(): unknown; } declare type JsonFieldSelection = { arguments?: Record | RawTaggedValue; selection: JsonSelectionSet; }; export { JsonNull } export { JsonNullClass } /** * From https://github.com/sindresorhus/type-fest/ * Matches a JSON object. * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. */ export declare type JsonObject = { [Key in string]?: JsonValue; }; export declare type JsonQuery = { modelName?: string; action: JsonQueryAction_2; query: JsonFieldSelection; }; declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; declare type JsonQueryAction_2 = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'updateManyAndReturn' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; declare type JsonSelectionSet = { $scalars?: boolean; $composites?: boolean; } & { [fieldName: string]: boolean | JsonFieldSelection; }; /** * From https://github.com/sindresorhus/type-fest/ * Matches any valid JSON value. */ export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { [key: string]: JsOutputValue; }; export declare type JsPromise = Promise & {}; /** * A pointer from the current {@link Span} to another span in the same trace or * in a different trace. * Few examples of Link usage. * 1. Batch Processing: A batch of elements may contain elements associated * with one or more traces/spans. Since there can only be one parent * SpanContext, Link is used to keep reference to SpanContext of all * elements in the batch. * 2. Public Endpoint: A SpanContext in incoming client request on a public * endpoint is untrusted from service provider perspective. In such case it * is advisable to start a new trace with appropriate sampling decision. * However, it is desirable to associate incoming SpanContext to new trace * initiated on service provider side so two traces (from Client and from * Service Provider) can be correlated. */ declare interface Link { /** The {@link SpanContext} of a linked span. */ context: SpanContext; /** A set of {@link SpanAttributes} on the link. */ attributes?: SpanAttributes; /** Count of attributes of the link that were dropped due to collection limits */ droppedAttributesCount?: number; } declare type LocationInFile = { fileName: string; lineNumber: number | null; columnNumber: number | null; }; declare type LogDefinition = { level: LogLevel; emit: 'stdout' | 'event'; }; /** * Typings for the events we emit. * * @remarks * If this is updated, our edge runtime shim needs to be updated as well. */ declare type LogEmitter = { on(event: E, listener: (event: EngineEvent) => void): LogEmitter; emit(event: QueryEventType, payload: QueryEvent): boolean; emit(event: LogEventType, payload: LogEvent): boolean; }; declare type LogEvent = { timestamp: Date; message: string; target: string; }; declare type LogEventType = 'info' | 'warn' | 'error'; declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; /** * Generates more strict variant of an enum which, unlike regular enum, * throws on non-existing property access. This can be useful in following situations: * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input * - enum values are generated dynamically from DMMF. * * In that case, if using normal enums and no compile-time typechecking, using non-existing property * will result in `undefined` value being used, which will be accepted. Using strict enum * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. * * Note: if you need to check for existence of a value in the enum you can still use either * `in` operator or `hasOwnProperty` function. * * @param definition * @returns */ export declare function makeStrictEnum>(definition: T): T; export declare function makeTypedQueryFactory(sql: string): (...values: any[]) => TypedSql; declare type Mappings = ReadonlyDeep_2<{ modelOperations: ModelMapping[]; otherOperations: { read: string[]; write: string[]; }; }>; /** * Class that holds the list of all extensions, applied to particular instance, * as well as resolved versions of the components that need to apply on * different levels. Main idea of this class: avoid re-resolving as much of the * stuff as possible when new extensions are added while also delaying the * resolve until the point it is actually needed. For example, computed fields * of the model won't be resolved unless the model is actually queried. Neither * adding extensions with `client` component only cause other components to * recompute. */ declare class MergedExtensionsList { private head?; private constructor(); static empty(): MergedExtensionsList; static single(extension: ExtensionArgs): MergedExtensionsList; isEmpty(): boolean; append(extension: ExtensionArgs): MergedExtensionsList; getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; getAllClientExtensions(): ClientArg | undefined; getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; getAllQueryCallbacks(jsModelName: string, operation: string): any; getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; } export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; declare type MiddlewareArgsMapper = { requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; }; declare type Model = ReadonlyDeep_2<{ name: string; dbName: string | null; schema: string | null; fields: Field[]; uniqueFields: string[][]; uniqueIndexes: uniqueIndex[]; documentation?: string; primaryKey: PrimaryKey | null; isGenerated?: boolean; }>; declare enum ModelAction { findUnique = "findUnique", findUniqueOrThrow = "findUniqueOrThrow", findFirst = "findFirst", findFirstOrThrow = "findFirstOrThrow", findMany = "findMany", create = "create", createMany = "createMany", createManyAndReturn = "createManyAndReturn", update = "update", updateMany = "updateMany", updateManyAndReturn = "updateManyAndReturn", upsert = "upsert", delete = "delete", deleteMany = "deleteMany", groupBy = "groupBy", count = "count",// TODO: count does not actually exist in DMMF aggregate = "aggregate", findRaw = "findRaw", aggregateRaw = "aggregateRaw" } export declare type ModelArg = { [MethodName in string]: unknown; }; export declare type ModelArgs = { model: { [ModelName in string]: ModelArg; }; }; export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; declare type ModelMapping = ReadonlyDeep_2<{ model: string; plural: string; findUnique?: string | null; findUniqueOrThrow?: string | null; findFirst?: string | null; findFirstOrThrow?: string | null; findMany?: string | null; create?: string | null; createMany?: string | null; createManyAndReturn?: string | null; update?: string | null; updateMany?: string | null; updateManyAndReturn?: string | null; upsert?: string | null; delete?: string | null; deleteMany?: string | null; aggregate?: string | null; groupBy?: string | null; count?: string | null; findRaw?: string | null; aggregateRaw?: string | null; }>; export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; export declare type ModelQueryOptionsCbArgs = { model: string; operation: string; args: JsArgs; query: (args: JsArgs) => Promise; }; declare type MultiBatchResponse = { type: 'multi'; plans: QueryPlanNode[]; }; export declare type NameArgs = { name?: string; }; export declare type Narrow = { [K in keyof A]: A[K] extends Function ? A[K] : Narrow; } | (A extends Narrowable ? A : never); export declare type Narrowable = string | number | bigint | boolean | []; export declare type NeverToUnknown = [T] extends [never] ? unknown : T; export { NullTypes } export { ObjectEnumValue } declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-better-sqlite3", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-mssql", "@prisma/adapter-mariadb"]; export declare type Omission = Record; declare type Omit_2 = { [P in keyof T as P extends K ? never : P]: T[P]; }; export { Omit_2 as Omit } export declare type OmitValue = Key extends keyof Omit ? Omit[Key] : false; export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; export declare type OperationPayload = { name: string; scalars: { [ScalarName in string]: unknown; }; objects: { [ObjectName in string]: unknown; }; composites: { [CompositeName in string]: unknown; }; }; export declare type Optional = { [P in K & keyof O]?: O[P]; } & { [P in Exclude]: O[P]; }; export declare type OptionalFlat = { [K in keyof T]?: T[K]; }; export declare type OptionalKeys = { [K in keyof O]-?: {} extends Pick_2 ? K : never; }[keyof O]; declare type Options = { /** Timeout for starting the transaction */ maxWait?: number; /** Timeout for the transaction body */ timeout?: number; /** Transaction isolation level */ isolationLevel?: IsolationLevel_2; /** * Used for nested interactive transactions. When provided, the engine may * re-use an existing open transaction instead of opening a new one. */ newTxId?: string; }; export declare type Or = { 0: { 0: 0; 1: 1; }; 1: { 0: 1; 1: 1; }; }[A][B]; declare type OtherOperationMappings = ReadonlyDeep_2<{ read: string[]; write: string[]; }>; declare type OutputType = ReadonlyDeep_2<{ name: string; fields: SchemaField[]; }>; declare type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; declare type Pagination = { cursor: Record | null; take: number | null; skip: number | null; }; export declare function Param<$Type, $Value extends string>(name: $Value): Param<$Type, $Value>; export declare type Param = { readonly name: $Value; }; export declare type PatchFlat = O1 & Omit_2; export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; export declare type Payload = T extends { [K: symbol]: { types: { payload: any; }; }; } ? T[symbol]['types']['payload'] : any; export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; }; declare type Pick_2 = { [P in keyof T as P extends K ? P : never]: T[P]; }; export { Pick_2 as Pick } declare interface PlaceholderFormat { prefix: string; hasNumbering: boolean; } declare type PrimaryKey = ReadonlyDeep_2<{ name: string | null; fields: string[]; }>; export { PrismaClientInitializationError } export { PrismaClientKnownRequestError } /** * Since Prisma 7, a PrismaClient needs either an adapter or an accelerateUrl. * The two options are mutually exclusive. */ declare type PrismaClientMutuallyExclusiveOptions = { /** * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. */ adapter: SqlDriverAdapterFactory; accelerateUrl?: never; } | { /** * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. */ accelerateUrl: string; adapter?: never; }; export declare type PrismaClientOptions = PrismaClientMutuallyExclusiveOptions & { /** * @default "colorless" */ errorFormat?: ErrorFormat; /** * The default values for Transaction options * maxWait ?= 2000 * timeout ?= 5000 */ transactionOptions?: Transaction_2.Options; /** * @example * \`\`\` * // Defaults to stdout * log: ['query', 'info', 'warn'] * * // Emit as events * log: [ * { emit: 'stdout', level: 'query' }, * { emit: 'stdout', level: 'info' }, * { emit: 'stdout', level: 'warn' } * ] * \`\`\` * Read more in our [docs](https://pris.ly/d/logging). */ log?: Array; omit?: GlobalOmitOptions; /** * SQL commenter plugins that add metadata to SQL queries as comments. * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/ * * @example * ```ts * new PrismaClient({ * adapter: new PrismaPg({ connectionString }), * comments: [ * traceContext(), * queryInsights(), * ], * }) * ``` */ comments?: SqlCommenterPlugin[]; /** * Optional maximum size for the query plan cache. If not provided, a default size will be used. * A value of `0` can be used to disable the cache entirely. A higher cache size can improve * performance for applications that execute a large number of unique queries, while a smaller * cache size can reduce memory usage. * * @example * ``` * const prisma = new PrismaClient({ * adapter, * queryPlanCacheMaxSize: 100, * }) * ``` */ queryPlanCacheMaxSize?: number; /** * @internal * You probably don't want to use this. \`__internal\` is used by internal tooling. */ __internal?: { debug?: boolean; /** This can be used for testing purposes */ configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; }; }; export { PrismaClientRustPanicError } export { PrismaClientUnknownRequestError } export { PrismaClientValidationError } declare type PrismaOperationSpec = { args: TArgs; action: TAction; model: string; }; export declare interface PrismaPromise extends Promise { [Symbol.toStringTag]: 'PrismaPromise'; } /** * Prisma's `Promise` that is backwards-compatible. All additions on top of the * original `Promise` are optional so that it can be backwards-compatible. * @see [[createPrismaPromise]] */ declare interface PrismaPromise_2 = any> extends Promise { get spec(): TSpec; /** * Extension of the original `.then` function * @param onfulfilled same as regular promises * @param onrejected same as regular promises * @param transaction transaction options */ then(onfulfilled?: (value: TResult) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; /** * Extension of the original `.catch` function * @param onrejected same as regular promises * @param transaction transaction options */ catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; /** * Extension of the original `.finally` function * @param onfinally same as regular promises * @param transaction transaction options */ finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; /** * Called when executing a batch of regular tx * @param transaction transaction options for batch tx */ requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; } declare type PrismaPromiseBatchTransaction = { kind: 'batch'; id: number; isolationLevel?: IsolationLevel_2; maxWait?: number; timeout?: number; index: number; lock: PromiseLike; }; declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => Promise; /** * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which * is essentially a proxy for `Promise`. All the transaction-compatible client * methods return one, this allows for pre-preparing queries without executing * them until `.then` is called. It's the foundation of Prisma's query batching. * @param callback that will be wrapped within our promise implementation * @see [[PrismaPromise]] * @returns */ declare type PrismaPromiseFactory = >(callback: PrismaPromiseCallback, op?: T) => PrismaPromise_2; declare type PrismaPromiseInteractiveTransaction = { kind: 'itx'; id: string; payload: PayloadType; }; declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; declare type PrismaValue = string | boolean | number | PrismaValue[] | null | Record | PrismaValuePlaceholder | PrismaValueGenerator; declare type PrismaValueGenerator = { prisma__type: 'generatorCall'; prisma__value: { name: string; args: PrismaValue[]; }; }; declare type PrismaValuePlaceholder = { prisma__type: 'param'; prisma__value: { name: string; type: string; }; }; export declare const PrivateResultType: unique symbol; declare type Provider = 'mysql' | 'postgres' | 'sqlite' | 'sqlserver'; declare namespace Public { export { validator } } export { Public } declare namespace Public_2 { export { Args, Result, Payload, PrismaPromise, Operation, Exact } } declare type Query = ReadonlyDeep_2<{ name: string; args: SchemaArg[]; output: QueryOutput; }>; declare interface Queryable extends AdapterInfo { /** * Execute a query and return its result. */ queryRaw(params: Query): Promise; /** * Execute a query and return the number of affected rows. */ executeRaw(params: Query): Promise; } declare type QueryCompiler = { compile(request: string): QueryPlanNode; compileBatch(batchRequest: string): BatchResponse; free(): void; }; declare interface QueryCompilerConstructor { new (options: QueryCompilerOptions): QueryCompiler; } declare type QueryCompilerOptions = { datamodel: string; provider: Provider; connectionInfo: ConnectionInfo; }; declare type QueryEngineResultData = { data: T; }; declare type QueryEvent = { timestamp: Date; query: string; params: string; duration: number; target: string; }; declare type QueryEventType = 'query'; declare type QueryIntrospectionBuiltinType = 'int' | 'bigint' | 'float' | 'double' | 'string' | 'enum' | 'bytes' | 'bool' | 'char' | 'decimal' | 'json' | 'xml' | 'uuid' | 'datetime' | 'date' | 'time' | 'int-array' | 'bigint-array' | 'float-array' | 'double-array' | 'string-array' | 'char-array' | 'bytes-array' | 'bool-array' | 'decimal-array' | 'json-array' | 'xml-array' | 'uuid-array' | 'datetime-array' | 'date-array' | 'time-array' | 'null' | 'unknown'; declare type QueryMiddlewareParams = { /** The model this is executed on */ model?: string; /** The action that is being handled */ action: Action; /** TODO what is this */ dataPath: string[]; /** TODO what is this */ runInTransaction: boolean; args?: UserArgs_2; }; export declare type QueryOptions = { query: { [ModelName in string]: { [ModelAction in string]: ModelQueryOptionsCb; } | QueryOptionsCb; }; }; export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; export declare type QueryOptionsCbArgs = { model?: string; operation: string; args: JsArgs | RawQueryArgs; query: (args: JsArgs | RawQueryArgs) => Promise; }; declare type QueryOutput = ReadonlyDeep_2<{ name: string; isRequired: boolean; isList: boolean; }>; declare type QueryPlanBinding = { name: string; expr: QueryPlanNode; }; declare type QueryPlanDbQuery = { type: 'rawSql'; sql: string; args: PrismaValue[]; argTypes: ArgType[]; } | { type: 'templateSql'; fragments: Fragment[]; placeholderFormat: PlaceholderFormat; args: PrismaValue[]; argTypes: DynamicArgType[]; chunkable: boolean; }; declare type QueryPlanNode = { type: 'value'; args: PrismaValue; } | { type: 'seq'; args: QueryPlanNode[]; } | { type: 'get'; args: { name: string; }; } | { type: 'let'; args: { bindings: QueryPlanBinding[]; expr: QueryPlanNode; }; } | { type: 'getFirstNonEmpty'; args: { names: string[]; }; } | { type: 'query'; args: QueryPlanDbQuery; } | { type: 'execute'; args: QueryPlanDbQuery; } | { type: 'reverse'; args: QueryPlanNode; } | { type: 'sum'; args: QueryPlanNode[]; } | { type: 'concat'; args: QueryPlanNode[]; } | { type: 'unique'; args: QueryPlanNode; } | { type: 'required'; args: QueryPlanNode; } | { type: 'join'; args: { parent: QueryPlanNode; children: JoinExpression[]; canAssumeStrictEquality: boolean; }; } | { type: 'mapField'; args: { field: string; records: QueryPlanNode; }; } | { type: 'transaction'; args: QueryPlanNode; } | { type: 'dataMap'; args: { expr: QueryPlanNode; structure: ResultNode; enums: Record>; }; } | { type: 'validate'; args: { expr: QueryPlanNode; rules: DataRule[]; } & ValidationError; } | { type: 'if'; args: { value: QueryPlanNode; rule: DataRule; then: QueryPlanNode; else: QueryPlanNode; }; } | { type: 'unit'; } | { type: 'diff'; args: { from: QueryPlanNode; to: QueryPlanNode; fields: string[]; }; } | { type: 'initializeRecord'; args: { expr: QueryPlanNode; fields: Record; }; } | { type: 'mapRecord'; args: { expr: QueryPlanNode; fields: Record; }; } | { type: 'process'; args: { expr: QueryPlanNode; operations: InMemoryOps; }; }; export { raw } export declare type RawParameters = { __prismaRawParameters__: true; values: string; }; export declare type RawQueryArgs = Sql | UnknownTypedSql | [query: string, ...values: RawValue[]]; declare type RawResponse = { columns: string[]; types: QueryIntrospectionBuiltinType[]; rows: unknown[][]; }; declare type RawTaggedValue = { $type: 'Raw'; value: unknown; }; export { RawValue } export declare type ReadonlyDeep = { readonly [K in keyof T]: ReadonlyDeep; }; declare type ReadonlyDeep_2 = { +readonly [K in keyof O]: ReadonlyDeep_2; }; declare type Record_2 = { [P in T]: U; }; export { Record_2 as Record } export declare type RenameAndNestPayloadKeys

= { [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; }; declare type RequestBatchOptions = { transaction?: TransactionOptions_2; traceparent?: string; numTry?: number; containsWrite: boolean; customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare class RequestHandler { client: Client; dataloader: DataLoader; private logEmitter?; constructor(client: Client, logEmitter?: LogEmitter); request(params: RequestParams): Promise; mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResultData): any; /** * Handles the error and logs it, logging the error is done synchronously waiting for the event * handlers to finish. */ handleAndLogRequestError(params: HandleErrorParams): never; handleRequestError({ error, clientMethod, callsite, transaction, args, modelName, globalOmit, }: HandleErrorParams): never; sanitizeMessage(message: any): any; unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; get [Symbol.toStringTag](): string; } declare type RequestOptions = { traceparent?: string; numTry?: number; interactiveTransaction?: InteractiveTransactionOptions; isWrite: boolean; customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare type RequestParams = { modelName?: string; action: Action; protocolQuery: JsonQuery; dataPath: string[]; clientMethod: string; callsite?: CallSite; transaction?: PrismaPromiseTransaction; extensions: MergedExtensionsList; args?: any; headers?: Record; unpacker?: Unpacker; otelParentCtx?: Context; otelChildCtx?: Context; globalOmit?: GlobalOmitOptions; customDataProxyFetch?: AccelerateExtensionFetchDecorator; }; declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; export { RequiredExtensionArgs } export { RequiredExtensionArgs as UserArgs } export declare type RequiredKeys = { [K in keyof O]-?: {} extends Pick_2 ? never : K; }[keyof O]; export declare type Result = T extends { [K: symbol]: { types: { payload: any; }; }; } ? GetResult : GetResult<{ composites: {}; objects: {}; scalars: {}; name: ''; }, {}, F>; export declare type Result_2 = Result; declare namespace Result_3 { export { Count, GetFindResult, SelectablePayloadFields, SelectField, DefaultSelection, UnwrapPayload, ApplyOmit, OmitValue, GetCountResult, Aggregate, GetAggregateResult, GetBatchResult, GetGroupByResult, GetResult, ExtractGlobalOmit } } export declare type ResultArg = { [FieldName in string]: ResultFieldDefinition; }; export declare type ResultArgs = { result: { [ModelName in string]: ResultArg; }; }; export declare type ResultArgsFieldCompute = (model: any) => unknown; export declare type ResultFieldDefinition = { needs?: { [FieldName in string]: boolean; }; compute: ResultArgsFieldCompute; }; declare type ResultNode = { type: 'affectedRows'; } | { type: 'object'; fields: Record; serializedName: string | null; skipNulls: boolean; } | { type: 'field'; dbName: string; fieldType: FieldType; }; export declare type Return = T extends (...args: any[]) => infer R ? R : T; export declare type RuntimeDataModel = { readonly models: Record; readonly enums: Record; readonly types: Record; }; declare type RuntimeEnum = Omit; declare type RuntimeModel = Omit; declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | ''; declare type Schema = ReadonlyDeep_2<{ rootQueryType?: string; rootMutationType?: string; inputObjectTypes: { model?: InputType[]; prisma?: InputType[]; }; outputObjectTypes: { model: OutputType[]; prisma: OutputType[]; }; enumTypes: { model?: SchemaEnum[]; prisma: SchemaEnum[]; }; fieldRefTypes: { prisma?: FieldRefType[]; }; }>; declare type SchemaArg = ReadonlyDeep_2<{ name: string; comment?: string; isNullable: boolean; isRequired: boolean; inputTypes: InputTypeRef[]; isParameterizable: boolean; requiresOtherFields?: string[]; deprecation?: Deprecation; }>; declare type SchemaEnum = ReadonlyDeep_2<{ name: string; values: string[]; }>; declare type SchemaField = ReadonlyDeep_2<{ name: string; isNullable?: boolean; outputType: OutputTypeRef; args: SchemaArg[]; deprecation?: Deprecation; documentation?: string; }>; export declare type Select = T extends U ? T : never; export declare type SelectablePayloadFields = { objects: { [k in K]: O; }; } | { composites: { [k in K]: O; }; }; export declare type SelectField

, K extends PropertyKey> = P extends { objects: Record; } ? P['objects'][K] : P extends { composites: Record; } ? P['composites'][K] : never; declare type Selection_2 = Record; export { Selection_2 as Selection } /** * Serialized format stored in the generated client. */ declare interface SerializedParamGraph { /** String table (field names, enum names, root keys) */ strings: string[]; /** Base64url-encoded binary blob for structural data */ graph: string; } export declare function serializeJsonQuery({ modelName, action, args, runtimeDataModel, extensions, callsite, clientMethod, errorFormat, clientVersion, previewFeatures, globalOmit, wrapRawValues, }: SerializeParams): JsonQuery; declare type SerializeParams = { runtimeDataModel: RuntimeDataModel; modelName?: string; action: Action; args?: JsArgs; extensions?: MergedExtensionsList; callsite?: CallSite; clientMethod: string; clientVersion: string; errorFormat: ErrorFormat; previewFeatures: string[]; globalOmit?: GlobalOmitOptions; wrapRawValues?: boolean; }; declare class Skip { constructor(param?: symbol); ifUndefined(value: T | undefined): T | Skip; } export declare const skip: Skip; declare type SortOrder = 'asc' | 'desc'; /** * An interface that represents a span. A span represents a single operation * within a trace. Examples of span might include remote procedure calls or a * in-process function calls to sub-components. A Trace has a single, top-level * "root" Span that in turn may have zero or more child Spans, which in turn * may have children. * * Spans are created by the {@link Tracer.startSpan} method. */ declare interface Span { /** * Returns the {@link SpanContext} object associated with this Span. * * Get an immutable, serializable identifier for this span that can be used * to create new child spans. Returned SpanContext is usable even after the * span ends. * * @returns the SpanContext object associated with this Span. */ spanContext(): SpanContext; /** * Sets an attribute to the span. * * Sets a single Attribute with the key and value passed as arguments. * * @param key the key for this attribute. * @param value the value for this attribute. Setting a value null or * undefined is invalid and will result in undefined behavior. */ setAttribute(key: string, value: SpanAttributeValue): this; /** * Sets attributes to the span. * * @param attributes the attributes that will be added. * null or undefined attribute values * are invalid and will result in undefined behavior. */ setAttributes(attributes: SpanAttributes): this; /** * Adds an event to the Span. * * @param name the name of the event. * @param [attributesOrStartTime] the attributes that will be added; these are * associated with this event. Can be also a start time * if type is {@type TimeInput} and 3rd param is undefined * @param [startTime] start time of the event. */ addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; /** * Adds a single link to the span. * * Links added after the creation will not affect the sampling decision. * It is preferred span links be added at span creation. * * @param link the link to add. */ addLink(link: Link): this; /** * Adds multiple links to the span. * * Links added after the creation will not affect the sampling decision. * It is preferred span links be added at span creation. * * @param links the links to add. */ addLinks(links: Link[]): this; /** * Sets a status to the span. If used, this will override the default Span * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value * of previous calls to SetStatus on the Span. * * @param status the SpanStatus to set. */ setStatus(status: SpanStatus): this; /** * Updates the Span name. * * This will override the name provided via {@link Tracer.startSpan}. * * Upon this update, any sampling behavior based on Span name will depend on * the implementation. * * @param name the Span name. */ updateName(name: string): this; /** * Marks the end of Span execution. * * Call to End of a Span MUST not have any effects on child spans. Those may * still be running and can be ended later. * * Do not return `this`. The Span generally should not be used after it * is ended so chaining is not desired in this context. * * @param [endTime] the time to set as Span's end time. If not provided, * use the current time as the span's end time. */ end(endTime?: TimeInput): void; /** * Returns the flag whether this span will be recorded. * * @returns true if this Span is active and recording information like events * with the `AddEvent` operation and attributes using `setAttributes`. */ isRecording(): boolean; /** * Sets exception as a span event * @param exception the exception the only accepted values are string or Error * @param [time] the time to set as Span's event time. If not provided, * use the current time. */ recordException(exception: Exception, time?: TimeInput): void; } /** * @deprecated please use {@link Attributes} */ declare type SpanAttributes = Attributes; /** * @deprecated please use {@link AttributeValue} */ declare type SpanAttributeValue = AttributeValue; declare type SpanCallback = (span?: Span, context?: Context) => R; /** * A SpanContext represents the portion of a {@link Span} which must be * serialized and propagated along side of a {@link Baggage}. */ declare interface SpanContext { /** * The ID of the trace that this span belongs to. It is worldwide unique * with practically sufficient probability by being made as 16 randomly * generated bytes, encoded as a 32 lowercase hex characters corresponding to * 128 bits. */ traceId: string; /** * The ID of the Span. It is globally unique with practically sufficient * probability by being made as 8 randomly generated bytes, encoded as a 16 * lowercase hex characters corresponding to 64 bits. */ spanId: string; /** * Only true if the SpanContext was propagated from a remote parent. */ isRemote?: boolean; /** * Trace flags to propagate. * * It is represented as 1 byte (bitmap). Bit to represent whether trace is * sampled or not. When set, the least significant bit documents that the * caller may have recorded trace data. A caller who does not record trace * data out-of-band leaves this flag unset. * * see {@link TraceFlags} for valid flag values. */ traceFlags: number; /** * Tracing-system-specific info to propagate. * * The tracestate field value is a `list` as defined below. The `list` is a * series of `list-members` separated by commas `,`, and a list-member is a * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs * surrounding `list-members` are ignored. There can be a maximum of 32 * `list-members` in a `list`. * More Info: https://www.w3.org/TR/trace-context/#tracestate-field * * Examples: * Single tracing system (generic format): * tracestate: rojo=00f067aa0ba902b7 * Multiple tracing systems (with different formatting): * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE */ traceState?: TraceState; } declare enum SpanKind { /** Default value. Indicates that the span is used internally. */ INTERNAL = 0, /** * Indicates that the span covers server-side handling of an RPC or other * remote request. */ SERVER = 1, /** * Indicates that the span covers the client-side wrapper around an RPC or * other remote request. */ CLIENT = 2, /** * Indicates that the span describes producer sending a message to a * broker. Unlike client and server, there is no direct critical path latency * relationship between producer and consumer spans. */ PRODUCER = 3, /** * Indicates that the span describes consumer receiving a message from a * broker. Unlike client and server, there is no direct critical path latency * relationship between producer and consumer spans. */ CONSUMER = 4 } /** * Options needed for span creation */ declare interface SpanOptions { /** * The SpanKind of a span * @default {@link SpanKind.INTERNAL} */ kind?: SpanKind; /** A span's attributes */ attributes?: SpanAttributes; /** {@link Link}s span to other spans */ links?: Link[]; /** A manually specified start time for the created `Span` object. */ startTime?: TimeInput; /** The new span should be a root span. (Ignore parent from context). */ root?: boolean; } declare interface SpanStatus { /** The status code of this message. */ code: SpanStatusCode; /** A developer-facing error message. */ message?: string; } /** * An enumeration of status codes. */ declare enum SpanStatusCode { /** * The default status. */ UNSET = 0, /** * The operation has been validated by an Application developer or * Operator to have completed successfully. */ OK = 1, /** * The operation contains an error. */ ERROR = 2 } export { Sql } /** * Information about a compacted batch query (e.g. multiple independent * `findUnique` queries automatically merged into a single `SELECT` SQL * statement). */ declare interface SqlCommenterCompactedQueryInfo { /** * The model name (e.g., "User", "Post"). */ readonly modelName: string; /** * The Prisma operation (e.g., "findUnique"). */ readonly action: SqlCommenterQueryAction; /** * The full query objects (selections, arguments, etc.). * Specifics of the query representation are not part of the public API yet. */ readonly queries: ReadonlyArray; } /** * Context provided to SQL commenter plugins. */ export declare interface SqlCommenterContext { /** * Information about the Prisma query being executed. */ readonly query: SqlCommenterQueryInfo; /** * Raw SQL query generated from this Prisma query. * * It is always available when `PrismaClient` connects to the database and * renders SQL queries directly. * * When using Prisma Accelerate, SQL rendering happens on Accelerate side and the raw * SQL strings are not yet available when SQL commenter plugins are executed. */ readonly sql?: string; } /** * A SQL commenter plugin that returns key-value pairs to be added as comments. * Return an empty object to add no comments. Keys with undefined values will be omitted. * * @example * ```ts * const myPlugin: SqlCommenterPlugin = (context) => { * return { * application: 'my-app', * model: context.query.modelName ?? 'raw', * // Conditional key - will be omitted if ctx.sql is undefined * sqlLength: context.sql ? String(context.sql.length) : undefined, * } * } * ``` */ export declare interface SqlCommenterPlugin { (context: SqlCommenterContext): SqlCommenterTags; } /** * Prisma query type corresponding to this SQL query. */ declare type SqlCommenterQueryAction = JsonQueryAction; /** * Information about the query or queries being executed. * * - `single`: A single query is being executed * - `compacted`: Multiple queries have been compacted into a single SQL statement */ export declare type SqlCommenterQueryInfo = ({ readonly type: 'single'; } & SqlCommenterSingleQueryInfo) | ({ readonly type: 'compacted'; } & SqlCommenterCompactedQueryInfo); /** * Information about a single Prisma query. */ export declare interface SqlCommenterSingleQueryInfo { /** * The model name (e.g., "User", "Post"). Undefined for raw queries. */ readonly modelName?: string; /** * The Prisma operation (e.g., "findMany", "createOne", "queryRaw"). */ readonly action: SqlCommenterQueryAction; /** * The full query object (selection, arguments, etc.). * Specifics of the query representation are not part of the public API yet. */ readonly query: unknown; } /** * Key-value pairs to add as SQL comments. * Keys with undefined values will be omitted from the final comment. */ export declare type SqlCommenterTags = { readonly [key: string]: string | undefined; }; declare interface SqlDriverAdapter extends SqlQueryable { /** * Execute multiple SQL statements separated by semicolon. */ executeScript(script: string): Promise; /** * Start new transaction. */ startTransaction(isolationLevel?: IsolationLevel): Promise; /** * Optional method that returns extra connection info */ getConnectionInfo?(): ConnectionInfo; /** * Dispose of the connection and release any resources. */ dispose(): Promise; } export declare interface SqlDriverAdapterFactory extends DriverAdapterFactory { connect(): Promise; } declare type SqlQuery = { sql: string; args: Array; argTypes: Array; }; declare interface SqlQueryable extends Queryable { } declare interface SqlResultSet { /** * List of column types appearing in a database query, in the same order as `columnNames`. * They are used within the Query Engine to convert values from JS to Quaint values. */ columnTypes: Array; /** * List of column names appearing in a database query, in the same order as `columnTypes`. */ columnNames: Array; /** * List of rows retrieved from a database query. * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. */ rows: Array>; /** * The last ID of an `INSERT` statement, if any. * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. */ lastInsertId?: string; } export { sqltag } /** * Defines TimeInput. * * hrtime, epoch milliseconds, performance.now() or Date */ declare type TimeInput = HrTime_2 | number | Date; export declare type ToTuple = T extends any[] ? T : [T]; declare interface TraceState { /** * Create a new TraceState which inherits from this TraceState and has the * given key set. * The new entry will always be added in the front of the list of states. * * @param key key of the TraceState entry. * @param value value of the TraceState entry. */ set(key: string, value: string): TraceState; /** * Return a new TraceState which inherits from this TraceState but does not * contain the given key. * * @param key the key for the TraceState entry to be removed. */ unset(key: string): TraceState; /** * Returns the value to which the specified key is mapped, or `undefined` if * this map contains no mapping for the key. * * @param key with which the specified value is to be associated. * @returns the value to which the specified key is mapped, or `undefined` if * this map contains no mapping for the key. */ get(key: string): string | undefined; /** * Serializes the TraceState to a `list` as defined below. The `list` is a * series of `list-members` separated by commas `,`, and a list-member is a * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs * surrounding `list-members` are ignored. There can be a maximum of 32 * `list-members` in a `list`. * * @returns the serialized string. */ serialize(): string; } declare interface TracingHelper { isEnabled(): boolean; getTraceParent(context?: Context): string; dispatchEngineSpans(spans: EngineSpan[]): void; getActiveContext(): Context | undefined; runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; } declare interface Transaction extends AdapterInfo, SqlQueryable { /** * Transaction options. */ readonly options: TransactionOptions; /** * Commit the transaction. */ commit(): Promise; /** * Roll back the transaction. */ rollback(): Promise; /** * Creates a savepoint within the currently running transaction. */ createSavepoint?(name: string): Promise; /** * Rolls back transaction state to a previously created savepoint. */ rollbackToSavepoint?(name: string): Promise; /** * Releases a previously created savepoint. Optional because not every connector supports this operation. */ releaseSavepoint?(name: string): Promise; } declare namespace Transaction_2 { export { IsolationLevel_2 as IsolationLevel, Options, InteractiveTransactionInfo, TransactionHeaders } } declare type TransactionHeaders = { traceparent?: string; }; declare type TransactionOptions = { usePhantomQuery: boolean; }; declare type TransactionOptions_2 = { kind: 'itx'; options: InteractiveTransactionOptions; } | { kind: 'batch'; options: BatchTransactionOptions; }; export declare class TypedSql { [PrivateResultType]: Result; constructor(sql: string, values: Values); get sql(): string; get values(): Values; } export declare type TypeMapCbDef = Fn<{ extArgs: InternalArgs; }, TypeMapDef>; /** Shared */ export declare type TypeMapDef = Record; declare type TypeRef = { isList: boolean; type: string; location: AllowedLocations; namespace?: FieldNamespace; }; declare namespace Types { export { Result_3 as Result, Extensions_2 as Extensions, Utils, Public_2 as Public, isSkip, Skip, skip, UnknownTypedSql, OperationPayload as Payload } } export { Types } declare type uniqueIndex = ReadonlyDeep_2<{ name: string; fields: string[]; }>; export declare type UnknownTypedSql = TypedSql; declare type Unpacker = (data: any) => any; export declare type UnwrapPayload

= {} extends P ? unknown : { [K in keyof P]: P[K] extends { scalars: infer S; composites: infer C; }[] ? Array> : P[K] extends { scalars: infer S; composites: infer C; } | null ? S & UnwrapPayload | Select : never; }; export declare type UnwrapPromise

= P extends Promise ? R : P; export declare type UnwrapTuple = { [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; }; /** * Input that flows from the user into the Client. */ declare type UserArgs_2 = any; declare namespace Utils { export { EmptyToUnknown, NeverToUnknown, PatchFlat, Omit_2 as Omit, Pick_2 as Pick, ComputeDeep, Compute, OptionalFlat, ReadonlyDeep, Narrowable, Narrow, Exact, Cast, Record_2 as Record, UnwrapPromise, UnwrapTuple, Path, Fn, Call, RequiredKeys, OptionalKeys, Optional, Return, ToTuple, RenameAndNestPayloadKeys, PayloadToResult, Select, Equals, Or, JsPromise } } declare type ValidationError = { errorIdentifier: 'RELATION_VIOLATION'; context: { relation: string; modelA: string; modelB: string; }; } | { errorIdentifier: 'MISSING_RELATED_RECORD'; context: { model: string; relation: string; relationType: string; operation: string; neededFor?: string; }; } | { errorIdentifier: 'MISSING_RECORD'; context: { operation: string; }; } | { errorIdentifier: 'INCOMPLETE_CONNECT_INPUT'; context: { expectedRows: number; }; } | { errorIdentifier: 'INCOMPLETE_CONNECT_OUTPUT'; context: { expectedRows: number; relation: string; relationType: string; }; } | { errorIdentifier: 'RECORDS_NOT_CONNECTED'; context: { relation: string; parent: string; child: string; }; }; declare function validator(): (select: Exact) => S; declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; export { Value } export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; export { }