diff --git a/Firestore/Protos/protos/firestore/local/maybe_document.proto b/Firestore/Protos/protos/firestore/local/maybe_document.proto index 67d2f68648c..e76d5e7d9fd 100644 --- a/Firestore/Protos/protos/firestore/local/maybe_document.proto +++ b/Firestore/Protos/protos/firestore/local/maybe_document.proto @@ -1,3 +1,17 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; package firestore.client; @@ -20,8 +34,20 @@ message NoDocument { google.protobuf.Timestamp read_time = 2; } -// Represents either an existing document or the explicitly known absence of a -// document. +// A message indicating that the document that is known to exist but its data +// is unknown. +message UnknownDocument { + // The name of the document that is known to exist, in the standard format: + // `projects/{project_id}/databases/{database_id}/documents/{document_path}` + string name = 1; + + // The version at which we know the document exists. + google.protobuf.Timestamp version = 2; +} + +// Represents either an existing document, the explicitly known absence of a +// document, or a document that is known to exist (at some version) but whose +// contents are unknown. message MaybeDocument { oneof document_type { // Used if the document is known to not exist. @@ -29,5 +55,14 @@ message MaybeDocument { // The document (if it exists). google.firestore.v1beta1.Document document = 2; + + // Used if the document is known to exist but its data is unknown. + UnknownDocument unknown_document = 3; } + + // `has_committed_mutations` marks documents that were written to the remote + // document store based on a write acknowledgment. These documents are + // potentially inconsistent with the backend's copy and use the write's + // commit version as their document version. + bool has_committed_mutations = 4; } diff --git a/Firestore/Protos/protos/firestore/local/mutation.proto b/Firestore/Protos/protos/firestore/local/mutation.proto index 6087f877d71..ea448c89a64 100644 --- a/Firestore/Protos/protos/firestore/local/mutation.proto +++ b/Firestore/Protos/protos/firestore/local/mutation.proto @@ -1,3 +1,17 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; import "google/firestore/v1beta1/write.proto"; diff --git a/Firestore/Protos/protos/firestore/local/target.proto b/Firestore/Protos/protos/firestore/local/target.proto index 7f0a886c4a8..a0cd25b8a2d 100644 --- a/Firestore/Protos/protos/firestore/local/target.proto +++ b/Firestore/Protos/protos/firestore/local/target.proto @@ -1,3 +1,17 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + syntax = "proto3"; package firestore.client; @@ -22,6 +36,7 @@ message Target { // The last snapshot version received from the Watch Service for this target. // // This is the same value as TargetChange.read_time + // https://github.com/googleapis/googleapis/blob/master/google/firestore/v1beta1/firestore.proto#L734 google.protobuf.Timestamp snapshot_version = 2; // An opaque, server-assigned token that allows watching a query to be @@ -38,6 +53,7 @@ message Target { // the client should use the snapshot_version for its own purposes. // // This is the same value as TargetChange.resume_token + // https://github.com/googleapis/googleapis/blob/master/google/firestore/v1beta1/firestore.proto#L722 bytes resume_token = 3; // A sequence number representing the last time this query was listened to,