Skip to content

Commit 83affbf

Browse files
author
Brian Chen
authored
Add update_transform protos (#4118)
1 parent c76e1ff commit 83affbf

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

packages/firestore/src/protos/firestore_proto_api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ export declare namespace firestoreV1ApiClientInterfaces {
391391
verify?: string;
392392
transform?: DocumentTransform;
393393
updateMask?: DocumentMask;
394+
updateTransforms?: FieldTransform[];
394395
currentDocument?: Precondition;
395396
}
396397
interface WriteRequest {

packages/firestore/src/protos/google/firestore/v1/write.proto

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ message Write {
4747
// This only requires read access to the document.
4848
string verify = 5;
4949

50-
// Applies a tranformation to a document.
51-
// At most one `transform` per document is allowed in a given request.
52-
// An `update` cannot follow a `transform` on the same document in a given
53-
// request.
50+
// Applies a transformation to a document.
5451
DocumentTransform transform = 6;
5552
}
5653

@@ -66,6 +63,13 @@ message Write {
6663
// The field paths in this mask must not contain a reserved field name.
6764
DocumentMask update_mask = 3;
6865

66+
// The transforms to perform after update.
67+
//
68+
// This field can be set only when the operation is `update`. If present, this
69+
// write is equivalent to performing `update` and `transform` to the same
70+
// document atomically and in order.
71+
repeated DocumentTransform.FieldTransform update_transforms = 7;
72+
6973
// An optional precondition on the document.
7074
//
7175
// The write will fail if this is set and not met by the target document.

0 commit comments

Comments
 (0)