import { A as MongoFieldFilter, D as MongoAndExpr, M as MongoNotExpr, N as MongoOrExpr, O as MongoExistsExpr, Rt as MongoAstNode, et as MongoFilterVisitor, j as MongoFilterExpr, k as MongoExprFilter, t as MongoQueryPlan } from "../query-plan-mVohmpSo.mjs"; import { MongoIndexKey, MongoIndexKey as MongoIndexKey$1, MongoIndexKeyDirection, MongoIndexKeyDirection as MongoIndexKeyDirection$1 } from "@prisma-next/mongo-contract"; import { CollationOptions, CreateCollectionOptions as CreateCollectionOptions$1, CreateIndexesOptions } from "@prisma-next/mongo-value/mongodb-types"; import { MigrationPlanOperation } from "@prisma-next/framework-components/control"; //#region src/inspection-commands.d.ts declare class ListIndexesCommand extends MongoAstNode { readonly kind: "listIndexes"; readonly collection: string; constructor(collection: string); accept(visitor: MongoInspectionCommandVisitor): R; } declare class ListCollectionsCommand extends MongoAstNode { readonly kind: "listCollections"; constructor(); accept(visitor: MongoInspectionCommandVisitor): R; } type AnyMongoInspectionCommand = ListIndexesCommand | ListCollectionsCommand; //#endregion //#region src/ddl-visitors.d.ts interface MongoDdlCommandVisitor { createIndex(command: CreateIndexCommand): R; dropIndex(command: DropIndexCommand): R; createCollection(command: CreateCollectionCommand): R; dropCollection(command: DropCollectionCommand): R; collMod(command: CollModCommand): R; } interface MongoInspectionCommandVisitor { listIndexes(command: ListIndexesCommand): R; listCollections(command: ListCollectionsCommand): R; } //#endregion //#region src/ddl-commands.d.ts interface CreateIndexOptions { readonly unique?: boolean; readonly sparse?: boolean; readonly expireAfterSeconds?: number; readonly partialFilterExpression?: Record; readonly name?: string; readonly wildcardProjection?: Record; readonly collation?: CollationOptions; readonly weights?: Record; readonly default_language?: string; readonly language_override?: string; } declare class CreateIndexCommand extends MongoAstNode implements CreateIndexesOptions { readonly kind: "createIndex"; readonly collection: string; readonly keys: ReadonlyArray; readonly unique?: boolean; readonly sparse?: boolean; readonly expireAfterSeconds?: number; readonly partialFilterExpression?: Record; readonly name?: string; readonly wildcardProjection?: Record; readonly collation?: CollationOptions; readonly weights?: Record; readonly default_language?: string; readonly language_override?: string; constructor(collection: string, keys: ReadonlyArray, options?: CreateIndexOptions); accept(visitor: MongoDdlCommandVisitor): R; } declare class DropIndexCommand extends MongoAstNode { readonly kind: "dropIndex"; readonly collection: string; readonly name: string; constructor(collection: string, name: string); accept(visitor: MongoDdlCommandVisitor): R; } interface CreateCollectionOptions { readonly validator?: Record; readonly validationLevel?: 'strict' | 'moderate'; readonly validationAction?: 'error' | 'warn'; readonly capped?: boolean; readonly size?: number; readonly max?: number; readonly timeseries?: { timeField: string; metaField?: string; granularity?: 'seconds' | 'minutes' | 'hours'; }; readonly collation?: CollationOptions; readonly changeStreamPreAndPostImages?: { enabled: boolean; }; readonly clusteredIndex?: { key: Record; unique: boolean; name?: string; }; } declare class CreateCollectionCommand extends MongoAstNode implements CreateCollectionOptions$1 { readonly kind: "createCollection"; readonly collection: string; readonly validator?: Record; readonly validationLevel?: 'strict' | 'moderate'; readonly validationAction?: 'error' | 'warn'; readonly capped?: boolean; readonly size?: number; readonly max?: number; readonly timeseries?: { timeField: string; metaField?: string; granularity?: 'seconds' | 'minutes' | 'hours'; }; readonly collation?: CollationOptions; readonly changeStreamPreAndPostImages?: { enabled: boolean; }; readonly clusteredIndex?: { key: Record; unique: boolean; name?: string; }; constructor(collection: string, options?: CreateCollectionOptions); accept(visitor: MongoDdlCommandVisitor): R; } declare class DropCollectionCommand extends MongoAstNode { readonly kind: "dropCollection"; readonly collection: string; constructor(collection: string); accept(visitor: MongoDdlCommandVisitor): R; } interface CollModOptions { readonly validator?: Record; readonly validationLevel?: 'strict' | 'moderate'; readonly validationAction?: 'error' | 'warn'; readonly changeStreamPreAndPostImages?: { enabled: boolean; }; } declare class CollModCommand extends MongoAstNode { readonly kind: "collMod"; readonly collection: string; readonly validator?: Record; readonly validationLevel?: 'strict' | 'moderate'; readonly validationAction?: 'error' | 'warn'; readonly changeStreamPreAndPostImages?: { enabled: boolean; }; constructor(collection: string, options: CollModOptions); accept(visitor: MongoDdlCommandVisitor): R; } type AnyMongoDdlCommand = CreateIndexCommand | DropIndexCommand | CreateCollectionCommand | DropCollectionCommand | CollModCommand; //#endregion //#region src/migration-helpers.d.ts declare function buildIndexOpId(verb: 'create' | 'drop', collection: string, keys: ReadonlyArray): string; declare function defaultMongoIndexName(keys: ReadonlyArray): string; declare function keysToKeySpec(keys: ReadonlyArray): Record; //#endregion //#region src/migration-operation-types.d.ts interface MongoMigrationCheck { readonly description: string; readonly source: AnyMongoInspectionCommand; readonly filter: MongoFilterExpr; readonly expect: 'exists' | 'notExists'; } interface MongoMigrationStep { readonly description: string; readonly command: AnyMongoDdlCommand; } interface MongoMigrationPlanOperation extends MigrationPlanOperation { readonly precheck: readonly MongoMigrationCheck[]; readonly execute: readonly MongoMigrationStep[]; readonly postcheck: readonly MongoMigrationCheck[]; } interface MongoDataTransformCheck { readonly description: string; readonly source: MongoQueryPlan; readonly filter: MongoFilterExpr; readonly expect: 'exists' | 'notExists'; } interface MongoDataTransformOperation extends MigrationPlanOperation { readonly operationClass: 'data'; /** * Human-readable label for this data transform. */ readonly name: string; /** * Optional opt-in routing identity. Presence opts the transform into * invariant-aware routing; absence means the transform is * path-dependent and not referenceable from refs. */ readonly invariantId?: string; readonly precheck: readonly MongoDataTransformCheck[]; readonly run: readonly MongoQueryPlan[]; readonly postcheck: readonly MongoDataTransformCheck[]; } type AnyMongoMigrationOperation = MongoMigrationPlanOperation | MongoDataTransformOperation; //#endregion export { type AnyMongoDdlCommand, type AnyMongoInspectionCommand, type AnyMongoMigrationOperation, CollModCommand, type CollModOptions, CreateCollectionCommand, type CreateCollectionOptions, CreateIndexCommand, type CreateIndexOptions, DropCollectionCommand, DropIndexCommand, ListCollectionsCommand, ListIndexesCommand, MongoAndExpr, type MongoDataTransformCheck, type MongoDataTransformOperation, type MongoDdlCommandVisitor, MongoExistsExpr, MongoExprFilter, MongoFieldFilter, type MongoFilterExpr, type MongoFilterVisitor, type MongoIndexKey, type MongoIndexKeyDirection, type MongoInspectionCommandVisitor, type MongoMigrationCheck, type MongoMigrationPlanOperation, type MongoMigrationStep, MongoNotExpr, MongoOrExpr, buildIndexOpId, defaultMongoIndexName, keysToKeySpec }; //# sourceMappingURL=control.d.mts.map