import type { Document } from '@mongosh/service-provider-core'; import type Mongo from './mongo'; import type { Database, DatabaseWithSchema } from './database'; import { ShellApiWithMongoClass } from './decorators'; import { asPrintable } from './enums'; import type { CommandResult } from './result'; import type { GenericDatabaseSchema, GenericServerSideSchema } from './helpers'; export type ReplSetMemberConfig = { _id: number; host: string; priority?: number; votes?: number; arbiterOnly?: boolean; }; export type ReplSetConfig = { version: number; _id: string; members: ReplSetMemberConfig[]; protocolVersion: number; }; export default class ReplicaSet extends ShellApiWithMongoClass { _database: DatabaseWithSchema; constructor(database: DatabaseWithSchema | Database); get _mongo(): Mongo; initiate(config?: Partial): Promise; _getConfig(): Promise; config(): Promise; conf(): Promise; reconfig(config: Partial, options?: {}): Promise; reconfigForPSASet(newMemberIndex: number, config: Partial, options?: {}): Promise; status(): Promise; isMaster(): Promise; hello(): Promise; printSecondaryReplicationInfo(): Promise; printSlaveReplicationInfo(): never; printReplicationInfo(): Promise; add(hostport: string | Partial, arb?: boolean): Promise; addArb(hostname: string): Promise; remove(hostname: string): Promise; freeze(secs: number): Promise; stepDown(stepdownSecs?: number, catchUpSecs?: number): Promise; syncFrom(host: string): Promise; secondaryOk(): Promise; [asPrintable](): string; private _emitReplicaSetApiCall; }