From 3ffa8acb61775965881044b98ad4bf518daa0c8c Mon Sep 17 00:00:00 2001 From: Alexandr Burdiyan Date: Fri, 1 Nov 2024 16:27:10 +0100 Subject: [PATCH] Initial implementation of deletes --- backend/api/documents/v3alpha/dochistory.go | 2 +- backend/api/documents/v3alpha/documents.go | 209 ++- .../api/documents/v3alpha/documents_test.go | 131 ++ backend/blob/blob.go | 10 + backend/blob/blob_ref.go | 41 +- backend/blob/index.go | 98 +- .../documents/v3alpha/documents.pb.go | 1528 ++++++++++++----- .../documents/v3alpha/documents_grpc.pb.go | 83 + .../documents/v3alpha/documents_connect.ts | 27 +- .../documents/v3alpha/documents_pb.ts | 441 ++++- proto/documents/v3alpha/documents.proto | 122 +- proto/documents/v3alpha/go.gensum | 4 +- proto/documents/v3alpha/js.gensum | 4 +- 13 files changed, 2221 insertions(+), 479 deletions(-) diff --git a/backend/api/documents/v3alpha/dochistory.go b/backend/api/documents/v3alpha/dochistory.go index 7b1a06f5..f7603610 100644 --- a/backend/api/documents/v3alpha/dochistory.go +++ b/backend/api/documents/v3alpha/dochistory.go @@ -52,7 +52,7 @@ func (srv *Server) ListDocumentChanges(ctx context.Context, in *documents.ListDo // We need to just use the database index, but it's currently too painful to work with, // because we don't track latest heads for each space+path. - doc, err := srv.loadDocument(ctx, acc, in.Path, docmodel.Version(in.Version), false) + doc, err := srv.loadDocument(ctx, acc, in.Path, docmodel.Version(in.Version), false, false) if err != nil { return nil, err } diff --git a/backend/api/documents/v3alpha/documents.go b/backend/api/documents/v3alpha/documents.go index 0c7798ab..77e42431 100644 --- a/backend/api/documents/v3alpha/documents.go +++ b/backend/api/documents/v3alpha/documents.go @@ -17,6 +17,7 @@ import ( "seed/backend/util/errutil" "seed/backend/util/sqlite" "seed/backend/util/sqlite/sqlitex" + "time" blocks "github.com/ipfs/go-block-format" "github.com/ipfs/go-cid" @@ -26,6 +27,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/timestamppb" ) // Server implements Documents API v3. @@ -66,7 +68,7 @@ func (srv *Server) GetDocument(ctx context.Context, in *documents.GetDocumentReq return nil, err } - doc, err := srv.loadDocument(ctx, ns, in.Path, docmodel.Version(in.Version), false) + doc, err := srv.loadDocument(ctx, ns, in.Path, docmodel.Version(in.Version), false, in.IgnoreDeleted) if err != nil { return nil, err } @@ -120,7 +122,7 @@ func (srv *Server) CreateDocumentChange(ctx context.Context, in *documents.Creat ver := docmodel.Version(in.BaseVersion) - doc, err := srv.loadDocument(ctx, ns, in.Path, ver, true) + doc, err := srv.loadDocument(ctx, ns, in.Path, ver, true, false) if err != nil { return nil, err } @@ -296,7 +298,7 @@ func (srv *Server) ListDocuments(ctx context.Context, in *documents.ListDocument } } - out := documents.ListDocumentsResponse{ + out := &documents.ListDocumentsResponse{ Documents: make([]*documents.DocumentListItem, 0, in.PageSize), } @@ -345,14 +347,36 @@ func (srv *Server) ListDocuments(ctx context.Context, in *documents.ListDocument release() for _, req := range requests { doc, err := srv.GetDocument(ctx, req) - if err != nil { + switch { + // If we are asking about deleted only, but the Get returns OK, then it's not deleted. + case in.DeletedOnly && err == nil: + continue + case in.DeletedOnly && err != nil: + status, ok := status.FromError(err) + if !ok { + return nil, err + } + // Failed precondition error code means the doc is deleted. + if status.Code() == codes.FailedPrecondition { + req.IgnoreDeleted = true + doc, err = srv.GetDocument(ctx, req) + if err != nil { + srv.log.Warn("GetDocumentFailedForDeletedDocument", zap.String("space", req.Account), zap.String("path", req.Path)) + continue + } + out.Documents = append(out.Documents, DocumentToListItem(doc)) + continue + } else { + continue + } + case !in.DeletedOnly && err == nil: + out.Documents = append(out.Documents, DocumentToListItem(doc)) + case !in.DeletedOnly && err != nil: continue } - // TODO: use indexed data instead of loading the entire document. - out.Documents = append(out.Documents, DocumentToListItem(doc)) } - return &out, nil + return out, nil } var qListDocuments = dqb.Str(` @@ -368,7 +392,147 @@ var qListDocuments = dqb.Str(` // DeleteDocument implements Documents API v3. func (srv *Server) DeleteDocument(ctx context.Context, in *documents.DeleteDocumentRequest) (*emptypb.Empty, error) { - return nil, status.Error(codes.Unimplemented, "DeleteDocument is not implemented yet") + return nil, status.Error(codes.Unimplemented, "Deprecated: Use CreateRef") +} + +// CreateRef implements Documents API v3. +func (srv *Server) CreateRef(ctx context.Context, in *documents.CreateRefRequest) (*documents.Ref, error) { + { + if in.Account == "" { + return nil, errutil.MissingArgument("account") + } + + if in.SigningKeyName == "" { + return nil, errutil.MissingArgument("signing_key_name") + } + + if in.Target == nil { + return nil, errutil.MissingArgument("target") + } + } + + ns, err := core.DecodePrincipal(in.Account) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "faield to decode account ID: %v", err) + } + + kp, err := srv.keys.GetKey(ctx, in.SigningKeyName) + if err != nil { + return nil, err + } + + var capc cid.Cid + if in.Capability != "" { + capc, err = cid.Decode(in.Capability) + if err != nil { + return nil, err + } + } + + if err := srv.checkWriteAccess(ctx, ns, in.Path, kp, capc); err != nil { + return nil, err + } + + if in.Path == "" { + return nil, status.Errorf(codes.Unimplemented, "TODO: creating Refs for root documents is not implemented yet") + } + + var ts time.Time + if in.Timestamp != nil { + ts = in.Timestamp.AsTime().Round(blob.ClockPrecision) + } else { + ts = cclock.New().MustNow() + } + + var refBlob blob.Encoded[*blob.Ref] + + switch in.Target.Target.(type) { + case *documents.RefTarget_Version_: + return nil, status.Errorf(codes.Unimplemented, "version Ref target is not implemented yet") + case *documents.RefTarget_Tombstone_: + refBlob, err = blob.NewRefTombstone(kp, ns, in.Path, ts) + if err != nil { + return nil, err + } + case *documents.RefTarget_Redirect_: + return nil, status.Errorf(codes.Unimplemented, "redirect Ref target is not implemented yet") + default: + return nil, fmt.Errorf("BUG: unhandled ref target type case") + } + + if err := srv.idx.Put(ctx, refBlob); err != nil { + return nil, err + } + + return refToProto(refBlob.CID, refBlob.Decoded) +} + +// GetRef implements Documents API v3. +func (srv *Server) GetRef(ctx context.Context, in *documents.GetRefRequest) (*documents.Ref, error) { + if in.Id == "" { + return nil, errutil.MissingArgument("id") + } + + c, err := cid.Decode(in.Id) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "failed to parse Ref ID: %v", err) + } + + ref, err := srv.getRef(ctx, c) + if err != nil { + return nil, err + } + + return refToProto(ref.CID, ref.Value) +} + +func refToProto(c cid.Cid, ref *blob.Ref) (*documents.Ref, error) { + pb := &documents.Ref{ + Id: c.String(), + Account: ref.GetSpace().String(), + Path: ref.Path, + Signer: ref.Signer.String(), + Timestamp: timestamppb.New(ref.Ts), + } + + switch { + case ref.GenesisBlob.Defined() && len(ref.Heads) > 0: + pb.Target = &documents.RefTarget{ + Target: &documents.RefTarget_Version_{ + Version: &documents.RefTarget_Version{ + Genesis: ref.GenesisBlob.String(), + Version: string(blob.NewVersion(ref.Heads...)), + }, + }, + } + case !ref.GenesisBlob.Defined() && len(ref.Heads) == 0: + pb.Target = &documents.RefTarget{ + Target: &documents.RefTarget_Tombstone_{ + Tombstone: &documents.RefTarget_Tombstone{}, + }, + } + default: + return nil, fmt.Errorf("refToProto: invalid original ref %s: %+v", c, ref) + } + + return pb, nil +} + +func (srv *Server) getRef(ctx context.Context, c cid.Cid) (hb blob.WithCID[*blob.Ref], err error) { + blk, err := srv.idx.Get(ctx, c) + if err != nil { + return hb, err + } + + ref := &blob.Ref{} + if err := cbornode.DecodeInto(blk.RawData(), ref); err != nil { + return hb, err + } + + return blob.WithCID[*blob.Ref]{ + CID: blk.Cid(), + Value: ref, + }, nil } func (srv *Server) ensureProfileGenesis(ctx context.Context, kp core.KeyPair) error { @@ -403,20 +567,38 @@ func makeIRI(account core.Principal, path string) (blob.IRI, error) { return blob.NewIRI(account, path) } -func (srv *Server) loadDocument(ctx context.Context, account core.Principal, path string, version docmodel.Version, ensurePath bool) (*docmodel.Document, error) { +func (srv *Server) loadDocument(ctx context.Context, account core.Principal, path string, version docmodel.Version, ensurePath bool, ignoreDeleted bool) (*docmodel.Document, error) { iri, err := makeIRI(account, path) if err != nil { return nil, err } + heads, err := version.Parse() + if err != nil { + return nil, err + } + clock := cclock.New() doc, err := docmodel.New(iri, clock) if err != nil { return nil, err } + // We only check if it's deleted if we are asked about the latest version, + // unless we explicitly say to ignore deletions. + if version == "" && !ignoreDeleted { + isDeleted, err := srv.idx.IsDeleted(ctx, iri) + if err != nil { + return nil, err + } + + if isDeleted { + return nil, status.Errorf(codes.FailedPrecondition, "document is marked as deleted") + } + } + var outErr error - changes, check := srv.idx.IterChanges(ctx, iri, account) + changes, check := srv.idx.IterChanges(ctx, iri) for _, ch := range changes { if err := doc.ApplyChange(ch.CID, ch.Data); err != nil { outErr = errors.Join(outErr, err) @@ -432,12 +614,7 @@ func (srv *Server) loadDocument(ctx context.Context, account core.Principal, pat return nil, status.Errorf(codes.NotFound, "document not found: %s", iri) } - if version != "" { - heads, err := version.Parse() - if err != nil { - return nil, err - } - + if len(heads) > 0 { doc, err = doc.Checkout(heads) if err != nil { return nil, fmt.Errorf("failed to checkout version: %w", err) diff --git a/backend/api/documents/v3alpha/documents_test.go b/backend/api/documents/v3alpha/documents_test.go index e6399866..117ed818 100644 --- a/backend/api/documents/v3alpha/documents_test.go +++ b/backend/api/documents/v3alpha/documents_test.go @@ -466,6 +466,137 @@ func TestCreateDocumentChangeWithTimestamp(t *testing.T) { require.Error(t, err, "creating change with old timestamps must fail") } +func TestTombstoneRef(t *testing.T) { + t.Parallel() + + alice := newTestDocsAPI(t, "alice") + ctx := context.Background() + + home, err := alice.CreateDocumentChange(ctx, &documents.CreateDocumentChangeRequest{ + SigningKeyName: "main", + Account: alice.me.Account.Principal().String(), + Path: "", + Changes: []*documents.DocumentChange{ + {Op: &documents.DocumentChange_SetMetadata_{ + SetMetadata: &documents.DocumentChange_SetMetadata{Key: "title", Value: "Alice's profile"}, + }}, + }, + }) + require.NoError(t, err) + + // Just in case testing that creating refs for home docs fails. + { + ref, err := alice.CreateRef(ctx, &documents.CreateRefRequest{ + Account: home.Account, + Path: home.Path, + SigningKeyName: "main", + Target: &documents.RefTarget{ + Target: &documents.RefTarget_Tombstone_{ + Tombstone: &documents.RefTarget_Tombstone{}, + }, + }, + }) + _ = ref + require.Error(t, err, "creating refs for home docs must fail") + } + + doc, err := alice.CreateDocumentChange(ctx, &documents.CreateDocumentChangeRequest{ + SigningKeyName: "main", + Account: alice.me.Account.Principal().String(), + Path: "/hello", + Changes: []*documents.DocumentChange{ + {Op: &documents.DocumentChange_SetMetadata_{ + SetMetadata: &documents.DocumentChange_SetMetadata{Key: "title", Value: "Hello World"}, + }}, + }, + }) + require.NoError(t, err) + + tombstone, err := alice.CreateRef(ctx, &documents.CreateRefRequest{ + SigningKeyName: "main", + Account: doc.Account, + Path: doc.Path, + Target: &documents.RefTarget{ + Target: &documents.RefTarget_Tombstone_{ + Tombstone: &documents.RefTarget_Tombstone{}, + }, + }, + }) + require.NoError(t, err) + + want := &documents.Ref{ + Id: tombstone.Id, + Account: "z6MkvFrq593SZ3QNsAgXdsHC2CJGrrwUdwxY2EdRGaT4UbYj", + Path: "/hello", + Target: &documents.RefTarget{ + Target: &documents.RefTarget_Tombstone_{ + Tombstone: &documents.RefTarget_Tombstone{}, + }, + }, + Signer: "z6MkvFrq593SZ3QNsAgXdsHC2CJGrrwUdwxY2EdRGaT4UbYj", + Capability: "", + Timestamp: tombstone.Timestamp, + } + testutil.StructsEqual(want, tombstone).Compare(t, "tombstone ref must match") + require.True(t, tombstone.Timestamp.AsTime().After(time.Now().Add(time.Hour*-1)), "ref timestamp must be set around the current time") + + // Now let's check the document disappears from the Get request. + { + got, err := alice.GetDocument(ctx, &documents.GetDocumentRequest{ + Account: tombstone.Account, + Path: tombstone.Path, + }) + require.Error(t, err, "getting deleted document must fail") + require.Nil(t, got) + } + + // Getting previous versions should work though. + { + got, err := alice.GetDocument(ctx, &documents.GetDocumentRequest{ + Account: doc.Account, + Path: doc.Path, + Version: doc.Version, + }) + require.NoError(t, err) + testutil.StructsEqual(doc, got).Compare(t, "getting doc with version must succeed even if deleted") + } + + // We should be able to get the latest version prior to deletion. + { + got, err := alice.GetDocument(ctx, &documents.GetDocumentRequest{ + Account: doc.Account, + Path: doc.Path, + Version: "", + IgnoreDeleted: true, + }) + require.NoError(t, err, "ignore deleted should work in Get") + testutil.StructsEqual(doc, got).Compare(t, "getting doc with version must succeed even if deleted") + } + + // Deleted docs must disappear from the lists. + { + list, err := alice.ListDocuments(ctx, &documents.ListDocumentsRequest{ + Account: alice.me.Account.Principal().String(), + PageSize: 100, + }) + require.NoError(t, err) + require.Len(t, list.Documents, 1, "only initial root document must be in the list") + testutil.StructsEqual(DocumentToListItem(home), list.Documents[0]).Compare(t, "listing must only show home document") + } + + // But we also want to list the deleted docs. + { + list, err := alice.ListDocuments(ctx, &documents.ListDocumentsRequest{ + Account: alice.me.Account.Principal().String(), + PageSize: 100, + DeletedOnly: true, + }) + require.NoError(t, err) + require.Len(t, list.Documents, 1, "only the deleted document must be in the list") + testutil.StructsEqual(DocumentToListItem(doc), list.Documents[0]).Compare(t, "listing must only show home document") + } +} + type testServer struct { *Server me coretest.Tester diff --git a/backend/blob/blob.go b/backend/blob/blob.go index fa8420b8..40ecba08 100644 --- a/backend/blob/blob.go +++ b/backend/blob/blob.go @@ -7,6 +7,7 @@ import ( "slices" "time" + "github.com/ipfs/go-cid" cbornode "github.com/ipfs/go-ipld-cbor" "github.com/polydawn/refmt/obj/atlas" ) @@ -116,3 +117,12 @@ func verifyBlob(signer core.Principal, v any, sig *core.Signature) error { return nil } + +// WithCID is a type for a decoded blob with its CID. +// Because blobs are content-addressed, they don't contain their own ID, +// so when you decode them, you somehow need to separately carry their IDs if you need to. +// This type provides a unified way of doing this. +type WithCID[T any] struct { + CID cid.Cid + Value T +} diff --git a/backend/blob/blob_ref.go b/backend/blob/blob_ref.go index aebefd0c..83823dcc 100644 --- a/backend/blob/blob_ref.go +++ b/backend/blob/blob_ref.go @@ -28,7 +28,7 @@ type Ref struct { Space core.Principal `refmt:"space,omitempty"` Path string `refmt:"path,omitempty"` - GenesisBlob cid.Cid `refmt:"genesisBlob"` + GenesisBlob cid.Cid `refmt:"genesisBlob,omitempty"` Capability cid.Cid `refmt:"capability,omitempty"` Heads []cid.Cid `refmt:"heads"` } @@ -57,6 +57,28 @@ func NewRef(kp core.KeyPair, genesis cid.Cid, space core.Principal, path string, return encodeBlob(ru) } +// NewRefTombstone creates a new tombstone Ref. +func NewRefTombstone(kp core.KeyPair, space core.Principal, path string, ts time.Time) (eb Encoded[*Ref], err error) { + ru := &Ref{ + baseBlob: baseBlob{ + Type: blobTypeRef, + Signer: kp.Principal(), + Ts: ts, + }, + Path: path, + } + + if !kp.Principal().Equal(space) { + ru.Space = space + } + + if err := signBlob(kp, ru, &ru.baseBlob.Sig); err != nil { + return eb, nil + } + + return encodeBlob(ru) +} + // GetSpace returns the space the Ref is applied to. func (r *Ref) GetSpace() core.Principal { if len(r.Space) == 0 { @@ -92,6 +114,10 @@ func init() { } func indexRef(ictx *indexingCtx, id int64, c cid.Cid, v *Ref) error { + type Meta struct { + Tombstone bool `json:"tombstone,omitempty"` + } + // TODO(hm24): more validation and refs for docs. iri, err := NewIRI(v.GetSpace(), v.Path) @@ -106,8 +132,17 @@ func indexRef(ictx *indexingCtx, id int64, c cid.Cid, v *Ref) error { sb = newStructuralBlob(c, string(blobTypeRef), v.Signer, v.Ts, iri, v.GenesisBlob, nil, time.Time{}) } - if len(v.Heads) == 0 { - return fmt.Errorf("ref blob must have heads") + switch { + // A normal Ref has to have Genesis and Heads. + case v.GenesisBlob.Defined() && len(v.Heads) > 0: + // A tombstone Ref must have no Genesis and no Heads. + case !v.GenesisBlob.Defined() && len(v.Heads) == 0: + sb.Meta = Meta{ + Tombstone: true, + } + // All the other cases are invalid. + default: + return fmt.Errorf("invalid Ref blob invariants") } for _, head := range v.Heads { diff --git a/backend/blob/index.go b/backend/blob/index.go index c137e1dd..795b1bde 100644 --- a/backend/blob/index.go +++ b/backend/blob/index.go @@ -138,11 +138,19 @@ type ChangeRecord struct { Data *Change } -func (idx *Index) IterChanges(ctx context.Context, resource IRI, author core.Principal) (it iter.Seq2[int, ChangeRecord], check func() error) { +// IterChanges iterates over changes for a given resource. +func (idx *Index) IterChanges(ctx context.Context, resource IRI) (it iter.Seq2[int, ChangeRecord], check func() error) { var outErr error check = func() error { return outErr } + it = func(yield func(int, ChangeRecord) bool) { + space, _, err := resource.SpacePath() + if err != nil { + outErr = err + return + } + conn, release, err := idx.db.Conn(ctx) if err != nil { outErr = err @@ -151,7 +159,7 @@ func (idx *Index) IterChanges(ctx context.Context, resource IRI, author core.Pri defer release() buf := make([]byte, 0, 1024*1024) // preallocating 1MB for decompression. - rows, check := sqlitex.Query(conn, qIterChanges(), resource, author, author, resource) + rows, check := sqlitex.Query(conn, qIterChanges(), resource, space, space, resource) var i int for row := range rows { next := sqlite.NewIncrementor(0) @@ -234,6 +242,48 @@ var qIterChanges = dqb.Str(` ORDER BY sb.ts `) +// IsDeleted checks whether a given resource is deleted. +func (idx *Index) IsDeleted(ctx context.Context, resource IRI) (deleted bool, err error) { + conn, release, err := idx.db.Conn(ctx) + if err != nil { + return false, err + } + defer release() + + space, _, err := resource.SpacePath() + if err != nil { + return false, err + } + + rows, check := sqlitex.Query(conn, qIsDeleted(), resource, space, space, resource) + for row := range rows { + deleted = row.ColumnInt(0) == 1 + } + if err := check(); err != nil { + return false, err + } + + return deleted, nil +} + +var qIsDeleted = dqb.Str(` + SELECT + COALESCE(extra_attrs->>'tombstone', 0) AS is_deleted + FROM structural_blobs + WHERE type = 'Ref' + AND resource = (SELECT id FROM resources WHERE iri = :iri) + AND (author = (SELECT id FROM public_keys WHERE principal = :space) OR author IN ( + SELECT DISTINCT extra_attrs->>'del' + FROM structural_blobs + WHERE type = 'Capability' + AND author = (SELECT id FROM public_keys WHERE principal = :space2) + AND resource IN (SELECT id FROM resources WHERE :iri2 BETWEEN iri AND iri || '~~~~~~') + )) + GROUP BY resource + HAVING ts = MAX(ts) + LIMIT 1 +`) + func (idx *Index) WalkCapabilities(ctx context.Context, resource IRI, author core.Principal, fn func(cid.Cid, *Capability) error) error { conn, release, err := idx.db.Conn(ctx) if err != nil { @@ -300,7 +350,7 @@ func (idx *Index) IterComments(ctx context.Context, resource IRI) (it iter.Seq2[ defer release() buf := make([]byte, 0, 1024*1024) // preallocating 1MB for decompression. - rows, check := sqlitex.Query(conn, qWalkComments(), resource) + rows, check := sqlitex.Query(conn, qIterComments(), resource) for row := range rows { var ( codec = row.ColumnInt64(0) @@ -334,47 +384,7 @@ func (idx *Index) IterComments(ctx context.Context, resource IRI) (it iter.Seq2[ return it, check } -func (idx *Index) WalkComments(ctx context.Context, resource IRI, fn func(cid.Cid, *Comment) error) error { - conn, release, err := idx.db.Conn(ctx) - if err != nil { - return err - } - defer release() - - buf := make([]byte, 0, 1024*1024) // preallocating 1MB for decompression. - if err := sqlitex.Exec(conn, qWalkComments(), func(stmt *sqlite.Stmt) error { - var ( - codec = stmt.ColumnInt64(0) - hash = stmt.ColumnBytesUnsafe(1) - data = stmt.ColumnBytesUnsafe(2) - ) - - buf, err = idx.bs.decoder.DecodeAll(data, buf) - if err != nil { - return err - } - - chcid := cid.NewCidV1(uint64(codec), hash) - cmt := &Comment{} - if err := cbornode.DecodeInto(buf, cmt); err != nil { - return fmt.Errorf("WalkChanges: failed to decode change %s for entity %s: %w", chcid, resource, err) - } - - if err := fn(chcid, cmt); err != nil { - return err - } - - buf = buf[:0] // reset the slice reusing the backing array - - return nil - }, resource); err != nil { - return err - } - - return nil -} - -var qWalkComments = dqb.Str(` +var qIterComments = dqb.Str(` SELECT b.codec, b.multihash, diff --git a/backend/genproto/documents/v3alpha/documents.pb.go b/backend/genproto/documents/v3alpha/documents.pb.go index 8ab94d1e..13d6585b 100644 --- a/backend/genproto/documents/v3alpha/documents.pb.go +++ b/backend/genproto/documents/v3alpha/documents.pb.go @@ -34,7 +34,12 @@ type GetDocumentRequest struct { // Empty string means root document. Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` // Optional. Exact version of the document to retrieve. + // Empty version means "latest". Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + // Optional. Only applicable when requesting the latest version + // (i.e. when version field is empty). + // When this flag is set, the server will return the latest version known prior to deletion. + IgnoreDeleted bool `protobuf:"varint,4,opt,name=ignore_deleted,json=ignoreDeleted,proto3" json:"ignore_deleted,omitempty"` } func (x *GetDocumentRequest) Reset() { @@ -90,6 +95,13 @@ func (x *GetDocumentRequest) GetVersion() string { return "" } +func (x *GetDocumentRequest) GetIgnoreDeleted() bool { + if x != nil { + return x.IgnoreDeleted + } + return false +} + // Request to create a new document change. type CreateDocumentChangeRequest struct { state protoimpl.MessageState @@ -383,8 +395,10 @@ type ListDocumentsRequest struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // Optional. Number of results per page. Default is defined by the server. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. Only list documents for those paths that are deleted. + DeletedOnly bool `protobuf:"varint,3,opt,name=deleted_only,json=deletedOnly,proto3" json:"deleted_only,omitempty"` // Optional. Value from next_page_token obtained from a previous response. - PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` } func (x *ListDocumentsRequest) Reset() { @@ -433,6 +447,13 @@ func (x *ListDocumentsRequest) GetPageSize() int32 { return 0 } +func (x *ListDocumentsRequest) GetDeletedOnly() bool { + if x != nil { + return x.DeletedOnly + } + return false +} + func (x *ListDocumentsRequest) GetPageToken() string { if x != nil { return x.PageToken @@ -641,6 +662,154 @@ func (x *ListDocumentChangesResponse) GetNextPageToken() string { return "" } +// Request to create a Ref. +type CreateRefRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The ID of the account/space in which to create the Ref. + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Required. Path of the new Ref. + // Empty string means root document. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // Required. Target for the new Ref. + Target *RefTarget `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + // Required. Name of the signing key to use for signing the Ref. + SigningKeyName string `protobuf:"bytes,4,opt,name=signing_key_name,json=signingKeyName,proto3" json:"signing_key_name,omitempty"` + // Optional. ID of the Capability blob that grants the necessary rights to the signin key + // to write Refs for the requested account + path. + Capability string `protobuf:"bytes,5,opt,name=capability,proto3" json:"capability,omitempty"` + // Optional. A timestamp of the Ref blob. + // If not specified the server will use the current time. + // The provided timestamp will be rounded to the nearest millisecond, + // so the final timestamp in the resulting Ref blob may not be exactly as provided. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *CreateRefRequest) Reset() { + *x = CreateRefRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v3alpha_documents_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateRefRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateRefRequest) ProtoMessage() {} + +func (x *CreateRefRequest) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateRefRequest.ProtoReflect.Descriptor instead. +func (*CreateRefRequest) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateRefRequest) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *CreateRefRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CreateRefRequest) GetTarget() *RefTarget { + if x != nil { + return x.Target + } + return nil +} + +func (x *CreateRefRequest) GetSigningKeyName() string { + if x != nil { + return x.SigningKeyName + } + return "" +} + +func (x *CreateRefRequest) GetCapability() string { + if x != nil { + return x.Capability + } + return "" +} + +func (x *CreateRefRequest) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Request to get a Ref by ID. +type GetRefRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. ID of the Ref blob to retrieve. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetRefRequest) Reset() { + *x = GetRefRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v3alpha_documents_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRefRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRefRequest) ProtoMessage() {} + +func (x *GetRefRequest) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRefRequest.ProtoReflect.Descriptor instead. +func (*GetRefRequest) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{10} +} + +func (x *GetRefRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + // Information about a particular document version. type DocumentChangeInfo struct { state protoimpl.MessageState @@ -660,7 +829,7 @@ type DocumentChangeInfo struct { func (x *DocumentChangeInfo) Reset() { *x = DocumentChangeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[9] + mi := &file_documents_v3alpha_documents_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -673,7 +842,7 @@ func (x *DocumentChangeInfo) String() string { func (*DocumentChangeInfo) ProtoMessage() {} func (x *DocumentChangeInfo) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[9] + mi := &file_documents_v3alpha_documents_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -686,7 +855,7 @@ func (x *DocumentChangeInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use DocumentChangeInfo.ProtoReflect.Descriptor instead. func (*DocumentChangeInfo) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{9} + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{11} } func (x *DocumentChangeInfo) GetId() string { @@ -746,7 +915,7 @@ type DocumentListItem struct { func (x *DocumentListItem) Reset() { *x = DocumentListItem{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[10] + mi := &file_documents_v3alpha_documents_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -759,7 +928,7 @@ func (x *DocumentListItem) String() string { func (*DocumentListItem) ProtoMessage() {} func (x *DocumentListItem) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[10] + mi := &file_documents_v3alpha_documents_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -772,7 +941,7 @@ func (x *DocumentListItem) ProtoReflect() protoreflect.Message { // Deprecated: Use DocumentListItem.ProtoReflect.Descriptor instead. func (*DocumentListItem) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{10} + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{12} } func (x *DocumentListItem) GetAccount() string { @@ -862,7 +1031,7 @@ type Document struct { func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[11] + mi := &file_documents_v3alpha_documents_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -875,7 +1044,7 @@ func (x *Document) String() string { func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[11] + mi := &file_documents_v3alpha_documents_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -888,7 +1057,7 @@ func (x *Document) ProtoReflect() protoreflect.Message { // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{11} + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{13} } func (x *Document) GetAccount() string { @@ -969,7 +1138,7 @@ type BlockNode struct { func (x *BlockNode) Reset() { *x = BlockNode{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[12] + mi := &file_documents_v3alpha_documents_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -982,7 +1151,7 @@ func (x *BlockNode) String() string { func (*BlockNode) ProtoMessage() {} func (x *BlockNode) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[12] + mi := &file_documents_v3alpha_documents_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -995,7 +1164,7 @@ func (x *BlockNode) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockNode.ProtoReflect.Descriptor instead. func (*BlockNode) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{12} + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{14} } func (x *BlockNode) GetBlock() *Block { @@ -1039,7 +1208,7 @@ type Block struct { func (x *Block) Reset() { *x = Block{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[13] + mi := &file_documents_v3alpha_documents_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1052,7 +1221,7 @@ func (x *Block) String() string { func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[13] + mi := &file_documents_v3alpha_documents_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1065,7 +1234,7 @@ func (x *Block) ProtoReflect() protoreflect.Message { // Deprecated: Use Block.ProtoReflect.Descriptor instead. func (*Block) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{13} + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{15} } func (x *Block) GetId() string { @@ -1148,7 +1317,7 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[14] + mi := &file_documents_v3alpha_documents_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1161,7 +1330,7 @@ func (x *Annotation) String() string { func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[14] + mi := &file_documents_v3alpha_documents_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1174,7 +1343,7 @@ func (x *Annotation) ProtoReflect() protoreflect.Message { // Deprecated: Use Annotation.ProtoReflect.Descriptor instead. func (*Annotation) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{14} + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{16} } func (x *Annotation) GetType() string { @@ -1230,7 +1399,7 @@ type DocumentChange struct { func (x *DocumentChange) Reset() { *x = DocumentChange{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[15] + mi := &file_documents_v3alpha_documents_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1243,7 +1412,7 @@ func (x *DocumentChange) String() string { func (*DocumentChange) ProtoMessage() {} func (x *DocumentChange) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[15] + mi := &file_documents_v3alpha_documents_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1256,7 +1425,7 @@ func (x *DocumentChange) ProtoReflect() protoreflect.Message { // Deprecated: Use DocumentChange.ProtoReflect.Descriptor instead. func (*DocumentChange) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{15} + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{17} } func (m *DocumentChange) GetOp() isDocumentChange_Op { @@ -1326,39 +1495,45 @@ func (*DocumentChange_ReplaceBlock) isDocumentChange_Op() {} func (*DocumentChange_DeleteBlock) isDocumentChange_Op() {} -// Operation to move an existing block to a different place in the document. -// Move and Create operations are both expressed with this. -// Conceptually new blocks are moved out of nowhere into the document. -type DocumentChange_MoveBlock struct { +// Description of a Ref blob. +type Ref struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // ID of the block to move. - BlockId string `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - // ID of the new parent for the block being moved. - Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` - // ID of the new left sibling for the block being moved. - LeftSibling string `protobuf:"bytes,3,opt,name=left_sibling,json=leftSibling,proto3" json:"left_sibling,omitempty"` + // CID of the Ref blob. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Account (space) in which the Ref blob exists. + Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` + // Path in the account Ref creates an entry for. + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + // Description of where the Ref points to. + Target *RefTarget `protobuf:"bytes,4,opt,name=target,proto3" json:"target,omitempty"` + // Public key used to sign the Ref blob. + Signer string `protobuf:"bytes,5,opt,name=signer,proto3" json:"signer,omitempty"` + // Optional. ID of the Capability attached to this Ref. + Capability string `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"` + // Timestamp of the Ref. + Timestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } -func (x *DocumentChange_MoveBlock) Reset() { - *x = DocumentChange_MoveBlock{} +func (x *Ref) Reset() { + *x = Ref{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[20] + mi := &file_documents_v3alpha_documents_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DocumentChange_MoveBlock) String() string { +func (x *Ref) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DocumentChange_MoveBlock) ProtoMessage() {} +func (*Ref) ProtoMessage() {} -func (x *DocumentChange_MoveBlock) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[20] +func (x *Ref) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1369,61 +1544,93 @@ func (x *DocumentChange_MoveBlock) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DocumentChange_MoveBlock.ProtoReflect.Descriptor instead. -func (*DocumentChange_MoveBlock) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{15, 0} +// Deprecated: Use Ref.ProtoReflect.Descriptor instead. +func (*Ref) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{18} } -func (x *DocumentChange_MoveBlock) GetBlockId() string { +func (x *Ref) GetId() string { if x != nil { - return x.BlockId + return x.Id } return "" } -func (x *DocumentChange_MoveBlock) GetParent() string { +func (x *Ref) GetAccount() string { if x != nil { - return x.Parent + return x.Account } return "" } -func (x *DocumentChange_MoveBlock) GetLeftSibling() string { +func (x *Ref) GetPath() string { if x != nil { - return x.LeftSibling + return x.Path } return "" } -// Operation to replace a metadata field with a new value -type DocumentChange_SetMetadata struct { +func (x *Ref) GetTarget() *RefTarget { + if x != nil { + return x.Target + } + return nil +} + +func (x *Ref) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *Ref) GetCapability() string { + if x != nil { + return x.Capability + } + return "" +} + +func (x *Ref) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +// Description of where the Ref points to. +type RefTarget struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Metadata key to set. - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - // Metadata value to set. - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // A Ref can point to one of the following targets. + // + // Types that are assignable to Target: + // + // *RefTarget_Version_ + // *RefTarget_Redirect_ + // *RefTarget_Tombstone_ + Target isRefTarget_Target `protobuf_oneof:"target"` } -func (x *DocumentChange_SetMetadata) Reset() { - *x = DocumentChange_SetMetadata{} +func (x *RefTarget) Reset() { + *x = RefTarget{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v3alpha_documents_proto_msgTypes[21] + mi := &file_documents_v3alpha_documents_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DocumentChange_SetMetadata) String() string { +func (x *RefTarget) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DocumentChange_SetMetadata) ProtoMessage() {} +func (*RefTarget) ProtoMessage() {} -func (x *DocumentChange_SetMetadata) ProtoReflect() protoreflect.Message { - mi := &file_documents_v3alpha_documents_proto_msgTypes[21] +func (x *RefTarget) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1434,303 +1641,705 @@ func (x *DocumentChange_SetMetadata) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DocumentChange_SetMetadata.ProtoReflect.Descriptor instead. -func (*DocumentChange_SetMetadata) Descriptor() ([]byte, []int) { - return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{15, 1} +// Deprecated: Use RefTarget.ProtoReflect.Descriptor instead. +func (*RefTarget) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{19} } -func (x *DocumentChange_SetMetadata) GetKey() string { - if x != nil { - return x.Key +func (m *RefTarget) GetTarget() isRefTarget_Target { + if m != nil { + return m.Target } - return "" + return nil } -func (x *DocumentChange_SetMetadata) GetValue() string { - if x != nil { - return x.Value +func (x *RefTarget) GetVersion() *RefTarget_Version { + if x, ok := x.GetTarget().(*RefTarget_Version_); ok { + return x.Version } - return "" + return nil } -var File_documents_v3alpha_documents_proto protoreflect.FileDescriptor +func (x *RefTarget) GetRedirect() *RefTarget_Redirect { + if x, ok := x.GetTarget().(*RefTarget_Redirect_); ok { + return x.Redirect + } + return nil +} -var file_documents_v3alpha_documents_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, - 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb8, 0x02, 0x0a, 0x1b, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x73, - 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x62, 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, - 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x69, - 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x45, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x56, 0x0a, - 0x18, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, - 0x6f, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, - 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, - 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, - 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6c, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8b, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4a, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, - 0x52, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0xa0, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, - 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x44, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, - 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, - 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, - 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x70, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x70, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x9d, 0x03, 0x0a, 0x10, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x56, 0x0a, 0x08, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x12, 0x3b, 0x0a, - 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xce, 0x03, 0x0a, 0x08, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, - 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x18, 0x05, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x12, 0x3f, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x3b, - 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x3b, 0x0a, 0x0d, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x87, 0x01, 0x0a, 0x09, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, - 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x12, 0x41, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, - 0x72, 0x65, 0x6e, 0x22, 0xcb, 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x51, 0x0a, 0x0a, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0b, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, - 0x6f, 0x6e, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x56, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x64, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x65, 0x6e, 0x64, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd3, 0x03, 0x0a, 0x0e, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x5b, - 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0b, - 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x55, 0x0a, 0x0a, 0x6d, - 0x6f, 0x76, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4d, 0x6f, 0x76, 0x65, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x5f, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x0c, - 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x0a, 0x0c, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x1a, 0x61, 0x0a, 0x09, 0x4d, 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, - 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x73, 0x69, 0x62, 0x6c, 0x69, 0x6e, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x65, 0x66, 0x74, 0x53, 0x69, 0x62, - 0x6c, 0x69, 0x6e, 0x67, 0x1a, 0x35, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x04, 0x0a, 0x02, 0x6f, - 0x70, 0x32, 0xc6, 0x05, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x63, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2e, +func (x *RefTarget) GetTombstone() *RefTarget_Tombstone { + if x, ok := x.GetTarget().(*RefTarget_Tombstone_); ok { + return x.Tombstone + } + return nil +} + +type isRefTarget_Target interface { + isRefTarget_Target() +} + +type RefTarget_Version_ struct { + // Version target describes genesis + head changes (version). + Version *RefTarget_Version `protobuf:"bytes,1,opt,name=version,proto3,oneof"` +} + +type RefTarget_Redirect_ struct { + // Redirect target makes a Ref point to a different account + path. + // Users must be careful to not create cycles or very deep redirect chains. + // Client should be careful not to get stuck in redirects + // by tracking visited paths to prevent cycles, + // and by limiting the depth of the redirect chains, + // while handling redirects. + Redirect *RefTarget_Redirect `protobuf:"bytes,2,opt,name=redirect,proto3,oneof"` +} + +type RefTarget_Tombstone_ struct { + // Tombstone Ref indicates the intent to delete the given account + path. + Tombstone *RefTarget_Tombstone `protobuf:"bytes,3,opt,name=tombstone,proto3,oneof"` +} + +func (*RefTarget_Version_) isRefTarget_Target() {} + +func (*RefTarget_Redirect_) isRefTarget_Target() {} + +func (*RefTarget_Tombstone_) isRefTarget_Target() {} + +// Operation to move an existing block to a different place in the document. +// Move and Create operations are both expressed with this. +// Conceptually new blocks are moved out of nowhere into the document. +type DocumentChange_MoveBlock struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the block to move. + BlockId string `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` + // ID of the new parent for the block being moved. + Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"` + // ID of the new left sibling for the block being moved. + LeftSibling string `protobuf:"bytes,3,opt,name=left_sibling,json=leftSibling,proto3" json:"left_sibling,omitempty"` +} + +func (x *DocumentChange_MoveBlock) Reset() { + *x = DocumentChange_MoveBlock{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v3alpha_documents_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DocumentChange_MoveBlock) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DocumentChange_MoveBlock) ProtoMessage() {} + +func (x *DocumentChange_MoveBlock) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DocumentChange_MoveBlock.ProtoReflect.Descriptor instead. +func (*DocumentChange_MoveBlock) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{17, 0} +} + +func (x *DocumentChange_MoveBlock) GetBlockId() string { + if x != nil { + return x.BlockId + } + return "" +} + +func (x *DocumentChange_MoveBlock) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *DocumentChange_MoveBlock) GetLeftSibling() string { + if x != nil { + return x.LeftSibling + } + return "" +} + +// Operation to replace a metadata field with a new value +type DocumentChange_SetMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Metadata key to set. + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Metadata value to set. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *DocumentChange_SetMetadata) Reset() { + *x = DocumentChange_SetMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v3alpha_documents_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DocumentChange_SetMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DocumentChange_SetMetadata) ProtoMessage() {} + +func (x *DocumentChange_SetMetadata) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DocumentChange_SetMetadata.ProtoReflect.Descriptor instead. +func (*DocumentChange_SetMetadata) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{17, 1} +} + +func (x *DocumentChange_SetMetadata) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *DocumentChange_SetMetadata) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type RefTarget_Version struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. ID of the genesis Change. + Genesis string `protobuf:"bytes,1,opt,name=genesis,proto3" json:"genesis,omitempty"` + // Required. Version ID (possibly compount). + // Each change in the version ID must have the same genesis. + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *RefTarget_Version) Reset() { + *x = RefTarget_Version{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v3alpha_documents_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefTarget_Version) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefTarget_Version) ProtoMessage() {} + +func (x *RefTarget_Version) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefTarget_Version.ProtoReflect.Descriptor instead. +func (*RefTarget_Version) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{19, 0} +} + +func (x *RefTarget_Version) GetGenesis() string { + if x != nil { + return x.Genesis + } + return "" +} + +func (x *RefTarget_Version) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type RefTarget_Redirect struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Account ID to which the Ref should redirect. + // Can be the same as the account in the Ref itself, + // when we redirect to a different path in the same account/space. + Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Required. Path to which the Ref should redirect. + // Empty string means root document. + // Must not be the same as the Ref itself. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *RefTarget_Redirect) Reset() { + *x = RefTarget_Redirect{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v3alpha_documents_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefTarget_Redirect) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefTarget_Redirect) ProtoMessage() {} + +func (x *RefTarget_Redirect) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefTarget_Redirect.ProtoReflect.Descriptor instead. +func (*RefTarget_Redirect) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{19, 1} +} + +func (x *RefTarget_Redirect) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *RefTarget_Redirect) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type RefTarget_Tombstone struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RefTarget_Tombstone) Reset() { + *x = RefTarget_Tombstone{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v3alpha_documents_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RefTarget_Tombstone) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefTarget_Tombstone) ProtoMessage() {} + +func (x *RefTarget_Tombstone) ProtoReflect() protoreflect.Message { + mi := &file_documents_v3alpha_documents_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefTarget_Tombstone.ProtoReflect.Descriptor instead. +func (*RefTarget_Tombstone) Descriptor() ([]byte, []int) { + return file_documents_v3alpha_documents_proto_rawDescGZIP(), []int{19, 2} +} + +var File_documents_v3alpha_documents_proto protoreflect.FileDescriptor + +var file_documents_v3alpha_documents_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x64, 0x22, 0xb8, 0x02, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, + 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x45, + 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x56, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, + 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8f, 0x01, + 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0x8f, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x6e, + 0x6c, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x8b, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x09, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x75, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x37, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, - 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x0e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x74, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, + 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x09, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, + 0xa0, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x83, 0x02, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, + 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1f, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8d, 0x01, 0x0a, 0x12, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, + 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x70, 0x73, 0x12, 0x3b, + 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x9d, 0x03, 0x0a, 0x10, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x56, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, + 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x3b, + 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xce, 0x03, 0x0a, 0x08, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x4e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, + 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, + 0x12, 0x3f, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, + 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x87, 0x01, 0x0a, + 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, - 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, + 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x12, 0x41, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, + 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x63, 0x68, + 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x22, 0xcb, 0x02, 0x0a, 0x05, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x51, 0x0a, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, + 0x48, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6d, + 0x61, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x76, + 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf7, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x56, 0x0a, 0x0a, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, + 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x04, 0x65, 0x6e, 0x64, 0x73, 0x1a, + 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd3, + 0x03, 0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x5b, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, + 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, + 0x00, 0x52, 0x0b, 0x73, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x55, + 0x0a, 0x0a, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x4d, + 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x6f, 0x76, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x48, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x00, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, + 0x23, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x61, 0x0a, 0x09, 0x4d, 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x65, 0x66, 0x74, 0x5f, 0x73, 0x69, 0x62, + 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6c, 0x65, 0x66, 0x74, + 0x53, 0x69, 0x62, 0x6c, 0x69, 0x6e, 0x67, 0x1a, 0x35, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x04, + 0x0a, 0x02, 0x6f, 0x70, 0x22, 0xf4, 0x01, 0x0a, 0x03, 0x52, 0x65, 0x66, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, - 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x86, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, + 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x85, 0x03, 0x0a, 0x09, + 0x52, 0x65, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6d, + 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, + 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x52, 0x65, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x12, 0x4f, 0x0a, 0x09, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, + 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x54, 0x6f, 0x6d, + 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x09, 0x74, 0x6f, 0x6d, 0x62, 0x73, 0x74, + 0x6f, 0x6e, 0x65, 0x1a, 0x3d, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, + 0x0a, 0x07, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x1a, 0x38, 0x0a, 0x08, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x1a, 0x0b, 0x0a, 0x09, + 0x54, 0x6f, 0x6d, 0x62, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x32, 0xfd, 0x06, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x63, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x75, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x37, + 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, + 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x60, 0x0a, + 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, + 0x74, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x80, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, + 0x6f, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, + 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x73, 0x65, - 0x65, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x33, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, + 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5a, 0x0a, 0x09, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x66, 0x12, 0x2c, + 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x66, 0x12, 0x54, 0x0a, + 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, + 0x65, 0x64, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x65, 0x64, 0x2e, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x52, 0x65, 0x66, 0x42, 0x33, 0x5a, 0x31, 0x73, 0x65, 0x65, 0x64, 0x2f, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1745,7 +2354,7 @@ func file_documents_v3alpha_documents_proto_rawDescGZIP() []byte { return file_documents_v3alpha_documents_proto_rawDescData } -var file_documents_v3alpha_documents_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_documents_v3alpha_documents_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_documents_v3alpha_documents_proto_goTypes = []any{ (*GetDocumentRequest)(nil), // 0: com.seed.documents.v3alpha.GetDocumentRequest (*CreateDocumentChangeRequest)(nil), // 1: com.seed.documents.v3alpha.CreateDocumentChangeRequest @@ -1756,61 +2365,79 @@ var file_documents_v3alpha_documents_proto_goTypes = []any{ (*ListDocumentsResponse)(nil), // 6: com.seed.documents.v3alpha.ListDocumentsResponse (*ListDocumentChangesRequest)(nil), // 7: com.seed.documents.v3alpha.ListDocumentChangesRequest (*ListDocumentChangesResponse)(nil), // 8: com.seed.documents.v3alpha.ListDocumentChangesResponse - (*DocumentChangeInfo)(nil), // 9: com.seed.documents.v3alpha.DocumentChangeInfo - (*DocumentListItem)(nil), // 10: com.seed.documents.v3alpha.DocumentListItem - (*Document)(nil), // 11: com.seed.documents.v3alpha.Document - (*BlockNode)(nil), // 12: com.seed.documents.v3alpha.BlockNode - (*Block)(nil), // 13: com.seed.documents.v3alpha.Block - (*Annotation)(nil), // 14: com.seed.documents.v3alpha.Annotation - (*DocumentChange)(nil), // 15: com.seed.documents.v3alpha.DocumentChange - nil, // 16: com.seed.documents.v3alpha.DocumentListItem.MetadataEntry - nil, // 17: com.seed.documents.v3alpha.Document.MetadataEntry - nil, // 18: com.seed.documents.v3alpha.Block.AttributesEntry - nil, // 19: com.seed.documents.v3alpha.Annotation.AttributesEntry - (*DocumentChange_MoveBlock)(nil), // 20: com.seed.documents.v3alpha.DocumentChange.MoveBlock - (*DocumentChange_SetMetadata)(nil), // 21: com.seed.documents.v3alpha.DocumentChange.SetMetadata - (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 23: google.protobuf.Empty + (*CreateRefRequest)(nil), // 9: com.seed.documents.v3alpha.CreateRefRequest + (*GetRefRequest)(nil), // 10: com.seed.documents.v3alpha.GetRefRequest + (*DocumentChangeInfo)(nil), // 11: com.seed.documents.v3alpha.DocumentChangeInfo + (*DocumentListItem)(nil), // 12: com.seed.documents.v3alpha.DocumentListItem + (*Document)(nil), // 13: com.seed.documents.v3alpha.Document + (*BlockNode)(nil), // 14: com.seed.documents.v3alpha.BlockNode + (*Block)(nil), // 15: com.seed.documents.v3alpha.Block + (*Annotation)(nil), // 16: com.seed.documents.v3alpha.Annotation + (*DocumentChange)(nil), // 17: com.seed.documents.v3alpha.DocumentChange + (*Ref)(nil), // 18: com.seed.documents.v3alpha.Ref + (*RefTarget)(nil), // 19: com.seed.documents.v3alpha.RefTarget + nil, // 20: com.seed.documents.v3alpha.DocumentListItem.MetadataEntry + nil, // 21: com.seed.documents.v3alpha.Document.MetadataEntry + nil, // 22: com.seed.documents.v3alpha.Block.AttributesEntry + nil, // 23: com.seed.documents.v3alpha.Annotation.AttributesEntry + (*DocumentChange_MoveBlock)(nil), // 24: com.seed.documents.v3alpha.DocumentChange.MoveBlock + (*DocumentChange_SetMetadata)(nil), // 25: com.seed.documents.v3alpha.DocumentChange.SetMetadata + (*RefTarget_Version)(nil), // 26: com.seed.documents.v3alpha.RefTarget.Version + (*RefTarget_Redirect)(nil), // 27: com.seed.documents.v3alpha.RefTarget.Redirect + (*RefTarget_Tombstone)(nil), // 28: com.seed.documents.v3alpha.RefTarget.Tombstone + (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 30: google.protobuf.Empty } var file_documents_v3alpha_documents_proto_depIdxs = []int32{ - 15, // 0: com.seed.documents.v3alpha.CreateDocumentChangeRequest.changes:type_name -> com.seed.documents.v3alpha.DocumentChange - 22, // 1: com.seed.documents.v3alpha.CreateDocumentChangeRequest.timestamp:type_name -> google.protobuf.Timestamp - 10, // 2: com.seed.documents.v3alpha.ListRootDocumentsResponse.documents:type_name -> com.seed.documents.v3alpha.DocumentListItem - 10, // 3: com.seed.documents.v3alpha.ListDocumentsResponse.documents:type_name -> com.seed.documents.v3alpha.DocumentListItem - 9, // 4: com.seed.documents.v3alpha.ListDocumentChangesResponse.changes:type_name -> com.seed.documents.v3alpha.DocumentChangeInfo - 22, // 5: com.seed.documents.v3alpha.DocumentChangeInfo.create_time:type_name -> google.protobuf.Timestamp - 16, // 6: com.seed.documents.v3alpha.DocumentListItem.metadata:type_name -> com.seed.documents.v3alpha.DocumentListItem.MetadataEntry - 22, // 7: com.seed.documents.v3alpha.DocumentListItem.create_time:type_name -> google.protobuf.Timestamp - 22, // 8: com.seed.documents.v3alpha.DocumentListItem.update_time:type_name -> google.protobuf.Timestamp - 17, // 9: com.seed.documents.v3alpha.Document.metadata:type_name -> com.seed.documents.v3alpha.Document.MetadataEntry - 12, // 10: com.seed.documents.v3alpha.Document.content:type_name -> com.seed.documents.v3alpha.BlockNode - 22, // 11: com.seed.documents.v3alpha.Document.create_time:type_name -> google.protobuf.Timestamp - 22, // 12: com.seed.documents.v3alpha.Document.update_time:type_name -> google.protobuf.Timestamp - 13, // 13: com.seed.documents.v3alpha.BlockNode.block:type_name -> com.seed.documents.v3alpha.Block - 12, // 14: com.seed.documents.v3alpha.BlockNode.children:type_name -> com.seed.documents.v3alpha.BlockNode - 18, // 15: com.seed.documents.v3alpha.Block.attributes:type_name -> com.seed.documents.v3alpha.Block.AttributesEntry - 14, // 16: com.seed.documents.v3alpha.Block.annotations:type_name -> com.seed.documents.v3alpha.Annotation - 19, // 17: com.seed.documents.v3alpha.Annotation.attributes:type_name -> com.seed.documents.v3alpha.Annotation.AttributesEntry - 21, // 18: com.seed.documents.v3alpha.DocumentChange.set_metadata:type_name -> com.seed.documents.v3alpha.DocumentChange.SetMetadata - 20, // 19: com.seed.documents.v3alpha.DocumentChange.move_block:type_name -> com.seed.documents.v3alpha.DocumentChange.MoveBlock - 13, // 20: com.seed.documents.v3alpha.DocumentChange.replace_block:type_name -> com.seed.documents.v3alpha.Block - 0, // 21: com.seed.documents.v3alpha.Documents.GetDocument:input_type -> com.seed.documents.v3alpha.GetDocumentRequest - 1, // 22: com.seed.documents.v3alpha.Documents.CreateDocumentChange:input_type -> com.seed.documents.v3alpha.CreateDocumentChangeRequest - 2, // 23: com.seed.documents.v3alpha.Documents.DeleteDocument:input_type -> com.seed.documents.v3alpha.DeleteDocumentRequest - 5, // 24: com.seed.documents.v3alpha.Documents.ListDocuments:input_type -> com.seed.documents.v3alpha.ListDocumentsRequest - 3, // 25: com.seed.documents.v3alpha.Documents.ListRootDocuments:input_type -> com.seed.documents.v3alpha.ListRootDocumentsRequest - 7, // 26: com.seed.documents.v3alpha.Documents.ListDocumentChanges:input_type -> com.seed.documents.v3alpha.ListDocumentChangesRequest - 11, // 27: com.seed.documents.v3alpha.Documents.GetDocument:output_type -> com.seed.documents.v3alpha.Document - 11, // 28: com.seed.documents.v3alpha.Documents.CreateDocumentChange:output_type -> com.seed.documents.v3alpha.Document - 23, // 29: com.seed.documents.v3alpha.Documents.DeleteDocument:output_type -> google.protobuf.Empty - 6, // 30: com.seed.documents.v3alpha.Documents.ListDocuments:output_type -> com.seed.documents.v3alpha.ListDocumentsResponse - 4, // 31: com.seed.documents.v3alpha.Documents.ListRootDocuments:output_type -> com.seed.documents.v3alpha.ListRootDocumentsResponse - 8, // 32: com.seed.documents.v3alpha.Documents.ListDocumentChanges:output_type -> com.seed.documents.v3alpha.ListDocumentChangesResponse - 27, // [27:33] is the sub-list for method output_type - 21, // [21:27] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 17, // 0: com.seed.documents.v3alpha.CreateDocumentChangeRequest.changes:type_name -> com.seed.documents.v3alpha.DocumentChange + 29, // 1: com.seed.documents.v3alpha.CreateDocumentChangeRequest.timestamp:type_name -> google.protobuf.Timestamp + 12, // 2: com.seed.documents.v3alpha.ListRootDocumentsResponse.documents:type_name -> com.seed.documents.v3alpha.DocumentListItem + 12, // 3: com.seed.documents.v3alpha.ListDocumentsResponse.documents:type_name -> com.seed.documents.v3alpha.DocumentListItem + 11, // 4: com.seed.documents.v3alpha.ListDocumentChangesResponse.changes:type_name -> com.seed.documents.v3alpha.DocumentChangeInfo + 19, // 5: com.seed.documents.v3alpha.CreateRefRequest.target:type_name -> com.seed.documents.v3alpha.RefTarget + 29, // 6: com.seed.documents.v3alpha.CreateRefRequest.timestamp:type_name -> google.protobuf.Timestamp + 29, // 7: com.seed.documents.v3alpha.DocumentChangeInfo.create_time:type_name -> google.protobuf.Timestamp + 20, // 8: com.seed.documents.v3alpha.DocumentListItem.metadata:type_name -> com.seed.documents.v3alpha.DocumentListItem.MetadataEntry + 29, // 9: com.seed.documents.v3alpha.DocumentListItem.create_time:type_name -> google.protobuf.Timestamp + 29, // 10: com.seed.documents.v3alpha.DocumentListItem.update_time:type_name -> google.protobuf.Timestamp + 21, // 11: com.seed.documents.v3alpha.Document.metadata:type_name -> com.seed.documents.v3alpha.Document.MetadataEntry + 14, // 12: com.seed.documents.v3alpha.Document.content:type_name -> com.seed.documents.v3alpha.BlockNode + 29, // 13: com.seed.documents.v3alpha.Document.create_time:type_name -> google.protobuf.Timestamp + 29, // 14: com.seed.documents.v3alpha.Document.update_time:type_name -> google.protobuf.Timestamp + 15, // 15: com.seed.documents.v3alpha.BlockNode.block:type_name -> com.seed.documents.v3alpha.Block + 14, // 16: com.seed.documents.v3alpha.BlockNode.children:type_name -> com.seed.documents.v3alpha.BlockNode + 22, // 17: com.seed.documents.v3alpha.Block.attributes:type_name -> com.seed.documents.v3alpha.Block.AttributesEntry + 16, // 18: com.seed.documents.v3alpha.Block.annotations:type_name -> com.seed.documents.v3alpha.Annotation + 23, // 19: com.seed.documents.v3alpha.Annotation.attributes:type_name -> com.seed.documents.v3alpha.Annotation.AttributesEntry + 25, // 20: com.seed.documents.v3alpha.DocumentChange.set_metadata:type_name -> com.seed.documents.v3alpha.DocumentChange.SetMetadata + 24, // 21: com.seed.documents.v3alpha.DocumentChange.move_block:type_name -> com.seed.documents.v3alpha.DocumentChange.MoveBlock + 15, // 22: com.seed.documents.v3alpha.DocumentChange.replace_block:type_name -> com.seed.documents.v3alpha.Block + 19, // 23: com.seed.documents.v3alpha.Ref.target:type_name -> com.seed.documents.v3alpha.RefTarget + 29, // 24: com.seed.documents.v3alpha.Ref.timestamp:type_name -> google.protobuf.Timestamp + 26, // 25: com.seed.documents.v3alpha.RefTarget.version:type_name -> com.seed.documents.v3alpha.RefTarget.Version + 27, // 26: com.seed.documents.v3alpha.RefTarget.redirect:type_name -> com.seed.documents.v3alpha.RefTarget.Redirect + 28, // 27: com.seed.documents.v3alpha.RefTarget.tombstone:type_name -> com.seed.documents.v3alpha.RefTarget.Tombstone + 0, // 28: com.seed.documents.v3alpha.Documents.GetDocument:input_type -> com.seed.documents.v3alpha.GetDocumentRequest + 1, // 29: com.seed.documents.v3alpha.Documents.CreateDocumentChange:input_type -> com.seed.documents.v3alpha.CreateDocumentChangeRequest + 2, // 30: com.seed.documents.v3alpha.Documents.DeleteDocument:input_type -> com.seed.documents.v3alpha.DeleteDocumentRequest + 5, // 31: com.seed.documents.v3alpha.Documents.ListDocuments:input_type -> com.seed.documents.v3alpha.ListDocumentsRequest + 3, // 32: com.seed.documents.v3alpha.Documents.ListRootDocuments:input_type -> com.seed.documents.v3alpha.ListRootDocumentsRequest + 7, // 33: com.seed.documents.v3alpha.Documents.ListDocumentChanges:input_type -> com.seed.documents.v3alpha.ListDocumentChangesRequest + 9, // 34: com.seed.documents.v3alpha.Documents.CreateRef:input_type -> com.seed.documents.v3alpha.CreateRefRequest + 10, // 35: com.seed.documents.v3alpha.Documents.GetRef:input_type -> com.seed.documents.v3alpha.GetRefRequest + 13, // 36: com.seed.documents.v3alpha.Documents.GetDocument:output_type -> com.seed.documents.v3alpha.Document + 13, // 37: com.seed.documents.v3alpha.Documents.CreateDocumentChange:output_type -> com.seed.documents.v3alpha.Document + 30, // 38: com.seed.documents.v3alpha.Documents.DeleteDocument:output_type -> google.protobuf.Empty + 6, // 39: com.seed.documents.v3alpha.Documents.ListDocuments:output_type -> com.seed.documents.v3alpha.ListDocumentsResponse + 4, // 40: com.seed.documents.v3alpha.Documents.ListRootDocuments:output_type -> com.seed.documents.v3alpha.ListRootDocumentsResponse + 8, // 41: com.seed.documents.v3alpha.Documents.ListDocumentChanges:output_type -> com.seed.documents.v3alpha.ListDocumentChangesResponse + 18, // 42: com.seed.documents.v3alpha.Documents.CreateRef:output_type -> com.seed.documents.v3alpha.Ref + 18, // 43: com.seed.documents.v3alpha.Documents.GetRef:output_type -> com.seed.documents.v3alpha.Ref + 36, // [36:44] is the sub-list for method output_type + 28, // [28:36] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_documents_v3alpha_documents_proto_init() } @@ -1928,7 +2555,7 @@ func file_documents_v3alpha_documents_proto_init() { } } file_documents_v3alpha_documents_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*DocumentChangeInfo); i { + switch v := v.(*CreateRefRequest); i { case 0: return &v.state case 1: @@ -1940,7 +2567,7 @@ func file_documents_v3alpha_documents_proto_init() { } } file_documents_v3alpha_documents_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*DocumentListItem); i { + switch v := v.(*GetRefRequest); i { case 0: return &v.state case 1: @@ -1952,7 +2579,7 @@ func file_documents_v3alpha_documents_proto_init() { } } file_documents_v3alpha_documents_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*Document); i { + switch v := v.(*DocumentChangeInfo); i { case 0: return &v.state case 1: @@ -1964,7 +2591,7 @@ func file_documents_v3alpha_documents_proto_init() { } } file_documents_v3alpha_documents_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BlockNode); i { + switch v := v.(*DocumentListItem); i { case 0: return &v.state case 1: @@ -1976,7 +2603,7 @@ func file_documents_v3alpha_documents_proto_init() { } } file_documents_v3alpha_documents_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*Block); i { + switch v := v.(*Document); i { case 0: return &v.state case 1: @@ -1988,7 +2615,7 @@ func file_documents_v3alpha_documents_proto_init() { } } file_documents_v3alpha_documents_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*Annotation); i { + switch v := v.(*BlockNode); i { case 0: return &v.state case 1: @@ -2000,6 +2627,30 @@ func file_documents_v3alpha_documents_proto_init() { } } file_documents_v3alpha_documents_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*Block); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_documents_v3alpha_documents_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*Annotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_documents_v3alpha_documents_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*DocumentChange); i { case 0: return &v.state @@ -2011,7 +2662,31 @@ func file_documents_v3alpha_documents_proto_init() { return nil } } - file_documents_v3alpha_documents_proto_msgTypes[20].Exporter = func(v any, i int) any { + file_documents_v3alpha_documents_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*Ref); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_documents_v3alpha_documents_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*RefTarget); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_documents_v3alpha_documents_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*DocumentChange_MoveBlock); i { case 0: return &v.state @@ -2023,7 +2698,7 @@ func file_documents_v3alpha_documents_proto_init() { return nil } } - file_documents_v3alpha_documents_proto_msgTypes[21].Exporter = func(v any, i int) any { + file_documents_v3alpha_documents_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*DocumentChange_SetMetadata); i { case 0: return &v.state @@ -2035,20 +2710,61 @@ func file_documents_v3alpha_documents_proto_init() { return nil } } + file_documents_v3alpha_documents_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*RefTarget_Version); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_documents_v3alpha_documents_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*RefTarget_Redirect); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_documents_v3alpha_documents_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*RefTarget_Tombstone); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_documents_v3alpha_documents_proto_msgTypes[15].OneofWrappers = []any{ + file_documents_v3alpha_documents_proto_msgTypes[17].OneofWrappers = []any{ (*DocumentChange_SetMetadata_)(nil), (*DocumentChange_MoveBlock_)(nil), (*DocumentChange_ReplaceBlock)(nil), (*DocumentChange_DeleteBlock)(nil), } + file_documents_v3alpha_documents_proto_msgTypes[19].OneofWrappers = []any{ + (*RefTarget_Version_)(nil), + (*RefTarget_Redirect_)(nil), + (*RefTarget_Tombstone_)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_documents_v3alpha_documents_proto_rawDesc, NumEnums: 0, - NumMessages: 22, + NumMessages: 29, NumExtensions: 0, NumServices: 1, }, diff --git a/backend/genproto/documents/v3alpha/documents_grpc.pb.go b/backend/genproto/documents/v3alpha/documents_grpc.pb.go index 1de73683..601c476e 100644 --- a/backend/genproto/documents/v3alpha/documents_grpc.pb.go +++ b/backend/genproto/documents/v3alpha/documents_grpc.pb.go @@ -27,7 +27,10 @@ type DocumentsClient interface { GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*Document, error) // Creates a new Document Change. CreateDocumentChange(ctx context.Context, in *CreateDocumentChangeRequest, opts ...grpc.CallOption) (*Document, error) + // Deprecated: Do not use. // Deletes a document. + // + // Deprecated: Use CreateRef API. DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Lists documents within the account. Only the most recent versions show up. ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error) @@ -35,6 +38,10 @@ type DocumentsClient interface { ListRootDocuments(ctx context.Context, in *ListRootDocumentsRequest, opts ...grpc.CallOption) (*ListRootDocumentsResponse, error) // Lists all changes of a document. ListDocumentChanges(ctx context.Context, in *ListDocumentChangesRequest, opts ...grpc.CallOption) (*ListDocumentChangesResponse, error) + // Creates a Ref blob for the specified account + path. + CreateRef(ctx context.Context, in *CreateRefRequest, opts ...grpc.CallOption) (*Ref, error) + // Returns details about a Ref. + GetRef(ctx context.Context, in *GetRefRequest, opts ...grpc.CallOption) (*Ref, error) } type documentsClient struct { @@ -63,6 +70,7 @@ func (c *documentsClient) CreateDocumentChange(ctx context.Context, in *CreateDo return out, nil } +// Deprecated: Do not use. func (c *documentsClient) DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/com.seed.documents.v3alpha.Documents/DeleteDocument", in, out, opts...) @@ -99,6 +107,24 @@ func (c *documentsClient) ListDocumentChanges(ctx context.Context, in *ListDocum return out, nil } +func (c *documentsClient) CreateRef(ctx context.Context, in *CreateRefRequest, opts ...grpc.CallOption) (*Ref, error) { + out := new(Ref) + err := c.cc.Invoke(ctx, "/com.seed.documents.v3alpha.Documents/CreateRef", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *documentsClient) GetRef(ctx context.Context, in *GetRefRequest, opts ...grpc.CallOption) (*Ref, error) { + out := new(Ref) + err := c.cc.Invoke(ctx, "/com.seed.documents.v3alpha.Documents/GetRef", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // DocumentsServer is the server API for Documents service. // All implementations should embed UnimplementedDocumentsServer // for forward compatibility @@ -107,7 +133,10 @@ type DocumentsServer interface { GetDocument(context.Context, *GetDocumentRequest) (*Document, error) // Creates a new Document Change. CreateDocumentChange(context.Context, *CreateDocumentChangeRequest) (*Document, error) + // Deprecated: Do not use. // Deletes a document. + // + // Deprecated: Use CreateRef API. DeleteDocument(context.Context, *DeleteDocumentRequest) (*emptypb.Empty, error) // Lists documents within the account. Only the most recent versions show up. ListDocuments(context.Context, *ListDocumentsRequest) (*ListDocumentsResponse, error) @@ -115,6 +144,10 @@ type DocumentsServer interface { ListRootDocuments(context.Context, *ListRootDocumentsRequest) (*ListRootDocumentsResponse, error) // Lists all changes of a document. ListDocumentChanges(context.Context, *ListDocumentChangesRequest) (*ListDocumentChangesResponse, error) + // Creates a Ref blob for the specified account + path. + CreateRef(context.Context, *CreateRefRequest) (*Ref, error) + // Returns details about a Ref. + GetRef(context.Context, *GetRefRequest) (*Ref, error) } // UnimplementedDocumentsServer should be embedded to have forward compatible implementations. @@ -139,6 +172,12 @@ func (UnimplementedDocumentsServer) ListRootDocuments(context.Context, *ListRoot func (UnimplementedDocumentsServer) ListDocumentChanges(context.Context, *ListDocumentChangesRequest) (*ListDocumentChangesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDocumentChanges not implemented") } +func (UnimplementedDocumentsServer) CreateRef(context.Context, *CreateRefRequest) (*Ref, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateRef not implemented") +} +func (UnimplementedDocumentsServer) GetRef(context.Context, *GetRefRequest) (*Ref, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRef not implemented") +} // UnsafeDocumentsServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DocumentsServer will @@ -259,6 +298,42 @@ func _Documents_ListDocumentChanges_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _Documents_CreateRef_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateRefRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DocumentsServer).CreateRef(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/com.seed.documents.v3alpha.Documents/CreateRef", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DocumentsServer).CreateRef(ctx, req.(*CreateRefRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Documents_GetRef_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRefRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DocumentsServer).GetRef(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/com.seed.documents.v3alpha.Documents/GetRef", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DocumentsServer).GetRef(ctx, req.(*GetRefRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Documents_ServiceDesc is the grpc.ServiceDesc for Documents service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -290,6 +365,14 @@ var Documents_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListDocumentChanges", Handler: _Documents_ListDocumentChanges_Handler, }, + { + MethodName: "CreateRef", + Handler: _Documents_CreateRef_Handler, + }, + { + MethodName: "GetRef", + Handler: _Documents_GetRef_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "documents/v3alpha/documents.proto", diff --git a/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_connect.ts b/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_connect.ts index e495fc46..8907557a 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_connect.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { CreateDocumentChangeRequest, DeleteDocumentRequest, Document, GetDocumentRequest, ListDocumentChangesRequest, ListDocumentChangesResponse, ListDocumentsRequest, ListDocumentsResponse, ListRootDocumentsRequest, ListRootDocumentsResponse } from "./documents_pb"; +import { CreateDocumentChangeRequest, CreateRefRequest, DeleteDocumentRequest, Document, GetDocumentRequest, GetRefRequest, ListDocumentChangesRequest, ListDocumentChangesResponse, ListDocumentsRequest, ListDocumentsResponse, ListRootDocumentsRequest, ListRootDocumentsResponse, Ref } from "./documents_pb"; import { Empty, MethodKind } from "@bufbuild/protobuf"; /** @@ -39,7 +39,10 @@ export const Documents = { /** * Deletes a document. * + * Deprecated: Use CreateRef API. + * * @generated from rpc com.seed.documents.v3alpha.Documents.DeleteDocument + * @deprecated */ deleteDocument: { name: "DeleteDocument", @@ -80,6 +83,28 @@ export const Documents = { O: ListDocumentChangesResponse, kind: MethodKind.Unary, }, + /** + * Creates a Ref blob for the specified account + path. + * + * @generated from rpc com.seed.documents.v3alpha.Documents.CreateRef + */ + createRef: { + name: "CreateRef", + I: CreateRefRequest, + O: Ref, + kind: MethodKind.Unary, + }, + /** + * Returns details about a Ref. + * + * @generated from rpc com.seed.documents.v3alpha.Documents.GetRef + */ + getRef: { + name: "GetRef", + I: GetRefRequest, + O: Ref, + kind: MethodKind.Unary, + }, } } as const; diff --git a/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_pb.ts b/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_pb.ts index 90e5292b..e5c1279b 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_pb.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v3alpha/documents_pb.ts @@ -29,11 +29,21 @@ export class GetDocumentRequest extends Message { /** * Optional. Exact version of the document to retrieve. + * Empty version means "latest". * * @generated from field: string version = 3; */ version = ""; + /** + * Optional. Only applicable when requesting the latest version + * (i.e. when version field is empty). + * When this flag is set, the server will return the latest version known prior to deletion. + * + * @generated from field: bool ignore_deleted = 4; + */ + ignoreDeleted = false; + constructor(data?: PartialMessage) { super(); proto3.util.initPartial(data, this); @@ -45,6 +55,7 @@ export class GetDocumentRequest extends Message { { no: 1, name: "account", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 3, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "ignore_deleted", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): GetDocumentRequest { @@ -325,10 +336,17 @@ export class ListDocumentsRequest extends Message { */ pageSize = 0; + /** + * Optional. Only list documents for those paths that are deleted. + * + * @generated from field: bool deleted_only = 3; + */ + deletedOnly = false; + /** * Optional. Value from next_page_token obtained from a previous response. * - * @generated from field: string page_token = 3; + * @generated from field: string page_token = 4; */ pageToken = ""; @@ -342,7 +360,8 @@ export class ListDocumentsRequest extends Message { static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "account", kind: "scalar", T: 9 /* ScalarType.STRING */ }, { no: 2, name: "page_size", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "deleted_only", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): ListDocumentsRequest { @@ -533,6 +552,133 @@ export class ListDocumentChangesResponse extends Message { + /** + * Required. The ID of the account/space in which to create the Ref. + * + * @generated from field: string account = 1; + */ + account = ""; + + /** + * Required. Path of the new Ref. + * Empty string means root document. + * + * @generated from field: string path = 2; + */ + path = ""; + + /** + * Required. Target for the new Ref. + * + * @generated from field: com.seed.documents.v3alpha.RefTarget target = 3; + */ + target?: RefTarget; + + /** + * Required. Name of the signing key to use for signing the Ref. + * + * @generated from field: string signing_key_name = 4; + */ + signingKeyName = ""; + + /** + * Optional. ID of the Capability blob that grants the necessary rights to the signin key + * to write Refs for the requested account + path. + * + * @generated from field: string capability = 5; + */ + capability = ""; + + /** + * Optional. A timestamp of the Ref blob. + * If not specified the server will use the current time. + * The provided timestamp will be rounded to the nearest millisecond, + * so the final timestamp in the resulting Ref blob may not be exactly as provided. + * + * @generated from field: google.protobuf.Timestamp timestamp = 6; + */ + timestamp?: Timestamp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.seed.documents.v3alpha.CreateRefRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "account", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "target", kind: "message", T: RefTarget }, + { no: 4, name: "signing_key_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 5, name: "capability", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "timestamp", kind: "message", T: Timestamp }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateRefRequest { + return new CreateRefRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateRefRequest { + return new CreateRefRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateRefRequest { + return new CreateRefRequest().fromJsonString(jsonString, options); + } + + static equals(a: CreateRefRequest | PlainMessage | undefined, b: CreateRefRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateRefRequest, a, b); + } +} + +/** + * Request to get a Ref by ID. + * + * @generated from message com.seed.documents.v3alpha.GetRefRequest + */ +export class GetRefRequest extends Message { + /** + * Required. ID of the Ref blob to retrieve. + * + * @generated from field: string id = 1; + */ + id = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.seed.documents.v3alpha.GetRefRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetRefRequest { + return new GetRefRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetRefRequest { + return new GetRefRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetRefRequest { + return new GetRefRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetRefRequest | PlainMessage | undefined, b: GetRefRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetRefRequest, a, b); + } +} + /** * Information about a particular document version. * @@ -1209,3 +1355,294 @@ export class DocumentChange_SetMetadata extends Message { + /** + * CID of the Ref blob. + * + * @generated from field: string id = 1; + */ + id = ""; + + /** + * Account (space) in which the Ref blob exists. + * + * @generated from field: string account = 2; + */ + account = ""; + + /** + * Path in the account Ref creates an entry for. + * + * @generated from field: string path = 3; + */ + path = ""; + + /** + * Description of where the Ref points to. + * + * @generated from field: com.seed.documents.v3alpha.RefTarget target = 4; + */ + target?: RefTarget; + + /** + * Public key used to sign the Ref blob. + * + * @generated from field: string signer = 5; + */ + signer = ""; + + /** + * Optional. ID of the Capability attached to this Ref. + * + * @generated from field: string capability = 6; + */ + capability = ""; + + /** + * Timestamp of the Ref. + * + * @generated from field: google.protobuf.Timestamp timestamp = 7; + */ + timestamp?: Timestamp; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.seed.documents.v3alpha.Ref"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "account", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "target", kind: "message", T: RefTarget }, + { no: 5, name: "signer", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "capability", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 7, name: "timestamp", kind: "message", T: Timestamp }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Ref { + return new Ref().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Ref { + return new Ref().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Ref { + return new Ref().fromJsonString(jsonString, options); + } + + static equals(a: Ref | PlainMessage | undefined, b: Ref | PlainMessage | undefined): boolean { + return proto3.util.equals(Ref, a, b); + } +} + +/** + * Description of where the Ref points to. + * + * @generated from message com.seed.documents.v3alpha.RefTarget + */ +export class RefTarget extends Message { + /** + * A Ref can point to one of the following targets. + * + * @generated from oneof com.seed.documents.v3alpha.RefTarget.target + */ + target: { + /** + * Version target describes genesis + head changes (version). + * + * @generated from field: com.seed.documents.v3alpha.RefTarget.Version version = 1; + */ + value: RefTarget_Version; + case: "version"; + } | { + /** + * Redirect target makes a Ref point to a different account + path. + * Users must be careful to not create cycles or very deep redirect chains. + * Client should be careful not to get stuck in redirects + * by tracking visited paths to prevent cycles, + * and by limiting the depth of the redirect chains, + * while handling redirects. + * + * @generated from field: com.seed.documents.v3alpha.RefTarget.Redirect redirect = 2; + */ + value: RefTarget_Redirect; + case: "redirect"; + } | { + /** + * Tombstone Ref indicates the intent to delete the given account + path. + * + * @generated from field: com.seed.documents.v3alpha.RefTarget.Tombstone tombstone = 3; + */ + value: RefTarget_Tombstone; + case: "tombstone"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.seed.documents.v3alpha.RefTarget"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "version", kind: "message", T: RefTarget_Version, oneof: "target" }, + { no: 2, name: "redirect", kind: "message", T: RefTarget_Redirect, oneof: "target" }, + { no: 3, name: "tombstone", kind: "message", T: RefTarget_Tombstone, oneof: "target" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RefTarget { + return new RefTarget().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RefTarget { + return new RefTarget().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RefTarget { + return new RefTarget().fromJsonString(jsonString, options); + } + + static equals(a: RefTarget | PlainMessage | undefined, b: RefTarget | PlainMessage | undefined): boolean { + return proto3.util.equals(RefTarget, a, b); + } +} + +/** + * @generated from message com.seed.documents.v3alpha.RefTarget.Version + */ +export class RefTarget_Version extends Message { + /** + * Required. ID of the genesis Change. + * + * @generated from field: string genesis = 1; + */ + genesis = ""; + + /** + * Required. Version ID (possibly compount). + * Each change in the version ID must have the same genesis. + * + * @generated from field: string version = 2; + */ + version = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.seed.documents.v3alpha.RefTarget.Version"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "genesis", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RefTarget_Version { + return new RefTarget_Version().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RefTarget_Version { + return new RefTarget_Version().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RefTarget_Version { + return new RefTarget_Version().fromJsonString(jsonString, options); + } + + static equals(a: RefTarget_Version | PlainMessage | undefined, b: RefTarget_Version | PlainMessage | undefined): boolean { + return proto3.util.equals(RefTarget_Version, a, b); + } +} + +/** + * @generated from message com.seed.documents.v3alpha.RefTarget.Redirect + */ +export class RefTarget_Redirect extends Message { + /** + * Required. Account ID to which the Ref should redirect. + * Can be the same as the account in the Ref itself, + * when we redirect to a different path in the same account/space. + * + * @generated from field: string account = 1; + */ + account = ""; + + /** + * Required. Path to which the Ref should redirect. + * Empty string means root document. + * Must not be the same as the Ref itself. + * + * @generated from field: string path = 2; + */ + path = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.seed.documents.v3alpha.RefTarget.Redirect"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "account", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RefTarget_Redirect { + return new RefTarget_Redirect().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RefTarget_Redirect { + return new RefTarget_Redirect().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RefTarget_Redirect { + return new RefTarget_Redirect().fromJsonString(jsonString, options); + } + + static equals(a: RefTarget_Redirect | PlainMessage | undefined, b: RefTarget_Redirect | PlainMessage | undefined): boolean { + return proto3.util.equals(RefTarget_Redirect, a, b); + } +} + +/** + * @generated from message com.seed.documents.v3alpha.RefTarget.Tombstone + */ +export class RefTarget_Tombstone extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.seed.documents.v3alpha.RefTarget.Tombstone"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): RefTarget_Tombstone { + return new RefTarget_Tombstone().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): RefTarget_Tombstone { + return new RefTarget_Tombstone().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): RefTarget_Tombstone { + return new RefTarget_Tombstone().fromJsonString(jsonString, options); + } + + static equals(a: RefTarget_Tombstone | PlainMessage | undefined, b: RefTarget_Tombstone | PlainMessage | undefined): boolean { + return proto3.util.equals(RefTarget_Tombstone, a, b); + } +} + diff --git a/proto/documents/v3alpha/documents.proto b/proto/documents/v3alpha/documents.proto index 43330234..de8812ba 100644 --- a/proto/documents/v3alpha/documents.proto +++ b/proto/documents/v3alpha/documents.proto @@ -16,7 +16,11 @@ service Documents { rpc CreateDocumentChange(CreateDocumentChangeRequest) returns (Document); // Deletes a document. - rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty); + // + // Deprecated: Use CreateRef API. + rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) { + option deprecated = true; + }; // Lists documents within the account. Only the most recent versions show up. rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse); @@ -26,6 +30,12 @@ service Documents { // Lists all changes of a document. rpc ListDocumentChanges(ListDocumentChangesRequest) returns (ListDocumentChangesResponse); + + // Creates a Ref blob for the specified account + path. + rpc CreateRef(CreateRefRequest) returns (Ref); + + // Returns details about a Ref. + rpc GetRef(GetRefRequest) returns (Ref); } // Request for getting a single document. @@ -38,7 +48,13 @@ message GetDocumentRequest { string path = 2; // Optional. Exact version of the document to retrieve. + // Empty version means "latest". string version = 3; + + // Optional. Only applicable when requesting the latest version + // (i.e. when version field is empty). + // When this flag is set, the server will return the latest version known prior to deletion. + bool ignore_deleted = 4; } // Request to create a new document change. @@ -106,8 +122,11 @@ message ListDocumentsRequest { // Optional. Number of results per page. Default is defined by the server. int32 page_size = 2; + // Optional. Only list documents for those paths that are deleted. + bool deleted_only = 3; + // Optional. Value from next_page_token obtained from a previous response. - string page_token = 3; + string page_token = 4; } // Response with list of documents. @@ -146,6 +165,38 @@ message ListDocumentChangesResponse { string next_page_token = 2; } +// Request to create a Ref. +message CreateRefRequest { + // Required. The ID of the account/space in which to create the Ref. + string account = 1; + + // Required. Path of the new Ref. + // Empty string means root document. + string path = 2; + + // Required. Target for the new Ref. + RefTarget target = 3; + + // Required. Name of the signing key to use for signing the Ref. + string signing_key_name = 4; + + // Optional. ID of the Capability blob that grants the necessary rights to the signin key + // to write Refs for the requested account + path. + string capability = 5; + + // Optional. A timestamp of the Ref blob. + // If not specified the server will use the current time. + // The provided timestamp will be rounded to the nearest millisecond, + // so the final timestamp in the resulting Ref blob may not be exactly as provided. + google.protobuf.Timestamp timestamp = 6; +} + +// Request to get a Ref by ID. +message GetRefRequest { + // Required. ID of the Ref blob to retrieve. + string id = 1; +} + // Information about a particular document version. message DocumentChangeInfo { // CID of the change. @@ -324,3 +375,70 @@ message DocumentChange { string delete_block = 4; } } + +// Description of a Ref blob. +message Ref { + // CID of the Ref blob. + string id = 1; + + // Account (space) in which the Ref blob exists. + string account = 2; + + // Path in the account Ref creates an entry for. + string path = 3; + + // Description of where the Ref points to. + RefTarget target = 4; + + // Public key used to sign the Ref blob. + string signer = 5; + + // Optional. ID of the Capability attached to this Ref. + string capability = 6; + + // Timestamp of the Ref. + google.protobuf.Timestamp timestamp = 7; +} + +// Description of where the Ref points to. +message RefTarget { + // A Ref can point to one of the following targets. + oneof target { + // Version target describes genesis + head changes (version). + Version version = 1; + + // Redirect target makes a Ref point to a different account + path. + // Users must be careful to not create cycles or very deep redirect chains. + // Client should be careful not to get stuck in redirects + // by tracking visited paths to prevent cycles, + // and by limiting the depth of the redirect chains, + // while handling redirects. + Redirect redirect = 2; + + // Tombstone Ref indicates the intent to delete the given account + path. + Tombstone tombstone = 3; + } + + message Version { + // Required. ID of the genesis Change. + string genesis = 1; + + // Required. Version ID (possibly compount). + // Each change in the version ID must have the same genesis. + string version = 2; + } + + message Redirect { + // Required. Account ID to which the Ref should redirect. + // Can be the same as the account in the Ref itself, + // when we redirect to a different path in the same account/space. + string account = 1; + + // Required. Path to which the Ref should redirect. + // Empty string means root document. + // Must not be the same as the Ref itself. + string path = 2; + } + + message Tombstone {} +} diff --git a/proto/documents/v3alpha/go.gensum b/proto/documents/v3alpha/go.gensum index b9fca042..7592bfbf 100644 --- a/proto/documents/v3alpha/go.gensum +++ b/proto/documents/v3alpha/go.gensum @@ -1,2 +1,2 @@ -srcs: 5aac17e3ae6dfe5e6a93024eb772a56a -outs: 3c76d890a9ed48c5244da5c96f75b247 +srcs: 8a516d2c36f40879689c14fa66ade807 +outs: f9ea0ab1f75f622f43e24eb3293c8029 diff --git a/proto/documents/v3alpha/js.gensum b/proto/documents/v3alpha/js.gensum index 64b92d92..f0c33e17 100644 --- a/proto/documents/v3alpha/js.gensum +++ b/proto/documents/v3alpha/js.gensum @@ -1,2 +1,2 @@ -srcs: 5aac17e3ae6dfe5e6a93024eb772a56a -outs: ad3e117103a516ccb5860ca396666375 +srcs: 8a516d2c36f40879689c14fa66ade807 +outs: 00f7d4586cc18855eedac1e628bef190