prisma
Version:
Prisma is an open-source database toolkit. It includes a JavaScript/TypeScript ORM for Node.js, migrations and a modern GUI to view and edit the data in your database. You can use Prisma in new projects or add it to an existing one.
1,481 lines (1,260 loc) • 130 kB
TypeScript
/**
* @param this
*/
declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client;
declare type AccelerateEngineConfig = {
inlineSchema: EngineConfig['inlineSchema'];
inlineSchemaHash: EngineConfig['inlineSchemaHash'];
env: EngineConfig['env'];
generator?: {
previewFeatures: string[];
};
inlineDatasources: EngineConfig['inlineDatasources'];
overrideDatasources: EngineConfig['overrideDatasources'];
clientVersion: EngineConfig['clientVersion'];
engineVersion: EngineConfig['engineVersion'];
logEmitter: EngineConfig['logEmitter'];
logQueries?: EngineConfig['logQueries'];
logLevel?: EngineConfig['logLevel'];
tracingHelper: EngineConfig['tracingHelper'];
accelerateUtils?: AccelerateUtils;
};
/**
* 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<string, string>;
}) => Promise<unknown>;
declare type AccelerateExtensionFetchDecorator = (fetch: AccelerateExtensionFetch) => AccelerateExtensionFetch;
declare type AccelerateUtils = EngineConfig['accelerateUtils'];
export declare type Action = keyof typeof DMMF_2.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw';
declare type ActiveConnectorType = Exclude<ConnectorType, 'postgres' | 'prisma+postgres'>;
/**
* 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<TypeMap extends TypeMapDef, Args extends Record<string, any>, K extends PropertyKey> = Args extends {
[P in K]: {
$allModels: infer AllModels;
};
} ? {
[P in K]: Record<TypeMap['meta']['modelProps'], AllModels>;
} : {};
declare class AnyNull extends NullTypesEnumValue {
#private;
}
export declare type ApplyOmit<T, OmitConfig> = Compute<{
[K in keyof T as OmitValue<OmitConfig, K> extends true ? never : K]: T[K];
}>;
export declare type Args<T, F extends Operation> = T extends {
[K: symbol]: {
types: {
operations: {
[K in F]: {
args: any;
};
};
};
};
} ? T[symbol]['types']['operations'][F]['args'] : any;
export declare type Args_3<T, F extends Operation> = Args<T, F>;
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<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
export declare type BaseDMMF = {
readonly datamodel: Omit<DMMF_2.Datamodel, 'indexes'>;
};
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<T> = QueryEngineResultData<T> | Error;
declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise<any>;
declare type BatchQueryOptionsCbArgs = {
args: BatchArgs;
query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise<unknown[]>;
__internalParams: BatchInternalParams;
};
declare type BatchResponse = MultiBatchResponse | CompactedBatchResponse;
declare type BatchTransactionOptions = {
isolationLevel?: Transaction_2.IsolationLevel;
};
declare interface BinaryTargetsEnvValue {
fromEnvVar: string | null;
value: string;
native?: boolean;
}
export declare type Call<F extends Fn, P> = (F & {
params: P;
})['returns'];
declare interface CallSite {
getLocation(): LocationInFile | null;
}
export declare type Cast<A, W> = A extends W ? A : W;
declare type Client = ReturnType<typeof getPrismaClient> extends new () => infer T ? T : never;
export declare type ClientArg = {
[MethodName in string]: unknown;
};
export declare type ClientArgs = {
client: ClientArg;
};
export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin<never, never, never>;
export declare type ClientOptionDef = undefined | {
[K in string]: any;
};
export declare type ClientOtherOps = {
$queryRaw<T = unknown>(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<T>;
$queryRawTyped<T>(query: TypedSql<unknown[], T>): PrismaPromise<T[]>;
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): PrismaPromise<T>;
$executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise<number>;
$executeRawUnsafe(query: string, ...values: any[]): PrismaPromise<number>;
$runCommandRaw(command: InputJsonObject): PrismaPromise<JsonObject>;
};
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<string, {}>[];
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<unknown>;
};
export declare type Compute<T> = T extends Function ? T : {
[K in keyof T]: T[K];
} & unknown;
export declare type ComputeDeep<T> = T extends Function ? T : {
[K in keyof T]: ComputeDeep<T[K]>;
} & 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> = 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<O> = {
[K in keyof O]: Count<number>;
} & {};
export declare function createParam(name: string): Param<unknown, string>;
declare class DataLoader<T = unknown> {
private options;
batches: {
[key: string]: Job[];
};
private tickActive;
constructor(options: DataLoaderOptions<T>);
request(request: T): Promise<any>;
private dispatchBatches;
get [Symbol.toStringTag](): string;
}
declare type DataLoaderOptions<T> = {
singleLoader: (request: T) => Promise<any>;
batchLoader: (request: T[]) => Promise<any[]>;
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';
};
declare type Datasource = {
url?: string;
};
declare type Datasources = {
[name in string]: Datasource;
};
declare class DbNull extends NullTypesEnumValue {
#private;
}
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 declare function Decimal(n: Decimal.Value): Decimal;
export declare namespace Decimal {
export type Constructor = typeof Decimal;
export type Instance = Decimal;
export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
export type Modulo = Rounding | 9;
export type Value = string | number | Decimal;
// http://mikemcl.github.io/decimal.js/#constructor-properties
export interface Config {
precision?: number;
rounding?: Rounding;
toExpNeg?: number;
toExpPos?: number;
minE?: number;
maxE?: number;
crypto?: boolean;
modulo?: Modulo;
defaults?: boolean;
}
}
export declare class Decimal {
readonly d: number[];
readonly e: number;
readonly s: number;
constructor(n: Decimal.Value);
absoluteValue(): Decimal;
abs(): Decimal;
ceil(): Decimal;
clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
comparedTo(n: Decimal.Value): number;
cmp(n: Decimal.Value): number;
cosine(): Decimal;
cos(): Decimal;
cubeRoot(): Decimal;
cbrt(): Decimal;
decimalPlaces(): number;
dp(): number;
dividedBy(n: Decimal.Value): Decimal;
div(n: Decimal.Value): Decimal;
dividedToIntegerBy(n: Decimal.Value): Decimal;
divToInt(n: Decimal.Value): Decimal;
equals(n: Decimal.Value): boolean;
eq(n: Decimal.Value): boolean;
floor(): Decimal;
greaterThan(n: Decimal.Value): boolean;
gt(n: Decimal.Value): boolean;
greaterThanOrEqualTo(n: Decimal.Value): boolean;
gte(n: Decimal.Value): boolean;
hyperbolicCosine(): Decimal;
cosh(): Decimal;
hyperbolicSine(): Decimal;
sinh(): Decimal;
hyperbolicTangent(): Decimal;
tanh(): Decimal;
inverseCosine(): Decimal;
acos(): Decimal;
inverseHyperbolicCosine(): Decimal;
acosh(): Decimal;
inverseHyperbolicSine(): Decimal;
asinh(): Decimal;
inverseHyperbolicTangent(): Decimal;
atanh(): Decimal;
inverseSine(): Decimal;
asin(): Decimal;
inverseTangent(): Decimal;
atan(): Decimal;
isFinite(): boolean;
isInteger(): boolean;
isInt(): boolean;
isNaN(): boolean;
isNegative(): boolean;
isNeg(): boolean;
isPositive(): boolean;
isPos(): boolean;
isZero(): boolean;
lessThan(n: Decimal.Value): boolean;
lt(n: Decimal.Value): boolean;
lessThanOrEqualTo(n: Decimal.Value): boolean;
lte(n: Decimal.Value): boolean;
logarithm(n?: Decimal.Value): Decimal;
log(n?: Decimal.Value): Decimal;
minus(n: Decimal.Value): Decimal;
sub(n: Decimal.Value): Decimal;
modulo(n: Decimal.Value): Decimal;
mod(n: Decimal.Value): Decimal;
naturalExponential(): Decimal;
exp(): Decimal;
naturalLogarithm(): Decimal;
ln(): Decimal;
negated(): Decimal;
neg(): Decimal;
plus(n: Decimal.Value): Decimal;
add(n: Decimal.Value): Decimal;
precision(includeZeros?: boolean): number;
sd(includeZeros?: boolean): number;
round(): Decimal;
sine() : Decimal;
sin() : Decimal;
squareRoot(): Decimal;
sqrt(): Decimal;
tangent() : Decimal;
tan() : Decimal;
times(n: Decimal.Value): Decimal;
mul(n: Decimal.Value) : Decimal;
toBinary(significantDigits?: number): string;
toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
toDecimalPlaces(decimalPlaces?: number): Decimal;
toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
toDP(decimalPlaces?: number): Decimal;
toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
toExponential(decimalPlaces?: number): string;
toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
toFixed(decimalPlaces?: number): string;
toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
toFraction(max_denominator?: Decimal.Value): Decimal[];
toHexadecimal(significantDigits?: number): string;
toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
toHex(significantDigits?: number): string;
toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
toJSON(): string;
toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
toNumber(): number;
toOctal(significantDigits?: number): string;
toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
toPower(n: Decimal.Value): Decimal;
pow(n: Decimal.Value): Decimal;
toPrecision(significantDigits?: number): string;
toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
toSignificantDigits(significantDigits?: number): Decimal;
toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
toSD(significantDigits?: number): Decimal;
toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
toString(): string;
truncated(): Decimal;
trunc(): Decimal;
valueOf(): string;
static abs(n: Decimal.Value): Decimal;
static acos(n: Decimal.Value): Decimal;
static acosh(n: Decimal.Value): Decimal;
static add(x: Decimal.Value, y: Decimal.Value): Decimal;
static asin(n: Decimal.Value): Decimal;
static asinh(n: Decimal.Value): Decimal;
static atan(n: Decimal.Value): Decimal;
static atanh(n: Decimal.Value): Decimal;
static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
static cbrt(n: Decimal.Value): Decimal;
static ceil(n: Decimal.Value): Decimal;
static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
static clone(object?: Decimal.Config): Decimal.Constructor;
static config(object: Decimal.Config): Decimal.Constructor;
static cos(n: Decimal.Value): Decimal;
static cosh(n: Decimal.Value): Decimal;
static div(x: Decimal.Value, y: Decimal.Value): Decimal;
static exp(n: Decimal.Value): Decimal;
static floor(n: Decimal.Value): Decimal;
static hypot(...n: Decimal.Value[]): Decimal;
static isDecimal(object: any): object is Decimal;
static ln(n: Decimal.Value): Decimal;
static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
static log2(n: Decimal.Value): Decimal;
static log10(n: Decimal.Value): Decimal;
static max(...n: Decimal.Value[]): Decimal;
static min(...n: Decimal.Value[]): Decimal;
static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
static noConflict(): Decimal.Constructor; // Browser only
static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
static random(significantDigits?: number): Decimal;
static round(n: Decimal.Value): Decimal;
static set(object: Decimal.Config): Decimal.Constructor;
static sign(n: Decimal.Value): number;
static sin(n: Decimal.Value): Decimal;
static sinh(n: Decimal.Value): Decimal;
static sqrt(n: Decimal.Value): Decimal;
static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
static sum(...n: Decimal.Value[]): Decimal;
static tan(n: Decimal.Value): Decimal;
static tanh(n: Decimal.Value): Decimal;
static trunc(n: Decimal.Value): Decimal;
static readonly default?: Decimal.Constructor;
static readonly Decimal?: Decimal.Constructor;
static readonly precision: number;
static readonly rounding: Decimal.Rounding;
static readonly toExpNeg: number;
static readonly toExpPos: number;
static readonly minE: number;
static readonly maxE: number;
static readonly crypto: boolean;
static readonly modulo: Decimal.Modulo;
static readonly ROUND_UP: 0;
static readonly ROUND_DOWN: 1;
static readonly ROUND_CEIL: 2;
static readonly ROUND_FLOOR: 3;
static readonly ROUND_HALF_UP: 4;
static readonly ROUND_HALF_DOWN: 5;
static readonly ROUND_HALF_EVEN: 6;
static readonly ROUND_HALF_CEIL: 7;
static readonly ROUND_HALF_FLOOR: 8;
static readonly EUCLID: 9;
}
/**
* 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<Payload extends OperationPayload, Args = {}, GlobalOmitOptions = {}> = Args extends {
omit: infer LocalOmit;
} ? ApplyOmit<UnwrapPayload<{
default: Payload;
}>['default'], PatchFlat<LocalOmit, ExtractGlobalOmit<GlobalOmitOptions, Uncapitalize<Payload['name']>>>> : ApplyOmit<UnwrapPayload<{
default: Payload;
}>['default'], ExtractGlobalOmit<GlobalOmitOptions, Uncapitalize<Payload['name']>>>;
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", "$transaction", "$extends"];
declare type Deprecation = ReadonlyDeep_2<{
sinceVersion: string;
reason: string;
plannedRemovalVersion?: string;
}>;
declare type DeserializedResponse = Array<Record<string, unknown>>;
export declare function deserializeJsonResponse(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,
Document_2 as Document,
Mappings,
OtherOperationMappings,
DatamodelEnum,
SchemaEnum,
EnumValue,
Datamodel,
uniqueIndex,
PrimaryKey,
Model,
FieldKind,
FieldNamespace,
FieldLocation,
Field,
FieldDefault,
FieldDefaultScalar,
Index,
IndexType,
IndexField,
SortOrder,
Schema,
Query,
QueryOutput,
TypeRef,
InputTypeRef,
SchemaArg,
OutputType,
SchemaField,
OutputTypeRef,
Deprecation,
InputType,
FieldRefType,
FieldRefAllowType,
ModelMapping,
ModelAction
}
}
declare namespace DMMF_2 {
export {
datamodelEnumToSchemaEnum,
Document_2 as Document,
Mappings,
OtherOperationMappings,
DatamodelEnum,
SchemaEnum,
EnumValue,
Datamodel,
uniqueIndex,
PrimaryKey,
Model,
FieldKind,
FieldNamespace,
FieldLocation,
Field,
FieldDefault,
FieldDefaultScalar,
Index,
IndexType,
IndexField,
SortOrder,
Schema,
Query,
QueryOutput,
TypeRef,
InputTypeRef,
SchemaArg,
OutputType,
SchemaField,
OutputTypeRef,
Deprecation,
InputType,
FieldRefType,
FieldRefAllowType,
ModelMapping,
ModelAction
}
}
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<Query, Result> extends AdapterInfo {
/**
* Instantiate a driver adapter.
*/
connect(): Promise<Queryable<Query, Result>>;
}
declare type DynamicArgType = ArgType | {
arity: 'tuple';
elements: ArgType[];
};
/** Client */
export declare type DynamicClientExtensionArgs<C_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
[P in keyof C_]: unknown;
} & {
[K: symbol]: {
ctx: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList> & {
$parent: Optional<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>;
};
};
};
export declare type DynamicClientExtensionThis<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
[P in keyof ExtArgs['client']]: Return<ExtArgs['client'][P]>;
} & {
[P in Exclude<TypeMap['meta']['modelProps'], keyof ExtArgs['client']>]: DynamicModelExtensionThis<TypeMap, ModelKey<TypeMap, P>, ExtArgs>;
} & {
[P in Exclude<keyof TypeMap['other']['operations'], keyof ExtArgs['client']>]: P extends keyof ClientOtherOps ? ClientOtherOps[P] : never;
} & {
[P in Exclude<ClientBuiltInProp, keyof ExtArgs['client']>]: DynamicClientExtensionThisBuiltin<TypeMap, TypeMapCb, ExtArgs>[P];
} & {
[K: symbol]: {
types: TypeMap['other'];
};
};
export declare type DynamicClientExtensionThisBuiltin<TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
$extends: ExtendsHook<'extends', TypeMapCb, ExtArgs, Call<TypeMapCb, {
extArgs: ExtArgs;
}>>;
$transaction<P extends PrismaPromise<any>[]>(arg: [...P], options?: {
isolationLevel?: TypeMap['meta']['txIsolationLevel'];
}): Promise<UnwrapTuple<P>>;
$transaction<R>(fn: (client: Omit<DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>, ITXClientDenyList>) => Promise<R>, options?: {
maxWait?: number;
timeout?: number;
isolationLevel?: TypeMap['meta']['txIsolationLevel'];
}): Promise<R>;
$disconnect(): Promise<void>;
$connect(): Promise<void>;
};
/** Model */
export declare type DynamicModelExtensionArgs<M_, TypeMap extends TypeMapDef, TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>> = {
[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<TypeMap, ModelKey<TypeMap, K>, ExtArgs> & {
$parent: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>;
} & {
$name: ModelKey<TypeMap, K>;
} & {
/**
* @deprecated Use `$name` instead.
*/
name: ModelKey<TypeMap, K>;
};
};
} : never;
};
export declare type DynamicModelExtensionFluentApi<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey, Null> = {
[K in keyof TypeMap['model'][M]['payload']['objects']]: <A>(args?: Exact<A, Path<TypeMap['model'][M]['operations'][P]['args']['select'], [K]>>) => PrismaPromise<Path<DynamicModelExtensionFnResultBase<TypeMap, M, {
select: {
[P in K]: A;
};
}, P>, [K]> | Null> & DynamicModelExtensionFluentApi<TypeMap, (TypeMap['model'][M]['payload']['objects'][K] & {})['name'], P, Null | Select<TypeMap['model'][M]['payload']['objects'][K], null>>;
};
export declare type DynamicModelExtensionFnResult<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey, Null> = P extends FluentOperation ? DynamicModelExtensionFluentApi<TypeMap, M, P, Null> & PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P> | Null> : PrismaPromise<DynamicModelExtensionFnResultBase<TypeMap, M, A, P>>;
export declare type DynamicModelExtensionFnResultBase<TypeMap extends TypeMapDef, M extends PropertyKey, A, P extends PropertyKey> = GetResult<TypeMap['model'][M]['payload'], A, P & Operation, TypeMap['globalOmitOptions']>;
export declare type DynamicModelExtensionFnResultNull<P extends PropertyKey> = P extends 'findUnique' | 'findFirst' ? null : never;
export declare type DynamicModelExtensionOperationFn<TypeMap extends TypeMapDef, M extends PropertyKey, P extends PropertyKey> = {} extends TypeMap['model'][M]['operations'][P]['args'] ? <A extends TypeMap['model'][M]['operations'][P]['args']>(args?: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>> : <A extends TypeMap['model'][M]['operations'][P]['args']>(args: Exact<A, TypeMap['model'][M]['operations'][P]['args']>) => DynamicModelExtensionFnResult<TypeMap, M, A, P, DynamicModelExtensionFnResultNull<P>>;
export declare type DynamicModelExtensionThis<TypeMap extends TypeMapDef, M extends PropertyKey, ExtArgs extends Record<string, any>> = {
[P in keyof ExtArgs['model'][Uncapitalize<M & string>]]: Return<ExtArgs['model'][Uncapitalize<M & string>][P]>;
} & {
[P in Exclude<keyof TypeMap['model'][M]['operations'], keyof ExtArgs['model'][Uncapitalize<M & string>]>]: DynamicModelExtensionOperationFn<TypeMap, M, P>;
} & {
[P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize<M & string>]>]: TypeMap['model'][M]['fields'];
} & {
[K: symbol]: {
types: TypeMap['model'][M];
};
};
/** Query */
export declare type DynamicQueryExtensionArgs<Q_, TypeMap extends TypeMapDef> = {
[K in keyof Q_]: K extends '$allOperations' ? (args: {
model?: string;
operation: string;
args: any;
query: (args: any) => PrismaPromise<any>;
}) => Promise<any> : K extends '$allModels' ? {
[P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb<TypeMap, 'model', keyof TypeMap['model'], keyof TypeMap['model'][keyof TypeMap['model']]['operations']> : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb<TypeMap, 'model', keyof TypeMap['model'], P> : never;
} : K extends TypeMap['meta']['modelProps'] ? {
[P in keyof Q_[K] | keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb<TypeMap, 'model', ModelKey<TypeMap, K>, keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations']> : P extends keyof TypeMap['model'][ModelKey<TypeMap, K>]['operations'] ? DynamicQueryExtensionCb<TypeMap, 'model', ModelKey<TypeMap, K>, P> : never;
} : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never;
};
export declare type DynamicQueryExtensionCb<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = <A extends DynamicQueryExtensionCbArgs<TypeMap, _0, _1, _2>>(args: A) => Promise<TypeMap[_0][_1][_2]['result']>;
export declare type DynamicQueryExtensionCbArgs<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = (_1 extends unknown ? _2 extends unknown ? {
args: DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>;
model: _0 extends 0 ? undefined : _1;
operation: _2;
query: <A extends DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>>(args: A) => PrismaPromise<TypeMap[_0][_1]['operations'][_2]['result']>;
} : never : never) & {
query: (args: DynamicQueryExtensionCbArgsArgs<TypeMap, _0, _1, _2>) => PrismaPromise<TypeMap[_0][_1]['operations'][_2]['result']>;
};
export declare type DynamicQueryExtensionCbArgsArgs<TypeMap extends TypeMapDef, _0 extends PropertyKey, _1 extends PropertyKey, _2 extends PropertyKey> = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args'];
/** Result */
export declare type DynamicResultExtensionArgs<R_, TypeMap extends TypeMapDef> = {
[K in keyof R_]: {
[P in keyof R_[K]]?: {
needs?: DynamicResultExtensionNeeds<TypeMap, ModelKey<TypeMap, K>, R_[K][P]>;
compute(data: DynamicResultExtensionData<TypeMap, ModelKey<TypeMap, K>, R_[K][P]>): any;
};
};
};
export declare type DynamicResultExtensionData<TypeMap extends TypeMapDef, M extends PropertyKey, S> = GetFindResult<TypeMap['model'][M]['payload'], {
select: S;
}, {}>;
export declare type DynamicResultExtensionNeeds<TypeMap extends TypeMapDef, M extends PropertyKey, S> = {
[K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never;
} & {
[N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean;
};
/**
* Placeholder value for "no text".
*/
export declare const empty: Sql;
export declare type EmptyToUnknown<T> = T;
declare interface Engine<InteractiveTransactionPayload = unknown> {
/** The name of the engine. This is meant to be consumed externally */
readonly name: string;
onBeforeExit(callback: () => Promise<void>): void;
start(): Promise<void>;
stop(): Promise<void>;
version(forceRun?: boolean): Promise<string> | string;
request<T>(query: JsonQuery, options: RequestOptions<InteractiveTransactionPayload>): Promise<QueryEngineResultData<T>>;
requestBatch<T>(queries: JsonQuery[], options: RequestBatchOptions<InteractiveTransactionPayload>): Promise<BatchQueryEngineResult<T>[]>;
transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise<Transaction_2.InteractiveTransactionInfo<unknown>>;
transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo<unknown>): Promise<void>;
metrics(options: MetricsOptionsJson): Promise<Metrics>;
metrics(options: MetricsOptionsPrometheus): Promise<string>;
applyPendingMigrations(): Promise<void>;
}
declare interface EngineConfig {
cwd: string;
dirname: string;
enableDebugLogs?: boolean;
allowTriggerPanic?: boolean;
prismaPath?: string;
generator?: GeneratorConfig;
/**
* @remarks this field is used internally by Policy, do not rename or remove
*/
overrideDatasources: Datasources;
showColors?: boolean;
logQueries?: boolean;
logLevel?: 'info' | 'warn';
env: Record<string, string>;
flags?: string[];
clientVersion: string;
engineVersion: string;
previewFeatures?: string[];
engineEndpoint?: string;
activeProvider?: string;
logEmitter: LogEmitter;
transactionOptions: Transaction_2.Options;
/**
* Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`.
* If set, this is only used in the library engine, and all queries would be performed through it,
* rather than Prisma's Rust drivers.
* @remarks only used by LibraryEngine.ts
*/
adapter?: SqlDriverAdapterFactory;
/**
* The contents of the schema encoded into a string
*/
inlineSchema: string;
/**
* The contents of the datasource url saved in a string
* @remarks only used by DataProxyEngine.ts
* @remarks this field is used internally by Policy, do not rename or remove
*/
inlineDatasources: GetPrismaClientConfig['inlineDatasources'];
/**
* The string hash that was produced for a given schema
* @remarks only used by DataProxyEngine.ts
*/
inlineSchemaHash: string;
/**
* The helper for interaction with OTEL tracing
* @remarks enabling is determined by the client and @prisma/instrumentation package
*/
tracingHelper: TracingHelper;
/**
* Information about whether we have not found a schema.prisma file in the
* default location, and that we fell back to finding the schema.prisma file
* in the current working directory. This usually means it has been bundled.
*/
isBundled?: boolean;
/**
* Web Assembly module loading configuration
*/
engineWasm?: EngineWasmLoadingConfig;
compilerWasm?: CompilerWasmLoadingConfig;
/**
* Allows Accelerate to use runtime utilities from the client. These are
* necessary for the AccelerateEngine to function correctly.
*/
accelerateUtils?: {
resolveDatasourceUrl: typeof resolveDatasourceUrl;
getBatchRequestPayload: typeof getBatchRequestPayload;
prismaGraphQLToJSError: typeof prismaGraphQLToJSError;
PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError;
PrismaClientInitializationError: typeof PrismaClientInitializationError;
PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError;
debug: (...args: any[]) => void;
engineVersion: string;
clientVersion: string;
};
}
declare type EngineEvent<E extends EngineEventType> = 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<string, unknown>;
links?: EngineSpanId[];
};
declare type EngineSpanId = string;
declare type EngineSpanKind = 'client' | 'internal';
declare type EngineWasmLoadingConfig = {
/**
* WASM-bindgen runtime for corresponding module
*/
getRuntime: () => Promise<{
__wbg_set_wasm(exports: unknown): void;
QueryEngine: QueryEngineConstructor;
}>;
/**
* Loads the raw wasm module for the wasm query 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 LibraryEngine
*/
getQueryEngineWasmModule: () => Promise<unknown>;
};
declare type EnumValue = ReadonlyDeep_2<{
name: string;
dbName: string | null;
}>;
declare type EnvPaths = {
rootEnvPath: string | null;
schemaEnvPath: string | undefined;
};
declare interface EnvValue {
fromEnvVar: null | string;
value: null | string;
}
export declare type Equals<A, B> = (<T>() => T extends A ? 1 : 2) extends (<T>() => T extends B ? 1 : 2) ? 1 : 0;
declare type Error_2 = MappedError & {
originalCode?: string;
originalMessage?: string;
};
declare type ErrorCapturingFunction<T> = T extends (...args: infer A) => Promise<infer R> ? (...args: A) => Promise<Result_4<ErrorCapturingInterface<R>>> : T extends (...args: infer A) => infer R ? (...args: A) => Result_4<ErrorCapturingInterface<R>> : T;
declare type ErrorCapturingInterface<T> = {
[K in keyof T]: ErrorCapturingFunction<T[K]>;
};
declare interface ErrorCapturingSqlDriverAdapter extends ErrorCapturingInterface<SqlDriverAdapter> {
readonly errorRegistry: ErrorRegistry;
}
declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal';
declare type ErrorRecord = {
error: unknown;
};
declare interface ErrorRegistry {
consumeError(id: number): ErrorRecord | undefined;
}
declare interface ErrorWithBatchIndex {
batchRequestIdx?: number;
}
declare type EventCallback<E extends ExtendedEventType> = [E] extends ['beforeExit'] ? () => Promise<void> : [E] extends [LogLevel] ? (event: EngineEvent<E>) => void : never;
export declare type Exact<A, W> = (A extends unknown ? (W extends A ? {
[K in keyof A]: Exact<A[K], W[K]>;
} : 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 type ExtendedSpanOptions = 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<Variant extends 'extends' | 'define', TypeMapCb extends TypeMapCbDef, ExtArgs extends Record<string, any>, TypeMap extends TypeMapDef = Call<TypeMapCb, {
extArgs: ExtArgs;
}>> {
extArgs: ExtArgs;
<R_ extends {
[K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
}, R, M_ extends {
[K in TypeMap['meta']['modelProps'] | '$allModels']?: unknown;
}, M, Q_ extends {
[K in TypeMap['meta']['modelProps'] | '$allModels' | keyof TypeMap['other']['operations'] | '$allOperations']?: unknown;
}, C_ extends {
[K in string]?: unknown;
}, C, Args extends InternalArgs = InternalArgs<R, M, {}, C>, MergedArgs extends InternalArgs = MergeExtArgs<TypeMap, ExtArgs, Args>>(extension: ((client: DynamicClientExtensionThis<TypeMap, TypeMapCb, ExtArgs>) => {
$extends: {
extArgs: Args;
};
}) | {
name?: string;
query?: DynamicQueryExtensionArgs<Q_, TypeMap>;
result?: DynamicResultExtensionArgs<R_, TypeMap> & R;
model?: DynamicModelExtensionArgs<M_, TypeMap, TypeMapCb, ExtArgs> & M;
client?: DynamicClientExtensionArgs<C_, TypeMap, TypeMapCb, ExtArgs> & C;
}): {
extends: DynamicClientExtensionThis<Call<TypeMapCb, {
extArgs: MergedArgs;
}>, TypeMapCb, MergedArgs>;
define: (client: any) => {
$extends: {
extArgs: Args;
};
};
}[Variant];
}
export declare type ExtensionArgs = Optional<RequiredExtensionArgs>;
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, ModelName extends string> = 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<string | number>;
}>;
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<Model, FieldType> {
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 = unknown, Returns = unknown> {
params: Params;
returns: Returns;
}
declare type Fragment = {
type: 'stringChunk';
chunk: string;
} | {
type: 'parameter';
} | {
type: 'parameterTuple';
} | {
type: 'parameterTupleList';
itemPrefix: string;
itemSeparator: string;
itemSuffix: string;
groupSeparator: string;
};
declare interface GeneratorConfig {
name: string;
output: EnvValue | null;
isCustomOutput?: boolean;
provider: EnvValue;
config: {
/** `output` is a reserved name and will only be available directly at `generator.output` */
output?: never;
/** `provider` is a reserved name and will only be available directly at `generator.provider` */
provider?: never;
/** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */
binaryTargets?: never;
/** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */
previewFeatures?: never;
} & {
[key: string]: string | string[] | undefined;
};
binaryTargets: BinaryTargetsEnvValue[];
previewFeatures: string[];
envPaths?: EnvPaths;
sourceFilePath: string;
}
export declare type GetAggregateResult<P extends OperationPayload, A> = {
[K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count<A[K]> : {
[J in keyof A[K] & string]: P['scalars'][J] | null;
};
};
declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2<unknown>): QueryEngineBatchRequest;
export declare type GetBatchResult = {
count: number;
};
export declare type GetCountResult<A