From 1f62657f7406b3ffb0cb4b2afe700ae3198bc838 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Tue, 1 Nov 2022 15:21:50 +0100 Subject: [PATCH 1/3] chore(NODE-4733): deprecate result and getLastOp --- src/bulk/common.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bulk/common.ts b/src/bulk/common.ts index 5b65fa890ad..9f93c72bbc2 100644 --- a/src/bulk/common.ts +++ b/src/bulk/common.ts @@ -176,6 +176,7 @@ export class Batch { * The result of a bulk write. */ export class BulkWriteResult { + /** @deprecated Will be removed in 5.0 */ result: BulkResult; /** @@ -295,7 +296,11 @@ export class BulkWriteResult { return this.result.writeErrors; } - /** Retrieve lastOp if available */ + /** + * Retrieve lastOp if available + * + * @deprecated Will be removed in 5.0 + */ getLastOp(): Document | undefined { return this.result.opTime; } From 04d2ff91cb7707b8c7a400314037f0832200561d Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 3 Nov 2022 15:12:26 +0100 Subject: [PATCH 2/3] chore(NODE-4733): deprecate toJSON --- src/bulk/common.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bulk/common.ts b/src/bulk/common.ts index 9f93c72bbc2..4238afbad2c 100644 --- a/src/bulk/common.ts +++ b/src/bulk/common.ts @@ -327,6 +327,7 @@ export class BulkWriteResult { } } + /* @deprecated Will be removed in 5.0 release */ toJSON(): BulkResult { return this.result; } From ab6bc653e690806c22fbf8a9f0b49bc33eb6b7a7 Mon Sep 17 00:00:00 2001 From: Durran Jordan Date: Thu, 3 Nov 2022 16:01:12 +0100 Subject: [PATCH 3/3] chore(NODE-4733): deprecate bulk result --- src/bulk/common.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bulk/common.ts b/src/bulk/common.ts index 4238afbad2c..e6aff6f39ed 100644 --- a/src/bulk/common.ts +++ b/src/bulk/common.ts @@ -130,7 +130,11 @@ export type AnyBulkWriteOperation = | { deleteOne: DeleteOneModel } | { deleteMany: DeleteManyModel }; -/** @public */ +/** + * @public + * + * @deprecated Will be made internal in 5.0 + */ export interface BulkResult { ok: number; writeErrors: WriteError[];