From 243ecf14b0c29377ef3503860ebce9efbf832671 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 29 Oct 2025 23:32:47 +0800 Subject: [PATCH] refactor(api): remove DeleteMemoTag and RenameMemoTag endpoints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BREAKING CHANGE: Removed DeleteMemoTag and RenameMemoTag API endpoints for better API consistency. Tags should now be managed by updating memo content directly via UpdateMemo endpoint. Backend changes: - Remove RenameMemoTag and DeleteMemoTag RPC methods from proto - Remove backend implementations in memo_service.go - Regenerate protocol buffers (Go, TypeScript, OpenAPI) Frontend changes: - Remove RenameTagDialog component - Simplify TagsSection to remove rename/delete functionality - Improve tag styling with active state highlighting - Add smooth transitions and better hover interactions - Polish TagTree component for consistency - Tags now only support click-to-filter (no inline editing) Style improvements: - Active tags highlighted with primary color and font-medium - Consistent hover states across flat and tree views - Better spacing and visual hierarchy - Improved empty state styling 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- proto/api/v1/memo_service.proto | 68 --- proto/gen/api/v1/memo_service.pb.go | 507 +++++------------- proto/gen/api/v1/memo_service.pb.gw.go | 182 ------- proto/gen/api/v1/memo_service_grpc.pb.go | 80 --- proto/gen/openapi.yaml | 128 ----- server/router/api/v1/memo_service.go | 98 ---- .../components/HomeSidebar/TagsSection.tsx | 109 +--- web/src/components/RenameTagDialog.tsx | 89 --- web/src/components/TagTree.tsx | 23 +- web/src/components/UserMenu.tsx | 8 +- web/src/types/proto/api/v1/memo_service.ts | 425 +-------------- 11 files changed, 188 insertions(+), 1529 deletions(-) delete mode 100644 web/src/components/RenameTagDialog.tsx diff --git a/proto/api/v1/memo_service.proto b/proto/api/v1/memo_service.proto index 60407434d..f54dfe75c 100644 --- a/proto/api/v1/memo_service.proto +++ b/proto/api/v1/memo_service.proto @@ -46,22 +46,6 @@ service MemoService { option (google.api.http) = {delete: "/api/v1/{name=memos/*}"}; option (google.api.method_signature) = "name"; } - // RenameMemoTag renames a tag for a memo. - rpc RenameMemoTag(RenameMemoTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - patch: "/api/v1/{parent=memos/*}/tags:rename" - body: "*" - }; - option (google.api.method_signature) = "parent,old_tag,new_tag"; - } - // DeleteMemoTag deletes a tag for a memo. - rpc DeleteMemoTag(DeleteMemoTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/api/v1/{parent=memos/*}/tags:delete" - body: "*" - }; - option (google.api.method_signature) = "parent,tag"; - } // SetMemoAttachments sets attachments for a memo. rpc SetMemoAttachments(SetMemoAttachmentsRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -262,12 +246,6 @@ message CreateMemoRequest { // Optional. The memo ID to use for this memo. // If empty, a unique ID will be generated. string memo_id = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set, validate the request but don't actually create the memo. - bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An idempotency token. - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; } message ListMemosRequest { @@ -308,9 +286,6 @@ message ListMemosResponse { // A token that can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. string next_page_token = 2; - - // The total count of memos (may be approximate). - int32 total_size = 3; } message GetMemoRequest { @@ -320,10 +295,6 @@ message GetMemoRequest { (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = {type: "memos.api.v1/Memo"} ]; - - // Optional. The fields to return in the response. - // If not specified, all fields are returned. - google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; } message UpdateMemoRequest { @@ -333,9 +304,6 @@ message UpdateMemoRequest { // Required. The list of fields to update. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. If set to true, allows updating sensitive fields. - bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL]; } message DeleteMemoRequest { @@ -350,36 +318,6 @@ message DeleteMemoRequest { bool force = 2 [(google.api.field_behavior) = OPTIONAL]; } -message RenameMemoTagRequest { - // Required. The parent, who owns the tags. - // Format: memos/{memo}. Use "memos/-" to rename all tags. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "memos.api.v1/Memo"} - ]; - - // Required. The old tag name to rename. - string old_tag = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The new tag name. - string new_tag = 3 [(google.api.field_behavior) = REQUIRED]; -} - -message DeleteMemoTagRequest { - // Required. The parent, who owns the tags. - // Format: memos/{memo}. Use "memos/-" to delete all tags. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = {type: "memos.api.v1/Memo"} - ]; - - // Required. The tag name to delete. - string tag = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Whether to delete related memos. - bool delete_related_memos = 3 [(google.api.field_behavior) = OPTIONAL]; -} - message SetMemoAttachmentsRequest { // Required. The resource name of the memo. // Format: memos/{memo} @@ -413,9 +351,6 @@ message ListMemoAttachmentsResponse { // A token for the next page of results. string next_page_token = 2; - - // The total count of attachments. - int32 total_size = 3; } message MemoRelation { @@ -480,9 +415,6 @@ message ListMemoRelationsResponse { // A token for the next page of results. string next_page_token = 2; - - // The total count of relations. - int32 total_size = 3; } message CreateMemoCommentRequest { diff --git a/proto/gen/api/v1/memo_service.pb.go b/proto/gen/api/v1/memo_service.pb.go index c91a22174..1774d9253 100644 --- a/proto/gen/api/v1/memo_service.pb.go +++ b/proto/gen/api/v1/memo_service.pb.go @@ -124,7 +124,7 @@ func (x MemoRelation_Type) Number() protoreflect.EnumNumber { // Deprecated: Use MemoRelation_Type.Descriptor instead. func (MemoRelation_Type) EnumDescriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{14, 0} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{12, 0} } type Reaction struct { @@ -473,11 +473,7 @@ type CreateMemoRequest struct { Memo *Memo `protobuf:"bytes,1,opt,name=memo,proto3" json:"memo,omitempty"` // Optional. The memo ID to use for this memo. // If empty, a unique ID will be generated. - MemoId string `protobuf:"bytes,2,opt,name=memo_id,json=memoId,proto3" json:"memo_id,omitempty"` - // Optional. If set, validate the request but don't actually create the memo. - ValidateOnly bool `protobuf:"varint,3,opt,name=validate_only,json=validateOnly,proto3" json:"validate_only,omitempty"` - // Optional. An idempotency token. - RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + MemoId string `protobuf:"bytes,2,opt,name=memo_id,json=memoId,proto3" json:"memo_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -526,20 +522,6 @@ func (x *CreateMemoRequest) GetMemoId() string { return "" } -func (x *CreateMemoRequest) GetValidateOnly() bool { - if x != nil { - return x.ValidateOnly - } - return false -} - -func (x *CreateMemoRequest) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - type ListMemosRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Optional. The maximum number of memos to return. @@ -648,8 +630,6 @@ type ListMemosResponse struct { // A token that can be sent as `page_token` to retrieve the next page. // If this field is omitted, there are no subsequent pages. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - // The total count of memos (may be approximate). - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -698,21 +678,11 @@ func (x *ListMemosResponse) GetNextPageToken() string { return "" } -func (x *ListMemosResponse) GetTotalSize() int32 { - if x != nil { - return x.TotalSize - } - return 0 -} - type GetMemoRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Required. The resource name of the memo. // Format: memos/{memo} - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Optional. The fields to return in the response. - // If not specified, all fields are returned. - ReadMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=read_mask,json=readMask,proto3" json:"read_mask,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -754,22 +724,13 @@ func (x *GetMemoRequest) GetName() string { return "" } -func (x *GetMemoRequest) GetReadMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.ReadMask - } - return nil -} - type UpdateMemoRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Required. The memo to update. // The `name` field is required. Memo *Memo `protobuf:"bytes,1,opt,name=memo,proto3" json:"memo,omitempty"` // Required. The list of fields to update. - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` - // Optional. If set to true, allows updating sensitive fields. - AllowMissing bool `protobuf:"varint,3,opt,name=allow_missing,json=allowMissing,proto3" json:"allow_missing,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -818,13 +779,6 @@ func (x *UpdateMemoRequest) GetUpdateMask() *fieldmaskpb.FieldMask { return nil } -func (x *UpdateMemoRequest) GetAllowMissing() bool { - if x != nil { - return x.AllowMissing - } - return false -} - type DeleteMemoRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Required. The resource name of the memo to delete. @@ -880,134 +834,6 @@ func (x *DeleteMemoRequest) GetForce() bool { return false } -type RenameMemoTagRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The parent, who owns the tags. - // Format: memos/{memo}. Use "memos/-" to rename all tags. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Required. The old tag name to rename. - OldTag string `protobuf:"bytes,2,opt,name=old_tag,json=oldTag,proto3" json:"old_tag,omitempty"` - // Required. The new tag name. - NewTag string `protobuf:"bytes,3,opt,name=new_tag,json=newTag,proto3" json:"new_tag,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RenameMemoTagRequest) Reset() { - *x = RenameMemoTagRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RenameMemoTagRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RenameMemoTagRequest) ProtoMessage() {} - -func (x *RenameMemoTagRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RenameMemoTagRequest.ProtoReflect.Descriptor instead. -func (*RenameMemoTagRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{9} -} - -func (x *RenameMemoTagRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *RenameMemoTagRequest) GetOldTag() string { - if x != nil { - return x.OldTag - } - return "" -} - -func (x *RenameMemoTagRequest) GetNewTag() string { - if x != nil { - return x.NewTag - } - return "" -} - -type DeleteMemoTagRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Required. The parent, who owns the tags. - // Format: memos/{memo}. Use "memos/-" to delete all tags. - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // Required. The tag name to delete. - Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` - // Optional. Whether to delete related memos. - DeleteRelatedMemos bool `protobuf:"varint,3,opt,name=delete_related_memos,json=deleteRelatedMemos,proto3" json:"delete_related_memos,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteMemoTagRequest) Reset() { - *x = DeleteMemoTagRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteMemoTagRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMemoTagRequest) ProtoMessage() {} - -func (x *DeleteMemoTagRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteMemoTagRequest.ProtoReflect.Descriptor instead. -func (*DeleteMemoTagRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{10} -} - -func (x *DeleteMemoTagRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *DeleteMemoTagRequest) GetTag() string { - if x != nil { - return x.Tag - } - return "" -} - -func (x *DeleteMemoTagRequest) GetDeleteRelatedMemos() bool { - if x != nil { - return x.DeleteRelatedMemos - } - return false -} - type SetMemoAttachmentsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Required. The resource name of the memo. @@ -1021,7 +847,7 @@ type SetMemoAttachmentsRequest struct { func (x *SetMemoAttachmentsRequest) Reset() { *x = SetMemoAttachmentsRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[11] + mi := &file_api_v1_memo_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1033,7 +859,7 @@ func (x *SetMemoAttachmentsRequest) String() string { func (*SetMemoAttachmentsRequest) ProtoMessage() {} func (x *SetMemoAttachmentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[11] + mi := &file_api_v1_memo_service_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1046,7 +872,7 @@ func (x *SetMemoAttachmentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMemoAttachmentsRequest.ProtoReflect.Descriptor instead. func (*SetMemoAttachmentsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{11} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{9} } func (x *SetMemoAttachmentsRequest) GetName() string { @@ -1078,7 +904,7 @@ type ListMemoAttachmentsRequest struct { func (x *ListMemoAttachmentsRequest) Reset() { *x = ListMemoAttachmentsRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[12] + mi := &file_api_v1_memo_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1090,7 +916,7 @@ func (x *ListMemoAttachmentsRequest) String() string { func (*ListMemoAttachmentsRequest) ProtoMessage() {} func (x *ListMemoAttachmentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[12] + mi := &file_api_v1_memo_service_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1103,7 +929,7 @@ func (x *ListMemoAttachmentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoAttachmentsRequest.ProtoReflect.Descriptor instead. func (*ListMemoAttachmentsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{12} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{10} } func (x *ListMemoAttachmentsRequest) GetName() string { @@ -1133,15 +959,13 @@ type ListMemoAttachmentsResponse struct { Attachments []*Attachment `protobuf:"bytes,1,rep,name=attachments,proto3" json:"attachments,omitempty"` // A token for the next page of results. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - // The total count of attachments. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ListMemoAttachmentsResponse) Reset() { *x = ListMemoAttachmentsResponse{} - mi := &file_api_v1_memo_service_proto_msgTypes[13] + mi := &file_api_v1_memo_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1153,7 +977,7 @@ func (x *ListMemoAttachmentsResponse) String() string { func (*ListMemoAttachmentsResponse) ProtoMessage() {} func (x *ListMemoAttachmentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[13] + mi := &file_api_v1_memo_service_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1166,7 +990,7 @@ func (x *ListMemoAttachmentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoAttachmentsResponse.ProtoReflect.Descriptor instead. func (*ListMemoAttachmentsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{13} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{11} } func (x *ListMemoAttachmentsResponse) GetAttachments() []*Attachment { @@ -1183,13 +1007,6 @@ func (x *ListMemoAttachmentsResponse) GetNextPageToken() string { return "" } -func (x *ListMemoAttachmentsResponse) GetTotalSize() int32 { - if x != nil { - return x.TotalSize - } - return 0 -} - type MemoRelation struct { state protoimpl.MessageState `protogen:"open.v1"` // The memo in the relation. @@ -1203,7 +1020,7 @@ type MemoRelation struct { func (x *MemoRelation) Reset() { *x = MemoRelation{} - mi := &file_api_v1_memo_service_proto_msgTypes[14] + mi := &file_api_v1_memo_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1215,7 +1032,7 @@ func (x *MemoRelation) String() string { func (*MemoRelation) ProtoMessage() {} func (x *MemoRelation) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[14] + mi := &file_api_v1_memo_service_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1228,7 +1045,7 @@ func (x *MemoRelation) ProtoReflect() protoreflect.Message { // Deprecated: Use MemoRelation.ProtoReflect.Descriptor instead. func (*MemoRelation) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{14} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{12} } func (x *MemoRelation) GetMemo() *MemoRelation_Memo { @@ -1265,7 +1082,7 @@ type SetMemoRelationsRequest struct { func (x *SetMemoRelationsRequest) Reset() { *x = SetMemoRelationsRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[15] + mi := &file_api_v1_memo_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1277,7 +1094,7 @@ func (x *SetMemoRelationsRequest) String() string { func (*SetMemoRelationsRequest) ProtoMessage() {} func (x *SetMemoRelationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[15] + mi := &file_api_v1_memo_service_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1290,7 +1107,7 @@ func (x *SetMemoRelationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetMemoRelationsRequest.ProtoReflect.Descriptor instead. func (*SetMemoRelationsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{15} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{13} } func (x *SetMemoRelationsRequest) GetName() string { @@ -1322,7 +1139,7 @@ type ListMemoRelationsRequest struct { func (x *ListMemoRelationsRequest) Reset() { *x = ListMemoRelationsRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[16] + mi := &file_api_v1_memo_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1334,7 +1151,7 @@ func (x *ListMemoRelationsRequest) String() string { func (*ListMemoRelationsRequest) ProtoMessage() {} func (x *ListMemoRelationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[16] + mi := &file_api_v1_memo_service_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1347,7 +1164,7 @@ func (x *ListMemoRelationsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoRelationsRequest.ProtoReflect.Descriptor instead. func (*ListMemoRelationsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{16} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{14} } func (x *ListMemoRelationsRequest) GetName() string { @@ -1377,15 +1194,13 @@ type ListMemoRelationsResponse struct { Relations []*MemoRelation `protobuf:"bytes,1,rep,name=relations,proto3" json:"relations,omitempty"` // A token for the next page of results. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` - // The total count of relations. - TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ListMemoRelationsResponse) Reset() { *x = ListMemoRelationsResponse{} - mi := &file_api_v1_memo_service_proto_msgTypes[17] + mi := &file_api_v1_memo_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1397,7 +1212,7 @@ func (x *ListMemoRelationsResponse) String() string { func (*ListMemoRelationsResponse) ProtoMessage() {} func (x *ListMemoRelationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[17] + mi := &file_api_v1_memo_service_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1410,7 +1225,7 @@ func (x *ListMemoRelationsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoRelationsResponse.ProtoReflect.Descriptor instead. func (*ListMemoRelationsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{17} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{15} } func (x *ListMemoRelationsResponse) GetRelations() []*MemoRelation { @@ -1427,13 +1242,6 @@ func (x *ListMemoRelationsResponse) GetNextPageToken() string { return "" } -func (x *ListMemoRelationsResponse) GetTotalSize() int32 { - if x != nil { - return x.TotalSize - } - return 0 -} - type CreateMemoCommentRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Required. The resource name of the memo. @@ -1449,7 +1257,7 @@ type CreateMemoCommentRequest struct { func (x *CreateMemoCommentRequest) Reset() { *x = CreateMemoCommentRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[18] + mi := &file_api_v1_memo_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1461,7 +1269,7 @@ func (x *CreateMemoCommentRequest) String() string { func (*CreateMemoCommentRequest) ProtoMessage() {} func (x *CreateMemoCommentRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[18] + mi := &file_api_v1_memo_service_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1474,7 +1282,7 @@ func (x *CreateMemoCommentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateMemoCommentRequest.ProtoReflect.Descriptor instead. func (*CreateMemoCommentRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{18} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{16} } func (x *CreateMemoCommentRequest) GetName() string { @@ -1515,7 +1323,7 @@ type ListMemoCommentsRequest struct { func (x *ListMemoCommentsRequest) Reset() { *x = ListMemoCommentsRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[19] + mi := &file_api_v1_memo_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1527,7 +1335,7 @@ func (x *ListMemoCommentsRequest) String() string { func (*ListMemoCommentsRequest) ProtoMessage() {} func (x *ListMemoCommentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[19] + mi := &file_api_v1_memo_service_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1540,7 +1348,7 @@ func (x *ListMemoCommentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoCommentsRequest.ProtoReflect.Descriptor instead. func (*ListMemoCommentsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{19} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{17} } func (x *ListMemoCommentsRequest) GetName() string { @@ -1585,7 +1393,7 @@ type ListMemoCommentsResponse struct { func (x *ListMemoCommentsResponse) Reset() { *x = ListMemoCommentsResponse{} - mi := &file_api_v1_memo_service_proto_msgTypes[20] + mi := &file_api_v1_memo_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1597,7 +1405,7 @@ func (x *ListMemoCommentsResponse) String() string { func (*ListMemoCommentsResponse) ProtoMessage() {} func (x *ListMemoCommentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[20] + mi := &file_api_v1_memo_service_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1610,7 +1418,7 @@ func (x *ListMemoCommentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoCommentsResponse.ProtoReflect.Descriptor instead. func (*ListMemoCommentsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{20} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{18} } func (x *ListMemoCommentsResponse) GetMemos() []*Memo { @@ -1649,7 +1457,7 @@ type ListMemoReactionsRequest struct { func (x *ListMemoReactionsRequest) Reset() { *x = ListMemoReactionsRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[21] + mi := &file_api_v1_memo_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1661,7 +1469,7 @@ func (x *ListMemoReactionsRequest) String() string { func (*ListMemoReactionsRequest) ProtoMessage() {} func (x *ListMemoReactionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[21] + mi := &file_api_v1_memo_service_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1674,7 +1482,7 @@ func (x *ListMemoReactionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoReactionsRequest.ProtoReflect.Descriptor instead. func (*ListMemoReactionsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{21} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{19} } func (x *ListMemoReactionsRequest) GetName() string { @@ -1712,7 +1520,7 @@ type ListMemoReactionsResponse struct { func (x *ListMemoReactionsResponse) Reset() { *x = ListMemoReactionsResponse{} - mi := &file_api_v1_memo_service_proto_msgTypes[22] + mi := &file_api_v1_memo_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1724,7 +1532,7 @@ func (x *ListMemoReactionsResponse) String() string { func (*ListMemoReactionsResponse) ProtoMessage() {} func (x *ListMemoReactionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[22] + mi := &file_api_v1_memo_service_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1737,7 +1545,7 @@ func (x *ListMemoReactionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMemoReactionsResponse.ProtoReflect.Descriptor instead. func (*ListMemoReactionsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{22} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{20} } func (x *ListMemoReactionsResponse) GetReactions() []*Reaction { @@ -1774,7 +1582,7 @@ type UpsertMemoReactionRequest struct { func (x *UpsertMemoReactionRequest) Reset() { *x = UpsertMemoReactionRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[23] + mi := &file_api_v1_memo_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1786,7 +1594,7 @@ func (x *UpsertMemoReactionRequest) String() string { func (*UpsertMemoReactionRequest) ProtoMessage() {} func (x *UpsertMemoReactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[23] + mi := &file_api_v1_memo_service_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1799,7 +1607,7 @@ func (x *UpsertMemoReactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpsertMemoReactionRequest.ProtoReflect.Descriptor instead. func (*UpsertMemoReactionRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{23} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{21} } func (x *UpsertMemoReactionRequest) GetName() string { @@ -1827,7 +1635,7 @@ type DeleteMemoReactionRequest struct { func (x *DeleteMemoReactionRequest) Reset() { *x = DeleteMemoReactionRequest{} - mi := &file_api_v1_memo_service_proto_msgTypes[24] + mi := &file_api_v1_memo_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1839,7 +1647,7 @@ func (x *DeleteMemoReactionRequest) String() string { func (*DeleteMemoReactionRequest) ProtoMessage() {} func (x *DeleteMemoReactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[24] + mi := &file_api_v1_memo_service_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1852,7 +1660,7 @@ func (x *DeleteMemoReactionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMemoReactionRequest.ProtoReflect.Descriptor instead. func (*DeleteMemoReactionRequest) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{24} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{22} } func (x *DeleteMemoReactionRequest) GetName() string { @@ -1875,7 +1683,7 @@ type Memo_Property struct { func (x *Memo_Property) Reset() { *x = Memo_Property{} - mi := &file_api_v1_memo_service_proto_msgTypes[25] + mi := &file_api_v1_memo_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1887,7 +1695,7 @@ func (x *Memo_Property) String() string { func (*Memo_Property) ProtoMessage() {} func (x *Memo_Property) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[25] + mi := &file_api_v1_memo_service_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1945,7 +1753,7 @@ type MemoRelation_Memo struct { func (x *MemoRelation_Memo) Reset() { *x = MemoRelation_Memo{} - mi := &file_api_v1_memo_service_proto_msgTypes[26] + mi := &file_api_v1_memo_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1957,7 +1765,7 @@ func (x *MemoRelation_Memo) String() string { func (*MemoRelation_Memo) ProtoMessage() {} func (x *MemoRelation_Memo) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_memo_service_proto_msgTypes[26] + mi := &file_api_v1_memo_service_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1970,7 +1778,7 @@ func (x *MemoRelation_Memo) ProtoReflect() protoreflect.Message { // Deprecated: Use MemoRelation_Memo.ProtoReflect.Descriptor instead. func (*MemoRelation_Memo) Descriptor() ([]byte, []int) { - return file_api_v1_memo_service_proto_rawDescGZIP(), []int{14, 0} + return file_api_v1_memo_service_proto_rawDescGZIP(), []int{12, 0} } func (x *MemoRelation_Memo) GetName() string { @@ -2039,13 +1847,10 @@ const file_api_v1_memo_service_proto_rawDesc = "" + "\bLocation\x12%\n" + "\vplaceholder\x18\x01 \x01(\tB\x03\xe0A\x01R\vplaceholder\x12\x1f\n" + "\blatitude\x18\x02 \x01(\x01B\x03\xe0A\x01R\blatitude\x12!\n" + - "\tlongitude\x18\x03 \x01(\x01B\x03\xe0A\x01R\tlongitude\"\xac\x01\n" + + "\tlongitude\x18\x03 \x01(\x01B\x03\xe0A\x01R\tlongitude\"^\n" + "\x11CreateMemoRequest\x12+\n" + "\x04memo\x18\x01 \x01(\v2\x12.memos.api.v1.MemoB\x03\xe0A\x02R\x04memo\x12\x1c\n" + - "\amemo_id\x18\x02 \x01(\tB\x03\xe0A\x01R\x06memoId\x12(\n" + - "\rvalidate_only\x18\x03 \x01(\bB\x03\xe0A\x01R\fvalidateOnly\x12\"\n" + - "\n" + - "request_id\x18\x04 \x01(\tB\x03\xe0A\x01R\trequestId\"\xed\x01\n" + + "\amemo_id\x18\x02 \x01(\tB\x03\xe0A\x01R\x06memoId\"\xed\x01\n" + "\x10ListMemosRequest\x12 \n" + "\tpage_size\x18\x01 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + "\n" + @@ -2053,35 +1858,21 @@ const file_api_v1_memo_service_proto_rawDesc = "" + "\x05state\x18\x03 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x01R\x05state\x12\x1e\n" + "\border_by\x18\x04 \x01(\tB\x03\xe0A\x01R\aorderBy\x12\x1b\n" + "\x06filter\x18\x05 \x01(\tB\x03\xe0A\x01R\x06filter\x12&\n" + - "\fshow_deleted\x18\x06 \x01(\bB\x03\xe0A\x01R\vshowDeleted\"\x84\x01\n" + + "\fshow_deleted\x18\x06 \x01(\bB\x03\xe0A\x01R\vshowDeleted\"e\n" + "\x11ListMemosResponse\x12(\n" + "\x05memos\x18\x01 \x03(\v2\x12.memos.api.v1.MemoR\x05memos\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + - "\n" + - "total_size\x18\x03 \x01(\x05R\ttotalSize\"}\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"?\n" + "\x0eGetMemoRequest\x12-\n" + "\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + - "\x11memos.api.v1/MemoR\x04name\x12<\n" + - "\tread_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x01R\breadMask\"\xac\x01\n" + + "\x11memos.api.v1/MemoR\x04name\"\x82\x01\n" + "\x11UpdateMemoRequest\x12+\n" + "\x04memo\x18\x01 \x01(\v2\x12.memos.api.v1.MemoB\x03\xe0A\x02R\x04memo\x12@\n" + "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" + - "updateMask\x12(\n" + - "\rallow_missing\x18\x03 \x01(\bB\x03\xe0A\x01R\fallowMissing\"]\n" + + "updateMask\"]\n" + "\x11DeleteMemoRequest\x12-\n" + "\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + "\x11memos.api.v1/MemoR\x04name\x12\x19\n" + - "\x05force\x18\x02 \x01(\bB\x03\xe0A\x01R\x05force\"\x85\x01\n" + - "\x14RenameMemoTagRequest\x121\n" + - "\x06parent\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + - "\x11memos.api.v1/MemoR\x06parent\x12\x1c\n" + - "\aold_tag\x18\x02 \x01(\tB\x03\xe0A\x02R\x06oldTag\x12\x1c\n" + - "\anew_tag\x18\x03 \x01(\tB\x03\xe0A\x02R\x06newTag\"\x97\x01\n" + - "\x14DeleteMemoTagRequest\x121\n" + - "\x06parent\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + - "\x11memos.api.v1/MemoR\x06parent\x12\x15\n" + - "\x03tag\x18\x02 \x01(\tB\x03\xe0A\x02R\x03tag\x125\n" + - "\x14delete_related_memos\x18\x03 \x01(\bB\x03\xe0A\x01R\x12deleteRelatedMemos\"\x8b\x01\n" + + "\x05force\x18\x02 \x01(\bB\x03\xe0A\x01R\x05force\"\x8b\x01\n" + "\x19SetMemoAttachmentsRequest\x12-\n" + "\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + "\x11memos.api.v1/MemoR\x04name\x12?\n" + @@ -2091,12 +1882,10 @@ const file_api_v1_memo_service_proto_rawDesc = "" + "\x11memos.api.v1/MemoR\x04name\x12 \n" + "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"\xa0\x01\n" + + "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"\x81\x01\n" + "\x1bListMemoAttachmentsResponse\x12:\n" + "\vattachments\x18\x01 \x03(\v2\x18.memos.api.v1.AttachmentR\vattachments\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + - "\n" + - "total_size\x18\x03 \x01(\x05R\ttotalSize\"\xdb\x02\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xdb\x02\n" + "\fMemoRelation\x128\n" + "\x04memo\x18\x01 \x01(\v2\x1f.memos.api.v1.MemoRelation.MemoB\x03\xe0A\x02R\x04memo\x12G\n" + "\frelated_memo\x18\x02 \x01(\v2\x1f.memos.api.v1.MemoRelation.MemoB\x03\xe0A\x02R\vrelatedMemo\x128\n" + @@ -2118,12 +1907,10 @@ const file_api_v1_memo_service_proto_rawDesc = "" + "\x11memos.api.v1/MemoR\x04name\x12 \n" + "\tpage_size\x18\x02 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + "\n" + - "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"\x9c\x01\n" + + "page_token\x18\x03 \x01(\tB\x03\xe0A\x01R\tpageToken\"}\n" + "\x19ListMemoRelationsResponse\x128\n" + "\trelations\x18\x01 \x03(\v2\x1a.memos.api.v1.MemoRelationR\trelations\x12&\n" + - "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + - "\n" + - "total_size\x18\x03 \x01(\x05R\ttotalSize\"\xa0\x01\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"\xa0\x01\n" + "\x18CreateMemoCommentRequest\x12-\n" + "\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + "\x11memos.api.v1/MemoR\x04name\x121\n" + @@ -2166,7 +1953,7 @@ const file_api_v1_memo_service_proto_rawDesc = "" + "\aPRIVATE\x10\x01\x12\r\n" + "\tPROTECTED\x10\x02\x12\n" + "\n" + - "\x06PUBLIC\x10\x032\xef\x10\n" + + "\x06PUBLIC\x10\x032\xcb\x0e\n" + "\vMemoService\x12e\n" + "\n" + "CreateMemo\x12\x1f.memos.api.v1.CreateMemoRequest\x1a\x12.memos.api.v1.Memo\"\"\xdaA\x04memo\x82\xd3\xe4\x93\x02\x15:\x04memo\"\r/api/v1/memos\x12f\n" + @@ -2175,10 +1962,7 @@ const file_api_v1_memo_service_proto_rawDesc = "" + "\n" + "UpdateMemo\x12\x1f.memos.api.v1.UpdateMemoRequest\x1a\x12.memos.api.v1.Memo\"<\xdaA\x10memo,update_mask\x82\xd3\xe4\x93\x02#:\x04memo2\x1b/api/v1/{memo.name=memos/*}\x12l\n" + "\n" + - "DeleteMemo\x12\x1f.memos.api.v1.DeleteMemoRequest\x1a\x16.google.protobuf.Empty\"%\xdaA\x04name\x82\xd3\xe4\x93\x02\x18*\x16/api/v1/{name=memos/*}\x12\x95\x01\n" + - "\rRenameMemoTag\x12\".memos.api.v1.RenameMemoTagRequest\x1a\x16.google.protobuf.Empty\"H\xdaA\x16parent,old_tag,new_tag\x82\xd3\xe4\x93\x02):\x01*2$/api/v1/{parent=memos/*}/tags:rename\x12\x89\x01\n" + - "\rDeleteMemoTag\x12\".memos.api.v1.DeleteMemoTagRequest\x1a\x16.google.protobuf.Empty\"<\xdaA\n" + - "parent,tag\x82\xd3\xe4\x93\x02):\x01*\"$/api/v1/{parent=memos/*}/tags:delete\x12\x8b\x01\n" + + "DeleteMemo\x12\x1f.memos.api.v1.DeleteMemoRequest\x1a\x16.google.protobuf.Empty\"%\xdaA\x04name\x82\xd3\xe4\x93\x02\x18*\x16/api/v1/{name=memos/*}\x12\x8b\x01\n" + "\x12SetMemoAttachments\x12'.memos.api.v1.SetMemoAttachmentsRequest\x1a\x16.google.protobuf.Empty\"4\xdaA\x04name\x82\xd3\xe4\x93\x02':\x01*2\"/api/v1/{name=memos/*}/attachments\x12\x9d\x01\n" + "\x13ListMemoAttachments\x12(.memos.api.v1.ListMemoAttachmentsRequest\x1a).memos.api.v1.ListMemoAttachmentsResponse\"1\xdaA\x04name\x82\xd3\xe4\x93\x02$\x12\"/api/v1/{name=memos/*}/attachments\x12\x85\x01\n" + "\x10SetMemoRelations\x12%.memos.api.v1.SetMemoRelationsRequest\x1a\x16.google.protobuf.Empty\"2\xdaA\x04name\x82\xd3\xe4\x93\x02%:\x01*2 /api/v1/{name=memos/*}/relations\x12\x95\x01\n" + @@ -2203,7 +1987,7 @@ func file_api_v1_memo_service_proto_rawDescGZIP() []byte { } var file_api_v1_memo_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_api_v1_memo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_api_v1_memo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 25) var file_api_v1_memo_service_proto_goTypes = []any{ (Visibility)(0), // 0: memos.api.v1.Visibility (MemoRelation_Type)(0), // 1: memos.api.v1.MemoRelation.Type @@ -2216,96 +2000,89 @@ var file_api_v1_memo_service_proto_goTypes = []any{ (*GetMemoRequest)(nil), // 8: memos.api.v1.GetMemoRequest (*UpdateMemoRequest)(nil), // 9: memos.api.v1.UpdateMemoRequest (*DeleteMemoRequest)(nil), // 10: memos.api.v1.DeleteMemoRequest - (*RenameMemoTagRequest)(nil), // 11: memos.api.v1.RenameMemoTagRequest - (*DeleteMemoTagRequest)(nil), // 12: memos.api.v1.DeleteMemoTagRequest - (*SetMemoAttachmentsRequest)(nil), // 13: memos.api.v1.SetMemoAttachmentsRequest - (*ListMemoAttachmentsRequest)(nil), // 14: memos.api.v1.ListMemoAttachmentsRequest - (*ListMemoAttachmentsResponse)(nil), // 15: memos.api.v1.ListMemoAttachmentsResponse - (*MemoRelation)(nil), // 16: memos.api.v1.MemoRelation - (*SetMemoRelationsRequest)(nil), // 17: memos.api.v1.SetMemoRelationsRequest - (*ListMemoRelationsRequest)(nil), // 18: memos.api.v1.ListMemoRelationsRequest - (*ListMemoRelationsResponse)(nil), // 19: memos.api.v1.ListMemoRelationsResponse - (*CreateMemoCommentRequest)(nil), // 20: memos.api.v1.CreateMemoCommentRequest - (*ListMemoCommentsRequest)(nil), // 21: memos.api.v1.ListMemoCommentsRequest - (*ListMemoCommentsResponse)(nil), // 22: memos.api.v1.ListMemoCommentsResponse - (*ListMemoReactionsRequest)(nil), // 23: memos.api.v1.ListMemoReactionsRequest - (*ListMemoReactionsResponse)(nil), // 24: memos.api.v1.ListMemoReactionsResponse - (*UpsertMemoReactionRequest)(nil), // 25: memos.api.v1.UpsertMemoReactionRequest - (*DeleteMemoReactionRequest)(nil), // 26: memos.api.v1.DeleteMemoReactionRequest - (*Memo_Property)(nil), // 27: memos.api.v1.Memo.Property - (*MemoRelation_Memo)(nil), // 28: memos.api.v1.MemoRelation.Memo - (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp - (State)(0), // 30: memos.api.v1.State - (*Attachment)(nil), // 31: memos.api.v1.Attachment - (*fieldmaskpb.FieldMask)(nil), // 32: google.protobuf.FieldMask - (*emptypb.Empty)(nil), // 33: google.protobuf.Empty + (*SetMemoAttachmentsRequest)(nil), // 11: memos.api.v1.SetMemoAttachmentsRequest + (*ListMemoAttachmentsRequest)(nil), // 12: memos.api.v1.ListMemoAttachmentsRequest + (*ListMemoAttachmentsResponse)(nil), // 13: memos.api.v1.ListMemoAttachmentsResponse + (*MemoRelation)(nil), // 14: memos.api.v1.MemoRelation + (*SetMemoRelationsRequest)(nil), // 15: memos.api.v1.SetMemoRelationsRequest + (*ListMemoRelationsRequest)(nil), // 16: memos.api.v1.ListMemoRelationsRequest + (*ListMemoRelationsResponse)(nil), // 17: memos.api.v1.ListMemoRelationsResponse + (*CreateMemoCommentRequest)(nil), // 18: memos.api.v1.CreateMemoCommentRequest + (*ListMemoCommentsRequest)(nil), // 19: memos.api.v1.ListMemoCommentsRequest + (*ListMemoCommentsResponse)(nil), // 20: memos.api.v1.ListMemoCommentsResponse + (*ListMemoReactionsRequest)(nil), // 21: memos.api.v1.ListMemoReactionsRequest + (*ListMemoReactionsResponse)(nil), // 22: memos.api.v1.ListMemoReactionsResponse + (*UpsertMemoReactionRequest)(nil), // 23: memos.api.v1.UpsertMemoReactionRequest + (*DeleteMemoReactionRequest)(nil), // 24: memos.api.v1.DeleteMemoReactionRequest + (*Memo_Property)(nil), // 25: memos.api.v1.Memo.Property + (*MemoRelation_Memo)(nil), // 26: memos.api.v1.MemoRelation.Memo + (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp + (State)(0), // 28: memos.api.v1.State + (*Attachment)(nil), // 29: memos.api.v1.Attachment + (*fieldmaskpb.FieldMask)(nil), // 30: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 31: google.protobuf.Empty } var file_api_v1_memo_service_proto_depIdxs = []int32{ - 29, // 0: memos.api.v1.Reaction.create_time:type_name -> google.protobuf.Timestamp - 30, // 1: memos.api.v1.Memo.state:type_name -> memos.api.v1.State - 29, // 2: memos.api.v1.Memo.create_time:type_name -> google.protobuf.Timestamp - 29, // 3: memos.api.v1.Memo.update_time:type_name -> google.protobuf.Timestamp - 29, // 4: memos.api.v1.Memo.display_time:type_name -> google.protobuf.Timestamp + 27, // 0: memos.api.v1.Reaction.create_time:type_name -> google.protobuf.Timestamp + 28, // 1: memos.api.v1.Memo.state:type_name -> memos.api.v1.State + 27, // 2: memos.api.v1.Memo.create_time:type_name -> google.protobuf.Timestamp + 27, // 3: memos.api.v1.Memo.update_time:type_name -> google.protobuf.Timestamp + 27, // 4: memos.api.v1.Memo.display_time:type_name -> google.protobuf.Timestamp 0, // 5: memos.api.v1.Memo.visibility:type_name -> memos.api.v1.Visibility - 31, // 6: memos.api.v1.Memo.attachments:type_name -> memos.api.v1.Attachment - 16, // 7: memos.api.v1.Memo.relations:type_name -> memos.api.v1.MemoRelation + 29, // 6: memos.api.v1.Memo.attachments:type_name -> memos.api.v1.Attachment + 14, // 7: memos.api.v1.Memo.relations:type_name -> memos.api.v1.MemoRelation 2, // 8: memos.api.v1.Memo.reactions:type_name -> memos.api.v1.Reaction - 27, // 9: memos.api.v1.Memo.property:type_name -> memos.api.v1.Memo.Property + 25, // 9: memos.api.v1.Memo.property:type_name -> memos.api.v1.Memo.Property 4, // 10: memos.api.v1.Memo.location:type_name -> memos.api.v1.Location 3, // 11: memos.api.v1.CreateMemoRequest.memo:type_name -> memos.api.v1.Memo - 30, // 12: memos.api.v1.ListMemosRequest.state:type_name -> memos.api.v1.State + 28, // 12: memos.api.v1.ListMemosRequest.state:type_name -> memos.api.v1.State 3, // 13: memos.api.v1.ListMemosResponse.memos:type_name -> memos.api.v1.Memo - 32, // 14: memos.api.v1.GetMemoRequest.read_mask:type_name -> google.protobuf.FieldMask - 3, // 15: memos.api.v1.UpdateMemoRequest.memo:type_name -> memos.api.v1.Memo - 32, // 16: memos.api.v1.UpdateMemoRequest.update_mask:type_name -> google.protobuf.FieldMask - 31, // 17: memos.api.v1.SetMemoAttachmentsRequest.attachments:type_name -> memos.api.v1.Attachment - 31, // 18: memos.api.v1.ListMemoAttachmentsResponse.attachments:type_name -> memos.api.v1.Attachment - 28, // 19: memos.api.v1.MemoRelation.memo:type_name -> memos.api.v1.MemoRelation.Memo - 28, // 20: memos.api.v1.MemoRelation.related_memo:type_name -> memos.api.v1.MemoRelation.Memo - 1, // 21: memos.api.v1.MemoRelation.type:type_name -> memos.api.v1.MemoRelation.Type - 16, // 22: memos.api.v1.SetMemoRelationsRequest.relations:type_name -> memos.api.v1.MemoRelation - 16, // 23: memos.api.v1.ListMemoRelationsResponse.relations:type_name -> memos.api.v1.MemoRelation - 3, // 24: memos.api.v1.CreateMemoCommentRequest.comment:type_name -> memos.api.v1.Memo - 3, // 25: memos.api.v1.ListMemoCommentsResponse.memos:type_name -> memos.api.v1.Memo - 2, // 26: memos.api.v1.ListMemoReactionsResponse.reactions:type_name -> memos.api.v1.Reaction - 2, // 27: memos.api.v1.UpsertMemoReactionRequest.reaction:type_name -> memos.api.v1.Reaction - 5, // 28: memos.api.v1.MemoService.CreateMemo:input_type -> memos.api.v1.CreateMemoRequest - 6, // 29: memos.api.v1.MemoService.ListMemos:input_type -> memos.api.v1.ListMemosRequest - 8, // 30: memos.api.v1.MemoService.GetMemo:input_type -> memos.api.v1.GetMemoRequest - 9, // 31: memos.api.v1.MemoService.UpdateMemo:input_type -> memos.api.v1.UpdateMemoRequest - 10, // 32: memos.api.v1.MemoService.DeleteMemo:input_type -> memos.api.v1.DeleteMemoRequest - 11, // 33: memos.api.v1.MemoService.RenameMemoTag:input_type -> memos.api.v1.RenameMemoTagRequest - 12, // 34: memos.api.v1.MemoService.DeleteMemoTag:input_type -> memos.api.v1.DeleteMemoTagRequest - 13, // 35: memos.api.v1.MemoService.SetMemoAttachments:input_type -> memos.api.v1.SetMemoAttachmentsRequest - 14, // 36: memos.api.v1.MemoService.ListMemoAttachments:input_type -> memos.api.v1.ListMemoAttachmentsRequest - 17, // 37: memos.api.v1.MemoService.SetMemoRelations:input_type -> memos.api.v1.SetMemoRelationsRequest - 18, // 38: memos.api.v1.MemoService.ListMemoRelations:input_type -> memos.api.v1.ListMemoRelationsRequest - 20, // 39: memos.api.v1.MemoService.CreateMemoComment:input_type -> memos.api.v1.CreateMemoCommentRequest - 21, // 40: memos.api.v1.MemoService.ListMemoComments:input_type -> memos.api.v1.ListMemoCommentsRequest - 23, // 41: memos.api.v1.MemoService.ListMemoReactions:input_type -> memos.api.v1.ListMemoReactionsRequest - 25, // 42: memos.api.v1.MemoService.UpsertMemoReaction:input_type -> memos.api.v1.UpsertMemoReactionRequest - 26, // 43: memos.api.v1.MemoService.DeleteMemoReaction:input_type -> memos.api.v1.DeleteMemoReactionRequest - 3, // 44: memos.api.v1.MemoService.CreateMemo:output_type -> memos.api.v1.Memo - 7, // 45: memos.api.v1.MemoService.ListMemos:output_type -> memos.api.v1.ListMemosResponse - 3, // 46: memos.api.v1.MemoService.GetMemo:output_type -> memos.api.v1.Memo - 3, // 47: memos.api.v1.MemoService.UpdateMemo:output_type -> memos.api.v1.Memo - 33, // 48: memos.api.v1.MemoService.DeleteMemo:output_type -> google.protobuf.Empty - 33, // 49: memos.api.v1.MemoService.RenameMemoTag:output_type -> google.protobuf.Empty - 33, // 50: memos.api.v1.MemoService.DeleteMemoTag:output_type -> google.protobuf.Empty - 33, // 51: memos.api.v1.MemoService.SetMemoAttachments:output_type -> google.protobuf.Empty - 15, // 52: memos.api.v1.MemoService.ListMemoAttachments:output_type -> memos.api.v1.ListMemoAttachmentsResponse - 33, // 53: memos.api.v1.MemoService.SetMemoRelations:output_type -> google.protobuf.Empty - 19, // 54: memos.api.v1.MemoService.ListMemoRelations:output_type -> memos.api.v1.ListMemoRelationsResponse - 3, // 55: memos.api.v1.MemoService.CreateMemoComment:output_type -> memos.api.v1.Memo - 22, // 56: memos.api.v1.MemoService.ListMemoComments:output_type -> memos.api.v1.ListMemoCommentsResponse - 24, // 57: memos.api.v1.MemoService.ListMemoReactions:output_type -> memos.api.v1.ListMemoReactionsResponse - 2, // 58: memos.api.v1.MemoService.UpsertMemoReaction:output_type -> memos.api.v1.Reaction - 33, // 59: memos.api.v1.MemoService.DeleteMemoReaction:output_type -> google.protobuf.Empty - 44, // [44:60] is the sub-list for method output_type - 28, // [28:44] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 3, // 14: memos.api.v1.UpdateMemoRequest.memo:type_name -> memos.api.v1.Memo + 30, // 15: memos.api.v1.UpdateMemoRequest.update_mask:type_name -> google.protobuf.FieldMask + 29, // 16: memos.api.v1.SetMemoAttachmentsRequest.attachments:type_name -> memos.api.v1.Attachment + 29, // 17: memos.api.v1.ListMemoAttachmentsResponse.attachments:type_name -> memos.api.v1.Attachment + 26, // 18: memos.api.v1.MemoRelation.memo:type_name -> memos.api.v1.MemoRelation.Memo + 26, // 19: memos.api.v1.MemoRelation.related_memo:type_name -> memos.api.v1.MemoRelation.Memo + 1, // 20: memos.api.v1.MemoRelation.type:type_name -> memos.api.v1.MemoRelation.Type + 14, // 21: memos.api.v1.SetMemoRelationsRequest.relations:type_name -> memos.api.v1.MemoRelation + 14, // 22: memos.api.v1.ListMemoRelationsResponse.relations:type_name -> memos.api.v1.MemoRelation + 3, // 23: memos.api.v1.CreateMemoCommentRequest.comment:type_name -> memos.api.v1.Memo + 3, // 24: memos.api.v1.ListMemoCommentsResponse.memos:type_name -> memos.api.v1.Memo + 2, // 25: memos.api.v1.ListMemoReactionsResponse.reactions:type_name -> memos.api.v1.Reaction + 2, // 26: memos.api.v1.UpsertMemoReactionRequest.reaction:type_name -> memos.api.v1.Reaction + 5, // 27: memos.api.v1.MemoService.CreateMemo:input_type -> memos.api.v1.CreateMemoRequest + 6, // 28: memos.api.v1.MemoService.ListMemos:input_type -> memos.api.v1.ListMemosRequest + 8, // 29: memos.api.v1.MemoService.GetMemo:input_type -> memos.api.v1.GetMemoRequest + 9, // 30: memos.api.v1.MemoService.UpdateMemo:input_type -> memos.api.v1.UpdateMemoRequest + 10, // 31: memos.api.v1.MemoService.DeleteMemo:input_type -> memos.api.v1.DeleteMemoRequest + 11, // 32: memos.api.v1.MemoService.SetMemoAttachments:input_type -> memos.api.v1.SetMemoAttachmentsRequest + 12, // 33: memos.api.v1.MemoService.ListMemoAttachments:input_type -> memos.api.v1.ListMemoAttachmentsRequest + 15, // 34: memos.api.v1.MemoService.SetMemoRelations:input_type -> memos.api.v1.SetMemoRelationsRequest + 16, // 35: memos.api.v1.MemoService.ListMemoRelations:input_type -> memos.api.v1.ListMemoRelationsRequest + 18, // 36: memos.api.v1.MemoService.CreateMemoComment:input_type -> memos.api.v1.CreateMemoCommentRequest + 19, // 37: memos.api.v1.MemoService.ListMemoComments:input_type -> memos.api.v1.ListMemoCommentsRequest + 21, // 38: memos.api.v1.MemoService.ListMemoReactions:input_type -> memos.api.v1.ListMemoReactionsRequest + 23, // 39: memos.api.v1.MemoService.UpsertMemoReaction:input_type -> memos.api.v1.UpsertMemoReactionRequest + 24, // 40: memos.api.v1.MemoService.DeleteMemoReaction:input_type -> memos.api.v1.DeleteMemoReactionRequest + 3, // 41: memos.api.v1.MemoService.CreateMemo:output_type -> memos.api.v1.Memo + 7, // 42: memos.api.v1.MemoService.ListMemos:output_type -> memos.api.v1.ListMemosResponse + 3, // 43: memos.api.v1.MemoService.GetMemo:output_type -> memos.api.v1.Memo + 3, // 44: memos.api.v1.MemoService.UpdateMemo:output_type -> memos.api.v1.Memo + 31, // 45: memos.api.v1.MemoService.DeleteMemo:output_type -> google.protobuf.Empty + 31, // 46: memos.api.v1.MemoService.SetMemoAttachments:output_type -> google.protobuf.Empty + 13, // 47: memos.api.v1.MemoService.ListMemoAttachments:output_type -> memos.api.v1.ListMemoAttachmentsResponse + 31, // 48: memos.api.v1.MemoService.SetMemoRelations:output_type -> google.protobuf.Empty + 17, // 49: memos.api.v1.MemoService.ListMemoRelations:output_type -> memos.api.v1.ListMemoRelationsResponse + 3, // 50: memos.api.v1.MemoService.CreateMemoComment:output_type -> memos.api.v1.Memo + 20, // 51: memos.api.v1.MemoService.ListMemoComments:output_type -> memos.api.v1.ListMemoCommentsResponse + 22, // 52: memos.api.v1.MemoService.ListMemoReactions:output_type -> memos.api.v1.ListMemoReactionsResponse + 2, // 53: memos.api.v1.MemoService.UpsertMemoReaction:output_type -> memos.api.v1.Reaction + 31, // 54: memos.api.v1.MemoService.DeleteMemoReaction:output_type -> google.protobuf.Empty + 41, // [41:55] is the sub-list for method output_type + 27, // [27:41] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_api_v1_memo_service_proto_init() } @@ -2322,7 +2099,7 @@ func file_api_v1_memo_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_v1_memo_service_proto_rawDesc), len(file_api_v1_memo_service_proto_rawDesc)), NumEnums: 2, - NumMessages: 27, + NumMessages: 25, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/gen/api/v1/memo_service.pb.gw.go b/proto/gen/api/v1/memo_service.pb.gw.go index a749fb41c..fe97424af 100644 --- a/proto/gen/api/v1/memo_service.pb.gw.go +++ b/proto/gen/api/v1/memo_service.pb.gw.go @@ -111,8 +111,6 @@ func local_request_MemoService_ListMemos_0(ctx context.Context, marshaler runtim return msg, metadata, err } -var filter_MemoService_GetMemo_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} - func request_MemoService_GetMemo_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( protoReq GetMemoRequest @@ -130,12 +128,6 @@ func request_MemoService_GetMemo_0(ctx context.Context, marshaler runtime.Marsha if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) } - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_GetMemo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } msg, err := client.GetMemo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } @@ -154,12 +146,6 @@ func local_request_MemoService_GetMemo_0(ctx context.Context, marshaler runtime. if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) } - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_GetMemo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } msg, err := server.GetMemo(ctx, &protoReq) return msg, metadata, err } @@ -298,96 +284,6 @@ func local_request_MemoService_DeleteMemo_0(ctx context.Context, marshaler runti return msg, metadata, err } -func request_MemoService_RenameMemoTag_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq RenameMemoTagRequest - metadata runtime.ServerMetadata - err error - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if req.Body != nil { - _, _ = io.Copy(io.Discard, req.Body) - } - val, ok := pathParams["parent"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") - } - protoReq.Parent, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) - } - msg, err := client.RenameMemoTag(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_MemoService_RenameMemoTag_0(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq RenameMemoTagRequest - metadata runtime.ServerMetadata - err error - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - val, ok := pathParams["parent"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") - } - protoReq.Parent, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) - } - msg, err := server.RenameMemoTag(ctx, &protoReq) - return msg, metadata, err -} - -func request_MemoService_DeleteMemoTag_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq DeleteMemoTagRequest - metadata runtime.ServerMetadata - err error - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if req.Body != nil { - _, _ = io.Copy(io.Discard, req.Body) - } - val, ok := pathParams["parent"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") - } - protoReq.Parent, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) - } - msg, err := client.DeleteMemoTag(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_MemoService_DeleteMemoTag_0(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq DeleteMemoTagRequest - metadata runtime.ServerMetadata - err error - ) - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - val, ok := pathParams["parent"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") - } - protoReq.Parent, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) - } - msg, err := server.DeleteMemoTag(ctx, &protoReq) - return msg, metadata, err -} - func request_MemoService_SetMemoAttachments_0(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( protoReq SetMemoAttachmentsRequest @@ -939,46 +835,6 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_MemoService_DeleteMemo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPatch, pattern_MemoService_RenameMemoTag_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/RenameMemoTag", runtime.WithHTTPPathPattern("/api/v1/{parent=memos/*}/tags:rename")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MemoService_RenameMemoTag_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_MemoService_RenameMemoTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, pattern_MemoService_DeleteMemoTag_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.MemoService/DeleteMemoTag", runtime.WithHTTPPathPattern("/api/v1/{parent=memos/*}/tags:delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MemoService_DeleteMemoTag_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_MemoService_DeleteMemoTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle(http.MethodPatch, pattern_MemoService_SetMemoAttachments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1284,40 +1140,6 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_MemoService_DeleteMemo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodPatch, pattern_MemoService_RenameMemoTag_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/RenameMemoTag", runtime.WithHTTPPathPattern("/api/v1/{parent=memos/*}/tags:rename")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_MemoService_RenameMemoTag_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_MemoService_RenameMemoTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle(http.MethodPost, pattern_MemoService_DeleteMemoTag_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.MemoService/DeleteMemoTag", runtime.WithHTTPPathPattern("/api/v1/{parent=memos/*}/tags:delete")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_MemoService_DeleteMemoTag_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - forward_MemoService_DeleteMemoTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle(http.MethodPatch, pattern_MemoService_SetMemoAttachments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1480,8 +1302,6 @@ var ( pattern_MemoService_GetMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "name"}, "")) pattern_MemoService_UpdateMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "memo.name"}, "")) pattern_MemoService_DeleteMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "memos", "name"}, "")) - pattern_MemoService_RenameMemoTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "parent", "tags"}, "rename")) - pattern_MemoService_DeleteMemoTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "parent", "tags"}, "delete")) pattern_MemoService_SetMemoAttachments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "attachments"}, "")) pattern_MemoService_ListMemoAttachments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "attachments"}, "")) pattern_MemoService_SetMemoRelations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "memos", "name", "relations"}, "")) @@ -1499,8 +1319,6 @@ var ( forward_MemoService_GetMemo_0 = runtime.ForwardResponseMessage forward_MemoService_UpdateMemo_0 = runtime.ForwardResponseMessage forward_MemoService_DeleteMemo_0 = runtime.ForwardResponseMessage - forward_MemoService_RenameMemoTag_0 = runtime.ForwardResponseMessage - forward_MemoService_DeleteMemoTag_0 = runtime.ForwardResponseMessage forward_MemoService_SetMemoAttachments_0 = runtime.ForwardResponseMessage forward_MemoService_ListMemoAttachments_0 = runtime.ForwardResponseMessage forward_MemoService_SetMemoRelations_0 = runtime.ForwardResponseMessage diff --git a/proto/gen/api/v1/memo_service_grpc.pb.go b/proto/gen/api/v1/memo_service_grpc.pb.go index 83e8a2fc6..2e4e91815 100644 --- a/proto/gen/api/v1/memo_service_grpc.pb.go +++ b/proto/gen/api/v1/memo_service_grpc.pb.go @@ -25,8 +25,6 @@ const ( MemoService_GetMemo_FullMethodName = "/memos.api.v1.MemoService/GetMemo" MemoService_UpdateMemo_FullMethodName = "/memos.api.v1.MemoService/UpdateMemo" MemoService_DeleteMemo_FullMethodName = "/memos.api.v1.MemoService/DeleteMemo" - MemoService_RenameMemoTag_FullMethodName = "/memos.api.v1.MemoService/RenameMemoTag" - MemoService_DeleteMemoTag_FullMethodName = "/memos.api.v1.MemoService/DeleteMemoTag" MemoService_SetMemoAttachments_FullMethodName = "/memos.api.v1.MemoService/SetMemoAttachments" MemoService_ListMemoAttachments_FullMethodName = "/memos.api.v1.MemoService/ListMemoAttachments" MemoService_SetMemoRelations_FullMethodName = "/memos.api.v1.MemoService/SetMemoRelations" @@ -52,10 +50,6 @@ type MemoServiceClient interface { UpdateMemo(ctx context.Context, in *UpdateMemoRequest, opts ...grpc.CallOption) (*Memo, error) // DeleteMemo deletes a memo. DeleteMemo(ctx context.Context, in *DeleteMemoRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // RenameMemoTag renames a tag for a memo. - RenameMemoTag(ctx context.Context, in *RenameMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // DeleteMemoTag deletes a tag for a memo. - DeleteMemoTag(ctx context.Context, in *DeleteMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // SetMemoAttachments sets attachments for a memo. SetMemoAttachments(ctx context.Context, in *SetMemoAttachmentsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // ListMemoAttachments lists attachments for a memo. @@ -134,26 +128,6 @@ func (c *memoServiceClient) DeleteMemo(ctx context.Context, in *DeleteMemoReques return out, nil } -func (c *memoServiceClient) RenameMemoTag(ctx context.Context, in *RenameMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, MemoService_RenameMemoTag_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *memoServiceClient) DeleteMemoTag(ctx context.Context, in *DeleteMemoTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, MemoService_DeleteMemoTag_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *memoServiceClient) SetMemoAttachments(ctx context.Context, in *SetMemoAttachmentsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(emptypb.Empty) @@ -258,10 +232,6 @@ type MemoServiceServer interface { UpdateMemo(context.Context, *UpdateMemoRequest) (*Memo, error) // DeleteMemo deletes a memo. DeleteMemo(context.Context, *DeleteMemoRequest) (*emptypb.Empty, error) - // RenameMemoTag renames a tag for a memo. - RenameMemoTag(context.Context, *RenameMemoTagRequest) (*emptypb.Empty, error) - // DeleteMemoTag deletes a tag for a memo. - DeleteMemoTag(context.Context, *DeleteMemoTagRequest) (*emptypb.Empty, error) // SetMemoAttachments sets attachments for a memo. SetMemoAttachments(context.Context, *SetMemoAttachmentsRequest) (*emptypb.Empty, error) // ListMemoAttachments lists attachments for a memo. @@ -305,12 +275,6 @@ func (UnimplementedMemoServiceServer) UpdateMemo(context.Context, *UpdateMemoReq func (UnimplementedMemoServiceServer) DeleteMemo(context.Context, *DeleteMemoRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteMemo not implemented") } -func (UnimplementedMemoServiceServer) RenameMemoTag(context.Context, *RenameMemoTagRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method RenameMemoTag not implemented") -} -func (UnimplementedMemoServiceServer) DeleteMemoTag(context.Context, *DeleteMemoTagRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteMemoTag not implemented") -} func (UnimplementedMemoServiceServer) SetMemoAttachments(context.Context, *SetMemoAttachmentsRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SetMemoAttachments not implemented") } @@ -449,42 +413,6 @@ func _MemoService_DeleteMemo_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _MemoService_RenameMemoTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RenameMemoTagRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MemoServiceServer).RenameMemoTag(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MemoService_RenameMemoTag_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemoServiceServer).RenameMemoTag(ctx, req.(*RenameMemoTagRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MemoService_DeleteMemoTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMemoTagRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MemoServiceServer).DeleteMemoTag(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: MemoService_DeleteMemoTag_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MemoServiceServer).DeleteMemoTag(ctx, req.(*DeleteMemoTagRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _MemoService_SetMemoAttachments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SetMemoAttachmentsRequest) if err := dec(in); err != nil { @@ -674,14 +602,6 @@ var MemoService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteMemo", Handler: _MemoService_DeleteMemo_Handler, }, - { - MethodName: "RenameMemoTag", - Handler: _MemoService_RenameMemoTag_Handler, - }, - { - MethodName: "DeleteMemoTag", - Handler: _MemoService_DeleteMemoTag_Handler, - }, { MethodName: "SetMemoAttachments", Handler: _MemoService_SetMemoAttachments_Handler, diff --git a/proto/gen/openapi.yaml b/proto/gen/openapi.yaml index d0454333e..99960bfb7 100644 --- a/proto/gen/openapi.yaml +++ b/proto/gen/openapi.yaml @@ -592,16 +592,6 @@ paths: If empty, a unique ID will be generated. schema: type: string - - name: validateOnly - in: query - description: Optional. If set, validate the request but don't actually create the memo. - schema: - type: boolean - - name: requestId - in: query - description: Optional. An idempotency token. - schema: - type: string requestBody: content: application/json: @@ -634,14 +624,6 @@ paths: required: true schema: type: string - - name: readMask - in: query - description: |- - Optional. The fields to return in the response. - If not specified, all fields are returned. - schema: - type: string - format: field-mask responses: "200": description: OK @@ -700,11 +682,6 @@ paths: schema: type: string format: field-mask - - name: allowMissing - in: query - description: Optional. If set to true, allows updating sensitive fields. - schema: - type: boolean requestBody: content: application/json: @@ -1000,64 +977,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/memos/{memo}/tags:delete: - post: - tags: - - MemoService - description: DeleteMemoTag deletes a tag for a memo. - operationId: MemoService_DeleteMemoTag - parameters: - - name: memo - in: path - description: The memo id. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeleteMemoTagRequest' - required: true - responses: - "200": - description: OK - content: {} - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/memos/{memo}/tags:rename: - patch: - tags: - - MemoService - description: RenameMemoTag renames a tag for a memo. - operationId: MemoService_RenameMemoTag - parameters: - - name: memo - in: path - description: The memo id. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RenameMemoTagRequest' - required: true - responses: - "200": - description: OK - content: {} - default: - description: Default error response - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/reactions/{reaction}: delete: tags: @@ -2269,23 +2188,6 @@ components: Last time the session was accessed. Used for sliding expiration calculation (last_accessed_time + 2 weeks). format: date-time - DeleteMemoTagRequest: - required: - - parent - - tag - type: object - properties: - parent: - type: string - description: |- - Required. The parent, who owns the tags. - Format: memos/{memo}. Use "memos/-" to delete all tags. - tag: - type: string - description: Required. The tag name to delete. - deleteRelatedMemos: - type: boolean - description: Optional. Whether to delete related memos. FieldMapping: type: object properties: @@ -2483,10 +2385,6 @@ components: nextPageToken: type: string description: A token for the next page of results. - totalSize: - type: integer - description: The total count of attachments. - format: int32 ListMemoCommentsResponse: type: object properties: @@ -2528,10 +2426,6 @@ components: nextPageToken: type: string description: A token for the next page of results. - totalSize: - type: integer - description: The total count of relations. - format: int32 ListMemosResponse: type: object properties: @@ -2545,10 +2439,6 @@ components: description: |- A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. - totalSize: - type: integer - description: The total count of memos (may be approximate). - format: int32 ListShortcutsResponse: type: object properties: @@ -2833,24 +2723,6 @@ components: type: string description: Output only. The creation timestamp. format: date-time - RenameMemoTagRequest: - required: - - parent - - oldTag - - newTag - type: object - properties: - parent: - type: string - description: |- - Required. The parent, who owns the tags. - Format: memos/{memo}. Use "memos/-" to rename all tags. - oldTag: - type: string - description: Required. The old tag name to rename. - newTag: - type: string - description: Required. The new tag name. SetMemoAttachmentsRequest: required: - name diff --git a/server/router/api/v1/memo_service.go b/server/router/api/v1/memo_service.go index 0bb90ecf8..150b8685f 100644 --- a/server/router/api/v1/memo_service.go +++ b/server/router/api/v1/memo_service.go @@ -679,104 +679,6 @@ func (s *APIV1Service) ListMemoComments(ctx context.Context, request *v1pb.ListM return response, nil } -func (s *APIV1Service) RenameMemoTag(ctx context.Context, request *v1pb.RenameMemoTagRequest) (*emptypb.Empty, error) { - user, err := s.GetCurrentUser(ctx) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to get current user") - } - if user == nil { - return nil, status.Errorf(codes.Unauthenticated, "user not authenticated") - } - - memoFind := &store.FindMemo{ - CreatorID: &user.ID, - Filters: []string{fmt.Sprintf("tag in [\"%s\"]", request.OldTag)}, - ExcludeComments: true, - } - if (request.Parent) != "memos/-" { - memoUID, err := ExtractMemoUIDFromName(request.Parent) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err) - } - memoFind.UID = &memoUID - } - - memos, err := s.Store.ListMemos(ctx, memoFind) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to list memos") - } - - for _, memo := range memos { - // Rename tag using goldmark - newContent, err := s.MarkdownService.RenameTag([]byte(memo.Content), request.OldTag, request.NewTag) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to rename tag: %v", err) - } - memo.Content = newContent - - if err := memopayload.RebuildMemoPayload(memo, s.MarkdownService); err != nil { - return nil, status.Errorf(codes.Internal, "failed to rebuild memo payload: %v", err) - } - if err := s.Store.UpdateMemo(ctx, &store.UpdateMemo{ - ID: memo.ID, - Content: &memo.Content, - Payload: memo.Payload, - }); err != nil { - return nil, status.Errorf(codes.Internal, "failed to update memo: %v", err) - } - } - - return &emptypb.Empty{}, nil -} - -func (s *APIV1Service) DeleteMemoTag(ctx context.Context, request *v1pb.DeleteMemoTagRequest) (*emptypb.Empty, error) { - user, err := s.GetCurrentUser(ctx) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to get current user") - } - if user == nil { - return nil, status.Errorf(codes.Unauthenticated, "user not authenticated") - } - - memoFind := &store.FindMemo{ - CreatorID: &user.ID, - Filters: []string{fmt.Sprintf("tag in [\"%s\"]", request.Tag)}, - ExcludeContent: true, - ExcludeComments: true, - } - if request.Parent != "memos/-" { - memoUID, err := ExtractMemoUIDFromName(request.Parent) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid memo name: %v", err) - } - memoFind.UID = &memoUID - } - - memos, err := s.Store.ListMemos(ctx, memoFind) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to list memos") - } - - for _, memo := range memos { - if request.DeleteRelatedMemos { - err := s.Store.DeleteMemo(ctx, &store.DeleteMemo{ID: memo.ID}) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to delete memo") - } - } else { - archived := store.Archived - err := s.Store.UpdateMemo(ctx, &store.UpdateMemo{ - ID: memo.ID, - RowStatus: &archived, - }) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to update memo") - } - } - } - - return &emptypb.Empty{}, nil -} func (s *APIV1Service) getContentLengthLimit(ctx context.Context) (int, error) { workspaceMemoRelatedSetting, err := s.Store.GetWorkspaceMemoRelatedSetting(ctx) diff --git a/web/src/components/HomeSidebar/TagsSection.tsx b/web/src/components/HomeSidebar/TagsSection.tsx index bed64fe2a..30466c42d 100644 --- a/web/src/components/HomeSidebar/TagsSection.tsx +++ b/web/src/components/HomeSidebar/TagsSection.tsx @@ -1,19 +1,12 @@ -import { Edit3Icon, HashIcon, MoreVerticalIcon, TagsIcon, TrashIcon } from "lucide-react"; +import { HashIcon, MoreVerticalIcon, TagsIcon } from "lucide-react"; import { observer } from "mobx-react-lite"; -import { useState } from "react"; -import toast from "react-hot-toast"; import useLocalStorage from "react-use/lib/useLocalStorage"; -import ConfirmDialog from "@/components/ConfirmDialog"; import { Switch } from "@/components/ui/switch"; -import { memoServiceClient } from "@/grpcweb"; -import { useDialog } from "@/hooks/useDialog"; import { cn } from "@/lib/utils"; import { userStore } from "@/store"; import memoFilterStore, { MemoFilter } from "@/store/memoFilter"; import { useTranslate } from "@/utils/i18n"; -import RenameTagDialog from "../RenameTagDialog"; import TagTree from "../TagTree"; -import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../ui/dropdown-menu"; import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover"; interface Props { @@ -24,9 +17,6 @@ const TagsSection = observer((props: Props) => { const t = useTranslate(); const [treeMode, setTreeMode] = useLocalStorage("tag-view-as-tree", false); const [treeAutoExpand, setTreeAutoExpand] = useLocalStorage("tag-tree-auto-expand", false); - const renameTagDialog = useDialog(); - const [selectedTag, setSelectedTag] = useState(""); - const [deleteTagName, setDeleteTagName] = useState(undefined); const tags = Object.entries(userStore.state.tagCount) .sort((a, b) => a[0].localeCompare(b[0])) .sort((a, b) => b[1] - a[1]); @@ -43,38 +33,14 @@ const TagsSection = observer((props: Props) => { } }; - const handleRenameTag = (tag: string) => { - setSelectedTag(tag); - renameTagDialog.open(); - }; - - const handleRenameSuccess = () => { - // Refresh tags after rename - userStore.fetchUsers(); - }; - - const handleDeleteTag = async (tag: string) => { - setDeleteTagName(tag); - }; - - const confirmDeleteTag = async () => { - if (!deleteTagName) return; - await memoServiceClient.deleteMemoTag({ - parent: "memos/-", - tag: deleteTagName, - }); - toast.success(t("tag.delete-success")); - setDeleteTagName(undefined); - }; - return ( -
+
{t("common.tags")} {tags.length > 0 && ( - +
@@ -93,66 +59,37 @@ const TagsSection = observer((props: Props) => { treeMode ? ( ) : ( -
- {tags.map(([tag, amount]) => ( -
- - -
- - -
-
- - handleRenameTag(tag)}> - - {t("common.rename")} - - handleDeleteTag(tag)}> - - {t("common.delete")} - - -
+
+ {tags.map(([tag, amount]) => { + const isActive = memoFilterStore.getFiltersByFactor("tagSearch").some((filter: MemoFilter) => filter.value === tag); + return (
handleTagClick(tag)} > - {tag} - {amount > 1 && ({amount})} + +
+ {tag} + {amount > 1 && ({amount})} +
-
- ))} + ); + })}
) ) : ( !props.readonly && ( -
- -

{t("tag.create-tags-guide")}

+
+ +

{t("tag.create-tags-guide")}

) )} - - {/* Rename Tag Dialog */} - - !open && setDeleteTagName(undefined)} - title={t("tag.delete-confirm")} - confirmLabel={t("common.delete")} - cancelLabel={t("common.cancel")} - onConfirm={confirmDeleteTag} - confirmVariant="destructive" - />
); }); diff --git a/web/src/components/RenameTagDialog.tsx b/web/src/components/RenameTagDialog.tsx deleted file mode 100644 index 97f08734a..000000000 --- a/web/src/components/RenameTagDialog.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import React, { useState } from "react"; -import { toast } from "react-hot-toast"; -import { Button } from "@/components/ui/button"; -import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; -import { memoServiceClient } from "@/grpcweb"; -import useLoading from "@/hooks/useLoading"; -import { useTranslate } from "@/utils/i18n"; - -interface Props { - open: boolean; - onOpenChange: (open: boolean) => void; - tag: string; - onSuccess?: () => void; -} - -function RenameTagDialog({ open, onOpenChange, tag, onSuccess }: Props) { - const t = useTranslate(); - const [newName, setNewName] = useState(tag); - const requestState = useLoading(false); - - const handleTagNameInputChange = (e: React.ChangeEvent) => { - setNewName(e.target.value.trim()); - }; - - const handleConfirm = async () => { - if (!newName || newName.includes(" ")) { - toast.error(t("tag.rename-error-empty")); - return; - } - if (newName === tag) { - toast.error(t("tag.rename-error-repeat")); - return; - } - - try { - requestState.setLoading(); - await memoServiceClient.renameMemoTag({ - parent: "memos/-", - oldTag: tag, - newTag: newName, - }); - toast.success(t("tag.rename-success")); - requestState.setFinish(); - onSuccess?.(); - onOpenChange(false); - } catch (error: any) { - console.error(error); - toast.error(error.details); - requestState.setError(); - } - }; - - return ( - - - - {t("tag.rename-tag")} - -
-
- - -
-
- - -
-
-
    -
  • {t("tag.rename-tip")}
  • -
-
-
- - - - -
-
- ); -} - -export default RenameTagDialog; diff --git a/web/src/components/TagTree.tsx b/web/src/components/TagTree.tsx index 14daca870..a7c35114d 100644 --- a/web/src/components/TagTree.tsx +++ b/web/src/components/TagTree.tsx @@ -115,26 +115,27 @@ const TagItemContainer = observer((props: TagItemContainerProps) => { return ( <> -
+
-
- -
- - {tag.key} {tag.amount > 1 && `(${tag.amount})`} + + + {tag.key} {tag.amount > 1 && ({tag.amount})}
{hasSubTags ? ( - + ) : null}
@@ -142,7 +143,7 @@ const TagItemContainer = observer((props: TagItemContainerProps) => { {hasSubTags ? (
{tag.subTags.map((st, idx) => ( diff --git a/web/src/components/UserMenu.tsx b/web/src/components/UserMenu.tsx index a6de0b15f..6345a0c97 100644 --- a/web/src/components/UserMenu.tsx +++ b/web/src/components/UserMenu.tsx @@ -111,8 +111,8 @@ const UserMenu = observer((props: Props) => { {locales.map((locale) => ( handleLocaleChange(locale)}> - {currentLocale === locale && } - {currentLocale !== locale && } + {currentLocale === locale && } + {currentLocale !== locale && } {getLocaleDisplayName(locale)} ))} @@ -126,8 +126,8 @@ const UserMenu = observer((props: Props) => { {THEME_OPTIONS.map((option) => ( handleThemeChange(option.value)}> - {currentTheme === option.value && } - {currentTheme !== option.value && } + {currentTheme === option.value && } + {currentTheme !== option.value && } {option.label} ))} diff --git a/web/src/types/proto/api/v1/memo_service.ts b/web/src/types/proto/api/v1/memo_service.ts index 3b401bf76..412d5bd02 100644 --- a/web/src/types/proto/api/v1/memo_service.ts +++ b/web/src/types/proto/api/v1/memo_service.ts @@ -165,10 +165,6 @@ export interface CreateMemoRequest { * If empty, a unique ID will be generated. */ memoId: string; - /** Optional. If set, validate the request but don't actually create the memo. */ - validateOnly: boolean; - /** Optional. An idempotency token. */ - requestId: string; } export interface ListMemosRequest { @@ -215,8 +211,6 @@ export interface ListMemosResponse { * If this field is omitted, there are no subsequent pages. */ nextPageToken: string; - /** The total count of memos (may be approximate). */ - totalSize: number; } export interface GetMemoRequest { @@ -225,11 +219,6 @@ export interface GetMemoRequest { * Format: memos/{memo} */ name: string; - /** - * Optional. The fields to return in the response. - * If not specified, all fields are returned. - */ - readMask?: string[] | undefined; } export interface UpdateMemoRequest { @@ -241,11 +230,7 @@ export interface UpdateMemoRequest { | Memo | undefined; /** Required. The list of fields to update. */ - updateMask?: - | string[] - | undefined; - /** Optional. If set to true, allows updating sensitive fields. */ - allowMissing: boolean; + updateMask?: string[] | undefined; } export interface DeleteMemoRequest { @@ -258,30 +243,6 @@ export interface DeleteMemoRequest { force: boolean; } -export interface RenameMemoTagRequest { - /** - * Required. The parent, who owns the tags. - * Format: memos/{memo}. Use "memos/-" to rename all tags. - */ - parent: string; - /** Required. The old tag name to rename. */ - oldTag: string; - /** Required. The new tag name. */ - newTag: string; -} - -export interface DeleteMemoTagRequest { - /** - * Required. The parent, who owns the tags. - * Format: memos/{memo}. Use "memos/-" to delete all tags. - */ - parent: string; - /** Required. The tag name to delete. */ - tag: string; - /** Optional. Whether to delete related memos. */ - deleteRelatedMemos: boolean; -} - export interface SetMemoAttachmentsRequest { /** * Required. The resource name of the memo. @@ -309,8 +270,6 @@ export interface ListMemoAttachmentsResponse { attachments: Attachment[]; /** A token for the next page of results. */ nextPageToken: string; - /** The total count of attachments. */ - totalSize: number; } export interface MemoRelation { @@ -401,8 +360,6 @@ export interface ListMemoRelationsResponse { relations: MemoRelation[]; /** A token for the next page of results. */ nextPageToken: string; - /** The total count of relations. */ - totalSize: number; } export interface CreateMemoCommentRequest { @@ -988,7 +945,7 @@ export const Location: MessageFns = { }; function createBaseCreateMemoRequest(): CreateMemoRequest { - return { memo: undefined, memoId: "", validateOnly: false, requestId: "" }; + return { memo: undefined, memoId: "" }; } export const CreateMemoRequest: MessageFns = { @@ -999,12 +956,6 @@ export const CreateMemoRequest: MessageFns = { if (message.memoId !== "") { writer.uint32(18).string(message.memoId); } - if (message.validateOnly !== false) { - writer.uint32(24).bool(message.validateOnly); - } - if (message.requestId !== "") { - writer.uint32(34).string(message.requestId); - } return writer; }, @@ -1031,22 +982,6 @@ export const CreateMemoRequest: MessageFns = { message.memoId = reader.string(); continue; } - case 3: { - if (tag !== 24) { - break; - } - - message.validateOnly = reader.bool(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.requestId = reader.string(); - continue; - } } if ((tag & 7) === 4 || tag === 0) { break; @@ -1063,8 +998,6 @@ export const CreateMemoRequest: MessageFns = { const message = createBaseCreateMemoRequest(); message.memo = (object.memo !== undefined && object.memo !== null) ? Memo.fromPartial(object.memo) : undefined; message.memoId = object.memoId ?? ""; - message.validateOnly = object.validateOnly ?? false; - message.requestId = object.requestId ?? ""; return message; }, }; @@ -1176,7 +1109,7 @@ export const ListMemosRequest: MessageFns = { }; function createBaseListMemosResponse(): ListMemosResponse { - return { memos: [], nextPageToken: "", totalSize: 0 }; + return { memos: [], nextPageToken: "" }; } export const ListMemosResponse: MessageFns = { @@ -1187,9 +1120,6 @@ export const ListMemosResponse: MessageFns = { if (message.nextPageToken !== "") { writer.uint32(18).string(message.nextPageToken); } - if (message.totalSize !== 0) { - writer.uint32(24).int32(message.totalSize); - } return writer; }, @@ -1216,14 +1146,6 @@ export const ListMemosResponse: MessageFns = { message.nextPageToken = reader.string(); continue; } - case 3: { - if (tag !== 24) { - break; - } - - message.totalSize = reader.int32(); - continue; - } } if ((tag & 7) === 4 || tag === 0) { break; @@ -1240,13 +1162,12 @@ export const ListMemosResponse: MessageFns = { const message = createBaseListMemosResponse(); message.memos = object.memos?.map((e) => Memo.fromPartial(e)) || []; message.nextPageToken = object.nextPageToken ?? ""; - message.totalSize = object.totalSize ?? 0; return message; }, }; function createBaseGetMemoRequest(): GetMemoRequest { - return { name: "", readMask: undefined }; + return { name: "" }; } export const GetMemoRequest: MessageFns = { @@ -1254,9 +1175,6 @@ export const GetMemoRequest: MessageFns = { if (message.name !== "") { writer.uint32(10).string(message.name); } - if (message.readMask !== undefined) { - FieldMask.encode(FieldMask.wrap(message.readMask), writer.uint32(18).fork()).join(); - } return writer; }, @@ -1275,14 +1193,6 @@ export const GetMemoRequest: MessageFns = { message.name = reader.string(); continue; } - case 2: { - if (tag !== 18) { - break; - } - - message.readMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32())); - continue; - } } if ((tag & 7) === 4 || tag === 0) { break; @@ -1298,13 +1208,12 @@ export const GetMemoRequest: MessageFns = { fromPartial(object: DeepPartial): GetMemoRequest { const message = createBaseGetMemoRequest(); message.name = object.name ?? ""; - message.readMask = object.readMask ?? undefined; return message; }, }; function createBaseUpdateMemoRequest(): UpdateMemoRequest { - return { memo: undefined, updateMask: undefined, allowMissing: false }; + return { memo: undefined, updateMask: undefined }; } export const UpdateMemoRequest: MessageFns = { @@ -1315,9 +1224,6 @@ export const UpdateMemoRequest: MessageFns = { if (message.updateMask !== undefined) { FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).join(); } - if (message.allowMissing !== false) { - writer.uint32(24).bool(message.allowMissing); - } return writer; }, @@ -1344,14 +1250,6 @@ export const UpdateMemoRequest: MessageFns = { message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32())); continue; } - case 3: { - if (tag !== 24) { - break; - } - - message.allowMissing = reader.bool(); - continue; - } } if ((tag & 7) === 4 || tag === 0) { break; @@ -1368,7 +1266,6 @@ export const UpdateMemoRequest: MessageFns = { const message = createBaseUpdateMemoRequest(); message.memo = (object.memo !== undefined && object.memo !== null) ? Memo.fromPartial(object.memo) : undefined; message.updateMask = object.updateMask ?? undefined; - message.allowMissing = object.allowMissing ?? false; return message; }, }; @@ -1431,146 +1328,6 @@ export const DeleteMemoRequest: MessageFns = { }, }; -function createBaseRenameMemoTagRequest(): RenameMemoTagRequest { - return { parent: "", oldTag: "", newTag: "" }; -} - -export const RenameMemoTagRequest: MessageFns = { - encode(message: RenameMemoTagRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.parent !== "") { - writer.uint32(10).string(message.parent); - } - if (message.oldTag !== "") { - writer.uint32(18).string(message.oldTag); - } - if (message.newTag !== "") { - writer.uint32(26).string(message.newTag); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): RenameMemoTagRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRenameMemoTagRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.parent = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.oldTag = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.newTag = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): RenameMemoTagRequest { - return RenameMemoTagRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): RenameMemoTagRequest { - const message = createBaseRenameMemoTagRequest(); - message.parent = object.parent ?? ""; - message.oldTag = object.oldTag ?? ""; - message.newTag = object.newTag ?? ""; - return message; - }, -}; - -function createBaseDeleteMemoTagRequest(): DeleteMemoTagRequest { - return { parent: "", tag: "", deleteRelatedMemos: false }; -} - -export const DeleteMemoTagRequest: MessageFns = { - encode(message: DeleteMemoTagRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.parent !== "") { - writer.uint32(10).string(message.parent); - } - if (message.tag !== "") { - writer.uint32(18).string(message.tag); - } - if (message.deleteRelatedMemos !== false) { - writer.uint32(24).bool(message.deleteRelatedMemos); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): DeleteMemoTagRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteMemoTagRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.parent = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.tag = reader.string(); - continue; - } - case 3: { - if (tag !== 24) { - break; - } - - message.deleteRelatedMemos = reader.bool(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - create(base?: DeepPartial): DeleteMemoTagRequest { - return DeleteMemoTagRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DeleteMemoTagRequest { - const message = createBaseDeleteMemoTagRequest(); - message.parent = object.parent ?? ""; - message.tag = object.tag ?? ""; - message.deleteRelatedMemos = object.deleteRelatedMemos ?? false; - return message; - }, -}; - function createBaseSetMemoAttachmentsRequest(): SetMemoAttachmentsRequest { return { name: "", attachments: [] }; } @@ -1700,7 +1457,7 @@ export const ListMemoAttachmentsRequest: MessageFns }; function createBaseListMemoAttachmentsResponse(): ListMemoAttachmentsResponse { - return { attachments: [], nextPageToken: "", totalSize: 0 }; + return { attachments: [], nextPageToken: "" }; } export const ListMemoAttachmentsResponse: MessageFns = { @@ -1711,9 +1468,6 @@ export const ListMemoAttachmentsResponse: MessageFns Attachment.fromPartial(e)) || []; message.nextPageToken = object.nextPageToken ?? ""; - message.totalSize = object.totalSize ?? 0; return message; }, }; @@ -2030,7 +1775,7 @@ export const ListMemoRelationsRequest: MessageFns = { }; function createBaseListMemoRelationsResponse(): ListMemoRelationsResponse { - return { relations: [], nextPageToken: "", totalSize: 0 }; + return { relations: [], nextPageToken: "" }; } export const ListMemoRelationsResponse: MessageFns = { @@ -2041,9 +1786,6 @@ export const ListMemoRelationsResponse: MessageFns = if (message.nextPageToken !== "") { writer.uint32(18).string(message.nextPageToken); } - if (message.totalSize !== 0) { - writer.uint32(24).int32(message.totalSize); - } return writer; }, @@ -2070,14 +1812,6 @@ export const ListMemoRelationsResponse: MessageFns = message.nextPageToken = reader.string(); continue; } - case 3: { - if (tag !== 24) { - break; - } - - message.totalSize = reader.int32(); - continue; - } } if ((tag & 7) === 4 || tag === 0) { break; @@ -2094,7 +1828,6 @@ export const ListMemoRelationsResponse: MessageFns = const message = createBaseListMemoRelationsResponse(); message.relations = object.relations?.map((e) => MemoRelation.fromPartial(e)) || []; message.nextPageToken = object.nextPageToken ?? ""; - message.totalSize = object.totalSize ?? 0; return message; }, }; @@ -2764,150 +2497,6 @@ export const MemoServiceDefinition = { }, }, }, - /** RenameMemoTag renames a tag for a memo. */ - renameMemoTag: { - name: "RenameMemoTag", - requestType: RenameMemoTagRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: { - _unknownFields: { - 8410: [ - new Uint8Array([ - 22, - 112, - 97, - 114, - 101, - 110, - 116, - 44, - 111, - 108, - 100, - 95, - 116, - 97, - 103, - 44, - 110, - 101, - 119, - 95, - 116, - 97, - 103, - ]), - ], - 578365826: [ - new Uint8Array([ - 41, - 58, - 1, - 42, - 50, - 36, - 47, - 97, - 112, - 105, - 47, - 118, - 49, - 47, - 123, - 112, - 97, - 114, - 101, - 110, - 116, - 61, - 109, - 101, - 109, - 111, - 115, - 47, - 42, - 125, - 47, - 116, - 97, - 103, - 115, - 58, - 114, - 101, - 110, - 97, - 109, - 101, - ]), - ], - }, - }, - }, - /** DeleteMemoTag deletes a tag for a memo. */ - deleteMemoTag: { - name: "DeleteMemoTag", - requestType: DeleteMemoTagRequest, - requestStream: false, - responseType: Empty, - responseStream: false, - options: { - _unknownFields: { - 8410: [new Uint8Array([10, 112, 97, 114, 101, 110, 116, 44, 116, 97, 103])], - 578365826: [ - new Uint8Array([ - 41, - 58, - 1, - 42, - 34, - 36, - 47, - 97, - 112, - 105, - 47, - 118, - 49, - 47, - 123, - 112, - 97, - 114, - 101, - 110, - 116, - 61, - 109, - 101, - 109, - 111, - 115, - 47, - 42, - 125, - 47, - 116, - 97, - 103, - 115, - 58, - 100, - 101, - 108, - 101, - 116, - 101, - ]), - ], - }, - }, - }, /** SetMemoAttachments sets attachments for a memo. */ setMemoAttachments: { name: "SetMemoAttachments",