import type { Document } from '../bson'; import type { Db } from '../db'; import type { Server } from '../sdam/server'; import type { ClientSession } from '../sessions'; import { Callback } from '../utils'; import { CommandOperation, CommandOperationOptions } from './command'; /** @public */ export interface RoleSpecification { /** * A role grants privileges to perform sets of actions on defined resources. * A given role applies to the database on which it is defined and can grant access down to a collection level of granularity. */ role: string; /** The database this user's role should effect. */ db: string; } /** @public */ export interface AddUserOptions extends CommandOperationOptions { /** @deprecated Please use db.command('createUser', ...) instead for this option */ digestPassword?: null; /** Roles associated with the created user */ roles?: string | string[] | RoleSpecification | RoleSpecification[]; /** Custom data associated with the user (only Mongodb 2.6 or higher) */ customData?: Document; } /** @internal */ export declare class AddUserOperation extends CommandOperation { options: AddUserOptions; db: Db; username: string; password?: string; constructor(db: Db, username: string, password: string | undefined, options?: AddUserOptions); execute(server: Server, session: ClientSession | undefined, callback: Callback): void; } //# sourceMappingURL=add_user.d.ts.map