import type { BSONSerializeOptions, Document } from '../bson'; import { Explain, ExplainOptions } from '../explain'; import type { Logger } from '../logger'; import { ReadConcern } from '../read_concern'; import type { ReadPreference } from '../read_preference'; import type { Server } from '../sdam/server'; import type { ClientSession } from '../sessions'; import { Callback, MongoDBNamespace } from '../utils'; import { WriteConcern, WriteConcernOptions } from '../write_concern'; import type { ReadConcernLike } from './../read_concern'; import { AbstractOperation, OperationOptions } from './operation'; /** @public */ export interface CollationOptions { locale: string; caseLevel?: boolean; caseFirst?: string; strength?: number; numericOrdering?: boolean; alternate?: string; maxVariable?: string; backwards?: boolean; normalization?: boolean; } /** @public */ export interface CommandOperationOptions extends OperationOptions, WriteConcernOptions, ExplainOptions { /** @deprecated This option does nothing */ fullResponse?: boolean; /** Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported) */ readConcern?: ReadConcernLike; /** Collation */ collation?: CollationOptions; maxTimeMS?: number; /** * Comment to apply to the operation. * * In server versions pre-4.4, 'comment' must be string. A server * error will be thrown if any other type is provided. * * In server versions 4.4 and above, 'comment' can be any valid BSON type. */ comment?: unknown; /** Should retry failed writes */ retryWrites?: boolean; dbName?: string; authdb?: string; noResponse?: boolean; } /** @internal */ export interface OperationParent { s: { namespace: MongoDBNamespace; }; readConcern?: ReadConcern; writeConcern?: WriteConcern; readPreference?: ReadPreference; logger?: Logger; bsonOptions?: BSONSerializeOptions; } /** @internal */ export declare abstract class CommandOperation extends AbstractOperation { options: CommandOperationOptions; readConcern?: ReadConcern; writeConcern?: WriteConcern; explain?: Explain; logger?: Logger; constructor(parent?: OperationParent, options?: CommandOperationOptions); get canRetryWrite(): boolean; abstract execute(server: Server, session: ClientSession | undefined, callback: Callback): void; executeCommand(server: Server, session: ClientSession | undefined, cmd: Document, callback: Callback): void; } //# sourceMappingURL=command.d.ts.map