Skip to content

Commit 9bb0d95

Browse files
feat(NODE-5429): deprecate the AutoEncrypter interface (#3764)
1 parent cd923c8 commit 9bb0d95

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/deps.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,10 @@ export interface AutoEncryptionOptions {
396396
};
397397
}
398398

399-
/** @public */
399+
/**
400+
* @public
401+
* @deprecated This interface will be removed in the next major version.
402+
*/
400403
export interface AutoEncrypter {
401404
// eslint-disable-next-line @typescript-eslint/no-misused-new
402405
new (client: MongoClient, options: AutoEncryptionOptions): AutoEncrypter;

src/mongo_client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> {
417417
this[kOptions].monitorCommands = value;
418418
}
419419

420+
/**
421+
* @deprecated This method will be removed in the next major version.
422+
*/
420423
get autoEncrypter(): AutoEncrypter | undefined {
421424
return this[kOptions].autoEncrypter;
422425
}
@@ -780,6 +783,9 @@ export interface MongoOptions
780783
writeConcern: WriteConcern;
781784
dbName: string;
782785
metadata: ClientMetadata;
786+
/**
787+
* @deprecated This option will be removed in the next major version.
788+
*/
783789
autoEncrypter?: AutoEncrypter;
784790
proxyHost?: string;
785791
proxyPort?: number;

0 commit comments

Comments
 (0)