diff --git a/src/deps.ts b/src/deps.ts index df2efada116..88e7096e908 100644 --- a/src/deps.ts +++ b/src/deps.ts @@ -396,7 +396,10 @@ export interface AutoEncryptionOptions { }; } -/** @public */ +/** + * @public + * @deprecated This interface will be removed in the next major version. + */ export interface AutoEncrypter { // eslint-disable-next-line @typescript-eslint/no-misused-new new (client: MongoClient, options: AutoEncryptionOptions): AutoEncrypter; diff --git a/src/mongo_client.ts b/src/mongo_client.ts index 95fc229ab5f..0422b6a5328 100644 --- a/src/mongo_client.ts +++ b/src/mongo_client.ts @@ -417,6 +417,9 @@ export class MongoClient extends TypedEventEmitter { this[kOptions].monitorCommands = value; } + /** + * @deprecated This method will be removed in the next major version. + */ get autoEncrypter(): AutoEncrypter | undefined { return this[kOptions].autoEncrypter; } @@ -780,6 +783,9 @@ export interface MongoOptions writeConcern: WriteConcern; dbName: string; metadata: ClientMetadata; + /** + * @deprecated This option will be removed in the next major version. + */ autoEncrypter?: AutoEncrypter; proxyHost?: string; proxyPort?: number;