From 1535e5a8d54fff824adbf4864e726cba49855a69 Mon Sep 17 00:00:00 2001 From: Alexandr Burdiyan Date: Thu, 11 Apr 2024 13:52:49 +0200 Subject: [PATCH] feat(backend): implement ListDocumentDrafts API --- .../daemon/api/documents/v1alpha/documents.go | 321 ++++---- backend/daemon/apiutil/page_token.go | 54 ++ .../documents/v1alpha/documents.pb.go | 749 +++++++++++------- .../documents/v1alpha/documents_grpc.pb.go | 38 + .../documents/v1alpha/documents_connect.ts | 13 +- .../documents/v1alpha/documents_pb.ts | 83 ++ proto/documents/v1alpha/documents.proto | 17 +- proto/documents/v1alpha/go.gensum | 4 +- proto/documents/v1alpha/js.gensum | 4 +- 9 files changed, 839 insertions(+), 444 deletions(-) create mode 100644 backend/daemon/apiutil/page_token.go diff --git a/backend/daemon/api/documents/v1alpha/documents.go b/backend/daemon/api/documents/v1alpha/documents.go index 56451473f..ba018e084 100644 --- a/backend/daemon/api/documents/v1alpha/documents.go +++ b/backend/daemon/api/documents/v1alpha/documents.go @@ -11,8 +11,10 @@ import ( "mintter/backend/core" "mintter/backend/daemon/api/documents/v1alpha/docmodel" groups "mintter/backend/daemon/api/groups/v1alpha" + "mintter/backend/daemon/apiutil" documents "mintter/backend/genproto/documents/v1alpha" groups_proto "mintter/backend/genproto/groups/v1alpha" + "mintter/backend/hlc" "mintter/backend/mttnet" "strconv" "strings" @@ -259,164 +261,209 @@ func (api *Server) GetDraft(ctx context.Context, in *documents.GetDraftRequest) return mut.Hydrate(ctx, api.blobs) } -var qListAllDrafts = dqb.Str(` - WITH RECURSIVE resource_authors AS ( - SELECT - r.iri, - r.create_time, - r.owner, - mv.meta, - pk.principal AS author_raw, - sb.ts, - sb.id AS blob_id - FROM - resources r - JOIN structural_blobs sb ON r.id = sb.resource - JOIN public_keys pk ON sb.author = pk.id - JOIN meta_view mv ON r.iri = mv.iri - WHERE - sb.author IS NOT NULL - AND r.iri GLOB :pattern - AND sb.id in (SELECT distinct blob from drafts) - UNION ALL - SELECT - ra.iri, - ra.create_time, - ra.owner, - sb.meta, - pk.principal, - sb.ts, - sb.id - FROM - resource_authors ra - JOIN structural_blobs sb ON ra.iri = sb.resource - JOIN public_keys pk ON sb.author = pk.id - WHERE - sb.author IS NOT NULL - AND ra.iri GLOB :pattern - ), - owners_raw AS ( - SELECT - id, - principal AS owner_raw - FROM - public_keys - ), - latest_blobs AS ( - SELECT - ra.iri, - MAX(ra.ts) AS latest_ts, - b.multihash, - b.codec - FROM - resource_authors ra - JOIN blobs b ON ra.blob_id = b.id - GROUP BY ra.iri - ) - SELECT - ra.iri, - ra.create_time, - GROUP_CONCAT(DISTINCT HEX(ra.author_raw)) AS authors_hex, - ra.meta, - MAX(ra.ts) AS latest_ts, - HEX(oraw.owner_raw), - ra.blob_id - FROM - resource_authors ra - LEFT JOIN owners_raw oraw ON ra.owner = oraw.id - LEFT JOIN latest_blobs lb ON ra.iri = lb.iri - WHERE ra.blob_id <= :idx - GROUP BY - ra.iri, ra.create_time, ra.meta - ORDER BY ra.blob_id asc LIMIT :page_size; -`) - // ListDrafts implements the corresponding gRPC method. func (api *Server) ListDrafts(ctx context.Context, req *documents.ListDraftsRequest) (*documents.ListDraftsResponse, error) { - var ( - entities []hyper.EntityID - err error - ) - me, ok := api.me.Get() - if !ok { - return nil, fmt.Errorf("account is not initialized yet") - } - conn, cancel, err := api.db.Conn(ctx) + me, err := api.getMe() if err != nil { - return nil, fmt.Errorf("Can't get a connection from the db: %w", err) - } - defer cancel() - resp := &documents.ListDraftsResponse{ - Documents: make([]*documents.Document, 0, len(entities)), + return nil, err } - var cursorBlobID int64 = math.MaxInt32 + + resp := &documents.ListDraftsResponse{} + if req.PageSize == 0 { req.PageSize = 30 } - if req.PageToken != "" { - pageTokenBytes, _ := base64.StdEncoding.DecodeString(req.PageToken) - if err != nil { - return nil, fmt.Errorf("Token encoding not valid: %w", err) - } - clearPageToken, err := me.DeviceKey().Decrypt(pageTokenBytes) - if err != nil { - return nil, fmt.Errorf("Token not valid: %w", err) - } - pageToken, err := strconv.ParseUint(string(clearPageToken), 10, 32) - if err != nil { - return nil, fmt.Errorf("Token not valid: %w", err) + + type Cursor struct { + Ts int64 `json:"t"` + Resource int64 `json:"r"` + } + + var cursor Cursor + if req.PageToken == "" { + cursor.Ts = math.MaxInt64 + cursor.Resource = math.MaxInt64 + } else { + if err := apiutil.DecodePageToken(req.PageToken, &cursor, me.DeviceKey()); err != nil { + return nil, status.Errorf(codes.InvalidArgument, "%v", err) } - cursorBlobID = int64(pageToken) } - pattern := "hm://d/*" - var lastBlobID int64 - err = sqlitex.Exec(conn, qListAllDrafts(), func(stmt *sqlite.Stmt) error { - var ( - id = stmt.ColumnText(0) - createTime = stmt.ColumnInt64(1) - editorsStr = stmt.ColumnText(2) - title = stmt.ColumnText(3) - updatedTime = stmt.ColumnInt64(4) - ownerHex = stmt.ColumnText(5) - ) - lastBlobID = stmt.ColumnInt64(6) - editors := []string{} - for _, editorHex := range strings.Split(editorsStr, ",") { - editorBin, err := hex.DecodeString(editorHex) - if err != nil { + + var lastCursor Cursor + + if err := api.db.WithSave(ctx, func(conn *sqlite.Conn) error { + var count int32 + return sqlitex.Exec(conn, qListAllDrafts(), func(stmt *sqlite.Stmt) error { + // This is necessary to always return empty page token when we reach the last result. + if count == req.PageSize { + var err error + resp.NextPageToken, err = apiutil.EncodePageToken(lastCursor, me.DeviceKey()) return err } - editors = append(editors, core.Principal(editorBin).String()) - } - ownerBin, err := hex.DecodeString(ownerHex) + count++ + + var ( + iri = stmt.ColumnText(0) + createTime = stmt.ColumnInt64(1) + updateTime = stmt.ColumnInt64(2) + author = stmt.ColumnBytesUnsafe(3) + editors = strings.Split(stmt.ColumnText(4), ",") + meta = stmt.ColumnText(5) + cursorResource = stmt.ColumnInt64(6) + ) + + for i, x := range editors { + data, err := hex.DecodeString(x) + if err != nil { + return fmt.Errorf("failed to decode editor: %w", err) + } + + editors[i] = core.Principal(data).String() + } + + lastCursor.Resource = cursorResource + lastCursor.Ts = updateTime + + doc := &documents.Document{ + Id: iri, + Title: meta, + Author: core.Principal(author).String(), + Editors: editors, + CreateTime: timestamppb.New(time.Unix(createTime, 0)), + UpdateTime: timestamppb.New(hlc.Timestamp(updateTime).Time()), + } + + resp.Documents = append(resp.Documents, doc) + + return nil + }, cursor.Ts, cursor.Resource, req.PageSize) + }); err != nil { + return nil, err + } + + return resp, nil +} + +var qListAllDrafts = dqb.Str(` + WITH RECURSIVE + -- Finding the drafts we want, sorted as desired in the output, + -- and filtered out to find the requested page. + subset AS ( + SELECT structural_blobs.* + FROM drafts + JOIN structural_blobs ON structural_blobs.id = drafts.blob + WHERE structural_blobs.ts < :cursor_ts AND drafts.resource < :cursor_resource + ORDER BY structural_blobs.ts DESC, structural_blobs.resource DESC + LIMIT :page_size + 1 + ), + -- Resolving the DAG of changes for each document + -- starting from the draft changes and following the dependency links. + cset AS ( + SELECT * FROM subset + UNION + SELECT structural_blobs.* + FROM structural_blobs + JOIN blob_links ON blob_links.target = structural_blobs.id + JOIN cset ON cset.id = blob_links.source + WHERE blob_links.type = 'change/dep' + ) + -- Reducing the DAG of changes for each document to get the current state. + SELECT + resources.iri AS iri, + resources.create_time AS create_time, + MAX(cset.ts) AS update_time, + authors.principal AS author, + GROUP_CONCAT(DISTINCT HEX(public_keys.principal)) AS editors, + (JSONB_GROUP_ARRAY(cset.meta ORDER BY ts DESC, public_keys.principal DESC) FILTER (WHERE cset.meta IS NOT NULL))->>'0' AS meta, + MAX(resources.id) AS cursor_resource + FROM cset + JOIN public_keys ON public_keys.id = cset.author + JOIN resources ON resources.id = cset.resource + JOIN public_keys authors ON authors.id = resources.owner + GROUP BY resource + ORDER BY update_time DESC, resources.id DESC; +`) + +func (api *Server) ListDocumentDrafts(ctx context.Context, in *documents.ListDocumentDraftsRequest) (*documents.ListDocumentDraftsResponse, error) { + if in.DocumentId == "" { + return nil, status.Errorf(codes.InvalidArgument, "must specify document ID to get the draft") + } + + resp := &documents.ListDocumentDraftsResponse{} + + if err := api.db.WithSave(ctx, func(conn *sqlite.Conn) error { + edb, err := hypersql.EntitiesLookupID(conn, in.DocumentId) if err != nil { return err } - pub := &documents.Document{ - Id: id, - Title: title, - Author: core.Principal(ownerBin).String(), - Editors: editors, - CreateTime: timestamppb.New(time.Unix(int64(createTime), 0)), - UpdateTime: timestamppb.New(time.Unix(int64(updatedTime/1000000), (updatedTime%1000000)*1000)), + if edb.ResourcesID == 0 { + return status.Errorf(codes.NotFound, "document %s not found", in.DocumentId) } - resp.Documents = append(resp.Documents, pub) - return nil - }, pattern, cursorBlobID, req.PageSize) - if err != nil { - return nil, err - } - pageToken, err := me.DeviceKey().Encrypt([]byte(strconv.Itoa(int(lastBlobID - 1)))) - if err != nil { + return sqlitex.Exec(conn, qListDocumentDrafts(), func(stmt *sqlite.Stmt) error { + var ( + createTime = stmt.ColumnInt64(0) + updateTime = stmt.ColumnInt64(1) + author = stmt.ColumnBytesUnsafe(2) + editors = strings.Split(stmt.ColumnText(3), ",") + meta = stmt.ColumnText(4) + ) + for i, x := range editors { + data, err := hex.DecodeString(x) + if err != nil { + return fmt.Errorf("failed to decode editor: %w", err) + } + + editors[i] = core.Principal(data).String() + } + + doc := &documents.Document{ + Id: in.DocumentId, + Title: meta, + Author: core.Principal(author).String(), + Editors: editors, + CreateTime: timestamppb.New(time.Unix(createTime, 0)), + UpdateTime: timestamppb.New(hlc.Timestamp(updateTime).Time()), + } + + resp.Drafts = append(resp.Drafts, doc) + + return err + }, edb.ResourcesID) + }); err != nil { return nil, err } - if lastBlobID != 0 && req.PageSize == int32(len(resp.Documents)) { - resp.NextPageToken = base64.StdEncoding.EncodeToString(pageToken) - } + return resp, nil } +var qListDocumentDrafts = dqb.Str(` + WITH RECURSIVE + -- Resolve the change DAG starting from the draft change for a given resource. + cset (id) AS ( + SELECT blob FROM drafts + WHERE resource = :resource + UNION + SELECT blob_links.target + FROM blob_links + JOIN cset ON cset.id = blob_links.source AND blob_links.type = 'change/dep' + ) + -- Process the resolved change DAG to get the current state of the resource. + SELECT + resources.create_time AS create_time, + MAX(sb.ts) AS update_time, + authors.principal AS author, + GROUP_CONCAT(DISTINCT HEX(editors.principal)) AS editors, + (JSONB_GROUP_ARRAY(sb.meta ORDER BY ts DESC, editors.principal DESC) FILTER (WHERE sb.meta IS NOT NULL))->>'0' AS meta + FROM cset + JOIN structural_blobs sb ON sb.id = cset.id + JOIN resources ON resources.id = sb.resource + JOIN public_keys editors ON editors.id = sb.author + JOIN public_keys authors ON authors.id = resources.owner + GROUP BY sb.resource + ORDER BY update_time DESC, resources.id DESC; +`) + // PublishDraft implements the corresponding gRPC method. func (api *Server) PublishDraft(ctx context.Context, in *documents.PublishDraftRequest) (*documents.Publication, error) { if in.DocumentId == "" { diff --git a/backend/daemon/apiutil/page_token.go b/backend/daemon/apiutil/page_token.go new file mode 100644 index 000000000..dcef2578d --- /dev/null +++ b/backend/daemon/apiutil/page_token.go @@ -0,0 +1,54 @@ +// Package apiutil provides various utility functions for writing our API handlers. +package apiutil + +import ( + "encoding/base64" + "encoding/json" + "fmt" +) + +// Key is an interface for an encryption key. +type Key interface { + Encrypt([]byte) ([]byte, error) + Decrypt([]byte) ([]byte, error) +} + +// EncodePageToken creates a page token from the provided value. +// If the key is not nil, the token will be encrypted, for ensuring its opacity to the client. +// Encrypted tokens must be decrypted with the same key when decoding them. +func EncodePageToken(value any, key Key) (string, error) { + data, err := json.Marshal(value) + if err != nil { + return "", fmt.Errorf("failed to marshal page token value: %w", err) + } + + if key != nil { + data, err = key.Encrypt(data) + if err != nil { + return "", fmt.Errorf("failed to encrypt page token: %w", err) + } + } + + return base64.RawURLEncoding.EncodeToString(data), nil +} + +// DecodePageToken decodes the provided page token into the value. +func DecodePageToken(token string, value any, key Key) error { + data, err := base64.RawURLEncoding.DecodeString(token) + if err != nil { + return fmt.Errorf("failed to decode page token: %w", err) + } + + if key != nil { + data, err = key.Decrypt(data) + if err != nil { + return fmt.Errorf("failed to decrypt page token: %w", err) + } + } + + if err := json.Unmarshal(data, value); err != nil { + return fmt.Errorf("failed to unmarshal page token value: %w", err) + } + + return nil +} diff --git a/backend/genproto/documents/v1alpha/documents.pb.go b/backend/genproto/documents/v1alpha/documents.pb.go index c1dbcc8b9..ee800e515 100644 --- a/backend/genproto/documents/v1alpha/documents.pb.go +++ b/backend/genproto/documents/v1alpha/documents.pb.go @@ -528,6 +528,105 @@ func (x *ListDraftsResponse) GetNextPageToken() string { return "" } +// Request to list document drafts. +type ListDocumentDraftsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID of the document to list drafts for. + DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` +} + +func (x *ListDocumentDraftsRequest) Reset() { + *x = ListDocumentDraftsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v1alpha_documents_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDocumentDraftsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDocumentDraftsRequest) ProtoMessage() {} + +func (x *ListDocumentDraftsRequest) ProtoReflect() protoreflect.Message { + mi := &file_documents_v1alpha_documents_proto_msgTypes[8] + 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 ListDocumentDraftsRequest.ProtoReflect.Descriptor instead. +func (*ListDocumentDraftsRequest) Descriptor() ([]byte, []int) { + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{8} +} + +func (x *ListDocumentDraftsRequest) GetDocumentId() string { + if x != nil { + return x.DocumentId + } + return "" +} + +// Response with the list of drafts for a given document ID. +type ListDocumentDraftsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Drafts come without content, only metadata, + // similar to the rest of list responses. + Drafts []*Document `protobuf:"bytes,1,rep,name=drafts,proto3" json:"drafts,omitempty"` +} + +func (x *ListDocumentDraftsResponse) Reset() { + *x = ListDocumentDraftsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_documents_v1alpha_documents_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDocumentDraftsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDocumentDraftsResponse) ProtoMessage() {} + +func (x *ListDocumentDraftsResponse) ProtoReflect() protoreflect.Message { + mi := &file_documents_v1alpha_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 ListDocumentDraftsResponse.ProtoReflect.Descriptor instead. +func (*ListDocumentDraftsResponse) Descriptor() ([]byte, []int) { + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{9} +} + +func (x *ListDocumentDraftsResponse) GetDrafts() []*Document { + if x != nil { + return x.Drafts + } + return nil +} + // Request to publish a draft. type PublishDraftRequest struct { state protoimpl.MessageState @@ -541,7 +640,7 @@ type PublishDraftRequest struct { func (x *PublishDraftRequest) Reset() { *x = PublishDraftRequest{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[8] + mi := &file_documents_v1alpha_documents_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -554,7 +653,7 @@ func (x *PublishDraftRequest) String() string { func (*PublishDraftRequest) ProtoMessage() {} func (x *PublishDraftRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[8] + mi := &file_documents_v1alpha_documents_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -567,7 +666,7 @@ func (x *PublishDraftRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PublishDraftRequest.ProtoReflect.Descriptor instead. func (*PublishDraftRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{8} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{10} } func (x *PublishDraftRequest) GetDocumentId() string { @@ -595,7 +694,7 @@ type GetPublicationRequest struct { func (x *GetPublicationRequest) Reset() { *x = GetPublicationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[9] + mi := &file_documents_v1alpha_documents_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -608,7 +707,7 @@ func (x *GetPublicationRequest) String() string { func (*GetPublicationRequest) ProtoMessage() {} func (x *GetPublicationRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[9] + mi := &file_documents_v1alpha_documents_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -621,7 +720,7 @@ func (x *GetPublicationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetPublicationRequest.ProtoReflect.Descriptor instead. func (*GetPublicationRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{9} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{11} } func (x *GetPublicationRequest) GetDocumentId() string { @@ -659,7 +758,7 @@ type DeletePublicationRequest struct { func (x *DeletePublicationRequest) Reset() { *x = DeletePublicationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[10] + mi := &file_documents_v1alpha_documents_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -672,7 +771,7 @@ func (x *DeletePublicationRequest) String() string { func (*DeletePublicationRequest) ProtoMessage() {} func (x *DeletePublicationRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[10] + mi := &file_documents_v1alpha_documents_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -685,7 +784,7 @@ func (x *DeletePublicationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePublicationRequest.ProtoReflect.Descriptor instead. func (*DeletePublicationRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{10} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{12} } func (x *DeletePublicationRequest) GetDocumentId() string { @@ -710,7 +809,7 @@ type PushPublicationRequest struct { func (x *PushPublicationRequest) Reset() { *x = PushPublicationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[11] + mi := &file_documents_v1alpha_documents_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -723,7 +822,7 @@ func (x *PushPublicationRequest) String() string { func (*PushPublicationRequest) ProtoMessage() {} func (x *PushPublicationRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[11] + mi := &file_documents_v1alpha_documents_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -736,7 +835,7 @@ func (x *PushPublicationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PushPublicationRequest.ProtoReflect.Descriptor instead. func (*PushPublicationRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{11} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{13} } func (x *PushPublicationRequest) GetDocumentId() string { @@ -772,7 +871,7 @@ type ListPublicationsRequest struct { func (x *ListPublicationsRequest) Reset() { *x = ListPublicationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[12] + mi := &file_documents_v1alpha_documents_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -785,7 +884,7 @@ func (x *ListPublicationsRequest) String() string { func (*ListPublicationsRequest) ProtoMessage() {} func (x *ListPublicationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[12] + mi := &file_documents_v1alpha_documents_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -798,7 +897,7 @@ func (x *ListPublicationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPublicationsRequest.ProtoReflect.Descriptor instead. func (*ListPublicationsRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{12} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{14} } func (x *ListPublicationsRequest) GetPageSize() int32 { @@ -839,7 +938,7 @@ type ListPublicationsResponse struct { func (x *ListPublicationsResponse) Reset() { *x = ListPublicationsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[13] + mi := &file_documents_v1alpha_documents_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -852,7 +951,7 @@ func (x *ListPublicationsResponse) String() string { func (*ListPublicationsResponse) ProtoMessage() {} func (x *ListPublicationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[13] + mi := &file_documents_v1alpha_documents_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -865,7 +964,7 @@ func (x *ListPublicationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListPublicationsResponse.ProtoReflect.Descriptor instead. func (*ListPublicationsResponse) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{13} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{15} } func (x *ListPublicationsResponse) GetPublications() []*Publication { @@ -899,7 +998,7 @@ type ListAccountPublicationsRequest struct { func (x *ListAccountPublicationsRequest) Reset() { *x = ListAccountPublicationsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[14] + mi := &file_documents_v1alpha_documents_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -912,7 +1011,7 @@ func (x *ListAccountPublicationsRequest) String() string { func (*ListAccountPublicationsRequest) ProtoMessage() {} func (x *ListAccountPublicationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[14] + mi := &file_documents_v1alpha_documents_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -925,7 +1024,7 @@ func (x *ListAccountPublicationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAccountPublicationsRequest.ProtoReflect.Descriptor instead. func (*ListAccountPublicationsRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{14} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{16} } func (x *ListAccountPublicationsRequest) GetPageSize() int32 { @@ -973,7 +1072,7 @@ type Publication struct { func (x *Publication) Reset() { *x = Publication{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[15] + mi := &file_documents_v1alpha_documents_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -986,7 +1085,7 @@ func (x *Publication) String() string { func (*Publication) ProtoMessage() {} func (x *Publication) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[15] + mi := &file_documents_v1alpha_documents_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -999,7 +1098,7 @@ func (x *Publication) ProtoReflect() protoreflect.Message { // Deprecated: Use Publication.ProtoReflect.Descriptor instead. func (*Publication) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{15} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{17} } func (x *Publication) GetVersion() string { @@ -1044,7 +1143,7 @@ type Document struct { func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[16] + mi := &file_documents_v1alpha_documents_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1057,7 +1156,7 @@ func (x *Document) String() string { func (*Document) ProtoMessage() {} func (x *Document) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[16] + mi := &file_documents_v1alpha_documents_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1070,7 +1169,7 @@ func (x *Document) ProtoReflect() protoreflect.Message { // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{16} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{18} } func (x *Document) GetId() string { @@ -1144,7 +1243,7 @@ type BlockNode struct { func (x *BlockNode) Reset() { *x = BlockNode{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[17] + mi := &file_documents_v1alpha_documents_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1157,7 +1256,7 @@ func (x *BlockNode) String() string { func (*BlockNode) ProtoMessage() {} func (x *BlockNode) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[17] + mi := &file_documents_v1alpha_documents_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1170,7 +1269,7 @@ func (x *BlockNode) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockNode.ProtoReflect.Descriptor instead. func (*BlockNode) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{17} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{19} } func (x *BlockNode) GetBlock() *Block { @@ -1214,7 +1313,7 @@ type Block struct { func (x *Block) Reset() { *x = Block{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[18] + mi := &file_documents_v1alpha_documents_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1227,7 +1326,7 @@ func (x *Block) String() string { func (*Block) ProtoMessage() {} func (x *Block) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[18] + mi := &file_documents_v1alpha_documents_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1240,7 +1339,7 @@ func (x *Block) ProtoReflect() protoreflect.Message { // Deprecated: Use Block.ProtoReflect.Descriptor instead. func (*Block) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{18} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{20} } func (x *Block) GetId() string { @@ -1323,7 +1422,7 @@ type Annotation struct { func (x *Annotation) Reset() { *x = Annotation{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[19] + mi := &file_documents_v1alpha_documents_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1336,7 +1435,7 @@ func (x *Annotation) String() string { func (*Annotation) ProtoMessage() {} func (x *Annotation) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[19] + mi := &file_documents_v1alpha_documents_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1349,7 +1448,7 @@ func (x *Annotation) ProtoReflect() protoreflect.Message { // Deprecated: Use Annotation.ProtoReflect.Descriptor instead. func (*Annotation) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{19} + return file_documents_v1alpha_documents_proto_rawDescGZIP(), []int{21} } func (x *Annotation) GetType() string { @@ -1406,7 +1505,7 @@ type DocumentChange_MoveBlock struct { func (x *DocumentChange_MoveBlock) Reset() { *x = DocumentChange_MoveBlock{} if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_documents_proto_msgTypes[20] + mi := &file_documents_v1alpha_documents_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1419,7 +1518,7 @@ func (x *DocumentChange_MoveBlock) String() string { func (*DocumentChange_MoveBlock) ProtoMessage() {} func (x *DocumentChange_MoveBlock) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_documents_proto_msgTypes[20] + mi := &file_documents_v1alpha_documents_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1532,209 +1631,228 @@ var file_documents_v1alpha_documents_proto_rawDesc = []byte{ 0x74, 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, 0x36, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x44, - 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x15, - 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 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, - 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x6e, 0x6c, 0x79, 0x22, - 0x3b, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x16, - 0x50, 0x75, 0x73, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x78, 0x0a, 0x17, 0x4c, 0x69, 0x73, - 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, - 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x4f, - 0x6e, 0x6c, 0x79, 0x22, 0x92, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4e, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, - 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x7b, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 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, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x6c, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, - 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3c, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3f, 0x0a, 0x06, 0x64, 0x72, 0x61, 0x66, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x22, 0xe1, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, - 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x65, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, - 0x64, 0x72, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 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, 0x12, 0x3b, - 0x0a, 0x0b, 0x63, 0x72, 0x65, 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, 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, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x64, 0x72, 0x61, 0x66, 0x74, + 0x73, 0x22, 0x36, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x44, 0x72, 0x61, 0x66, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x71, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x49, 0x64, 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, 0x12, 0x1d, 0x0a, + 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x3b, 0x0a, 0x18, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x16, 0x50, 0x75, 0x73, + 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x78, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, + 0x22, 0x92, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, + 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, + 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x7b, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x49, 0x64, 0x22, 0x6c, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x43, 0x0a, 0x08, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0xe1, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x65, + 0x64, 0x69, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x64, + 0x69, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, + 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, + 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x76, 0x31, 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, 0x12, 0x3b, 0x0a, 0x0b, 0x63, + 0x72, 0x65, 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, 0x3d, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 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, 0x0b, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, - 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x44, 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, + 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, 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, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 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, 0x0b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x54, 0x69, 0x6d, 0x65, 0x22, 0x8d, 0x01, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x6f, + 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x44, + 0x0a, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 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, 0xcf, 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, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x54, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 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, 0x4b, + 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 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, 0xcf, 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, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x54, 0x0a, 0x0a, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, + 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, 0xf8, 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, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x59, 0x0a, 0x0a, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 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, 0x4b, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, - 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 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, 0xf8, 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, 0x10, 0x0a, 0x03, - 0x72, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x59, - 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, - 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 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, 0x32, 0x8b, 0x05, 0x0a, 0x06, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x12, - 0x69, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x31, + 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, 0x32, 0x97, 0x06, 0x0a, 0x06, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x12, 0x69, 0x0a, 0x0b, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x31, 0x2e, 0x63, 0x6f, + 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x0b, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x44, 0x72, 0x61, 0x66, 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, 0x63, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, - 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x47, 0x65, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x0b, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, + 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x72, 0x61, + 0x66, 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, 0x63, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x2e, 0x2e, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, + 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, - 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x63, 0x6f, + 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x0a, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, + 0x72, 0x61, 0x66, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x89, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, + 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x39, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x72, 0x61, + 0x66, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x71, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x12, 0x30, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x44, 0x72, 0x61, 0x66, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x44, 0x72, 0x61, - 0x66, 0x74, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, - 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, - 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x32, 0xe4, 0x04, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xe4, 0x04, 0x0a, 0x0c, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, + 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, + 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, - 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x36, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, - 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6d, + 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, + 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, + 0x50, 0x75, 0x73, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, + 0x50, 0x75, 0x73, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x91, + 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, - 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x91, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x6d, 0x69, 0x6e, - 0x74, 0x74, 0x65, 0x72, 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, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, + 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 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, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x3b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1749,7 +1867,7 @@ func file_documents_v1alpha_documents_proto_rawDescGZIP() []byte { return file_documents_v1alpha_documents_proto_rawDescData } -var file_documents_v1alpha_documents_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_documents_v1alpha_documents_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_documents_v1alpha_documents_proto_goTypes = []interface{}{ (*CreateDraftRequest)(nil), // 0: com.mintter.documents.v1alpha.CreateDraftRequest (*DeleteDraftRequest)(nil), // 1: com.mintter.documents.v1alpha.DeleteDraftRequest @@ -1759,68 +1877,73 @@ var file_documents_v1alpha_documents_proto_goTypes = []interface{}{ (*DocumentChange)(nil), // 5: com.mintter.documents.v1alpha.DocumentChange (*ListDraftsRequest)(nil), // 6: com.mintter.documents.v1alpha.ListDraftsRequest (*ListDraftsResponse)(nil), // 7: com.mintter.documents.v1alpha.ListDraftsResponse - (*PublishDraftRequest)(nil), // 8: com.mintter.documents.v1alpha.PublishDraftRequest - (*GetPublicationRequest)(nil), // 9: com.mintter.documents.v1alpha.GetPublicationRequest - (*DeletePublicationRequest)(nil), // 10: com.mintter.documents.v1alpha.DeletePublicationRequest - (*PushPublicationRequest)(nil), // 11: com.mintter.documents.v1alpha.PushPublicationRequest - (*ListPublicationsRequest)(nil), // 12: com.mintter.documents.v1alpha.ListPublicationsRequest - (*ListPublicationsResponse)(nil), // 13: com.mintter.documents.v1alpha.ListPublicationsResponse - (*ListAccountPublicationsRequest)(nil), // 14: com.mintter.documents.v1alpha.ListAccountPublicationsRequest - (*Publication)(nil), // 15: com.mintter.documents.v1alpha.Publication - (*Document)(nil), // 16: com.mintter.documents.v1alpha.Document - (*BlockNode)(nil), // 17: com.mintter.documents.v1alpha.BlockNode - (*Block)(nil), // 18: com.mintter.documents.v1alpha.Block - (*Annotation)(nil), // 19: com.mintter.documents.v1alpha.Annotation - (*DocumentChange_MoveBlock)(nil), // 20: com.mintter.documents.v1alpha.DocumentChange.MoveBlock - nil, // 21: com.mintter.documents.v1alpha.Block.AttributesEntry - nil, // 22: com.mintter.documents.v1alpha.Annotation.AttributesEntry - (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 24: google.protobuf.Empty + (*ListDocumentDraftsRequest)(nil), // 8: com.mintter.documents.v1alpha.ListDocumentDraftsRequest + (*ListDocumentDraftsResponse)(nil), // 9: com.mintter.documents.v1alpha.ListDocumentDraftsResponse + (*PublishDraftRequest)(nil), // 10: com.mintter.documents.v1alpha.PublishDraftRequest + (*GetPublicationRequest)(nil), // 11: com.mintter.documents.v1alpha.GetPublicationRequest + (*DeletePublicationRequest)(nil), // 12: com.mintter.documents.v1alpha.DeletePublicationRequest + (*PushPublicationRequest)(nil), // 13: com.mintter.documents.v1alpha.PushPublicationRequest + (*ListPublicationsRequest)(nil), // 14: com.mintter.documents.v1alpha.ListPublicationsRequest + (*ListPublicationsResponse)(nil), // 15: com.mintter.documents.v1alpha.ListPublicationsResponse + (*ListAccountPublicationsRequest)(nil), // 16: com.mintter.documents.v1alpha.ListAccountPublicationsRequest + (*Publication)(nil), // 17: com.mintter.documents.v1alpha.Publication + (*Document)(nil), // 18: com.mintter.documents.v1alpha.Document + (*BlockNode)(nil), // 19: com.mintter.documents.v1alpha.BlockNode + (*Block)(nil), // 20: com.mintter.documents.v1alpha.Block + (*Annotation)(nil), // 21: com.mintter.documents.v1alpha.Annotation + (*DocumentChange_MoveBlock)(nil), // 22: com.mintter.documents.v1alpha.DocumentChange.MoveBlock + nil, // 23: com.mintter.documents.v1alpha.Block.AttributesEntry + nil, // 24: com.mintter.documents.v1alpha.Annotation.AttributesEntry + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 26: google.protobuf.Empty } var file_documents_v1alpha_documents_proto_depIdxs = []int32{ 5, // 0: com.mintter.documents.v1alpha.UpdateDraftRequest.changes:type_name -> com.mintter.documents.v1alpha.DocumentChange - 16, // 1: com.mintter.documents.v1alpha.UpdateDraftResponse.updated_document:type_name -> com.mintter.documents.v1alpha.Document - 20, // 2: com.mintter.documents.v1alpha.DocumentChange.move_block:type_name -> com.mintter.documents.v1alpha.DocumentChange.MoveBlock - 18, // 3: com.mintter.documents.v1alpha.DocumentChange.replace_block:type_name -> com.mintter.documents.v1alpha.Block - 16, // 4: com.mintter.documents.v1alpha.ListDraftsResponse.documents:type_name -> com.mintter.documents.v1alpha.Document - 15, // 5: com.mintter.documents.v1alpha.ListPublicationsResponse.publications:type_name -> com.mintter.documents.v1alpha.Publication - 16, // 6: com.mintter.documents.v1alpha.Publication.document:type_name -> com.mintter.documents.v1alpha.Document - 17, // 7: com.mintter.documents.v1alpha.Document.children:type_name -> com.mintter.documents.v1alpha.BlockNode - 23, // 8: com.mintter.documents.v1alpha.Document.create_time:type_name -> google.protobuf.Timestamp - 23, // 9: com.mintter.documents.v1alpha.Document.update_time:type_name -> google.protobuf.Timestamp - 23, // 10: com.mintter.documents.v1alpha.Document.publish_time:type_name -> google.protobuf.Timestamp - 18, // 11: com.mintter.documents.v1alpha.BlockNode.block:type_name -> com.mintter.documents.v1alpha.Block - 17, // 12: com.mintter.documents.v1alpha.BlockNode.children:type_name -> com.mintter.documents.v1alpha.BlockNode - 21, // 13: com.mintter.documents.v1alpha.Block.attributes:type_name -> com.mintter.documents.v1alpha.Block.AttributesEntry - 19, // 14: com.mintter.documents.v1alpha.Block.annotations:type_name -> com.mintter.documents.v1alpha.Annotation - 22, // 15: com.mintter.documents.v1alpha.Annotation.attributes:type_name -> com.mintter.documents.v1alpha.Annotation.AttributesEntry - 0, // 16: com.mintter.documents.v1alpha.Drafts.CreateDraft:input_type -> com.mintter.documents.v1alpha.CreateDraftRequest - 1, // 17: com.mintter.documents.v1alpha.Drafts.DeleteDraft:input_type -> com.mintter.documents.v1alpha.DeleteDraftRequest - 2, // 18: com.mintter.documents.v1alpha.Drafts.GetDraft:input_type -> com.mintter.documents.v1alpha.GetDraftRequest - 3, // 19: com.mintter.documents.v1alpha.Drafts.UpdateDraft:input_type -> com.mintter.documents.v1alpha.UpdateDraftRequest - 6, // 20: com.mintter.documents.v1alpha.Drafts.ListDrafts:input_type -> com.mintter.documents.v1alpha.ListDraftsRequest - 8, // 21: com.mintter.documents.v1alpha.Drafts.PublishDraft:input_type -> com.mintter.documents.v1alpha.PublishDraftRequest - 9, // 22: com.mintter.documents.v1alpha.Publications.GetPublication:input_type -> com.mintter.documents.v1alpha.GetPublicationRequest - 10, // 23: com.mintter.documents.v1alpha.Publications.DeletePublication:input_type -> com.mintter.documents.v1alpha.DeletePublicationRequest - 12, // 24: com.mintter.documents.v1alpha.Publications.ListPublications:input_type -> com.mintter.documents.v1alpha.ListPublicationsRequest - 11, // 25: com.mintter.documents.v1alpha.Publications.PushPublication:input_type -> com.mintter.documents.v1alpha.PushPublicationRequest - 14, // 26: com.mintter.documents.v1alpha.Publications.ListAccountPublications:input_type -> com.mintter.documents.v1alpha.ListAccountPublicationsRequest - 16, // 27: com.mintter.documents.v1alpha.Drafts.CreateDraft:output_type -> com.mintter.documents.v1alpha.Document - 24, // 28: com.mintter.documents.v1alpha.Drafts.DeleteDraft:output_type -> google.protobuf.Empty - 16, // 29: com.mintter.documents.v1alpha.Drafts.GetDraft:output_type -> com.mintter.documents.v1alpha.Document - 4, // 30: com.mintter.documents.v1alpha.Drafts.UpdateDraft:output_type -> com.mintter.documents.v1alpha.UpdateDraftResponse - 7, // 31: com.mintter.documents.v1alpha.Drafts.ListDrafts:output_type -> com.mintter.documents.v1alpha.ListDraftsResponse - 15, // 32: com.mintter.documents.v1alpha.Drafts.PublishDraft:output_type -> com.mintter.documents.v1alpha.Publication - 15, // 33: com.mintter.documents.v1alpha.Publications.GetPublication:output_type -> com.mintter.documents.v1alpha.Publication - 24, // 34: com.mintter.documents.v1alpha.Publications.DeletePublication:output_type -> google.protobuf.Empty - 13, // 35: com.mintter.documents.v1alpha.Publications.ListPublications:output_type -> com.mintter.documents.v1alpha.ListPublicationsResponse - 24, // 36: com.mintter.documents.v1alpha.Publications.PushPublication:output_type -> google.protobuf.Empty - 13, // 37: com.mintter.documents.v1alpha.Publications.ListAccountPublications:output_type -> com.mintter.documents.v1alpha.ListPublicationsResponse - 27, // [27:38] is the sub-list for method output_type - 16, // [16:27] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 18, // 1: com.mintter.documents.v1alpha.UpdateDraftResponse.updated_document:type_name -> com.mintter.documents.v1alpha.Document + 22, // 2: com.mintter.documents.v1alpha.DocumentChange.move_block:type_name -> com.mintter.documents.v1alpha.DocumentChange.MoveBlock + 20, // 3: com.mintter.documents.v1alpha.DocumentChange.replace_block:type_name -> com.mintter.documents.v1alpha.Block + 18, // 4: com.mintter.documents.v1alpha.ListDraftsResponse.documents:type_name -> com.mintter.documents.v1alpha.Document + 18, // 5: com.mintter.documents.v1alpha.ListDocumentDraftsResponse.drafts:type_name -> com.mintter.documents.v1alpha.Document + 17, // 6: com.mintter.documents.v1alpha.ListPublicationsResponse.publications:type_name -> com.mintter.documents.v1alpha.Publication + 18, // 7: com.mintter.documents.v1alpha.Publication.document:type_name -> com.mintter.documents.v1alpha.Document + 19, // 8: com.mintter.documents.v1alpha.Document.children:type_name -> com.mintter.documents.v1alpha.BlockNode + 25, // 9: com.mintter.documents.v1alpha.Document.create_time:type_name -> google.protobuf.Timestamp + 25, // 10: com.mintter.documents.v1alpha.Document.update_time:type_name -> google.protobuf.Timestamp + 25, // 11: com.mintter.documents.v1alpha.Document.publish_time:type_name -> google.protobuf.Timestamp + 20, // 12: com.mintter.documents.v1alpha.BlockNode.block:type_name -> com.mintter.documents.v1alpha.Block + 19, // 13: com.mintter.documents.v1alpha.BlockNode.children:type_name -> com.mintter.documents.v1alpha.BlockNode + 23, // 14: com.mintter.documents.v1alpha.Block.attributes:type_name -> com.mintter.documents.v1alpha.Block.AttributesEntry + 21, // 15: com.mintter.documents.v1alpha.Block.annotations:type_name -> com.mintter.documents.v1alpha.Annotation + 24, // 16: com.mintter.documents.v1alpha.Annotation.attributes:type_name -> com.mintter.documents.v1alpha.Annotation.AttributesEntry + 0, // 17: com.mintter.documents.v1alpha.Drafts.CreateDraft:input_type -> com.mintter.documents.v1alpha.CreateDraftRequest + 1, // 18: com.mintter.documents.v1alpha.Drafts.DeleteDraft:input_type -> com.mintter.documents.v1alpha.DeleteDraftRequest + 2, // 19: com.mintter.documents.v1alpha.Drafts.GetDraft:input_type -> com.mintter.documents.v1alpha.GetDraftRequest + 3, // 20: com.mintter.documents.v1alpha.Drafts.UpdateDraft:input_type -> com.mintter.documents.v1alpha.UpdateDraftRequest + 6, // 21: com.mintter.documents.v1alpha.Drafts.ListDrafts:input_type -> com.mintter.documents.v1alpha.ListDraftsRequest + 8, // 22: com.mintter.documents.v1alpha.Drafts.ListDocumentDrafts:input_type -> com.mintter.documents.v1alpha.ListDocumentDraftsRequest + 10, // 23: com.mintter.documents.v1alpha.Drafts.PublishDraft:input_type -> com.mintter.documents.v1alpha.PublishDraftRequest + 11, // 24: com.mintter.documents.v1alpha.Publications.GetPublication:input_type -> com.mintter.documents.v1alpha.GetPublicationRequest + 12, // 25: com.mintter.documents.v1alpha.Publications.DeletePublication:input_type -> com.mintter.documents.v1alpha.DeletePublicationRequest + 14, // 26: com.mintter.documents.v1alpha.Publications.ListPublications:input_type -> com.mintter.documents.v1alpha.ListPublicationsRequest + 13, // 27: com.mintter.documents.v1alpha.Publications.PushPublication:input_type -> com.mintter.documents.v1alpha.PushPublicationRequest + 16, // 28: com.mintter.documents.v1alpha.Publications.ListAccountPublications:input_type -> com.mintter.documents.v1alpha.ListAccountPublicationsRequest + 18, // 29: com.mintter.documents.v1alpha.Drafts.CreateDraft:output_type -> com.mintter.documents.v1alpha.Document + 26, // 30: com.mintter.documents.v1alpha.Drafts.DeleteDraft:output_type -> google.protobuf.Empty + 18, // 31: com.mintter.documents.v1alpha.Drafts.GetDraft:output_type -> com.mintter.documents.v1alpha.Document + 4, // 32: com.mintter.documents.v1alpha.Drafts.UpdateDraft:output_type -> com.mintter.documents.v1alpha.UpdateDraftResponse + 7, // 33: com.mintter.documents.v1alpha.Drafts.ListDrafts:output_type -> com.mintter.documents.v1alpha.ListDraftsResponse + 9, // 34: com.mintter.documents.v1alpha.Drafts.ListDocumentDrafts:output_type -> com.mintter.documents.v1alpha.ListDocumentDraftsResponse + 17, // 35: com.mintter.documents.v1alpha.Drafts.PublishDraft:output_type -> com.mintter.documents.v1alpha.Publication + 17, // 36: com.mintter.documents.v1alpha.Publications.GetPublication:output_type -> com.mintter.documents.v1alpha.Publication + 26, // 37: com.mintter.documents.v1alpha.Publications.DeletePublication:output_type -> google.protobuf.Empty + 15, // 38: com.mintter.documents.v1alpha.Publications.ListPublications:output_type -> com.mintter.documents.v1alpha.ListPublicationsResponse + 26, // 39: com.mintter.documents.v1alpha.Publications.PushPublication:output_type -> google.protobuf.Empty + 15, // 40: com.mintter.documents.v1alpha.Publications.ListAccountPublications:output_type -> com.mintter.documents.v1alpha.ListPublicationsResponse + 29, // [29:41] is the sub-list for method output_type + 17, // [17:29] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_documents_v1alpha_documents_proto_init() } @@ -1926,7 +2049,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublishDraftRequest); i { + switch v := v.(*ListDocumentDraftsRequest); i { case 0: return &v.state case 1: @@ -1938,7 +2061,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPublicationRequest); i { + switch v := v.(*ListDocumentDraftsResponse); i { case 0: return &v.state case 1: @@ -1950,7 +2073,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePublicationRequest); i { + switch v := v.(*PublishDraftRequest); i { case 0: return &v.state case 1: @@ -1962,7 +2085,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushPublicationRequest); i { + switch v := v.(*GetPublicationRequest); i { case 0: return &v.state case 1: @@ -1974,7 +2097,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPublicationsRequest); i { + switch v := v.(*DeletePublicationRequest); i { case 0: return &v.state case 1: @@ -1986,7 +2109,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPublicationsResponse); i { + switch v := v.(*PushPublicationRequest); i { case 0: return &v.state case 1: @@ -1998,7 +2121,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountPublicationsRequest); i { + switch v := v.(*ListPublicationsRequest); i { case 0: return &v.state case 1: @@ -2010,7 +2133,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Publication); i { + switch v := v.(*ListPublicationsResponse); i { case 0: return &v.state case 1: @@ -2022,7 +2145,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Document); i { + switch v := v.(*ListAccountPublicationsRequest); i { case 0: return &v.state case 1: @@ -2034,7 +2157,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockNode); i { + switch v := v.(*Publication); i { case 0: return &v.state case 1: @@ -2046,7 +2169,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Block); i { + switch v := v.(*Document); i { case 0: return &v.state case 1: @@ -2058,7 +2181,7 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Annotation); i { + switch v := v.(*BlockNode); i { case 0: return &v.state case 1: @@ -2070,6 +2193,30 @@ func file_documents_v1alpha_documents_proto_init() { } } file_documents_v1alpha_documents_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + 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_v1alpha_documents_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + 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_v1alpha_documents_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DocumentChange_MoveBlock); i { case 0: return &v.state @@ -2094,7 +2241,7 @@ func file_documents_v1alpha_documents_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_documents_v1alpha_documents_proto_rawDesc, NumEnums: 0, - NumMessages: 23, + NumMessages: 25, NumExtensions: 0, NumServices: 2, }, diff --git a/backend/genproto/documents/v1alpha/documents_grpc.pb.go b/backend/genproto/documents/v1alpha/documents_grpc.pb.go index 05c227773..b75e8faa5 100644 --- a/backend/genproto/documents/v1alpha/documents_grpc.pb.go +++ b/backend/genproto/documents/v1alpha/documents_grpc.pb.go @@ -33,6 +33,8 @@ type DraftsClient interface { UpdateDraft(ctx context.Context, in *UpdateDraftRequest, opts ...grpc.CallOption) (*UpdateDraftResponse, error) // List currently stored drafts. ListDrafts(ctx context.Context, in *ListDraftsRequest, opts ...grpc.CallOption) (*ListDraftsResponse, error) + // Lists drafts for a given document. + ListDocumentDrafts(ctx context.Context, in *ListDocumentDraftsRequest, opts ...grpc.CallOption) (*ListDocumentDraftsResponse, error) // Publishes a draft. I.e. draft will become a publication, and will no longer appear in drafts section. PublishDraft(ctx context.Context, in *PublishDraftRequest, opts ...grpc.CallOption) (*Publication, error) } @@ -90,6 +92,15 @@ func (c *draftsClient) ListDrafts(ctx context.Context, in *ListDraftsRequest, op return out, nil } +func (c *draftsClient) ListDocumentDrafts(ctx context.Context, in *ListDocumentDraftsRequest, opts ...grpc.CallOption) (*ListDocumentDraftsResponse, error) { + out := new(ListDocumentDraftsResponse) + err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Drafts/ListDocumentDrafts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *draftsClient) PublishDraft(ctx context.Context, in *PublishDraftRequest, opts ...grpc.CallOption) (*Publication, error) { out := new(Publication) err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Drafts/PublishDraft", in, out, opts...) @@ -113,6 +124,8 @@ type DraftsServer interface { UpdateDraft(context.Context, *UpdateDraftRequest) (*UpdateDraftResponse, error) // List currently stored drafts. ListDrafts(context.Context, *ListDraftsRequest) (*ListDraftsResponse, error) + // Lists drafts for a given document. + ListDocumentDrafts(context.Context, *ListDocumentDraftsRequest) (*ListDocumentDraftsResponse, error) // Publishes a draft. I.e. draft will become a publication, and will no longer appear in drafts section. PublishDraft(context.Context, *PublishDraftRequest) (*Publication, error) } @@ -136,6 +149,9 @@ func (UnimplementedDraftsServer) UpdateDraft(context.Context, *UpdateDraftReques func (UnimplementedDraftsServer) ListDrafts(context.Context, *ListDraftsRequest) (*ListDraftsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDrafts not implemented") } +func (UnimplementedDraftsServer) ListDocumentDrafts(context.Context, *ListDocumentDraftsRequest) (*ListDocumentDraftsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDocumentDrafts not implemented") +} func (UnimplementedDraftsServer) PublishDraft(context.Context, *PublishDraftRequest) (*Publication, error) { return nil, status.Errorf(codes.Unimplemented, "method PublishDraft not implemented") } @@ -241,6 +257,24 @@ func _Drafts_ListDrafts_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Drafts_ListDocumentDrafts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDocumentDraftsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DraftsServer).ListDocumentDrafts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/com.mintter.documents.v1alpha.Drafts/ListDocumentDrafts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DraftsServer).ListDocumentDrafts(ctx, req.(*ListDocumentDraftsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Drafts_PublishDraft_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PublishDraftRequest) if err := dec(in); err != nil { @@ -286,6 +320,10 @@ var Drafts_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListDrafts", Handler: _Drafts_ListDrafts_Handler, }, + { + MethodName: "ListDocumentDrafts", + Handler: _Drafts_ListDocumentDrafts_Handler, + }, { MethodName: "PublishDraft", Handler: _Drafts_PublishDraft_Handler, diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts index faf747c10..b704410a0 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts @@ -3,7 +3,7 @@ /* eslint-disable */ // @ts-nocheck -import { CreateDraftRequest, DeleteDraftRequest, DeletePublicationRequest, Document, GetDraftRequest, GetPublicationRequest, ListAccountPublicationsRequest, ListDraftsRequest, ListDraftsResponse, ListPublicationsRequest, ListPublicationsResponse, Publication, PublishDraftRequest, PushPublicationRequest, UpdateDraftRequest, UpdateDraftResponse } from "./documents_pb"; +import { CreateDraftRequest, DeleteDraftRequest, DeletePublicationRequest, Document, GetDraftRequest, GetPublicationRequest, ListAccountPublicationsRequest, ListDocumentDraftsRequest, ListDocumentDraftsResponse, ListDraftsRequest, ListDraftsResponse, ListPublicationsRequest, ListPublicationsResponse, Publication, PublishDraftRequest, PushPublicationRequest, UpdateDraftRequest, UpdateDraftResponse } from "./documents_pb"; import { Empty, MethodKind } from "@bufbuild/protobuf"; /** @@ -69,6 +69,17 @@ export const Drafts = { O: ListDraftsResponse, kind: MethodKind.Unary, }, + /** + * Lists drafts for a given document. + * + * @generated from rpc com.mintter.documents.v1alpha.Drafts.ListDocumentDrafts + */ + listDocumentDrafts: { + name: "ListDocumentDrafts", + I: ListDocumentDraftsRequest, + O: ListDocumentDraftsResponse, + kind: MethodKind.Unary, + }, /** * Publishes a draft. I.e. draft will become a publication, and will no longer appear in drafts section. * diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts index e5de4082d..1585a5ea7 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts @@ -470,6 +470,89 @@ export class ListDraftsResponse extends Message { } } +/** + * Request to list document drafts. + * + * @generated from message com.mintter.documents.v1alpha.ListDocumentDraftsRequest + */ +export class ListDocumentDraftsRequest extends Message { + /** + * ID of the document to list drafts for. + * + * @generated from field: string document_id = 1; + */ + documentId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.mintter.documents.v1alpha.ListDocumentDraftsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ListDocumentDraftsRequest { + return new ListDocumentDraftsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ListDocumentDraftsRequest { + return new ListDocumentDraftsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ListDocumentDraftsRequest { + return new ListDocumentDraftsRequest().fromJsonString(jsonString, options); + } + + static equals(a: ListDocumentDraftsRequest | PlainMessage | undefined, b: ListDocumentDraftsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ListDocumentDraftsRequest, a, b); + } +} + +/** + * Response with the list of drafts for a given document ID. + * + * @generated from message com.mintter.documents.v1alpha.ListDocumentDraftsResponse + */ +export class ListDocumentDraftsResponse extends Message { + /** + * Drafts come without content, only metadata, + * similar to the rest of list responses. + * + * @generated from field: repeated com.mintter.documents.v1alpha.Document drafts = 1; + */ + drafts: Document[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "com.mintter.documents.v1alpha.ListDocumentDraftsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "drafts", kind: "message", T: Document, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ListDocumentDraftsResponse { + return new ListDocumentDraftsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ListDocumentDraftsResponse { + return new ListDocumentDraftsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ListDocumentDraftsResponse { + return new ListDocumentDraftsResponse().fromJsonString(jsonString, options); + } + + static equals(a: ListDocumentDraftsResponse | PlainMessage | undefined, b: ListDocumentDraftsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ListDocumentDraftsResponse, a, b); + } +} + /** * Request to publish a draft. * diff --git a/proto/documents/v1alpha/documents.proto b/proto/documents/v1alpha/documents.proto index f38f2e845..a4a817b74 100644 --- a/proto/documents/v1alpha/documents.proto +++ b/proto/documents/v1alpha/documents.proto @@ -26,6 +26,9 @@ service Drafts { // List currently stored drafts. rpc ListDrafts(ListDraftsRequest) returns (ListDraftsResponse); + // Lists drafts for a given document. + rpc ListDocumentDrafts(ListDocumentDraftsRequest) returns (ListDocumentDraftsResponse); + // Publishes a draft. I.e. draft will become a publication, and will no longer appear in drafts section. rpc PublishDraft(PublishDraftRequest) returns (Publication); } @@ -122,6 +125,19 @@ message ListDraftsResponse { string next_page_token = 2; } +// Request to list document drafts. +message ListDocumentDraftsRequest { + // ID of the document to list drafts for. + string document_id = 1; +} + +// Response with the list of drafts for a given document ID. +message ListDocumentDraftsResponse { + // Drafts come without content, only metadata, + // similar to the rest of list responses. + repeated Document drafts = 1; +} + // Request to publish a draft. message PublishDraftRequest { // ID of the document which current draft needs to be published. @@ -168,7 +184,6 @@ message DeletePublicationRequest { string document_id = 1; } - // Request for getting a single publication. message PushPublicationRequest { // Required. ID of the published document to be pushed. diff --git a/proto/documents/v1alpha/go.gensum b/proto/documents/v1alpha/go.gensum index 7cf57f5e0..31d219132 100644 --- a/proto/documents/v1alpha/go.gensum +++ b/proto/documents/v1alpha/go.gensum @@ -1,2 +1,2 @@ -srcs: 87b6fbea3b72824a7e59f7753cfcb89a -outs: c3ca0218b7fc0cfc8f5e19bf2d92eb8b +srcs: 20f620981e085955706aecee9a11dc66 +outs: 068237ec251f7c88965f101e0804e981 diff --git a/proto/documents/v1alpha/js.gensum b/proto/documents/v1alpha/js.gensum index 774ec9ed5..cfb0a2e37 100644 --- a/proto/documents/v1alpha/js.gensum +++ b/proto/documents/v1alpha/js.gensum @@ -1,2 +1,2 @@ -srcs: 87b6fbea3b72824a7e59f7753cfcb89a -outs: 5bc84c9a52fe3c2341f22b7ac14fdf64 +srcs: 20f620981e085955706aecee9a11dc66 +outs: 49e15c8b4530e2be0308ace355cc1bbd