From b6d1130735094d6a341499a73f1bac48d3a80c0c Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Fri, 7 Jul 2023 15:01:15 -0600 Subject: [PATCH] deprecate autoencrypter --- src/deps.ts | 5 ++++- src/mongo_client.ts | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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;