// ⚠️ GENERATED FILE - DO NOT EDIT // This file is automatically generated by 'prisma contract emit'. // To regenerate, run: prisma contract emit import type { CodecTypes as PgTypes, ParameterizedOutputTypesForTypeParams as PgParameterizedOutputTypes, } from '@prisma/orm-postgres/target/codec-types'; import type { QueryOperationTypes as PgTargetQueryOps } from '@prisma/orm-postgres/target/operation-types'; import type { ColumnTypesFromStorage, ContractWithTypeMaps, RelationKeys, TypeMaps as TypeMapsType, } from '@prisma/orm-family-sql/contract/types'; import type { Contract as ContractType, ExecutionHashBase, FieldTypesFromDomain, NamespaceId, ProfileHashBase, StorageHashBase, } from '@prisma/orm-framework/contract/types'; export type StorageHash = StorageHashBase<'10ee7f9188fe4eff3401811eaf4661af3668560d2cc3f055bc5f2323d8c1cb31'>; export type ExecutionHash = ExecutionHashBase; export type ProfileHash = ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>; export type CodecTypes = PgTypes; export type LaneCodecTypes = CodecTypes; export type QueryOperationTypes = PgTargetQueryOps; export type AggregateTypes = { readonly avg: { readonly byCodec: { readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/float4@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/int2@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/int4@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/int8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/int8number@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/interval-string@1': { readonly output: 'pg/interval-string@1'; readonly nullable: true; }; readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/unboundedint@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'sql/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; }; }; readonly avgDecimal: { readonly byCodec: { readonly 'pg/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/int2@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/int4@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/int8@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/int8number@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/unboundedint@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'sql/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; }; }; readonly count: { readonly byCodec: {}; readonly withoutInput: { readonly output: 'pg/int8number@1'; readonly nullable: false }; readonly anyInput: { readonly output: 'pg/int8number@1'; readonly nullable: false }; }; readonly countBigInt: { readonly byCodec: {}; readonly withoutInput: { readonly output: 'pg/int8@1'; readonly nullable: false }; readonly anyInput: { readonly output: 'pg/int8@1'; readonly nullable: false }; }; readonly max: { readonly byCodec: { readonly 'pg/char@1': { readonly output: 'pg/char@1'; readonly nullable: true }; readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true }; readonly 'pg/date-temporal@1': { readonly output: 'pg/date-temporal@1'; readonly nullable: true; }; readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true }; readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true }; readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true }; readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/inet@1': { readonly output: 'pg/inet@1'; readonly nullable: true }; readonly 'pg/int@1': { readonly output: 'pg/int@1'; readonly nullable: true }; readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true }; readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true }; readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; readonly 'pg/interval-string@1': { readonly output: 'pg/interval-string@1'; readonly nullable: true; }; readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/money@1': { readonly output: 'pg/money@1'; readonly nullable: true }; readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/oid@1': { readonly output: 'pg/oid@1'; readonly nullable: true }; readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true }; readonly 'pg/text@1': { readonly output: 'pg/text@1'; readonly nullable: true }; readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true }; readonly 'pg/time-temporal@1': { readonly output: 'pg/time-temporal@1'; readonly nullable: true; }; readonly 'pg/timestamp-date@1': { readonly output: 'pg/timestamp-date@1'; readonly nullable: true; }; readonly 'pg/timestamp-instant@1': { readonly output: 'pg/timestamp-instant@1'; readonly nullable: true; }; readonly 'pg/timestamp-string@1': { readonly output: 'pg/timestamp-string@1'; readonly nullable: true; }; readonly 'pg/timestamp-temporal@1': { readonly output: 'pg/timestamp-temporal@1'; readonly nullable: true; }; readonly 'pg/timestamptz-date@1': { readonly output: 'pg/timestamptz-date@1'; readonly nullable: true; }; readonly 'pg/timestamptz-string@1': { readonly output: 'pg/timestamptz-string@1'; readonly nullable: true; }; readonly 'pg/timestamptz-temporal@1': { readonly output: 'pg/timestamptz-temporal@1'; readonly nullable: true; }; readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true }; readonly 'pg/unboundedint@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true; }; readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true }; readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true }; readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true }; readonly 'sql/text@1': { readonly output: 'sql/text@1'; readonly nullable: true }; readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; }; }; readonly min: { readonly byCodec: { readonly 'pg/char@1': { readonly output: 'pg/char@1'; readonly nullable: true }; readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true }; readonly 'pg/date-temporal@1': { readonly output: 'pg/date-temporal@1'; readonly nullable: true; }; readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true }; readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true }; readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true }; readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/inet@1': { readonly output: 'pg/inet@1'; readonly nullable: true }; readonly 'pg/int@1': { readonly output: 'pg/int@1'; readonly nullable: true }; readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true }; readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true }; readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; readonly 'pg/interval-string@1': { readonly output: 'pg/interval-string@1'; readonly nullable: true; }; readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/money@1': { readonly output: 'pg/money@1'; readonly nullable: true }; readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/oid@1': { readonly output: 'pg/oid@1'; readonly nullable: true }; readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true }; readonly 'pg/text@1': { readonly output: 'pg/text@1'; readonly nullable: true }; readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true }; readonly 'pg/time-temporal@1': { readonly output: 'pg/time-temporal@1'; readonly nullable: true; }; readonly 'pg/timestamp-date@1': { readonly output: 'pg/timestamp-date@1'; readonly nullable: true; }; readonly 'pg/timestamp-instant@1': { readonly output: 'pg/timestamp-instant@1'; readonly nullable: true; }; readonly 'pg/timestamp-string@1': { readonly output: 'pg/timestamp-string@1'; readonly nullable: true; }; readonly 'pg/timestamp-temporal@1': { readonly output: 'pg/timestamp-temporal@1'; readonly nullable: true; }; readonly 'pg/timestamptz-date@1': { readonly output: 'pg/timestamptz-date@1'; readonly nullable: true; }; readonly 'pg/timestamptz-string@1': { readonly output: 'pg/timestamptz-string@1'; readonly nullable: true; }; readonly 'pg/timestamptz-temporal@1': { readonly output: 'pg/timestamptz-temporal@1'; readonly nullable: true; }; readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true }; readonly 'pg/unboundedint@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true; }; readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true }; readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true }; readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true }; readonly 'sql/text@1': { readonly output: 'sql/text@1'; readonly nullable: true }; readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; }; }; readonly sum: { readonly byCodec: { readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true }; readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'pg/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; readonly 'pg/int2@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; readonly 'pg/int4@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; readonly 'pg/int8@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; readonly 'pg/interval-string@1': { readonly output: 'pg/interval-string@1'; readonly nullable: true; }; readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/money@1': { readonly output: 'pg/money@1'; readonly nullable: true }; readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; readonly 'pg/unboundedint@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true; }; readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; readonly 'sql/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; }; }; readonly sumBigInt: { readonly byCodec: { readonly 'pg/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; readonly 'pg/int2@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; readonly 'pg/int4@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; readonly 'pg/int8@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true }; readonly 'pg/int8number@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true }; readonly 'pg/unboundedint@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true; }; readonly 'sql/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; }; }; }; type DefaultLiteralValue = CodecId extends keyof CodecTypes ? Encoded extends CodecTypes[CodecId]['json'] ? Encoded : CodecTypes[CodecId]['json'] : Encoded; type ParameterizedOutputTypeFunctions = PgParameterizedOutputTypes; type FieldTypeOverrides = {}; export type FieldOutputTypes = FieldTypesFromDomain< ContractBase['domain']['namespaces'], CodecTypes, ParameterizedOutputTypeFunctions, FieldTypeOverrides, 'output', ContractBase['storage']['namespaces'] >; export type FieldInputTypes = FieldTypesFromDomain< ContractBase['domain']['namespaces'], CodecTypes, ParameterizedOutputTypeFunctions, FieldTypeOverrides, 'input', ContractBase['storage']['namespaces'] >; type ColumnTypeOverrides = {}; export type StorageColumnTypes = ColumnTypesFromStorage< ContractBase['storage'], CodecTypes, ParameterizedOutputTypeFunctions, ColumnTypeOverrides, 'output' >; export type StorageColumnInputTypes = ColumnTypesFromStorage< ContractBase['storage'], CodecTypes, ParameterizedOutputTypeFunctions, ColumnTypeOverrides, 'input' >; export namespace Models { export type nsa_Org = { id: FieldOutputTypes['nsa']['Org']['id']; users: nsa_User[]; readonly [RelationKeys]?: 'users'; }; export type nsa_Post = { id: FieldOutputTypes['nsa']['Post']['id']; title: FieldOutputTypes['nsa']['Post']['title']; userId: FieldOutputTypes['nsa']['Post']['userId']; user: nsa_User; readonly [RelationKeys]?: 'user'; }; export type nsa_User = { id: FieldOutputTypes['nsa']['User']['id']; orgId: FieldOutputTypes['nsa']['User']['orgId']; org: nsa_Org; posts: nsa_Post[]; readonly [RelationKeys]?: 'org' | 'posts'; }; export type nsb_User = { id: FieldOutputTypes['nsb']['User']['id']; name: FieldOutputTypes['nsb']['User']['name']; readonly [RelationKeys]?: never; }; } export declare const models: { nsa: { Org: Models.nsa_Org; Post: Models.nsa_Post; User: Models.nsa_User; }; nsb: { User: Models.nsb_User; }; }; export type TypeMaps = TypeMapsType< CodecTypes, QueryOperationTypes, FieldOutputTypes, FieldInputTypes, StorageColumnTypes, StorageColumnInputTypes, AggregateTypes >; type ContractBase = Omit< ContractType<{ readonly namespaces: { readonly nsa: { readonly id: 'nsa'; readonly kind: 'postgres-schema'; readonly entries: { readonly table: { readonly org: { columns: { readonly id: { readonly dataType: 'pg/int4'; readonly codecId: 'pg/int4@1'; readonly nullable: false; readonly many: false; }; }; primaryKey: { readonly columns: readonly ['id'] }; uniques: readonly []; indexes: readonly []; foreignKeys: readonly []; }; readonly post: { columns: { readonly id: { readonly dataType: 'pg/int4'; readonly codecId: 'pg/int4@1'; readonly nullable: false; readonly many: false; }; readonly title: { readonly dataType: 'pg/text'; readonly codecId: 'pg/text@1'; readonly nullable: false; readonly many: false; }; readonly userId: { readonly dataType: 'pg/int4'; readonly codecId: 'pg/int4@1'; readonly nullable: false; readonly many: false; }; }; primaryKey: { readonly columns: readonly ['id'] }; uniques: readonly []; indexes: readonly [ { readonly name: 'post_userId_idx_a489d58a'; readonly prefix: 'post_userId_idx'; readonly columns: readonly ['userId']; readonly unique: false; }, ]; foreignKeys: readonly [ { readonly source: { readonly namespaceId: 'nsa' & NamespaceId; readonly tableName: 'post'; readonly columns: readonly ['userId']; }; readonly target: { readonly namespaceId: 'nsa' & NamespaceId; readonly tableName: 'user'; readonly columns: readonly ['id']; }; }, ]; }; readonly user: { columns: { readonly id: { readonly dataType: 'pg/int4'; readonly codecId: 'pg/int4@1'; readonly nullable: false; readonly many: false; }; readonly orgId: { readonly dataType: 'pg/int4'; readonly codecId: 'pg/int4@1'; readonly nullable: false; readonly many: false; }; }; primaryKey: { readonly columns: readonly ['id'] }; uniques: readonly []; indexes: readonly [ { readonly name: 'user_orgId_idx_c5e5aabe'; readonly prefix: 'user_orgId_idx'; readonly columns: readonly ['orgId']; readonly unique: false; }, ]; foreignKeys: readonly [ { readonly source: { readonly namespaceId: 'nsa' & NamespaceId; readonly tableName: 'user'; readonly columns: readonly ['orgId']; }; readonly target: { readonly namespaceId: 'nsa' & NamespaceId; readonly tableName: 'org'; readonly columns: readonly ['id']; }; }, ]; }; }; }; }; readonly nsb: { readonly id: 'nsb'; readonly kind: 'postgres-schema'; readonly entries: { readonly table: { readonly user: { columns: { readonly id: { readonly dataType: 'pg/text'; readonly codecId: 'pg/text@1'; readonly nullable: false; readonly many: false; }; readonly name: { readonly dataType: 'pg/text'; readonly codecId: 'pg/text@1'; readonly nullable: false; readonly many: false; }; }; primaryKey: { readonly columns: readonly ['id'] }; uniques: readonly []; indexes: readonly []; foreignKeys: readonly []; }; }; }; }; readonly public: { readonly id: 'public'; readonly kind: 'postgres-schema'; readonly entries: { readonly table: {} }; }; }; readonly storageHash: StorageHash; }>, 'roots' | 'domain' > & { readonly target: 'postgres'; readonly targetFamily: 'sql'; readonly roots: { readonly 'nsa.user': { readonly namespace: 'nsa' & NamespaceId; readonly model: 'User' }; readonly 'nsb.user': { readonly namespace: 'nsb' & NamespaceId; readonly model: 'User' }; readonly org: { readonly namespace: 'nsa' & NamespaceId; readonly model: 'Org' }; readonly post: { readonly namespace: 'nsa' & NamespaceId; readonly model: 'Post' }; }; readonly domain: { readonly namespaces: { readonly nsa: { readonly models: { readonly Org: { readonly fields: { readonly id: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; }; }; readonly relations: { readonly users: { readonly to: { readonly namespace: 'nsa' & NamespaceId; readonly model: 'User' }; readonly cardinality: '1:N'; readonly on: { readonly localFields: readonly ['id']; readonly targetFields: readonly ['orgId']; }; }; }; readonly storage: { readonly table: 'org'; readonly namespaceId: 'nsa'; readonly fields: { readonly id: { readonly column: 'id' } }; }; }; readonly Post: { readonly fields: { readonly id: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; }; readonly title: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; }; readonly userId: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; }; }; readonly relations: { readonly user: { readonly to: { readonly namespace: 'nsa' & NamespaceId; readonly model: 'User' }; readonly cardinality: 'N:1'; readonly nullable: false; readonly on: { readonly localFields: readonly ['userId']; readonly targetFields: readonly ['id']; }; }; }; readonly storage: { readonly table: 'post'; readonly namespaceId: 'nsa'; readonly fields: { readonly id: { readonly column: 'id' }; readonly title: { readonly column: 'title' }; readonly userId: { readonly column: 'userId' }; }; }; }; readonly User: { readonly fields: { readonly id: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; }; readonly orgId: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; }; }; readonly relations: { readonly org: { readonly to: { readonly namespace: 'nsa' & NamespaceId; readonly model: 'Org' }; readonly cardinality: 'N:1'; readonly nullable: false; readonly on: { readonly localFields: readonly ['orgId']; readonly targetFields: readonly ['id']; }; }; readonly posts: { readonly to: { readonly namespace: 'nsa' & NamespaceId; readonly model: 'Post' }; readonly cardinality: '1:N'; readonly on: { readonly localFields: readonly ['id']; readonly targetFields: readonly ['userId']; }; }; }; readonly storage: { readonly table: 'user'; readonly namespaceId: 'nsa'; readonly fields: { readonly id: { readonly column: 'id' }; readonly orgId: { readonly column: 'orgId' }; }; }; }; }; }; readonly nsb: { readonly models: { readonly User: { readonly fields: { readonly id: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; }; readonly name: { readonly nullable: false; readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; }; }; readonly relations: Record; readonly storage: { readonly table: 'user'; readonly namespaceId: 'nsb'; readonly fields: { readonly id: { readonly column: 'id' }; readonly name: { readonly column: 'name' }; }; }; }; }; }; }; }; readonly capabilities: { readonly postgres: { readonly distinctOn: true; readonly forKeyShare: true; readonly forNoKeyUpdate: true; readonly jsonAgg: true; readonly lateral: true; readonly limit: true; readonly orderBy: true; readonly returning: true; }; readonly sql: { readonly checkConstraint: true; readonly defaultInInsert: true; readonly enums: true; readonly forShare: true; readonly forUpdate: true; readonly insertOnConflictSkip: true; readonly insertOnConflictTarget: true; readonly insertOnConflictWithoutTarget: true; readonly lateral: true; readonly lockNowait: true; readonly lockOf: true; readonly lockSkipLocked: true; readonly returning: true; readonly scalarList: true; }; }; readonly extensions: {}; readonly meta: {}; readonly profileHash: ProfileHash; }; export type Contract = ContractWithTypeMaps; export type Namespaces = Contract['storage']['namespaces'];