hash
stringlengths
40
40
date
stringdate
2021-12-08 21:13:14
2025-03-18 18:48:22
author
stringclasses
172 values
commit_message
stringlengths
9
1.82k
is_merge
bool
1 class
git_diff
stringlengths
80
1.25M
type
stringclasses
13 values
masked_commit_message
stringlengths
4
1.81k
0c251f9ab87d60fadaa00fd8be2f3fddf09dbe96
2024-05-16 19:23:12
Steven
chore: fix resource delete handler
false
diff --git a/web/src/components/MemoEditor/ResourceListView.tsx b/web/src/components/MemoEditor/ResourceListView.tsx index 9275c413c14a8..12701eba0686f 100644 --- a/web/src/components/MemoEditor/ResourceListView.tsx +++ b/web/src/components/MemoEditor/ResourceListView.tsx @@ -36,18 +36,18 @@ const ResourceListView = (props: Props) => { <div className="w-full flex flex-row justify-start flex-wrap gap-2 mt-2"> {resourceList.map((resource) => { return ( - <SortableItem + <div key={resource.name} - id={resource.name} className="max-w-full w-auto flex flex-row justify-start items-center flex-nowrap gap-x-1 bg-zinc-100 dark:bg-zinc-900 px-2 py-1 rounded hover:shadow-sm text-gray-500 dark:text-gray-400" > - <ResourceIcon resource={resource} className="!w-4 !h-4 !opacity-100" /> - <span className="text-sm max-w-[8rem] truncate">{resource.filename}</span> - <Icon.X - className="w-4 h-auto cursor-pointer opacity-60 hover:opacity-100" - onClick={() => handleDeleteResource(resource.name)} - /> - </SortableItem> + <SortableItem id={resource.name} className="flex flex-row justify-start items-center gap-x-1"> + <ResourceIcon resource={resource} className="!w-4 !h-4 !opacity-100" /> + <span className="text-sm max-w-[8rem] truncate">{resource.filename}</span> + </SortableItem> + <button className="shrink-0" onClick={() => handleDeleteResource(resource.name)}> + <Icon.X className="w-4 h-auto cursor-pointer opacity-60 hover:opacity-100" /> + </button> + </div> ); })} </div>
chore
fix resource delete handler
59f0ee862d30405162df249eb3f94d794765d3a5
2023-10-26 22:19:58
Steven
chore: fix viper default value
false
diff --git a/cmd/memos.go b/cmd/memos.go index f2f9b46543c42..dd4ef31710d09 100644 --- a/cmd/memos.go +++ b/cmd/memos.go @@ -147,7 +147,7 @@ func init() { viper.SetDefault("driver", "sqlite") viper.SetDefault("addr", "") viper.SetDefault("port", 8081) - viper.SetDefault("metric", "true") + viper.SetDefault("metric", true) viper.SetEnvPrefix("memos") }
chore
fix viper default value
b98f85d8a7966fb56da444a6d2be8c9a2805a301
2023-05-01 10:56:15
João Nuno Mota
feat: add infinite scroll for memos (#1614) Add infinite scroll for memos on home
false
diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index c5c81e00cdf3e..af6bfb578e605 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { toast } from "react-hot-toast"; import { useTranslation } from "react-i18next"; import { useFilterStore, useMemoStore, useShortcutStore, useUserStore } from "@/store/module"; @@ -86,6 +86,8 @@ const MemoList = () => { unpinnedMemos.sort(memoSort); const sortedMemos = pinnedMemos.concat(unpinnedMemos).filter((m) => m.rowStatus === "NORMAL"); + const statusRef = useRef<HTMLDivElement>(null); + useEffect(() => { memoStore .fetchMemos() @@ -116,7 +118,21 @@ const MemoList = () => { if (sortedMemos.length < DEFAULT_MEMO_LIMIT) { handleFetchMoreClick(); } - }, [isFetching, isComplete, filter, sortedMemos.length]); + const observer = new IntersectionObserver(([entry]) => { + if (entry.isIntersecting) { + handleFetchMoreClick(); + observer.unobserve(entry.target); + } + }); + if (statusRef?.current) { + observer.observe(statusRef.current); + } + return () => { + if (statusRef?.current) { + observer.unobserve(statusRef.current); + } + }; + }, [isFetching, isComplete, filter, sortedMemos.length, statusRef]); const handleFetchMoreClick = async () => { try { @@ -142,7 +158,7 @@ const MemoList = () => { <p className="status-text">{t("memo.fetching-data")}</p> </div> ) : ( - <div className="status-text-container"> + <div ref={statusRef} className="status-text-container"> <p className="status-text"> {isComplete ? ( sortedMemos.length === 0 ? (
feat
add infinite scroll for memos (#1614) Add infinite scroll for memos on home
7cc8b951a3e0788ecc37924425ae2995feb49fb2
2024-03-20 18:09:16
Steven
refactor: update resource id naming
false
diff --git a/internal/util/resource_name.go b/internal/util/resource_name.go index 6fc10c6660f35..f7a1124a9e708 100644 --- a/internal/util/resource_name.go +++ b/internal/util/resource_name.go @@ -3,5 +3,5 @@ package util import "regexp" var ( - ResourceNameMatcher = regexp.MustCompile("^[a-zA-Z0-9]([a-zA-Z0-9-]{1,30}[a-zA-Z0-9])$") + UIDMatcher = regexp.MustCompile("^[a-zA-Z0-9]([a-zA-Z0-9-]{1,30}[a-zA-Z0-9])$") ) diff --git a/proto/api/v2/memo_service.proto b/proto/api/v2/memo_service.proto index 829b5d9d7cb28..ff09649a4fa9a 100644 --- a/proto/api/v2/memo_service.proto +++ b/proto/api/v2/memo_service.proto @@ -122,15 +122,17 @@ enum Visibility { message Memo { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} + // id is the system generated id. string name = 1; - string resource_id = 2; + // The user defined id of the memo. + string uid = 2; RowStatus row_status = 3; // The name of the creator. - // Format: users/{uid} + // Format: users/{id} string creator = 4; google.protobuf.Timestamp create_time = 5; @@ -197,7 +199,7 @@ message SearchMemosResponse { message GetMemoRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; } @@ -217,7 +219,7 @@ message UpdateMemoResponse { message DeleteMemoRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; } @@ -234,7 +236,7 @@ message ExportMemosResponse { message SetMemoResourcesRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; repeated Resource resources = 2; @@ -244,7 +246,7 @@ message SetMemoResourcesResponse {} message ListMemoResourcesRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; } @@ -254,7 +256,7 @@ message ListMemoResourcesResponse { message SetMemoRelationsRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; repeated MemoRelation relations = 2; @@ -264,7 +266,7 @@ message SetMemoRelationsResponse {} message ListMemoRelationsRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; } @@ -274,7 +276,7 @@ message ListMemoRelationsResponse { message CreateMemoCommentRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; CreateMemoRequest comment = 2; @@ -286,7 +288,7 @@ message CreateMemoCommentResponse { message ListMemoCommentsRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; } @@ -296,7 +298,7 @@ message ListMemoCommentsResponse { message GetUserMemosStatsRequest { // name is the name of the user to get stats for. - // Format: users/{uid} + // Format: users/{id} string name = 1; // timezone location @@ -316,7 +318,7 @@ message GetUserMemosStatsResponse { message ListMemoReactionsRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; } @@ -326,7 +328,7 @@ message ListMemoReactionsResponse { message UpsertMemoReactionRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; Reaction reaction = 2; @@ -338,7 +340,7 @@ message UpsertMemoReactionResponse { message DeleteMemoReactionRequest { // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} string name = 1; int32 reaction_id = 2; diff --git a/proto/api/v2/reaction_service.proto b/proto/api/v2/reaction_service.proto index 276539ccf4e9c..c1c7159f63dd4 100644 --- a/proto/api/v2/reaction_service.proto +++ b/proto/api/v2/reaction_service.proto @@ -8,7 +8,7 @@ message Reaction { int32 id = 1; // The name of the creator. - // Format: users/{uid} + // Format: users/{id} string creator = 2; string content_id = 3; diff --git a/proto/api/v2/tag_service.proto b/proto/api/v2/tag_service.proto index 83315553998fd..a50cf4d083238 100644 --- a/proto/api/v2/tag_service.proto +++ b/proto/api/v2/tag_service.proto @@ -37,7 +37,7 @@ service TagService { message Tag { string name = 1; // The creator of tags. - // Format: users/{uid} + // Format: users/{id} string creator = 2; } @@ -57,7 +57,7 @@ message BatchUpsertTagResponse {} message ListTagsRequest { // The creator of tags. - // Format: users/{uid} + // Format: users/{id} string user = 1; } @@ -67,7 +67,7 @@ message ListTagsResponse { message RenameTagRequest { // The creator of tags. - // Format: users/{uid} + // Format: users/{id} string user = 1; string old_name = 2; string new_name = 3; @@ -85,7 +85,7 @@ message DeleteTagResponse {} message GetTagSuggestionsRequest { // The creator of tags. - // Format: users/{uid} + // Format: users/{id} string user = 1; } diff --git a/proto/api/v2/user_service.proto b/proto/api/v2/user_service.proto index af55188ad6890..d5558e5375775 100644 --- a/proto/api/v2/user_service.proto +++ b/proto/api/v2/user_service.proto @@ -91,7 +91,7 @@ service UserService { message User { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; // The system generated uid of the user. @@ -140,7 +140,7 @@ message SearchUsersResponse { message GetUserRequest { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; } @@ -168,7 +168,7 @@ message UpdateUserResponse { message DeleteUserRequest { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; } @@ -176,7 +176,7 @@ message DeleteUserResponse {} message UserSetting { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; // The preferred locale of the user. string locale = 2; @@ -190,7 +190,7 @@ message UserSetting { message GetUserSettingRequest { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; } @@ -217,7 +217,7 @@ message UserAccessToken { message ListUserAccessTokensRequest { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; } @@ -227,7 +227,7 @@ message ListUserAccessTokensResponse { message CreateUserAccessTokenRequest { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; string description = 2; @@ -241,7 +241,7 @@ message CreateUserAccessTokenResponse { message DeleteUserAccessTokenRequest { // The name of the user. - // Format: users/{uid} + // Format: users/{id} string name = 1; // access_token is the access token to delete. string access_token = 2; diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md index ac7a76c5f5bb3..a7ba32fe67822 100644 --- a/proto/gen/api/v2/README.md +++ b/proto/gen/api/v2/README.md @@ -389,7 +389,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | | description | [string](#string) | | | | expires_at | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | optional | | @@ -451,7 +451,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | | access_token | [string](#string) | | access_token is the access token to delete. | @@ -477,7 +477,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | @@ -502,7 +502,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | @@ -532,7 +532,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | @@ -562,7 +562,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | @@ -709,7 +709,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | | id | [int32](#int32) | | The system generated uid of the user. | | role | [User.Role](#memos-api-v2-User-Role) | | | | username | [string](#string) | | | @@ -753,7 +753,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the user. Format: users/{uid} | +| name | [string](#string) | | The name of the user. Format: users/{id} | | locale | [string](#string) | | The preferred locale of the user. | | appearance | [string](#string) | | The preferred appearance of the user. | | memo_visibility | [string](#string) | | The default visibility of the memo. | @@ -1273,7 +1273,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | id | [int32](#int32) | | | -| creator | [string](#string) | | The name of the creator. Format: users/{uid} | +| creator | [string](#string) | | The name of the creator. Format: users/{id} | | content_id | [string](#string) | | | | reaction_type | [Reaction.Type](#memos-api-v2-Reaction-Type) | | | @@ -1556,7 +1556,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | | comment | [CreateMemoRequest](#memos-api-v2-CreateMemoRequest) | | | @@ -1618,7 +1618,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | | reaction_id | [int32](#int32) | | | @@ -1644,7 +1644,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | @@ -1699,7 +1699,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | @@ -1729,7 +1729,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | name is the name of the user to get stats for. Format: users/{uid} | +| name | [string](#string) | | name is the name of the user to get stats for. Format: users/{id} | | timezone | [string](#string) | | timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | | filter | [string](#string) | | Same as ListMemosRequest.filter | @@ -1777,7 +1777,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | @@ -1807,7 +1807,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | @@ -1837,7 +1837,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | @@ -1867,7 +1867,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | @@ -1930,10 +1930,10 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | -| resource_id | [string](#string) | | | +| name | [string](#string) | | The name of the memo. Format: memos/{id} id is the system generated id. | +| uid | [string](#string) | | The user defined id of the memo. | | row_status | [RowStatus](#memos-api-v2-RowStatus) | | | -| creator | [string](#string) | | The name of the creator. Format: users/{uid} | +| creator | [string](#string) | | The name of the creator. Format: users/{id} | | create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | | update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | | display_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | @@ -1988,7 +1988,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | | relations | [MemoRelation](#memos-api-v2-MemoRelation) | repeated | | @@ -2014,7 +2014,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | | resources | [Resource](#memos-api-v2-Resource) | repeated | | @@ -2071,7 +2071,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the memo. Format: memos/{uid} | +| name | [string](#string) | | The name of the memo. Format: memos/{id} | | reaction | [Reaction](#memos-api-v2-Reaction) | | | @@ -2208,7 +2208,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| user | [string](#string) | | The creator of tags. Format: users/{uid} | +| user | [string](#string) | | The creator of tags. Format: users/{id} | @@ -2238,7 +2238,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| user | [string](#string) | | The creator of tags. Format: users/{uid} | +| user | [string](#string) | | The creator of tags. Format: users/{id} | @@ -2268,7 +2268,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| user | [string](#string) | | The creator of tags. Format: users/{uid} | +| user | [string](#string) | | The creator of tags. Format: users/{id} | | old_name | [string](#string) | | | | new_name | [string](#string) | | | @@ -2301,7 +2301,7 @@ Used internally for obfuscating the page token. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | name | [string](#string) | | | -| creator | [string](#string) | | The creator of tags. Format: users/{uid} | +| creator | [string](#string) | | The creator of tags. Format: users/{id} | diff --git a/proto/gen/api/v2/memo_service.pb.go b/proto/gen/api/v2/memo_service.pb.go index a49077499da76..f4924f3f7034d 100644 --- a/proto/gen/api/v2/memo_service.pb.go +++ b/proto/gen/api/v2/memo_service.pb.go @@ -81,12 +81,14 @@ type Memo struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - ResourceId string `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - RowStatus RowStatus `protobuf:"varint,3,opt,name=row_status,json=rowStatus,proto3,enum=memos.api.v2.RowStatus" json:"row_status,omitempty"` + // Format: memos/{id} + // id is the system generated id. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The user defined id of the memo. + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` + RowStatus RowStatus `protobuf:"varint,3,opt,name=row_status,json=rowStatus,proto3,enum=memos.api.v2.RowStatus" json:"row_status,omitempty"` // The name of the creator. - // Format: users/{uid} + // Format: users/{id} Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` @@ -139,9 +141,9 @@ func (x *Memo) GetName() string { return "" } -func (x *Memo) GetResourceId() string { +func (x *Memo) GetUid() string { if x != nil { - return x.ResourceId + return x.Uid } return "" } @@ -559,7 +561,7 @@ type GetMemoRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -757,7 +759,7 @@ type DeleteMemoRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -939,7 +941,7 @@ type SetMemoResourcesRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` } @@ -1034,7 +1036,7 @@ type ListMemoResourcesRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -1130,7 +1132,7 @@ type SetMemoRelationsRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Relations []*MemoRelation `protobuf:"bytes,2,rep,name=relations,proto3" json:"relations,omitempty"` } @@ -1225,7 +1227,7 @@ type ListMemoRelationsRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -1321,7 +1323,7 @@ type CreateMemoCommentRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Comment *CreateMemoRequest `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` } @@ -1425,7 +1427,7 @@ type ListMemoCommentsRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -1521,7 +1523,7 @@ type GetUserMemosStatsRequest struct { unknownFields protoimpl.UnknownFields // name is the name of the user to get stats for. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // timezone location // Format: uses tz identifier @@ -1639,7 +1641,7 @@ type ListMemoReactionsRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -1735,7 +1737,7 @@ type UpsertMemoReactionRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Reaction *Reaction `protobuf:"bytes,2,opt,name=reaction,proto3" json:"reaction,omitempty"` } @@ -1839,7 +1841,7 @@ type DeleteMemoReactionRequest struct { unknownFields protoimpl.UnknownFields // The name of the memo. - // Format: memos/{uid} + // Format: memos/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` ReactionId int32 `protobuf:"varint,2,opt,name=reaction_id,json=reactionId,proto3" json:"reaction_id,omitempty"` } @@ -1950,365 +1952,364 @@ var file_api_v2_memo_service_proto_rawDesc = []byte{ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x05, 0x0a, 0x04, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x05, 0x0a, 0x04, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, 0x77, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x77, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, - 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, - 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, - 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, - 0x12, 0x25, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, - 0x03, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0c, 0x0a, 0x0a, - 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x11, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, 0x73, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x69, 0x73, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x22, 0x3c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x0a, 0x72, 0x6f, + 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, + 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x72, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x4e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, + 0x38, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, + 0x6e, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, + 0x64, 0x12, 0x25, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x08, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x67, 0x0a, 0x11, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x76, 0x69, + 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x69, + 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x22, 0x3c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x22, 0x66, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x2c, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, + 0x3f, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x22, 0x66, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, - 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, - 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x22, 0x2c, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3f, - 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, - 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x39, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, - 0x22, 0x78, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x3b, 0x0a, - 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3c, 0x0a, 0x12, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x27, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x6f, 0x22, 0x78, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x3b, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x3c, 0x0a, 0x12, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x27, 0x0a, 0x11, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x2f, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, + 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, - 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x17, 0x53, + 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x55, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x69, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x17, 0x53, 0x65, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x55, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x69, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x22, 0x43, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x26, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x2d, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x22, 0x43, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, - 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x2d, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, - 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x62, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x74, - 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, - 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, - 0x9f, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x19, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, - 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x1a, 0x55, 0x70, 0x73, - 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x19, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x1c, 0x0a, - 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x50, 0x0a, 0x0a, 0x56, - 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, - 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, 0x32, 0xba, 0x12, - 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x62, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x22, 0x9f, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, + 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x34, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x19, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x1a, 0x55, 0x70, + 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x19, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, + 0x0b, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x1c, + 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x50, 0x0a, 0x0a, + 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, + 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, + 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, 0x32, 0xba, + 0x12, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x69, + 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x70, 0x0a, - 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x20, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, - 0x6d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8d, - 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3c, 0xda, 0x41, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6d, 0x65, 0x6d, 0x6f, - 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x76, - 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, + 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x70, + 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x20, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x12, 0x6d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1c, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, + 0x8d, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3c, 0xda, 0x41, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6d, 0x65, 0x6d, + 0x6f, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, + 0x76, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x70, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x16, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0xda, 0x41, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0xda, 0x41, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, 0x20, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x91, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, + 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x70, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x53, 0x65, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, + 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x53, 0x65, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x22, + 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x11, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, + 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x91, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x8c, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xda, 0x41, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xda, 0x41, 0x08, 0x75, - 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, - 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x12, 0x55, - 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x22, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb2, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x49, 0xda, 0x41, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x2a, 0x2e, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, - 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x72, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, - 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, - 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, - 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, - 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, - 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x12, + 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, + 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x22, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb2, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x49, 0xda, 0x41, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x2a, 0x2e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x72, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x42, 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, + 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, + 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, + 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/gen/api/v2/reaction_service.pb.go b/proto/gen/api/v2/reaction_service.pb.go index 658165b66f2dc..1e3b56bc0cc26 100644 --- a/proto/gen/api/v2/reaction_service.pb.go +++ b/proto/gen/api/v2/reaction_service.pb.go @@ -106,7 +106,7 @@ type Reaction struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // The name of the creator. - // Format: users/{uid} + // Format: users/{id} Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` ContentId string `protobuf:"bytes,3,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"` ReactionType Reaction_Type `protobuf:"varint,4,opt,name=reaction_type,json=reactionType,proto3,enum=memos.api.v2.Reaction_Type" json:"reaction_type,omitempty"` diff --git a/proto/gen/api/v2/tag_service.pb.go b/proto/gen/api/v2/tag_service.pb.go index 3a0a6e45dbe08..4cf47b293bae8 100644 --- a/proto/gen/api/v2/tag_service.pb.go +++ b/proto/gen/api/v2/tag_service.pb.go @@ -28,7 +28,7 @@ type Tag struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The creator of tags. - // Format: users/{uid} + // Format: users/{id} Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` } @@ -263,7 +263,7 @@ type ListTagsRequest struct { unknownFields protoimpl.UnknownFields // The creator of tags. - // Format: users/{uid} + // Format: users/{id} User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` } @@ -359,7 +359,7 @@ type RenameTagRequest struct { unknownFields protoimpl.UnknownFields // The creator of tags. - // Format: users/{uid} + // Format: users/{id} User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` OldName string `protobuf:"bytes,2,opt,name=old_name,json=oldName,proto3" json:"old_name,omitempty"` NewName string `protobuf:"bytes,3,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"` @@ -556,7 +556,7 @@ type GetTagSuggestionsRequest struct { unknownFields protoimpl.UnknownFields // The creator of tags. - // Format: users/{uid} + // Format: users/{id} User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` } diff --git a/proto/gen/api/v2/user_service.pb.go b/proto/gen/api/v2/user_service.pb.go index 444049a890a25..1ab48a831ed45 100644 --- a/proto/gen/api/v2/user_service.pb.go +++ b/proto/gen/api/v2/user_service.pb.go @@ -81,7 +81,7 @@ type User struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The system generated uid of the user. Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` @@ -398,7 +398,7 @@ type GetUserRequest struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -690,7 +690,7 @@ type DeleteUserRequest struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -777,7 +777,7 @@ type UserSetting struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The preferred locale of the user. Locale string `protobuf:"bytes,2,opt,name=locale,proto3" json:"locale,omitempty"` @@ -862,7 +862,7 @@ type GetUserSettingRequest struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -1131,7 +1131,7 @@ type ListUserAccessTokensRequest struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -1227,7 +1227,7 @@ type CreateUserAccessTokenRequest struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3,oneof" json:"expires_at,omitempty"` @@ -1339,7 +1339,7 @@ type DeleteUserAccessTokenRequest struct { unknownFields protoimpl.UnknownFields // The name of the user. - // Format: users/{uid} + // Format: users/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // access_token is the access token to delete. AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` diff --git a/server/integration/telegram.go b/server/integration/telegram.go index 20f85ac897d45..c19e7cbb03572 100644 --- a/server/integration/telegram.go +++ b/server/integration/telegram.go @@ -74,9 +74,9 @@ func (t *TelegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot, } create := &store.Memo{ - ResourceName: shortuuid.New(), - CreatorID: creatorID, - Visibility: store.Private, + UID: shortuuid.New(), + CreatorID: creatorID, + Visibility: store.Private, } if message.Text != nil { create.Content = convertToMarkdown(*message.Text, message.Entities) @@ -121,12 +121,12 @@ func (t *TelegramHandler) MessageHandle(ctx context.Context, bot *telegram.Bot, for _, attachment := range attachments { // Fill the common field of create create := store.Resource{ - ResourceName: shortuuid.New(), - CreatorID: creatorID, - Filename: filepath.Base(attachment.FileName), - Type: attachment.GetMimeType(), - Size: attachment.FileSize, - MemoID: &memoMessage.ID, + UID: shortuuid.New(), + CreatorID: creatorID, + Filename: filepath.Base(attachment.FileName), + Type: attachment.GetMimeType(), + Size: attachment.FileSize, + MemoID: &memoMessage.ID, } err := apiv1.SaveResourceBlob(ctx, t.store, &create, bytes.NewReader(attachment.Data)) diff --git a/server/route/api/v1/auth.go b/server/route/api/v1/auth.go index 0dcaf2829f7bc..e6f50d5de0bf6 100644 --- a/server/route/api/v1/auth.go +++ b/server/route/api/v1/auth.go @@ -269,7 +269,7 @@ func (s *APIV1Service) SignUp(c echo.Context) error { if err != nil { return echo.NewHTTPError(http.StatusBadRequest, "Failed to find users").SetInternal(err) } - if !util.ResourceNameMatcher.MatchString(strings.ToLower(signup.Username)) { + if !util.UIDMatcher.MatchString(strings.ToLower(signup.Username)) { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid username %s", signup.Username)).SetInternal(err) } diff --git a/server/route/api/v1/memo.go b/server/route/api/v1/memo.go index 90f01f084afb8..08003ea014437 100644 --- a/server/route/api/v1/memo.go +++ b/server/route/api/v1/memo.go @@ -827,7 +827,7 @@ func (s *APIV1Service) UpdateMemo(c echo.Context) error { func (s *APIV1Service) convertMemoFromStore(ctx context.Context, memo *store.Memo) (*Memo, error) { memoMessage := &Memo{ ID: memo.ID, - Name: memo.ResourceName, + Name: memo.UID, RowStatus: RowStatus(memo.RowStatus.String()), CreatorID: memo.CreatorID, CreatedTs: memo.CreatedTs, @@ -921,11 +921,11 @@ func convertCreateMemoRequestToMemoMessage(memoCreate *CreateMemoRequest) *store createdTs = *memoCreate.CreatedTs } return &store.Memo{ - ResourceName: shortuuid.New(), - CreatorID: memoCreate.CreatorID, - CreatedTs: createdTs, - Content: memoCreate.Content, - Visibility: store.Visibility(memoCreate.Visibility), + UID: shortuuid.New(), + CreatorID: memoCreate.CreatorID, + CreatedTs: createdTs, + Content: memoCreate.Content, + Visibility: store.Visibility(memoCreate.Visibility), } } diff --git a/server/route/api/v1/resource.go b/server/route/api/v1/resource.go index 6f51169533ae7..edbe943daae0c 100644 --- a/server/route/api/v1/resource.go +++ b/server/route/api/v1/resource.go @@ -138,7 +138,7 @@ func (s *APIV1Service) CreateResource(c echo.Context) error { } create := &store.Resource{ - ResourceName: shortuuid.New(), + UID: shortuuid.New(), CreatorID: userID, Filename: request.Filename, ExternalLink: request.ExternalLink, @@ -220,11 +220,11 @@ func (s *APIV1Service) UploadResource(c echo.Context) error { defer sourceFile.Close() create := &store.Resource{ - ResourceName: shortuuid.New(), - CreatorID: userID, - Filename: file.Filename, - Type: file.Header.Get("Content-Type"), - Size: file.Size, + UID: shortuuid.New(), + CreatorID: userID, + Filename: file.Filename, + Type: file.Header.Get("Content-Type"), + Size: file.Size, } err = SaveResourceBlob(ctx, s.Store, create, sourceFile) if err != nil { @@ -371,7 +371,7 @@ func replacePathTemplate(path, filename string) string { func convertResourceFromStore(resource *store.Resource) *Resource { return &Resource{ ID: resource.ID, - Name: resource.ResourceName, + Name: resource.UID, CreatorID: resource.CreatorID, CreatedTs: resource.CreatedTs, UpdatedTs: resource.UpdatedTs, diff --git a/server/route/api/v1/user.go b/server/route/api/v1/user.go index c70ffb0f2099d..f613203cd7ec4 100644 --- a/server/route/api/v1/user.go +++ b/server/route/api/v1/user.go @@ -157,7 +157,7 @@ func (s *APIV1Service) CreateUser(c echo.Context) error { if err := userCreate.Validate(); err != nil { return echo.NewHTTPError(http.StatusBadRequest, "Invalid user create format").SetInternal(err) } - if !util.ResourceNameMatcher.MatchString(strings.ToLower(userCreate.Username)) { + if !util.UIDMatcher.MatchString(strings.ToLower(userCreate.Username)) { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid username %s", userCreate.Username)).SetInternal(err) } // Disallow host user to be created. @@ -377,7 +377,7 @@ func (s *APIV1Service) UpdateUser(c echo.Context) error { } } if request.Username != nil { - if !util.ResourceNameMatcher.MatchString(strings.ToLower(*request.Username)) { + if !util.UIDMatcher.MatchString(strings.ToLower(*request.Username)) { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid username %s", *request.Username)).SetInternal(err) } userUpdate.Username = request.Username diff --git a/server/route/api/v2/apidocs.swagger.md b/server/route/api/v2/apidocs.swagger.md index a486ebe3b58cd..ef6f955b2a56f 100644 --- a/server/route/api/v2/apidocs.swagger.md +++ b/server/route/api/v2/apidocs.swagger.md @@ -152,7 +152,7 @@ GetMemo gets a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name_1 | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name_1 | path | The name of the memo. Format: memos/{id} | Yes | string | ##### Responses @@ -252,7 +252,7 @@ GetUserMemosStats gets stats of memos for a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | query | name is the name of the user to get stats for. Format: users/{uid} | No | string | +| name | query | name is the name of the user to get stats for. Format: users/{id} | No | string | | timezone | query | timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | No | string | | filter | query | Same as ListMemosRequest.filter | No | string | @@ -314,8 +314,8 @@ UpdateMemo updates a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| memo.name | path | The name of the memo. Format: memos/{uid} | Yes | string | -| memo | body | | Yes | { **"resourceId"**: string, **"rowStatus"**: [apiv2RowStatus](#apiv2rowstatus), **"creator"**: string, **"createTime"**: dateTime, **"updateTime"**: dateTime, **"displayTime"**: dateTime, **"content"**: string, **"visibility"**: [v2Visibility](#v2visibility), **"pinned"**: boolean, **"parentId"**: integer, **"resources"**: [ [v2Resource](#v2resource) ], **"relations"**: [ [v2MemoRelation](#v2memorelation) ], **"reactions"**: [ [apiv2Reaction](#apiv2reaction) ] } | +| memo.name | path | The name of the memo. Format: memos/{id} id is the system generated id. | Yes | string | +| memo | body | | Yes | { **"uid"**: string, **"rowStatus"**: [apiv2RowStatus](#apiv2rowstatus), **"creator"**: string, **"createTime"**: dateTime, **"updateTime"**: dateTime, **"displayTime"**: dateTime, **"content"**: string, **"visibility"**: [v2Visibility](#v2visibility), **"pinned"**: boolean, **"parentId"**: integer, **"resources"**: [ [v2Resource](#v2resource) ], **"relations"**: [ [v2MemoRelation](#v2memorelation) ], **"reactions"**: [ [apiv2Reaction](#apiv2reaction) ] } | ##### Responses @@ -335,7 +335,7 @@ GetMemo gets a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name_1 | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name_1 | path | The name of the memo. Format: memos/{id} | Yes | string | ##### Responses @@ -373,7 +373,7 @@ DeleteMemo deletes a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name_2 | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name_2 | path | The name of the memo. Format: memos/{id} | Yes | string | ##### Responses @@ -393,7 +393,7 @@ ListMemoComments lists comments for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | ##### Responses @@ -411,7 +411,7 @@ CreateMemoComment creates a comment for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | | comment.content | query | | No | string | | comment.visibility | query | | No | string | @@ -433,7 +433,7 @@ ListMemoReactions lists reactions for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | ##### Responses @@ -451,9 +451,9 @@ UpsertMemoReaction upserts a reaction for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | | reaction.id | query | | No | integer | -| reaction.creator | query | The name of the creator. Format: users/{uid} | No | string | +| reaction.creator | query | The name of the creator. Format: users/{id} | No | string | | reaction.contentId | query | | No | string | | reaction.reactionType | query | | No | string | @@ -475,7 +475,7 @@ DeleteMemoReaction deletes a reaction for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | | reactionId | path | | Yes | integer | ##### Responses @@ -496,7 +496,7 @@ ListMemoRelations lists relations for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | ##### Responses @@ -514,7 +514,7 @@ SetMemoRelations sets relations for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | | body | body | | Yes | [MemoServiceSetMemoRelationsBody](#memoservicesetmemorelationsbody) | ##### Responses @@ -535,7 +535,7 @@ ListMemoResources lists resources for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | ##### Responses @@ -553,7 +553,7 @@ SetMemoResources sets resources for a memo. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the memo. Format: memos/{uid} | Yes | string | +| name | path | The name of the memo. Format: memos/{id} | Yes | string | | body | body | | Yes | [MemoServiceSetMemoResourcesBody](#memoservicesetmemoresourcesbody) | ##### Responses @@ -694,7 +694,7 @@ ListTags lists tags. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| user | query | The creator of tags. Format: users/{uid} | No | string | +| user | query | The creator of tags. Format: users/{id} | No | string | ##### Responses @@ -713,7 +713,7 @@ DeleteTag deletes a tag. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | | tag.name | query | | No | string | -| tag.creator | query | The creator of tags. Format: users/{uid} | No | string | +| tag.creator | query | The creator of tags. Format: users/{id} | No | string | ##### Responses @@ -751,7 +751,7 @@ GetTagSuggestions gets tag suggestions from the user's memos. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| user | query | The creator of tags. Format: users/{uid} | No | string | +| user | query | The creator of tags. Format: users/{id} | No | string | ##### Responses @@ -786,7 +786,7 @@ All related memos will be updated. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| user | query | The creator of tags. Format: users/{uid} | No | string | +| user | query | The creator of tags. Format: users/{id} | No | string | | oldName | query | | No | string | | newName | query | | No | string | @@ -863,7 +863,7 @@ GetUser gets a user by name. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the user. Format: users/{uid} | Yes | string | +| name | path | The name of the user. Format: users/{id} | Yes | string | ##### Responses @@ -881,7 +881,7 @@ DeleteUser deletes a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the user. Format: users/{uid} | Yes | string | +| name | path | The name of the user. Format: users/{id} | Yes | string | ##### Responses @@ -901,7 +901,7 @@ ListUserAccessTokens returns a list of access tokens for a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the user. Format: users/{uid} | Yes | string | +| name | path | The name of the user. Format: users/{id} | Yes | string | ##### Responses @@ -919,7 +919,7 @@ CreateUserAccessToken creates a new access token for a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the user. Format: users/{uid} | Yes | string | +| name | path | The name of the user. Format: users/{id} | Yes | string | | body | body | | Yes | [UserServiceCreateUserAccessTokenBody](#userservicecreateuseraccesstokenbody) | ##### Responses @@ -940,7 +940,7 @@ DeleteUserAccessToken deletes an access token for a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the user. Format: users/{uid} | Yes | string | +| name | path | The name of the user. Format: users/{id} | Yes | string | | accessToken | path | access_token is the access token to delete. | Yes | string | ##### Responses @@ -961,7 +961,7 @@ GetUserSetting gets the setting of a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| name | path | The name of the user. Format: users/{uid} | Yes | string | +| name | path | The name of the user. Format: users/{id} | Yes | string | ##### Responses @@ -981,7 +981,7 @@ UpdateUserSetting updates the setting of a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| setting.name | path | The name of the user. Format: users/{uid} | Yes | string | +| setting.name | path | The name of the user. Format: users/{id} | Yes | string | | setting | body | | Yes | { **"locale"**: string, **"appearance"**: string, **"memoVisibility"**: string, **"telegramUserId"**: string } | ##### Responses @@ -1002,7 +1002,7 @@ UpdateUser updates a user. | Name | Located in | Description | Required | Schema | | ---- | ---------- | ----------- | -------- | ------ | -| user.name | path | The name of the user. Format: users/{uid} | Yes | string | +| user.name | path | The name of the user. Format: users/{id} | Yes | string | | user | body | | Yes | { **"id"**: integer, **"role"**: [UserRole](#userrole), **"username"**: string, **"email"**: string, **"nickname"**: string, **"avatarUrl"**: string, **"description"**: string, **"password"**: string, **"rowStatus"**: [apiv2RowStatus](#apiv2rowstatus), **"createTime"**: dateTime, **"updateTime"**: dateTime } | ##### Responses @@ -1620,8 +1620,8 @@ GetActivity returns the activity with the given id. | Name | Type | Description | Required | | ---- | ---- | ----------- | -------- | -| name | string | | No | -| resourceId | string | | No | +| name | string | The name of the memo. Format: memos/{id} id is the system generated id. | No | +| uid | string | The user defined id of the memo. | No | | rowStatus | [apiv2RowStatus](#apiv2rowstatus) | | No | | creator | string | | No | | createTime | dateTime | | No | diff --git a/server/route/api/v2/apidocs.swagger.yaml b/server/route/api/v2/apidocs.swagger.yaml index afab175bcf029..46c4ca0350325 100644 --- a/server/route/api/v2/apidocs.swagger.yaml +++ b/server/route/api/v2/apidocs.swagger.yaml @@ -243,7 +243,7 @@ paths: - name: name description: |- name is the name of the user to get stats for. - Format: users/{uid} + Format: users/{id} in: query required: false type: string @@ -477,7 +477,7 @@ paths: - name: user description: |- The creator of tags. - Format: users/{uid} + Format: users/{id} in: query required: false type: string @@ -503,7 +503,7 @@ paths: - name: tag.creator description: |- The creator of tags. - Format: users/{uid} + Format: users/{id} in: query required: false type: string @@ -545,7 +545,7 @@ paths: - name: user description: |- The creator of tags. - Format: users/{uid} + Format: users/{id} in: query required: false type: string @@ -585,7 +585,7 @@ paths: - name: user description: |- The creator of tags. - Format: users/{uid} + Format: users/{id} in: query required: false type: string @@ -915,7 +915,8 @@ paths: - name: memo.name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} + id is the system generated id. in: path required: true type: string @@ -926,15 +927,16 @@ paths: schema: type: object properties: - resourceId: + uid: type: string + description: The user defined id of the memo. rowStatus: $ref: '#/definitions/apiv2RowStatus' creator: type: string title: |- The name of the creator. - Format: users/{uid} + Format: users/{id} createTime: type: string format: date-time @@ -991,7 +993,7 @@ paths: - name: name_1 description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1038,7 +1040,7 @@ paths: - name: name_2 description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1062,7 +1064,7 @@ paths: - name: name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1085,7 +1087,7 @@ paths: - name: name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1109,7 +1111,7 @@ paths: - name: name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1132,7 +1134,7 @@ paths: - name: name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1161,7 +1163,7 @@ paths: - name: name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1190,7 +1192,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1213,7 +1215,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1251,7 +1253,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1274,7 +1276,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1287,7 +1289,7 @@ paths: - name: reaction.creator description: |- The name of the creator. - Format: users/{uid} + Format: users/{id} in: query required: false type: string @@ -1333,7 +1335,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1362,7 +1364,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1385,7 +1387,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1414,7 +1416,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1437,7 +1439,7 @@ paths: - name: name description: |- The name of the memo. - Format: memos/{uid} + Format: memos/{id} in: path required: true type: string @@ -1466,7 +1468,7 @@ paths: - name: name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1490,7 +1492,7 @@ paths: - name: setting.name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1532,7 +1534,7 @@ paths: - name: user.name description: |- The name of the user. - Format: users/{uid} + Format: users/{id} in: path required: true type: string @@ -1656,7 +1658,7 @@ definitions: type: string title: |- The name of the creator. - Format: users/{uid} + Format: users/{id} contentId: type: string reactionType: @@ -1692,7 +1694,7 @@ definitions: type: string title: |- The name of the user. - Format: users/{uid} + Format: users/{id} locale: type: string description: The preferred locale of the user. @@ -2078,18 +2080,20 @@ definitions: properties: name: type: string - title: |- + description: |- The name of the memo. - Format: memos/{uid} - resourceId: + Format: memos/{id} + id is the system generated id. + uid: type: string + description: The user defined id of the memo. rowStatus: $ref: '#/definitions/apiv2RowStatus' creator: type: string title: |- The name of the creator. - Format: users/{uid} + Format: users/{id} createTime: type: string format: date-time @@ -2230,7 +2234,7 @@ definitions: type: string title: |- The creator of tags. - Format: users/{uid} + Format: users/{id} v2UpdateInboxResponse: type: object properties: @@ -2283,7 +2287,7 @@ definitions: type: string title: |- The name of the user. - Format: users/{uid} + Format: users/{id} id: type: integer format: int32 diff --git a/server/route/api/v2/auth_service.go b/server/route/api/v2/auth_service.go index dd1959e57a4d2..c97cc626c2d61 100644 --- a/server/route/api/v2/auth_service.go +++ b/server/route/api/v2/auth_service.go @@ -189,7 +189,7 @@ func (s *APIV2Service) SignUp(ctx context.Context, request *apiv2pb.SignUpReques Nickname: request.Username, PasswordHash: string(passwordHash), } - if !util.ResourceNameMatcher.MatchString(strings.ToLower(create.Username)) { + if !util.UIDMatcher.MatchString(strings.ToLower(create.Username)) { return nil, status.Errorf(codes.InvalidArgument, "invalid username: %s", create.Username) } diff --git a/server/route/api/v2/memo_service.go b/server/route/api/v2/memo_service.go index 18ab5ccb98354..225b5c9cacc44 100644 --- a/server/route/api/v2/memo_service.go +++ b/server/route/api/v2/memo_service.go @@ -44,10 +44,10 @@ func (s *APIV2Service) CreateMemo(ctx context.Context, request *apiv2pb.CreateMe } create := &store.Memo{ - ResourceName: shortuuid.New(), - CreatorID: user.ID, - Content: request.Content, - Visibility: convertVisibilityToStore(request.Visibility), + UID: shortuuid.New(), + CreatorID: user.ID, + Content: request.Content, + Visibility: convertVisibilityToStore(request.Visibility), } // Find disable public memos system setting. disablePublicMemosSystem, err := s.getDisablePublicMemosSystemSettingValue(ctx) @@ -231,9 +231,9 @@ func (s *APIV2Service) UpdateMemo(ctx context.Context, request *apiv2pb.UpdateMe for _, path := range request.UpdateMask.Paths { if path == "content" { update.Content = &request.Memo.Content - } else if path == "resource_name" { - update.ResourceName = &request.Memo.Name - if !util.ResourceNameMatcher.MatchString(*update.ResourceName) { + } else if path == "uid" { + update.UID = &request.Memo.Name + if !util.UIDMatcher.MatchString(*update.UID) { return nil, status.Errorf(codes.InvalidArgument, "invalid resource name") } } else if path == "visibility" { @@ -555,7 +555,7 @@ func (s *APIV2Service) convertMemoFromStore(ctx context.Context, memo *store.Mem return &apiv2pb.Memo{ Name: name, - ResourceId: memo.ResourceName, + Uid: memo.UID, RowStatus: convertRowStatusFromStore(memo.RowStatus), Creator: fmt.Sprintf("%s%d", UserNamePrefix, creator.ID), CreateTime: timestamppb.New(time.Unix(memo.CreatedTs, 0)), @@ -690,8 +690,8 @@ func (s *APIV2Service) buildMemoFindWithFilter(ctx context.Context, find *store. } find.CreatorID = &user.ID } - if filter.ResourceName != nil { - find.ResourceName = filter.ResourceName + if filter.UID != nil { + find.UID = filter.UID } if filter.RowStatus != nil { find.RowStatus = filter.RowStatus @@ -728,7 +728,7 @@ var SearchMemosFilterCELAttributes = []cel.EnvOption{ cel.Variable("display_time_before", cel.IntType), cel.Variable("display_time_after", cel.IntType), cel.Variable("creator", cel.StringType), - cel.Variable("resource_name", cel.StringType), + cel.Variable("uid", cel.StringType), cel.Variable("row_status", cel.StringType), } @@ -739,7 +739,7 @@ type SearchMemosFilter struct { DisplayTimeBefore *int64 DisplayTimeAfter *int64 Creator *string - ResourceName *string + UID *string RowStatus *store.RowStatus } @@ -792,9 +792,9 @@ func findSearchMemosField(callExpr *expr.Expr_Call, filter *SearchMemosFilter) { } else if idExpr.Name == "creator" { creator := callExpr.Args[1].GetConstExpr().GetStringValue() filter.Creator = &creator - } else if idExpr.Name == "resource_name" { - resourceName := callExpr.Args[1].GetConstExpr().GetStringValue() - filter.ResourceName = &resourceName + } else if idExpr.Name == "uid" { + uid := callExpr.Args[1].GetConstExpr().GetStringValue() + filter.UID = &uid } else if idExpr.Name == "row_status" { rowStatus := store.RowStatus(callExpr.Args[1].GetConstExpr().GetStringValue()) filter.RowStatus = &rowStatus diff --git a/server/route/api/v2/resource_service.go b/server/route/api/v2/resource_service.go index 88c25690f59db..12b01ef50dd7d 100644 --- a/server/route/api/v2/resource_service.go +++ b/server/route/api/v2/resource_service.go @@ -31,7 +31,7 @@ func (s *APIV2Service) CreateResource(ctx context.Context, request *apiv2pb.Crea } create := &store.Resource{ - ResourceName: shortuuid.New(), + UID: shortuuid.New(), CreatorID: user.ID, Filename: request.Filename, ExternalLink: request.ExternalLink, @@ -87,7 +87,7 @@ func (s *APIV2Service) GetResource(ctx context.Context, request *apiv2pb.GetReso func (s *APIV2Service) GetResourceByName(ctx context.Context, request *apiv2pb.GetResourceByNameRequest) (*apiv2pb.GetResourceByNameResponse, error) { resource, err := s.Store.GetResource(ctx, &store.FindResource{ - ResourceName: &request.Name, + UID: &request.Name, }) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get resource: %v", err) @@ -165,7 +165,7 @@ func (s *APIV2Service) convertResourceFromStore(ctx context.Context, resource *s return &apiv2pb.Resource{ Id: resource.ID, - Name: resource.ResourceName, + Name: resource.UID, CreateTime: timestamppb.New(time.Unix(resource.CreatedTs, 0)), Filename: resource.Filename, ExternalLink: resource.ExternalLink, diff --git a/server/route/api/v2/user_service.go b/server/route/api/v2/user_service.go index 0e5ab7ca58e36..da5e71e7aa8b2 100644 --- a/server/route/api/v2/user_service.go +++ b/server/route/api/v2/user_service.go @@ -105,7 +105,7 @@ func (s *APIV2Service) CreateUser(ctx context.Context, request *apiv2pb.CreateUs if currentUser.Role != store.RoleHost { return nil, status.Errorf(codes.PermissionDenied, "permission denied") } - if !util.ResourceNameMatcher.MatchString(strings.ToLower(request.User.Username)) { + if !util.UIDMatcher.MatchString(strings.ToLower(request.User.Username)) { return nil, status.Errorf(codes.InvalidArgument, "invalid username: %s", request.User.Username) } passwordHash, err := bcrypt.GenerateFromPassword([]byte(request.User.Password), bcrypt.DefaultCost) @@ -161,7 +161,7 @@ func (s *APIV2Service) UpdateUser(ctx context.Context, request *apiv2pb.UpdateUs } for _, field := range request.UpdateMask.Paths { if field == "username" { - if !util.ResourceNameMatcher.MatchString(strings.ToLower(request.User.Username)) { + if !util.UIDMatcher.MatchString(strings.ToLower(request.User.Username)) { return nil, status.Errorf(codes.InvalidArgument, "invalid username: %s", request.User.Username) } update.Username = &request.User.Username diff --git a/server/route/frontend/frontend.go b/server/route/frontend/frontend.go index 02c56860d504c..ecc5607d30c21 100644 --- a/server/route/frontend/frontend.go +++ b/server/route/frontend/frontend.go @@ -53,11 +53,11 @@ func (s *FrontendService) Serve(ctx context.Context, e *echo.Echo) { func (s *FrontendService) registerRoutes(e *echo.Echo) { rawIndexHTML := getRawIndexHTML() - e.GET("/m/:name", func(c echo.Context) error { + e.GET("/m/:uid", func(c echo.Context) error { ctx := c.Request().Context() - resourceName := c.Param("name") + uid := c.Param("uid") memo, err := s.Store.GetMemo(ctx, &store.FindMemo{ - ResourceName: &resourceName, + UID: &uid, }) if err != nil { return c.HTML(http.StatusOK, rawIndexHTML) @@ -108,7 +108,7 @@ Sitemap: %s/sitemap.xml`, instanceURL, instanceURL) return err } for _, memo := range memoList { - urlsets = append(urlsets, fmt.Sprintf(`<url><loc>%s</loc></url>`, fmt.Sprintf("%s/m/%s", instanceURL, memo.ResourceName))) + urlsets = append(urlsets, fmt.Sprintf(`<url><loc>%s</loc></url>`, fmt.Sprintf("%s/m/%s", instanceURL, memo.UID))) } sitemap := fmt.Sprintf(`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">%s</urlset>`, strings.Join(urlsets, "\n")) return c.XMLBlob(http.StatusOK, []byte(sitemap)) diff --git a/server/route/resource/resource.go b/server/route/resource/resource.go index 7e977f904f660..9c83a45387623 100644 --- a/server/route/resource/resource.go +++ b/server/route/resource/resource.go @@ -42,22 +42,22 @@ func NewResourceService(profile *profile.Profile, store *store.Store) *ResourceS } func (s *ResourceService) RegisterRoutes(g *echo.Group) { - g.GET("/r/:resourceName", s.streamResource) - g.GET("/r/:resourceName/*", s.streamResource) + g.GET("/r/:uid", s.streamResource) + g.GET("/r/:uid/*", s.streamResource) } func (s *ResourceService) streamResource(c echo.Context) error { ctx := c.Request().Context() - resourceName := c.Param("resourceName") + uid := c.Param("uid") resource, err := s.Store.GetResource(ctx, &store.FindResource{ - ResourceName: &resourceName, - GetBlob: true, + UID: &uid, + GetBlob: true, }) if err != nil { - return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find resource by id: %s", resourceName)).SetInternal(err) + return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to find resource by uid: %s", uid)).SetInternal(err) } if resource == nil { - return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("Resource not found: %s", resourceName)) + return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("Resource not found: %s", uid)) } // Check the related memo visibility. if resource.MemoID != nil { diff --git a/server/route/rss/rss.go b/server/route/rss/rss.go index 9b1745ee35b4b..adebc0c03b035 100644 --- a/server/route/rss/rss.go +++ b/server/route/rss/rss.go @@ -112,7 +112,7 @@ func (s *RSSService) generateRSSFromMemoList(ctx context.Context, memoList []*st } feed.Items[i] = &feeds.Item{ Title: getRSSItemTitle(memo.Content), - Link: &feeds.Link{Href: baseURL + "/m/" + memo.ResourceName}, + Link: &feeds.Link{Href: baseURL + "/m/" + memo.UID}, Description: description, Created: time.Unix(memo.CreatedTs, 0), } @@ -128,7 +128,7 @@ func (s *RSSService) generateRSSFromMemoList(ctx context.Context, memoList []*st if resource.ExternalLink != "" { enclosure.Url = resource.ExternalLink } else { - enclosure.Url = baseURL + "/o/r/" + resource.ResourceName + enclosure.Url = baseURL + "/o/r/" + resource.UID } enclosure.Length = strconv.Itoa(int(resource.Size)) enclosure.Type = resource.Type diff --git a/store/db/mysql/memo.go b/store/db/mysql/memo.go index 5b2e053554277..4ed837d4ed301 100644 --- a/store/db/mysql/memo.go +++ b/store/db/mysql/memo.go @@ -12,9 +12,9 @@ import ( ) func (d *DB) CreateMemo(ctx context.Context, create *store.Memo) (*store.Memo, error) { - fields := []string{"`resource_name`", "`creator_id`", "`content`", "`visibility`"} + fields := []string{"`uid`", "`creator_id`", "`content`", "`visibility`"} placeholder := []string{"?", "?", "?", "?"} - args := []any{create.ResourceName, create.CreatorID, create.Content, create.Visibility} + args := []any{create.UID, create.CreatorID, create.Content, create.Visibility} stmt := "INSERT INTO `memo` (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ")" result, err := d.db.ExecContext(ctx, stmt, args...) @@ -43,8 +43,8 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo if v := find.ID; v != nil { where, args = append(where, "`memo`.`id` = ?"), append(args, *v) } - if v := find.ResourceName; v != nil { - where, args = append(where, "`memo`.`resource_name` = ?"), append(args, *v) + if v := find.UID; v != nil { + where, args = append(where, "`memo`.`uid` = ?"), append(args, *v) } if v := find.CreatorID; v != nil { where, args = append(where, "`memo`.`creator_id` = ?"), append(args, *v) @@ -94,7 +94,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo fields := []string{ "`memo`.`id` AS `id`", - "`memo`.`resource_name` AS `resource_name`", + "`memo`.`uid` AS `uid`", "`memo`.`creator_id` AS `creator_id`", "UNIX_TIMESTAMP(`memo`.`created_ts`) AS `created_ts`", "UNIX_TIMESTAMP(`memo`.`updated_ts`) AS `updated_ts`", @@ -126,7 +126,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo var memo store.Memo dests := []any{ &memo.ID, - &memo.ResourceName, + &memo.UID, &memo.CreatorID, &memo.CreatedTs, &memo.UpdatedTs, @@ -166,8 +166,8 @@ func (d *DB) GetMemo(ctx context.Context, find *store.FindMemo) (*store.Memo, er func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error { set, args := []string{}, []any{} - if v := update.ResourceName; v != nil { - set, args = append(set, "`resource_name` = ?"), append(args, *v) + if v := update.UID; v != nil { + set, args = append(set, "`uid` = ?"), append(args, *v) } if v := update.CreatedTs; v != nil { set, args = append(set, "`created_ts` = FROM_UNIXTIME(?)"), append(args, *v) diff --git a/store/db/mysql/migration/dev/LATEST__SCHEMA.sql b/store/db/mysql/migration/dev/LATEST__SCHEMA.sql index 770fc5560a7cd..c25caa06ab435 100644 --- a/store/db/mysql/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/mysql/migration/dev/LATEST__SCHEMA.sql @@ -37,7 +37,7 @@ CREATE TABLE `user_setting` ( -- memo CREATE TABLE `memo` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - `resource_name` VARCHAR(256) NOT NULL UNIQUE, + `uid` VARCHAR(256) NOT NULL UNIQUE, `creator_id` INT NOT NULL, `created_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, @@ -65,7 +65,7 @@ CREATE TABLE `memo_relation` ( -- resource CREATE TABLE `resource` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, - `resource_name` VARCHAR(256) NOT NULL UNIQUE, + `uid` VARCHAR(256) NOT NULL UNIQUE, `creator_id` INT NOT NULL, `created_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, diff --git a/store/db/mysql/resource.go b/store/db/mysql/resource.go index e2c570eae03d2..fffb7827f8793 100644 --- a/store/db/mysql/resource.go +++ b/store/db/mysql/resource.go @@ -10,9 +10,9 @@ import ( ) func (d *DB) CreateResource(ctx context.Context, create *store.Resource) (*store.Resource, error) { - fields := []string{"`resource_name`", "`filename`", "`blob`", "`external_link`", "`type`", "`size`", "`creator_id`", "`internal_path`", "`memo_id`"} + fields := []string{"`uid`", "`filename`", "`blob`", "`external_link`", "`type`", "`size`", "`creator_id`", "`internal_path`", "`memo_id`"} placeholder := []string{"?", "?", "?", "?", "?", "?", "?", "?", "?"} - args := []any{create.ResourceName, create.Filename, create.Blob, create.ExternalLink, create.Type, create.Size, create.CreatorID, create.InternalPath, create.MemoID} + args := []any{create.UID, create.Filename, create.Blob, create.ExternalLink, create.Type, create.Size, create.CreatorID, create.InternalPath, create.MemoID} stmt := "INSERT INTO `resource` (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ")" result, err := d.db.ExecContext(ctx, stmt, args...) @@ -35,8 +35,8 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st if v := find.ID; v != nil { where, args = append(where, "`id` = ?"), append(args, *v) } - if v := find.ResourceName; v != nil { - where, args = append(where, "`resource_name` = ?"), append(args, *v) + if v := find.UID; v != nil { + where, args = append(where, "`uid` = ?"), append(args, *v) } if v := find.CreatorID; v != nil { where, args = append(where, "`creator_id` = ?"), append(args, *v) @@ -51,7 +51,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st where = append(where, "`memo_id` IS NOT NULL") } - fields := []string{"`id`", "`resource_name`", "`filename`", "`external_link`", "`type`", "`size`", "`creator_id`", "UNIX_TIMESTAMP(`created_ts`)", "UNIX_TIMESTAMP(`updated_ts`)", "`internal_path`", "`memo_id`"} + fields := []string{"`id`", "`uid`", "`filename`", "`external_link`", "`type`", "`size`", "`creator_id`", "UNIX_TIMESTAMP(`created_ts`)", "UNIX_TIMESTAMP(`updated_ts`)", "`internal_path`", "`memo_id`"} if find.GetBlob { fields = append(fields, "`blob`") } @@ -76,7 +76,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st var memoID sql.NullInt32 dests := []any{ &resource.ID, - &resource.ResourceName, + &resource.UID, &resource.Filename, &resource.ExternalLink, &resource.Type, @@ -121,8 +121,8 @@ func (d *DB) GetResource(ctx context.Context, find *store.FindResource) (*store. func (d *DB) UpdateResource(ctx context.Context, update *store.UpdateResource) (*store.Resource, error) { set, args := []string{}, []any{} - if v := update.ResourceName; v != nil { - set, args = append(set, "`resource_name` = ?"), append(args, *v) + if v := update.UID; v != nil { + set, args = append(set, "`uid` = ?"), append(args, *v) } if v := update.UpdatedTs; v != nil { set, args = append(set, "`updated_ts` = FROM_UNIXTIME(?)"), append(args, *v) diff --git a/store/db/postgres/memo.go b/store/db/postgres/memo.go index 7721912268936..bfae66ebe666b 100644 --- a/store/db/postgres/memo.go +++ b/store/db/postgres/memo.go @@ -12,8 +12,8 @@ import ( ) func (d *DB) CreateMemo(ctx context.Context, create *store.Memo) (*store.Memo, error) { - fields := []string{"resource_name", "creator_id", "content", "visibility"} - args := []any{create.ResourceName, create.CreatorID, create.Content, create.Visibility} + fields := []string{"uid", "creator_id", "content", "visibility"} + args := []any{create.UID, create.CreatorID, create.Content, create.Visibility} stmt := "INSERT INTO memo (" + strings.Join(fields, ", ") + ") VALUES (" + placeholders(len(args)) + ") RETURNING id, created_ts, updated_ts, row_status" if err := d.db.QueryRowContext(ctx, stmt, args...).Scan( @@ -34,8 +34,8 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo if v := find.ID; v != nil { where, args = append(where, "memo.id = "+placeholder(len(args)+1)), append(args, *v) } - if v := find.ResourceName; v != nil { - where, args = append(where, "memo.resource_name = "+placeholder(len(args)+1)), append(args, *v) + if v := find.UID; v != nil { + where, args = append(where, "memo.uid = "+placeholder(len(args)+1)), append(args, *v) } if v := find.CreatorID; v != nil { where, args = append(where, "memo.creator_id = "+placeholder(len(args)+1)), append(args, *v) @@ -85,7 +85,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo fields := []string{ `memo.id AS id`, - `memo.resource_name AS resource_name`, + `memo.uid AS uid`, `memo.creator_id AS creator_id`, `memo.created_ts AS created_ts`, `memo.updated_ts AS updated_ts`, @@ -122,7 +122,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo var memo store.Memo dests := []any{ &memo.ID, - &memo.ResourceName, + &memo.UID, &memo.CreatorID, &memo.CreatedTs, &memo.UpdatedTs, @@ -162,8 +162,8 @@ func (d *DB) GetMemo(ctx context.Context, find *store.FindMemo) (*store.Memo, er func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error { set, args := []string{}, []any{} - if v := update.ResourceName; v != nil { - set, args = append(set, "resource_name = "+placeholder(len(args)+1)), append(args, *v) + if v := update.UID; v != nil { + set, args = append(set, "uid = "+placeholder(len(args)+1)), append(args, *v) } if v := update.CreatedTs; v != nil { set, args = append(set, "created_ts = "+placeholder(len(args)+1)), append(args, *v) diff --git a/store/db/postgres/migration/dev/LATEST__SCHEMA.sql b/store/db/postgres/migration/dev/LATEST__SCHEMA.sql index 3d611c2b77044..06c422b9f3133 100644 --- a/store/db/postgres/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/postgres/migration/dev/LATEST__SCHEMA.sql @@ -37,7 +37,7 @@ CREATE TABLE user_setting ( -- memo CREATE TABLE memo ( id SERIAL PRIMARY KEY, - resource_name TEXT NOT NULL UNIQUE, + uid TEXT NOT NULL UNIQUE, creator_id INTEGER NOT NULL, created_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()), updated_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()), @@ -65,7 +65,7 @@ CREATE TABLE memo_relation ( -- resource CREATE TABLE resource ( id SERIAL PRIMARY KEY, - resource_name TEXT NOT NULL UNIQUE, + uid TEXT NOT NULL UNIQUE, creator_id INTEGER NOT NULL, created_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()), updated_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()), diff --git a/store/db/postgres/resource.go b/store/db/postgres/resource.go index 3ced746156bcc..63e7e267f92a2 100644 --- a/store/db/postgres/resource.go +++ b/store/db/postgres/resource.go @@ -10,8 +10,8 @@ import ( ) func (d *DB) CreateResource(ctx context.Context, create *store.Resource) (*store.Resource, error) { - fields := []string{"resource_name", "filename", "blob", "external_link", "type", "size", "creator_id", "internal_path", "memo_id"} - args := []any{create.ResourceName, create.Filename, create.Blob, create.ExternalLink, create.Type, create.Size, create.CreatorID, create.InternalPath, create.MemoID} + fields := []string{"uid", "filename", "blob", "external_link", "type", "size", "creator_id", "internal_path", "memo_id"} + args := []any{create.UID, create.Filename, create.Blob, create.ExternalLink, create.Type, create.Size, create.CreatorID, create.InternalPath, create.MemoID} stmt := "INSERT INTO resource (" + strings.Join(fields, ", ") + ") VALUES (" + placeholders(len(args)) + ") RETURNING id, created_ts, updated_ts" if err := d.db.QueryRowContext(ctx, stmt, args...).Scan(&create.ID, &create.CreatedTs, &create.UpdatedTs); err != nil { @@ -26,8 +26,8 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st if v := find.ID; v != nil { where, args = append(where, "id = "+placeholder(len(args)+1)), append(args, *v) } - if v := find.ResourceName; v != nil { - where, args = append(where, "resource_name = "+placeholder(len(args)+1)), append(args, *v) + if v := find.UID; v != nil { + where, args = append(where, "uid = "+placeholder(len(args)+1)), append(args, *v) } if v := find.CreatorID; v != nil { where, args = append(where, "creator_id = "+placeholder(len(args)+1)), append(args, *v) @@ -42,7 +42,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st where = append(where, "memo_id IS NOT NULL") } - fields := []string{"id", "resource_name", "filename", "external_link", "type", "size", "creator_id", "created_ts", "updated_ts", "internal_path", "memo_id"} + fields := []string{"id", "uid", "filename", "external_link", "type", "size", "creator_id", "created_ts", "updated_ts", "internal_path", "memo_id"} if find.GetBlob { fields = append(fields, "blob") } @@ -73,7 +73,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st var memoID sql.NullInt32 dests := []any{ &resource.ID, - &resource.ResourceName, + &resource.UID, &resource.Filename, &resource.ExternalLink, &resource.Type, @@ -106,8 +106,8 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st func (d *DB) UpdateResource(ctx context.Context, update *store.UpdateResource) (*store.Resource, error) { set, args := []string{}, []any{} - if v := update.ResourceName; v != nil { - set, args = append(set, "resource_name = "+placeholder(len(args)+1)), append(args, *v) + if v := update.UID; v != nil { + set, args = append(set, "uid = "+placeholder(len(args)+1)), append(args, *v) } if v := update.UpdatedTs; v != nil { set, args = append(set, "updated_ts = "+placeholder(len(args)+1)), append(args, *v) @@ -128,13 +128,13 @@ func (d *DB) UpdateResource(ctx context.Context, update *store.UpdateResource) ( set, args = append(set, "blob = "+placeholder(len(args)+1)), append(args, v) } - fields := []string{"id", "resource_name", "filename", "external_link", "type", "size", "creator_id", "created_ts", "updated_ts", "internal_path"} + fields := []string{"id", "uid", "filename", "external_link", "type", "size", "creator_id", "created_ts", "updated_ts", "internal_path"} stmt := `UPDATE resource SET ` + strings.Join(set, ", ") + ` WHERE id = ` + placeholder(len(args)+1) + ` RETURNING ` + strings.Join(fields, ", ") args = append(args, update.ID) resource := store.Resource{} dests := []any{ &resource.ID, - &resource.ResourceName, + &resource.UID, &resource.Filename, &resource.ExternalLink, &resource.Type, diff --git a/store/db/sqlite/memo.go b/store/db/sqlite/memo.go index 2257a0e583b8d..38b633184b98d 100644 --- a/store/db/sqlite/memo.go +++ b/store/db/sqlite/memo.go @@ -10,9 +10,9 @@ import ( ) func (d *DB) CreateMemo(ctx context.Context, create *store.Memo) (*store.Memo, error) { - fields := []string{"`resource_name`", "`creator_id`", "`content`", "`visibility`"} + fields := []string{"`uid`", "`creator_id`", "`content`", "`visibility`"} placeholder := []string{"?", "?", "?", "?"} - args := []any{create.ResourceName, create.CreatorID, create.Content, create.Visibility} + args := []any{create.UID, create.CreatorID, create.Content, create.Visibility} stmt := "INSERT INTO `memo` (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ") RETURNING `id`, `created_ts`, `updated_ts`, `row_status`" if err := d.db.QueryRowContext(ctx, stmt, args...).Scan( @@ -33,8 +33,8 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo if v := find.ID; v != nil { where, args = append(where, "`memo`.`id` = ?"), append(args, *v) } - if v := find.ResourceName; v != nil { - where, args = append(where, "`memo`.`resource_name` = ?"), append(args, *v) + if v := find.UID; v != nil { + where, args = append(where, "`memo`.`uid` = ?"), append(args, *v) } if v := find.CreatorID; v != nil { where, args = append(where, "`memo`.`creator_id` = ?"), append(args, *v) @@ -84,7 +84,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo fields := []string{ "`memo`.`id` AS `id`", - "`memo`.`resource_name` AS `resource_name`", + "`memo`.`uid` AS `uid`", "`memo`.`creator_id` AS `creator_id`", "`memo`.`created_ts` AS `created_ts`", "`memo`.`updated_ts` AS `updated_ts`", @@ -120,7 +120,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo var memo store.Memo dests := []any{ &memo.ID, - &memo.ResourceName, + &memo.UID, &memo.CreatorID, &memo.CreatedTs, &memo.UpdatedTs, @@ -147,8 +147,8 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error { set, args := []string{}, []any{} - if v := update.ResourceName; v != nil { - set, args = append(set, "`resource_name` = ?"), append(args, *v) + if v := update.UID; v != nil { + set, args = append(set, "`uid` = ?"), append(args, *v) } if v := update.CreatedTs; v != nil { set, args = append(set, "`created_ts` = ?"), append(args, *v) diff --git a/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql b/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql index f1114df7ddb63..def1d7dcc8ece 100644 --- a/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/sqlite/migration/dev/LATEST__SCHEMA.sql @@ -40,7 +40,7 @@ CREATE TABLE user_setting ( -- memo CREATE TABLE memo ( id INTEGER PRIMARY KEY AUTOINCREMENT, - resource_name TEXT NOT NULL UNIQUE, + uid TEXT NOT NULL UNIQUE, creator_id INTEGER NOT NULL, created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), @@ -72,7 +72,7 @@ CREATE TABLE memo_relation ( -- resource CREATE TABLE resource ( id INTEGER PRIMARY KEY AUTOINCREMENT, - resource_name TEXT NOT NULL UNIQUE, + uid TEXT NOT NULL UNIQUE, creator_id INTEGER NOT NULL, created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), diff --git a/store/db/sqlite/resource.go b/store/db/sqlite/resource.go index bb0d6ee78d16a..c0a5b973b4fd2 100644 --- a/store/db/sqlite/resource.go +++ b/store/db/sqlite/resource.go @@ -10,9 +10,9 @@ import ( ) func (d *DB) CreateResource(ctx context.Context, create *store.Resource) (*store.Resource, error) { - fields := []string{"`resource_name`", "`filename`", "`blob`", "`external_link`", "`type`", "`size`", "`creator_id`", "`internal_path`", "`memo_id`"} + fields := []string{"`uid`", "`filename`", "`blob`", "`external_link`", "`type`", "`size`", "`creator_id`", "`internal_path`", "`memo_id`"} placeholder := []string{"?", "?", "?", "?", "?", "?", "?", "?", "?"} - args := []any{create.ResourceName, create.Filename, create.Blob, create.ExternalLink, create.Type, create.Size, create.CreatorID, create.InternalPath, create.MemoID} + args := []any{create.UID, create.Filename, create.Blob, create.ExternalLink, create.Type, create.Size, create.CreatorID, create.InternalPath, create.MemoID} stmt := "INSERT INTO `resource` (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ") RETURNING `id`, `created_ts`, `updated_ts`" if err := d.db.QueryRowContext(ctx, stmt, args...).Scan(&create.ID, &create.CreatedTs, &create.UpdatedTs); err != nil { @@ -28,8 +28,8 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st if v := find.ID; v != nil { where, args = append(where, "`id` = ?"), append(args, *v) } - if v := find.ResourceName; v != nil { - where, args = append(where, "`resource_name` = ?"), append(args, *v) + if v := find.UID; v != nil { + where, args = append(where, "`uid` = ?"), append(args, *v) } if v := find.CreatorID; v != nil { where, args = append(where, "`creator_id` = ?"), append(args, *v) @@ -44,7 +44,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st where = append(where, "`memo_id` IS NOT NULL") } - fields := []string{"`id`", "`resource_name`", "`filename`", "`external_link`", "`type`", "`size`", "`creator_id`", "`created_ts`", "`updated_ts`", "`internal_path`", "`memo_id`"} + fields := []string{"`id`", "`uid`", "`filename`", "`external_link`", "`type`", "`size`", "`creator_id`", "`created_ts`", "`updated_ts`", "`internal_path`", "`memo_id`"} if find.GetBlob { fields = append(fields, "`blob`") } @@ -69,7 +69,7 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st var memoID sql.NullInt32 dests := []any{ &resource.ID, - &resource.ResourceName, + &resource.UID, &resource.Filename, &resource.ExternalLink, &resource.Type, @@ -102,8 +102,8 @@ func (d *DB) ListResources(ctx context.Context, find *store.FindResource) ([]*st func (d *DB) UpdateResource(ctx context.Context, update *store.UpdateResource) (*store.Resource, error) { set, args := []string{}, []any{} - if v := update.ResourceName; v != nil { - set, args = append(set, "`resource_name` = ?"), append(args, *v) + if v := update.UID; v != nil { + set, args = append(set, "`uid` = ?"), append(args, *v) } if v := update.UpdatedTs; v != nil { set, args = append(set, "`updated_ts` = ?"), append(args, *v) @@ -125,12 +125,12 @@ func (d *DB) UpdateResource(ctx context.Context, update *store.UpdateResource) ( } args = append(args, update.ID) - fields := []string{"`id`", "`resource_name`", "`filename`", "`external_link`", "`type`", "`size`", "`creator_id`", "`created_ts`", "`updated_ts`", "`internal_path`"} + fields := []string{"`id`", "`uid`", "`filename`", "`external_link`", "`type`", "`size`", "`creator_id`", "`created_ts`", "`updated_ts`", "`internal_path`"} stmt := "UPDATE `resource` SET " + strings.Join(set, ", ") + " WHERE `id` = ? RETURNING " + strings.Join(fields, ", ") resource := store.Resource{} dests := []any{ &resource.ID, - &resource.ResourceName, + &resource.UID, &resource.Filename, &resource.ExternalLink, &resource.Type, diff --git a/store/db/sqlite/seed/10002__memo.sql b/store/db/sqlite/seed/10002__memo.sql index f905eed4cbe02..ec05c6781e315 100644 --- a/store/db/sqlite/seed/10002__memo.sql +++ b/store/db/sqlite/seed/10002__memo.sql @@ -1,7 +1,7 @@ INSERT INTO memo ( `id`, - `resource_name`, + `uid`, `content`, `creator_id` ) @@ -16,7 +16,7 @@ VALUES INSERT INTO memo ( `id`, - `resource_name`, + `uid`, `content`, `creator_id`, `visibility` @@ -36,7 +36,7 @@ VALUES INSERT INTO memo ( `id`, - `resource_name`, + `uid`, `content`, `creator_id`, `visibility` @@ -54,7 +54,7 @@ VALUES INSERT INTO memo ( `id`, - `resource_name`, + `uid`, `content`, `creator_id`, `visibility` @@ -74,7 +74,7 @@ VALUES INSERT INTO memo ( `id`, - `resource_name`, + `uid`, `content`, `creator_id`, `visibility` diff --git a/store/db/sqlite/seed/10006__resource.sql b/store/db/sqlite/seed/10006__resource.sql index a810b75ffc531..255838f1bff07 100644 --- a/store/db/sqlite/seed/10006__resource.sql +++ b/store/db/sqlite/seed/10006__resource.sql @@ -1,4 +1,4 @@ INSERT INTO - resource (`resource_name`, `creator_id`, `filename`, `external_link`, `type`, `memo_id`) + resource (`uid`, `creator_id`, `filename`, `external_link`, `type`, `memo_id`) VALUES ("Pw2awZvxxLK4sPRtHmYuS7", 101, 'slash-demo.png', 'https://github.com/yourselfhosted/slash/blob/main/docs/assets/demo.png?raw=true', 'image/png', 3); diff --git a/store/memo.go b/store/memo.go index 4d0953ab588ff..77c6985b8495f 100644 --- a/store/memo.go +++ b/store/memo.go @@ -32,8 +32,10 @@ func (v Visibility) String() string { } type Memo struct { - ID int32 - ResourceName string + // ID is the system generated unique identifier for the memo. + ID int32 + // UID is the user defined unique identifier for the memo. + UID string // Standard fields RowStatus RowStatus @@ -51,8 +53,8 @@ type Memo struct { } type FindMemo struct { - ID *int32 - ResourceName *string + ID *int32 + UID *string // Standard fields RowStatus *RowStatus @@ -76,13 +78,13 @@ type FindMemo struct { } type UpdateMemo struct { - ID int32 - ResourceName *string - CreatedTs *int64 - UpdatedTs *int64 - RowStatus *RowStatus - Content *string - Visibility *Visibility + ID int32 + UID *string + CreatedTs *int64 + UpdatedTs *int64 + RowStatus *RowStatus + Content *string + Visibility *Visibility } type DeleteMemo struct { @@ -90,8 +92,8 @@ type DeleteMemo struct { } func (s *Store) CreateMemo(ctx context.Context, create *Memo) (*Memo, error) { - if !util.ResourceNameMatcher.MatchString(create.ResourceName) { - return nil, errors.New("resource name is invalid") + if !util.UIDMatcher.MatchString(create.UID) { + return nil, errors.New("invalid uid") } return s.driver.CreateMemo(ctx, create) } @@ -114,8 +116,8 @@ func (s *Store) GetMemo(ctx context.Context, find *FindMemo) (*Memo, error) { } func (s *Store) UpdateMemo(ctx context.Context, update *UpdateMemo) error { - if update.ResourceName != nil && !util.ResourceNameMatcher.MatchString(*update.ResourceName) { - return errors.New("resource name is invalid") + if update.UID != nil && !util.UIDMatcher.MatchString(*update.UID) { + return errors.New("invalid uid") } return s.driver.UpdateMemo(ctx, update) } diff --git a/store/resource.go b/store/resource.go index fae1cd1b5b970..02cc9751906cf 100644 --- a/store/resource.go +++ b/store/resource.go @@ -17,8 +17,10 @@ const ( ) type Resource struct { - ID int32 - ResourceName string + // ID is the system generated unique identifier for the resource. + ID int32 + // UID is the user defined unique identifier for the resource. + UID string // Standard fields CreatorID int32 @@ -38,7 +40,7 @@ type Resource struct { type FindResource struct { GetBlob bool ID *int32 - ResourceName *string + UID *string CreatorID *int32 Filename *string MemoID *int32 @@ -49,7 +51,7 @@ type FindResource struct { type UpdateResource struct { ID int32 - ResourceName *string + UID *string UpdatedTs *int64 Filename *string InternalPath *string @@ -64,8 +66,8 @@ type DeleteResource struct { } func (s *Store) CreateResource(ctx context.Context, create *Resource) (*Resource, error) { - if !util.ResourceNameMatcher.MatchString(create.ResourceName) { - return nil, errors.New("invalid resource name") + if !util.UIDMatcher.MatchString(create.UID) { + return nil, errors.New("invalid uid") } return s.driver.CreateResource(ctx, create) } @@ -88,8 +90,8 @@ func (s *Store) GetResource(ctx context.Context, find *FindResource) (*Resource, } func (s *Store) UpdateResource(ctx context.Context, update *UpdateResource) (*Resource, error) { - if update.ResourceName != nil && !util.ResourceNameMatcher.MatchString(*update.ResourceName) { - return nil, errors.New("invalid resource name") + if update.UID != nil && !util.UIDMatcher.MatchString(*update.UID) { + return nil, errors.New("invalid uid") } return s.driver.UpdateResource(ctx, update) } diff --git a/test/store/memo_organizer_test.go b/test/store/memo_organizer_test.go index 4243a01a55d2b..8d942c787fd7d 100644 --- a/test/store/memo_organizer_test.go +++ b/test/store/memo_organizer_test.go @@ -15,10 +15,10 @@ func TestMemoOrganizerStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - ResourceName: "main-memo", - CreatorID: user.ID, - Content: "main memo content", - Visibility: store.Public, + UID: "main-memo", + CreatorID: user.ID, + Content: "main memo content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err) diff --git a/test/store/memo_relation_test.go b/test/store/memo_relation_test.go index bf825608bf96f..56565bf89515a 100644 --- a/test/store/memo_relation_test.go +++ b/test/store/memo_relation_test.go @@ -15,28 +15,28 @@ func TestMemoRelationStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - ResourceName: "main-memo", - CreatorID: user.ID, - Content: "main memo content", - Visibility: store.Public, + UID: "main-memo", + CreatorID: user.ID, + Content: "main memo content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err) require.Equal(t, memoCreate.Content, memo.Content) relatedMemoCreate := &store.Memo{ - ResourceName: "related-memo", - CreatorID: user.ID, - Content: "related memo content", - Visibility: store.Public, + UID: "related-memo", + CreatorID: user.ID, + Content: "related memo content", + Visibility: store.Public, } relatedMemo, err := ts.CreateMemo(ctx, relatedMemoCreate) require.NoError(t, err) require.Equal(t, relatedMemoCreate.Content, relatedMemo.Content) commentMemoCreate := &store.Memo{ - ResourceName: "comment-memo", - CreatorID: user.ID, - Content: "comment memo content", - Visibility: store.Public, + UID: "comment-memo", + CreatorID: user.ID, + Content: "comment memo content", + Visibility: store.Public, } commentMemo, err := ts.CreateMemo(ctx, commentMemoCreate) require.NoError(t, err) diff --git a/test/store/memo_test.go b/test/store/memo_test.go index c9a929ba66ec6..48f6f956981c7 100644 --- a/test/store/memo_test.go +++ b/test/store/memo_test.go @@ -15,10 +15,10 @@ func TestMemoStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - ResourceName: "test-resource-name", - CreatorID: user.ID, - Content: "test_content", - Visibility: store.Public, + UID: "test-resource-name", + CreatorID: user.ID, + Content: "test_content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err) @@ -68,10 +68,10 @@ func TestDeleteMemoStore(t *testing.T) { user, err := createTestingHostUser(ctx, ts) require.NoError(t, err) memoCreate := &store.Memo{ - ResourceName: "test-resource-name", - CreatorID: user.ID, - Content: "test_content", - Visibility: store.Public, + UID: "test-resource-name", + CreatorID: user.ID, + Content: "test_content", + Visibility: store.Public, } memo, err := ts.CreateMemo(ctx, memoCreate) require.NoError(t, err) diff --git a/test/store/resource_test.go b/test/store/resource_test.go index 90d66490a5c6e..2c759dfb964bc 100644 --- a/test/store/resource_test.go +++ b/test/store/resource_test.go @@ -14,7 +14,7 @@ func TestResourceStore(t *testing.T) { ctx := context.Background() ts := NewTestingStore(ctx, t) _, err := ts.CreateResource(ctx, &store.Resource{ - ResourceName: shortuuid.New(), + UID: shortuuid.New(), CreatorID: 101, Filename: "test.epub", Blob: []byte("test"), diff --git a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx index baa7612643ff1..07e2cae97f6dd 100644 --- a/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx +++ b/web/src/components/MemoContent/EmbeddedContent/EmbeddedMemo.tsx @@ -17,11 +17,11 @@ const EmbeddedMemo = ({ resourceId, params: paramsStr }: Props) => { const context = useContext(RendererContext); const loadingState = useLoading(); const memoStore = useMemoStore(); - const memo = memoStore.getMemoByResourceId(resourceId); + const memo = memoStore.getMemoByUid(resourceId); const resourceName = `memos/${resourceId}`; useEffect(() => { - memoStore.searchMemos(`resource_name == "${resourceId}"`).finally(() => loadingState.setFinish()); + memoStore.searchMemos(`uid == "${resourceId}"`).finally(() => loadingState.setFinish()); }, [resourceId]); if (loadingState.isLoading) { diff --git a/web/src/components/MemoContent/ReferencedContent/ReferencedMemo.tsx b/web/src/components/MemoContent/ReferencedContent/ReferencedMemo.tsx index 0e88786162b66..57b98a8a41eb3 100644 --- a/web/src/components/MemoContent/ReferencedContent/ReferencedMemo.tsx +++ b/web/src/components/MemoContent/ReferencedContent/ReferencedMemo.tsx @@ -13,11 +13,11 @@ const ReferencedMemo = ({ resourceId, params: paramsStr }: Props) => { const navigateTo = useNavigateTo(); const loadingState = useLoading(); const memoStore = useMemoStore(); - const memo = memoStore.getMemoByResourceId(resourceId); + const memo = memoStore.getMemoByUid(resourceId); const params = new URLSearchParams(paramsStr); useEffect(() => { - memoStore.searchMemos(`resource_name == "${resourceId}"`).finally(() => loadingState.setFinish()); + memoStore.searchMemos(`uid == "${resourceId}"`).finally(() => loadingState.setFinish()); }, [resourceId]); if (loadingState.isLoading) { diff --git a/web/src/components/MemoView.tsx b/web/src/components/MemoView.tsx index af11ba60fcf73..d749dacaad88e 100644 --- a/web/src/components/MemoView.tsx +++ b/web/src/components/MemoView.tsx @@ -58,7 +58,7 @@ const MemoView: React.FC<Props> = (props: Props) => { if (event.altKey) { showChangeMemoCreatedTsDialog(extractMemoIdFromName(memo.name)); } else { - navigateTo(`/m/${memo.resourceId}`); + navigateTo(`/m/${memo.uid}`); } }; @@ -119,7 +119,7 @@ const MemoView: React.FC<Props> = (props: Props) => { "flex flex-row justify-start items-center hover:opacity-70", commentAmount === 0 && "invisible group-hover:visible", )} - to={`/m/${memo.resourceId}#comments`} + to={`/m/${memo.uid}#comments`} unstable_viewTransition > <Icon.MessageCircleMore className="w-4 h-4 mx-auto text-gray-500 dark:text-gray-400" /> diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index c31b5c6ebb512..f7fdb6ab7e0ad 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -19,8 +19,8 @@ const MemoDetail = () => { const navigateTo = useNavigateTo(); const currentUser = useCurrentUser(); const memoStore = useMemoStore(); - const resourceId = params.resourceId; - const memo = memoStore.getMemoByResourceId(resourceId || ""); + const uid = params.uid; + const memo = memoStore.getMemoByUid(uid || ""); const [parentMemo, setParentMemo] = useState<Memo | undefined>(undefined); const commentRelations = memo?.relations.filter((relation) => relation.relatedMemo === memo.name && relation.type === MemoRelation_Type.COMMENT) || []; @@ -28,15 +28,15 @@ const MemoDetail = () => { // Prepare memo. useEffect(() => { - if (resourceId) { - memoStore.searchMemos(`resource_name == "${resourceId}"`).catch((error: ClientError) => { + if (uid) { + memoStore.searchMemos(`uid == "${uid}"`).catch((error: ClientError) => { toast.error(error.details); navigateTo("/403"); }); } else { navigateTo("/404"); } - }, [resourceId]); + }, [uid]); // Prepare memo comments. useEffect(() => { diff --git a/web/src/pages/Resources.tsx b/web/src/pages/Resources.tsx index 14f105102c8b7..c72a449fae384 100644 --- a/web/src/pages/Resources.tsx +++ b/web/src/pages/Resources.tsx @@ -132,7 +132,7 @@ const Resources = () => { {relatedMemo && ( <Link className="shrink-0 text-xs ml-1 text-gray-400 hover:underline hover:text-blue-600" - to={`/m/${relatedMemo.resourceId}`} + to={`/m/${relatedMemo.uid}`} > #{extractMemoIdFromName(relatedMemo.name)} </Link> diff --git a/web/src/router/index.tsx b/web/src/router/index.tsx index dde90c78c98b9..4dc2a42a84b73 100644 --- a/web/src/router/index.tsx +++ b/web/src/router/index.tsx @@ -88,7 +88,7 @@ const router = createBrowserRouter([ element: <Explore />, }, { - path: "m/:resourceId", + path: "m/:uid", element: <MemoDetail />, }, { diff --git a/web/src/store/v1/memo.ts b/web/src/store/v1/memo.ts index d362c9f46bbb0..d3dc4109705fc 100644 --- a/web/src/store/v1/memo.ts +++ b/web/src/store/v1/memo.ts @@ -58,9 +58,9 @@ export const useMemoStore = create( set({ memoMapByName: memoMap }); return memos; }, - getMemoByResourceId: (resourceId: string) => { + getMemoByUid: (uid: string) => { const memoMap = get().memoMapByName; - return Object.values(memoMap).find((memo) => memo.resourceId === resourceId); + return Object.values(memoMap).find((memo) => memo.uid === uid); }, createMemo: async (request: CreateMemoRequest) => { const { memo } = await memoServiceClient.createMemo(request);
refactor
update resource id naming
f6ebfdf7f9c72ebcf86f82e2d1837b3e45875416
2024-09-18 14:22:43
thehijacker
feat: update Slovenian translation (#3935) Updated Slovenian translation Co-authored-by: Andrej Kralj <andrej.kralj@t-2.com>
false
diff --git a/web/src/locales/sl.json b/web/src/locales/sl.json index 673375200b731..72de521828fd8 100644 --- a/web/src/locales/sl.json +++ b/web/src/locales/sl.json @@ -1,50 +1,81 @@ { "auth": { - "host-tip": "Registrirani ste kot gostitelj strani." + "create-your-account": "Ustvari nov račun", + "host-tip": "Registrirani ste kot gostitelj strani.", + "new-password": "Novo geslo", + "repeat-new-password": "Ponovi novo geslo", + "sign-in-tip": "Že imaš račun?", + "sign-up-tip": "Še nimaš računa?" }, "common": { "about": "O programu", + "add": "Dodaj", "admin": "Admin", "archive": "Arhiv", "archived": "Arhivirani", "avatar": "Avatar", "basic": "Osnovni", + "beta": "Beta", "cancel": "Prekliči", "change": "Spremeni", + "clear": "Počisti", "close": "Zapri", - "confirm": "Potrdi", + "confirm": "Potrdi", + "collapse": "Strni", "create": "Dodaj", "database": "Baza", + "days": "Dni", "delete": "Izbriši", + "description": "Opis", "edit": "Uredi", - "email": "Email", + "email": "E-pošta", + "expand": "Razširi", "explore": "Razišči", - "filter": "Filter", + "file": "Datoteka", + "filter": "Filtriraj", "home": "Domov", "image": "Slika", + "inbox": "Prejeto", "language": "Jezik", + "learn-more": "Spoznaj več", "link": "Povezava", - "mark": "Mark", + "mark": "Označi", + "memos": "Beležke", + "name": "Ime", + "new": "Novo", "nickname": "Nadimek", "null": "Nič", + "or": "ali", "password": "Geslo", "pin": "Pripni", + "pinned": "Pripeto", + "preview": "Predogled", + "profile": "Profil", + "remember-me": "Zapomni se me", + "rename": "Preimenuj", "reset": "Ponastavi", "resources": "Viri", - "restore": "Privzeto", - "save": "Shrani", + "restore": "Obnovi", + "role": "Vloga", + "save": "Save", + "search": "Iskanje", "select": "Izberi", "settings": "Nastavitve", "share": "Deli", "sign-in": "Prijavi se", + "sign-in-with": "Prijavi se z {{provider}}", "sign-out": "Odjavi se", "sign-up": "Registriraj", + "statistics": "Statistika", "tags": "Značke", "title": "Naslov", "type": "Tip", "unpin": "Odpni", + "update": "Posodobi", + "upload": "Naloži", "username": "Uporabnik", "version": "Verzija", + "visibility": "Vidnost", "yourself": "Ti" }, "days": { @@ -57,26 +88,48 @@ "wed": "Sre" }, "editor": { + "add-your-comment-here": "Tu dodaj svoj komentar...", "any-thoughts": "Kakšne misli...", "save": "Shrani" }, + "inbox": { + "memo-comment": "{{user}} je komentiral tvojo {{memo}}.", + "version-update": "Na voljo je nova verzija {{version}}!" + }, "memo": { + "archived-at": "Arhivirano ob", + "comment": { + "self": "Komentarji", + "write-a-comment": "Napiši komentar" + }, "copy-link": "Kopiraj povezavo", - "embed": "Vdelaj beležko", + "count-memos-in-date": "{{count}} beležk v {{date}}", + "delete-confirm": "Ali ste prepričani, da želite izbrisati to beležko? TO DEJANJE JE NEPOVRATNO", + "load-more": "Naloži več", + "no-archived-memos": "Ni arhiviranih beležk.", + "search-placeholder": "Poišči beležke", + "show-more": "Prikaži več", "view-detail": "Poglej podrobnosti", "visibility": { "disabled": "Javne beležke so onemogočene", "private": "Vidno samo za vas", "protected": "Vidno uporabnikom", "public": "Vidno vsem" - } + }, + "links": "Povezave", + "to-do": "Opravila", + "code": "Koda" }, "message": { + "archived-successfully": "Archived successfully", "change-memo-created-time": "Spremeni čas izdelave beležke", "copied": "Skopirano", + "deleted-successfully": "Uspešno izbrisano", "fill-all": "Prosim izpolnite vsa polja.", + "maximum-upload-size-is": "Največja dovoljena velikost nalaganja je {{size}} MiB", "memo-not-found": "Ne najdem beležke.", "new-password-not-match": "Novi gesli se ne ujemata.", + "no-data": "Ne najdem podatkov.", "password-changed": "Geslo je spremenjeno", "password-not-match": "Gesli se ne ujemata.", "restored-successfully": "Uspešno obnovljeno", @@ -84,6 +137,12 @@ "update-succeed": "Posodobitev je uspešna", "user-not-found": "Ne najdem uporabnika" }, + "reference": { + "add-references": "Dodaj referenco", + "embedded-usage": "Uporabi kot vdelano vsebino", + "no-memos-found": "Ne najdem beležk", + "search-placeholder": "Poišči po vsebini" + }, "resource": { "clear": "Počisti", "copy-link": "Kopiraj povezavo", @@ -92,6 +151,7 @@ "file-name": "Ime datoteke", "file-name-placeholder": "Ime datoteke", "link": "Povezava", + "link-placeholder": "https://povezava.do/vasega/vira", "option": "Zunanja povezava", "type": "Tip", "type-placeholder": "Tip datoteke" @@ -110,13 +170,28 @@ "linked-amount": "Povezana količina beležk", "no-files-selected": "Nobena datoteka ni označena❗", "no-resources": "Ni virov.", - "no-unused-resources": "Ni neuporabljenih virov" + "no-unused-resources": "Ni neuporabljenih virov", + "reset-link": "Ponastavi povezavo", + "reset-link-prompt": "Ali ste prepričani, da želite ponastaviti povezavo? To bo prekinilo vse trenutne uporabe povezav. TO DEJANJE JE NEPOVRATNO", + "reset-resource-link": "Ponastavi povezavo do vira" + }, + "router": { + "back-to-top": "Nazaj na vrh", + "go-to-home": "Nazaj domov" }, "setting": { "account-section": { "change-password": "Zamenjaj geslo", + "email-note": "Opcijsko", + "export-memos": "Izvozi beležke", + "nickname-note": "Prikazano v pasici", + "openapi-reset": "Ponastavi OpenAPI ključ", + "openapi-sample-post": "Pozdrav #memos iz {{url}}", + "openapi-title": "OpenAPI", + "reset-api": "Ponastavi API", "title": "Podatki o računu", - "update-information": "Posodobi informacije" + "update-information": "Posodobi informacije", + "username-note": "Uporablja se za prijavo" }, "appearance-option": { "dark": "Vedno temna", @@ -126,7 +201,11 @@ "member": "Uporabnik", "member-list": "Seznam uporabnikov", "member-section": { - "create-a-member": "Dodaj novega uporabnika" + "archive-member": "Arhiviraj uporabnika", + "archive-warning": "Ali ste prepričani, da želite arhivirati {{username}}?", + "create-a-member": "Dodaj novega uporabnika", + "delete-member": "Izbriši uporabnika", + "delete-warning": "Ali ste prepričani, da želite izbrisati {{username}}? TO DEJANJE JE NEPOVRATNO" }, "my-account": "Moj račun", "preference": "Nastavitve", @@ -136,12 +215,60 @@ "theme": "Tema" }, "sso": "SSO", + "sso-section": { + "authorization-endpoint": "Končna točka avtorizacije", + "client-id": "ID odjemalca", + "client-secret": "Geslo odjemalca", + "confirm-delete": "Ali ste prepričani, da želite izbrisati konfiguracijo SSO \"{{name}}\"? TO DEJANJE JE NEPOVRATNO", + "create-sso": "Izdelaj SSO", + "custom": "Po meri", + "delete-sso": "Potrdi brisanje", + "disabled-password-login-warning": "Prijava z geslom je onemogočena, bodite še posebej previdni pri odstranjevanju ponudnikov identitete", + "display-name": "Prikaz imena", + "identifier": "Identifikator", + "identifier-filter": "Filter identifikatorja", + "redirect-url": "Preusmeritveni URL", + "scopes": "Območja", + "sso-created": "SSO {{name}} je ustvarjen", + "sso-list": "SSO seznam", + "sso-updated": "SSO {{name}} je posodobljen", + "template": "Predloga", + "token-endpoint": "Končna točka žetona", + "update-sso": "Posodobi SSO", + "user-endpoint": "Končna točka uporabnika" + }, "storage": "Shramba", "storage-section": { - "create-a-service": "Kreiraj storitev", + "accesskey": "Dostopni ključ", + "accesskey-placeholder": "Dostopni ključ / ID dostopa", + "bucket": "Vedro", + "bucket-placeholder": "Ime vedra", + "create-a-service": "Ustvari storitev", + "create-storage": "Ustvari shrambo", + "current-storage": "Trenutna shramba predmetov", "delete-storage": "Izbriši shrambo", + "endpoint": "Kočna točka", + "local-storage-path": "Lokalna pot shrambe", + "path": "Pot shrambe", + "path-description": "Uporabite lahko iste dinamične spremenljivke iz lokalne shrambe, kot je {filename}", + "path-placeholder": "pot/po/meri", + "presign-placeholder": "URL pred-prijave, opcijsko", + "region": "Regija", + "region-placeholder": "Ime regije", + "s3-compatible-url": "S3 združljiv URL", + "secretkey": "Skriti ključ", + "secretkey-placeholder": "Skriti ključ / ključ dostopa", "storage-services": "Seznam storitev shramb", + "type-database": "Baza podatkov", + "type-local": "Lokalni datotečni sistem", "update-a-service": "Posodobi storitev", + "update-local-path": "Posodobite pot di lokalne shrambe", + "update-local-path-description": "Pot lokalne shrambe je relativna pot do vaše datoteke zbirke podatkov", + "update-storage": "Posodobi shrambo", + "url-prefix": "URL predpona", + "url-prefix-placeholder": "URL predpona po meri, opcijsko", + "url-suffix": "URL pripona", + "url-suffix-placeholder": "URL pripona po meri, opcijsko", "warning-text": "Ali ste prepričani, da želite izbrisati storitev shrambe? TA AKCIJA JE NEPOVRATNA❗" }, "system": "Sistem", @@ -152,16 +279,33 @@ "additional-style-placeholder": "Dodatna CSS koda", "allow-user-signup": "Omogočite kreiranje novih uporabnikov", "customize-server": { + "appearance": "Videz strežnika", + "description": "Opis", "icon-url": "URL ikone", + "locale": "Jezik strežnika", "title": "Prilagodi strežnik" }, + "disable-password-login": "Onemogoči prijavo z geslom", + "disable-password-login-final-warning": "Prosim vnesite \"POTRDI\", če veste kaj počnete.", + "disable-password-login-warning": "To bo onemogočilo prijavo z geslom za vse uporabnike. Brez ponovnega vklopa te nastavitve v bazi, prijava ne bo več možna. Enako tudi če identiteta enotne prijave zataji. Bodite tudi zelo previdni pri odstranjevalju identitete enotne prijave", "disable-public-memos": "Onemogočite javne beležke", - "display-with-updated-time": "Display with updated time", + "display-with-updated-time": "Prikaži s časom posodobitve", + "enable-auto-compact": "Omogoči samodejno zgoščevanje", + "enable-double-click-to-edit": "Omogoči dvojni klik za urejanje", + "enable-password-login": "Omogoči prijavo z geslom", + "enable-password-login-warning": "To bo omogočilo prijavo z geslom za vse uporabnike. Nadaljujte samo, če želite, da se uporabniki lahko prijavijo z uporabo enotne prijave in gesla", + "max-upload-size": "Največja velikost nalaganja (MiB)", + "max-upload-size-hint": "Priporočena velikost je 32 MiB.", "server-name": "Ime strežnika" - } + }, + "memo-related": "Beležka" }, "tag": { - "all-tags": "Vse značke", - "create-tag": "Kreiraj značko" + "all-tags": "Vse oznke", + "create-tag": "Kreiraj oznako", + "create-tags-guide": "Oznako lahko ustvarite z vnosom `#tag`.", + "delete-confirm": "Ste prepričani, da želite odstraniti to oznako? Vse povezane beležke bodo arhivirane.", + "delete-tag": "Izbriši oznako", + "no-tag-found": "Ne najdem oznak" } }
feat
update Slovenian translation (#3935) Updated Slovenian translation Co-authored-by: Andrej Kralj <andrej.kralj@t-2.com>
04124a2ace60ebdd5098f90a3afa3d378a6ba5a6
2023-05-19 17:37:39
Athurg Gooth
feat: generate thumbnail while get and improve thumbnail quality (#1680) * Use disintegration/imaging to optimize thumbnail quality * Generate thumbnail if not exists while GET it * Changes for `go mod tidy` * Changes for golang comments lint --------- Co-authored-by: Athurg Feng <athurg@gooth.org>
false
diff --git a/common/image.go b/common/image.go index 6d9de4845b0da..cd71160db8443 100644 --- a/common/image.go +++ b/common/image.go @@ -4,18 +4,49 @@ import ( "bytes" "fmt" "image" - "image/jpeg" "image/png" + "os" + "path/filepath" + "strings" + + "github.com/disintegration/imaging" +) + +const ( + ThumbnailDir = ".thumbnail_cache" + ThumbnailSize = 302 // Thumbnail size should be defined by frontend ) -const ThumbnailPath = ".thumbnail_cache" +func ResizeImageFile(dst, src string, mime string) error { + srcBytes, err := os.ReadFile(src) + if err != nil { + return fmt.Errorf("Failed to open %s: %s", src, err) + } + + dstBytes, err := ResizeImageBlob(srcBytes, ThumbnailSize, mime) + if err != nil { + return fmt.Errorf("Failed to resise %s: %s", src, err) + } + + err = os.MkdirAll(filepath.Dir(dst), os.ModePerm) + if err != nil { + return fmt.Errorf("Failed to mkdir for %s: %s", dst, err) + } + + err = os.WriteFile(dst, dstBytes, 0666) + if err != nil { + return fmt.Errorf("Failed to write %s: %s", dst, err) + } + + return nil +} func ResizeImageBlob(data []byte, maxSize int, mime string) ([]byte, error) { var err error var oldImage image.Image - switch mime { + switch strings.ToLower(mime) { case "image/jpeg": oldImage, err = jpeg.Decode(bytes.NewReader(data)) case "image/png": @@ -28,29 +59,7 @@ func ResizeImageBlob(data []byte, maxSize int, mime string) ([]byte, error) { return nil, err } - bounds := oldImage.Bounds() - if bounds.Dx() <= maxSize && bounds.Dy() <= maxSize { - return data, nil - } - - oldBounds := oldImage.Bounds() - - dy := maxSize - r := float32(oldBounds.Dy()) / float32(maxSize) - dx := int(float32(oldBounds.Dx()) / r) - if oldBounds.Dx() > oldBounds.Dy() { - dx = maxSize - r = float32(oldBounds.Dx()) / float32(maxSize) - dy = int(float32(oldBounds.Dy()) / r) - } - - newBounds := image.Rect(0, 0, dx, dy) - newImage := image.NewRGBA(newBounds) - for x := 0; x < newBounds.Dx(); x++ { - for y := 0; y < newBounds.Dy(); y++ { - newImage.Set(x, y, oldImage.At(int(float32(x)*r), int(float32(y)*r))) - } - } + newImage := imaging.Resize(oldImage, maxSize, 0, imaging.NearestNeighbor) var newBuffer bytes.Buffer switch mime { diff --git a/go.mod b/go.mod index 357e61e6db7b4..0783fb254a324 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.13.12 github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.51 github.com/aws/aws-sdk-go-v2/service/s3 v1.30.3 + github.com/disintegration/imaging v1.6.2 github.com/google/uuid v1.3.0 github.com/gorilla/feeds v1.1.1 github.com/labstack/echo/v4 v4.9.0 @@ -24,6 +25,8 @@ require ( golang.org/x/oauth2 v0.5.0 ) +require golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect + require ( github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.22 // indirect diff --git a/go.sum b/go.sum index eaa894e187892..76e9ee82db318 100644 --- a/go.sum +++ b/go.sum @@ -92,6 +92,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= +github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -296,6 +298,8 @@ golang.org/x/exp v0.0.0-20230111222715-75897c7a292a h1:/YWeLOBWYV5WAQORVPkZF3Pq9 golang.org/x/exp v0.0.0-20230111222715-75897c7a292a/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 h1:hVwzHzIUGRjiF7EcUjqNxk3NCfkPxbDKRdnNE1Rpg0U= +golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= diff --git a/server/resource.go b/server/resource.go index 240750f7d6b45..731d15d402db5 100644 --- a/server/resource.go +++ b/server/resource.go @@ -164,29 +164,11 @@ func (s *Server) registerResourceRoutes(g *echo.Group) { } if filetype == "image/jpeg" || filetype == "image/png" { - _, err := sourceFile.Seek(0, io.SeekStart) - if err != nil { - return echo.NewHTTPError(http.StatusInternalServerError, "Failed to seek file").SetInternal(err) - } - - fileBytes, err := io.ReadAll(sourceFile) - if err != nil { - return echo.NewHTTPError(http.StatusInternalServerError, "Failed to load file").SetInternal(err) - } - - thumbnailBytes, err := common.ResizeImageBlob(fileBytes, 302, filetype) + thumbnailPath := path.Join(s.Profile.Data, common.ThumbnailDir, publicID) + err := common.ResizeImageFile(thumbnailPath, filePath, filetype) if err != nil { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to generate thumbnail").SetInternal(err) } - - dir := filepath.Join(s.Profile.Data, common.ThumbnailPath) - if err = os.MkdirAll(dir, os.ModePerm); err != nil { - return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create directory").SetInternal(err) - } - err = os.WriteFile(filepath.Join(dir, publicID), thumbnailBytes, 0666) - if err != nil { - return echo.NewHTTPError(http.StatusInternalServerError, "Failed to create thumbnail").SetInternal(err) - } } resourceCreate = &api.ResourceCreate{ @@ -346,7 +328,7 @@ func (s *Server) registerResourceRoutes(g *echo.Group) { log.Warn(fmt.Sprintf("failed to delete local file with path %s", resource.InternalPath), zap.Error(err)) } - thumbnailPath := filepath.Join(s.Profile.Data, common.ThumbnailPath, resource.PublicID) + thumbnailPath := path.Join(s.Profile.Data, common.ThumbnailDir, resource.PublicID) err = os.Remove(thumbnailPath) if err != nil { log.Warn(fmt.Sprintf("failed to delete local thumbnail with path %s", thumbnailPath), zap.Error(err)) @@ -442,9 +424,18 @@ func (s *Server) registerResourcePublicRoutes(g *echo.Group) { if resource.InternalPath != "" { resourcePath := resource.InternalPath if c.QueryParam("thumbnail") == "1" && (resource.Type == "image/jpeg" || resource.Type == "image/png") { - thumbnailPath := filepath.Join(s.Profile.Data, common.ThumbnailPath, resource.PublicID) + thumbnailPath := path.Join(s.Profile.Data, common.ThumbnailDir, resource.PublicID) if _, err := os.Stat(thumbnailPath); err == nil { resourcePath = thumbnailPath + } else if os.IsNotExist(err) { + err := common.ResizeImageFile(thumbnailPath, resourcePath, resource.Type) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to resize resource: %s", resourcePath)).SetInternal(err) + } + + resourcePath = thumbnailPath + } else { + return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Failed to check resource thumbnail stat: %s", thumbnailPath)).SetInternal(err) } }
feat
generate thumbnail while get and improve thumbnail quality (#1680) * Use disintegration/imaging to optimize thumbnail quality * Generate thumbnail if not exists while GET it * Changes for `go mod tidy` * Changes for golang comments lint --------- Co-authored-by: Athurg Feng <athurg@gooth.org>
fcba3ffa261686d308d59eeb208c39d21cc6d377
2023-09-26 15:53:45
Athurg Gooth
chore: move sql code of User into driver (#2281) Move SQL code of User into Driver
false
diff --git a/store/driver.go b/store/driver.go index 6cba21871e585..3d17b3621da55 100644 --- a/store/driver.go +++ b/store/driver.go @@ -7,4 +7,9 @@ type Driver interface { UpsertSystemSetting(ctx context.Context, upsert *SystemSetting) (*SystemSetting, error) ListSystemSettings(ctx context.Context, find *FindSystemSetting) ([]*SystemSetting, error) + + CreateUser(ctx context.Context, create *User) (*User, error) + UpdateUser(ctx context.Context, update *UpdateUser) (*User, error) + ListUsers(ctx context.Context, find *FindUser) ([]*User, error) + DeleteUser(ctx context.Context, delete *DeleteUser) error } diff --git a/store/sqlite3/user.go b/store/sqlite3/user.go new file mode 100644 index 0000000000000..64e101f237b1f --- /dev/null +++ b/store/sqlite3/user.go @@ -0,0 +1,172 @@ +package sqlite3 + +import ( + "context" + "strings" + + "github.com/usememos/memos/store" +) + +func (d *Driver) CreateUser(ctx context.Context, create *store.User) (*store.User, error) { + stmt := ` + INSERT INTO user ( + username, + role, + email, + nickname, + password_hash + ) + VALUES (?, ?, ?, ?, ?) + RETURNING id, avatar_url, created_ts, updated_ts, row_status + ` + if err := d.db.QueryRowContext( + ctx, + stmt, + create.Username, + create.Role, + create.Email, + create.Nickname, + create.PasswordHash, + ).Scan( + &create.ID, + &create.AvatarURL, + &create.CreatedTs, + &create.UpdatedTs, + &create.RowStatus, + ); err != nil { + return nil, err + } + + return create, nil +} + +func (d *Driver) UpdateUser(ctx context.Context, update *store.UpdateUser) (*store.User, error) { + set, args := []string{}, []any{} + if v := update.UpdatedTs; v != nil { + set, args = append(set, "updated_ts = ?"), append(args, *v) + } + if v := update.RowStatus; v != nil { + set, args = append(set, "row_status = ?"), append(args, *v) + } + if v := update.Username; v != nil { + set, args = append(set, "username = ?"), append(args, *v) + } + if v := update.Email; v != nil { + set, args = append(set, "email = ?"), append(args, *v) + } + if v := update.Nickname; v != nil { + set, args = append(set, "nickname = ?"), append(args, *v) + } + if v := update.AvatarURL; v != nil { + set, args = append(set, "avatar_url = ?"), append(args, *v) + } + if v := update.PasswordHash; v != nil { + set, args = append(set, "password_hash = ?"), append(args, *v) + } + args = append(args, update.ID) + + query := ` + UPDATE user + SET ` + strings.Join(set, ", ") + ` + WHERE id = ? + RETURNING id, username, role, email, nickname, password_hash, avatar_url, created_ts, updated_ts, row_status + ` + user := &store.User{} + if err := d.db.QueryRowContext(ctx, query, args...).Scan( + &user.ID, + &user.Username, + &user.Role, + &user.Email, + &user.Nickname, + &user.PasswordHash, + &user.AvatarURL, + &user.CreatedTs, + &user.UpdatedTs, + &user.RowStatus, + ); err != nil { + return nil, err + } + + return user, nil +} + +func (d *Driver) ListUsers(ctx context.Context, find *store.FindUser) ([]*store.User, error) { + where, args := []string{"1 = 1"}, []any{} + + if v := find.ID; v != nil { + where, args = append(where, "id = ?"), append(args, *v) + } + if v := find.Username; v != nil { + where, args = append(where, "username = ?"), append(args, *v) + } + if v := find.Role; v != nil { + where, args = append(where, "role = ?"), append(args, *v) + } + if v := find.Email; v != nil { + where, args = append(where, "email = ?"), append(args, *v) + } + if v := find.Nickname; v != nil { + where, args = append(where, "nickname = ?"), append(args, *v) + } + + query := ` + SELECT + id, + username, + role, + email, + nickname, + password_hash, + avatar_url, + created_ts, + updated_ts, + row_status + FROM user + WHERE ` + strings.Join(where, " AND ") + ` + ORDER BY created_ts DESC, row_status DESC + ` + rows, err := d.db.QueryContext(ctx, query, args...) + if err != nil { + return nil, err + } + defer rows.Close() + + list := make([]*store.User, 0) + for rows.Next() { + var user store.User + if err := rows.Scan( + &user.ID, + &user.Username, + &user.Role, + &user.Email, + &user.Nickname, + &user.PasswordHash, + &user.AvatarURL, + &user.CreatedTs, + &user.UpdatedTs, + &user.RowStatus, + ); err != nil { + return nil, err + } + list = append(list, &user) + } + + if err := rows.Err(); err != nil { + return nil, err + } + + return list, nil +} + +func (d *Driver) DeleteUser(ctx context.Context, delete *store.DeleteUser) error { + result, err := d.db.ExecContext(ctx, ` + DELETE FROM user WHERE id = ? + `, delete.ID) + if err != nil { + return err + } + if _, err := result.RowsAffected(); err != nil { + return err + } + return nil +} diff --git a/store/user.go b/store/user.go index 6245b0e952c6b..17948fa7a218f 100644 --- a/store/user.go +++ b/store/user.go @@ -2,7 +2,6 @@ package store import ( "context" - "strings" ) // Role is the type of a role. @@ -74,84 +73,18 @@ type DeleteUser struct { } func (s *Store) CreateUser(ctx context.Context, create *User) (*User, error) { - stmt := ` - INSERT INTO user ( - username, - role, - email, - nickname, - password_hash - ) - VALUES (?, ?, ?, ?, ?) - RETURNING id, avatar_url, created_ts, updated_ts, row_status - ` - if err := s.db.QueryRowContext( - ctx, - stmt, - create.Username, - create.Role, - create.Email, - create.Nickname, - create.PasswordHash, - ).Scan( - &create.ID, - &create.AvatarURL, - &create.CreatedTs, - &create.UpdatedTs, - &create.RowStatus, - ); err != nil { + user, err := s.driver.CreateUser(ctx, create) + if err != nil { return nil, err } - user := create s.userCache.Store(user.ID, user) return user, nil } func (s *Store) UpdateUser(ctx context.Context, update *UpdateUser) (*User, error) { - set, args := []string{}, []any{} - if v := update.UpdatedTs; v != nil { - set, args = append(set, "updated_ts = ?"), append(args, *v) - } - if v := update.RowStatus; v != nil { - set, args = append(set, "row_status = ?"), append(args, *v) - } - if v := update.Username; v != nil { - set, args = append(set, "username = ?"), append(args, *v) - } - if v := update.Email; v != nil { - set, args = append(set, "email = ?"), append(args, *v) - } - if v := update.Nickname; v != nil { - set, args = append(set, "nickname = ?"), append(args, *v) - } - if v := update.AvatarURL; v != nil { - set, args = append(set, "avatar_url = ?"), append(args, *v) - } - if v := update.PasswordHash; v != nil { - set, args = append(set, "password_hash = ?"), append(args, *v) - } - args = append(args, update.ID) - - query := ` - UPDATE user - SET ` + strings.Join(set, ", ") + ` - WHERE id = ? - RETURNING id, username, role, email, nickname, password_hash, avatar_url, created_ts, updated_ts, row_status - ` - user := &User{} - if err := s.db.QueryRowContext(ctx, query, args...).Scan( - &user.ID, - &user.Username, - &user.Role, - &user.Email, - &user.Nickname, - &user.PasswordHash, - &user.AvatarURL, - &user.CreatedTs, - &user.UpdatedTs, - &user.RowStatus, - ); err != nil { + user, err := s.driver.UpdateUser(ctx, update) + if err != nil { return nil, err } @@ -160,69 +93,10 @@ func (s *Store) UpdateUser(ctx context.Context, update *UpdateUser) (*User, erro } func (s *Store) ListUsers(ctx context.Context, find *FindUser) ([]*User, error) { - where, args := []string{"1 = 1"}, []any{} - - if v := find.ID; v != nil { - where, args = append(where, "id = ?"), append(args, *v) - } - if v := find.Username; v != nil { - where, args = append(where, "username = ?"), append(args, *v) - } - if v := find.Role; v != nil { - where, args = append(where, "role = ?"), append(args, *v) - } - if v := find.Email; v != nil { - where, args = append(where, "email = ?"), append(args, *v) - } - if v := find.Nickname; v != nil { - where, args = append(where, "nickname = ?"), append(args, *v) - } - - query := ` - SELECT - id, - username, - role, - email, - nickname, - password_hash, - avatar_url, - created_ts, - updated_ts, - row_status - FROM user - WHERE ` + strings.Join(where, " AND ") + ` - ORDER BY created_ts DESC, row_status DESC - ` - rows, err := s.db.QueryContext(ctx, query, args...) + list, err := s.driver.ListUsers(ctx, find) if err != nil { return nil, err } - defer rows.Close() - - list := make([]*User, 0) - for rows.Next() { - var user User - if err := rows.Scan( - &user.ID, - &user.Username, - &user.Role, - &user.Email, - &user.Nickname, - &user.PasswordHash, - &user.AvatarURL, - &user.CreatedTs, - &user.UpdatedTs, - &user.RowStatus, - ); err != nil { - return nil, err - } - list = append(list, &user) - } - - if err := rows.Err(); err != nil { - return nil, err - } for _, user := range list { s.userCache.Store(user.ID, user) @@ -251,15 +125,11 @@ func (s *Store) GetUser(ctx context.Context, find *FindUser) (*User, error) { } func (s *Store) DeleteUser(ctx context.Context, delete *DeleteUser) error { - result, err := s.db.ExecContext(ctx, ` - DELETE FROM user WHERE id = ? - `, delete.ID) + err := s.driver.DeleteUser(ctx, delete) if err != nil { return err } - if _, err := result.RowsAffected(); err != nil { - return err - } + if err := s.Vacuum(ctx); err != nil { // Prevent linter warning. return err
chore
move sql code of User into driver (#2281) Move SQL code of User into Driver
daa1e9edfb17e5932c75d5e8f586a10f7e09be39
2023-03-07 17:06:18
Xiang Jaywhen
fix: Ask-AI history list reversed when loading answer (#1301)
false
diff --git a/web/src/components/AskAIDialog.tsx b/web/src/components/AskAIDialog.tsx index d0b9a99bc6bb3..084dd616237c4 100644 --- a/web/src/components/AskAIDialog.tsx +++ b/web/src/components/AskAIDialog.tsx @@ -1,5 +1,4 @@ import { Button, Textarea } from "@mui/joy"; -import { reverse } from "lodash-es"; import { useEffect, useState } from "react"; import * as api from "../helpers/api"; import useLoading from "../hooks/useLoading"; @@ -60,11 +59,11 @@ const AskAIDialog: React.FC<Props> = (props: Props) => { data: { data: answer }, } = await api.postChatCompletion(question); setHistoryList([ - ...historyList, { question, answer: answer.replace(/^\n\n/, ""), }, + ...historyList, ]); }; @@ -86,7 +85,7 @@ const AskAIDialog: React.FC<Props> = (props: Props) => { <Icon.Loader className="w-5 h-auto animate-spin" /> </p> )} - {reverse(historyList).map((history, index) => ( + {historyList.map((history, index) => ( <div key={index} className="w-full flex flex-col justify-start items-start mt-4 space-y-2"> <div className="w-full flex flex-row justify-start items-start pr-6"> <span className="word-break rounded shadow px-3 py-2 opacity-80 bg-gray-100 dark:bg-zinc-700">{history.question}</span>
fix
Ask-AI history list reversed when loading answer (#1301)
57014e392f57697b5cb309e1a68132f65c94cd6f
2025-02-01 15:30:22
johnnyjoy
feat: get user by username
false
diff --git a/proto/api/v1/user_service.proto b/proto/api/v1/user_service.proto index 4f6f896addcac..c9f3bc3bca174 100644 --- a/proto/api/v1/user_service.proto +++ b/proto/api/v1/user_service.proto @@ -18,15 +18,16 @@ service UserService { rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) { option (google.api.http) = {get: "/api/v1/users"}; } - // SearchUsers searches users by filter. - rpc SearchUsers(SearchUsersRequest) returns (SearchUsersResponse) { - option (google.api.http) = {get: "/api/v1/users:search"}; - } // GetUser gets a user by name. rpc GetUser(GetUserRequest) returns (User) { option (google.api.http) = {get: "/api/v1/{name=users/*}"}; option (google.api.method_signature) = "name"; } + // GetUserByUsername gets a user by username. + rpc GetUserByUsername(GetUserByUsernameRequest) returns (User) { + option (google.api.http) = {get: "/api/v1/users:username"}; + option (google.api.method_signature) = "username"; + } // GetUserAvatarBinary gets the avatar of a user. rpc GetUserAvatarBinary(GetUserAvatarBinaryRequest) returns (google.api.HttpBody) { option (google.api.http) = {get: "/file/{name=users/*}/avatar"}; @@ -133,21 +134,16 @@ message ListUsersResponse { repeated User users = 1; } -message SearchUsersRequest { - // Filter is used to filter users returned in the list. - // Format: "username == 'frank'" - string filter = 1; -} - -message SearchUsersResponse { - repeated User users = 1; -} - message GetUserRequest { // The name of the user. string name = 1; } +message GetUserByUsernameRequest { + // The username of the user. + string username = 1; +} + message GetUserAvatarBinaryRequest { // The name of the user. string name = 1; diff --git a/proto/gen/api/v1/user_service.pb.go b/proto/gen/api/v1/user_service.pb.go index ca45694a16420..51ec9f983b43f 100644 --- a/proto/gen/api/v1/user_service.pb.go +++ b/proto/gen/api/v1/user_service.pb.go @@ -284,29 +284,28 @@ func (x *ListUsersResponse) GetUsers() []*User { return nil } -type SearchUsersRequest struct { +type GetUserRequest struct { state protoimpl.MessageState `protogen:"open.v1"` - // Filter is used to filter users returned in the list. - // Format: "username == 'frank'" - Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + // The name of the user. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SearchUsersRequest) Reset() { - *x = SearchUsersRequest{} +func (x *GetUserRequest) Reset() { + *x = GetUserRequest{} mi := &file_api_v1_user_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SearchUsersRequest) String() string { +func (x *GetUserRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SearchUsersRequest) ProtoMessage() {} +func (*GetUserRequest) ProtoMessage() {} -func (x *SearchUsersRequest) ProtoReflect() protoreflect.Message { +func (x *GetUserRequest) ProtoReflect() protoreflect.Message { mi := &file_api_v1_user_service_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -318,39 +317,40 @@ func (x *SearchUsersRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SearchUsersRequest.ProtoReflect.Descriptor instead. -func (*SearchUsersRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. +func (*GetUserRequest) Descriptor() ([]byte, []int) { return file_api_v1_user_service_proto_rawDescGZIP(), []int{3} } -func (x *SearchUsersRequest) GetFilter() string { +func (x *GetUserRequest) GetName() string { if x != nil { - return x.Filter + return x.Name } return "" } -type SearchUsersResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` +type GetUserByUsernameRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The username of the user. + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *SearchUsersResponse) Reset() { - *x = SearchUsersResponse{} +func (x *GetUserByUsernameRequest) Reset() { + *x = GetUserByUsernameRequest{} mi := &file_api_v1_user_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *SearchUsersResponse) String() string { +func (x *GetUserByUsernameRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SearchUsersResponse) ProtoMessage() {} +func (*GetUserByUsernameRequest) ProtoMessage() {} -func (x *SearchUsersResponse) ProtoReflect() protoreflect.Message { +func (x *GetUserByUsernameRequest) ProtoReflect() protoreflect.Message { mi := &file_api_v1_user_service_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -362,59 +362,14 @@ func (x *SearchUsersResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SearchUsersResponse.ProtoReflect.Descriptor instead. -func (*SearchUsersResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetUserByUsernameRequest.ProtoReflect.Descriptor instead. +func (*GetUserByUsernameRequest) Descriptor() ([]byte, []int) { return file_api_v1_user_service_proto_rawDescGZIP(), []int{4} } -func (x *SearchUsersResponse) GetUsers() []*User { - if x != nil { - return x.Users - } - return nil -} - -type GetUserRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The name of the user. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GetUserRequest) Reset() { - *x = GetUserRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserRequest) ProtoMessage() {} - -func (x *GetUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[5] +func (x *GetUserByUsernameRequest) GetUsername() string { 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 GetUserRequest.ProtoReflect.Descriptor instead. -func (*GetUserRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{5} -} - -func (x *GetUserRequest) GetName() string { - if x != nil { - return x.Name + return x.Username } return "" } @@ -431,7 +386,7 @@ type GetUserAvatarBinaryRequest struct { func (x *GetUserAvatarBinaryRequest) Reset() { *x = GetUserAvatarBinaryRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[6] + mi := &file_api_v1_user_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -443,7 +398,7 @@ func (x *GetUserAvatarBinaryRequest) String() string { func (*GetUserAvatarBinaryRequest) ProtoMessage() {} func (x *GetUserAvatarBinaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[6] + mi := &file_api_v1_user_service_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -456,7 +411,7 @@ func (x *GetUserAvatarBinaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserAvatarBinaryRequest.ProtoReflect.Descriptor instead. func (*GetUserAvatarBinaryRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{6} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{5} } func (x *GetUserAvatarBinaryRequest) GetName() string { @@ -482,7 +437,7 @@ type CreateUserRequest struct { func (x *CreateUserRequest) Reset() { *x = CreateUserRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[7] + mi := &file_api_v1_user_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -494,7 +449,7 @@ func (x *CreateUserRequest) String() string { func (*CreateUserRequest) ProtoMessage() {} func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[7] + mi := &file_api_v1_user_service_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -507,7 +462,7 @@ func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead. func (*CreateUserRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{7} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{6} } func (x *CreateUserRequest) GetUser() *User { @@ -527,7 +482,7 @@ type UpdateUserRequest struct { func (x *UpdateUserRequest) Reset() { *x = UpdateUserRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[8] + mi := &file_api_v1_user_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -539,7 +494,7 @@ func (x *UpdateUserRequest) String() string { func (*UpdateUserRequest) ProtoMessage() {} func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[8] + mi := &file_api_v1_user_service_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -552,7 +507,7 @@ func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead. func (*UpdateUserRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{8} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{7} } func (x *UpdateUserRequest) GetUser() *User { @@ -579,7 +534,7 @@ type DeleteUserRequest struct { func (x *DeleteUserRequest) Reset() { *x = DeleteUserRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[9] + mi := &file_api_v1_user_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -591,7 +546,7 @@ func (x *DeleteUserRequest) String() string { func (*DeleteUserRequest) ProtoMessage() {} func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[9] + mi := &file_api_v1_user_service_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -604,7 +559,7 @@ func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead. func (*DeleteUserRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{9} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{8} } func (x *DeleteUserRequest) GetName() string { @@ -632,7 +587,7 @@ type UserStats struct { func (x *UserStats) Reset() { *x = UserStats{} - mi := &file_api_v1_user_service_proto_msgTypes[10] + mi := &file_api_v1_user_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -644,7 +599,7 @@ func (x *UserStats) String() string { func (*UserStats) ProtoMessage() {} func (x *UserStats) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[10] + mi := &file_api_v1_user_service_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -657,7 +612,7 @@ func (x *UserStats) ProtoReflect() protoreflect.Message { // Deprecated: Use UserStats.ProtoReflect.Descriptor instead. func (*UserStats) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{10} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{9} } func (x *UserStats) GetName() string { @@ -696,7 +651,7 @@ type ListAllUserStatsRequest struct { func (x *ListAllUserStatsRequest) Reset() { *x = ListAllUserStatsRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[11] + mi := &file_api_v1_user_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -708,7 +663,7 @@ func (x *ListAllUserStatsRequest) String() string { func (*ListAllUserStatsRequest) ProtoMessage() {} func (x *ListAllUserStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[11] + mi := &file_api_v1_user_service_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -721,7 +676,7 @@ func (x *ListAllUserStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAllUserStatsRequest.ProtoReflect.Descriptor instead. func (*ListAllUserStatsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{11} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{10} } type ListAllUserStatsResponse struct { @@ -733,7 +688,7 @@ type ListAllUserStatsResponse struct { func (x *ListAllUserStatsResponse) Reset() { *x = ListAllUserStatsResponse{} - mi := &file_api_v1_user_service_proto_msgTypes[12] + mi := &file_api_v1_user_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -745,7 +700,7 @@ func (x *ListAllUserStatsResponse) String() string { func (*ListAllUserStatsResponse) ProtoMessage() {} func (x *ListAllUserStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[12] + mi := &file_api_v1_user_service_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -758,7 +713,7 @@ func (x *ListAllUserStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAllUserStatsResponse.ProtoReflect.Descriptor instead. func (*ListAllUserStatsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{12} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{11} } func (x *ListAllUserStatsResponse) GetUserStats() []*UserStats { @@ -778,7 +733,7 @@ type GetUserStatsRequest struct { func (x *GetUserStatsRequest) Reset() { *x = GetUserStatsRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[13] + mi := &file_api_v1_user_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -790,7 +745,7 @@ func (x *GetUserStatsRequest) String() string { func (*GetUserStatsRequest) ProtoMessage() {} func (x *GetUserStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[13] + mi := &file_api_v1_user_service_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -803,7 +758,7 @@ func (x *GetUserStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserStatsRequest.ProtoReflect.Descriptor instead. func (*GetUserStatsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{13} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{12} } func (x *GetUserStatsRequest) GetName() string { @@ -829,7 +784,7 @@ type UserSetting struct { func (x *UserSetting) Reset() { *x = UserSetting{} - mi := &file_api_v1_user_service_proto_msgTypes[14] + mi := &file_api_v1_user_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -841,7 +796,7 @@ func (x *UserSetting) String() string { func (*UserSetting) ProtoMessage() {} func (x *UserSetting) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[14] + mi := &file_api_v1_user_service_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -854,7 +809,7 @@ func (x *UserSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use UserSetting.ProtoReflect.Descriptor instead. func (*UserSetting) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{14} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{13} } func (x *UserSetting) GetName() string { @@ -895,7 +850,7 @@ type GetUserSettingRequest struct { func (x *GetUserSettingRequest) Reset() { *x = GetUserSettingRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[15] + mi := &file_api_v1_user_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -907,7 +862,7 @@ func (x *GetUserSettingRequest) String() string { func (*GetUserSettingRequest) ProtoMessage() {} func (x *GetUserSettingRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[15] + mi := &file_api_v1_user_service_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -920,7 +875,7 @@ func (x *GetUserSettingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetUserSettingRequest.ProtoReflect.Descriptor instead. func (*GetUserSettingRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{15} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{14} } func (x *GetUserSettingRequest) GetName() string { @@ -940,7 +895,7 @@ type UpdateUserSettingRequest struct { func (x *UpdateUserSettingRequest) Reset() { *x = UpdateUserSettingRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[16] + mi := &file_api_v1_user_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -952,7 +907,7 @@ func (x *UpdateUserSettingRequest) String() string { func (*UpdateUserSettingRequest) ProtoMessage() {} func (x *UpdateUserSettingRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[16] + mi := &file_api_v1_user_service_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -965,7 +920,7 @@ func (x *UpdateUserSettingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateUserSettingRequest.ProtoReflect.Descriptor instead. func (*UpdateUserSettingRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{16} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{15} } func (x *UpdateUserSettingRequest) GetSetting() *UserSetting { @@ -994,7 +949,7 @@ type UserAccessToken struct { func (x *UserAccessToken) Reset() { *x = UserAccessToken{} - mi := &file_api_v1_user_service_proto_msgTypes[17] + mi := &file_api_v1_user_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1006,7 +961,7 @@ func (x *UserAccessToken) String() string { func (*UserAccessToken) ProtoMessage() {} func (x *UserAccessToken) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[17] + mi := &file_api_v1_user_service_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1019,7 +974,7 @@ func (x *UserAccessToken) ProtoReflect() protoreflect.Message { // Deprecated: Use UserAccessToken.ProtoReflect.Descriptor instead. func (*UserAccessToken) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{17} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{16} } func (x *UserAccessToken) GetAccessToken() string { @@ -1060,7 +1015,7 @@ type ListUserAccessTokensRequest struct { func (x *ListUserAccessTokensRequest) Reset() { *x = ListUserAccessTokensRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[18] + mi := &file_api_v1_user_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1072,7 +1027,7 @@ func (x *ListUserAccessTokensRequest) String() string { func (*ListUserAccessTokensRequest) ProtoMessage() {} func (x *ListUserAccessTokensRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[18] + mi := &file_api_v1_user_service_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1085,7 +1040,7 @@ func (x *ListUserAccessTokensRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListUserAccessTokensRequest.ProtoReflect.Descriptor instead. func (*ListUserAccessTokensRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{18} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{17} } func (x *ListUserAccessTokensRequest) GetName() string { @@ -1104,7 +1059,7 @@ type ListUserAccessTokensResponse struct { func (x *ListUserAccessTokensResponse) Reset() { *x = ListUserAccessTokensResponse{} - mi := &file_api_v1_user_service_proto_msgTypes[19] + mi := &file_api_v1_user_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1116,7 +1071,7 @@ func (x *ListUserAccessTokensResponse) String() string { func (*ListUserAccessTokensResponse) ProtoMessage() {} func (x *ListUserAccessTokensResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[19] + mi := &file_api_v1_user_service_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1129,7 +1084,7 @@ func (x *ListUserAccessTokensResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListUserAccessTokensResponse.ProtoReflect.Descriptor instead. func (*ListUserAccessTokensResponse) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{19} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{18} } func (x *ListUserAccessTokensResponse) GetAccessTokens() []*UserAccessToken { @@ -1151,7 +1106,7 @@ type CreateUserAccessTokenRequest struct { func (x *CreateUserAccessTokenRequest) Reset() { *x = CreateUserAccessTokenRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[20] + mi := &file_api_v1_user_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1163,7 +1118,7 @@ func (x *CreateUserAccessTokenRequest) String() string { func (*CreateUserAccessTokenRequest) ProtoMessage() {} func (x *CreateUserAccessTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[20] + mi := &file_api_v1_user_service_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1176,7 +1131,7 @@ func (x *CreateUserAccessTokenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateUserAccessTokenRequest.ProtoReflect.Descriptor instead. func (*CreateUserAccessTokenRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{20} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{19} } func (x *CreateUserAccessTokenRequest) GetName() string { @@ -1212,7 +1167,7 @@ type DeleteUserAccessTokenRequest struct { func (x *DeleteUserAccessTokenRequest) Reset() { *x = DeleteUserAccessTokenRequest{} - mi := &file_api_v1_user_service_proto_msgTypes[21] + mi := &file_api_v1_user_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1224,7 +1179,7 @@ func (x *DeleteUserAccessTokenRequest) String() string { func (*DeleteUserAccessTokenRequest) ProtoMessage() {} func (x *DeleteUserAccessTokenRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[21] + mi := &file_api_v1_user_service_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1237,7 +1192,7 @@ func (x *DeleteUserAccessTokenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteUserAccessTokenRequest.ProtoReflect.Descriptor instead. func (*DeleteUserAccessTokenRequest) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{21} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{20} } func (x *DeleteUserAccessTokenRequest) GetName() string { @@ -1266,7 +1221,7 @@ type UserStats_MemoTypeStats struct { func (x *UserStats_MemoTypeStats) Reset() { *x = UserStats_MemoTypeStats{} - mi := &file_api_v1_user_service_proto_msgTypes[23] + mi := &file_api_v1_user_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1278,7 +1233,7 @@ func (x *UserStats_MemoTypeStats) String() string { func (*UserStats_MemoTypeStats) ProtoMessage() {} func (x *UserStats_MemoTypeStats) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_user_service_proto_msgTypes[23] + mi := &file_api_v1_user_service_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1291,7 +1246,7 @@ func (x *UserStats_MemoTypeStats) ProtoReflect() protoreflect.Message { // Deprecated: Use UserStats_MemoTypeStats.ProtoReflect.Descriptor instead. func (*UserStats_MemoTypeStats) Descriptor() ([]byte, []int) { - return file_api_v1_user_service_proto_rawDescGZIP(), []int{10, 1} + return file_api_v1_user_service_proto_rawDescGZIP(), []int{9, 1} } func (x *UserStats_MemoTypeStats) GetLinkCount() int32 { @@ -1377,262 +1332,259 @@ var file_api_v1_user_service_proto_rawDesc = string([]byte{ 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x2c, 0x0a, - 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x3f, 0x0a, 0x13, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x24, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x76, 0x61, - 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x24, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, + 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x63, 0x0a, 0x1a, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, + 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, + 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x08, 0x68, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, + 0x22, 0x3b, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x7e, 0x0a, + 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x27, 0x0a, + 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd1, 0x03, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x53, + 0x74, 0x61, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x17, 0x6d, 0x65, 0x6d, 0x6f, + 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x15, 0x6d, 0x65, 0x6d, 0x6f, 0x44, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x4d, 0x0a, 0x0f, + 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x4d, + 0x65, 0x6d, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0d, 0x6d, 0x65, + 0x6d, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x74, + 0x61, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x74, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, + 0x3b, 0x0a, 0x0d, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x8b, 0x01, 0x0a, + 0x0d, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x74, 0x6f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x09, 0x74, 0x6f, 0x64, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, + 0x6e, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x09, 0x75, 0x6e, 0x64, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x19, 0x0a, 0x17, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, + 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x29, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x09, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x62, 0x6f, 0x64, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x52, 0x08, 0x68, - 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x3b, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, - 0x75, 0x73, 0x65, 0x72, 0x22, 0x7e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x04, 0xe2, 0x41, 0x01, - 0x02, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x27, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd1, 0x03, - 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x52, 0x0a, 0x17, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x15, 0x6d, 0x65, - 0x6d, 0x6f, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, - 0x61, 0x74, 0x73, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x74, 0x61, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x54, - 0x61, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x74, 0x61, - 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x3b, 0x0a, 0x0d, 0x54, 0x61, 0x67, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x8b, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x79, 0x70, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6c, 0x69, 0x6e, 0x6b, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x6f, 0x64, 0x6f, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x6e, 0x64, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x6e, 0x64, 0x6f, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x19, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x22, 0x29, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0b, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x61, - 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, - 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, - 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x22, 0x2b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x92, 0x01, - 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, - 0x73, 0x6b, 0x22, 0xca, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x09, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, - 0x31, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, + 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x56, + 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x2b, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42, + 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3b, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0xca, 0x01, 0x0a, 0x0f, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, - 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, - 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x55, 0x0a, 0x1c, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x32, 0xb8, 0x0e, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x70, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x62, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x81, - 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, - 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x76, 0x61, - 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, - 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x76, 0x61, 0x74, - 0x61, 0x72, 0x12, 0x65, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x22, 0xda, 0x41, 0x04, 0x75, 0x73, 0x65, 0x72, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x7f, 0x0a, 0x0a, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x3c, 0xda, 0x41, - 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, - 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x32, 0x1b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, 0x0a, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x25, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x2f, 0x2d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x77, 0x0a, 0x0c, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x31, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x1c, 0x4c, + 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, + 0xa3, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x55, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xc2, 0x0e, 0x0a, + 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x09, + 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x12, 0x62, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x25, + 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x29, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x81, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x76, 0x61, + 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x41, 0x76, 0x61, 0x74, 0x61, 0x72, 0x42, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, + 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x65, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x22, 0xda, 0x41, 0x04, 0x75, 0x73, 0x65, + 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x7f, 0x0a, 0x0a, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, + 0x3c, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, + 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, + 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x10, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x77, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x21, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x2b, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x2b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x7f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0xa5, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x4d, - 0xda, 0x41, 0x13, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x07, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa2, 0x01, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0xda, - 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, + 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0xa5, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x26, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x22, 0x4d, 0xda, 0x41, 0x13, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, + 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x7d, + 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x33, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, + 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x36, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x6e, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x36, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, - 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, - 0xac, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4f, 0xda, - 0x41, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x2a, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, - 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2f, - 0x7b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, 0xa8, - 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, - 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x4f, 0xda, 0x41, 0x11, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x2a, 0x33, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, + 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, }) var ( @@ -1648,93 +1600,91 @@ func file_api_v1_user_service_proto_rawDescGZIP() []byte { } var file_api_v1_user_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_v1_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_api_v1_user_service_proto_msgTypes = make([]protoimpl.MessageInfo, 23) var file_api_v1_user_service_proto_goTypes = []any{ (User_Role)(0), // 0: memos.api.v1.User.Role (*User)(nil), // 1: memos.api.v1.User (*ListUsersRequest)(nil), // 2: memos.api.v1.ListUsersRequest (*ListUsersResponse)(nil), // 3: memos.api.v1.ListUsersResponse - (*SearchUsersRequest)(nil), // 4: memos.api.v1.SearchUsersRequest - (*SearchUsersResponse)(nil), // 5: memos.api.v1.SearchUsersResponse - (*GetUserRequest)(nil), // 6: memos.api.v1.GetUserRequest - (*GetUserAvatarBinaryRequest)(nil), // 7: memos.api.v1.GetUserAvatarBinaryRequest - (*CreateUserRequest)(nil), // 8: memos.api.v1.CreateUserRequest - (*UpdateUserRequest)(nil), // 9: memos.api.v1.UpdateUserRequest - (*DeleteUserRequest)(nil), // 10: memos.api.v1.DeleteUserRequest - (*UserStats)(nil), // 11: memos.api.v1.UserStats - (*ListAllUserStatsRequest)(nil), // 12: memos.api.v1.ListAllUserStatsRequest - (*ListAllUserStatsResponse)(nil), // 13: memos.api.v1.ListAllUserStatsResponse - (*GetUserStatsRequest)(nil), // 14: memos.api.v1.GetUserStatsRequest - (*UserSetting)(nil), // 15: memos.api.v1.UserSetting - (*GetUserSettingRequest)(nil), // 16: memos.api.v1.GetUserSettingRequest - (*UpdateUserSettingRequest)(nil), // 17: memos.api.v1.UpdateUserSettingRequest - (*UserAccessToken)(nil), // 18: memos.api.v1.UserAccessToken - (*ListUserAccessTokensRequest)(nil), // 19: memos.api.v1.ListUserAccessTokensRequest - (*ListUserAccessTokensResponse)(nil), // 20: memos.api.v1.ListUserAccessTokensResponse - (*CreateUserAccessTokenRequest)(nil), // 21: memos.api.v1.CreateUserAccessTokenRequest - (*DeleteUserAccessTokenRequest)(nil), // 22: memos.api.v1.DeleteUserAccessTokenRequest - nil, // 23: memos.api.v1.UserStats.TagCountEntry - (*UserStats_MemoTypeStats)(nil), // 24: memos.api.v1.UserStats.MemoTypeStats - (State)(0), // 25: memos.api.v1.State - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*httpbody.HttpBody)(nil), // 27: google.api.HttpBody - (*fieldmaskpb.FieldMask)(nil), // 28: google.protobuf.FieldMask - (*emptypb.Empty)(nil), // 29: google.protobuf.Empty + (*GetUserRequest)(nil), // 4: memos.api.v1.GetUserRequest + (*GetUserByUsernameRequest)(nil), // 5: memos.api.v1.GetUserByUsernameRequest + (*GetUserAvatarBinaryRequest)(nil), // 6: memos.api.v1.GetUserAvatarBinaryRequest + (*CreateUserRequest)(nil), // 7: memos.api.v1.CreateUserRequest + (*UpdateUserRequest)(nil), // 8: memos.api.v1.UpdateUserRequest + (*DeleteUserRequest)(nil), // 9: memos.api.v1.DeleteUserRequest + (*UserStats)(nil), // 10: memos.api.v1.UserStats + (*ListAllUserStatsRequest)(nil), // 11: memos.api.v1.ListAllUserStatsRequest + (*ListAllUserStatsResponse)(nil), // 12: memos.api.v1.ListAllUserStatsResponse + (*GetUserStatsRequest)(nil), // 13: memos.api.v1.GetUserStatsRequest + (*UserSetting)(nil), // 14: memos.api.v1.UserSetting + (*GetUserSettingRequest)(nil), // 15: memos.api.v1.GetUserSettingRequest + (*UpdateUserSettingRequest)(nil), // 16: memos.api.v1.UpdateUserSettingRequest + (*UserAccessToken)(nil), // 17: memos.api.v1.UserAccessToken + (*ListUserAccessTokensRequest)(nil), // 18: memos.api.v1.ListUserAccessTokensRequest + (*ListUserAccessTokensResponse)(nil), // 19: memos.api.v1.ListUserAccessTokensResponse + (*CreateUserAccessTokenRequest)(nil), // 20: memos.api.v1.CreateUserAccessTokenRequest + (*DeleteUserAccessTokenRequest)(nil), // 21: memos.api.v1.DeleteUserAccessTokenRequest + nil, // 22: memos.api.v1.UserStats.TagCountEntry + (*UserStats_MemoTypeStats)(nil), // 23: memos.api.v1.UserStats.MemoTypeStats + (State)(0), // 24: memos.api.v1.State + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*httpbody.HttpBody)(nil), // 26: google.api.HttpBody + (*fieldmaskpb.FieldMask)(nil), // 27: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 28: google.protobuf.Empty } var file_api_v1_user_service_proto_depIdxs = []int32{ 0, // 0: memos.api.v1.User.role:type_name -> memos.api.v1.User.Role - 25, // 1: memos.api.v1.User.state:type_name -> memos.api.v1.State - 26, // 2: memos.api.v1.User.create_time:type_name -> google.protobuf.Timestamp - 26, // 3: memos.api.v1.User.update_time:type_name -> google.protobuf.Timestamp + 24, // 1: memos.api.v1.User.state:type_name -> memos.api.v1.State + 25, // 2: memos.api.v1.User.create_time:type_name -> google.protobuf.Timestamp + 25, // 3: memos.api.v1.User.update_time:type_name -> google.protobuf.Timestamp 1, // 4: memos.api.v1.ListUsersResponse.users:type_name -> memos.api.v1.User - 1, // 5: memos.api.v1.SearchUsersResponse.users:type_name -> memos.api.v1.User - 27, // 6: memos.api.v1.GetUserAvatarBinaryRequest.http_body:type_name -> google.api.HttpBody - 1, // 7: memos.api.v1.CreateUserRequest.user:type_name -> memos.api.v1.User - 1, // 8: memos.api.v1.UpdateUserRequest.user:type_name -> memos.api.v1.User - 28, // 9: memos.api.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask - 26, // 10: memos.api.v1.UserStats.memo_display_timestamps:type_name -> google.protobuf.Timestamp - 24, // 11: memos.api.v1.UserStats.memo_type_stats:type_name -> memos.api.v1.UserStats.MemoTypeStats - 23, // 12: memos.api.v1.UserStats.tag_count:type_name -> memos.api.v1.UserStats.TagCountEntry - 11, // 13: memos.api.v1.ListAllUserStatsResponse.user_stats:type_name -> memos.api.v1.UserStats - 15, // 14: memos.api.v1.UpdateUserSettingRequest.setting:type_name -> memos.api.v1.UserSetting - 28, // 15: memos.api.v1.UpdateUserSettingRequest.update_mask:type_name -> google.protobuf.FieldMask - 26, // 16: memos.api.v1.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp - 26, // 17: memos.api.v1.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp - 18, // 18: memos.api.v1.ListUserAccessTokensResponse.access_tokens:type_name -> memos.api.v1.UserAccessToken - 26, // 19: memos.api.v1.CreateUserAccessTokenRequest.expires_at:type_name -> google.protobuf.Timestamp - 2, // 20: memos.api.v1.UserService.ListUsers:input_type -> memos.api.v1.ListUsersRequest - 4, // 21: memos.api.v1.UserService.SearchUsers:input_type -> memos.api.v1.SearchUsersRequest - 6, // 22: memos.api.v1.UserService.GetUser:input_type -> memos.api.v1.GetUserRequest - 7, // 23: memos.api.v1.UserService.GetUserAvatarBinary:input_type -> memos.api.v1.GetUserAvatarBinaryRequest - 8, // 24: memos.api.v1.UserService.CreateUser:input_type -> memos.api.v1.CreateUserRequest - 9, // 25: memos.api.v1.UserService.UpdateUser:input_type -> memos.api.v1.UpdateUserRequest - 10, // 26: memos.api.v1.UserService.DeleteUser:input_type -> memos.api.v1.DeleteUserRequest - 12, // 27: memos.api.v1.UserService.ListAllUserStats:input_type -> memos.api.v1.ListAllUserStatsRequest - 14, // 28: memos.api.v1.UserService.GetUserStats:input_type -> memos.api.v1.GetUserStatsRequest - 16, // 29: memos.api.v1.UserService.GetUserSetting:input_type -> memos.api.v1.GetUserSettingRequest - 17, // 30: memos.api.v1.UserService.UpdateUserSetting:input_type -> memos.api.v1.UpdateUserSettingRequest - 19, // 31: memos.api.v1.UserService.ListUserAccessTokens:input_type -> memos.api.v1.ListUserAccessTokensRequest - 21, // 32: memos.api.v1.UserService.CreateUserAccessToken:input_type -> memos.api.v1.CreateUserAccessTokenRequest - 22, // 33: memos.api.v1.UserService.DeleteUserAccessToken:input_type -> memos.api.v1.DeleteUserAccessTokenRequest - 3, // 34: memos.api.v1.UserService.ListUsers:output_type -> memos.api.v1.ListUsersResponse - 5, // 35: memos.api.v1.UserService.SearchUsers:output_type -> memos.api.v1.SearchUsersResponse - 1, // 36: memos.api.v1.UserService.GetUser:output_type -> memos.api.v1.User - 27, // 37: memos.api.v1.UserService.GetUserAvatarBinary:output_type -> google.api.HttpBody - 1, // 38: memos.api.v1.UserService.CreateUser:output_type -> memos.api.v1.User - 1, // 39: memos.api.v1.UserService.UpdateUser:output_type -> memos.api.v1.User - 29, // 40: memos.api.v1.UserService.DeleteUser:output_type -> google.protobuf.Empty - 13, // 41: memos.api.v1.UserService.ListAllUserStats:output_type -> memos.api.v1.ListAllUserStatsResponse - 11, // 42: memos.api.v1.UserService.GetUserStats:output_type -> memos.api.v1.UserStats - 15, // 43: memos.api.v1.UserService.GetUserSetting:output_type -> memos.api.v1.UserSetting - 15, // 44: memos.api.v1.UserService.UpdateUserSetting:output_type -> memos.api.v1.UserSetting - 20, // 45: memos.api.v1.UserService.ListUserAccessTokens:output_type -> memos.api.v1.ListUserAccessTokensResponse - 18, // 46: memos.api.v1.UserService.CreateUserAccessToken:output_type -> memos.api.v1.UserAccessToken - 29, // 47: memos.api.v1.UserService.DeleteUserAccessToken:output_type -> google.protobuf.Empty - 34, // [34:48] is the sub-list for method output_type - 20, // [20:34] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 26, // 5: memos.api.v1.GetUserAvatarBinaryRequest.http_body:type_name -> google.api.HttpBody + 1, // 6: memos.api.v1.CreateUserRequest.user:type_name -> memos.api.v1.User + 1, // 7: memos.api.v1.UpdateUserRequest.user:type_name -> memos.api.v1.User + 27, // 8: memos.api.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask + 25, // 9: memos.api.v1.UserStats.memo_display_timestamps:type_name -> google.protobuf.Timestamp + 23, // 10: memos.api.v1.UserStats.memo_type_stats:type_name -> memos.api.v1.UserStats.MemoTypeStats + 22, // 11: memos.api.v1.UserStats.tag_count:type_name -> memos.api.v1.UserStats.TagCountEntry + 10, // 12: memos.api.v1.ListAllUserStatsResponse.user_stats:type_name -> memos.api.v1.UserStats + 14, // 13: memos.api.v1.UpdateUserSettingRequest.setting:type_name -> memos.api.v1.UserSetting + 27, // 14: memos.api.v1.UpdateUserSettingRequest.update_mask:type_name -> google.protobuf.FieldMask + 25, // 15: memos.api.v1.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp + 25, // 16: memos.api.v1.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp + 17, // 17: memos.api.v1.ListUserAccessTokensResponse.access_tokens:type_name -> memos.api.v1.UserAccessToken + 25, // 18: memos.api.v1.CreateUserAccessTokenRequest.expires_at:type_name -> google.protobuf.Timestamp + 2, // 19: memos.api.v1.UserService.ListUsers:input_type -> memos.api.v1.ListUsersRequest + 4, // 20: memos.api.v1.UserService.GetUser:input_type -> memos.api.v1.GetUserRequest + 5, // 21: memos.api.v1.UserService.GetUserByUsername:input_type -> memos.api.v1.GetUserByUsernameRequest + 6, // 22: memos.api.v1.UserService.GetUserAvatarBinary:input_type -> memos.api.v1.GetUserAvatarBinaryRequest + 7, // 23: memos.api.v1.UserService.CreateUser:input_type -> memos.api.v1.CreateUserRequest + 8, // 24: memos.api.v1.UserService.UpdateUser:input_type -> memos.api.v1.UpdateUserRequest + 9, // 25: memos.api.v1.UserService.DeleteUser:input_type -> memos.api.v1.DeleteUserRequest + 11, // 26: memos.api.v1.UserService.ListAllUserStats:input_type -> memos.api.v1.ListAllUserStatsRequest + 13, // 27: memos.api.v1.UserService.GetUserStats:input_type -> memos.api.v1.GetUserStatsRequest + 15, // 28: memos.api.v1.UserService.GetUserSetting:input_type -> memos.api.v1.GetUserSettingRequest + 16, // 29: memos.api.v1.UserService.UpdateUserSetting:input_type -> memos.api.v1.UpdateUserSettingRequest + 18, // 30: memos.api.v1.UserService.ListUserAccessTokens:input_type -> memos.api.v1.ListUserAccessTokensRequest + 20, // 31: memos.api.v1.UserService.CreateUserAccessToken:input_type -> memos.api.v1.CreateUserAccessTokenRequest + 21, // 32: memos.api.v1.UserService.DeleteUserAccessToken:input_type -> memos.api.v1.DeleteUserAccessTokenRequest + 3, // 33: memos.api.v1.UserService.ListUsers:output_type -> memos.api.v1.ListUsersResponse + 1, // 34: memos.api.v1.UserService.GetUser:output_type -> memos.api.v1.User + 1, // 35: memos.api.v1.UserService.GetUserByUsername:output_type -> memos.api.v1.User + 26, // 36: memos.api.v1.UserService.GetUserAvatarBinary:output_type -> google.api.HttpBody + 1, // 37: memos.api.v1.UserService.CreateUser:output_type -> memos.api.v1.User + 1, // 38: memos.api.v1.UserService.UpdateUser:output_type -> memos.api.v1.User + 28, // 39: memos.api.v1.UserService.DeleteUser:output_type -> google.protobuf.Empty + 12, // 40: memos.api.v1.UserService.ListAllUserStats:output_type -> memos.api.v1.ListAllUserStatsResponse + 10, // 41: memos.api.v1.UserService.GetUserStats:output_type -> memos.api.v1.UserStats + 14, // 42: memos.api.v1.UserService.GetUserSetting:output_type -> memos.api.v1.UserSetting + 14, // 43: memos.api.v1.UserService.UpdateUserSetting:output_type -> memos.api.v1.UserSetting + 19, // 44: memos.api.v1.UserService.ListUserAccessTokens:output_type -> memos.api.v1.ListUserAccessTokensResponse + 17, // 45: memos.api.v1.UserService.CreateUserAccessToken:output_type -> memos.api.v1.UserAccessToken + 28, // 46: memos.api.v1.UserService.DeleteUserAccessToken:output_type -> google.protobuf.Empty + 33, // [33:47] is the sub-list for method output_type + 19, // [19:33] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name } func init() { file_api_v1_user_service_proto_init() } @@ -1743,14 +1693,14 @@ func file_api_v1_user_service_proto_init() { return } file_api_v1_common_proto_init() - file_api_v1_user_service_proto_msgTypes[20].OneofWrappers = []any{} + file_api_v1_user_service_proto_msgTypes[19].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_v1_user_service_proto_rawDesc), len(file_api_v1_user_service_proto_rawDesc)), NumEnums: 1, - NumMessages: 24, + NumMessages: 23, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/gen/api/v1/user_service.pb.gw.go b/proto/gen/api/v1/user_service.pb.gw.go index 0215ce790a404..4615060b348f9 100644 --- a/proto/gen/api/v1/user_service.pb.gw.go +++ b/proto/gen/api/v1/user_service.pb.gw.go @@ -53,38 +53,6 @@ func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtim return msg, metadata, err } -var filter_UserService_SearchUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - -func request_UserService_SearchUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq SearchUsersRequest - metadata runtime.ServerMetadata - ) - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_SearchUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.SearchUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_UserService_SearchUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var ( - protoReq SearchUsersRequest - metadata runtime.ServerMetadata - ) - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_SearchUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.SearchUsers(ctx, &protoReq) - return msg, metadata, err -} - func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var ( protoReq GetUserRequest @@ -121,6 +89,38 @@ func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime. return msg, metadata, err } +var filter_UserService_GetUserByUsername_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + +func request_UserService_GetUserByUsername_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetUserByUsernameRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserByUsername_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetUserByUsername(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_UserService_GetUserByUsername_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetUserByUsernameRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_UserService_GetUserByUsername_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetUserByUsername(ctx, &protoReq) + return msg, metadata, err +} + var filter_UserService_GetUserAvatarBinary_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_UserService_GetUserAvatarBinary_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -633,45 +633,45 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_UserService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodGet, pattern_UserService_SearchUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUser_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.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v1/users:search")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_UserService_SearchUsers_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_UserService_GetUser_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_UserService_SearchUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodGet, pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUserByUsername_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.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}")) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserByUsername", runtime.WithHTTPPathPattern("/api/v1/users:username")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_UserService_GetUser_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_UserService_GetUserByUsername_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_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_UserService_GetUserByUsername_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle(http.MethodGet, pattern_UserService_GetUserAvatarBinary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -950,39 +950,39 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_UserService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodGet, pattern_UserService_SearchUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUser_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.UserService/SearchUsers", runtime.WithHTTPPathPattern("/api/v1/users:search")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_UserService_SearchUsers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_UserService_GetUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_SearchUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle(http.MethodGet, pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_UserService_GetUserByUsername_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.UserService/GetUser", runtime.WithHTTPPathPattern("/api/v1/{name=users/*}")) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.UserService/GetUserByUsername", runtime.WithHTTPPathPattern("/api/v1/users:username")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_UserService_GetUser_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_UserService_GetUserByUsername_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_UserService_GetUserByUsername_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle(http.MethodGet, pattern_UserService_GetUserAvatarBinary_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) @@ -1176,8 +1176,8 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux var ( pattern_UserService_ListUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "")) - pattern_UserService_SearchUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "search")) pattern_UserService_GetUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "name"}, "")) + pattern_UserService_GetUserByUsername_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "username")) pattern_UserService_GetUserAvatarBinary_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"file", "users", "name", "avatar"}, "")) pattern_UserService_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "users"}, "")) pattern_UserService_UpdateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3}, []string{"api", "v1", "users", "user.name"}, "")) @@ -1193,8 +1193,8 @@ var ( var ( forward_UserService_ListUsers_0 = runtime.ForwardResponseMessage - forward_UserService_SearchUsers_0 = runtime.ForwardResponseMessage forward_UserService_GetUser_0 = runtime.ForwardResponseMessage + forward_UserService_GetUserByUsername_0 = runtime.ForwardResponseMessage forward_UserService_GetUserAvatarBinary_0 = runtime.ForwardResponseMessage forward_UserService_CreateUser_0 = runtime.ForwardResponseMessage forward_UserService_UpdateUser_0 = runtime.ForwardResponseMessage diff --git a/proto/gen/api/v1/user_service_grpc.pb.go b/proto/gen/api/v1/user_service_grpc.pb.go index bbb38b7c7eecd..72fe8d55381d9 100644 --- a/proto/gen/api/v1/user_service_grpc.pb.go +++ b/proto/gen/api/v1/user_service_grpc.pb.go @@ -22,8 +22,8 @@ const _ = grpc.SupportPackageIsVersion9 const ( UserService_ListUsers_FullMethodName = "/memos.api.v1.UserService/ListUsers" - UserService_SearchUsers_FullMethodName = "/memos.api.v1.UserService/SearchUsers" UserService_GetUser_FullMethodName = "/memos.api.v1.UserService/GetUser" + UserService_GetUserByUsername_FullMethodName = "/memos.api.v1.UserService/GetUserByUsername" UserService_GetUserAvatarBinary_FullMethodName = "/memos.api.v1.UserService/GetUserAvatarBinary" UserService_CreateUser_FullMethodName = "/memos.api.v1.UserService/CreateUser" UserService_UpdateUser_FullMethodName = "/memos.api.v1.UserService/UpdateUser" @@ -43,10 +43,10 @@ const ( type UserServiceClient interface { // ListUsers returns a list of users. ListUsers(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) - // SearchUsers searches users by filter. - SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error) // GetUser gets a user by name. GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) + // GetUserByUsername gets a user by username. + GetUserByUsername(ctx context.Context, in *GetUserByUsernameRequest, opts ...grpc.CallOption) (*User, error) // GetUserAvatarBinary gets the avatar of a user. GetUserAvatarBinary(ctx context.Context, in *GetUserAvatarBinaryRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error) // CreateUser creates a new user. @@ -89,20 +89,20 @@ func (c *userServiceClient) ListUsers(ctx context.Context, in *ListUsersRequest, return out, nil } -func (c *userServiceClient) SearchUsers(ctx context.Context, in *SearchUsersRequest, opts ...grpc.CallOption) (*SearchUsersResponse, error) { +func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SearchUsersResponse) - err := c.cc.Invoke(ctx, UserService_SearchUsers_FullMethodName, in, out, cOpts...) + out := new(User) + err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *userServiceClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) { +func (c *userServiceClient) GetUserByUsername(ctx context.Context, in *GetUserByUsernameRequest, opts ...grpc.CallOption) (*User, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(User) - err := c.cc.Invoke(ctx, UserService_GetUser_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, UserService_GetUserByUsername_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -225,10 +225,10 @@ func (c *userServiceClient) DeleteUserAccessToken(ctx context.Context, in *Delet type UserServiceServer interface { // ListUsers returns a list of users. ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) - // SearchUsers searches users by filter. - SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error) // GetUser gets a user by name. GetUser(context.Context, *GetUserRequest) (*User, error) + // GetUserByUsername gets a user by username. + GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*User, error) // GetUserAvatarBinary gets the avatar of a user. GetUserAvatarBinary(context.Context, *GetUserAvatarBinaryRequest) (*httpbody.HttpBody, error) // CreateUser creates a new user. @@ -264,12 +264,12 @@ type UnimplementedUserServiceServer struct{} func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } -func (UnimplementedUserServiceServer) SearchUsers(context.Context, *SearchUsersRequest) (*SearchUsersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchUsers not implemented") -} func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } +func (UnimplementedUserServiceServer) GetUserByUsername(context.Context, *GetUserByUsernameRequest) (*User, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserByUsername not implemented") +} func (UnimplementedUserServiceServer) GetUserAvatarBinary(context.Context, *GetUserAvatarBinaryRequest) (*httpbody.HttpBody, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUserAvatarBinary not implemented") } @@ -342,38 +342,38 @@ func _UserService_ListUsers_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _UserService_SearchUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchUsersRequest) +func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserServiceServer).SearchUsers(ctx, in) + return srv.(UserServiceServer).GetUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: UserService_SearchUsers_FullMethodName, + FullMethod: UserService_GetUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).SearchUsers(ctx, req.(*SearchUsersRequest)) + return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest)) } return interceptor(ctx, in, info, handler) } -func _UserService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserRequest) +func _UserService_GetUserByUsername_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserByUsernameRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(UserServiceServer).GetUser(ctx, in) + return srv.(UserServiceServer).GetUserByUsername(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: UserService_GetUser_FullMethodName, + FullMethod: UserService_GetUserByUsername_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).GetUser(ctx, req.(*GetUserRequest)) + return srv.(UserServiceServer).GetUserByUsername(ctx, req.(*GetUserByUsernameRequest)) } return interceptor(ctx, in, info, handler) } @@ -587,14 +587,14 @@ var UserService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListUsers", Handler: _UserService_ListUsers_Handler, }, - { - MethodName: "SearchUsers", - Handler: _UserService_SearchUsers_Handler, - }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, + { + MethodName: "GetUserByUsername", + Handler: _UserService_GetUserByUsername_Handler, + }, { MethodName: "GetUserAvatarBinary", Handler: _UserService_GetUserAvatarBinary_Handler, diff --git a/proto/gen/apidocs.swagger.yaml b/proto/gen/apidocs.swagger.yaml index 47da5d71925cd..d2132fcb33b66 100644 --- a/proto/gen/apidocs.swagger.yaml +++ b/proto/gen/apidocs.swagger.yaml @@ -459,24 +459,22 @@ paths: $ref: '#/definitions/googlerpcStatus' tags: - UserService - /api/v1/users:search: + /api/v1/users:username: get: - summary: SearchUsers searches users by filter. - operationId: UserService_SearchUsers + summary: GetUserByUsername gets a user by username. + operationId: UserService_GetUserByUsername responses: "200": description: A successful response. schema: - $ref: '#/definitions/v1SearchUsersResponse' + $ref: '#/definitions/v1User' default: description: An unexpected error response. schema: $ref: '#/definitions/googlerpcStatus' parameters: - - name: filter - description: |- - Filter is used to filter users returned in the list. - Format: "username == 'frank'" + - name: username + description: The username of the user. in: query required: false type: string @@ -2848,14 +2846,6 @@ definitions: properties: markdown: type: string - v1SearchUsersResponse: - type: object - properties: - users: - type: array - items: - type: object - $ref: '#/definitions/v1User' v1SpoilerNode: type: object properties: diff --git a/server/router/api/v1/resource_name.go b/server/router/api/v1/resource_name.go index 9f342168a1403..3a571a20a01b6 100644 --- a/server/router/api/v1/resource_name.go +++ b/server/router/api/v1/resource_name.go @@ -15,7 +15,6 @@ const ( MemoNamePrefix = "memos/" ResourceNamePrefix = "resources/" InboxNamePrefix = "inboxes/" - StorageNamePrefix = "storages/" IdentityProviderNamePrefix = "identityProviders/" ActivityNamePrefix = "activities/" ) @@ -95,19 +94,6 @@ func ExtractInboxIDFromName(name string) (int32, error) { return id, nil } -// ExtractStorageIDFromName returns the storage ID from a resource name. -func ExtractStorageIDFromName(name string) (int32, error) { - tokens, err := GetNameParentTokens(name, StorageNamePrefix) - if err != nil { - return 0, err - } - id, err := util.ConvertStringToInt32(tokens[0]) - if err != nil { - return 0, errors.Errorf("invalid storage ID %q", tokens[0]) - } - return id, nil -} - func ExtractIdentityProviderIDFromName(name string) (int32, error) { tokens, err := GetNameParentTokens(name, IdentityProviderNamePrefix) if err != nil { diff --git a/server/router/api/v1/user_service.go b/server/router/api/v1/user_service.go index b2e68a010863b..b03d877a09944 100644 --- a/server/router/api/v1/user_service.go +++ b/server/router/api/v1/user_service.go @@ -11,11 +11,9 @@ import ( "time" "github.com/golang-jwt/jwt/v5" - "github.com/google/cel-go/cel" "github.com/labstack/echo/v4" "github.com/pkg/errors" "golang.org/x/crypto/bcrypt" - expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1" "google.golang.org/genproto/googleapis/api/httpbody" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -51,46 +49,27 @@ func (s *APIV1Service) ListUsers(ctx context.Context, _ *v1pb.ListUsersRequest) return response, nil } -func (s *APIV1Service) SearchUsers(ctx context.Context, request *v1pb.SearchUsersRequest) (*v1pb.SearchUsersResponse, error) { - if request.Filter == "" { - return nil, status.Errorf(codes.InvalidArgument, "filter is empty") - } - filter, err := parseSearchUsersFilter(request.Filter) +func (s *APIV1Service) GetUser(ctx context.Context, request *v1pb.GetUserRequest) (*v1pb.User, error) { + userID, err := ExtractUserIDFromName(request.Name) if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "failed to parse filter: %v", err) - } - userFind := &store.FindUser{} - if filter.Username != nil { - userFind.Username = filter.Username - } - if filter.Random { - userFind.Random = true - } - if filter.Limit != nil { - userFind.Limit = filter.Limit + return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err) } - - users, err := s.Store.ListUsers(ctx, userFind) + user, err := s.Store.GetUser(ctx, &store.FindUser{ + ID: &userID, + }) if err != nil { - return nil, status.Errorf(codes.Internal, "failed to search users: %v", err) - } - - response := &v1pb.SearchUsersResponse{ - Users: []*v1pb.User{}, + return nil, status.Errorf(codes.Internal, "failed to get user: %v", err) } - for _, user := range users { - response.Users = append(response.Users, convertUserFromStore(user)) + if user == nil { + return nil, status.Errorf(codes.NotFound, "user not found") } - return response, nil + + return convertUserFromStore(user), nil } -func (s *APIV1Service) GetUser(ctx context.Context, request *v1pb.GetUserRequest) (*v1pb.User, error) { - userID, err := ExtractUserIDFromName(request.Name) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err) - } +func (s *APIV1Service) GetUserByUsername(ctx context.Context, request *v1pb.GetUserByUsernameRequest) (*v1pb.User, error) { user, err := s.Store.GetUser(ctx, &store.FindUser{ - ID: &userID, + Username: &request.Username, }) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get user: %v", err) @@ -599,63 +578,6 @@ func convertUserRoleToStore(role v1pb.User_Role) store.Role { } } -// SearchUsersFilterCELAttributes are the CEL attributes for SearchUsersFilter. -var SearchUsersFilterCELAttributes = []cel.EnvOption{ - cel.Variable("username", cel.StringType), - cel.Variable("random", cel.BoolType), - cel.Variable("limit", cel.IntType), -} - -type SearchUsersFilter struct { - Username *string - Random bool - Limit *int -} - -func parseSearchUsersFilter(expression string) (*SearchUsersFilter, error) { - e, err := cel.NewEnv(SearchUsersFilterCELAttributes...) - if err != nil { - return nil, err - } - ast, issues := e.Compile(expression) - if issues != nil { - return nil, errors.Errorf("found issue %v", issues) - } - filter := &SearchUsersFilter{} - expr, err := cel.AstToParsedExpr(ast) - if err != nil { - return nil, err - } - callExpr := expr.GetExpr().GetCallExpr() - findSearchUsersField(callExpr, filter) - return filter, nil -} - -func findSearchUsersField(callExpr *expr.Expr_Call, filter *SearchUsersFilter) { - if len(callExpr.Args) == 2 { - idExpr := callExpr.Args[0].GetIdentExpr() - if idExpr != nil { - if idExpr.Name == "username" { - username := callExpr.Args[1].GetConstExpr().GetStringValue() - filter.Username = &username - } else if idExpr.Name == "random" { - random := callExpr.Args[1].GetConstExpr().GetBoolValue() - filter.Random = random - } else if idExpr.Name == "limit" { - limit := int(callExpr.Args[1].GetConstExpr().GetInt64Value()) - filter.Limit = &limit - } - return - } - } - for _, arg := range callExpr.Args { - callExpr := arg.GetCallExpr() - if callExpr != nil { - findSearchUsersField(callExpr, filter) - } - } -} - func extractImageInfo(dataURI string) (string, string, error) { dataURIRegex := regexp.MustCompile(`^data:(?P<type>.+);base64,(?P<base64>.+)`) matches := dataURIRegex.FindStringSubmatch(dataURI) diff --git a/web/src/pages/UserProfile.tsx b/web/src/pages/UserProfile.tsx index 410282a9d92f0..4e2ebc9c3b886 100644 --- a/web/src/pages/UserProfile.tsx +++ b/web/src/pages/UserProfile.tsx @@ -32,12 +32,8 @@ const UserProfile = () => { } userStore - .searchUsers(`username == "${username}"`) - .then((users) => { - if (users.length !== 1) { - throw new Error("User not found"); - } - const user = users[0]; + .fetchUserByUsername(username) + .then((user) => { setUser(user); loadingState.setFinish(); }) diff --git a/web/src/store/v1/user.ts b/web/src/store/v1/user.ts index f65a878aa2e0e..483a05c555e9a 100644 --- a/web/src/store/v1/user.ts +++ b/web/src/store/v1/user.ts @@ -63,19 +63,15 @@ export const useUserStore = create( set({ userMapByName: userMap }); return user; }, - listUsers: async () => { - const { users } = await userServiceClient.listUsers({}); + fetchUserByUsername: async (username: string) => { + const user = await userServiceClient.getUserByUsername({ username }); const userMap = get().userMapByName; - for (const user of users) { - userMap[user.name] = user; - } + userMap[user.name] = user; set({ userMapByName: userMap }); - return users; + return user; }, - searchUsers: async (filter: string) => { - const { users } = await userServiceClient.searchUsers({ - filter, - }); + listUsers: async () => { + const { users } = await userServiceClient.listUsers({}); const userMap = get().userMapByName; for (const user of users) { userMap[user.name] = user;
feat
get user by username
3be5ea34a450799bc05ec5ecae820779a1003285
2022-06-22 17:22:06
boojack
chore: update popup button styles
false
diff --git a/web/public/icons/close.svg b/web/public/icons/close.svg index bcd7b76ac8e00..bdebbc330aa06 100644 --- a/web/public/icons/close.svg +++ b/web/public/icons/close.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#37352f"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M12.45 37.65 10.35 35.55 21.9 24 10.35 12.45 12.45 10.35 24 21.9 35.55 10.35 37.65 12.45 26.1 24 37.65 35.55 35.55 37.65 24 26.1Z"/></svg> \ No newline at end of file diff --git a/web/public/icons/edit.svg b/web/public/icons/edit.svg index 156eeeca1527c..82c9eeb011eae 100644 --- a/web/public/icons/edit.svg +++ b/web/public/icons/edit.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#37352f"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"/></svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M9 39H11.2L33.35 16.85L31.15 14.65L9 36.8ZM39.7 14.7 33.3 8.3 35.4 6.2Q36.25 5.35 37.5 5.35Q38.75 5.35 39.6 6.2L41.8 8.4Q42.65 9.25 42.65 10.5Q42.65 11.75 41.8 12.6ZM37.6 16.8 12.4 42H6V35.6L31.2 10.4ZM32.25 15.75 31.15 14.65 33.35 16.85Z"/></svg> \ No newline at end of file diff --git a/web/public/icons/share.svg b/web/public/icons/share.svg index d875437f6b529..e1f86f2639b4f 100644 --- a/web/public/icons/share.svg +++ b/web/public/icons/share.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#37352f"><g><rect fill="none" height="24" width="24"/></g><g><path d="M16,5l-1.42,1.42l-1.59-1.59V16h-1.98V4.83L9.42,6.42L8,5l4-4L16,5z M20,10v11c0,1.1-0.9,2-2,2H6c-1.11,0-2-0.9-2-2V10 c0-1.11,0.89-2,2-2h3v2H6v11h12V10h-3V8h3C19.1,8,20,8.89,20,10z"/></g></svg> \ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M36.35 44Q34 44 32.325 42.325Q30.65 40.65 30.65 38.3Q30.65 37.95 30.725 37.475Q30.8 37 30.95 36.6L15.8 27.8Q15.05 28.65 13.95 29.175Q12.85 29.7 11.7 29.7Q9.35 29.7 7.675 28.025Q6 26.35 6 24Q6 21.6 7.675 19.95Q9.35 18.3 11.7 18.3Q12.85 18.3 13.9 18.75Q14.95 19.2 15.8 20.05L30.95 11.35Q30.8 11 30.725 10.55Q30.65 10.1 30.65 9.7Q30.65 7.3 32.325 5.65Q34 4 36.35 4Q38.75 4 40.4 5.65Q42.05 7.3 42.05 9.7Q42.05 12.05 40.4 13.725Q38.75 15.4 36.35 15.4Q35.2 15.4 34.125 15.025Q33.05 14.65 32.3 13.8L17.15 22.2Q17.25 22.6 17.325 23.125Q17.4 23.65 17.4 24Q17.4 24.35 17.325 24.75Q17.25 25.15 17.15 25.55L32.3 34.15Q33.05 33.45 34.05 33.025Q35.05 32.6 36.35 32.6Q38.75 32.6 40.4 34.25Q42.05 35.9 42.05 38.3Q42.05 40.65 40.4 42.325Q38.75 44 36.35 44ZM36.35 12.4Q37.5 12.4 38.275 11.625Q39.05 10.85 39.05 9.7Q39.05 8.55 38.275 7.775Q37.5 7 36.35 7Q35.2 7 34.425 7.775Q33.65 8.55 33.65 9.7Q33.65 10.85 34.425 11.625Q35.2 12.4 36.35 12.4ZM11.7 26.7Q12.85 26.7 13.625 25.925Q14.4 25.15 14.4 24Q14.4 22.85 13.625 22.075Q12.85 21.3 11.7 21.3Q10.55 21.3 9.775 22.075Q9 22.85 9 24Q9 25.15 9.775 25.925Q10.55 26.7 11.7 26.7ZM36.35 41Q37.5 41 38.275 40.225Q39.05 39.45 39.05 38.3Q39.05 37.15 38.275 36.375Q37.5 35.6 36.35 35.6Q35.2 35.6 34.425 36.375Q33.65 37.15 33.65 38.3Q33.65 39.45 34.425 40.225Q35.2 41 36.35 41ZM36.35 9.7Q36.35 9.7 36.35 9.7Q36.35 9.7 36.35 9.7Q36.35 9.7 36.35 9.7Q36.35 9.7 36.35 9.7Q36.35 9.7 36.35 9.7Q36.35 9.7 36.35 9.7Q36.35 9.7 36.35 9.7Q36.35 9.7 36.35 9.7ZM11.7 24Q11.7 24 11.7 24Q11.7 24 11.7 24Q11.7 24 11.7 24Q11.7 24 11.7 24Q11.7 24 11.7 24Q11.7 24 11.7 24Q11.7 24 11.7 24Q11.7 24 11.7 24ZM36.35 38.3Q36.35 38.3 36.35 38.3Q36.35 38.3 36.35 38.3Q36.35 38.3 36.35 38.3Q36.35 38.3 36.35 38.3Q36.35 38.3 36.35 38.3Q36.35 38.3 36.35 38.3Q36.35 38.3 36.35 38.3Q36.35 38.3 36.35 38.3Z"/></svg> \ No newline at end of file diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsx index 027bdefcaa593..4f4f5e5a84e82 100644 --- a/web/src/components/Memo.tsx +++ b/web/src/components/Memo.tsx @@ -144,17 +144,17 @@ const Memo: React.FC<Props> = (props: Props) => { <div className="more-action-btns-wrapper"> <div className="more-action-btns-container"> <div className="btns-container"> - <div className="btn" onClick={handleGenMemoImageBtnClick}> - <img className="icon-img" src="/icons/share.svg" alt="" /> - <span className="tip-text">Share</span> + <div className="btn" onClick={handleTogglePinMemoBtnClick}> + <img className="icon-img" src="/icons/pin.svg" alt="" /> + <span className="tip-text">{memo.pinned ? "Unpin" : "Pin"}</span> </div> <div className="btn" onClick={handleEditMemoClick}> <img className="icon-img" src="/icons/edit.svg" alt="" /> <span className="tip-text">Edit</span> </div> - <div className="btn" onClick={handleTogglePinMemoBtnClick}> - <img className="icon-img" src="/icons/pin.svg" alt="" /> - <span className="tip-text">{memo.pinned ? "Unpin" : "Pin"}</span> + <div className="btn" onClick={handleGenMemoImageBtnClick}> + <img className="icon-img" src="/icons/share.svg" alt="" /> + <span className="tip-text">Share</span> </div> </div> <span className="btn" onClick={handleShowMemoStoryDialog}> diff --git a/web/src/components/Settings/MyAccountSection.tsx b/web/src/components/Settings/MyAccountSection.tsx index 55f842fca03de..b9bace93ed200 100644 --- a/web/src/components/Settings/MyAccountSection.tsx +++ b/web/src/components/Settings/MyAccountSection.tsx @@ -71,7 +71,7 @@ const MyAccountSection: React.FC<Props> = () => { <label className="form-label input-form-label username-label"> <span className="normal-text">Username:</span> <input type="text" value={username} onChange={handleUsernameChanged} /> - <div className={`btns-container ${username === user.name ? "hidden" : ""}`} onClick={handlePreventDefault}> + <div className={`btns-container ${username === user.name ? "!hidden" : ""}`} onClick={handlePreventDefault}> <span className="btn confirm-btn" onClick={handleConfirmEditUsernameBtnClick}> Save </span> diff --git a/web/src/less/memo.less b/web/src/less/memo.less index b039c1cd103f0..75d88948288e2 100644 --- a/web/src/less/memo.less +++ b/web/src/less/memo.less @@ -93,7 +93,7 @@ @apply w-full relative flex flex-row justify-start items-center; > .btn { - @apply flex flex-row justify-start items-center px-2 py-1 my-1 text-xs rounded-lg border bg-gray-100 border-gray-200 opacity-80 shadow hover:opacity-60; + @apply flex flex-row justify-start items-center pl-2 pr-1 py-1 my-1 text-xs rounded-lg border bg-gray-100 border-gray-200 opacity-80 shadow hover:opacity-60; &.expand-btn { @apply mt-2; diff --git a/web/src/less/setting-dialog.less b/web/src/less/setting-dialog.less index e18e0bba0e66d..e00053e3cf576 100644 --- a/web/src/less/setting-dialog.less +++ b/web/src/less/setting-dialog.less @@ -27,22 +27,21 @@ @apply text-sm mt-4 first:mt-3 mb-1 font-mono text-gray-400; } - >.section-items-container{ + > .section-items-container { @apply w-full h-auto flex flex-row sm:flex-col justify-start items-start; > .section-item { @apply text-base mr-2 sm:mr-0 mt-2 text-gray-700 cursor-pointer hover:opacity-80; - + &.selected { @apply font-bold hover:opacity-100; } } } - } > .section-content-container { - @apply w-full sm:w-auto p-4 px-6 grow flex flex-col justify-start items-start h-128 overflow-y-scroll; + @apply w-full sm:w-auto p-4 sm:px-6 grow flex flex-col justify-start items-start h-128 overflow-y-scroll; > .section-container { .flex(column, flex-start, flex-start); diff --git a/web/src/less/settings/member-section.less b/web/src/less/settings/member-section.less index 8cde12c4a6aba..0741f13419037 100644 --- a/web/src/less/settings/member-section.less +++ b/web/src/less/settings/member-section.less @@ -5,14 +5,14 @@ @apply w-full flex flex-col justify-start items-start; > .input-form-container { - @apply w-full mb-2 flex flex-row justify-start items-center; + @apply w-full mb-3 flex flex-row justify-start items-center; > .field-text { @apply text-sm text-gray-600 w-20 text-right pr-2; } > input { - @apply border rounded text-sm leading-6 shadow-inner py-1 px-2; + @apply border rounded text-sm leading-7 shadow-inner px-2; } } @@ -20,7 +20,7 @@ @apply w-full mb-6 pl-20 flex flex-row justify-start items-center; > button { - @apply border text-sm py-1 px-3 rounded leading-6 shadow hover:opacity-80; + @apply border text-sm px-3 rounded leading-7 shadow hover:opacity-80; } } } diff --git a/web/src/less/settings/my-account-section.less b/web/src/less/settings/my-account-section.less index 5317166f9a95b..7c60d8663025d 100644 --- a/web/src/less/settings/my-account-section.less +++ b/web/src/less/settings/my-account-section.less @@ -5,28 +5,28 @@ min-height: 28px; > .normal-text { - @apply first:mr-2 text-base; + @apply first:mr-2 text-sm; } &.username-label { @apply w-full flex-wrap; > input { - @apply grow-0 shadow-inner w-auto px-2 py-1 mr-2 text-base border rounded leading-6 bg-transparent focus:border-black; + @apply grow-0 w-32 shadow-inner px-2 mr-2 text-sm border rounded leading-7 bg-transparent focus:border-black; } > .btns-container { - @apply mr-2 shrink-0 flex flex-row justify-start items-center; + @apply shrink-0 grow flex flex-row justify-start items-center; > .btn { - @apply text-sm shadow px-4 py-1 leading-6 rounded border hover:opacity-80 bg-gray-50; + @apply text-sm shadow px-2 leading-7 rounded border hover:opacity-80 bg-gray-50; &.cancel-btn { @apply shadow-none border-none bg-transparent; } &.confirm-btn { - @apply bg-green-600 text-white; + @apply bg-green-600 border-green-600 text-white; } } } @@ -34,7 +34,7 @@ &.password-label { > .btn { - @apply text-blue-600 ml-1 cursor-pointer hover:opacity-80; + @apply text-blue-600 text-sm ml-1 cursor-pointer hover:opacity-80; } } } diff --git a/web/src/less/shortcut-list.less b/web/src/less/shortcut-list.less index 72ac7724b0885..674c995c9244b 100644 --- a/web/src/less/shortcut-list.less +++ b/web/src/less/shortcut-list.less @@ -106,11 +106,7 @@ @apply w-24 h-auto p-1 whitespace-nowrap rounded-md bg-white shadow; > .btn { - @apply w-full py-2 px-2 rounded text-sm text-left; - - &:hover { - background-color: @bg-whitegray; - } + @apply w-full py-2 px-3 rounded text-sm text-left hover:bg-gray-100; &.delete-btn { color: @text-red;
chore
update popup button styles
9f3f73072345c9f1f73bafba0b73225e72cf06f0
2022-08-25 18:35:31
Steven
chore: update selector style
false
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index da06af0f184c6..d2188667e8828 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -243,9 +243,19 @@ const MemoEditor: React.FC<Props> = () => { <div className="action-btn tag-action"> <Icon.Hash className="icon-img" /> <div ref={tagSeletorRef} className="tag-list" onClick={handleTagSeletorClick}> - {tags.map((t) => { - return <span key={t}>{t}</span>; - })} + {tags.length > 0 ? ( + tags.map((tag) => { + return ( + <span className="item-container" key={tag}> + {tag} + </span> + ); + }) + ) : ( + <p className="tip-text" onClick={(e) => e.stopPropagation()}> + {t("common.null")} + </p> + )} </div> </div> <button className="action-btn"> diff --git a/web/src/components/common/Selector.tsx b/web/src/components/common/Selector.tsx index 4224845d8a32e..b400ffa3b9a21 100644 --- a/web/src/components/common/Selector.tsx +++ b/web/src/components/common/Selector.tsx @@ -1,4 +1,5 @@ import { memo, useEffect, useRef } from "react"; +import useI18n from "../../hooks/useI18n"; import useToggle from "../../hooks/useToggle"; import Icon from "../Icon"; import "../../less/common/selector.less"; @@ -22,6 +23,7 @@ const nullItem = { const Selector: React.FC<Props> = (props: Props) => { const { className, dataSource, handleValueChanged, value } = props; + const { t } = useI18n(); const [showSelector, toggleSelectorStatus] = useToggle(false); const seletorElRef = useRef<HTMLDivElement>(null); @@ -70,19 +72,23 @@ const Selector: React.FC<Props> = (props: Props) => { </div> <div className={`items-wrapper ${showSelector ? "" : "!hidden"}`}> - {dataSource.map((d) => { - return ( - <div - className={`item-container ${d.value === value ? "selected" : ""}`} - key={d.value} - onClick={() => { - handleItemClick(d); - }} - > - {d.text} - </div> - ); - })} + {dataSource.length > 0 ? ( + dataSource.map((d) => { + return ( + <div + className={`item-container ${d.value === value ? "selected" : ""}`} + key={d.value} + onClick={() => { + handleItemClick(d); + }} + > + {d.text} + </div> + ); + }) + ) : ( + <p className="tip-text">{t("common.null")}</p> + )} </div> </div> ); diff --git a/web/src/less/common/selector.less b/web/src/less/common/selector.less index 64c49f5523c9a..8968abc29b1f8 100644 --- a/web/src/less/common/selector.less +++ b/web/src/less/common/selector.less @@ -39,5 +39,9 @@ color: @text-green; } } + + > .tip-text { + @apply px-3 py-1 text-sm text-gray-600; + } } } diff --git a/web/src/less/memo-editor.less b/web/src/less/memo-editor.less index 11080734c0ab9..39685e3dd28ba 100644 --- a/web/src/less/memo-editor.less +++ b/web/src/less/memo-editor.less @@ -52,9 +52,13 @@ > .tag-list { @apply hidden flex-col justify-start items-start absolute top-6 left-0 mt-1 p-1 z-1 rounded w-32 max-h-52 overflow-auto bg-black; - > span { + > .item-container { @apply w-full text-white cursor-pointer rounded text-sm leading-6 px-2 hover:bg-gray-700; } + + > .tip-text { + @apply w-full text-sm text-gray-200 leading-6 px-2 cursor-default; + } } } } diff --git a/web/src/locales/en.json b/web/src/locales/en.json index 8563f2b4f048a..94ea464a1ee50 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -16,6 +16,7 @@ "edit": "Edit", "restore": "Restore", "delete": "Delete", + "null": "Null", "share": "Share", "mark": "Mark", "archive": "Archive", diff --git a/web/src/locales/zh.json b/web/src/locales/zh.json index 01eb657979c38..47880462592a3 100644 --- a/web/src/locales/zh.json +++ b/web/src/locales/zh.json @@ -16,6 +16,7 @@ "edit": "编辑", "restore": "恢复", "delete": "删除", + "null": "空", "share": "分享", "mark": "标注", "archive": "归档",
chore
update selector style
be525fa3dfd435a49ca50a190d5151170a99159a
2024-03-22 22:33:11
Steven
chore: fix migration script
false
diff --git a/store/db/postgres/migration/prod/0.21/00__user_description.sql b/store/db/postgres/migration/prod/0.21/00__user_description.sql index e7284e4c09092..b8f1aeaf328e2 100644 --- a/store/db/postgres/migration/prod/0.21/00__user_description.sql +++ b/store/db/postgres/migration/prod/0.21/00__user_description.sql @@ -1 +1 @@ -ALTER TABLE user ADD COLUMN description TEXT NOT NULL DEFAULT ''; +ALTER TABLE "user" ADD COLUMN description TEXT NOT NULL DEFAULT '';
chore
fix migration script
7b668f17f54b2d3a40cfb2c1b92d13f2abce93f5
2022-05-21 10:03:18
boojack
chore: rename repo
false
diff --git a/README.md b/README.md index 198ca754ae870..e04afa0bcd76a 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,17 @@ <p align="center">An open source, self-hosted knowledge base that works with a SQLite db file.</p> <p align="center"> - <img alt="GitHub stars" src="https://img.shields.io/github/stars/justmemos/memos" /> + <img alt="GitHub stars" src="https://img.shields.io/github/stars/usememos/memos" /> <img alt="Docker pull" src="https://img.shields.io/docker/pulls/neosmemo/memos.svg" /> - <img alt="Go report" src="https://goreportcard.com/badge/github.com/justmemos/memos" /> + <img alt="Go report" src="https://goreportcard.com/badge/github.com/usememos/memos" /> </p> <p align="center"> <a href="https://memos.onrender.com/">Live Demo</a> • - <a href="https://github.com/justmemos/memos/discussions">Discussions</a> + <a href="https://github.com/usememos/memos/discussions">Discussions</a> </p> -![demo](https://raw.githubusercontent.com/justmemos/memos/main/resources/demo.png) +![demo](https://raw.githubusercontent.com/usememos/memos/main/resources/demo.png) ## 🎯 Intentions @@ -45,7 +45,7 @@ Memos is built with a curated tech stack. It is optimized for developer experien ### Tech Stack -<img alt="tech stack" src="https://raw.githubusercontent.com/justmemos/memos/main/resources/tech-stack.png" width="360" /> +<img alt="tech stack" src="https://raw.githubusercontent.com/usememos/memos/main/resources/tech-stack.png" width="360" /> ### Prerequisites @@ -58,7 +58,7 @@ Memos is built with a curated tech stack. It is optimized for developer experien 1. pull source code ```bash - git clone https://github.com/justmemos/memos + git clone https://github.com/usememos/memos ``` 2. start backend using air(with live reload) @@ -77,7 +77,7 @@ Memos should now be running at [http://localhost:3000](http://localhost:3000) an ## 🌟 Star history -[![Star History Chart](https://api.star-history.com/svg?repos=justmemos/memos&type=Date)](https://star-history.com/#justmemos/memos&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=usememos/memos&type=Date)](https://star-history.com/#usememos/memos&Date) --- diff --git a/server/server.go b/server/server.go index 2ecab4e216998..81357d04ce384 100644 --- a/server/server.go +++ b/server/server.go @@ -45,7 +45,7 @@ func NewServer(profile *common.Profile) *Server { })) // In dev mode, set the const secret key to make login session persistence. - secret := []byte("justmemos") + secret := []byte("usememos") if profile.Mode == "prod" { secret = securecookie.GenerateRandomKey(16) } diff --git a/web/src/components/AboutSiteDialog.tsx b/web/src/components/AboutSiteDialog.tsx index 934349df2a67e..79caff956aea7 100644 --- a/web/src/components/AboutSiteDialog.tsx +++ b/web/src/components/AboutSiteDialog.tsx @@ -42,7 +42,7 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => { </p> <br /> <p> - <a href="https://github.com/justmemos/memos">🏗 Source code</a>, and built by <a href="https://github.com/boojack">Steven 🐯</a>. + <a href="https://github.com/usememos/memos">🏗 Source code</a>, and built by <a href="https://github.com/boojack">Steven 🐯</a>. </p> <Only when={profile !== undefined}> <p className="updated-time-text"> diff --git a/web/vite.config.ts b/web/vite.config.ts index c46bf54c761aa..314b4280e780c 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -9,12 +9,10 @@ export default defineConfig({ proxy: { "/api": { target: "http://localhost:8080/", - // target: "https://memos.justsven.top/", changeOrigin: true, }, "/h/": { target: "http://localhost:8080/", - // target: "https://memos.justsven.top/", changeOrigin: true, }, },
chore
rename repo
3093f80d68c9f47e2e2a76bc9eafac0de315cae6
2023-07-13 12:50:15
Athurg Gooth
fix: visibility param override the user auth state (#1942) fix visibility param override the user auth state
false
diff --git a/api/v1/memo.go b/api/v1/memo.go index 25ce44797af25..a363333f6dbe9 100644 --- a/api/v1/memo.go +++ b/api/v1/memo.go @@ -6,7 +6,6 @@ import ( "fmt" "net/http" "strconv" - "strings" "time" "github.com/labstack/echo/v4" @@ -357,16 +356,21 @@ func (s *APIV1Service) registerMemoRoutes(g *echo.Group) { currentUserID, ok := c.Get(getUserIDContextKey()).(int) if !ok { + // Anonymous use should only fetch PUBLIC memos with specified user if findMemoMessage.CreatorID == nil { return echo.NewHTTPError(http.StatusBadRequest, "Missing user id to find memo") } findMemoMessage.VisibilityList = []store.Visibility{store.Public} } else { - if findMemoMessage.CreatorID == nil { + // Authorized user can fetch all PUBLIC/PROTECTED memo + visibilityList := []store.Visibility{store.Public, store.Protected} + + // If Creator is authorized user (as default), PRIVATE memo is OK + if findMemoMessage.CreatorID == nil || *findMemoMessage.CreatorID == currentUserID { findMemoMessage.CreatorID = &currentUserID - } else { - findMemoMessage.VisibilityList = []store.Visibility{store.Public, store.Protected} + visibilityList = append(visibilityList, store.Private) } + findMemoMessage.VisibilityList = visibilityList } rowStatus := store.RowStatus(c.QueryParam("rowStatus")) @@ -390,14 +394,6 @@ func (s *APIV1Service) registerMemoRoutes(g *echo.Group) { } findMemoMessage.ContentSearch = contentSearch - visibilityListStr := c.QueryParam("visibility") - if visibilityListStr != "" { - visibilityList := []store.Visibility{} - for _, visibility := range strings.Split(visibilityListStr, ",") { - visibilityList = append(visibilityList, store.Visibility(visibility)) - } - findMemoMessage.VisibilityList = visibilityList - } if limit, err := strconv.Atoi(c.QueryParam("limit")); err == nil { findMemoMessage.Limit = &limit }
fix
visibility param override the user auth state (#1942) fix visibility param override the user auth state
6b703c467840d7403063297ab1afa69dffe8dfb1
2023-03-26 18:37:08
CorrectRoadH
feat: add empty placeholder when search result is empty (#1416) * feat: add empty placeholder when search result is empty * Update web/src/pages/ResourcesDashboard.tsx Co-authored-by: boojack <stevenlgtm@gmail.com> --------- Co-authored-by: boojack <stevenlgtm@gmail.com>
false
diff --git a/web/src/pages/ResourcesDashboard.tsx b/web/src/pages/ResourcesDashboard.tsx index 9db8ade358732..bdc63325a7453 100644 --- a/web/src/pages/ResourcesDashboard.tsx +++ b/web/src/pages/ResourcesDashboard.tsx @@ -305,7 +305,7 @@ const ResourcesDashboard = () => { <span></span> </div> )} - {resources.length === 0 ? ( + {resourceList.length === 0 ? ( <p className="w-full text-center text-base my-6 mt-8">{t("resources.no-resources")}</p> ) : ( resourceList
feat
add empty placeholder when search result is empty (#1416) * feat: add empty placeholder when search result is empty * Update web/src/pages/ResourcesDashboard.tsx Co-authored-by: boojack <stevenlgtm@gmail.com> --------- Co-authored-by: boojack <stevenlgtm@gmail.com>
6c01e8409971751592bfb681311b073f6d764d98
2023-08-24 07:29:23
Sandu Liviu Catalin
feat: add configuration option to bind server to specific address (#2165)
false
diff --git a/cmd/memos.go b/cmd/memos.go index edcbd9740fcd3..e1e3f41020876 100644 --- a/cmd/memos.go +++ b/cmd/memos.go @@ -32,6 +32,7 @@ const ( var ( profile *_profile.Profile mode string + addr string port int data string @@ -91,6 +92,7 @@ func init() { cobra.OnInitialize(initConfig) rootCmd.PersistentFlags().StringVarP(&mode, "mode", "m", "demo", `mode of server, can be "prod" or "dev" or "demo"`) + rootCmd.PersistentFlags().StringVarP(&addr, "addr", "a", "", "address of server") rootCmd.PersistentFlags().IntVarP(&port, "port", "p", 8081, "port of server") rootCmd.PersistentFlags().StringVarP(&data, "data", "d", "", "data directory") @@ -98,6 +100,10 @@ func init() { if err != nil { panic(err) } + err = viper.BindPFlag("addr", rootCmd.PersistentFlags().Lookup("addr")) + if err != nil { + panic(err) + } err = viper.BindPFlag("port", rootCmd.PersistentFlags().Lookup("port")) if err != nil { panic(err) @@ -108,6 +114,7 @@ func init() { } viper.SetDefault("mode", "demo") + viper.SetDefault("addr", "") viper.SetDefault("port", 8081) viper.SetEnvPrefix("memos") } @@ -124,6 +131,7 @@ func initConfig() { println("---") println("Server profile") println("dsn:", profile.DSN) + println("addr:", profile.Addr) println("port:", profile.Port) println("mode:", profile.Mode) println("version:", profile.Version) @@ -132,7 +140,11 @@ func initConfig() { func printGreetings() { fmt.Print(greetingBanner) - fmt.Printf("Version %s has been started on port %d\n", profile.Version, profile.Port) + if len(profile.Addr) == 0 { + fmt.Printf("Version %s has been started on port %d\n", profile.Version, profile.Port) + } else { + fmt.Printf("Version %s has been started on address '%s' and port %d\n", profile.Version, profile.Addr, profile.Port) + } fmt.Println("---") fmt.Println("See more in:") fmt.Printf("👉Website: %s\n", "https://usememos.com") diff --git a/server/profile/profile.go b/server/profile/profile.go index 1c0df43989e79..a785c59eb615a 100644 --- a/server/profile/profile.go +++ b/server/profile/profile.go @@ -15,6 +15,8 @@ import ( type Profile struct { // Mode can be "prod" or "dev" or "demo" Mode string `json:"mode"` + // Addr is the binding address for server + Addr string `json:"-"` // Port is the binding port for server Port int `json:"-"` // Data is the data directory diff --git a/server/server.go b/server/server.go index 17d395285d74d..837f21d8dd9a8 100644 --- a/server/server.go +++ b/server/server.go @@ -139,7 +139,7 @@ func (s *Server) Start(ctx context.Context) error { go s.backupRunner.Run(ctx) // Start gRPC server. - listen, err := net.Listen("tcp", fmt.Sprintf(":%d", s.Profile.Port+1)) + listen, err := net.Listen("tcp", fmt.Sprintf("%s:%d", s.Profile.Addr, s.Profile.Port+1)) if err != nil { return err } @@ -152,7 +152,7 @@ func (s *Server) Start(ctx context.Context) error { // programmatically set API version same as the server version apiv1.SwaggerInfo.Version = s.Profile.Version - return s.e.Start(fmt.Sprintf(":%d", s.Profile.Port)) + return s.e.Start(fmt.Sprintf("%s:%d", s.Profile.Addr, s.Profile.Port)) } func (s *Server) Shutdown(ctx context.Context) {
feat
add configuration option to bind server to specific address (#2165)
09586d032c7167f85714d04fa46da1ad91561d55
2024-09-03 18:18:23
johnnyjoy
chore: fix user checks
false
diff --git a/web/src/utils/user.ts b/web/src/utils/user.ts index c2d8769f1d07d..4edaee3b77b0b 100644 --- a/web/src/utils/user.ts +++ b/web/src/utils/user.ts @@ -1,5 +1,5 @@ import { User, User_Role } from "@/types/proto/api/v1/user_service"; -export const isSuperUser = (user: User) => { - return user.role === User_Role.ADMIN || user.role === User_Role.HOST; +export const isSuperUser = (user: User | undefined) => { + return user && (user.role === User_Role.ADMIN || user.role === User_Role.HOST); };
chore
fix user checks
49dd90578bacda7f599e33b4a7c9ad5262a816e5
2023-07-15 17:33:49
Alexandr Tumaykin
fix: add resource.clear to en.json (#1963)
false
diff --git a/web/src/locales/en.json b/web/src/locales/en.json index a123925f2f648..0ce3ef4b9e4dc 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -126,6 +126,7 @@ "upload-successfully": "Upload successfully", "file-drag-drop-prompt": "Drag and drop your file here to upload file", "search-bar-placeholder": "Search resource", + "clear": "Clear", "create-dialog": { "title": "Create Resource", "upload-method": "Upload method",
fix
add resource.clear to en.json (#1963)
e3d76193b909ee09e6fa88a9c7cdd55b852ba4c5
2022-12-02 19:30:03
boojack
chore: update global css (#658)
false
diff --git a/web/src/css/global.css b/web/src/css/global.css index ba2d66a4b9df2..090525131d8c8 100644 --- a/web/src/css/global.css +++ b/web/src/css/global.css @@ -1,6 +1,6 @@ -body, -html { - @apply text-base bg-white dark:bg-zinc-800; +html, +body { + @apply text-base dark:bg-zinc-800; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans", "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
chore
update global css (#658)
f7f4206fa13d335e60cd89399468b6397a81b843
2024-05-08 17:35:16
Steven
chore: fix linter
false
diff --git a/store/db/sqlite/memo.go b/store/db/sqlite/memo.go index 638c6626ded56..099373a75ad2f 100644 --- a/store/db/sqlite/memo.go +++ b/store/db/sqlite/memo.go @@ -7,6 +7,7 @@ import ( "strings" "github.com/pkg/errors" + "github.com/usememos/memos/store" )
chore
fix linter
ba52a786f93dedc6a932577ef9f8f11c33e51b58
2025-03-11 07:53:38
Johnny
chore: update canary image
false
diff --git a/.github/workflows/build-and-push-test-image.yml b/.github/workflows/build-and-push-canary-image.yml similarity index 93% rename from .github/workflows/build-and-push-test-image.yml rename to .github/workflows/build-and-push-canary-image.yml index 6048ece102a5b..5fa1304ca8760 100644 --- a/.github/workflows/build-and-push-test-image.yml +++ b/.github/workflows/build-and-push-canary-image.yml @@ -1,11 +1,11 @@ -name: Build and Push Test Image +name: Build and Push Canary Image on: push: branches: [main] jobs: - build-and-push-test-image: + build-and-push-canary-image: runs-on: ubuntu-latest permissions: contents: read @@ -46,7 +46,7 @@ jobs: flavor: | latest=false tags: | - type=raw,value=test + type=raw,value=canary - name: Build and Push id: docker_build
chore
update canary image
866937787c9438b390ddb3a8f9e5fa107ba52a6f
2023-09-10 09:13:38
Steven
chore: clean duplicated requests
false
diff --git a/web/src/components/LocaleSelect.tsx b/web/src/components/LocaleSelect.tsx index 1251ff88882c0..8c19149dc06bf 100644 --- a/web/src/components/LocaleSelect.tsx +++ b/web/src/components/LocaleSelect.tsx @@ -5,8 +5,8 @@ import Icon from "./Icon"; interface Props { value: Locale; - onChange: (locale: Locale) => void; className?: string; + onChange: (locale: Locale) => void; } const LocaleSelect: FC<Props> = (props: Props) => { diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsx index 877305956bbc3..5aad3d4f07d95 100644 --- a/web/src/components/Memo.tsx +++ b/web/src/components/Memo.tsx @@ -229,7 +229,7 @@ const Memo: React.FC<Props> = (props: Props) => { <> <Link className="flex flex-row justify-start items-center" to={`/u/${memo.creatorUsername}`}> <UserAvatar className="!w-5 !h-auto mr-1" avatarUrl={creator.avatarUrl} /> - <span className="text-sm text-gray-600 max-w-[8em] truncate dark:text-zinc-300">{creator.nickname}</span> + <span className="text-sm text-gray-600 max-w-[8em] truncate dark:text-gray-400">{creator.nickname}</span> </Link> <Icon.Dot className="w-4 h-auto text-gray-400 dark:text-zinc-400" /> </> diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index b2823460c9e69..90120346c6058 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -15,7 +15,8 @@ const MemoList: React.FC = () => { const userStore = useUserStore(); const filterStore = useFilterStore(); const filter = filterStore.state; - const { memos, isFetching } = memoStore.state; + const { memos } = memoStore.state; + const [isFetching, setIsFetching] = useState<boolean>(true); const [isComplete, setIsComplete] = useState<boolean>(false); const currentUsername = userStore.getCurrentUsername(); @@ -82,6 +83,7 @@ const MemoList: React.FC = () => { } else { setIsComplete(false); } + setIsFetching(false); }) .catch((error) => { console.error(error); @@ -122,12 +124,14 @@ const MemoList: React.FC = () => { const handleFetchMoreClick = async () => { try { + setIsFetching(true); const fetchedMemos = await memoStore.fetchMemos(DEFAULT_MEMO_LIMIT, memos.length); if (fetchedMemos.length < DEFAULT_MEMO_LIMIT) { setIsComplete(true); } else { setIsComplete(false); } + setIsFetching(false); } catch (error: any) { console.error(error); toast.error(error.response.data.message); diff --git a/web/src/components/Settings/MemberSection.tsx b/web/src/components/Settings/MemberSection.tsx index 695d6969414ea..6aef6bf31168b 100644 --- a/web/src/components/Settings/MemberSection.tsx +++ b/web/src/components/Settings/MemberSection.tsx @@ -136,17 +136,17 @@ const PreferencesSection = () => { <div className="inline-block min-w-full align-middle"> <table className="min-w-full divide-y divide-gray-300"> <thead> - <tr> - <th scope="col" className="py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900"> + <tr className="text-sm font-semibold text-left text-gray-900 dark:text-gray-300"> + <th scope="col" className="py-2 pl-4 pr-3"> ID </th> - <th scope="col" className="px-3 py-2 text-left text-sm font-semibold text-gray-900"> + <th scope="col" className="px-3 py-2"> {t("common.username")} </th> - <th scope="col" className="px-3 py-2 text-left text-sm font-semibold text-gray-900"> + <th scope="col" className="px-3 py-2"> {t("common.nickname")} </th> - <th scope="col" className="px-3 py-2 text-left text-sm font-semibold text-gray-900"> + <th scope="col" className="px-3 py-2"> {t("common.email")} </th> <th scope="col" className="relative py-2 pl-3 pr-4"></th> @@ -155,13 +155,13 @@ const PreferencesSection = () => { <tbody className="divide-y divide-gray-200"> {userList.map((user) => ( <tr key={user.id}> - <td className="whitespace-nowrap py-2 pl-4 pr-3 text-sm text-gray-900">{user.id}</td> - <td className="whitespace-nowrap px-3 py-2 text-sm text-gray-500"> + <td className="whitespace-nowrap py-2 pl-4 pr-3 text-sm text-gray-900 dark:text-gray-300">{user.id}</td> + <td className="whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-300"> {user.username} <span className="ml-1 italic">{user.rowStatus === "ARCHIVED" && "(Archived)"}</span> </td> - <td className="whitespace-nowrap px-3 py-2 text-sm text-gray-500">{user.nickname}</td> - <td className="whitespace-nowrap px-3 py-2 text-sm text-gray-500">{user.email}</td> + <td className="whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-300">{user.nickname}</td> + <td className="whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-300">{user.email}</td> <td className="relative whitespace-nowrap py-2 pl-3 pr-4 text-right text-sm font-medium flex justify-end"> {currentUser?.id === user.id ? ( <span>{t("common.yourself")}</span> diff --git a/web/src/components/UsageHeatMap.tsx b/web/src/components/UsageHeatMap.tsx index 154f504b53794..e83270b4f68e4 100644 --- a/web/src/components/UsageHeatMap.tsx +++ b/web/src/components/UsageHeatMap.tsx @@ -3,6 +3,7 @@ import { getMemoStats } from "@/helpers/api"; import { DAILY_TIMESTAMP } from "@/helpers/consts"; import { getDateStampByDate, getDateString, getTimeStampByDate } from "@/helpers/datetime"; import * as utils from "@/helpers/utils"; +import { useUserV1Store } from "@/store/v1"; import { useTranslate } from "@/utils/i18n"; import { useFilterStore, useMemoStore, useUserStore } from "../store/module"; import "@/less/usage-heat-map.less"; @@ -32,6 +33,7 @@ const UsageHeatMap = () => { const t = useTranslate(); const filterStore = useFilterStore(); const userStore = useUserStore(); + const userV1Store = useUserV1Store(); const memoStore = useMemoStore(); const todayTimeStamp = getDateStampByDate(Date.now()); const todayDay = new Date(todayTimeStamp).getDay() + 1; @@ -47,7 +49,7 @@ const UsageHeatMap = () => { const currentUsername = userStore.getCurrentUsername(); useEffect(() => { - userStore.getUserByUsername(currentUsername).then((user) => { + userV1Store.getOrFetchUserByUsername(currentUsername).then((user) => { if (!user) { return; } @@ -56,6 +58,10 @@ const UsageHeatMap = () => { }, [currentUsername]); useEffect(() => { + if (memos.length === 0) { + return; + } + getMemoStats(currentUsername) .then(({ data }) => { setMemoAmount(data.length); diff --git a/web/src/components/UserAvatar.tsx b/web/src/components/UserAvatar.tsx index 4832d24e41895..ce9535f07ab80 100644 --- a/web/src/components/UserAvatar.tsx +++ b/web/src/components/UserAvatar.tsx @@ -9,7 +9,11 @@ const UserAvatar = (props: Props) => { const { avatarUrl, className } = props; return ( <div className={classNames(`w-8 h-auto overflow-clip rounded-full`, className)}> - <img className="w-full h-auto rounded-full min-w-full min-h-full object-cover" src={avatarUrl || "/logo.webp"} alt="" /> + <img + className="w-full h-auto rounded-full min-w-full min-h-full object-cover dark:opacity-80" + src={avatarUrl || "/logo.webp"} + alt="" + /> </div> ); }; diff --git a/web/src/css/global.css b/web/src/css/global.css index a29ddc72b1424..e695920ea70c9 100644 --- a/web/src/css/global.css +++ b/web/src/css/global.css @@ -1,9 +1,6 @@ html, body { @apply text-base w-full h-full overflow-hidden dark:bg-zinc-800; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans", - "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", "WenQuanYi Micro Hei", "Apple Color Emoji", "Segoe UI Emoji", - "Segoe UI Symbol", "Noto Color Emoji", sans-serif; } #root { diff --git a/web/src/pages/Auth.tsx b/web/src/pages/Auth.tsx index a990068ef2acb..7f95579f1bbc1 100644 --- a/web/src/pages/Auth.tsx +++ b/web/src/pages/Auth.tsx @@ -143,7 +143,7 @@ const Auth = () => { className="w-full" size="lg" type="text" - disabled={actionBtnLoadingState.isLoading} + readOnly={actionBtnLoadingState.isLoading} placeholder={t("common.username")} value={username} onChange={handleUsernameInputChanged} @@ -153,7 +153,7 @@ const Auth = () => { className="w-full" size="lg" type="password" - disabled={actionBtnLoadingState.isLoading} + readOnly={actionBtnLoadingState.isLoading} placeholder={t("common.password")} value={password} onChange={handlePasswordInputChanged} diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsx index 1d473864fd154..d6fe8815c83e1 100644 --- a/web/src/pages/Home.tsx +++ b/web/src/pages/Home.tsx @@ -6,17 +6,19 @@ import MemoFilter from "@/components/MemoFilter"; import MemoList from "@/components/MemoList"; import MobileHeader from "@/components/MobileHeader"; import { useGlobalStore, useUserStore } from "@/store/module"; +import { useUserV1Store } from "@/store/v1"; import { useTranslate } from "@/utils/i18n"; const Home = () => { const t = useTranslate(); const globalStore = useGlobalStore(); const userStore = useUserStore(); + const userV1Store = useUserV1Store(); const user = userStore.state.user; useEffect(() => { const currentUsername = userStore.getCurrentUsername(); - userStore.getUserByUsername(currentUsername).catch((error) => { + userV1Store.getOrFetchUserByUsername(currentUsername).catch((error) => { console.error(error); toast.error(t("message.user-not-found")); }); diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index 949b44c869217..48c442f4ab717 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -5,12 +5,13 @@ import FloatingNavButton from "@/components/FloatingNavButton"; import Memo from "@/components/Memo"; import UserAvatar from "@/components/UserAvatar"; import useLoading from "@/hooks/useLoading"; -import { useMemoStore, useUserStore } from "@/store/module"; +import { useMemoStore } from "@/store/module"; +import { useUserV1Store } from "@/store/v1"; const MemoDetail = () => { const params = useParams(); const memoStore = useMemoStore(); - const userStore = useUserStore(); + const userV1Store = useUserV1Store(); const loadingState = useLoading(); const [user, setUser] = useState<User>(); const memoId = Number(params.memoId); @@ -21,7 +22,7 @@ const MemoDetail = () => { memoStore .fetchMemoById(memoId) .then(async (memo) => { - const user = await userStore.getUserByUsername(memo.creatorUsername); + const user = await userV1Store.getOrFetchUserByUsername(memo.creatorUsername); setUser(user); loadingState.setFinish(); }) diff --git a/web/src/pages/UserProfile.tsx b/web/src/pages/UserProfile.tsx index 862be4b9c09ff..5d18dc48c6f88 100644 --- a/web/src/pages/UserProfile.tsx +++ b/web/src/pages/UserProfile.tsx @@ -6,18 +6,20 @@ import MemoList from "@/components/MemoList"; import UserAvatar from "@/components/UserAvatar"; import useLoading from "@/hooks/useLoading"; import { useUserStore } from "@/store/module"; +import { useUserV1Store } from "@/store/v1"; import { useTranslate } from "@/utils/i18n"; const UserProfile = () => { const t = useTranslate(); const userStore = useUserStore(); + const userV1Store = useUserV1Store(); const loadingState = useLoading(); const [user, setUser] = useState<User>(); useEffect(() => { const currentUsername = userStore.getCurrentUsername(); - userStore - .getUserByUsername(currentUsername) + userV1Store + .getOrFetchUserByUsername(currentUsername) .then((user) => { setUser(user); loadingState.setFinish(); diff --git a/web/src/store/module/memo.ts b/web/src/store/module/memo.ts index 111b9fffedf0e..e94280bac72db 100644 --- a/web/src/store/module/memo.ts +++ b/web/src/store/module/memo.ts @@ -2,7 +2,7 @@ import { omit } from "lodash-es"; import * as api from "@/helpers/api"; import { DEFAULT_MEMO_LIMIT } from "@/helpers/consts"; import store, { useAppSelector } from "../"; -import { createMemo, deleteMemo, patchMemo, setIsFetching, upsertMemos } from "../reducer/memo"; +import { createMemo, deleteMemo, patchMemo, upsertMemos } from "../reducer/memo"; import { useMemoCacheStore } from "../v1"; import { useUserStore } from "./"; @@ -34,7 +34,6 @@ export const useMemoStore = () => { return store.getState().memo; }, fetchMemos: async (limit = DEFAULT_MEMO_LIMIT, offset = 0) => { - store.dispatch(setIsFetching(true)); const memoFind: MemoFind = { rowStatus: "NORMAL", limit, @@ -46,26 +45,20 @@ export const useMemoStore = () => { const { data } = await api.getMemoList(memoFind); const fetchedMemos = data.map((m) => convertResponseModelMemo(m)); store.dispatch(upsertMemos(fetchedMemos)); - store.dispatch(setIsFetching(false)); - for (const m of fetchedMemos) { memoCacheStore.setMemoCache(m); } - return fetchedMemos; }, fetchAllMemos: async (limit = DEFAULT_MEMO_LIMIT, offset?: number) => { - store.dispatch(setIsFetching(true)); const memoFind: MemoFind = { rowStatus: "NORMAL", limit, offset, }; - const { data } = await api.getAllMemos(memoFind); const fetchedMemos = data.map((m) => convertResponseModelMemo(m)); store.dispatch(upsertMemos(fetchedMemos)); - store.dispatch(setIsFetching(false)); for (const m of fetchedMemos) { memoCacheStore.setMemoCache(m); diff --git a/web/src/store/module/user.ts b/web/src/store/module/user.ts index 34f01968cc852..022fdade73164 100644 --- a/web/src/store/module/user.ts +++ b/web/src/store/module/user.ts @@ -5,7 +5,7 @@ import storage from "@/helpers/storage"; import { getSystemColorScheme } from "@/helpers/utils"; import store, { useAppSelector } from ".."; import { setAppearance, setLocale } from "../reducer/global"; -import { patchUser, setHost, setUser, setUserById } from "../reducer/user"; +import { patchUser, setHost, setUser } from "../reducer/user"; const defaultSetting: Setting = { locale: "en", @@ -118,16 +118,6 @@ export const useUserStore = () => { return state.user?.username || UNKNOWN_USERNAME; } }, - getUserByUsername: async (username: string) => { - const { data } = await api.getUserByUsername(username); - if (data) { - const user = convertResponseModelUser(data); - store.dispatch(setUserById(user)); - return user; - } else { - return undefined; - } - }, upsertUserSetting: async (key: string, value: any) => { await api.upsertUserSetting({ key: key as any, diff --git a/web/src/store/reducer/memo.ts b/web/src/store/reducer/memo.ts index be0039113908b..c4aaa8120989a 100644 --- a/web/src/store/reducer/memo.ts +++ b/web/src/store/reducer/memo.ts @@ -3,15 +3,12 @@ import { uniqBy } from "lodash-es"; interface State { memos: Memo[]; - isFetching: boolean; } const memoSlice = createSlice({ name: "memo", initialState: { memos: [], - // isFetching flag should starts with true. - isFetching: true, } as State, reducers: { upsertMemos: (state, action: PayloadAction<Memo[]>) => { @@ -51,15 +48,9 @@ const memoSlice = createSlice({ }), }; }, - setIsFetching: (state, action: PayloadAction<boolean>) => { - return { - ...state, - isFetching: action.payload, - }; - }, }, }); -export const { upsertMemos, createMemo, patchMemo, deleteMemo, setIsFetching } = memoSlice.actions; +export const { upsertMemos, createMemo, patchMemo, deleteMemo } = memoSlice.actions; export default memoSlice.reducer; diff --git a/web/src/store/reducer/user.ts b/web/src/store/reducer/user.ts index b4b59a723e6f2..57cae6d3c3d26 100644 --- a/web/src/store/reducer/user.ts +++ b/web/src/store/reducer/user.ts @@ -1,19 +1,15 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; -import { cloneDeep } from "lodash-es"; interface State { // host is the user who hist the system host?: User; // user is the user who is currently logged in user?: User; - userById: { [key: UserId]: User }; } const userSlice = createSlice({ name: "user", - initialState: { - userById: {}, - } as State, + initialState: {} as State, reducers: { setHost: (state, action: PayloadAction<User | undefined>) => { return { @@ -27,14 +23,6 @@ const userSlice = createSlice({ user: action.payload, }; }, - setUserById: (state, action: PayloadAction<User>) => { - const userById = cloneDeep(state.userById); - userById[action.payload.id] = action.payload; - return { - ...state, - userById: userById, - }; - }, patchUser: (state, action: PayloadAction<Partial<User>>) => { return { ...state, @@ -47,6 +35,6 @@ const userSlice = createSlice({ }, }); -export const { setHost, setUser, setUserById, patchUser } = userSlice.actions; +export const { setHost, setUser, patchUser } = userSlice.actions; export default userSlice.reducer; diff --git a/web/src/store/v1/user.ts b/web/src/store/v1/user.ts index 86d42d7ddc852..9d72670ed9b11 100644 --- a/web/src/store/v1/user.ts +++ b/web/src/store/v1/user.ts @@ -8,6 +8,9 @@ interface UserV1Store { getUserByUsername: (username: string) => User; } +// Request cache is used to prevent multiple requests. +const requestCache = new Map<string, Promise<any>>(); + const useUserV1Store = create<UserV1Store>()((set, get) => ({ userMapByUsername: {}, getOrFetchUserByUsername: async (username: string) => { @@ -15,8 +18,14 @@ const useUserV1Store = create<UserV1Store>()((set, get) => ({ if (userMap[username]) { return userMap[username] as User; } + if (requestCache.has(username)) { + return await requestCache.get(username); + } - const { data } = await api.getUserByUsername(username); + const promise = api.getUserByUsername(username); + requestCache.set(username, promise); + const { data } = await promise; + requestCache.delete(username); const user = convertResponseModelUser(data); userMap[username] = user; set(userMap);
chore
clean duplicated requests
c0628ef95b1369e315b41b3a18dca63012431365
2023-11-22 20:28:04
Steven
chore: migrate create user
false
diff --git a/web/src/components/Settings/MemberSection.tsx b/web/src/components/Settings/MemberSection.tsx index a5651d41f244c..6bb0eac332244 100644 --- a/web/src/components/Settings/MemberSection.tsx +++ b/web/src/components/Settings/MemberSection.tsx @@ -1,9 +1,11 @@ import { Button, Dropdown, Input, Menu, MenuButton } from "@mui/joy"; import React, { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; +import { userServiceClient } from "@/grpcweb"; import * as api from "@/helpers/api"; import { useUserStore } from "@/store/module"; import { UserNamePrefix } from "@/store/v1"; +import { User_Role } from "@/types/proto/api/v2/user_service"; import { useTranslate } from "@/utils/i18n"; import showChangeMemberPasswordDialog from "../ChangeMemberPasswordDialog"; import { showCommonDialog } from "../Dialog/CommonDialog"; @@ -53,16 +55,16 @@ const MemberSection = () => { return; } - const userCreate: UserCreate = { - username: state.createUserUsername, - password: state.createUserPassword, - role: "USER", - }; - try { - await api.createUser(userCreate); + await userServiceClient.createUser({ + user: { + name: `${UserNamePrefix}${state.createUserUsername}`, + password: state.createUserPassword, + role: User_Role.USER, + }, + }); } catch (error: any) { - toast.error(error.response.data.message); + toast.error(error.details); } await fetchUserList(); setState({ diff --git a/web/src/helpers/api.ts b/web/src/helpers/api.ts index a43534721cfbc..5c330eaf097cf 100644 --- a/web/src/helpers/api.ts +++ b/web/src/helpers/api.ts @@ -44,10 +44,6 @@ export function signout() { return axios.post("/api/v1/auth/signout"); } -export function createUser(userCreate: UserCreate) { - return axios.post<User>("/api/v1/user", userCreate); -} - export function getMyselfUser() { return axios.get<User>("/api/v1/user/me"); }
chore
migrate create user
b2fc3076f6f0a2daaafe557bb74b4b7ea1c51d94
2024-01-20 22:53:55
Steven
chore: update memo store
false
diff --git a/store/db/mysql/memo.go b/store/db/mysql/memo.go index 7b14686d54b1c..5b2e053554277 100644 --- a/store/db/mysql/memo.go +++ b/store/db/mysql/memo.go @@ -12,9 +12,9 @@ import ( ) func (d *DB) CreateMemo(ctx context.Context, create *store.Memo) (*store.Memo, error) { - fields := []string{"`creator_id`", "`content`", "`visibility`"} - placeholder := []string{"?", "?", "?"} - args := []any{create.CreatorID, create.Content, create.Visibility} + fields := []string{"`resource_name`", "`creator_id`", "`content`", "`visibility`"} + placeholder := []string{"?", "?", "?", "?"} + args := []any{create.ResourceName, create.CreatorID, create.Content, create.Visibility} stmt := "INSERT INTO `memo` (" + strings.Join(fields, ", ") + ") VALUES (" + strings.Join(placeholder, ", ") + ")" result, err := d.db.ExecContext(ctx, stmt, args...) @@ -43,6 +43,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo if v := find.ID; v != nil { where, args = append(where, "`memo`.`id` = ?"), append(args, *v) } + if v := find.ResourceName; v != nil { + where, args = append(where, "`memo`.`resource_name` = ?"), append(args, *v) + } if v := find.CreatorID; v != nil { where, args = append(where, "`memo`.`creator_id` = ?"), append(args, *v) } @@ -91,6 +94,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo fields := []string{ "`memo`.`id` AS `id`", + "`memo`.`resource_name` AS `resource_name`", "`memo`.`creator_id` AS `creator_id`", "UNIX_TIMESTAMP(`memo`.`created_ts`) AS `created_ts`", "UNIX_TIMESTAMP(`memo`.`updated_ts`) AS `updated_ts`", @@ -122,6 +126,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo var memo store.Memo dests := []any{ &memo.ID, + &memo.ResourceName, &memo.CreatorID, &memo.CreatedTs, &memo.UpdatedTs, @@ -161,6 +166,9 @@ func (d *DB) GetMemo(ctx context.Context, find *store.FindMemo) (*store.Memo, er func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error { set, args := []string{}, []any{} + if v := update.ResourceName; v != nil { + set, args = append(set, "`resource_name` = ?"), append(args, *v) + } if v := update.CreatedTs; v != nil { set, args = append(set, "`created_ts` = FROM_UNIXTIME(?)"), append(args, *v) } diff --git a/store/db/mysql/migration/dev/LATEST__SCHEMA.sql b/store/db/mysql/migration/dev/LATEST__SCHEMA.sql index 2ff4b65e7e598..b5379a3483b4f 100644 --- a/store/db/mysql/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/mysql/migration/dev/LATEST__SCHEMA.sql @@ -36,6 +36,7 @@ CREATE TABLE `user_setting` ( -- memo CREATE TABLE `memo` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + `resource_name` VARCHAR(256) NOT NULL UNIQUE, `creator_id` INT NOT NULL, `created_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, diff --git a/store/db/postgres/memo.go b/store/db/postgres/memo.go index f363818f9b8da..ad74a372471d8 100644 --- a/store/db/postgres/memo.go +++ b/store/db/postgres/memo.go @@ -12,8 +12,8 @@ import ( ) func (d *DB) CreateMemo(ctx context.Context, create *store.Memo) (*store.Memo, error) { - fields := []string{"creator_id", "content", "visibility"} - args := []any{create.CreatorID, create.Content, create.Visibility} + fields := []string{"resource_name", "creator_id", "content", "visibility"} + args := []any{create.ResourceName, create.CreatorID, create.Content, create.Visibility} stmt := "INSERT INTO memo (" + strings.Join(fields, ", ") + ") VALUES (" + placeholders(len(args)) + ") RETURNING id, created_ts, updated_ts, row_status" if err := d.db.QueryRowContext(ctx, stmt, args...).Scan( @@ -34,6 +34,9 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo if v := find.ID; v != nil { where, args = append(where, "memo.id = "+placeholder(len(args)+1)), append(args, *v) } + if v := find.ResourceName; v != nil { + where, args = append(where, "memo.resource_name = "+placeholder(len(args)+1)), append(args, *v) + } if v := find.CreatorID; v != nil { where, args = append(where, "memo.creator_id = "+placeholder(len(args)+1)), append(args, *v) } @@ -82,6 +85,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo fields := []string{ `memo.id AS id`, + `memo.resource_name AS resource_name`, `memo.creator_id AS creator_id`, `memo.created_ts AS created_ts`, `memo.updated_ts AS updated_ts`, @@ -118,6 +122,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo var memo store.Memo dests := []any{ &memo.ID, + &memo.ResourceName, &memo.CreatorID, &memo.CreatedTs, &memo.UpdatedTs, @@ -157,6 +162,9 @@ func (d *DB) GetMemo(ctx context.Context, find *store.FindMemo) (*store.Memo, er func (d *DB) UpdateMemo(ctx context.Context, update *store.UpdateMemo) error { set, args := []string{}, []any{} + if v := update.ResourceName; v != nil { + set, args = append(set, "resource_name = "+placeholder(len(args)+1)), append(args, *v) + } if v := update.CreatedTs; v != nil { set, args = append(set, "created_ts = "+placeholder(len(args)+1)), append(args, *v) } diff --git a/store/db/postgres/migration/dev/LATEST__SCHEMA.sql b/store/db/postgres/migration/dev/LATEST__SCHEMA.sql index 8c414fd1c0ca4..b31e5f4eb3707 100644 --- a/store/db/postgres/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/postgres/migration/dev/LATEST__SCHEMA.sql @@ -36,6 +36,7 @@ CREATE TABLE user_setting ( -- memo CREATE TABLE memo ( id SERIAL PRIMARY KEY, + resource_name TEXT NOT NULL UNIQUE, creator_id INTEGER NOT NULL, created_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()), updated_ts BIGINT NOT NULL DEFAULT EXTRACT(EPOCH FROM NOW()),
chore
update memo store
41ad084489b08d6a8ccbf31d953552c431625bc9
2022-12-22 15:15:12
Zeng1998
fix: fix css of input placeholder in auth page (#824)
false
diff --git a/web/src/less/auth.less b/web/src/less/auth.less index 90bd158ced613..e1bf57671c915 100644 --- a/web/src/less/auth.less +++ b/web/src/less/auth.less @@ -34,7 +34,7 @@ @apply flex flex-col justify-start items-start relative w-full text-base mt-2; > .normal-text { - @apply absolute top-3 left-3 px-1 leading-10 flex-shrink-0 text-base cursor-text text-gray-400 bg-transparent transition-all select-none; + @apply absolute top-3 left-3 px-1 leading-10 flex-shrink-0 text-base cursor-text text-gray-400 bg-transparent transition-all select-none pointer-events-none; &.not-null { @apply text-sm top-0 z-10 leading-4 bg-zinc-100 dark:bg-zinc-800 rounded;
fix
fix css of input placeholder in auth page (#824)
be5e24c0eb74c3914a3e0b33a03e962fb4f82bdb
2025-02-02 16:13:26
johnnyjoy
refactor: renovate list memos endpoint
false
diff --git a/proto/api/v1/common.proto b/proto/api/v1/common.proto index ba95ea416e52c..6c5fcf8805a1d 100644 --- a/proto/api/v1/common.proto +++ b/proto/api/v1/common.proto @@ -15,3 +15,9 @@ message PageToken { int32 limit = 1; int32 offset = 2; } + +enum Direction { + DIRECTION_UNSPECIFIED = 0; + ASC = 1; + DESC = 2; +} diff --git a/proto/api/v1/memo_service.proto b/proto/api/v1/memo_service.proto index 07ba4def52eb6..af698dacd0ead 100644 --- a/proto/api/v1/memo_service.proto +++ b/proto/api/v1/memo_service.proto @@ -26,7 +26,10 @@ service MemoService { } // ListMemos lists memos with pagination and filter. rpc ListMemos(ListMemosRequest) returns (ListMemosResponse) { - option (google.api.http) = {get: "/api/v1/memos"}; + option (google.api.http) = { + get: "/api/v1/memos" + additional_bindings: {get: "/api/v1/{parent=users/*}/memos"} + }; } // GetMemo gets a memo. rpc GetMemo(GetMemoRequest) returns (Memo) { @@ -190,16 +193,36 @@ message CreateMemoRequest { } message ListMemosRequest { + // The parent is the owner of the memos. + // If not specified or `users/-`, it will list all memos. + string parent = 1; + // The maximum number of memos to return. - int32 page_size = 1; + int32 page_size = 2; // A page token, received from a previous `ListMemos` call. // Provide this to retrieve the subsequent page. - string page_token = 2; + string page_token = 3; + + // The state of the memos to list. + // Default to `NORMAL`. Set to `ARCHIVED` to list archived memos. + State state = 4; + + // What field to sort the results by. + // Default to display_time. + string sort = 5; + + // The direction to sort the results by. + // Default to DESC. + Direction direction = 6; + + // Filter is a CEL expression to filter memos. + // Refer to `Shortcut.filter`. + string filter = 7; - // Filter is used to filter memos returned in the list. + // [Deprecated] Old filter contains some specific conditions to filter memos. // Format: "creator == 'users/{user}' && visibilities == ['PUBLIC', 'PROTECTED']" - string filter = 3; + string old_filter = 8; } message ListMemosResponse { diff --git a/proto/gen/api/v1/common.pb.go b/proto/gen/api/v1/common.pb.go index b9ce6a8f95db8..6630b5e172e86 100644 --- a/proto/gen/api/v1/common.pb.go +++ b/proto/gen/api/v1/common.pb.go @@ -70,6 +70,55 @@ func (State) EnumDescriptor() ([]byte, []int) { return file_api_v1_common_proto_rawDescGZIP(), []int{0} } +type Direction int32 + +const ( + Direction_DIRECTION_UNSPECIFIED Direction = 0 + Direction_ASC Direction = 1 + Direction_DESC Direction = 2 +) + +// Enum value maps for Direction. +var ( + Direction_name = map[int32]string{ + 0: "DIRECTION_UNSPECIFIED", + 1: "ASC", + 2: "DESC", + } + Direction_value = map[string]int32{ + "DIRECTION_UNSPECIFIED": 0, + "ASC": 1, + "DESC": 2, + } +) + +func (x Direction) Enum() *Direction { + p := new(Direction) + *p = x + return p +} + +func (x Direction) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Direction) Descriptor() protoreflect.EnumDescriptor { + return file_api_v1_common_proto_enumTypes[1].Descriptor() +} + +func (Direction) Type() protoreflect.EnumType { + return &file_api_v1_common_proto_enumTypes[1] +} + +func (x Direction) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Direction.Descriptor instead. +func (Direction) EnumDescriptor() ([]byte, []int) { + return file_api_v1_common_proto_rawDescGZIP(), []int{1} +} + // Used internally for obfuscating the page token. type PageToken struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -135,18 +184,22 @@ var file_api_v1_common_proto_rawDesc = string([]byte{ 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, - 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x42, 0xa3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, - 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x39, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x41, 0x53, 0x43, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x45, 0x53, + 0x43, 0x10, 0x02, 0x42, 0xa3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, + 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, }) var ( @@ -161,11 +214,12 @@ func file_api_v1_common_proto_rawDescGZIP() []byte { return file_api_v1_common_proto_rawDescData } -var file_api_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_api_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_api_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_api_v1_common_proto_goTypes = []any{ (State)(0), // 0: memos.api.v1.State - (*PageToken)(nil), // 1: memos.api.v1.PageToken + (Direction)(0), // 1: memos.api.v1.Direction + (*PageToken)(nil), // 2: memos.api.v1.PageToken } var file_api_v1_common_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -185,7 +239,7 @@ func file_api_v1_common_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_v1_common_proto_rawDesc), len(file_api_v1_common_proto_rawDesc)), - NumEnums: 1, + NumEnums: 2, NumMessages: 1, NumExtensions: 0, NumServices: 0, diff --git a/proto/gen/api/v1/memo_service.pb.go b/proto/gen/api/v1/memo_service.pb.go index da12282c8d9bd..8c47af674dd1d 100644 --- a/proto/gen/api/v1/memo_service.pb.go +++ b/proto/gen/api/v1/memo_service.pb.go @@ -440,14 +440,29 @@ func (x *CreateMemoRequest) GetMemo() *Memo { type ListMemosRequest struct { state protoimpl.MessageState `protogen:"open.v1"` + // The parent is the owner of the memos. + // If not specified or `users/-`, it will list all memos. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // The maximum number of memos to return. - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // A page token, received from a previous `ListMemos` call. // Provide this to retrieve the subsequent page. - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Filter is used to filter memos returned in the list. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // The state of the memos to list. + // Default to `NORMAL`. Set to `ARCHIVED` to list archived memos. + State State `protobuf:"varint,4,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"` + // What field to sort the results by. + // Default to display_time. + Sort string `protobuf:"bytes,5,opt,name=sort,proto3" json:"sort,omitempty"` + // The direction to sort the results by. + // Default to DESC. + Direction Direction `protobuf:"varint,6,opt,name=direction,proto3,enum=memos.api.v1.Direction" json:"direction,omitempty"` + // Filter is a CEL expression to filter memos. + // Refer to `Shortcut.filter`. + Filter string `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"` + // [Deprecated] Old filter contains some specific conditions to filter memos. // Format: "creator == 'users/{user}' && visibilities == ['PUBLIC', 'PROTECTED']" - Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` + OldFilter string `protobuf:"bytes,8,opt,name=old_filter,json=oldFilter,proto3" json:"old_filter,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -482,6 +497,13 @@ func (*ListMemosRequest) Descriptor() ([]byte, []int) { return file_api_v1_memo_service_proto_rawDescGZIP(), []int{4} } +func (x *ListMemosRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + func (x *ListMemosRequest) GetPageSize() int32 { if x != nil { return x.PageSize @@ -496,6 +518,27 @@ func (x *ListMemosRequest) GetPageToken() string { return "" } +func (x *ListMemosRequest) GetState() State { + if x != nil { + return x.State + } + return State_STATE_UNSPECIFIED +} + +func (x *ListMemosRequest) GetSort() string { + if x != nil { + return x.Sort + } + return "" +} + +func (x *ListMemosRequest) GetDirection() Direction { + if x != nil { + return x.Direction + } + return Direction_DIRECTION_UNSPECIFIED +} + func (x *ListMemosRequest) GetFilter() string { if x != nil { return x.Filter @@ -503,6 +546,13 @@ func (x *ListMemosRequest) GetFilter() string { return "" } +func (x *ListMemosRequest) GetOldFilter() string { + if x != nil { + return x.OldFilter + } + return "" +} + type ListMemosResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Memos []*Memo `protobuf:"bytes,1,rep,name=memos,proto3" json:"memos,omitempty"` @@ -1540,253 +1590,266 @@ var file_api_v1_memo_service_proto_rawDesc = string([]byte{ 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x42, 0x04, - 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x66, 0x0a, 0x10, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, - 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x7e, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, - 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, - 0x27, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, - 0x6d, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x6c, 0x64, 0x5f, - 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x6c, 0x64, 0x54, 0x61, - 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x67, 0x22, 0x72, 0x0a, 0x14, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, - 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x30, 0x0a, 0x14, - 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x63, - 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, - 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x55, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x93, 0x02, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6f, + 0x72, 0x74, 0x12, 0x35, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, + 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6c, 0x64, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6c, 0x64, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x22, 0x65, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, + 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7e, 0x0a, + 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x6d, 0x6f, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, + 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x27, 0x0a, + 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x14, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x6c, 0x64, 0x5f, 0x74, 0x61, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x6c, 0x64, 0x54, 0x61, 0x67, 0x12, + 0x17, 0x0a, 0x07, 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x67, 0x22, 0x72, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x63, 0x0a, 0x17, + 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x22, 0x67, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x28, 0x0a, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x19, - 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, - 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x2b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x50, - 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, - 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, - 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, - 0x32, 0x9c, 0x10, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x5e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 0x0a, + 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x55, 0x0a, + 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, + 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0x44, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, + 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, + 0x52, 0x05, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x22, 0x2e, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x63, 0x0a, 0x19, 0x55, 0x70, + 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x2b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x2a, 0x50, 0x0a, 0x0a, + 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, + 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, + 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x03, 0x32, 0xbf, + 0x10, 0x0a, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, + 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, + 0x6f, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, + 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x85, + 0x01, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x1e, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x5a, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x62, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, + 0x6f, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x65, 0x6d, 0x6f, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x22, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x1e, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x12, 0x62, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, - 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7f, 0x0a, 0x0a, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x3c, 0xda, 0x41, - 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, - 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x32, 0x1b, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6d, 0x65, 0x6d, 0x6f, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, 0x0a, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x65, 0x6d, 0x6f, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7f, 0x0a, 0x0a, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x22, 0x3c, 0xda, + 0x41, 0x10, 0x6d, 0x65, 0x6d, 0x6f, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x32, 0x1b, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6d, 0x65, 0x6d, 0x6f, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6c, 0x0a, 0x0a, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, + 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7c, 0x0a, 0x0d, 0x52, 0x65, 0x6e, + 0x61, 0x6d, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, + 0x2a, 0x32, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, + 0x3a, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x78, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, - 0x6d, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7c, 0x0a, 0x0d, 0x52, 0x65, 0x6e, 0x61, - 0x6d, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x4d, - 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, - 0x32, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x3a, - 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x78, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4d, 0x65, 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, - 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x2a, 0x23, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x67, 0x7d, - 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6d, 0x6f, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x26, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x2a, 0x23, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x2f, 0x7b, 0x74, 0x61, 0x67, + 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, + 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, + 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, + 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x88, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, + 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x12, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x6d, 0x6f, 0x22, 0x37, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2a, 0x3a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x1f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x91, 0x01, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, + 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, + 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x85, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x25, 0x3a, 0x01, 0x2a, 0x32, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, - 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x88, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x6f, - 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x6d, 0x6f, 0x22, 0x37, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2a, 0x3a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, - 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x10, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, - 0x95, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, - 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, 0x65, - 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x01, - 0x2a, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x7a, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, - 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, - 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x23, 0xda, 0x41, 0x02, 0x69, - 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, - 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, - 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, + 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x89, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x73, + 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x70, 0x73, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, + 0x01, 0x2a, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x7a, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, + 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4d, 0x65, 0x6d, 0x6f, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x23, 0xda, 0x41, 0x02, + 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x4d, 0x65, 0x6d, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, + 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, + 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, }) var ( @@ -1835,8 +1898,9 @@ var file_api_v1_memo_service_proto_goTypes = []any{ (*Resource)(nil), // 28: memos.api.v1.Resource (*MemoRelation)(nil), // 29: memos.api.v1.MemoRelation (*Reaction)(nil), // 30: memos.api.v1.Reaction - (*fieldmaskpb.FieldMask)(nil), // 31: google.protobuf.FieldMask - (*emptypb.Empty)(nil), // 32: google.protobuf.Empty + (Direction)(0), // 31: memos.api.v1.Direction + (*fieldmaskpb.FieldMask)(nil), // 32: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 33: google.protobuf.Empty } var file_api_v1_memo_service_proto_depIdxs = []int32{ 25, // 0: memos.api.v1.Memo.state:type_name -> memos.api.v1.State @@ -1851,54 +1915,56 @@ var file_api_v1_memo_service_proto_depIdxs = []int32{ 2, // 9: memos.api.v1.Memo.property:type_name -> memos.api.v1.MemoProperty 3, // 10: memos.api.v1.Memo.location:type_name -> memos.api.v1.Location 1, // 11: memos.api.v1.CreateMemoRequest.memo:type_name -> memos.api.v1.Memo - 1, // 12: memos.api.v1.ListMemosResponse.memos:type_name -> memos.api.v1.Memo - 1, // 13: memos.api.v1.UpdateMemoRequest.memo:type_name -> memos.api.v1.Memo - 31, // 14: memos.api.v1.UpdateMemoRequest.update_mask:type_name -> google.protobuf.FieldMask - 28, // 15: memos.api.v1.SetMemoResourcesRequest.resources:type_name -> memos.api.v1.Resource - 28, // 16: memos.api.v1.ListMemoResourcesResponse.resources:type_name -> memos.api.v1.Resource - 29, // 17: memos.api.v1.SetMemoRelationsRequest.relations:type_name -> memos.api.v1.MemoRelation - 29, // 18: memos.api.v1.ListMemoRelationsResponse.relations:type_name -> memos.api.v1.MemoRelation - 1, // 19: memos.api.v1.CreateMemoCommentRequest.comment:type_name -> memos.api.v1.Memo - 1, // 20: memos.api.v1.ListMemoCommentsResponse.memos:type_name -> memos.api.v1.Memo - 30, // 21: memos.api.v1.ListMemoReactionsResponse.reactions:type_name -> memos.api.v1.Reaction - 30, // 22: memos.api.v1.UpsertMemoReactionRequest.reaction:type_name -> memos.api.v1.Reaction - 4, // 23: memos.api.v1.MemoService.CreateMemo:input_type -> memos.api.v1.CreateMemoRequest - 5, // 24: memos.api.v1.MemoService.ListMemos:input_type -> memos.api.v1.ListMemosRequest - 7, // 25: memos.api.v1.MemoService.GetMemo:input_type -> memos.api.v1.GetMemoRequest - 8, // 26: memos.api.v1.MemoService.UpdateMemo:input_type -> memos.api.v1.UpdateMemoRequest - 9, // 27: memos.api.v1.MemoService.DeleteMemo:input_type -> memos.api.v1.DeleteMemoRequest - 10, // 28: memos.api.v1.MemoService.RenameMemoTag:input_type -> memos.api.v1.RenameMemoTagRequest - 11, // 29: memos.api.v1.MemoService.DeleteMemoTag:input_type -> memos.api.v1.DeleteMemoTagRequest - 12, // 30: memos.api.v1.MemoService.SetMemoResources:input_type -> memos.api.v1.SetMemoResourcesRequest - 13, // 31: memos.api.v1.MemoService.ListMemoResources:input_type -> memos.api.v1.ListMemoResourcesRequest - 15, // 32: memos.api.v1.MemoService.SetMemoRelations:input_type -> memos.api.v1.SetMemoRelationsRequest - 16, // 33: memos.api.v1.MemoService.ListMemoRelations:input_type -> memos.api.v1.ListMemoRelationsRequest - 18, // 34: memos.api.v1.MemoService.CreateMemoComment:input_type -> memos.api.v1.CreateMemoCommentRequest - 19, // 35: memos.api.v1.MemoService.ListMemoComments:input_type -> memos.api.v1.ListMemoCommentsRequest - 21, // 36: memos.api.v1.MemoService.ListMemoReactions:input_type -> memos.api.v1.ListMemoReactionsRequest - 23, // 37: memos.api.v1.MemoService.UpsertMemoReaction:input_type -> memos.api.v1.UpsertMemoReactionRequest - 24, // 38: memos.api.v1.MemoService.DeleteMemoReaction:input_type -> memos.api.v1.DeleteMemoReactionRequest - 1, // 39: memos.api.v1.MemoService.CreateMemo:output_type -> memos.api.v1.Memo - 6, // 40: memos.api.v1.MemoService.ListMemos:output_type -> memos.api.v1.ListMemosResponse - 1, // 41: memos.api.v1.MemoService.GetMemo:output_type -> memos.api.v1.Memo - 1, // 42: memos.api.v1.MemoService.UpdateMemo:output_type -> memos.api.v1.Memo - 32, // 43: memos.api.v1.MemoService.DeleteMemo:output_type -> google.protobuf.Empty - 32, // 44: memos.api.v1.MemoService.RenameMemoTag:output_type -> google.protobuf.Empty - 32, // 45: memos.api.v1.MemoService.DeleteMemoTag:output_type -> google.protobuf.Empty - 32, // 46: memos.api.v1.MemoService.SetMemoResources:output_type -> google.protobuf.Empty - 14, // 47: memos.api.v1.MemoService.ListMemoResources:output_type -> memos.api.v1.ListMemoResourcesResponse - 32, // 48: memos.api.v1.MemoService.SetMemoRelations:output_type -> google.protobuf.Empty - 17, // 49: memos.api.v1.MemoService.ListMemoRelations:output_type -> memos.api.v1.ListMemoRelationsResponse - 1, // 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 - 30, // 53: memos.api.v1.MemoService.UpsertMemoReaction:output_type -> memos.api.v1.Reaction - 32, // 54: memos.api.v1.MemoService.DeleteMemoReaction:output_type -> google.protobuf.Empty - 39, // [39:55] is the sub-list for method output_type - 23, // [23:39] is the sub-list for method input_type - 23, // [23:23] is the sub-list for extension type_name - 23, // [23:23] is the sub-list for extension extendee - 0, // [0:23] is the sub-list for field type_name + 25, // 12: memos.api.v1.ListMemosRequest.state:type_name -> memos.api.v1.State + 31, // 13: memos.api.v1.ListMemosRequest.direction:type_name -> memos.api.v1.Direction + 1, // 14: memos.api.v1.ListMemosResponse.memos:type_name -> memos.api.v1.Memo + 1, // 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 + 28, // 17: memos.api.v1.SetMemoResourcesRequest.resources:type_name -> memos.api.v1.Resource + 28, // 18: memos.api.v1.ListMemoResourcesResponse.resources:type_name -> memos.api.v1.Resource + 29, // 19: memos.api.v1.SetMemoRelationsRequest.relations:type_name -> memos.api.v1.MemoRelation + 29, // 20: memos.api.v1.ListMemoRelationsResponse.relations:type_name -> memos.api.v1.MemoRelation + 1, // 21: memos.api.v1.CreateMemoCommentRequest.comment:type_name -> memos.api.v1.Memo + 1, // 22: memos.api.v1.ListMemoCommentsResponse.memos:type_name -> memos.api.v1.Memo + 30, // 23: memos.api.v1.ListMemoReactionsResponse.reactions:type_name -> memos.api.v1.Reaction + 30, // 24: memos.api.v1.UpsertMemoReactionRequest.reaction:type_name -> memos.api.v1.Reaction + 4, // 25: memos.api.v1.MemoService.CreateMemo:input_type -> memos.api.v1.CreateMemoRequest + 5, // 26: memos.api.v1.MemoService.ListMemos:input_type -> memos.api.v1.ListMemosRequest + 7, // 27: memos.api.v1.MemoService.GetMemo:input_type -> memos.api.v1.GetMemoRequest + 8, // 28: memos.api.v1.MemoService.UpdateMemo:input_type -> memos.api.v1.UpdateMemoRequest + 9, // 29: memos.api.v1.MemoService.DeleteMemo:input_type -> memos.api.v1.DeleteMemoRequest + 10, // 30: memos.api.v1.MemoService.RenameMemoTag:input_type -> memos.api.v1.RenameMemoTagRequest + 11, // 31: memos.api.v1.MemoService.DeleteMemoTag:input_type -> memos.api.v1.DeleteMemoTagRequest + 12, // 32: memos.api.v1.MemoService.SetMemoResources:input_type -> memos.api.v1.SetMemoResourcesRequest + 13, // 33: memos.api.v1.MemoService.ListMemoResources:input_type -> memos.api.v1.ListMemoResourcesRequest + 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 + 1, // 41: memos.api.v1.MemoService.CreateMemo:output_type -> memos.api.v1.Memo + 6, // 42: memos.api.v1.MemoService.ListMemos:output_type -> memos.api.v1.ListMemosResponse + 1, // 43: memos.api.v1.MemoService.GetMemo:output_type -> memos.api.v1.Memo + 1, // 44: memos.api.v1.MemoService.UpdateMemo:output_type -> memos.api.v1.Memo + 33, // 45: memos.api.v1.MemoService.DeleteMemo:output_type -> google.protobuf.Empty + 33, // 46: memos.api.v1.MemoService.RenameMemoTag:output_type -> google.protobuf.Empty + 33, // 47: memos.api.v1.MemoService.DeleteMemoTag:output_type -> google.protobuf.Empty + 33, // 48: memos.api.v1.MemoService.SetMemoResources:output_type -> google.protobuf.Empty + 14, // 49: memos.api.v1.MemoService.ListMemoResources:output_type -> memos.api.v1.ListMemoResourcesResponse + 33, // 50: memos.api.v1.MemoService.SetMemoRelations:output_type -> google.protobuf.Empty + 17, // 51: memos.api.v1.MemoService.ListMemoRelations:output_type -> memos.api.v1.ListMemoRelationsResponse + 1, // 52: memos.api.v1.MemoService.CreateMemoComment:output_type -> memos.api.v1.Memo + 20, // 53: memos.api.v1.MemoService.ListMemoComments:output_type -> memos.api.v1.ListMemoCommentsResponse + 22, // 54: memos.api.v1.MemoService.ListMemoReactions:output_type -> memos.api.v1.ListMemoReactionsResponse + 30, // 55: memos.api.v1.MemoService.UpsertMemoReaction:output_type -> memos.api.v1.Reaction + 33, // 56: memos.api.v1.MemoService.DeleteMemoReaction:output_type -> google.protobuf.Empty + 41, // [41:57] is the sub-list for method output_type + 25, // [25:41] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_api_v1_memo_service_proto_init() } diff --git a/proto/gen/api/v1/memo_service.pb.gw.go b/proto/gen/api/v1/memo_service.pb.gw.go index f9cece080f23b..b948ad1000f64 100644 --- a/proto/gen/api/v1/memo_service.pb.gw.go +++ b/proto/gen/api/v1/memo_service.pb.gw.go @@ -91,6 +91,56 @@ func local_request_MemoService_ListMemos_0(ctx context.Context, marshaler runtim return msg, metadata, err } +var filter_MemoService_ListMemos_1 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + +func request_MemoService_ListMemos_1(ctx context.Context, marshaler runtime.Marshaler, client MemoServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ListMemosRequest + metadata runtime.ServerMetadata + err error + ) + 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) + } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_ListMemos_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.ListMemos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_MemoService_ListMemos_1(ctx context.Context, marshaler runtime.Marshaler, server MemoServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ListMemosRequest + metadata runtime.ServerMetadata + err error + ) + 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) + } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MemoService_ListMemos_1); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.ListMemos(ctx, &protoReq) + return msg, metadata, err +} + 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 @@ -743,6 +793,26 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_MemoService_ListMemos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodGet, pattern_MemoService_ListMemos_1, 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/ListMemos", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/memos")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_MemoService_ListMemos_1(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_ListMemos_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle(http.MethodGet, pattern_MemoService_GetMemo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1097,6 +1167,23 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_MemoService_ListMemos_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodGet, pattern_MemoService_ListMemos_1, 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/ListMemos", runtime.WithHTTPPathPattern("/api/v1/{parent=users/*}/memos")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_MemoService_ListMemos_1(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_MemoService_ListMemos_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle(http.MethodGet, pattern_MemoService_GetMemo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1341,6 +1428,7 @@ func RegisterMemoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux var ( pattern_MemoService_CreateMemo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, "")) pattern_MemoService_ListMemos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "memos"}, "")) + pattern_MemoService_ListMemos_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1", "users", "parent", "memos"}, "")) 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"}, "")) @@ -1360,6 +1448,7 @@ var ( var ( forward_MemoService_CreateMemo_0 = runtime.ForwardResponseMessage forward_MemoService_ListMemos_0 = runtime.ForwardResponseMessage + forward_MemoService_ListMemos_1 = runtime.ForwardResponseMessage forward_MemoService_GetMemo_0 = runtime.ForwardResponseMessage forward_MemoService_UpdateMemo_0 = runtime.ForwardResponseMessage forward_MemoService_DeleteMemo_0 = runtime.ForwardResponseMessage diff --git a/proto/gen/apidocs.swagger.yaml b/proto/gen/apidocs.swagger.yaml index d43785dec929b..d51c5ccb2115b 100644 --- a/proto/gen/apidocs.swagger.yaml +++ b/proto/gen/apidocs.swagger.yaml @@ -304,6 +304,13 @@ paths: schema: $ref: '#/definitions/googlerpcStatus' parameters: + - name: parent + description: |- + The parent is the owner of the memos. + If not specified or `users/-`, it will list all memos. + in: query + required: false + type: string - name: pageSize description: The maximum number of memos to return. in: query @@ -317,9 +324,47 @@ paths: in: query required: false type: string + - name: state + description: |- + The state of the memos to list. + Default to `NORMAL`. Set to `ARCHIVED` to list archived memos. + in: query + required: false + type: string + enum: + - STATE_UNSPECIFIED + - NORMAL + - ARCHIVED + default: STATE_UNSPECIFIED + - name: sort + description: |- + What field to sort the results by. + Default to display_time. + in: query + required: false + type: string + - name: direction + description: |- + The direction to sort the results by. + Default to DESC. + in: query + required: false + type: string + enum: + - DIRECTION_UNSPECIFIED + - ASC + - DESC + default: DIRECTION_UNSPECIFIED - name: filter description: |- - Filter is used to filter memos returned in the list. + Filter is a CEL expression to filter memos. + Refer to `Shortcut.filter`. + in: query + required: false + type: string + - name: oldFilter + description: |- + [Deprecated] Old filter contains some specific conditions to filter memos. Format: "creator == 'users/{user}' && visibilities == ['PUBLIC', 'PROTECTED']" in: query required: false @@ -1406,6 +1451,88 @@ paths: pattern: users/[^/]+ tags: - UserService + /api/v1/{parent}/memos: + get: + summary: ListMemos lists memos with pagination and filter. + operationId: MemoService_ListMemos2 + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1ListMemosResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/googlerpcStatus' + parameters: + - name: parent + description: |- + The parent is the owner of the memos. + If not specified or `users/-`, it will list all memos. + in: path + required: true + type: string + pattern: users/[^/]+ + - name: pageSize + description: The maximum number of memos to return. + in: query + required: false + type: integer + format: int32 + - name: pageToken + description: |- + A page token, received from a previous `ListMemos` call. + Provide this to retrieve the subsequent page. + in: query + required: false + type: string + - name: state + description: |- + The state of the memos to list. + Default to `NORMAL`. Set to `ARCHIVED` to list archived memos. + in: query + required: false + type: string + enum: + - STATE_UNSPECIFIED + - NORMAL + - ARCHIVED + default: STATE_UNSPECIFIED + - name: sort + description: |- + What field to sort the results by. + Default to display_time. + in: query + required: false + type: string + - name: direction + description: |- + The direction to sort the results by. + Default to DESC. + in: query + required: false + type: string + enum: + - DIRECTION_UNSPECIFIED + - ASC + - DESC + default: DIRECTION_UNSPECIFIED + - name: filter + description: |- + Filter is a CEL expression to filter memos. + Refer to `Shortcut.filter`. + in: query + required: false + type: string + - name: oldFilter + description: |- + [Deprecated] Old filter contains some specific conditions to filter memos. + Format: "creator == 'users/{user}' && visibilities == ['PUBLIC', 'PROTECTED']" + in: query + required: false + type: string + tags: + - MemoService /api/v1/{parent}/shortcuts: get: summary: ListShortcuts returns a list of shortcuts for a user. @@ -2472,6 +2599,13 @@ definitions: type: string url: type: string + v1Direction: + type: string + enum: + - DIRECTION_UNSPECIFIED + - ASC + - DESC + default: DIRECTION_UNSPECIFIED v1EmbeddedContentNode: type: object properties: diff --git a/server/router/api/v1/acl_config.go b/server/router/api/v1/acl_config.go index b1ae4056ff98c..6c3b06306c207 100644 --- a/server/router/api/v1/acl_config.go +++ b/server/router/api/v1/acl_config.go @@ -12,6 +12,7 @@ var authenticationAllowlistMethods = map[string]bool{ "/memos.api.v1.AuthService/SignOut": true, "/memos.api.v1.AuthService/SignUp": true, "/memos.api.v1.UserService/GetUser": true, + "/memos.api.v1.UserService/GetUserByUsername": true, "/memos.api.v1.UserService/GetUserAvatarBinary": true, "/memos.api.v1.UserService/ListAllUserStats": true, "/memos.api.v1.UserService/SearchUsers": true, diff --git a/server/router/api/v1/memo_service.go b/server/router/api/v1/memo_service.go index 6b6445f0aab47..8637ef954fa45 100644 --- a/server/router/api/v1/memo_service.go +++ b/server/router/api/v1/memo_service.go @@ -99,9 +99,42 @@ func (s *APIV1Service) ListMemos(ctx context.Context, request *v1pb.ListMemosReq // Exclude comments by default. ExcludeComments: true, } - if err := s.buildMemoFindWithFilter(ctx, memoFind, request.Filter); err != nil { + if err := s.buildMemoFindWithFilter(ctx, memoFind, request.OldFilter); err != nil { return nil, status.Errorf(codes.InvalidArgument, "failed to build find memos with filter: %v", err) } + if request.Parent != "" && request.Parent != "users/-" { + userID, err := ExtractUserIDFromName(request.Parent) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid parent: %v", err) + } + memoFind.CreatorID = &userID + memoFind.OrderByPinned = true + } + if request.Direction == v1pb.Direction_ASC { + memoFind.OrderByTimeAsc = true + } + if request.Filter != "" { + memoFind.Filter = &request.Filter + } + + currentUser, err := s.GetCurrentUser(ctx) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to get user") + } + if currentUser == nil { + memoFind.VisibilityList = []store.Visibility{store.Public} + } else { + if memoFind.CreatorID == nil || *memoFind.CreatorID != currentUser.ID { + memoFind.VisibilityList = []store.Visibility{store.Public, store.Protected} + } + } + if request.State == v1pb.State_ARCHIVED { + state := store.Archived + memoFind.RowStatus = &state + } else { + state := store.Normal + memoFind.RowStatus = &state + } var limit, offset int if request.PageToken != "" { diff --git a/server/router/api/v1/memo_service_filter.go b/server/router/api/v1/memo_service_filter.go index e25d3bd073fab..f760c96a6bc76 100644 --- a/server/router/api/v1/memo_service_filter.go +++ b/server/router/api/v1/memo_service_filter.go @@ -9,7 +9,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - apiv1 "github.com/usememos/memos/proto/gen/api/v1" "github.com/usememos/memos/store" ) @@ -25,21 +24,12 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store. if len(filterExpr.ContentSearch) > 0 { find.ContentSearch = filterExpr.ContentSearch } - if len(filterExpr.Visibilities) > 0 { - find.VisibilityList = filterExpr.Visibilities - } if filterExpr.TagSearch != nil { if find.PayloadFind == nil { find.PayloadFind = &store.FindMemoPayload{} } find.PayloadFind.TagSearch = filterExpr.TagSearch } - if filterExpr.OrderByPinned { - find.OrderByPinned = filterExpr.OrderByPinned - } - if filterExpr.OrderByTimeAsc { - find.OrderByTimeAsc = filterExpr.OrderByTimeAsc - } if filterExpr.DisplayTimeAfter != nil { workspaceMemoRelatedSetting, err := s.Store.GetWorkspaceMemoRelatedSetting(ctx) if err != nil { @@ -62,31 +52,6 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store. find.CreatedTsBefore = filterExpr.DisplayTimeBefore } } - if filterExpr.Creator != nil { - userID, err := ExtractUserIDFromName(*filterExpr.Creator) - if err != nil { - return errors.Wrap(err, "invalid user name") - } - user, err := s.Store.GetUser(ctx, &store.FindUser{ - ID: &userID, - }) - if err != nil { - return status.Errorf(codes.Internal, "failed to get user") - } - if user == nil { - return status.Errorf(codes.NotFound, "user not found") - } - find.CreatorID = &user.ID - } - if filterExpr.RowStatus != nil { - find.RowStatus = filterExpr.RowStatus - } - if filterExpr.Random { - find.Random = filterExpr.Random - } - if filterExpr.Limit != nil { - find.Limit = filterExpr.Limit - } if filterExpr.IncludeComments { find.ExcludeComments = false } @@ -104,23 +69,6 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store. } } - user, err := s.GetCurrentUser(ctx) - if err != nil { - return status.Errorf(codes.Internal, "failed to get current user") - } - // If the user is not authenticated, only public memos are visible. - if user == nil { - if filter == "" { - // If no filter is provided, return an error. - return status.Errorf(codes.InvalidArgument, "filter is required for unauthenticated user") - } - - find.VisibilityList = []store.Visibility{store.Public} - } else if find.CreatorID == nil || *find.CreatorID != user.ID { - // If creator is not specified or the creator is not the current user, only public and protected memos are visible. - find.VisibilityList = []store.Visibility{store.Public, store.Protected} - } - workspaceMemoRelatedSetting, err := s.Store.GetWorkspaceMemoRelatedSetting(ctx) if err != nil { return status.Errorf(codes.Internal, "failed to get workspace memo related setting") @@ -134,16 +82,9 @@ func (s *APIV1Service) buildMemoFindWithFilter(ctx context.Context, find *store. // MemoFilterCELAttributes are the CEL attributes. var MemoFilterCELAttributes = []cel.EnvOption{ cel.Variable("content_search", cel.ListType(cel.StringType)), - cel.Variable("visibilities", cel.ListType(cel.StringType)), cel.Variable("tag_search", cel.ListType(cel.StringType)), - cel.Variable("order_by_pinned", cel.BoolType), - cel.Variable("order_by_time_asc", cel.BoolType), cel.Variable("display_time_before", cel.IntType), cel.Variable("display_time_after", cel.IntType), - cel.Variable("creator", cel.StringType), - cel.Variable("state", cel.StringType), - cel.Variable("random", cel.BoolType), - cel.Variable("limit", cel.IntType), cel.Variable("include_comments", cel.BoolType), cel.Variable("has_link", cel.BoolType), cel.Variable("has_task_list", cel.BoolType), @@ -153,16 +94,9 @@ var MemoFilterCELAttributes = []cel.EnvOption{ type MemoFilter struct { ContentSearch []string - Visibilities []store.Visibility TagSearch []string - OrderByPinned bool - OrderByTimeAsc bool DisplayTimeBefore *int64 DisplayTimeAfter *int64 - Creator *string - RowStatus *store.RowStatus - Random bool - Limit *int IncludeComments bool HasLink bool HasTaskList bool @@ -200,13 +134,6 @@ func findMemoField(callExpr *exprv1.Expr_Call, filter *MemoFilter) { contentSearch = append(contentSearch, value) } filter.ContentSearch = contentSearch - } else if idExpr.Name == "visibilities" { - visibilities := []store.Visibility{} - for _, expr := range callExpr.Args[1].GetListExpr().GetElements() { - value := expr.GetConstExpr().GetStringValue() - visibilities = append(visibilities, store.Visibility(value)) - } - filter.Visibilities = visibilities } else if idExpr.Name == "tag_search" { tagSearch := []string{} for _, expr := range callExpr.Args[1].GetListExpr().GetElements() { @@ -214,30 +141,12 @@ func findMemoField(callExpr *exprv1.Expr_Call, filter *MemoFilter) { tagSearch = append(tagSearch, value) } filter.TagSearch = tagSearch - } else if idExpr.Name == "order_by_pinned" { - value := callExpr.Args[1].GetConstExpr().GetBoolValue() - filter.OrderByPinned = value - } else if idExpr.Name == "order_by_time_asc" { - value := callExpr.Args[1].GetConstExpr().GetBoolValue() - filter.OrderByTimeAsc = value } else if idExpr.Name == "display_time_before" { displayTimeBefore := callExpr.Args[1].GetConstExpr().GetInt64Value() filter.DisplayTimeBefore = &displayTimeBefore } else if idExpr.Name == "display_time_after" { displayTimeAfter := callExpr.Args[1].GetConstExpr().GetInt64Value() filter.DisplayTimeAfter = &displayTimeAfter - } else if idExpr.Name == "creator" { - creator := callExpr.Args[1].GetConstExpr().GetStringValue() - filter.Creator = &creator - } else if idExpr.Name == "state" { - state := convertStateToStore(apiv1.State(apiv1.State_value[callExpr.Args[1].GetConstExpr().GetStringValue()])) - filter.RowStatus = &state - } else if idExpr.Name == "random" { - value := callExpr.Args[1].GetConstExpr().GetBoolValue() - filter.Random = value - } else if idExpr.Name == "limit" { - limit := int(callExpr.Args[1].GetConstExpr().GetInt64Value()) - filter.Limit = &limit } else if idExpr.Name == "include_comments" { value := callExpr.Args[1].GetConstExpr().GetBoolValue() filter.IncludeComments = value diff --git a/web/src/components/MemoEditor/ActionButton/AddMemoRelationPopover.tsx b/web/src/components/MemoEditor/ActionButton/AddMemoRelationPopover.tsx index 459605770bc8a..7bf3f140b4b8b 100644 --- a/web/src/components/MemoEditor/ActionButton/AddMemoRelationPopover.tsx +++ b/web/src/components/MemoEditor/ActionButton/AddMemoRelationPopover.tsx @@ -45,13 +45,14 @@ const AddMemoRelationPopover = (props: Props) => { setIsFetching(true); try { - const filters = [`creator == "${user.name}"`, `state == "NORMAL"`]; + const conditions = []; if (searchText) { - filters.push(`content_search == [${JSON.stringify(searchText)}]`); + conditions.push(`content_search == [${JSON.stringify(searchText)}]`); } const { memos } = await memoServiceClient.listMemos({ + parent: user.name, pageSize: DEFAULT_LIST_MEMOS_PAGE_SIZE, - filter: filters.length > 0 ? filters.join(" && ") : undefined, + oldFilter: conditions.length > 0 ? conditions.join(" && ") : undefined, }); setFetchedMemos(memos); } catch (error: any) { diff --git a/web/src/components/PagedMemoList/PagedMemoList.tsx b/web/src/components/PagedMemoList/PagedMemoList.tsx index 360e8ffe75346..997554857f313 100644 --- a/web/src/components/PagedMemoList/PagedMemoList.tsx +++ b/web/src/components/PagedMemoList/PagedMemoList.tsx @@ -5,6 +5,7 @@ import PullToRefresh from "react-simple-pull-to-refresh"; import { DEFAULT_LIST_MEMOS_PAGE_SIZE } from "@/helpers/consts"; import useResponsiveWidth from "@/hooks/useResponsiveWidth"; import { useMemoList, useMemoStore } from "@/store/v1"; +import { Direction, State } from "@/types/proto/api/v1/common"; import { Memo } from "@/types/proto/api/v1/memo_service"; import { useTranslate } from "@/utils/i18n"; import Empty from "../Empty"; @@ -12,11 +13,14 @@ import Empty from "../Empty"; interface Props { renderer: (memo: Memo) => JSX.Element; listSort?: (list: Memo[]) => Memo[]; - filter?: string; + owner?: string; + state?: State; + direction?: Direction; + oldFilter?: string; pageSize?: number; } -interface State { +interface LocalState { isRequesting: boolean; nextPageToken: string; } @@ -26,7 +30,7 @@ const PagedMemoList = (props: Props) => { const { md } = useResponsiveWidth(); const memoStore = useMemoStore(); const memoList = useMemoList(); - const [state, setState] = useState<State>({ + const [state, setState] = useState<LocalState>({ isRequesting: true, // Initial request nextPageToken: "", }); @@ -35,7 +39,10 @@ const PagedMemoList = (props: Props) => { const fetchMoreMemos = async (nextPageToken: string) => { setState((state) => ({ ...state, isRequesting: true })); const response = await memoStore.fetchMemos({ - filter: props.filter || "", + parent: props.owner || "", + state: props.state || State.NORMAL, + direction: props.direction || Direction.DESC, + oldFilter: props.oldFilter || "", pageSize: props.pageSize || DEFAULT_LIST_MEMOS_PAGE_SIZE, pageToken: nextPageToken, }); @@ -53,7 +60,7 @@ const PagedMemoList = (props: Props) => { useEffect(() => { refreshList(); - }, [props.filter, props.pageSize]); + }, [props.owner, props.state, props.direction, props.oldFilter, props.pageSize]); const children = ( <div className="flex flex-col justify-start items-start w-full max-w-full"> diff --git a/web/src/pages/Archived.tsx b/web/src/pages/Archived.tsx index 5e68e0f417717..5aa55b56affba 100644 --- a/web/src/pages/Archived.tsx +++ b/web/src/pages/Archived.tsx @@ -8,7 +8,7 @@ import PagedMemoList from "@/components/PagedMemoList"; import SearchBar from "@/components/SearchBar"; import useCurrentUser from "@/hooks/useCurrentUser"; import { useMemoFilterStore } from "@/store/v1"; -import { State } from "@/types/proto/api/v1/common"; +import { Direction, State } from "@/types/proto/api/v1/common"; import { Memo } from "@/types/proto/api/v1/memo_service"; import { useTranslate } from "@/utils/i18n"; @@ -18,7 +18,7 @@ const Archived = () => { const memoFilterStore = useMemoFilterStore(); const memoListFilter = useMemo(() => { - const filters = [`creator == "${user.name}"`, `state == "ARCHIVED"`]; + const conditions = []; const contentSearch: string[] = []; const tagSearch: string[] = []; for (const filter of memoFilterStore.filters) { @@ -28,16 +28,13 @@ const Archived = () => { tagSearch.push(`"${filter.value}"`); } } - if (memoFilterStore.orderByTimeAsc) { - filters.push(`order_by_time_asc == true`); - } if (contentSearch.length > 0) { - filters.push(`content_search == [${contentSearch.join(", ")}]`); + conditions.push(`content_search == [${contentSearch.join(", ")}]`); } if (tagSearch.length > 0) { - filters.push(`tag_search == [${tagSearch.join(", ")}]`); + conditions.push(`tag_search == [${tagSearch.join(", ")}]`); } - return filters.join(" && "); + return conditions.join(" && "); }, [user, memoFilterStore.filters]); return ( @@ -66,7 +63,10 @@ const Archived = () => { : dayjs(b.displayTime).unix() - dayjs(a.displayTime).unix(), ) } - filter={memoListFilter} + owner={user.name} + state={State.ARCHIVED} + direction={memoFilterStore.orderByTimeAsc ? Direction.ASC : Direction.DESC} + oldFilter={memoListFilter} /> </div> </div> diff --git a/web/src/pages/Explore.tsx b/web/src/pages/Explore.tsx index ec12e6be5eacf..d52723b776aca 100644 --- a/web/src/pages/Explore.tsx +++ b/web/src/pages/Explore.tsx @@ -8,7 +8,7 @@ import PagedMemoList from "@/components/PagedMemoList"; import useCurrentUser from "@/hooks/useCurrentUser"; import useResponsiveWidth from "@/hooks/useResponsiveWidth"; import { useMemoFilterStore } from "@/store/v1"; -import { State } from "@/types/proto/api/v1/common"; +import { Direction, State } from "@/types/proto/api/v1/common"; import { Memo } from "@/types/proto/api/v1/memo_service"; import { cn } from "@/utils"; @@ -18,7 +18,7 @@ const Explore = () => { const memoFilterStore = useMemoFilterStore(); const memoListFilter = useMemo(() => { - const filters = [`state == "NORMAL"`, `visibilities == [${user ? "'PUBLIC', 'PROTECTED'" : "'PUBLIC'"}]`]; + const conditions = []; const contentSearch: string[] = []; const tagSearch: string[] = []; for (const filter of memoFilterStore.filters) { @@ -27,29 +27,26 @@ const Explore = () => { } else if (filter.factor === "tagSearch") { tagSearch.push(`"${filter.value}"`); } else if (filter.factor === "property.hasLink") { - filters.push(`has_link == true`); + conditions.push(`has_link == true`); } else if (filter.factor === "property.hasTaskList") { - filters.push(`has_task_list == true`); + conditions.push(`has_task_list == true`); } else if (filter.factor === "property.hasCode") { - filters.push(`has_code == true`); + conditions.push(`has_code == true`); } else if (filter.factor === "displayTime") { const filterDate = new Date(filter.value); const filterUtcTimestamp = filterDate.getTime() + filterDate.getTimezoneOffset() * 60 * 1000; const timestampAfter = filterUtcTimestamp / 1000; - filters.push(`display_time_after == ${timestampAfter}`); - filters.push(`display_time_before == ${timestampAfter + 60 * 60 * 24}`); + conditions.push(`display_time_after == ${timestampAfter}`); + conditions.push(`display_time_before == ${timestampAfter + 60 * 60 * 24}`); } } - if (memoFilterStore.orderByTimeAsc) { - filters.push(`order_by_time_asc == true`); - } if (contentSearch.length > 0) { - filters.push(`content_search == [${contentSearch.join(", ")}]`); + conditions.push(`content_search == [${contentSearch.join(", ")}]`); } if (tagSearch.length > 0) { - filters.push(`tag_search == [${tagSearch.join(", ")}]`); + conditions.push(`tag_search == [${tagSearch.join(", ")}]`); } - return filters.join(" && "); + return conditions.join(" && "); }, [user, memoFilterStore.filters, memoFilterStore.orderByTimeAsc]); return ( @@ -74,7 +71,8 @@ const Explore = () => { : dayjs(b.displayTime).unix() - dayjs(a.displayTime).unix(), ) } - filter={memoListFilter} + direction={memoFilterStore.orderByTimeAsc ? Direction.ASC : Direction.DESC} + oldFilter={memoListFilter} /> </div> </div> diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsx index 65d731c7381fb..07465bb79e40d 100644 --- a/web/src/pages/Home.tsx +++ b/web/src/pages/Home.tsx @@ -9,7 +9,7 @@ import PagedMemoList from "@/components/PagedMemoList"; import useCurrentUser from "@/hooks/useCurrentUser"; import useResponsiveWidth from "@/hooks/useResponsiveWidth"; import { useMemoFilterStore } from "@/store/v1"; -import { State } from "@/types/proto/api/v1/common"; +import { Direction, State } from "@/types/proto/api/v1/common"; import { Memo } from "@/types/proto/api/v1/memo_service"; import { cn } from "@/utils"; @@ -19,7 +19,7 @@ const Home = () => { const memoFilterStore = useMemoFilterStore(); const memoListFilter = useMemo(() => { - const filters = [`creator == "${user.name}"`, `state == "NORMAL"`, `order_by_pinned == true`]; + const conditions = []; const contentSearch: string[] = []; const tagSearch: string[] = []; for (const filter of memoFilterStore.filters) { @@ -28,29 +28,29 @@ const Home = () => { } else if (filter.factor === "tagSearch") { tagSearch.push(`"${filter.value}"`); } else if (filter.factor === "property.hasLink") { - filters.push(`has_link == true`); + conditions.push(`has_link == true`); } else if (filter.factor === "property.hasTaskList") { - filters.push(`has_task_list == true`); + conditions.push(`has_task_list == true`); } else if (filter.factor === "property.hasCode") { - filters.push(`has_code == true`); + conditions.push(`has_code == true`); } else if (filter.factor === "displayTime") { const filterDate = new Date(filter.value); const filterUtcTimestamp = filterDate.getTime() + filterDate.getTimezoneOffset() * 60 * 1000; const timestampAfter = filterUtcTimestamp / 1000; - filters.push(`display_time_after == ${timestampAfter}`); - filters.push(`display_time_before == ${timestampAfter + 60 * 60 * 24}`); + conditions.push(`display_time_after == ${timestampAfter}`); + conditions.push(`display_time_before == ${timestampAfter + 60 * 60 * 24}`); } } if (memoFilterStore.orderByTimeAsc) { - filters.push(`order_by_time_asc == true`); + conditions.push(`order_by_time_asc == true`); } if (contentSearch.length > 0) { - filters.push(`content_search == [${contentSearch.join(", ")}]`); + conditions.push(`content_search == [${contentSearch.join(", ")}]`); } if (tagSearch.length > 0) { - filters.push(`tag_search == [${tagSearch.join(", ")}]`); + conditions.push(`tag_search == [${tagSearch.join(", ")}]`); } - return filters.join(" && "); + return conditions.join(" && "); }, [user, memoFilterStore.filters, memoFilterStore.orderByTimeAsc]); return ( @@ -77,7 +77,9 @@ const Home = () => { ) .sort((a, b) => Number(b.pinned) - Number(a.pinned)) } - filter={memoListFilter} + owner={user.name} + direction={memoFilterStore.orderByTimeAsc ? Direction.ASC : Direction.DESC} + oldFilter={memoListFilter} /> </div> </div> diff --git a/web/src/pages/UserProfile.tsx b/web/src/pages/UserProfile.tsx index 4e2ebc9c3b886..9383c6298d998 100644 --- a/web/src/pages/UserProfile.tsx +++ b/web/src/pages/UserProfile.tsx @@ -12,7 +12,7 @@ import PagedMemoList from "@/components/PagedMemoList"; import UserAvatar from "@/components/UserAvatar"; import useLoading from "@/hooks/useLoading"; import { useMemoFilterStore, useUserStore } from "@/store/v1"; -import { State } from "@/types/proto/api/v1/common"; +import { Direction, State } from "@/types/proto/api/v1/common"; import { Memo } from "@/types/proto/api/v1/memo_service"; import { User } from "@/types/proto/api/v1/user_service"; import { useTranslate } from "@/utils/i18n"; @@ -48,7 +48,7 @@ const UserProfile = () => { return ""; } - const filters = [`creator == "${user.name}"`, `state == "NORMAL"`, `order_by_pinned == true`]; + const conditions = []; const contentSearch: string[] = []; const tagSearch: string[] = []; for (const filter of memoFilterStore.filters) { @@ -59,12 +59,12 @@ const UserProfile = () => { } } if (contentSearch.length > 0) { - filters.push(`content_search == [${contentSearch.join(", ")}]`); + conditions.push(`content_search == [${contentSearch.join(", ")}]`); } if (tagSearch.length > 0) { - filters.push(`tag_search == [${tagSearch.join(", ")}]`); + conditions.push(`tag_search == [${tagSearch.join(", ")}]`); } - return filters.join(" && "); + return conditions.join(" && "); }, [user, memoFilterStore.filters]); const handleCopyProfileLink = () => { @@ -115,7 +115,9 @@ const UserProfile = () => { ) .sort((a, b) => Number(b.pinned) - Number(a.pinned)) } - filter={memoListFilter} + owner={user.name} + direction={memoFilterStore.orderByTimeAsc ? Direction.ASC : Direction.DESC} + oldFilter={memoListFilter} /> </> ) : (
refactor
renovate list memos endpoint
f3fb5e0c6093e896e8380b0070d9d5059237c9a0
2024-03-18 09:37:44
Steven
chore: tweak route enum
false
diff --git a/web/src/components/MemoContent/index.tsx b/web/src/components/MemoContent/index.tsx index 2d5909954c179..80c4ccfa518ef 100644 --- a/web/src/components/MemoContent/index.tsx +++ b/web/src/components/MemoContent/index.tsx @@ -4,7 +4,6 @@ import useCurrentUser from "@/hooks/useCurrentUser"; import { useMemoStore } from "@/store/v1"; import { Node, NodeType } from "@/types/node"; import { useTranslate } from "@/utils/i18n"; -import Icon from "../Icon"; import Renderer from "./Renderer"; import { RendererContext } from "./types"; @@ -89,15 +88,14 @@ const MemoContent: React.FC<Props> = (props: Props) => { return <Renderer key={`${node.type}-${index}`} index={String(index)} node={node} />; })} </div> - {memo && showCompactMode && ( + {showCompactMode && ( <div className="w-full mt-1"> - <div - className="w-auto inline-flex flex-row justify-start items-center cursor-pointer text-sm text-blue-600 dark:text-blue-400 hover:opacity-80" + <span + className="w-auto flex flex-row justify-start items-center cursor-pointer text-sm text-blue-600 dark:text-blue-400 hover:opacity-80" onClick={() => setShowCompactMode(false)} > <span>{t("memo.show-more")}</span> - <Icon.ChevronRight className="w-4 h-auto" /> - </div> + </span> </div> )} </div> diff --git a/web/src/components/MemoFilter.tsx b/web/src/components/MemoFilter.tsx index b963c69f18522..dff13d5ad0e4b 100644 --- a/web/src/components/MemoFilter.tsx +++ b/web/src/components/MemoFilter.tsx @@ -45,7 +45,7 @@ const MemoFilter = (props: Props) => { filterStore.setTagFilter(undefined); }} > - <Icon.Tag className="w-4 h-auto mr-1 text-gray-500 dark:text-gray-400" /> {tagQuery} + <Icon.Hash className="w-4 h-auto mr-1 text-gray-500 dark:text-gray-400" /> {tagQuery} <Icon.X className="w-4 h-auto ml-1 opacity-40" /> </div> <div diff --git a/web/src/components/Navigation.tsx b/web/src/components/Navigation.tsx index 9924dbf2c4ad8..7fac1b1246a56 100644 --- a/web/src/components/Navigation.tsx +++ b/web/src/components/Navigation.tsx @@ -3,6 +3,7 @@ import classNames from "classnames"; import { useEffect } from "react"; import { NavLink } from "react-router-dom"; import useCurrentUser from "@/hooks/useCurrentUser"; +import { Routes } from "@/router"; import { useInboxStore } from "@/store/v1"; import { Inbox_Status } from "@/types/proto/api/v2/inbox_service"; import { useTranslate } from "@/utils/i18n"; @@ -49,25 +50,25 @@ const Navigation = (props: Props) => { const homeNavLink: NavLinkItem = { id: "header-home", - path: "/", + path: Routes.HOME, title: t("common.home"), icon: <Icon.Home className="w-6 h-auto opacity-70" />, }; const timelineNavLink: NavLinkItem = { id: "header-timeline", - path: "/timeline", + path: Routes.TIMELINE, title: t("timeline.title"), icon: <Icon.GanttChartSquare className="w-6 h-auto opacity-70" />, }; const resourcesNavLink: NavLinkItem = { id: "header-resources", - path: "/resources", + path: Routes.RESOURCES, title: t("common.resources"), icon: <Icon.Paperclip className="w-6 h-auto opacity-70" />, }; const exploreNavLink: NavLinkItem = { id: "header-explore", - path: "/explore", + path: Routes.EXPLORE, title: t("common.explore"), icon: <Icon.Globe2 className="w-6 h-auto opacity-70" />, }; @@ -79,7 +80,7 @@ const Navigation = (props: Props) => { }; const inboxNavLink: NavLinkItem = { id: "header-inbox", - path: "/inbox", + path: Routes.INBOX, title: t("common.inbox"), icon: ( <> @@ -92,25 +93,25 @@ const Navigation = (props: Props) => { }; const archivedNavLink: NavLinkItem = { id: "header-archived", - path: "/archived", + path: Routes.ARCHIVED, title: t("common.archived"), icon: <Icon.Archive className="w-6 h-auto opacity-70" />, }; const settingNavLink: NavLinkItem = { id: "header-setting", - path: "/setting", + path: Routes.SETTING, title: t("common.settings"), icon: <Icon.Settings className="w-6 h-auto opacity-70" />, }; const signInNavLink: NavLinkItem = { id: "header-auth", - path: "/auth", + path: Routes.AUTH, title: t("common.sign-in"), icon: <Icon.LogIn className="w-6 h-auto opacity-70" />, }; const aboutNavLink: NavLinkItem = { id: "header-about", - path: "/about", + path: Routes.ABOUT, title: t("common.about"), icon: <Icon.Smile className="w-6 h-auto opacity-70" />, }; diff --git a/web/src/components/ShareMemoDialog.tsx b/web/src/components/ShareMemoDialog.tsx index f86a8040fbf91..c976762cd00d5 100644 --- a/web/src/components/ShareMemoDialog.tsx +++ b/web/src/components/ShareMemoDialog.tsx @@ -26,14 +26,14 @@ interface Props extends DialogProps { const ShareMemoDialog: React.FC<Props> = (props: Props) => { const { memoId, destroy } = props; const t = useTranslate(); + const currentUser = useCurrentUser(); const userStore = useUserStore(); + const memoStore = useMemoStore(); const downloadingImageState = useLoading(false); const loadingState = useLoading(); - const memoElRef = useRef<HTMLDivElement>(null); - const memoStore = useMemoStore(); + const memoContainerRef = useRef<HTMLDivElement>(null); const memo = memoStore.getMemoById(memoId); const user = userStore.getUserByUsername(extractUsernameFromName(memo.creator)); - const currentUser = useCurrentUser(); const readonly = memo?.creatorId !== currentUser?.id; useEffect(() => { @@ -48,12 +48,12 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => { }; const handleDownloadImageBtnClick = () => { - if (!memoElRef.current) { + if (!memoContainerRef.current) { return; } downloadingImageState.setLoading(); - toImage(memoElRef.current, { + toImage(memoContainerRef.current, { pixelRatio: window.devicePixelRatio * 2, }) .then((url) => { @@ -151,10 +151,10 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => { <div className="w-full border-t dark:border-zinc-700 overflow-clip"> <div className="w-full h-auto select-none relative flex flex-col justify-start items-start bg-white dark:bg-zinc-800" - ref={memoElRef} + ref={memoContainerRef} > <span className="w-full px-6 pt-5 pb-2 text-sm text-gray-500">{getDateTimeString(memo.displayTime)}</span> - <div className="w-full px-6 text-base pb-4"> + <div className="w-full px-6 text-base pb-4 space-y-2"> <MemoContent memoId={memo.id} content={memo.content} readonly={true} disableFilter /> <MemoResourceListView resources={memo.resources} /> </div> diff --git a/web/src/components/TagList.tsx b/web/src/components/TagList.tsx index de2571f8b5807..36ce22ae89f3a 100644 --- a/web/src/components/TagList.tsx +++ b/web/src/components/TagList.tsx @@ -83,7 +83,7 @@ const TagList = () => { <Icon.Plus className="w-4 h-4 text-gray-400" /> </button> </div> - <div className="flex flex-col justify-start items-start relative w-full h-auto flex-nowrap"> + <div className="flex flex-col justify-start items-start relative w-full h-auto flex-nowrap gap-1 mt-1"> {tags.map((t, idx) => ( <TagItemContainer key={t.text + "-" + idx} tag={t} tagQuery={filter.tag} /> ))} @@ -133,7 +133,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain return ( <> - <div className="relative group flex flex-row justify-between items-center w-full h-8 py-0 mt-px first:mt-1 rounded-lg text-base sm:text-sm cursor-pointer select-none shrink-0 hover:opacity-80"> + <div className="relative flex flex-row justify-between items-center w-full leading-6 py-0 mt-px rounded-lg text-base select-none shrink-0"> <div className={`flex flex-row justify-start items-center truncate shrink leading-5 mr-1 text-gray-600 dark:text-gray-400 ${ isActive && "!text-blue-600" @@ -141,11 +141,12 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain > <Dropdown> <MenuButton slots={{ root: "div" }}> - <div className="shrink-0"> - <Icon.Hash className="w-4 h-auto shrink-0 opacity-60 mr-1" /> + <div className="shrink-0 group"> + <Icon.Hash className="group-hover:hidden w-4 h-auto shrink-0 opacity-60 mr-1" /> + <Icon.MoreVertical className="hidden group-hover:block w-4 h-auto shrink-0 opacity-60 mr-1" /> </div> </MenuButton> - <Menu size="sm" placement="bottom-start"> + <Menu size="sm" placement="bottom"> <MenuItem onClick={() => showRenameTagDialog({ tag: tag.text })}> <Icon.Edit3 className="w-4 h-auto" /> {t("common.rename")} @@ -156,7 +157,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain </MenuItem> </Menu> </Dropdown> - <span className="truncate" onClick={handleTagClick}> + <span className="truncate cursor-pointer hover:opacity-80" onClick={handleTagClick}> {tag.key} </span> </div> @@ -166,7 +167,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain className={`flex flex-row justify-center items-center w-6 h-6 shrink-0 transition-all rotate-0 ${showSubTags && "rotate-90"}`} onClick={handleToggleBtnClick} > - <Icon.ChevronRight className="w-5 h-5 opacity-40 dark:text-gray-400" /> + <Icon.ChevronRight className="w-5 h-5 cursor-pointer opacity-40 dark:text-gray-400" /> </span> ) : null} </div> diff --git a/web/src/layouts/HomeLayout.tsx b/web/src/layouts/HomeLayout.tsx index 2bf63c9328a85..14b5bddf1fd12 100644 --- a/web/src/layouts/HomeLayout.tsx +++ b/web/src/layouts/HomeLayout.tsx @@ -26,7 +26,7 @@ const HomeLayout = () => { location.pathname, ) ) { - navigateTo("/explore"); + navigateTo(Routes.EXPLORE); } }, []); diff --git a/web/src/router/index.tsx b/web/src/router/index.tsx index 68f68d3187882..e0814bbbba1f3 100644 --- a/web/src/router/index.tsx +++ b/web/src/router/index.tsx @@ -27,6 +27,9 @@ export enum Routes { INBOX = "/inbox", ARCHIVED = "/archived", SETTING = "/setting", + EXPLORE = "/explore", + ABOUT = "/about", + AUTH = "/auth", } const router = createBrowserRouter([ @@ -35,7 +38,7 @@ const router = createBrowserRouter([ element: <App />, children: [ { - path: "/auth", + path: Routes.AUTH, element: <SuspenseWrapper />, children: [ { @@ -81,7 +84,7 @@ const router = createBrowserRouter([ element: <Setting />, }, { - path: "explore", + path: Routes.EXPLORE, element: <Explore />, }, { @@ -93,7 +96,7 @@ const router = createBrowserRouter([ element: <UserProfile />, }, { - path: "about", + path: Routes.ABOUT, element: <About />, }, {
chore
tweak route enum
c2aeec20b73ae603e6e16d2096cdfe32cedd6fdc
2023-08-27 13:38:39
boojack
chore: upgrade deps version (#2181)
false
diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index 186352b437b73..a62dec9a56a8d 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -13,12 +13,12 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 check-latest: true cache: true - name: Verify go.mod is tidy run: | - go mod tidy -go=1.19 + go mod tidy -go=1.21 git diff --exit-code - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 check-latest: true cache: true - name: Run all tests diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index 4965acd5bf82a..d4dc5b0e12ad9 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -60,7 +60,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.19 + go-version: 1.21 - name: Install mingw-w64 (Windows) if: matrix.os == 'windows-latest' diff --git a/Dockerfile b/Dockerfile index 3306921a28c72..74d8ae83d9555 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build frontend dist. -FROM node:18.12.1-alpine3.16 AS frontend +FROM node:18-alpine AS frontend WORKDIR /frontend-build COPY ./web/package.json ./web/pnpm-lock.yaml ./ @@ -11,7 +11,7 @@ COPY ./web/ . RUN pnpm build # Build backend exec file. -FROM golang:1.19.3-alpine3.16 AS backend +FROM golang:1.21-alpine AS backend WORKDIR /backend-build COPY . . @@ -20,7 +20,7 @@ COPY --from=frontend /frontend-build/dist ./server/dist RUN CGO_ENABLED=0 go build -o memos ./main.go # Make workspace with above generated files. -FROM alpine:3.16 AS monolithic +FROM alpine:latest AS monolithic WORKDIR /usr/local/memos RUN apk add --no-cache tzdata diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml index 867e0f3fdc21d..cfda115a77f37 100644 --- a/docker-compose.dev.yaml +++ b/docker-compose.dev.yaml @@ -10,15 +10,15 @@ # services: api: - image: golang:1.19.3-alpine3.16 + image: golang:1.21-alpine working_dir: /work command: air -c ./scripts/.air.toml volumes: - $HOME/go/pkg/:/go/pkg/ # Cache for go mod shared with the host - - ./.air/bin/:/go/bin/ # Cache for binary used only in container, such as *air* + - ./.air/bin/:/go/bin/ # Cache for binary used only in container, such as *air* - .:/work/ web: - image: node:18.12.1-alpine3.16 + image: node:18-alpine working_dir: /work depends_on: ["api"] ports: ["3001:3001"] diff --git a/go.mod b/go.mod index 634afe38fc96c..0bebe4efa07ca 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/usememos/memos -go 1.19 +go 1.21 require ( github.com/aws/aws-sdk-go-v2 v1.17.4 diff --git a/go.sum b/go.sum index 3c0af33882a74..9bc424ee83efd 100644 --- a/go.sum +++ b/go.sum @@ -83,6 +83,7 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.18.3/go.mod h1:b+psTJn33Q4qGoDaM7ZiO github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -107,6 +108,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -133,6 +135,7 @@ github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOW github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -176,6 +179,7 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -190,6 +194,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ= +github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -224,6 +229,7 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -247,6 +253,7 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -323,6 +330,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= @@ -438,6 +446,7 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -689,7 +698,9 @@ modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= modernc.org/ccgo/v3 v3.16.13 h1:Mkgdzl46i5F/CNR/Kj80Ri59hC8TKAhZrYSaqvkwzUw= modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= modernc.org/ccorpus v1.11.6 h1:J16RXiiqiCgua6+ZvQot4yUuUy8zxgqbqEEUuGPlISk= +modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= modernc.org/httpfs v1.0.6 h1:AAgIpFZRXuYnkjftxTAZwMIiwEqAfk8aVB2/oA6nAeM= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= modernc.org/libc v1.22.5 h1:91BNch/e5B0uPbJFgqbxXuOnxBQjlS//icfQEGmvyjE= modernc.org/libc v1.22.5/go.mod h1:jj+Z7dTNX8fBScMVNRAYZ/jF91K8fdT2hYMThc3YjBY= modernc.org/mathutil v1.5.0 h1:rV0Ko/6SfM+8G+yKiyI830l3Wuz1zRutdslNoQ0kfiQ= @@ -703,9 +714,11 @@ modernc.org/sqlite v1.24.0/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.15.2 h1:C4ybAYCGJw968e+Me18oW55kD/FexcHbqH2xak1ROSY= +modernc.org/tcl v1.15.2/go.mod h1:3+k/ZaEbKrC8ePv8zJWPtBSW0V7Gg9g8rkmhI1Kfs3c= modernc.org/token v1.0.1 h1:A3qvTqOwexpfZZeyI0FeGPDlSWX5pjZu9hF4lU+EKWg= modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.7.3 h1:zDJf6iHjrnB+WRD88stbXokugjyc0/pB91ri1gO6LZY= +modernc.org/z v1.7.3/go.mod h1:Ipv4tsdxZRbQyLq9Q1M6gdbkxYzdlrciF2Hi/lS7nWE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/web/package.json b/web/package.json index 14bcf2400d5e8..04b40e774b587 100644 --- a/web/package.json +++ b/web/package.json @@ -6,57 +6,57 @@ "lint": "eslint --ext .js,.ts,.tsx, src", "lint-fix": "eslint --ext .js,.ts,.tsx, src --fix" }, - "packageManager": "pnpm@8.6.1", + "packageManager": "pnpm@8.7.0", "dependencies": { "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mui/joy": "5.0.0-beta.2", - "@reduxjs/toolkit": "^1.8.1", + "@reduxjs/toolkit": "^1.9.5", "axios": "^0.27.2", "classnames": "^2.3.2", - "copy-to-clipboard": "^3.3.2", - "highlight.js": "^11.6.0", - "i18next": "^21.9.2", - "i18next-browser-languagedetector": "^7.0.1", + "copy-to-clipboard": "^3.3.3", + "highlight.js": "^11.8.0", + "i18next": "^21.10.0", + "i18next-browser-languagedetector": "^7.1.0", "lodash-es": "^4.17.21", - "lucide-react": "^0.263.0", + "lucide-react": "^0.263.1", "qrcode.react": "^3.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-hot-toast": "^2.4.0", + "react-hot-toast": "^2.4.1", "react-i18next": "^11.18.6", - "react-redux": "^8.0.1", - "react-router-dom": "^6.8.2", + "react-redux": "^8.1.2", + "react-router-dom": "^6.15.0", "react-use": "^17.4.0", - "semver": "^7.3.8", - "tailwindcss": "^3.2.4", + "semver": "^7.5.4", + "tailwindcss": "^3.3.3", "textarea-caret": "^3.1.0", "uuid": "^9.0.0", - "zustand": "^4.3.6" + "zustand": "^4.4.1" }, "devDependencies": { - "@trivago/prettier-plugin-sort-imports": "^3.2.0", - "@types/lodash-es": "^4.17.5", - "@types/node": "^18.0.3", + "@trivago/prettier-plugin-sort-imports": "^3.4.0", + "@types/lodash-es": "^4.17.8", + "@types/node": "^18.17.11", "@types/qs": "^6.9.7", - "@types/react": "^18.2.18", + "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", - "@types/semver": "^7.3.13", + "@types/semver": "^7.5.0", "@types/textarea-caret": "^3.0.1", "@types/uuid": "^9.0.2", - "@typescript-eslint/eslint-plugin": "^5.6.0", - "@typescript-eslint/parser": "^5.6.0", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", "@vitejs/plugin-react-swc": "^3.3.2", - "autoprefixer": "^10.4.2", - "eslint": "^8.46.0", - "eslint-config-prettier": "^8.6.0", + "autoprefixer": "^10.4.15", + "eslint": "^8.48.0", + "eslint-config-prettier": "^8.10.0", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-react": "^7.27.1", - "less": "^4.1.1", - "postcss": "^8.4.21", + "eslint-plugin-react": "^7.33.2", + "less": "^4.2.0", + "postcss": "^8.4.28", "prettier": "2.6.2", - "terser": "^5.16.1", - "typescript": "^5.1.6", + "terser": "^5.19.2", + "typescript": "^5.2.2", "vite": "^4.4.9" } } diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index c0ec3db9b87f7..b5e3a66329c0c 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -7,16 +7,16 @@ settings: dependencies: '@emotion/react': specifier: ^11.11.1 - version: 11.11.1(@types/react@18.2.18)(react@18.2.0) + version: 11.11.1(@types/react@18.2.21)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.18)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.21)(react@18.2.0) '@mui/joy': specifier: 5.0.0-beta.2 - version: 5.0.0-beta.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.18)(react-dom@18.2.0)(react@18.2.0) + version: 5.0.0-beta.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) '@reduxjs/toolkit': - specifier: ^1.8.1 - version: 1.8.1(react-redux@8.0.1)(react@18.2.0) + specifier: ^1.9.5 + version: 1.9.5(react-redux@8.1.2)(react@18.2.0) axios: specifier: ^0.27.2 version: 0.27.2 @@ -24,23 +24,23 @@ dependencies: specifier: ^2.3.2 version: 2.3.2 copy-to-clipboard: - specifier: ^3.3.2 - version: 3.3.2 + specifier: ^3.3.3 + version: 3.3.3 highlight.js: - specifier: ^11.6.0 - version: 11.6.0 + specifier: ^11.8.0 + version: 11.8.0 i18next: - specifier: ^21.9.2 - version: 21.9.2 + specifier: ^21.10.0 + version: 21.10.0 i18next-browser-languagedetector: - specifier: ^7.0.1 - version: 7.0.1 + specifier: ^7.1.0 + version: 7.1.0 lodash-es: specifier: ^4.17.21 version: 4.17.21 lucide-react: - specifier: ^0.263.0 - version: 0.263.0(react@18.2.0) + specifier: ^0.263.1 + version: 0.263.1(react@18.2.0) qrcode.react: specifier: ^3.1.0 version: 3.1.0(react@18.2.0) @@ -51,26 +51,26 @@ dependencies: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) react-hot-toast: - specifier: ^2.4.0 - version: 2.4.0(csstype@3.1.2)(react-dom@18.2.0)(react@18.2.0) + specifier: ^2.4.1 + version: 2.4.1(csstype@3.1.2)(react-dom@18.2.0)(react@18.2.0) react-i18next: specifier: ^11.18.6 - version: 11.18.6(i18next@21.9.2)(react-dom@18.2.0)(react@18.2.0) + version: 11.18.6(i18next@21.10.0)(react-dom@18.2.0)(react@18.2.0) react-redux: - specifier: ^8.0.1 - version: 8.0.1(@types/react-dom@18.2.7)(@types/react@18.2.18)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) + specifier: ^8.1.2 + version: 8.1.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) react-router-dom: - specifier: ^6.8.2 - version: 6.8.2(react-dom@18.2.0)(react@18.2.0) + specifier: ^6.15.0 + version: 6.15.0(react-dom@18.2.0)(react@18.2.0) react-use: specifier: ^17.4.0 version: 17.4.0(react-dom@18.2.0)(react@18.2.0) semver: - specifier: ^7.3.8 - version: 7.3.8 + specifier: ^7.5.4 + version: 7.5.4 tailwindcss: - specifier: ^3.2.4 - version: 3.2.4(postcss@8.4.21) + specifier: ^3.3.3 + version: 3.3.3 textarea-caret: specifier: ^3.1.0 version: 3.1.0 @@ -78,31 +78,31 @@ dependencies: specifier: ^9.0.0 version: 9.0.0 zustand: - specifier: ^4.3.6 - version: 4.3.6(react@18.2.0) + specifier: ^4.4.1 + version: 4.4.1(@types/react@18.2.21)(react@18.2.0) devDependencies: '@trivago/prettier-plugin-sort-imports': - specifier: ^3.2.0 - version: 3.2.0(prettier@2.6.2) + specifier: ^3.4.0 + version: 3.4.0(prettier@2.6.2) '@types/lodash-es': - specifier: ^4.17.5 - version: 4.17.5 + specifier: ^4.17.8 + version: 4.17.8 '@types/node': - specifier: ^18.0.3 - version: 18.0.3 + specifier: ^18.17.11 + version: 18.17.11 '@types/qs': specifier: ^6.9.7 version: 6.9.7 '@types/react': - specifier: ^18.2.18 - version: 18.2.18 + specifier: ^18.2.21 + version: 18.2.21 '@types/react-dom': specifier: ^18.2.7 version: 18.2.7 '@types/semver': - specifier: ^7.3.13 - version: 7.3.13 + specifier: ^7.5.0 + version: 7.5.0 '@types/textarea-caret': specifier: ^3.0.1 version: 3.0.1 @@ -110,47 +110,47 @@ devDependencies: specifier: ^9.0.2 version: 9.0.2 '@typescript-eslint/eslint-plugin': - specifier: ^5.6.0 - version: 5.6.0(@typescript-eslint/parser@5.6.0)(eslint@8.46.0)(typescript@5.1.6) + specifier: ^5.62.0 + version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^5.6.0 - version: 5.6.0(eslint@8.46.0)(typescript@5.1.6) + specifier: ^5.62.0 + version: 5.62.0(eslint@8.48.0)(typescript@5.2.2) '@vitejs/plugin-react-swc': specifier: ^3.3.2 version: 3.3.2(vite@4.4.9) autoprefixer: - specifier: ^10.4.2 - version: 10.4.2(postcss@8.4.21) + specifier: ^10.4.15 + version: 10.4.15(postcss@8.4.28) eslint: - specifier: ^8.46.0 - version: 8.46.0 + specifier: ^8.48.0 + version: 8.48.0 eslint-config-prettier: - specifier: ^8.6.0 - version: 8.6.0(eslint@8.46.0) + specifier: ^8.10.0 + version: 8.10.0(eslint@8.48.0) eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.6.0)(eslint@8.46.0)(prettier@2.6.2) + version: 4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.6.2) eslint-plugin-react: - specifier: ^7.27.1 - version: 7.27.1(eslint@8.46.0) + specifier: ^7.33.2 + version: 7.33.2(eslint@8.48.0) less: - specifier: ^4.1.1 - version: 4.1.1 + specifier: ^4.2.0 + version: 4.2.0 postcss: - specifier: ^8.4.21 - version: 8.4.21 + specifier: ^8.4.28 + version: 8.4.28 prettier: specifier: 2.6.2 version: 2.6.2 terser: - specifier: ^5.16.1 - version: 5.16.1 + specifier: ^5.19.2 + version: 5.19.2 typescript: - specifier: ^5.1.6 - version: 5.1.6 + specifier: ^5.2.2 + version: 5.2.2 vite: specifier: ^4.4.9 - version: 4.4.9(@types/node@18.0.3)(less@4.1.1)(terser@5.16.1) + version: 4.4.9(@types/node@18.17.11)(less@4.2.0)(terser@5.19.2) packages: @@ -159,67 +159,78 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + /@alloc/quick-lru@5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + dev: false + + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + dev: true + + /@babel/code-frame@7.22.10: + resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.10 + chalk: 2.4.2 /@babel/compat-data@7.22.9: resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.13.10: - resolution: {integrity: sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw==} + /@babel/core@7.17.8: + resolution: {integrity: sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.13.9 - '@babel/helper-compilation-targets': 7.22.9(@babel/core@7.13.10) - '@babel/helper-module-transforms': 7.22.9(@babel/core@7.13.10) - '@babel/helpers': 7.22.6 - '@babel/parser': 7.14.6 + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.22.10 + '@babel/generator': 7.17.7 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.17.8) + '@babel/helpers': 7.22.11 + '@babel/parser': 7.18.9 '@babel/template': 7.22.5 - '@babel/traverse': 7.13.0 - '@babel/types': 7.13.0 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 convert-source-map: 1.9.0 debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 - lodash: 4.17.21 semver: 6.3.1 - source-map: 0.5.7 transitivePeerDependencies: - supports-color dev: true - /@babel/generator@7.13.9: - resolution: {integrity: sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==} + /@babel/generator@7.17.7: + resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} + engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.13.0 + '@babel/types': 7.17.0 jsesc: 2.5.2 source-map: 0.5.7 dev: true - /@babel/generator@7.22.9: - resolution: {integrity: sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==} + /@babel/generator@7.22.10: + resolution: {integrity: sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 + '@jridgewell/trace-mapping': 0.3.19 jsesc: 2.5.2 dev: true - /@babel/helper-compilation-targets@7.22.9(@babel/core@7.13.10): - resolution: {integrity: sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==} + /@babel/helper-compilation-targets@7.22.10: + resolution: {integrity: sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: '@babel/compat-data': 7.22.9 - '@babel/core': 7.13.10 '@babel/helper-validator-option': 7.22.5 browserslist: 4.21.10 lru-cache: 5.1.1 @@ -236,29 +247,29 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-module-imports@7.22.5: resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 - /@babel/helper-module-transforms@7.22.9(@babel/core@7.13.10): + /@babel/helper-module-transforms@7.22.9(@babel/core@7.17.8): resolution: {integrity: sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.13.10 + '@babel/core': 7.17.8 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-module-imports': 7.22.5 '@babel/helper-simple-access': 7.22.5 @@ -270,14 +281,14 @@ packages: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.11 dev: true /@babel/helper-string-parser@7.22.5: @@ -293,101 +304,103 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helpers@7.22.6: - resolution: {integrity: sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==} + /@babel/helpers@7.22.11: + resolution: {integrity: sha512-vyOXC8PBWaGc5h7GMsNx68OH33cypkEDJCHvYVVgVbbxJDROYVtexSk0gK5iCF1xNjRIN2s8ai7hwkWDq5szWg==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.5 - '@babel/traverse': 7.22.8 - '@babel/types': 7.22.5 + '@babel/traverse': 7.22.11 + '@babel/types': 7.22.11 transitivePeerDependencies: - supports-color dev: true - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + /@babel/highlight@7.22.10: + resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.5 chalk: 2.4.2 js-tokens: 4.0.0 - /@babel/parser@7.14.6: - resolution: {integrity: sha512-oG0ej7efjEXxb4UgE+klVx+3j4MVo+A2vCzm7OUN4CLo6WhQ+vSOD2yJ8m7B+DghObxtLxt3EfgMWpq+AsWehQ==} + /@babel/parser@7.18.9: + resolution: {integrity: sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.13.0 + '@babel/types': 7.17.0 dev: true - /@babel/parser@7.22.7: - resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} + /@babel/parser@7.22.11: + resolution: {integrity: sha512-R5zb8eJIBPJriQtbH/htEQy4k7E2dHWlD2Y2VT07JCzwYZHBxV5ZYtM0UhXSNMT74LyxuM+b1jdL7pSesXbC/g==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.17.0 dev: true - /@babel/runtime@7.22.6: - resolution: {integrity: sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==} + /@babel/runtime@7.22.11: + resolution: {integrity: sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.11 + regenerator-runtime: 0.14.0 dev: false /@babel/template@7.22.5: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/code-frame': 7.22.10 + '@babel/parser': 7.22.11 + '@babel/types': 7.22.11 dev: true - /@babel/traverse@7.13.0: - resolution: {integrity: sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==} + /@babel/traverse@7.17.3: + resolution: {integrity: sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==} + engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.13.9 + '@babel/code-frame': 7.22.10 + '@babel/generator': 7.17.7 + '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.14.6 - '@babel/types': 7.13.0 + '@babel/parser': 7.18.9 + '@babel/types': 7.17.0 debug: 4.3.4 globals: 11.12.0 - lodash: 4.17.21 transitivePeerDependencies: - supports-color dev: true - /@babel/traverse@7.22.8: - resolution: {integrity: sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==} + /@babel/traverse@7.22.11: + resolution: {integrity: sha512-mzAenteTfomcB7mfPtyi+4oe5BZ6MXxWcn4CX+h4IRJ+OOGXBrWU6jDQavkQI9Vuc5P+donFabBfFCcmWka9lQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.9 + '@babel/code-frame': 7.22.10 + '@babel/generator': 7.22.10 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.22.7 - '@babel/types': 7.22.5 + '@babel/parser': 7.22.11 + '@babel/types': 7.22.11 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types@7.13.0: - resolution: {integrity: sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==} + /@babel/types@7.17.0: + resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.5 - lodash: 4.17.21 to-fast-properties: 2.0.0 dev: true - /@babel/types@7.22.5: - resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} + /@babel/types@7.22.11: + resolution: {integrity: sha512-siazHiGuZRz9aB9NpHy9GOs9xiQPKnMzgdr493iI1M67vRXpnEq8ZOOKzezC5q7zwuQ6sDhdSp4SD9ixKSqKZg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 @@ -398,7 +411,7 @@ packages: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: '@babel/helper-module-imports': 7.22.5 - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 '@emotion/hash': 0.9.1 '@emotion/memoize': 0.8.1 '@emotion/serialize': 1.1.2 @@ -434,7 +447,7 @@ packages: resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} dev: false - /@emotion/react@11.11.1(@types/react@18.2.18)(react@18.2.0): + /@emotion/react@11.11.1(@types/react@18.2.21)(react@18.2.0): resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' @@ -443,14 +456,14 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 - '@types/react': 18.2.18 + '@types/react': 18.2.21 hoist-non-react-statics: 3.3.2 react: 18.2.0 dev: false @@ -469,7 +482,7 @@ packages: resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} dev: false - /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.18)(react@18.2.0): + /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.21)(react@18.2.0): resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} peerDependencies: '@emotion/react': ^11.0.0-rc.0 @@ -479,14 +492,14 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 '@emotion/babel-plugin': 11.11.0 '@emotion/is-prop-valid': 1.2.1 - '@emotion/react': 11.11.1(@types/react@18.2.18)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.21)(react@18.2.0) '@emotion/serialize': 1.1.2 '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 - '@types/react': 18.2.18 + '@types/react': 18.2.21 react: 18.2.0 dev: false @@ -708,29 +721,29 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.46.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.48.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.46.0 - eslint-visitor-keys: 3.4.2 + eslint: 8.48.0 + eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.6.2: - resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} + /@eslint-community/regexpp@4.8.0: + resolution: {integrity: sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.1: - resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} + /@eslint/eslintrc@2.1.2: + resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 espree: 9.6.1 - globals: 13.20.0 + globals: 13.21.0 ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -740,8 +753,8 @@ packages: - supports-color dev: true - /@eslint/js@8.46.0: - resolution: {integrity: sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==} + /@eslint/js@8.48.0: + resolution: {integrity: sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -771,42 +784,33 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.18 - dev: true + '@jridgewell/trace-mapping': 0.3.19 - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} - dev: true /@jridgewell/set-array@1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} - dev: true /@jridgewell/source-map@0.3.5: resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 - dev: true - - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + '@jridgewell/trace-mapping': 0.3.19 dev: true /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - dev: true - /@jridgewell/trace-mapping@0.3.18: - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + /@jridgewell/trace-mapping@0.3.19: + resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 - /@mui/base@5.0.0-beta.11(@types/react@18.2.18)(react-dom@18.2.0)(react@18.2.0): + /@mui/base@5.0.0-beta.11(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-FdKZGPd8qmC3ZNke7CNhzcEgToc02M6WYZc9hcBsNQ17bgAd3s9F//1bDDYgMVBYxDM71V0sv/hBHlOY4I1ZVA==} engines: {node: '>=12.0.0'} peerDependencies: @@ -817,12 +821,12 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 '@emotion/is-prop-valid': 1.2.1 - '@mui/types': 7.2.4(@types/react@18.2.18) - '@mui/utils': 5.14.5(react@18.2.0) + '@mui/types': 7.2.4(@types/react@18.2.21) + '@mui/utils': 5.14.6(react@18.2.0) '@popperjs/core': 2.11.8 - '@types/react': 18.2.18 + '@types/react': 18.2.21 clsx: 2.0.0 prop-types: 15.8.1 react: 18.2.0 @@ -830,11 +834,11 @@ packages: react-is: 18.2.0 dev: false - /@mui/core-downloads-tracker@5.14.5: - resolution: {integrity: sha512-+wpGH1USwPcKMFPMvXqYPC6fEvhxM3FzxC8lyDiNK/imLyyJ6y2DPb1Oue7OGIKJWBmYBqrWWtfovrxd1aJHTA==} + /@mui/core-downloads-tracker@5.14.6: + resolution: {integrity: sha512-QZEU3pyGWLuaHbxvOlShol7U1FVgzWBR0OH9H8D7L8w4/vto5N5jJVvlqFQS3T0zbR6YGHxFaiL6Ky87jQg7aw==} dev: false - /@mui/joy@5.0.0-beta.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.18)(react-dom@18.2.0)(react@18.2.0): + /@mui/joy@5.0.0-beta.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-5NfZcOYufTOSXh0b34YZzF1CHwuHf07cgSNdyn3WUUwg67oyNOPKhaskttX6aSp0j8Rf8OpKzd+7Ni6Em0jPgQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -851,15 +855,15 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 - '@emotion/react': 11.11.1(@types/react@18.2.18)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.18)(react@18.2.0) - '@mui/base': 5.0.0-beta.11(@types/react@18.2.18)(react-dom@18.2.0)(react@18.2.0) - '@mui/core-downloads-tracker': 5.14.5 - '@mui/system': 5.14.5(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.18)(react@18.2.0) - '@mui/types': 7.2.4(@types/react@18.2.18) - '@mui/utils': 5.14.5(react@18.2.0) - '@types/react': 18.2.18 + '@babel/runtime': 7.22.11 + '@emotion/react': 11.11.1(@types/react@18.2.21)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.21)(react@18.2.0) + '@mui/base': 5.0.0-beta.11(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0) + '@mui/core-downloads-tracker': 5.14.6 + '@mui/system': 5.14.6(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.21)(react@18.2.0) + '@mui/types': 7.2.4(@types/react@18.2.21) + '@mui/utils': 5.14.6(react@18.2.0) + '@types/react': 18.2.21 clsx: 2.0.0 csstype: 3.1.2 prop-types: 15.8.1 @@ -868,8 +872,8 @@ packages: react-is: 18.2.0 dev: false - /@mui/private-theming@5.14.5(@types/react@18.2.18)(react@18.2.0): - resolution: {integrity: sha512-cC4C5RrpXpDaaZyH9QwmPhRLgz+f2SYbOty3cPkk4qPSOSfif2ZEcDD9HTENKDDd9deB+xkPKzzZhi8cxIx8Ig==} + /@mui/private-theming@5.14.6(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-3VBLFGizBXfofyk33bwRg6t9L648aKnLmOKPfY1wFuiXq3AEYwobK65iDci/tHKxm/VKbZ6A7PFjLejvB3EvRQ==} engines: {node: '>=12.0.0'} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -878,15 +882,15 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 - '@mui/utils': 5.14.5(react@18.2.0) - '@types/react': 18.2.18 + '@babel/runtime': 7.22.11 + '@mui/utils': 5.14.6(react@18.2.0) + '@types/react': 18.2.21 prop-types: 15.8.1 react: 18.2.0 dev: false - /@mui/styled-engine@5.13.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(react@18.2.0): - resolution: {integrity: sha512-VCYCU6xVtXOrIN8lcbuPmoG+u7FYuOERG++fpY74hPpEWkyFQG97F+/XfTQVYzlR2m7nPjnwVUgATcTCMEaMvw==} + /@mui/styled-engine@5.14.6(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(react@18.2.0): + resolution: {integrity: sha512-I6zeu/OP1Hk4NsX1Oj85TiYl1dER0JMsLJVn76J1Ihl24A5EbiZQKJp3Mn+ufA79ypkdAvM9aQCAQyiVBFcUHg==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.4.1 @@ -898,17 +902,17 @@ packages: '@emotion/styled': optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 '@emotion/cache': 11.11.0 - '@emotion/react': 11.11.1(@types/react@18.2.18)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.18)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.21)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.21)(react@18.2.0) csstype: 3.1.2 prop-types: 15.8.1 react: 18.2.0 dev: false - /@mui/system@5.14.5(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.18)(react@18.2.0): - resolution: {integrity: sha512-mextXZHDeGcR7E1kx43TRARrVXy+gI4wzpUgNv7MqZs1dvTVXQGVeAT6ydj9d6FUqHBPMNLGV/21vJOrpqsL+w==} + /@mui/system@5.14.6(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-/n0ae1MegWjiV1BpRU8jgg4E0zBjeB2VYsT/68ag/xaDuq3/TaDKJeT9REIvyBvwlG3CI3S2O+tRELktxCD1kg==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -923,21 +927,21 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.6 - '@emotion/react': 11.11.1(@types/react@18.2.18)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.18)(react@18.2.0) - '@mui/private-theming': 5.14.5(@types/react@18.2.18)(react@18.2.0) - '@mui/styled-engine': 5.13.2(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(react@18.2.0) - '@mui/types': 7.2.4(@types/react@18.2.18) - '@mui/utils': 5.14.5(react@18.2.0) - '@types/react': 18.2.18 + '@babel/runtime': 7.22.11 + '@emotion/react': 11.11.1(@types/react@18.2.21)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.21)(react@18.2.0) + '@mui/private-theming': 5.14.6(@types/react@18.2.21)(react@18.2.0) + '@mui/styled-engine': 5.14.6(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(react@18.2.0) + '@mui/types': 7.2.4(@types/react@18.2.21) + '@mui/utils': 5.14.6(react@18.2.0) + '@types/react': 18.2.21 clsx: 2.0.0 csstype: 3.1.2 prop-types: 15.8.1 react: 18.2.0 dev: false - /@mui/types@7.2.4(@types/react@18.2.18): + /@mui/types@7.2.4(@types/react@18.2.21): resolution: {integrity: sha512-LBcwa8rN84bKF+f5sDyku42w1NTxaPgPyYKODsh01U1fVstTClbUoSA96oyRBnSNyEiAVjKm6Gwx9vjR+xyqHA==} peerDependencies: '@types/react': '*' @@ -945,16 +949,16 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.18 + '@types/react': 18.2.21 dev: false - /@mui/utils@5.14.5(react@18.2.0): - resolution: {integrity: sha512-6Hzw63VR9C5xYv+CbjndoRLU6Gntal8rJ5W+GUzkyHrGWIyYPWZPa6AevnyGioySNETATe1H9oXS8f/7qgIHJA==} + /@mui/utils@5.14.6(react@18.2.0): + resolution: {integrity: sha512-AznpqLu6hrFnpHgcvsSSMCG+cDbkcCYfo+daUwBVReNYv4l+NQ8+wvBAF4aUMi155N7xWbbgh0cyKs6Wdsm3aA==} engines: {node: '>=12.0.0'} peerDependencies: react: ^17.0.0 || ^18.0.0 dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 '@types/prop-types': 15.7.5 '@types/react-is': 18.2.1 prop-types: 15.8.1 @@ -984,11 +988,11 @@ packages: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} dev: false - /@reduxjs/toolkit@1.8.1(react-redux@8.0.1)(react@18.2.0): - resolution: {integrity: sha512-Q6mzbTpO9nOYRnkwpDlFOAbQnd3g7zj7CtHAZWz5SzE5lcV97Tf8f3SzOO8BoPOMYBFgfZaqTUZqgGu+a0+Fng==} + /@reduxjs/toolkit@1.9.5(react-redux@8.1.2)(react@18.2.0): + resolution: {integrity: sha512-Rt97jHmfTeaxL4swLRNPD/zV4OxTes4la07Xc4hetpUW/vc75t5m1ANyxG6ymnEQ2FsLQsoMlYB2vV1sO3m8tQ==} peerDependencies: react: ^16.9.0 || ^17.0.0 || ^18 - react-redux: ^7.2.1 || ^8.0.0-beta + react-redux: ^7.2.1 || ^8.0.2 peerDependenciesMeta: react: optional: true @@ -997,19 +1001,19 @@ packages: dependencies: immer: 9.0.21 react: 18.2.0 - react-redux: 8.0.1(@types/react-dom@18.2.7)(@types/react@18.2.18)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) + react-redux: 8.1.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1) redux: 4.2.1 redux-thunk: 2.4.2(redux@4.2.1) reselect: 4.1.8 dev: false - /@remix-run/router@1.3.3: - resolution: {integrity: sha512-YRHie1yQEj0kqqCTCJEfHqYSSNlZQ696QJG+MMiW4mxSl9I0ojz/eRhJS4fs88Z5i6D1SmoF9d3K99/QOhI8/w==} - engines: {node: '>=14'} + /@remix-run/router@1.8.0: + resolution: {integrity: sha512-mrfKqIHnSZRyIzBcanNJmVQELTnX+qagEDlcKO90RgRBVOZGSGvZKeDihTRfWcqoDn5N/NkUcwWTccnpN18Tfg==} + engines: {node: '>=14.0.0'} dev: false - /@swc/core-darwin-arm64@1.3.74: - resolution: {integrity: sha512-2rMV4QxM583jXcREfo0MhV3Oj5pgRSfSh/kVrB1twL2rQxOrbzkAPT/8flmygdVoL4f2F7o1EY5lKlYxEBiIKQ==} + /@swc/core-darwin-arm64@1.3.80: + resolution: {integrity: sha512-rhoFTcQMUGfO7IkfOnopPSF6O0/aVJ58B7KueIKbvrMe6YvSfFj9QfObELFjYCcrJZTvUWBhig0QrsfPIiUphA==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] @@ -1017,8 +1021,8 @@ packages: dev: true optional: true - /@swc/core-darwin-x64@1.3.74: - resolution: {integrity: sha512-KKEGE1wXneYXe15fWDRM8/oekd/Q4yAuccA0vWY/7i6nOSPqWYcSDR0nRtR030ltDxWt0rk/eCTmNkrOWrKs3A==} + /@swc/core-darwin-x64@1.3.80: + resolution: {integrity: sha512-0dOLedFpVXe+ugkKHXsqSxMKqvQYfFtibWbrZ7j8wOaErzSGPr0VpyWvepNVb9s046725kPXSw+fsGhqZR8wrw==} engines: {node: '>=10'} cpu: [x64] os: [darwin] @@ -1026,8 +1030,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm-gnueabihf@1.3.74: - resolution: {integrity: sha512-HehH5DR6r/5fIVu7tu8ZqgrHkhSCQNewf1ztFQJgcmaQWn+H4AJERBjwkjosqh4TvUJucZv8vyRTvrFeBXaCSA==} + /@swc/core-linux-arm-gnueabihf@1.3.80: + resolution: {integrity: sha512-QIjwP3PtDeHBDkwF6+ZZqdUsqAhORbMpxrw2jq3mHe4lQrxBttSFTq018vlMRo2mFEorOvXdadzaD9m+NymPrw==} engines: {node: '>=10'} cpu: [arm] os: [linux] @@ -1035,8 +1039,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-gnu@1.3.74: - resolution: {integrity: sha512-+xkbCRz/wczgdknoV4NwYxbRI2dD7x/qkIFcVM2buzLCq8oWLweuV8+aL4pRqu0qDh7ZSb1jcaVTUIsySCJznA==} + /@swc/core-linux-arm64-gnu@1.3.80: + resolution: {integrity: sha512-cg8WriIueab58ZwkzXmIACnjSzFLzOBwxlC9k65gPXMNgCjab2YbqEYvAbjBqneuqaao02gW6tad2uhjgYaExw==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1044,8 +1048,8 @@ packages: dev: true optional: true - /@swc/core-linux-arm64-musl@1.3.74: - resolution: {integrity: sha512-maKFZSCD3tQznzPV7T3V+TtiWZFEFM8YrnSS5fQNNb+K9J65sL+170uTb3M7H4cFkG+9Sm5k5yCrCIutlvV48g==} + /@swc/core-linux-arm64-musl@1.3.80: + resolution: {integrity: sha512-AhdCQ7QKx5mWrtpaOA1mFRiWWvuiiUtspvo0QSpspDetRKTND1rlf/3UB5+gp0kCeCNUTsVmJWU7fIA9ICZtXA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] @@ -1053,8 +1057,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-gnu@1.3.74: - resolution: {integrity: sha512-LEXpcShF6DLTWJSiBhMSYZkLQ27UvaQ24fCFhoIV/R3dhYaUpHmIyLPPBNC82T03lB3ONUFVwrRw6fxDJ/f00A==} + /@swc/core-linux-x64-gnu@1.3.80: + resolution: {integrity: sha512-+2e5oni1vOrLIjM5Q2/GIzK/uS2YEtuJqnjPvCK8SciRJsSl8OgVsRvyCDbmKeZNtJ2Q+o/O2AQ2w1qpAJG6jg==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -1062,8 +1066,8 @@ packages: dev: true optional: true - /@swc/core-linux-x64-musl@1.3.74: - resolution: {integrity: sha512-sxsFctbFMZEFmDE7CmYljG0dMumH8XBTwwtGr8s6z0fYAzXBGNq2AFPcmEh2np9rPWkt7pE1m0ByESD+dMkbxQ==} + /@swc/core-linux-x64-musl@1.3.80: + resolution: {integrity: sha512-8OK9IlI1zpWOm7vIp1iXmZSEzLAwFpqhsGSEhxPavpOx2m54kLFdPcw/Uv3n461f6TCtszIxkGq1kSqBUdfUBA==} engines: {node: '>=10'} cpu: [x64] os: [linux] @@ -1071,8 +1075,8 @@ packages: dev: true optional: true - /@swc/core-win32-arm64-msvc@1.3.74: - resolution: {integrity: sha512-F7hY9/BjFCozA4YPFYFH5FGCyWwa44vIXHqG66F5cDwXDGFn8ZtBsYIsiPfUYcx0AeAo1ojnVWKPxokZhYNYqA==} + /@swc/core-win32-arm64-msvc@1.3.80: + resolution: {integrity: sha512-RKhatwiAGlffnF6z2Mm3Ddid0v3KB+uf5m/Gc7N9zO/EUAV0PnHRuYuZSGyqodHmGFC+mK8YrCooFCEmHL9n+w==} engines: {node: '>=10'} cpu: [arm64] os: [win32] @@ -1080,8 +1084,8 @@ packages: dev: true optional: true - /@swc/core-win32-ia32-msvc@1.3.74: - resolution: {integrity: sha512-qBAsiD1AlIdqED6wy3UNRHyAys9pWMUidX0LJ6mj24r/vfrzzTBAUrLJe5m7bzE+F1Rgi001avYJeEW1DLEJ+Q==} + /@swc/core-win32-ia32-msvc@1.3.80: + resolution: {integrity: sha512-3jiiZzU/kaw7k4zUp1yMq1QiUe4wJVtCEXIhf+fKuBsIwm7rdvyK/+PIx5KHnZy4TGQnYczKBRhJA5nuBcrUCQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] @@ -1089,8 +1093,8 @@ packages: dev: true optional: true - /@swc/core-win32-x64-msvc@1.3.74: - resolution: {integrity: sha512-S3YAvvLprTnPRwQuy9Dkwubb5SRLpVK3JJsqYDbGfgj8PGQyKHZcVJ5X3nfFsoWLy3j9B/3Os2nawprRSzeC5A==} + /@swc/core-win32-x64-msvc@1.3.80: + resolution: {integrity: sha512-2eZtIoIWQBWqykfms92Zd37lveYOBWQTZjdooBGlsLHtcoQLkNpf1NXmR6TKY0yy8q6Yl3OhPvY+izjmO08MSg==} engines: {node: '>=10'} cpu: [x64] os: [win32] @@ -1098,8 +1102,8 @@ packages: dev: true optional: true - /@swc/core@1.3.74: - resolution: {integrity: sha512-P+MIExOTdWlfq8Heb1/NhBAke6UTckd4cRDuJoFcFMGBRvgoCMNWhnfP3FRRXPLI7GGg27dRZS+xHiqYyQmSrA==} + /@swc/core@1.3.80: + resolution: {integrity: sha512-yX2xV5I/lYswHHR+44TPvzBgq3/Y8N1YWpTQADYuvSiX3Jxyvemk5Jpx3rRtigYb8WBkWAAf2i5d5ZJ2M7hhgw==} engines: {node: '>=10'} requiresBuild: true peerDependencies: @@ -1107,29 +1111,36 @@ packages: peerDependenciesMeta: '@swc/helpers': optional: true + dependencies: + '@swc/types': 0.1.4 optionalDependencies: - '@swc/core-darwin-arm64': 1.3.74 - '@swc/core-darwin-x64': 1.3.74 - '@swc/core-linux-arm-gnueabihf': 1.3.74 - '@swc/core-linux-arm64-gnu': 1.3.74 - '@swc/core-linux-arm64-musl': 1.3.74 - '@swc/core-linux-x64-gnu': 1.3.74 - '@swc/core-linux-x64-musl': 1.3.74 - '@swc/core-win32-arm64-msvc': 1.3.74 - '@swc/core-win32-ia32-msvc': 1.3.74 - '@swc/core-win32-x64-msvc': 1.3.74 - dev: true - - /@trivago/prettier-plugin-sort-imports@3.2.0(prettier@2.6.2): - resolution: {integrity: sha512-DnwLe+z8t/dZX5xBbYZV1+C5STkyK/P6SSq3Nk6NXlJZsgvDZX2eN4ND7bMFgGV/NL/YChWzcNf6ziGba1ktQQ==} + '@swc/core-darwin-arm64': 1.3.80 + '@swc/core-darwin-x64': 1.3.80 + '@swc/core-linux-arm-gnueabihf': 1.3.80 + '@swc/core-linux-arm64-gnu': 1.3.80 + '@swc/core-linux-arm64-musl': 1.3.80 + '@swc/core-linux-x64-gnu': 1.3.80 + '@swc/core-linux-x64-musl': 1.3.80 + '@swc/core-win32-arm64-msvc': 1.3.80 + '@swc/core-win32-ia32-msvc': 1.3.80 + '@swc/core-win32-x64-msvc': 1.3.80 + dev: true + + /@swc/types@0.1.4: + resolution: {integrity: sha512-z/G02d+59gyyUb7KYhKi9jOhicek6QD2oMaotUyG+lUkybpXoV49dY9bj7Ah5Q+y7knK2jU67UTX9FyfGzaxQg==} + dev: true + + /@trivago/prettier-plugin-sort-imports@3.4.0(prettier@2.6.2): + resolution: {integrity: sha512-485Iailw8X5f7KetzRka20RF1kPBEINR5LJMNwlBZWY1gRAlVnv5dZzyNPnLxSP0Qcia8HETa9Cdd8LlX9o+pg==} peerDependencies: prettier: 2.x dependencies: - '@babel/core': 7.13.10 - '@babel/generator': 7.13.9 - '@babel/parser': 7.14.6 - '@babel/traverse': 7.13.0 - '@babel/types': 7.13.0 + '@babel/core': 7.17.8 + '@babel/generator': 7.17.7 + '@babel/parser': 7.18.9 + '@babel/traverse': 7.17.3 + '@babel/types': 7.17.0 + '@vue/compiler-sfc': 3.3.4 javascript-natural-sort: 0.7.1 lodash: 4.17.21 prettier: 2.6.2 @@ -1140,7 +1151,7 @@ packages: /@types/hoist-non-react-statics@3.3.1: resolution: {integrity: sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==} dependencies: - '@types/react': 18.2.18 + '@types/react': 18.2.21 hoist-non-react-statics: 3.3.2 dev: false @@ -1152,18 +1163,18 @@ packages: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} dev: true - /@types/lodash-es@4.17.5: - resolution: {integrity: sha512-SHBoI8/0aoMQWAgUHMQ599VM6ZiSKg8sh/0cFqqlQQMyY9uEplc0ULU5yQNzcvdR4ZKa0ey8+vFmahuRbOCT1A==} + /@types/lodash-es@4.17.8: + resolution: {integrity: sha512-euY3XQcZmIzSy7YH5+Unb3b2X12Wtk54YWINBvvGQ5SmMvwb11JQskGsfkH/5HXK77Kr8GF0wkVDIxzAisWtog==} dependencies: - '@types/lodash': 4.14.196 + '@types/lodash': 4.14.197 dev: true - /@types/lodash@4.14.196: - resolution: {integrity: sha512-22y3o88f4a94mKljsZcanlNWPzO0uBsBdzLAngf2tp533LzZcQzb6+eZPJ+vCTt+bqF2XnvT9gejTLsAcJAJyQ==} + /@types/lodash@4.14.197: + resolution: {integrity: sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==} dev: true - /@types/node@18.0.3: - resolution: {integrity: sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==} + /@types/node@18.17.11: + resolution: {integrity: sha512-r3hjHPBu+3LzbGBa8DHnr/KAeTEEOrahkcL+cZc4MaBMTM+mk8LtXR+zw+nqfjuDZZzYTYgTcpHuP+BEQk069g==} dev: true /@types/parse-json@4.0.0: @@ -1180,16 +1191,16 @@ packages: /@types/react-dom@18.2.7: resolution: {integrity: sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA==} dependencies: - '@types/react': 18.2.18 + '@types/react': 18.2.21 /@types/react-is@18.2.1: resolution: {integrity: sha512-wyUkmaaSZEzFZivD8F2ftSyAfk6L+DfFliVj/mYdOXbVjRcS87fQJLTnhk6dRZPuJjI+9g6RZJO4PNCngUrmyw==} dependencies: - '@types/react': 18.2.18 + '@types/react': 18.2.21 dev: false - /@types/react@18.2.18: - resolution: {integrity: sha512-da4NTSeBv/P34xoZPhtcLkmZuJ+oYaCxHmyHzwaDQo9RQPBeXV+06gEk2FpqEcsX9XrnNLvRpVh6bdavDSjtiQ==} + /@types/react@18.2.21: + resolution: {integrity: sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.3 @@ -1198,8 +1209,8 @@ packages: /@types/scheduler@0.16.3: resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==} - /@types/semver@7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} + /@types/semver@7.5.0: + resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true /@types/textarea-caret@3.0.1: @@ -1214,8 +1225,8 @@ packages: resolution: {integrity: sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==} dev: true - /@typescript-eslint/eslint-plugin@5.6.0(@typescript-eslint/parser@5.6.0)(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-MIbeMy5qfLqtgs1hWd088k1hOuRsN9JrHUPwVVKCD99EOUqScd7SrwoZl4Gso05EAP9w1kvLWUVGJOVpRPkDPA==} + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -1225,74 +1236,78 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 5.6.0(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/parser': 5.6.0(eslint@8.46.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 5.6.0 + '@eslint-community/regexpp': 4.8.0 + '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/type-utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.46.0 - functional-red-black-tree: 1.0.1 + eslint: 8.48.0 + graphemer: 1.4.0 ignore: 5.2.4 - regexpp: 3.2.0 - semver: 7.3.8 - tsutils: 3.21.0(typescript@5.1.6) - typescript: 5.1.6 + natural-compare-lite: 1.4.0 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils@5.6.0(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-VDoRf3Qj7+W3sS/ZBXZh3LBzp0snDLEgvp6qj0vOAIiAPM07bd5ojQ3CTzF/QFl5AKh7Bh1ycgj6lFBJHUt/DA==} + /@typescript-eslint/parser@5.62.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '*' + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true dependencies: - '@types/json-schema': 7.0.12 - '@typescript-eslint/scope-manager': 5.6.0 - '@typescript-eslint/types': 5.6.0 - '@typescript-eslint/typescript-estree': 5.6.0(typescript@5.1.6) - eslint: 8.46.0 - eslint-scope: 5.1.1 - eslint-utils: 3.0.0(eslint@8.46.0) + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + debug: 4.3.4 + eslint: 8.48.0 + typescript: 5.2.2 transitivePeerDependencies: - supports-color - - typescript dev: true - /@typescript-eslint/parser@5.6.0(eslint@8.46.0)(typescript@5.1.6): - resolution: {integrity: sha512-YVK49NgdUPQ8SpCZaOpiq1kLkYRPMv9U5gcMrywzI8brtwZjr/tG3sZpuHyODt76W/A0SufNjYt9ZOgrC4tLIQ==} + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + dev: true + + /@typescript-eslint/type-utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: '*' typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.6.0 - '@typescript-eslint/types': 5.6.0 - '@typescript-eslint/typescript-estree': 5.6.0(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.46.0 - typescript: 5.1.6 + eslint: 8.48.0 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@5.6.0: - resolution: {integrity: sha512-1U1G77Hw2jsGWVsO2w6eVCbOg0HZ5WxL/cozVSTfqnL/eB9muhb8THsP0G3w+BB5xAHv9KptwdfYFAUfzcIh4A==} + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.6.0 - '@typescript-eslint/visitor-keys': 5.6.0 dev: true - /@typescript-eslint/types@5.6.0: - resolution: {integrity: sha512-OIZffked7mXv4mXzWU5MgAEbCf9ecNJBKi+Si6/I9PpTaj+cf2x58h2oHW5/P/yTnPkKaayfjhLvx+crnl5ubA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree@5.6.0(typescript@5.1.6): - resolution: {integrity: sha512-92vK5tQaE81rK7fOmuWMrSQtK1IMonESR+RJR2Tlc7w4o0MeEdjgidY/uO2Gobh7z4Q1hhS94Cr7r021fMVEeA==} + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.2.2): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1300,24 +1315,44 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.6.0 - '@typescript-eslint/visitor-keys': 5.6.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 - tsutils: 3.21.0(typescript@5.1.6) - typescript: 5.1.6 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + '@types/json-schema': 7.0.12 + '@types/semver': 7.5.0 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + eslint: 8.48.0 + eslint-scope: 5.1.1 + semver: 7.5.4 transitivePeerDependencies: - supports-color + - typescript dev: true - /@typescript-eslint/visitor-keys@5.6.0: - resolution: {integrity: sha512-1p7hDp5cpRFUyE3+lvA74egs+RWSgumrBpzBCDzfTFv0aQ7lIeay80yU0hIxgAhwQ6PcasW35kaOCyDOv6O/Ng==} + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.6.0 - eslint-visitor-keys: 3.4.2 + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 dev: true /@vitejs/plugin-react-swc@3.3.2(vite@4.4.9): @@ -1325,12 +1360,64 @@ packages: peerDependencies: vite: ^4 dependencies: - '@swc/core': 1.3.74 - vite: 4.4.9(@types/node@18.0.3)(less@4.1.1)(terser@5.16.1) + '@swc/core': 1.3.80 + vite: 4.4.9(@types/node@18.17.11)(less@4.2.0)(terser@5.19.2) transitivePeerDependencies: - '@swc/helpers' dev: true + /@vue/compiler-core@3.3.4: + resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} + dependencies: + '@babel/parser': 7.22.11 + '@vue/shared': 3.3.4 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: true + + /@vue/compiler-dom@3.3.4: + resolution: {integrity: sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==} + dependencies: + '@vue/compiler-core': 3.3.4 + '@vue/shared': 3.3.4 + dev: true + + /@vue/compiler-sfc@3.3.4: + resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} + dependencies: + '@babel/parser': 7.22.11 + '@vue/compiler-core': 3.3.4 + '@vue/compiler-dom': 3.3.4 + '@vue/compiler-ssr': 3.3.4 + '@vue/reactivity-transform': 3.3.4 + '@vue/shared': 3.3.4 + estree-walker: 2.0.2 + magic-string: 0.30.3 + postcss: 8.4.28 + source-map-js: 1.0.2 + dev: true + + /@vue/compiler-ssr@3.3.4: + resolution: {integrity: sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==} + dependencies: + '@vue/compiler-dom': 3.3.4 + '@vue/shared': 3.3.4 + dev: true + + /@vue/reactivity-transform@3.3.4: + resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} + dependencies: + '@babel/parser': 7.22.11 + '@vue/compiler-core': 3.3.4 + '@vue/shared': 3.3.4 + estree-walker: 2.0.2 + magic-string: 0.30.3 + dev: true + + /@vue/shared@3.3.4: + resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} + dev: true + /@xobotyi/scrollbar-width@1.9.5: resolution: {integrity: sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==} dev: false @@ -1343,25 +1430,6 @@ packages: acorn: 8.10.0 dev: true - /acorn-node@1.8.2: - resolution: {integrity: sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==} - dependencies: - acorn: 7.4.1 - acorn-walk: 7.2.0 - xtend: 4.0.2 - dev: false - - /acorn-walk@7.2.0: - resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} - engines: {node: '>=0.4.0'} - dev: false - - /acorn@7.4.1: - resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: false - /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} @@ -1395,6 +1463,10 @@ packages: color-convert: 2.0.1 dev: true + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: false + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -1454,6 +1526,16 @@ packages: es-shim-unscopables: 1.0.0 dev: true + /array.prototype.tosorted@1.1.1: + resolution: {integrity: sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + es-shim-unscopables: 1.0.0 + get-intrinsic: 1.2.1 + dev: true + /arraybuffer.prototype.slice@1.0.1: resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} engines: {node: '>= 0.4'} @@ -1466,23 +1548,29 @@ packages: is-shared-array-buffer: 1.0.2 dev: true + /asynciterator.prototype@1.0.0: + resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} + dependencies: + has-symbols: 1.0.3 + dev: true + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false - /autoprefixer@10.4.2(postcss@8.4.21): - resolution: {integrity: sha512-9fOPpHKuDW1w/0EKfRmVnxTDt8166MAnLI3mgZ1JCnhNtYWxcJ6Ud5CO/AVOZi/AvFa8DY9RTy3h3+tFBlrrdQ==} + /autoprefixer@10.4.15(postcss@8.4.28): + resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 dependencies: browserslist: 4.21.10 - caniuse-lite: 1.0.30001519 - fraction.js: 4.2.0 + caniuse-lite: 1.0.30001524 + fraction.js: 4.2.1 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.21 + postcss: 8.4.28 postcss-value-parser: 4.2.0 dev: true @@ -1504,14 +1592,13 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 cosmiconfig: 7.1.0 resolve: 1.22.4 dev: false /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} @@ -1523,7 +1610,6 @@ packages: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - dev: true /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} @@ -1536,8 +1622,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001519 - electron-to-chromium: 1.4.485 + caniuse-lite: 1.0.30001524 + electron-to-chromium: 1.4.503 node-releases: 2.0.13 update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true @@ -1562,8 +1648,8 @@ packages: engines: {node: '>= 6'} dev: false - /caniuse-lite@1.0.30001519: - resolution: {integrity: sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==} + /caniuse-lite@1.0.30001524: + resolution: {integrity: sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA==} dev: true /chalk@2.4.2: @@ -1594,7 +1680,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: false /classnames@2.3.2: @@ -1623,6 +1709,7 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} @@ -1635,9 +1722,13 @@ packages: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: false + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -1648,8 +1739,8 @@ packages: is-what: 3.14.1 dev: true - /copy-to-clipboard@3.3.2: - resolution: {integrity: sha512-Vme1Z6RUDzrb6xAI7EZlVZ5uvOk2F//GaxKUxajDqm9LhOVM1inxNAD2vy+UZDYsd0uyA9s7b3/FVZPSxqrCfg==} + /copy-to-clipboard@3.3.3: + resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} dependencies: toggle-selection: 1.0.6 dev: false @@ -1699,6 +1790,7 @@ packages: /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + requiresBuild: true peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -1733,25 +1825,11 @@ packages: object-keys: 1.1.1 dev: true - /defined@1.0.1: - resolution: {integrity: sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==} - dev: false - /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} dev: false - /detective@5.2.1: - resolution: {integrity: sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==} - engines: {node: '>=0.8.0'} - hasBin: true - dependencies: - acorn-node: 1.8.2 - defined: 1.0.1 - minimist: 1.2.8 - dev: false - /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: false @@ -1781,8 +1859,8 @@ packages: esutils: 2.0.3 dev: true - /electron-to-chromium@1.4.485: - resolution: {integrity: sha512-1ndQ5IBNEnFirPwvyud69GHL+31FkE09gH/CJ6m3KCbkx3i0EVOrjwz4UNxRmN9H8OVHbC6vMRZGN1yCvjSs9w==} + /electron-to-chromium@1.4.503: + resolution: {integrity: sha512-LF2IQit4B0VrUHFeQkWhZm97KuJSGF2WJqq1InpY+ECpFRkXd8yTIaTtJxsO0OKDmiBYwWqcrNaXOurn2T2wiA==} dev: true /errno@0.1.8: @@ -1851,6 +1929,25 @@ packages: which-typed-array: 1.1.11 dev: true + /es-iterator-helpers@1.0.14: + resolution: {integrity: sha512-JgtVnwiuoRuzLvqelrvN3Xu7H9bu2ap/kQ2CrM62iidP8SKuD99rWU3CJy++s7IVL2qb/AjXPGR/E7i9ngd/Cw==} + dependencies: + asynciterator.prototype: 1.0.0 + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + es-set-tostringtag: 2.0.1 + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + iterator.prototype: 1.1.0 + safe-array-concat: 1.0.0 + dev: true + /es-set-tostringtag@2.0.1: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} @@ -1918,16 +2015,16 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - /eslint-config-prettier@8.6.0(eslint@8.46.0): - resolution: {integrity: sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA==} + /eslint-config-prettier@8.10.0(eslint@8.48.0): + resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.46.0 + eslint: 8.48.0 dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.6.0)(eslint@8.46.0)(prettier@2.6.2): + /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.10.0)(eslint@8.48.0)(prettier@2.6.2): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -1938,22 +2035,24 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.46.0 - eslint-config-prettier: 8.6.0(eslint@8.46.0) + eslint: 8.48.0 + eslint-config-prettier: 8.10.0(eslint@8.48.0) prettier: 2.6.2 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-react@7.27.1(eslint@8.46.0): - resolution: {integrity: sha512-meyunDjMMYeWr/4EBLTV1op3iSG3mjT/pz5gti38UzfM4OPpNc2m0t2xvKCOMU5D6FSdd34BIMFOvQbW+i8GAA==} + /eslint-plugin-react@7.33.2(eslint@8.48.0): + resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 dependencies: array-includes: 3.1.6 array.prototype.flatmap: 1.3.1 + array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.46.0 + es-iterator-helpers: 1.0.14 + eslint: 8.48.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -1983,35 +2082,20 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils@3.0.0(eslint@8.46.0): - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.46.0 - eslint-visitor-keys: 2.1.0 - dev: true - - /eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - - /eslint-visitor-keys@3.4.2: - resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.46.0: - resolution: {integrity: sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==} + /eslint@8.48.0: + resolution: {integrity: sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) - '@eslint-community/regexpp': 4.6.2 - '@eslint/eslintrc': 2.1.1 - '@eslint/js': 8.46.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) + '@eslint-community/regexpp': 4.8.0 + '@eslint/eslintrc': 2.1.2 + '@eslint/js': 8.48.0 '@humanwhocodes/config-array': 0.11.10 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -2022,7 +2106,7 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.2 + eslint-visitor-keys: 3.4.3 espree: 9.6.1 esquery: 1.5.0 esutils: 2.0.3 @@ -2030,7 +2114,7 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.20.0 + globals: 13.21.0 graphemer: 1.4.0 ignore: 5.2.4 imurmurhash: 0.1.4 @@ -2055,7 +2139,7 @@ packages: dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.2 + eslint-visitor-keys: 3.4.3 dev: true /esquery@1.5.0: @@ -2082,6 +2166,10 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + dev: true + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -2133,7 +2221,7 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.0.4 + flat-cache: 3.1.0 dev: true /fill-range@7.0.1: @@ -2154,11 +2242,12 @@ packages: path-exists: 4.0.0 dev: true - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} + /flat-cache@3.1.0: + resolution: {integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==} + engines: {node: '>=12.0.0'} dependencies: flatted: 3.2.7 + keyv: 4.5.3 rimraf: 3.0.2 dev: true @@ -2191,16 +2280,15 @@ packages: mime-types: 2.1.35 dev: false - /fraction.js@4.2.0: - resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} + /fraction.js@4.2.1: + resolution: {integrity: sha512-/KxoyCnPM0GwYI4NN0Iag38Tqt+od3/mLuguepLgCAKPn0ZhC544nssAW0tG2/00zXEYl9W+7hwAIpLHo6Oc7Q==} dev: true /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -2219,10 +2307,6 @@ packages: functions-have-names: 1.2.3 dev: true - /functional-red-black-tree@1.0.1: - resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==} - dev: true - /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true @@ -2261,6 +2345,17 @@ packages: dependencies: is-glob: 4.0.3 + /glob@7.1.6: + resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: false + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -2277,8 +2372,8 @@ packages: engines: {node: '>=4'} dev: true - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + /globals@13.21.0: + resolution: {integrity: sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -2369,8 +2464,8 @@ packages: dependencies: function-bind: 1.1.1 - /highlight.js@11.6.0: - resolution: {integrity: sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw==} + /highlight.js@11.8.0: + resolution: {integrity: sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==} engines: {node: '>=12.0.0'} dev: false @@ -2390,21 +2485,22 @@ packages: resolution: {integrity: sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==} dev: false - /i18next-browser-languagedetector@7.0.1: - resolution: {integrity: sha512-Pa5kFwaczXJAeHE56CHG2aWzFBMJNUNghf0Pm4SwSrEMps/PTKqW90EYWlIvhuYStf3Sn1K0vw+gH3+TLdkH1g==} + /i18next-browser-languagedetector@7.1.0: + resolution: {integrity: sha512-cr2k7u1XJJ4HTOjM9GyOMtbOA47RtUoWRAtt52z43r3AoMs2StYKyjS3URPhzHaf+mn10hY9dZWamga5WPQjhA==} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 dev: false - /i18next@21.9.2: - resolution: {integrity: sha512-00fVrLQOwy45nm3OtC9l1WiLK3nJlIYSljgCt0qzTaAy65aciMdRy9GsuW+a2AtKtdg9/njUGfRH30LRupV7ZQ==} + /i18next@21.10.0: + resolution: {integrity: sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg==} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 dev: false - /iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + /iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: safer-buffer: 2.1.2 dev: true @@ -2444,11 +2540,9 @@ packages: dependencies: once: 1.4.0 wrappy: 1.0.2 - dev: true /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /inline-style-prefixer@6.0.4: resolution: {integrity: sha512-FwXmZC2zbeeS7NzGjJ6pAiqRhXR0ugUShSNb6GApMl6da0/XGc4MOJsoWAywia52EEWbXNSy0pzkwz/+Y+swSg==} @@ -2478,6 +2572,13 @@ packages: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: false + /is-async-function@2.0.0: + resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -2520,12 +2621,29 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + /is-finalizationregistry@1.0.2: + resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} + dependencies: + call-bind: 1.0.2 + dev: true + + /is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 + /is-map@2.0.2: + resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} + dev: true + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -2555,6 +2673,10 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-set@2.0.2: + resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} + dev: true + /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: @@ -2582,12 +2704,23 @@ packages: which-typed-array: 1.1.11 dev: true + /is-weakmap@2.0.1: + resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} + dev: true + /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.2 dev: true + /is-weakset@2.0.2: + resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.1 + dev: true + /is-what@3.14.1: resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==} dev: true @@ -2600,10 +2733,25 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /iterator.prototype@1.1.0: + resolution: {integrity: sha512-rjuhAk1AJ1fssphHD0IFV6TWL40CwRZ53FrztKx43yk2v6rguBYsY4Bj1VU4HmoMmKwZUlx7mfnhDf9cOp4YTw==} + dependencies: + define-properties: 1.2.0 + get-intrinsic: 1.2.1 + has-symbols: 1.0.3 + has-tostringtag: 1.0.0 + reflect.getprototypeof: 1.0.3 + dev: true + /javascript-natural-sort@0.7.1: resolution: {integrity: sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==} dev: true + /jiti@1.19.3: + resolution: {integrity: sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w==} + hasBin: true + dev: false + /js-cookie@2.2.1: resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} dev: false @@ -2624,6 +2772,10 @@ packages: hasBin: true dev: true + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: false @@ -2652,21 +2804,27 @@ packages: object.values: 1.1.6 dev: true - /less@4.1.1: - resolution: {integrity: sha512-w09o8tZFPThBscl5d0Ggp3RcrKIouBoQscnOMgFH3n5V3kN/CXGHNfCkRPtxJk6nKryDXaV9aHLK55RXuH4sAw==} + /keyv@4.5.3: + resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} + dependencies: + json-buffer: 3.0.1 + dev: true + + /less@4.2.0: + resolution: {integrity: sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==} engines: {node: '>=6'} hasBin: true dependencies: copy-anything: 2.0.6 parse-node-version: 1.0.1 - tslib: 1.14.1 + tslib: 2.6.2 optionalDependencies: errno: 0.1.8 graceful-fs: 4.2.11 image-size: 0.5.5 make-dir: 2.1.0 mime: 1.6.0 - needle: 2.9.1 + needle: 3.2.0 source-map: 0.6.1 transitivePeerDependencies: - supports-color @@ -2726,14 +2884,21 @@ packages: dependencies: yallist: 4.0.0 - /lucide-react@0.263.0(react@18.2.0): - resolution: {integrity: sha512-F+rHswbbI1xuDZ/OzofiJZJVlBPOIYVVST705cPdRLImJ5aOJNXYaFBPNo3qdUV0iEG/4nZeiUtLSHO2qU2ISw==} + /lucide-react@0.263.1(react@18.2.0): + resolution: {integrity: sha512-keqxAx97PlaEN89PXZ6ki1N8nRjGWtDa4021GFYLNj0RgruM5odbpl8GHTExj0hhPq3sF6Up0gnxt6TSHu+ovw==} peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 dependencies: react: 18.2.0 dev: false + /magic-string@0.30.3: + resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /make-dir@2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -2783,11 +2948,6 @@ packages: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: false /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -2795,9 +2955,18 @@ packages: /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + requiresBuild: true dev: true optional: true + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: false + /nano-css@5.3.5(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-vSB9X12bbNu4ALBu7nigJgRViZ6ja3OU7CeuiV1zMIbXOdmkLahgtPmh3GBOlDxbKY0CitqlPdOReGlBLSp+yg==} peerDependencies: @@ -2821,18 +2990,22 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + /natural-compare-lite@1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: true + /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true - /needle@2.9.1: - resolution: {integrity: sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==} + /needle@3.2.0: + resolution: {integrity: sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==} engines: {node: '>= 4.4.x'} hasBin: true requiresBuild: true dependencies: debug: 3.2.7 - iconv-lite: 0.4.24 + iconv-lite: 0.6.3 sax: 1.2.4 transitivePeerDependencies: - supports-color @@ -2919,7 +3092,6 @@ packages: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 - dev: true /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} @@ -2957,7 +3129,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -2976,7 +3148,6 @@ packages: /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - dev: true /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} @@ -3005,34 +3176,40 @@ packages: /pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + requiresBuild: true dev: true optional: true - /postcss-import@14.1.0(postcss@8.4.21): - resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} - engines: {node: '>=10.0.0'} + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + dev: false + + /postcss-import@15.1.0(postcss@8.4.28): + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.21 + postcss: 8.4.28 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.4 dev: false - /postcss-js@4.0.1(postcss@8.4.21): + /postcss-js@4.0.1(postcss@8.4.28): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.21 + postcss: 8.4.28 dev: false - /postcss-load-config@3.1.4(postcss@8.4.21): - resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} - engines: {node: '>= 10'} + /postcss-load-config@4.0.1(postcss@8.4.28): + resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} + engines: {node: '>= 14'} peerDependencies: postcss: '>=8.0.9' ts-node: '>=9.0.0' @@ -3043,17 +3220,17 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.21 - yaml: 1.10.2 + postcss: 8.4.28 + yaml: 2.3.1 dev: false - /postcss-nested@6.0.0(postcss@8.4.21): - resolution: {integrity: sha512-0DkamqrPcmkBDsLn+vQDIrtkSbNkv5AD/M322ySo9kqFkCIYklym2xEmWkwo+Y3/qZo34tzEPNUw4y7yMCdv5w==} + /postcss-nested@6.0.1(postcss@8.4.28): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.21 + postcss: 8.4.28 postcss-selector-parser: 6.0.13 dev: false @@ -3068,14 +3245,6 @@ packages: /postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - /postcss@8.4.21: - resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 - /postcss@8.4.28: resolution: {integrity: sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==} engines: {node: ^10 || ^12 || >=14} @@ -3083,7 +3252,6 @@ packages: nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: true /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -3112,6 +3280,7 @@ packages: /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true dev: true optional: true @@ -3131,11 +3300,6 @@ packages: /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - /quick-lru@5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} - dev: false - /react-dom@18.2.0(react@18.2.0): resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: @@ -3146,8 +3310,8 @@ packages: scheduler: 0.23.0 dev: false - /react-hot-toast@2.4.0(csstype@3.1.2)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-qnnVbXropKuwUpriVVosgo8QrB+IaPJCpL8oBI6Ov84uvHZ5QQcTp2qg6ku2wNfgJl6rlQXJIQU5q+5lmPOutA==} + /react-hot-toast@2.4.1(csstype@3.1.2)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-j8z+cQbWIM5LY37pR6uZR6D4LfseplqnuAO4co4u8917hBUvXlEqyP1ZzqVLcqoyUesZZv/ImreoCeHVDpE5pQ==} engines: {node: '>=10'} peerDependencies: react: '>=16' @@ -3160,7 +3324,7 @@ packages: - csstype dev: false - /react-i18next@11.18.6(i18next@21.9.2)(react-dom@18.2.0)(react@18.2.0): + /react-i18next@11.18.6(i18next@21.10.0)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-yHb2F9BiT0lqoQDt8loZ5gWP331GwctHz9tYQ8A2EIEUu+CcEdjBLQWli1USG3RdWQt3W+jqQLg/d4rrQR96LA==} peerDependencies: i18next: '>= 19.0.0' @@ -3173,9 +3337,9 @@ packages: react-native: optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 html-parse-stringify: 3.0.1 - i18next: 21.9.2 + i18next: 21.10.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false @@ -3187,15 +3351,15 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: false - /react-redux@8.0.1(@types/react-dom@18.2.7)(@types/react@18.2.18)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1): - resolution: {integrity: sha512-LMZMsPY4DYdZfLJgd7i79n5Kps5N9XVLCJJeWAaPYTV+Eah2zTuBjTxKtNEbjiyitbq80/eIkm55CYSLqAub3w==} + /react-redux@8.1.2(@types/react-dom@18.2.7)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(redux@4.2.1): + resolution: {integrity: sha512-xJKYI189VwfsFc4CJvHqHlDrzyFTY/3vZACbE+rr/zQ34Xx1wQfB4OTOSeOSNrF6BDVe8OOdxIrAnMGXA3ggfw==} peerDependencies: '@types/react': ^16.8 || ^17.0 || ^18.0 '@types/react-dom': ^16.8 || ^17.0 || ^18.0 react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 react-native: '>=0.59' - redux: ^4 + redux: ^4 || ^5.0.0-beta.0 peerDependenciesMeta: '@types/react': optional: true @@ -3208,9 +3372,9 @@ packages: redux: optional: true dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 '@types/hoist-non-react-statics': 3.3.1 - '@types/react': 18.2.18 + '@types/react': 18.2.21 '@types/react-dom': 18.2.7 '@types/use-sync-external-store': 0.0.3 hoist-non-react-statics: 3.3.2 @@ -3221,37 +3385,37 @@ packages: use-sync-external-store: 1.2.0(react@18.2.0) dev: false - /react-router-dom@6.8.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-N/oAF1Shd7g4tWy+75IIufCGsHBqT74tnzHQhbiUTYILYF0Blk65cg+HPZqwC+6SqEyx033nKqU7by38v3lBZg==} - engines: {node: '>=14'} + /react-router-dom@6.15.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==} + engines: {node: '>=14.0.0'} peerDependencies: react: '>=16.8' react-dom: '>=16.8' dependencies: - '@remix-run/router': 1.3.3 + '@remix-run/router': 1.8.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-router: 6.8.2(react@18.2.0) + react-router: 6.15.0(react@18.2.0) dev: false - /react-router@6.8.2(react@18.2.0): - resolution: {integrity: sha512-lF7S0UmXI5Pd8bmHvMdPKI4u4S5McxmHnzJhrYi9ZQ6wE+DA8JN5BzVC5EEBuduWWDaiJ8u6YhVOCmThBli+rw==} - engines: {node: '>=14'} + /react-router@6.15.0(react@18.2.0): + resolution: {integrity: sha512-NIytlzvzLwJkCQj2HLefmeakxxWHWAP+02EGqWEZy+DgfHHKQMUoBBjUQLOtFInBMhWtb3hiUy6MfFgwLjXhqg==} + engines: {node: '>=14.0.0'} peerDependencies: react: '>=16.8' dependencies: - '@remix-run/router': 1.3.3 + '@remix-run/router': 1.8.0 react: 18.2.0 dev: false - /react-universal-interface@0.6.2(react@18.2.0)(tslib@2.6.1): + /react-universal-interface@0.6.2(react@18.2.0)(tslib@2.6.2): resolution: {integrity: sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==} peerDependencies: react: '*' tslib: '*' dependencies: react: 18.2.0 - tslib: 2.6.1 + tslib: 2.6.2 dev: false /react-use@17.4.0(react-dom@18.2.0)(react@18.2.0): @@ -3262,20 +3426,20 @@ packages: dependencies: '@types/js-cookie': 2.2.7 '@xobotyi/scrollbar-width': 1.9.5 - copy-to-clipboard: 3.3.2 + copy-to-clipboard: 3.3.3 fast-deep-equal: 3.1.3 fast-shallow-equal: 1.0.0 js-cookie: 2.2.1 nano-css: 5.3.5(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - react-universal-interface: 0.6.2(react@18.2.0)(tslib@2.6.1) + react-universal-interface: 0.6.2(react@18.2.0)(tslib@2.6.2) resize-observer-polyfill: 1.5.1 screenfull: 5.2.0 set-harmonic-interval: 1.0.1 throttle-debounce: 3.0.1 ts-easing: 0.2.0 - tslib: 2.6.1 + tslib: 2.6.2 dev: false /react@18.2.0: @@ -3309,11 +3473,23 @@ packages: /redux@4.2.1: resolution: {integrity: sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 dev: false - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /reflect.getprototypeof@1.0.3: + resolution: {integrity: sha512-TTAOZpkJ2YLxl7mVHWrNo3iDMEkYlva/kgFcXndqMgbo/AZUmmavEkdXV+hXtE4P8xdyEKRzalaFqZVuwIk/Nw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.22.1 + get-intrinsic: 1.2.1 + globalthis: 1.0.3 + which-builtin-type: 1.1.3 + dev: true + + /regenerator-runtime@0.14.0: + resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} dev: false /regexp.prototype.flags@1.5.0: @@ -3325,11 +3501,6 @@ packages: functions-have-names: 1.2.3 dev: true - /regexpp@3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - dev: true - /reselect@4.1.8: resolution: {integrity: sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==} dev: false @@ -3371,18 +3542,18 @@ packages: glob: 7.2.3 dev: true - /rollup@3.27.2: - resolution: {integrity: sha512-YGwmHf7h2oUHkVBT248x0yt6vZkYQ3/rvE5iQuVBh3WO8GcJ6BNeOkpoX1yMHIiBm18EMLjBPIoUDkhgnyxGOQ==} + /rollup@3.28.1: + resolution: {integrity: sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /rtl-css-js@1.16.1: resolution: {integrity: sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==} dependencies: - '@babel/runtime': 7.22.6 + '@babel/runtime': 7.22.11 dev: false /run-parallel@1.2.0: @@ -3410,11 +3581,13 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + requiresBuild: true dev: true optional: true /sax@1.2.4: resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==} + requiresBuild: true dev: true optional: true @@ -3432,6 +3605,7 @@ packages: /semver@5.7.2: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true + requiresBuild: true dev: true optional: true @@ -3440,8 +3614,8 @@ packages: hasBin: true dev: true - /semver@7.3.8: - resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -3589,6 +3763,20 @@ packages: resolution: {integrity: sha512-E87pIogpwUsUwXw7dNyU4QDjdgVMy52m+XEOPEKUn161cCzWjjhPSQhByfd1CcNvrOLnXQ6OnnZDwnJrz/Z4YQ==} dev: false + /sucrase@3.34.0: + resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} + engines: {node: '>=8'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + commander: 4.1.1 + glob: 7.1.6 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + dev: false + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -3606,42 +3794,39 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - /tailwindcss@3.2.4(postcss@8.4.21): - resolution: {integrity: sha512-AhwtHCKMtR71JgeYDaswmZXhPcW9iuI9Sp2LvZPo9upDZ7231ZJ7eA9RaURbhpXGVlrjX4cFNlB4ieTetEb7hQ==} - engines: {node: '>=12.13.0'} + /tailwindcss@3.3.3: + resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} + engines: {node: '>=14.0.0'} hasBin: true - peerDependencies: - postcss: ^8.0.9 dependencies: + '@alloc/quick-lru': 5.2.0 arg: 5.0.2 chokidar: 3.5.3 - color-name: 1.1.4 - detective: 5.2.1 didyoumean: 1.2.2 dlv: 1.1.3 fast-glob: 3.3.1 glob-parent: 6.0.2 is-glob: 4.0.3 + jiti: 1.19.3 lilconfig: 2.1.0 micromatch: 4.0.5 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.21 - postcss-import: 14.1.0(postcss@8.4.21) - postcss-js: 4.0.1(postcss@8.4.21) - postcss-load-config: 3.1.4(postcss@8.4.21) - postcss-nested: 6.0.0(postcss@8.4.21) + postcss: 8.4.28 + postcss-import: 15.1.0(postcss@8.4.28) + postcss-js: 4.0.1(postcss@8.4.28) + postcss-load-config: 4.0.1(postcss@8.4.28) + postcss-nested: 6.0.1(postcss@8.4.28) postcss-selector-parser: 6.0.13 - postcss-value-parser: 4.2.0 - quick-lru: 5.1.1 resolve: 1.22.4 + sucrase: 3.34.0 transitivePeerDependencies: - ts-node dev: false - /terser@5.16.1: - resolution: {integrity: sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==} + /terser@5.19.2: + resolution: {integrity: sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==} engines: {node: '>=10'} hasBin: true dependencies: @@ -3659,6 +3844,19 @@ packages: resolution: {integrity: sha512-cXAvzO9pP5CGa6NKx0WYHl+8CHKZs8byMkt3PCJBCmq2a34YA9pO1NrQET5pzeqnBjBdToF5No4rrmkDUgQC2Q==} dev: false + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: false + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: false + /throttle-debounce@3.0.1: resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==} engines: {node: '>=10'} @@ -3682,22 +3880,25 @@ packages: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} dev: false + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: false + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tslib@2.6.1: - resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} - dev: false + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - /tsutils@3.21.0(typescript@5.1.6): + /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.1.6 + typescript: 5.2.2 dev: true /type-check@0.4.0: @@ -3750,8 +3951,8 @@ packages: is-typed-array: 1.1.12 dev: true - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -3799,7 +4000,7 @@ packages: hasBin: true dev: false - /vite@4.4.9(@types/node@18.0.3)(less@4.1.1)(terser@5.16.1): + /vite@4.4.9(@types/node@18.17.11)(less@4.2.0)(terser@5.19.2): resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true @@ -3827,14 +4028,14 @@ packages: terser: optional: true dependencies: - '@types/node': 18.0.3 + '@types/node': 18.17.11 esbuild: 0.18.20 - less: 4.1.1 + less: 4.2.0 postcss: 8.4.28 - rollup: 3.27.2 - terser: 5.16.1 + rollup: 3.28.1 + terser: 5.19.2 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /void-elements@3.1.0: @@ -3852,6 +4053,33 @@ packages: is-symbol: 1.0.4 dev: true + /which-builtin-type@1.1.3: + resolution: {integrity: sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==} + engines: {node: '>= 0.4'} + dependencies: + function.prototype.name: 1.1.5 + has-tostringtag: 1.0.0 + is-async-function: 2.0.0 + is-date-object: 1.0.5 + is-finalizationregistry: 1.0.2 + is-generator-function: 1.0.10 + is-regex: 1.1.4 + is-weakref: 1.0.2 + isarray: 2.0.5 + which-boxed-primitive: 1.0.2 + which-collection: 1.0.1 + which-typed-array: 1.1.11 + dev: true + + /which-collection@1.0.1: + resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} + dependencies: + is-map: 2.0.2 + is-set: 2.0.2 + is-weakmap: 2.0.1 + is-weakset: 2.0.2 + dev: true + /which-typed-array@1.1.11: resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} engines: {node: '>= 0.4'} @@ -3873,12 +4101,6 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: false /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -3892,23 +4114,32 @@ packages: engines: {node: '>= 6'} dev: false + /yaml@2.3.1: + resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} + engines: {node: '>= 14'} + dev: false + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true - /zustand@4.3.6(react@18.2.0): - resolution: {integrity: sha512-6J5zDxjxLE+yukC2XZWf/IyWVKnXT9b9HUv09VJ/bwGCpKNcaTqp7Ws28Xr8jnbvnZcdRaidztAPsXFBIqufiw==} + /zustand@4.4.1(@types/react@18.2.21)(react@18.2.0): + resolution: {integrity: sha512-QCPfstAS4EBiTQzlaGP1gmorkh/UL1Leaj2tdj+zZCZ/9bm0WS7sI2wnfD5lpOszFqWJ1DcPnGoY8RDL61uokw==} engines: {node: '>=12.7.0'} peerDependencies: + '@types/react': '>=16.8' immer: '>=9.0' react: '>=16.8' peerDependenciesMeta: + '@types/react': + optional: true immer: optional: true react: optional: true dependencies: + '@types/react': 18.2.21 react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) dev: false
chore
upgrade deps version (#2181)
858053e3b165c6d5d62106e663748c0e4880cdd2
2025-03-02 15:17:19
dependabot[bot]
chore: bump @dnd-kit/sortable from 8.0.0 to 10.0.0 in /web (#4454) Bumps [@dnd-kit/sortable](https://github.com/clauderic/dnd-kit/tree/HEAD/packages/sortable) from 8.0.0 to 10.0.0. - [Release notes](https://github.com/clauderic/dnd-kit/releases) - [Changelog](https://github.com/clauderic/dnd-kit/blob/master/packages/sortable/CHANGELOG.md) - [Commits](https://github.com/clauderic/dnd-kit/commits/@dnd-kit/sortable@10.0.0/packages/sortable) --- updated-dependencies: - dependency-name: "@dnd-kit/sortable" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/web/package.json b/web/package.json index 7ca36788523eb..9cdb4e44f5111 100644 --- a/web/package.json +++ b/web/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@dnd-kit/core": "^6.3.1", - "@dnd-kit/sortable": "^8.0.0", + "@dnd-kit/sortable": "^10.0.0", "@dnd-kit/utilities": "^3.2.2", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 32e4268e9e1c7..aa2de49481e1c 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^6.3.1 version: 6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@dnd-kit/sortable': - specifier: ^8.0.0 - version: 8.0.0(@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + specifier: ^10.0.0 + version: 10.0.0(@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) '@dnd-kit/utilities': specifier: ^3.2.2 version: 3.2.2(react@18.3.1) @@ -427,10 +427,10 @@ packages: react: '>=16.8.0' react-dom: '>=16.8.0' - '@dnd-kit/sortable@8.0.0': - resolution: {integrity: sha512-U3jk5ebVXe1Lr7c2wU7SBZjcWdQP+j7peHJfCspnA81enlu88Mgd7CC8Q+pub9ubP7eKVETzJW+IBAhsqbSu/g==} + '@dnd-kit/sortable@10.0.0': + resolution: {integrity: sha512-+xqhmIIzvAYMGfBYYnbKuNicfSsk4RksY2XdmJhT+HAC01nix6fHCztU68jooFiMUB01Ky3F0FyOvhG/BZrWkg==} peerDependencies: - '@dnd-kit/core': ^6.1.0 + '@dnd-kit/core': ^6.3.0 react: '>=16.8.0' '@dnd-kit/utilities@3.2.2': @@ -3852,7 +3852,7 @@ snapshots: react-dom: 18.3.1(react@18.3.1) tslib: 2.8.1 - '@dnd-kit/sortable@8.0.0(@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': + '@dnd-kit/sortable@10.0.0(@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': dependencies: '@dnd-kit/core': 6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@dnd-kit/utilities': 3.2.2(react@18.3.1)
chore
bump @dnd-kit/sortable from 8.0.0 to 10.0.0 in /web (#4454) Bumps [@dnd-kit/sortable](https://github.com/clauderic/dnd-kit/tree/HEAD/packages/sortable) from 8.0.0 to 10.0.0. - [Release notes](https://github.com/clauderic/dnd-kit/releases) - [Changelog](https://github.com/clauderic/dnd-kit/blob/master/packages/sortable/CHANGELOG.md) - [Commits](https://github.com/clauderic/dnd-kit/commits/@dnd-kit/sortable@10.0.0/packages/sortable) --- updated-dependencies: - dependency-name: "@dnd-kit/sortable" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
81502d90925676f61682f4b8e1ab41bdf314ac3c
2025-02-26 20:02:26
Johnny
fix: stats requests
false
diff --git a/web/src/components/HomeSidebar/HomeSidebar.tsx b/web/src/components/HomeSidebar/HomeSidebar.tsx index cc224fb7d50e6..426dab749e6d3 100644 --- a/web/src/components/HomeSidebar/HomeSidebar.tsx +++ b/web/src/components/HomeSidebar/HomeSidebar.tsx @@ -61,7 +61,7 @@ const HomeSidebar = (props: Props) => { await userStatsStore.listUserStats(parent); }, 300, - [memoList.size(), userStatsStore.stateId, currentUser, location.pathname], + [memoList.size(), userStatsStore.stateId, location.pathname], ); return (
fix
stats requests
63d6b6f9f98a5d9c9dea03e98135b4dfe6d6bb1a
2023-06-30 20:26:31
Vespa314
chore: listMemos sort by id for memos post/update at the same time (#1866)
false
diff --git a/store/memo.go b/store/memo.go index 7c261f90f369f..acb43c9762cb7 100644 --- a/store/memo.go +++ b/store/memo.go @@ -301,6 +301,7 @@ func listMemos(ctx context.Context, tx *sql.Tx, find *FindMemoMessage) ([]*MemoM } else { orders = append(orders, "created_ts DESC") } + orders = append(orders, "id DESC") query := ` SELECT
chore
listMemos sort by id for memos post/update at the same time (#1866)
da603053f244c5240696730c2c60e4e2677f154e
2024-06-09 05:16:03
Steven
chore: add th locale
false
diff --git a/web/src/i18n.ts b/web/src/i18n.ts index e391ca98f013d..693378de6b1b9 100644 --- a/web/src/i18n.ts +++ b/web/src/i18n.ts @@ -22,6 +22,7 @@ export const locales = [ "ru", "sl", "sv", + "th", "tr", "uk", "vi",
chore
add th locale
88db037204590b1aa50c0bcd2b10c981629a2cbd
2024-09-04 21:01:28
Steven
chore: fix linter warnings
false
diff --git a/server/router/api/v1/memo_service.go b/server/router/api/v1/memo_service.go index 6ec48141157c0..5bf45a090d091 100644 --- a/server/router/api/v1/memo_service.go +++ b/server/router/api/v1/memo_service.go @@ -25,7 +25,7 @@ import ( "github.com/usememos/memos/plugin/webhook" v1pb "github.com/usememos/memos/proto/gen/api/v1" storepb "github.com/usememos/memos/proto/gen/store" - memoproperty "github.com/usememos/memos/server/runner/memoproperty" + "github.com/usememos/memos/server/runner/memoproperty" "github.com/usememos/memos/store" ) diff --git a/server/server.go b/server/server.go index c9a0bbd834e22..a90bc6747ad1e 100644 --- a/server/server.go +++ b/server/server.go @@ -21,8 +21,8 @@ import ( apiv1 "github.com/usememos/memos/server/router/api/v1" "github.com/usememos/memos/server/router/frontend" "github.com/usememos/memos/server/router/rss" - memoproperty "github.com/usememos/memos/server/runner/memoproperty" - s3presign "github.com/usememos/memos/server/runner/s3presign" + "github.com/usememos/memos/server/runner/memoproperty" + "github.com/usememos/memos/server/runner/s3presign" "github.com/usememos/memos/server/runner/version" "github.com/usememos/memos/store" )
chore
fix linter warnings
2fac11936b31d1320c5700ee55e528c5f0fcb0d9
2024-09-02 10:32:53
dependabot[bot]
chore: bump golang.org/x/oauth2 from 0.21.0 to 0.22.0 (#3866) Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.21.0 to 0.22.0. - [Commits](https://github.com/golang/oauth2/compare/v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/go.mod b/go.mod index 74a50920e44e4..5b8107ea20ef0 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 golang.org/x/mod v0.19.0 golang.org/x/net v0.27.0 - golang.org/x/oauth2 v0.21.0 + golang.org/x/oauth2 v0.22.0 google.golang.org/genproto/googleapis/api v0.0.0-20240723171418-e6d459c13d2a google.golang.org/grpc v1.65.0 modernc.org/sqlite v1.31.1 diff --git a/go.sum b/go.sum index 0f22cc740df04..d83757828f548 100644 --- a/go.sum +++ b/go.sum @@ -526,8 +526,8 @@ golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
chore
bump golang.org/x/oauth2 from 0.21.0 to 0.22.0 (#3866) Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.21.0 to 0.22.0. - [Commits](https://github.com/golang/oauth2/compare/v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: golang.org/x/oauth2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
82effea070d0b0f3afb930c389e4a8195e080dd6
2023-10-22 19:40:27
Christopher
tweak(web): use iconbutton for editor helpers (#2426)
false
diff --git a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx b/web/src/components/MemoEditor/ActionButton/TagSelector.tsx index 52eeb0b3fddee..e7409369e1d56 100644 --- a/web/src/components/MemoEditor/ActionButton/TagSelector.tsx +++ b/web/src/components/MemoEditor/ActionButton/TagSelector.tsx @@ -1,3 +1,4 @@ +import { IconButton } from "@mui/joy"; import Icon from "@/components/Icon"; import { useTagStore } from "@/store/module"; @@ -11,9 +12,9 @@ const TagSelector = (props: Props) => { const tags = tagStore.state.tags; return ( - <div className="relative group flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"> + <IconButton className="relative group flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"> <Icon.Hash className="w-5 h-5 mx-auto" /> - <div className="hidden flex-row justify-start items-start flex-wrap absolute top-6 left-0 mt-1 p-1 z-1 rounded w-52 h-auto max-h-48 overflow-y-auto font-mono shadow bg-zinc-200 dark:bg-zinc-600 group-hover:flex"> + <div className="hidden flex-row justify-start items-start flex-wrap absolute top-8 left-0 mt-1 p-1 z-1 rounded w-52 h-auto max-h-48 overflow-y-auto font-mono shadow bg-zinc-200 dark:bg-zinc-600 group-hover:flex"> {tags.length > 0 ? ( tags.map((tag) => { return ( @@ -32,7 +33,7 @@ const TagSelector = (props: Props) => { </p> )} </div> - </div> + </IconButton> ); }; diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 259712080b90b..735b429f62652 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -1,4 +1,4 @@ -import { Select, Option, Button } from "@mui/joy"; +import { Select, Option, Button, IconButton } from "@mui/joy"; import { isNumber, last, uniq, uniqBy } from "lodash-es"; import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { toast } from "react-hot-toast"; @@ -424,18 +424,27 @@ const MemoEditor = (props: Props) => { <div className="relative w-full flex flex-row justify-between items-center pt-2 z-1"> <div className="flex flex-row justify-start items-center"> <TagSelector onTagSelectorClick={(tag) => handleTagSelectorClick(tag)} /> - <button className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"> - <Icon.Image className="w-5 h-5 mx-auto" onClick={handleUploadFileBtnClick} /> - </button> - <button className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"> - <Icon.Link className="w-5 h-5 mx-auto" onClick={handleAddMemoRelationBtnClick} /> - </button> - <button className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"> - <Icon.CheckSquare className="w-5 h-5 mx-auto" onClick={handleCheckBoxBtnClick} /> - </button> - <button className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow"> - <Icon.Code className="w-5 h-5 mx-auto" onClick={handleCodeBlockBtnClick} /> - </button> + <IconButton + onClick={handleUploadFileBtnClick} + className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow" + > + <Icon.Image className="w-5 h-5 mx-auto" /> + </IconButton> + <IconButton + onClick={handleAddMemoRelationBtnClick} + className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow" + > + <Icon.Link className="w-5 h-5 mx-auto" /> + </IconButton> + <IconButton onClick={handleCheckBoxBtnClick}> + <Icon.CheckSquare className="w-5 h-5 mx-auto" /> + </IconButton> + <IconButton + onClick={handleCodeBlockBtnClick} + className="flex flex-row justify-center items-center p-1 w-auto h-auto mr-1 select-none rounded cursor-pointer text-gray-600 dark:text-gray-400 hover:bg-gray-300 dark:hover:bg-zinc-800 hover:shadow" + > + <Icon.Code className="w-5 h-5 mx-auto" /> + </IconButton> </div> </div> <ResourceListView resourceList={state.resourceList} setResourceList={handleSetResourceList} />
tweak
use iconbutton for editor helpers (#2426)
dfc0889a4f2e75739eac29e230cc7de82e645ad0
2024-05-06 04:48:54
Steven
chore: tweak package name
false
diff --git a/plugin/http-getter/http_getter.go b/plugin/http-getter/http_getter.go deleted file mode 100644 index aaaaa7cd05f8e..0000000000000 --- a/plugin/http-getter/http_getter.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package getter is using to get resources from url. -// * Get metadata for website; -// * Get image blob to avoid CORS; -package getter diff --git a/plugin/http-getter/html_meta.go b/plugin/httpgetter/html_meta.go similarity index 99% rename from plugin/http-getter/html_meta.go rename to plugin/httpgetter/html_meta.go index a4c24ef29da2d..f69bad6186335 100644 --- a/plugin/http-getter/html_meta.go +++ b/plugin/httpgetter/html_meta.go @@ -1,4 +1,4 @@ -package getter +package httpgetter import ( "errors" diff --git a/plugin/http-getter/html_meta_test.go b/plugin/httpgetter/html_meta_test.go similarity index 94% rename from plugin/http-getter/html_meta_test.go rename to plugin/httpgetter/html_meta_test.go index 310e64e4ed35d..45345d307c86e 100644 --- a/plugin/http-getter/html_meta_test.go +++ b/plugin/httpgetter/html_meta_test.go @@ -1,4 +1,4 @@ -package getter +package httpgetter import ( "testing" diff --git a/plugin/httpgetter/http_getter.go b/plugin/httpgetter/http_getter.go new file mode 100644 index 0000000000000..c545baf687a17 --- /dev/null +++ b/plugin/httpgetter/http_getter.go @@ -0,0 +1,4 @@ +// Package httpgetter is using to get resources from url. +// * Get metadata for website; +// * Get image blob to avoid CORS; +package httpgetter diff --git a/plugin/http-getter/image.go b/plugin/httpgetter/image.go similarity index 97% rename from plugin/http-getter/image.go rename to plugin/httpgetter/image.go index 0567830698af9..2d6a163f232b6 100644 --- a/plugin/http-getter/image.go +++ b/plugin/httpgetter/image.go @@ -1,4 +1,4 @@ -package getter +package httpgetter import ( "errors" diff --git a/plugin/http-getter/util.go b/plugin/httpgetter/util.go similarity index 93% rename from plugin/http-getter/util.go rename to plugin/httpgetter/util.go index c9125ee829e64..d83f5efb2914c 100644 --- a/plugin/http-getter/util.go +++ b/plugin/httpgetter/util.go @@ -1,4 +1,4 @@ -package getter +package httpgetter import ( "mime" diff --git a/plugin/storage/s3/s3.go b/plugin/storage/s3/s3.go index cc6f587db0cf0..a8c6a3b5cf949 100644 --- a/plugin/storage/s3/s3.go +++ b/plugin/storage/s3/s3.go @@ -15,10 +15,6 @@ import ( storepb "github.com/usememos/memos/proto/gen/store" ) -// presignLifetimeSecs is the lifetime of a presigned URL in seconds. -// The presigned URL is valid for 7 days. -const presignLifetimeSecs = 7 * 24 * 60 * 60 - type Client struct { Client *s3.Client Bucket *string @@ -74,7 +70,7 @@ func (c *Client) PresignGetObject(ctx context.Context, key string) (string, erro Bucket: aws.String(*c.Bucket), Key: aws.String(key), }, func(opts *s3.PresignOptions) { - opts.Expires = time.Duration(presignLifetimeSecs * int64(time.Second)) + opts.Expires = time.Duration(7 * 24 * time.Hour) }) if err != nil { return "", errors.Wrap(err, "failed to presign put object") diff --git a/server/router/api/v1/markdown_service.go b/server/router/api/v1/markdown_service.go index 2b6bfc27b5136..14e9f81703597 100644 --- a/server/router/api/v1/markdown_service.go +++ b/server/router/api/v1/markdown_service.go @@ -9,7 +9,7 @@ import ( "github.com/yourselfhosted/gomark/parser/tokenizer" "github.com/yourselfhosted/gomark/restore" - getter "github.com/usememos/memos/plugin/http-getter" + "github.com/usememos/memos/plugin/httpgetter" v1pb "github.com/usememos/memos/proto/gen/api/v1" ) @@ -33,7 +33,7 @@ func (*APIV1Service) RestoreMarkdown(_ context.Context, request *v1pb.RestoreMar } func (*APIV1Service) GetLinkMetadata(_ context.Context, request *v1pb.GetLinkMetadataRequest) (*v1pb.LinkMetadata, error) { - htmlMeta, err := getter.GetHTMLMeta(request.Link) + htmlMeta, err := httpgetter.GetHTMLMeta(request.Link) if err != nil { return nil, err } diff --git a/server/service/s3_object_presigner/s3_object_presigner.go b/server/service/s3_object_presigner/s3_object_presigner.go index 76ae2b42dee6f..2363355a8f49d 100644 --- a/server/service/s3_object_presigner/s3_object_presigner.go +++ b/server/service/s3_object_presigner/s3_object_presigner.go @@ -53,8 +53,9 @@ func (p *S3ObjectPresigner) CheckAndPresign(ctx context.Context) { } if s3ObjectPayload.LastPresignedTime != nil { - // Skip if the presigned URL is still valid. - if time.Now().Before(s3ObjectPayload.LastPresignedTime.AsTime().Add(24 * time.Hour)) { + // Skip if the presigned URL is still valid for the next 6 days. + // The default expiration time is 7 days. + if time.Now().Before(s3ObjectPayload.LastPresignedTime.AsTime().Add(6 * 24 * time.Hour)) { continue } }
chore
tweak package name
f30599fbd22b06e32f344c0befa16e9a0d1450f8
2024-05-10 20:53:15
Steven
chore: fix scripts
false
diff --git a/store/db/mysql/migration/prod/0.22/00__resource_storage_type.sql b/store/db/mysql/migration/prod/0.22/00__resource_storage_type.sql index 3d32337377e77..918d44567811c 100644 --- a/store/db/mysql/migration/prod/0.22/00__resource_storage_type.sql +++ b/store/db/mysql/migration/prod/0.22/00__resource_storage_type.sql @@ -11,6 +11,6 @@ UPDATE `resource` SET `storage_type` = 'EXTERNAL', `reference` = `external_link` WHERE `external_link` IS NOT NULL AND `external_link` != ''; -ALTER TABLE `resource` - DROP COLUMN `internal_path`, - DROP COLUMN `external_link`; +ALTER TABLE `resource` DROP COLUMN `internal_path`; + +ALTER TABLE `resource` DROP COLUMN `external_link`; diff --git a/store/db/postgres/migration/prod/0.22/00__resource_storage_type.sql b/store/db/postgres/migration/prod/0.22/00__resource_storage_type.sql index 3d32337377e77..918d44567811c 100644 --- a/store/db/postgres/migration/prod/0.22/00__resource_storage_type.sql +++ b/store/db/postgres/migration/prod/0.22/00__resource_storage_type.sql @@ -11,6 +11,6 @@ UPDATE `resource` SET `storage_type` = 'EXTERNAL', `reference` = `external_link` WHERE `external_link` IS NOT NULL AND `external_link` != ''; -ALTER TABLE `resource` - DROP COLUMN `internal_path`, - DROP COLUMN `external_link`; +ALTER TABLE `resource` DROP COLUMN `internal_path`; + +ALTER TABLE `resource` DROP COLUMN `external_link`; diff --git a/store/db/sqlite/migration/prod/0.22/00__resource_storage_type.sql b/store/db/sqlite/migration/prod/0.22/00__resource_storage_type.sql index 8f910aedbf03d..daa46de205bf3 100644 --- a/store/db/sqlite/migration/prod/0.22/00__resource_storage_type.sql +++ b/store/db/sqlite/migration/prod/0.22/00__resource_storage_type.sql @@ -12,6 +12,6 @@ UPDATE resource SET storage_type = 'EXTERNAL', reference = external_link WHERE external_link IS NOT NULL AND external_link != ''; -ALTER TABLE resource - DROP COLUMN internal_path, - DROP COLUMN external_link; +ALTER TABLE resource DROP COLUMN internal_path; + +ALTER TABLE resource DROP COLUMN external_link;
chore
fix scripts
6c433b452fc58013c3255961eec0aa1b0a2612a6
2023-11-08 20:28:35
Steven
chore: update user checks
false
diff --git a/web/src/components/UsageHeatMap.tsx b/web/src/components/UsageHeatMap.tsx index 346100625fe3d..7fe759e8e9618 100644 --- a/web/src/components/UsageHeatMap.tsx +++ b/web/src/components/UsageHeatMap.tsx @@ -52,6 +52,10 @@ const UsageHeatMap = () => { const [currentStat, setCurrentStat] = useState<DailyUsageStat | null>(null); const containerElRef = useRef<HTMLDivElement>(null); + if (!user) { + return; + } + useEffect(() => { userV1Store.getOrFetchUserByUsername(extractUsernameFromName(user.name)).then((user) => { if (!user) {
chore
update user checks
d1007950e0a6cd3ba5048f68445bd39168ddf204
2022-12-03 12:58:37
boojack
chore: remove emoji picker (#667)
false
diff --git a/web/package.json b/web/package.json index a0424c4dbff3b..f1f4cf38ea535 100644 --- a/web/package.json +++ b/web/package.json @@ -15,7 +15,6 @@ "axios": "^0.27.2", "copy-to-clipboard": "^3.3.2", "dayjs": "^1.11.3", - "emoji-picker-react": "^3.6.2", "highlight.js": "^11.6.0", "i18next": "^21.9.2", "lodash-es": "^4.17.21", diff --git a/web/src/components/Editor/EmojiPicker.tsx b/web/src/components/Editor/EmojiPicker.tsx deleted file mode 100644 index 75f13f54a059e..0000000000000 --- a/web/src/components/Editor/EmojiPicker.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import Picker, { IEmojiPickerProps } from "emoji-picker-react"; -import { useEffect, useState } from "react"; - -interface Props { - shouldShow: boolean; - onEmojiClick: IEmojiPickerProps["onEmojiClick"]; - onShouldShowEmojiPickerChange: (status: boolean) => void; -} - -interface State { - hasShown: boolean; -} - -export const EmojiPicker: React.FC<Props> = (props: Props) => { - const { shouldShow, onEmojiClick, onShouldShowEmojiPickerChange } = props; - const [state, setState] = useState<State>({ - hasShown: false, - }); - - useEffect(() => { - if (shouldShow) { - const handleClickOutside = (event: MouseEvent) => { - event.stopPropagation(); - const emojiWrapper = document.querySelector(".emoji-picker-react"); - const isContains = emojiWrapper?.contains(event.target as Node); - if (!isContains) { - onShouldShowEmojiPickerChange(false); - } - }; - - window.addEventListener("click", handleClickOutside, { - capture: true, - once: true, - }); - setState({ - hasShown: true, - }); - } - }, [shouldShow]); - - return ( - <> - {state.hasShown && ( - <div className={`emoji-picker ${shouldShow ? "" : "hidden"}`}> - <Picker onEmojiClick={onEmojiClick} disableSearchBar /> - </div> - )} - </> - ); -}; - -export default EmojiPicker; diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index 8a0409dea7402..b8afe3d49cfe5 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -1,4 +1,3 @@ -import { IEmojiData } from "emoji-picker-react"; import { toLower } from "lodash"; import React, { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -11,7 +10,6 @@ import Icon from "./Icon"; import toastHelper from "./Toast"; import Selector from "./common/Selector"; import Editor, { EditorRefActions } from "./Editor/Editor"; -import EmojiPicker from "./Editor/EmojiPicker"; import ResourceIcon from "./ResourceIcon"; import showResourcesSelectorDialog from "./ResourcesSelectorDialog"; import "../less/memo-editor.less"; @@ -242,10 +240,6 @@ const MemoEditor = () => { setEditorContentCache(content); }; - const handleEmojiPickerBtnClick = () => { - handleChangeShouldShowEmojiPicker(!state.shouldShowEmojiPicker); - }; - const handleCheckBoxBtnClick = () => { if (!editorRef.current) { return; @@ -320,22 +314,6 @@ const MemoEditor = () => { } }, []); - const handleChangeShouldShowEmojiPicker = (status: boolean) => { - setState({ - ...state, - shouldShowEmojiPicker: status, - }); - }; - - const handleEmojiClick = (_: any, emojiObject: IEmojiData) => { - if (!editorRef.current) { - return; - } - - editorRef.current.insertText(`${emojiObject.emoji}`); - handleChangeShouldShowEmojiPicker(false); - }; - const handleDeleteResource = async (resourceId: ResourceId) => { editorStateService.setResourceList(editorState.resourceList.filter((resource) => resource.id !== resourceId)); if (editorState.editMemoId) { @@ -401,9 +379,6 @@ const MemoEditor = () => { )} </div> </div> - <button className="action-btn !hidden sm:!flex "> - <Icon.Smile className="icon-img" onClick={handleEmojiPickerBtnClick} /> - </button> <button className="action-btn"> <Icon.CheckSquare className="icon-img" onClick={handleCheckBoxBtnClick} /> </button> @@ -427,11 +402,6 @@ const MemoEditor = () => { <button className="action-btn" onClick={handleFullscreenBtnClick}> {state.fullscreen ? <Icon.Minimize className="icon-img" /> : <Icon.Maximize className="icon-img" />} </button> - <EmojiPicker - shouldShow={state.shouldShowEmojiPicker} - onEmojiClick={handleEmojiClick} - onShouldShowEmojiPickerChange={handleChangeShouldShowEmojiPicker} - /> </div> </div> {editorState.resourceList && editorState.resourceList.length > 0 && ( diff --git a/web/src/css/tailwind.css b/web/src/css/tailwind.css index 739f834ead904..c7adb5b696a95 100644 --- a/web/src/css/tailwind.css +++ b/web/src/css/tailwind.css @@ -20,7 +20,7 @@ } .btn-primary { - @apply btn-normal border-transparent bg-green-600 text-white dark:text-gray-200; + @apply btn-normal border-transparent bg-green-600 text-white dark:border-transparent dark:text-gray-200; } .btn-danger { @@ -32,6 +32,6 @@ } .input-text { - @apply w-full px-3 py-2 leading-6 text-sm rounded border dark:border-zinc-700 dark:bg-zinc-800; + @apply w-full px-3 py-2 leading-6 text-sm dark:text-gray-200 rounded border focus:outline focus:outline-2 dark:border-zinc-700 dark:bg-zinc-800; } } diff --git a/web/src/less/auth.less b/web/src/less/auth.less index c9a99b8bf29e2..73afbd735de6f 100644 --- a/web/src/less/auth.less +++ b/web/src/less/auth.less @@ -45,7 +45,7 @@ @apply py-2; > input { - @apply w-full py-3 px-3 text-base shadow-inner rounded-lg border border-solid border-gray-400 hover:opacity-80 dark:bg-zinc-800 dark:text-gray-200 dark:border-gray-600; + @apply w-full py-3 px-3 text-base rounded-lg; } } } diff --git a/web/src/less/memo-editor.less b/web/src/less/memo-editor.less index 45fe0e7f64451..0437b5c68cb63 100644 --- a/web/src/less/memo-editor.less +++ b/web/src/less/memo-editor.less @@ -17,11 +17,6 @@ top: unset !important; } - .emoji-picker-react { - @apply !bottom-8; - top: unset !important; - } - .items-wrapper { @apply mb-1 bottom-full top-auto; } @@ -96,14 +91,6 @@ @apply hidden ml-1 text-xs leading-5 text-gray-700 border border-gray-300 rounded-xl px-2; } } - - .emoji-picker-react { - @apply absolute shadow left-6 top-8; - - li.emoji::before { - @apply hidden; - } - } } } diff --git a/web/src/pages/Auth.tsx b/web/src/pages/Auth.tsx index 693380ca2218c..5eb5cf10eb08c 100644 --- a/web/src/pages/Auth.tsx +++ b/web/src/pages/Auth.tsx @@ -126,11 +126,11 @@ const Auth = () => { <div className={`page-content-container ${actionBtnLoadingState.isLoading ? "requesting" : ""}`}> <div className="form-item-container input-form-container"> <span className={`normal-text ${username ? "not-null" : ""}`}>{t("common.username")}</span> - <input type="text" value={username} onChange={handleUsernameInputChanged} required /> + <input className="input-text" type="text" value={username} onChange={handleUsernameInputChanged} required /> </div> <div className="form-item-container input-form-container"> <span className={`normal-text ${password ? "not-null" : ""}`}>{t("common.password")}</span> - <input type="password" value={password} onChange={handlePasswordInputChanged} required /> + <input className="input-text" type="password" value={password} onChange={handlePasswordInputChanged} required /> </div> </div> <div className="action-btns-container"> diff --git a/web/yarn.lock b/web/yarn.lock index 08584f08d6f5e..8a38bb5f17dc9 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -1736,11 +1736,6 @@ emittery@^0.10.2: resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.10.2.tgz#902eec8aedb8c41938c46e9385e9db7e03182933" integrity sha512-aITqOwnLanpHLNXZJENbOgjUBeHocD+xsSJmNrjovKBW5HbSpW3d1pEls7GFQPUWXiwG9+0P4GtHfEqC/4M0Iw== -emoji-picker-react@^3.6.2: - version "3.6.2" - resolved "https://registry.yarnpkg.com/emoji-picker-react/-/emoji-picker-react-3.6.2.tgz#e414971bf9421b0825484f3b82623fef995c3c4b" - integrity sha512-PK3dfljGxeyN8fDz2FAsDYKPYGgo6/tkRyzJjLVaw0fksJg7jA3OJPIlHq2IIzTmlC/NKhcI/oaf0uEo5azYGA== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
chore
remove emoji picker (#667)
33133ea1a3a0112bf42486e5421ccc1dffe452c1
2024-05-08 20:20:13
Steven
chore: tweak searchbar styles
false
diff --git a/web/src/components/SearchBar.tsx b/web/src/components/SearchBar.tsx index a033cea2bacb0..b18d3f34c7089 100644 --- a/web/src/components/SearchBar.tsx +++ b/web/src/components/SearchBar.tsx @@ -30,7 +30,7 @@ const SearchBar = () => { <div className="relative w-full h-auto flex flex-row justify-start items-center"> <Icon.Search className="absolute left-3 w-4 h-auto opacity-30" /> <input - className="w-full text-gray-500 dark:text-gray-400 bg-zinc-50 dark:bg-zinc-900 border dark:border-zinc-800 text-sm leading-6 rounded-lg p-1 pl-8 outline-none" + className="w-full text-gray-500 dark:text-gray-400 bg-zinc-50 dark:bg-zinc-900 border dark:border-zinc-800 text-sm leading-7 rounded-lg p-1 pl-8 outline-none" placeholder={t("memo.search-placeholder")} value={queryText} onChange={handleTextQueryInput} diff --git a/web/src/css/global.css b/web/src/css/global.css index b1043f89682b1..78bbb2ae73b62 100644 --- a/web/src/css/global.css +++ b/web/src/css/global.css @@ -7,8 +7,8 @@ body { } html.dark { color-scheme: dark; - scrollbar-color: hsla(0, 0%, 100%, .4) hsla(0, 0%, 100%, .029); + scrollbar-color: hsla(0, 0%, 100%, 0.4) hsla(0, 0%, 100%, 0.029); } html.light { color-scheme: light; -} \ No newline at end of file +}
chore
tweak searchbar styles
85dc29bfb9d89d2a04c90d37c2272d97c5cce78d
2022-10-03 07:09:49
steven
feat: add `linkedMemoAmount` to resource
false
diff --git a/api/resource.go b/api/resource.go index f232aa775e5aa..11dc157a69af8 100644 --- a/api/resource.go +++ b/api/resource.go @@ -13,6 +13,9 @@ type Resource struct { Blob []byte `json:"-"` Type string `json:"type"` Size int64 `json:"size"` + + // Related fields + LinkedMemoAmount int `json:"linkedMemoAmount"` } type ResourceCreate struct { diff --git a/server/resource.go b/server/resource.go index 5f4e0ed23a5b2..04f3abe28c612 100644 --- a/server/resource.go +++ b/server/resource.go @@ -80,6 +80,16 @@ func (s *Server) registerResourceRoutes(g *echo.Group) { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to fetch resource list").SetInternal(err) } + for _, resource := range list { + memoResoureceList, err := s.Store.FindMemoResourceList(ctx, &api.MemoResourceFind{ + ResourceID: &resource.ID, + }) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find memo resource list").SetInternal(err) + } + resource.LinkedMemoAmount = len(memoResoureceList) + } + c.Response().Header().Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8) if err := json.NewEncoder(c.Response().Writer).Encode(composeResponse(list)); err != nil { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to encode resource list response").SetInternal(err) diff --git a/store/resource.go b/store/resource.go index ba90ce2d57bc9..9e386edf442ca 100644 --- a/store/resource.go +++ b/store/resource.go @@ -223,7 +223,7 @@ func findResourceList(ctx context.Context, tx *sql.Tx, find *api.ResourceFind) ( updated_ts FROM resource WHERE ` + strings.Join(where, " AND ") + ` - ORDER BY created_ts DESC + ORDER BY id DESC ` rows, err := tx.QueryContext(ctx, query, args...) if err != nil {
feat
add `linkedMemoAmount` to resource
77e4d6f6f15b8f60452359a0f574560ef0188a94
2024-12-03 06:19:13
dependabot[bot]
chore: bump golang.org/x/crypto from 0.28.0 to 0.29.0 (#4168) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.28.0 to 0.29.0. - [Commits](https://github.com/golang/crypto/compare/v0.28.0...v0.29.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/go.mod b/go.mod index ca3a181ffc3e5..ea6aaf5c069a0 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 github.com/usememos/gomark v0.0.0-20240928134159-9aca881d9121 - golang.org/x/crypto v0.28.0 + golang.org/x/crypto v0.29.0 golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c golang.org/x/mod v0.21.0 golang.org/x/net v0.30.0 @@ -99,8 +99,8 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.20.0 // indirect golang.org/x/time v0.7.0 // indirect google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 3aabda9f85871..96b21386987c7 100644 --- a/go.sum +++ b/go.sum @@ -475,8 +475,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= @@ -535,8 +535,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -568,15 +568,15 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ=
chore
bump golang.org/x/crypto from 0.28.0 to 0.29.0 (#4168) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.28.0 to 0.29.0. - [Commits](https://github.com/golang/crypto/compare/v0.28.0...v0.29.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
18107248aaa651aa2bcecc56722290b99724c225
2023-10-27 21:38:42
Steven
chore: rename list inbox
false
diff --git a/api/v2/inbox_service .go b/api/v2/inbox_service .go index 1d78dc525e789..e474aec15052e 100644 --- a/api/v2/inbox_service .go +++ b/api/v2/inbox_service .go @@ -3,37 +3,39 @@ package v2 import ( "context" "fmt" + "time" "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" apiv2pb "github.com/usememos/memos/proto/gen/api/v2" "github.com/usememos/memos/store" ) -func (s *APIV2Service) ListInbox(ctx context.Context, _ *apiv2pb.ListInboxRequest) (*apiv2pb.ListInboxResponse, error) { +func (s *APIV2Service) ListInboxes(ctx context.Context, _ *apiv2pb.ListInboxesRequest) (*apiv2pb.ListInboxesResponse, error) { user, err := getCurrentUser(ctx, s.Store) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get user") } - inboxList, err := s.Store.ListInbox(ctx, &store.FindInbox{ + inboxes, err := s.Store.ListInboxes(ctx, &store.FindInbox{ ReceiverID: &user.ID, }) if err != nil { return nil, status.Errorf(codes.Internal, "failed to list inbox: %v", err) } - response := &apiv2pb.ListInboxResponse{ - Inbox: []*apiv2pb.Inbox{}, + response := &apiv2pb.ListInboxesResponse{ + Inboxes: []*apiv2pb.Inbox{}, } - for _, inbox := range inboxList { + for _, inbox := range inboxes { inboxMessage, err := s.convertInboxFromStore(ctx, inbox) if err != nil { return nil, status.Errorf(codes.Internal, "failed to convert inbox from store: %v", err) } - response.Inbox = append(response.Inbox, inboxMessage) + response.Inboxes = append(response.Inboxes, inboxMessage) } return response, nil @@ -103,10 +105,11 @@ func (s *APIV2Service) convertInboxFromStore(ctx context.Context, inbox *store.I } return &apiv2pb.Inbox{ - Name: fmt.Sprintf("inbox/%d", inbox.ID), + Name: fmt.Sprintf("inboxes/%d", inbox.ID), Sender: fmt.Sprintf("users/%s", sender.Username), Receiver: fmt.Sprintf("users/%s", receiver.Username), Status: convertInboxStatusFromStore(inbox.Status), + CreateTime: timestamppb.New(time.Unix(inbox.CreatedTs, 0)), Type: apiv2pb.Inbox_Type(inbox.Message.Type), ActivityId: inbox.Message.ActivityId, }, nil diff --git a/proto/api/v2/inbox_service.proto b/proto/api/v2/inbox_service.proto index eb68b7b9d8c39..954781934edbc 100644 --- a/proto/api/v2/inbox_service.proto +++ b/proto/api/v2/inbox_service.proto @@ -5,31 +5,32 @@ package memos.api.v2; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; option go_package = "gen/api/v2"; service InboxService { - rpc ListInbox(ListInboxRequest) returns (ListInboxResponse) { - option (google.api.http) = {get: "/api/v2/inbox"}; + rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) { + option (google.api.http) = {get: "/api/v2/inboxes"}; } rpc UpdateInbox(UpdateInboxRequest) returns (UpdateInboxResponse) { option (google.api.http) = { - patch: "/v2/inbox" + patch: "/v2/inboxes" body: "inbox" }; option (google.api.method_signature) = "inbox,update_mask"; } rpc DeleteInbox(DeleteInboxRequest) returns (DeleteInboxResponse) { - option (google.api.http) = {delete: "/v2/{name=inbox/*}"}; + option (google.api.http) = {delete: "/v2/{name=inboxes/*}"}; option (google.api.method_signature) = "name"; } } message Inbox { // The name of the inbox. - // Format: inbox/{id} + // Format: inboxes/{id} string name = 1; // Format: users/{username} string sender = 2; @@ -44,22 +45,24 @@ message Inbox { } Status status = 4; + google.protobuf.Timestamp create_time = 5; + enum Type { TYPE_UNSPECIFIED = 0; TYPE_MEMO_COMMENT = 1; } - Type type = 5; + Type type = 6; - optional int32 activity_id = 6; + optional int32 activity_id = 7; } -message ListInboxRequest { - // Format: /users/{username} +message ListInboxesRequest { + // Format: users/{username} string user = 1; } -message ListInboxResponse { - repeated Inbox inbox = 1; +message ListInboxesResponse { + repeated Inbox inboxes = 1; } message UpdateInboxRequest { @@ -74,7 +77,7 @@ message UpdateInboxResponse { message DeleteInboxRequest { // The name of the inbox to delete. - // Format: inbox/{inbox} + // Format: inboxes/{inbox} string name = 1; } diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md index 31f5baba0e7eb..66ed6e63fbc1b 100644 --- a/proto/gen/api/v2/README.md +++ b/proto/gen/api/v2/README.md @@ -10,8 +10,8 @@ - [DeleteInboxRequest](#memos-api-v2-DeleteInboxRequest) - [DeleteInboxResponse](#memos-api-v2-DeleteInboxResponse) - [Inbox](#memos-api-v2-Inbox) - - [ListInboxRequest](#memos-api-v2-ListInboxRequest) - - [ListInboxResponse](#memos-api-v2-ListInboxResponse) + - [ListInboxesRequest](#memos-api-v2-ListInboxesRequest) + - [ListInboxesResponse](#memos-api-v2-ListInboxesResponse) - [UpdateInboxRequest](#memos-api-v2-UpdateInboxRequest) - [UpdateInboxResponse](#memos-api-v2-UpdateInboxResponse) @@ -138,7 +138,7 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the inbox to delete. Format: inbox/{inbox} | +| name | [string](#string) | | The name of the inbox to delete. Format: inboxes/{inbox} | @@ -163,10 +163,11 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The name of the inbox. Format: inbox/{id} | +| name | [string](#string) | | The name of the inbox. Format: inboxes/{id} | | sender | [string](#string) | | Format: users/{username} | | receiver | [string](#string) | | Format: users/{username} | | status | [Inbox.Status](#memos-api-v2-Inbox-Status) | | | +| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | | | type | [Inbox.Type](#memos-api-v2-Inbox-Type) | | | | activity_id | [int32](#int32) | optional | | @@ -175,30 +176,30 @@ -<a name="memos-api-v2-ListInboxRequest"></a> +<a name="memos-api-v2-ListInboxesRequest"></a> -### ListInboxRequest +### ListInboxesRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| user | [string](#string) | | Format: /users/{username} | +| user | [string](#string) | | Format: users/{username} | -<a name="memos-api-v2-ListInboxResponse"></a> +<a name="memos-api-v2-ListInboxesResponse"></a> -### ListInboxResponse +### ListInboxesResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| inbox | [Inbox](#memos-api-v2-Inbox) | repeated | | +| inboxes | [Inbox](#memos-api-v2-Inbox) | repeated | | @@ -275,7 +276,7 @@ | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| ListInbox | [ListInboxRequest](#memos-api-v2-ListInboxRequest) | [ListInboxResponse](#memos-api-v2-ListInboxResponse) | | +| ListInboxes | [ListInboxesRequest](#memos-api-v2-ListInboxesRequest) | [ListInboxesResponse](#memos-api-v2-ListInboxesResponse) | | | UpdateInbox | [UpdateInboxRequest](#memos-api-v2-UpdateInboxRequest) | [UpdateInboxResponse](#memos-api-v2-UpdateInboxResponse) | | | DeleteInbox | [DeleteInboxRequest](#memos-api-v2-DeleteInboxRequest) | [DeleteInboxResponse](#memos-api-v2-DeleteInboxResponse) | | diff --git a/proto/gen/api/v2/inbox_service.pb.go b/proto/gen/api/v2/inbox_service.pb.go index f7bba2d35e0e5..4752c673a7104 100644 --- a/proto/gen/api/v2/inbox_service.pb.go +++ b/proto/gen/api/v2/inbox_service.pb.go @@ -11,6 +11,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -126,15 +127,16 @@ type Inbox struct { unknownFields protoimpl.UnknownFields // The name of the inbox. - // Format: inbox/{id} + // Format: inboxes/{id} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Format: users/{username} Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // Format: users/{username} - Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` - Status Inbox_Status `protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v2.Inbox_Status" json:"status,omitempty"` - Type Inbox_Type `protobuf:"varint,5,opt,name=type,proto3,enum=memos.api.v2.Inbox_Type" json:"type,omitempty"` - ActivityId *int32 `protobuf:"varint,6,opt,name=activity_id,json=activityId,proto3,oneof" json:"activity_id,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` + Status Inbox_Status `protobuf:"varint,4,opt,name=status,proto3,enum=memos.api.v2.Inbox_Status" json:"status,omitempty"` + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + Type Inbox_Type `protobuf:"varint,6,opt,name=type,proto3,enum=memos.api.v2.Inbox_Type" json:"type,omitempty"` + ActivityId *int32 `protobuf:"varint,7,opt,name=activity_id,json=activityId,proto3,oneof" json:"activity_id,omitempty"` } func (x *Inbox) Reset() { @@ -197,6 +199,13 @@ func (x *Inbox) GetStatus() Inbox_Status { return Inbox_STATUS_UNSPECIFIED } +func (x *Inbox) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + func (x *Inbox) GetType() Inbox_Type { if x != nil { return x.Type @@ -211,17 +220,17 @@ func (x *Inbox) GetActivityId() int32 { return 0 } -type ListInboxRequest struct { +type ListInboxesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Format: /users/{username} + // Format: users/{username} User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` } -func (x *ListInboxRequest) Reset() { - *x = ListInboxRequest{} +func (x *ListInboxesRequest) Reset() { + *x = ListInboxesRequest{} if protoimpl.UnsafeEnabled { mi := &file_api_v2_inbox_service_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -229,13 +238,13 @@ func (x *ListInboxRequest) Reset() { } } -func (x *ListInboxRequest) String() string { +func (x *ListInboxesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListInboxRequest) ProtoMessage() {} +func (*ListInboxesRequest) ProtoMessage() {} -func (x *ListInboxRequest) ProtoReflect() protoreflect.Message { +func (x *ListInboxesRequest) ProtoReflect() protoreflect.Message { mi := &file_api_v2_inbox_service_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -247,28 +256,28 @@ func (x *ListInboxRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListInboxRequest.ProtoReflect.Descriptor instead. -func (*ListInboxRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListInboxesRequest.ProtoReflect.Descriptor instead. +func (*ListInboxesRequest) Descriptor() ([]byte, []int) { return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{1} } -func (x *ListInboxRequest) GetUser() string { +func (x *ListInboxesRequest) GetUser() string { if x != nil { return x.User } return "" } -type ListInboxResponse struct { +type ListInboxesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Inbox []*Inbox `protobuf:"bytes,1,rep,name=inbox,proto3" json:"inbox,omitempty"` + Inboxes []*Inbox `protobuf:"bytes,1,rep,name=inboxes,proto3" json:"inboxes,omitempty"` } -func (x *ListInboxResponse) Reset() { - *x = ListInboxResponse{} +func (x *ListInboxesResponse) Reset() { + *x = ListInboxesResponse{} if protoimpl.UnsafeEnabled { mi := &file_api_v2_inbox_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -276,13 +285,13 @@ func (x *ListInboxResponse) Reset() { } } -func (x *ListInboxResponse) String() string { +func (x *ListInboxesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListInboxResponse) ProtoMessage() {} +func (*ListInboxesResponse) ProtoMessage() {} -func (x *ListInboxResponse) ProtoReflect() protoreflect.Message { +func (x *ListInboxesResponse) ProtoReflect() protoreflect.Message { mi := &file_api_v2_inbox_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -294,14 +303,14 @@ func (x *ListInboxResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListInboxResponse.ProtoReflect.Descriptor instead. -func (*ListInboxResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListInboxesResponse.ProtoReflect.Descriptor instead. +func (*ListInboxesResponse) Descriptor() ([]byte, []int) { return file_api_v2_inbox_service_proto_rawDescGZIP(), []int{2} } -func (x *ListInboxResponse) GetInbox() []*Inbox { +func (x *ListInboxesResponse) GetInboxes() []*Inbox { if x != nil { - return x.Inbox + return x.Inboxes } return nil } @@ -414,7 +423,7 @@ type DeleteInboxRequest struct { unknownFields protoimpl.UnknownFields // The name of the inbox to delete. - // Format: inbox/{inbox} + // Format: inboxes/{inbox} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } @@ -506,86 +515,93 @@ var file_api_v2_inbox_service_proto_rawDesc = []byte{ 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x02, 0x0a, 0x05, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, - 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x44, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, - 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, - 0x44, 0x10, 0x03, 0x22, 0x33, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x43, - 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x26, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, - 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x03, 0x0a, 0x05, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x64, 0x88, 0x01, 0x01, 0x22, 0x44, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x52, 0x45, 0x41, + 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x44, 0x10, + 0x03, 0x22, 0x33, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x43, 0x4f, 0x4d, + 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x22, 0x28, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x22, 0x3e, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, - 0x22, 0x7c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, - 0x78, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, - 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x40, - 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, - 0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xed, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, - 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x80, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x22, 0x44, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x69, 0x6e, 0x62, 0x6f, 0x78, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x07, 0x69, + 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x22, 0x7c, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x05, + 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, + 0x52, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x40, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x69, + 0x6e, 0x62, 0x6f, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, + 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf9, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x62, 0x6f, + 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x78, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x62, + 0x6f, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, + 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x62, - 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, - 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xda, 0x41, - 0x11, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x32, - 0x09, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x75, 0x0a, 0x0b, 0x44, 0x65, + 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xda, 0x41, 0x11, 0x69, + 0x6e, 0x62, 0x6f, 0x78, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x05, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x32, 0x0b, 0x2f, + 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, - 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, - 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x2f, 0x2a, - 0x7d, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, - 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, - 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, - 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, + 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f, + 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x62, 0x6f, 0x78, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x11, 0x49, 0x6e, 0x62, 0x6f, 0x78, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, + 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, + 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, + 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, + 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -606,32 +622,34 @@ var file_api_v2_inbox_service_proto_goTypes = []interface{}{ (Inbox_Status)(0), // 0: memos.api.v2.Inbox.Status (Inbox_Type)(0), // 1: memos.api.v2.Inbox.Type (*Inbox)(nil), // 2: memos.api.v2.Inbox - (*ListInboxRequest)(nil), // 3: memos.api.v2.ListInboxRequest - (*ListInboxResponse)(nil), // 4: memos.api.v2.ListInboxResponse + (*ListInboxesRequest)(nil), // 3: memos.api.v2.ListInboxesRequest + (*ListInboxesResponse)(nil), // 4: memos.api.v2.ListInboxesResponse (*UpdateInboxRequest)(nil), // 5: memos.api.v2.UpdateInboxRequest (*UpdateInboxResponse)(nil), // 6: memos.api.v2.UpdateInboxResponse (*DeleteInboxRequest)(nil), // 7: memos.api.v2.DeleteInboxRequest (*DeleteInboxResponse)(nil), // 8: memos.api.v2.DeleteInboxResponse - (*fieldmaskpb.FieldMask)(nil), // 9: google.protobuf.FieldMask + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask } var file_api_v2_inbox_service_proto_depIdxs = []int32{ - 0, // 0: memos.api.v2.Inbox.status:type_name -> memos.api.v2.Inbox.Status - 1, // 1: memos.api.v2.Inbox.type:type_name -> memos.api.v2.Inbox.Type - 2, // 2: memos.api.v2.ListInboxResponse.inbox:type_name -> memos.api.v2.Inbox - 2, // 3: memos.api.v2.UpdateInboxRequest.inbox:type_name -> memos.api.v2.Inbox - 9, // 4: memos.api.v2.UpdateInboxRequest.update_mask:type_name -> google.protobuf.FieldMask - 2, // 5: memos.api.v2.UpdateInboxResponse.inbox:type_name -> memos.api.v2.Inbox - 3, // 6: memos.api.v2.InboxService.ListInbox:input_type -> memos.api.v2.ListInboxRequest - 5, // 7: memos.api.v2.InboxService.UpdateInbox:input_type -> memos.api.v2.UpdateInboxRequest - 7, // 8: memos.api.v2.InboxService.DeleteInbox:input_type -> memos.api.v2.DeleteInboxRequest - 4, // 9: memos.api.v2.InboxService.ListInbox:output_type -> memos.api.v2.ListInboxResponse - 6, // 10: memos.api.v2.InboxService.UpdateInbox:output_type -> memos.api.v2.UpdateInboxResponse - 8, // 11: memos.api.v2.InboxService.DeleteInbox:output_type -> memos.api.v2.DeleteInboxResponse - 9, // [9:12] is the sub-list for method output_type - 6, // [6:9] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 0, // 0: memos.api.v2.Inbox.status:type_name -> memos.api.v2.Inbox.Status + 9, // 1: memos.api.v2.Inbox.create_time:type_name -> google.protobuf.Timestamp + 1, // 2: memos.api.v2.Inbox.type:type_name -> memos.api.v2.Inbox.Type + 2, // 3: memos.api.v2.ListInboxesResponse.inboxes:type_name -> memos.api.v2.Inbox + 2, // 4: memos.api.v2.UpdateInboxRequest.inbox:type_name -> memos.api.v2.Inbox + 10, // 5: memos.api.v2.UpdateInboxRequest.update_mask:type_name -> google.protobuf.FieldMask + 2, // 6: memos.api.v2.UpdateInboxResponse.inbox:type_name -> memos.api.v2.Inbox + 3, // 7: memos.api.v2.InboxService.ListInboxes:input_type -> memos.api.v2.ListInboxesRequest + 5, // 8: memos.api.v2.InboxService.UpdateInbox:input_type -> memos.api.v2.UpdateInboxRequest + 7, // 9: memos.api.v2.InboxService.DeleteInbox:input_type -> memos.api.v2.DeleteInboxRequest + 4, // 10: memos.api.v2.InboxService.ListInboxes:output_type -> memos.api.v2.ListInboxesResponse + 6, // 11: memos.api.v2.InboxService.UpdateInbox:output_type -> memos.api.v2.UpdateInboxResponse + 8, // 12: memos.api.v2.InboxService.DeleteInbox:output_type -> memos.api.v2.DeleteInboxResponse + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_api_v2_inbox_service_proto_init() } @@ -653,7 +671,7 @@ func file_api_v2_inbox_service_proto_init() { } } file_api_v2_inbox_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListInboxRequest); i { + switch v := v.(*ListInboxesRequest); i { case 0: return &v.state case 1: @@ -665,7 +683,7 @@ func file_api_v2_inbox_service_proto_init() { } } file_api_v2_inbox_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListInboxResponse); i { + switch v := v.(*ListInboxesResponse); i { case 0: return &v.state case 1: diff --git a/proto/gen/api/v2/inbox_service.pb.gw.go b/proto/gen/api/v2/inbox_service.pb.gw.go index 2abf1513fcc88..b8ca6f1efcf74 100644 --- a/proto/gen/api/v2/inbox_service.pb.gw.go +++ b/proto/gen/api/v2/inbox_service.pb.gw.go @@ -32,37 +32,37 @@ var _ = utilities.NewDoubleArray var _ = metadata.Join var ( - filter_InboxService_ListInbox_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_InboxService_ListInboxes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_InboxService_ListInbox_0(ctx context.Context, marshaler runtime.Marshaler, client InboxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListInboxRequest +func request_InboxService_ListInboxes_0(ctx context.Context, marshaler runtime.Marshaler, client InboxServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListInboxesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInbox_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInboxes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListInbox(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ListInboxes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_InboxService_ListInbox_0(ctx context.Context, marshaler runtime.Marshaler, server InboxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListInboxRequest +func local_request_InboxService_ListInboxes_0(ctx context.Context, marshaler runtime.Marshaler, server InboxServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListInboxesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInbox_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_InboxService_ListInboxes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListInbox(ctx, &protoReq) + msg, err := server.ListInboxes(ctx, &protoReq) return msg, metadata, err } @@ -191,7 +191,7 @@ func local_request_InboxService_DeleteInbox_0(ctx context.Context, marshaler run // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInboxServiceHandlerFromEndpoint instead. func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InboxServiceServer) error { - mux.Handle("GET", pattern_InboxService_ListInbox_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InboxService_ListInboxes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -199,12 +199,12 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInbox", runtime.WithHTTPPathPattern("/api/v2/inbox")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v2/inboxes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_InboxService_ListInbox_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_InboxService_ListInboxes_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 { @@ -212,7 +212,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu return } - forward_InboxService_ListInbox_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InboxService_ListInboxes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -224,7 +224,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inbox")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inboxes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -249,7 +249,7 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inbox/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inboxes/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -307,25 +307,25 @@ func RegisterInboxServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // "InboxServiceClient" to call the correct interceptors. func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InboxServiceClient) error { - mux.Handle("GET", pattern_InboxService_ListInbox_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InboxService_ListInboxes_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) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInbox", runtime.WithHTTPPathPattern("/api/v2/inbox")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/ListInboxes", runtime.WithHTTPPathPattern("/api/v2/inboxes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_InboxService_ListInbox_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_InboxService_ListInboxes_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_InboxService_ListInbox_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InboxService_ListInboxes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -335,7 +335,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inbox")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/UpdateInbox", runtime.WithHTTPPathPattern("/v2/inboxes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -357,7 +357,7 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inbox/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.InboxService/DeleteInbox", runtime.WithHTTPPathPattern("/v2/{name=inboxes/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -377,15 +377,15 @@ func RegisterInboxServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } var ( - pattern_InboxService_ListInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "inbox"}, "")) + pattern_InboxService_ListInboxes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "inboxes"}, "")) - pattern_InboxService_UpdateInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v2", "inbox"}, "")) + pattern_InboxService_UpdateInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v2", "inboxes"}, "")) - pattern_InboxService_DeleteInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v2", "inbox", "name"}, "")) + pattern_InboxService_DeleteInbox_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v2", "inboxes", "name"}, "")) ) var ( - forward_InboxService_ListInbox_0 = runtime.ForwardResponseMessage + forward_InboxService_ListInboxes_0 = runtime.ForwardResponseMessage forward_InboxService_UpdateInbox_0 = runtime.ForwardResponseMessage diff --git a/proto/gen/api/v2/inbox_service_grpc.pb.go b/proto/gen/api/v2/inbox_service_grpc.pb.go index 5b2ba2a8d04ab..806ae7ade8350 100644 --- a/proto/gen/api/v2/inbox_service_grpc.pb.go +++ b/proto/gen/api/v2/inbox_service_grpc.pb.go @@ -19,7 +19,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - InboxService_ListInbox_FullMethodName = "/memos.api.v2.InboxService/ListInbox" + InboxService_ListInboxes_FullMethodName = "/memos.api.v2.InboxService/ListInboxes" InboxService_UpdateInbox_FullMethodName = "/memos.api.v2.InboxService/UpdateInbox" InboxService_DeleteInbox_FullMethodName = "/memos.api.v2.InboxService/DeleteInbox" ) @@ -28,7 +28,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type InboxServiceClient interface { - ListInbox(ctx context.Context, in *ListInboxRequest, opts ...grpc.CallOption) (*ListInboxResponse, error) + ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error) UpdateInbox(ctx context.Context, in *UpdateInboxRequest, opts ...grpc.CallOption) (*UpdateInboxResponse, error) DeleteInbox(ctx context.Context, in *DeleteInboxRequest, opts ...grpc.CallOption) (*DeleteInboxResponse, error) } @@ -41,9 +41,9 @@ func NewInboxServiceClient(cc grpc.ClientConnInterface) InboxServiceClient { return &inboxServiceClient{cc} } -func (c *inboxServiceClient) ListInbox(ctx context.Context, in *ListInboxRequest, opts ...grpc.CallOption) (*ListInboxResponse, error) { - out := new(ListInboxResponse) - err := c.cc.Invoke(ctx, InboxService_ListInbox_FullMethodName, in, out, opts...) +func (c *inboxServiceClient) ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error) { + out := new(ListInboxesResponse) + err := c.cc.Invoke(ctx, InboxService_ListInboxes_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -72,7 +72,7 @@ func (c *inboxServiceClient) DeleteInbox(ctx context.Context, in *DeleteInboxReq // All implementations must embed UnimplementedInboxServiceServer // for forward compatibility type InboxServiceServer interface { - ListInbox(context.Context, *ListInboxRequest) (*ListInboxResponse, error) + ListInboxes(context.Context, *ListInboxesRequest) (*ListInboxesResponse, error) UpdateInbox(context.Context, *UpdateInboxRequest) (*UpdateInboxResponse, error) DeleteInbox(context.Context, *DeleteInboxRequest) (*DeleteInboxResponse, error) mustEmbedUnimplementedInboxServiceServer() @@ -82,8 +82,8 @@ type InboxServiceServer interface { type UnimplementedInboxServiceServer struct { } -func (UnimplementedInboxServiceServer) ListInbox(context.Context, *ListInboxRequest) (*ListInboxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListInbox not implemented") +func (UnimplementedInboxServiceServer) ListInboxes(context.Context, *ListInboxesRequest) (*ListInboxesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInboxes not implemented") } func (UnimplementedInboxServiceServer) UpdateInbox(context.Context, *UpdateInboxRequest) (*UpdateInboxResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateInbox not implemented") @@ -104,20 +104,20 @@ func RegisterInboxServiceServer(s grpc.ServiceRegistrar, srv InboxServiceServer) s.RegisterService(&InboxService_ServiceDesc, srv) } -func _InboxService_ListInbox_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListInboxRequest) +func _InboxService_ListInboxes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInboxesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InboxServiceServer).ListInbox(ctx, in) + return srv.(InboxServiceServer).ListInboxes(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: InboxService_ListInbox_FullMethodName, + FullMethod: InboxService_ListInboxes_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InboxServiceServer).ListInbox(ctx, req.(*ListInboxRequest)) + return srv.(InboxServiceServer).ListInboxes(ctx, req.(*ListInboxesRequest)) } return interceptor(ctx, in, info, handler) } @@ -166,8 +166,8 @@ var InboxService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*InboxServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "ListInbox", - Handler: _InboxService_ListInbox_Handler, + MethodName: "ListInboxes", + Handler: _InboxService_ListInboxes_Handler, }, { MethodName: "UpdateInbox", diff --git a/store/db/mysql/inbox.go b/store/db/mysql/inbox.go index 6c4fa65e7d6b7..10be427872202 100644 --- a/store/db/mysql/inbox.go +++ b/store/db/mysql/inbox.go @@ -12,7 +12,7 @@ func (d *DB) CreateInbox(ctx context.Context, create *store.Inbox) (*store.Inbox } // nolint -func (d *DB) ListInbox(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) { +func (d *DB) ListInboxes(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) { return nil, nil } diff --git a/store/db/sqlite/inbox.go b/store/db/sqlite/inbox.go index 1b0e6e090d239..bb99e91a45303 100644 --- a/store/db/sqlite/inbox.go +++ b/store/db/sqlite/inbox.go @@ -36,7 +36,7 @@ func (d *DB) CreateInbox(ctx context.Context, create *store.Inbox) (*store.Inbox return create, nil } -func (d *DB) ListInbox(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) { +func (d *DB) ListInboxes(ctx context.Context, find *store.FindInbox) ([]*store.Inbox, error) { where, args := []string{"1 = 1"}, []any{} if find.ID != nil { diff --git a/store/driver.go b/store/driver.go index d05ed1c283702..f434fecb7c051 100644 --- a/store/driver.go +++ b/store/driver.go @@ -84,7 +84,7 @@ type Driver interface { // Inbox model related methods. CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error) - ListInbox(ctx context.Context, find *FindInbox) ([]*Inbox, error) + ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error) UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error) DeleteInbox(ctx context.Context, delete *DeleteInbox) error } diff --git a/store/inbox.go b/store/inbox.go index e94cbae9d3389..fd3e407137eef 100644 --- a/store/inbox.go +++ b/store/inbox.go @@ -44,8 +44,8 @@ func (s *Store) CreateInbox(ctx context.Context, create *Inbox) (*Inbox, error) return s.driver.CreateInbox(ctx, create) } -func (s *Store) ListInbox(ctx context.Context, find *FindInbox) ([]*Inbox, error) { - return s.driver.ListInbox(ctx, find) +func (s *Store) ListInboxes(ctx context.Context, find *FindInbox) ([]*Inbox, error) { + return s.driver.ListInboxes(ctx, find) } func (s *Store) UpdateInbox(ctx context.Context, update *UpdateInbox) (*Inbox, error) { diff --git a/test/store/inbox_test.go b/test/store/inbox_test.go index dc88363aea4a2..02f512b1858b5 100644 --- a/test/store/inbox_test.go +++ b/test/store/inbox_test.go @@ -28,7 +28,7 @@ func TestInboxStore(t *testing.T) { require.NoError(t, err) require.NotNil(t, inbox) require.Equal(t, create.Message, inbox.Message) - inboxes, err := ts.ListInbox(ctx, &store.FindInbox{ + inboxes, err := ts.ListInboxes(ctx, &store.FindInbox{ ReceiverID: &user.ID, }) require.NoError(t, err) @@ -45,7 +45,7 @@ func TestInboxStore(t *testing.T) { ID: inbox.ID, }) require.NoError(t, err) - inboxes, err = ts.ListInbox(ctx, &store.FindInbox{ + inboxes, err = ts.ListInboxes(ctx, &store.FindInbox{ ReceiverID: &user.ID, }) require.NoError(t, err)
chore
rename list inbox
fe5ba6850b99ab03564ef7a90f81e2e6bc55f796
2022-10-23 17:58:30
boojack
chore: update insert content in editor (#336)
false
diff --git a/web/src/components/Editor/Editor.tsx b/web/src/components/Editor/Editor.tsx index 0552573530343..dd54437388a4e 100644 --- a/web/src/components/Editor/Editor.tsx +++ b/web/src/components/Editor/Editor.tsx @@ -47,19 +47,19 @@ const Editor = forwardRef((props: Props, ref: React.ForwardedRef<EditorRefAction focus: () => { editorRef.current?.focus(); }, - insertText: (content = "", prefix = "", suffix = prefix) => { + insertText: (content = "", prefix = "", suffix = "") => { if (!editorRef.current) { return; } + const cursorPosition = editorRef.current.selectionStart; const endPosition = editorRef.current.selectionEnd; const prevValue = editorRef.current.value; const value = prevValue.slice(0, cursorPosition) + prefix + - prevValue.slice(cursorPosition, endPosition) + + (content || prevValue.slice(cursorPosition, endPosition)) + suffix + - content + prevValue.slice(endPosition); editorRef.current.value = value; diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index d746caa75ee8b..25075b3814ad2 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -76,38 +76,36 @@ const MemoEditor: React.FC = () => { prevGlobalStateRef.current = editorState; }, [state, editorState.editMemoId]); - const handleInsertMark = (mark: string) => { - editorRef.current?.insertText("", mark); - }; - const handleKeyDown = (event: React.KeyboardEvent) => { if (event.key === "Escape" && state.fullscreen) { handleFullscreenBtnClick(); return; } - if (event.key === "Enter" && (event.ctrlKey || event.metaKey)) { - handleSaveBtnClick(); - return; - } if (event.key === "Tab") { event.preventDefault(); editorRef.current?.insertText(" ".repeat(TAB_SPACE_WIDTH)); return; } if (event.ctrlKey || event.metaKey) { - event.preventDefault(); - switch (event.key) { - case "b": - handleInsertMark("**"); - break; - case "i": - handleInsertMark("*"); - break; - case "e": - handleInsertMark("`"); - break; + if (event.key === "Enter") { + handleSaveBtnClick(); + return; + } + if (event.key === "b") { + event.preventDefault(); + editorRef.current?.insertText("", "**", "**"); + return; + } + if (event.key === "i") { + event.preventDefault(); + editorRef.current?.insertText("", "*", "*"); + return; + } + if (event.key === "e") { + event.preventDefault(); + editorRef.current?.insertText("", "`", "`"); + return; } - return; } }; @@ -235,9 +233,9 @@ const MemoEditor: React.FC = () => { const cursorPosition = editorRef.current.getCursorPosition(); const prevValue = editorRef.current.getContent().slice(0, cursorPosition); if (prevValue === "" || prevValue.endsWith("\n")) { - editorRef.current?.insertText("- [ ] "); + editorRef.current?.insertText("", "- [ ] "); } else { - editorRef.current?.insertText("\n- [ ] "); + editorRef.current?.insertText("", "\n- [ ] "); } }; @@ -249,9 +247,9 @@ const MemoEditor: React.FC = () => { const cursorPosition = editorRef.current.getCursorPosition(); const prevValue = editorRef.current.getContent().slice(0, cursorPosition); if (prevValue === "" || prevValue.endsWith("\n")) { - editorRef.current?.insertText("```\n\n```"); + editorRef.current?.insertText("", "```\n", "\n```"); } else { - editorRef.current?.insertText("\n```\n\n```"); + editorRef.current?.insertText("", "\n```\n", "\n```"); } }; @@ -375,7 +373,7 @@ const MemoEditor: React.FC = () => { )} </div> </div> - <button className="action-btn"> + <button className="action-btn !hidden sm:!flex "> <Icon.Smile className="icon-img" onClick={handleEmojiPickerBtnClick} /> </button> <button className="action-btn">
chore
update insert content in editor (#336)
00df48e5941c853525223c43b89742547c14d27e
2025-01-02 07:14:44
dependabot[bot]
chore: bump google.golang.org/grpc from 1.67.1 to 1.69.2 (#4250) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.1 to 1.69.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.67.1...v1.69.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/go.mod b/go.mod index f340e4e66d99f..24e877c86b96b 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/net v0.30.0 golang.org/x/oauth2 v0.23.0 google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 - google.golang.org/grpc v1.67.1 + google.golang.org/grpc v1.69.2 modernc.org/sqlite v1.34.2 ) diff --git a/go.sum b/go.sum index 2654ae37a79bd..bf425b584c93e 100644 --- a/go.sum +++ b/go.sum @@ -130,6 +130,10 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= @@ -167,8 +171,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -454,6 +458,16 @@ go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mI go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -634,8 +648,8 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
chore
bump google.golang.org/grpc from 1.67.1 to 1.69.2 (#4250) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.1 to 1.69.2. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.67.1...v1.69.2) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d7ed59581c09ce61c644d5a54144ff46b3662931
2024-01-04 19:20:13
Steven
chore: fix math block matcher
false
diff --git a/plugin/gomark/ast/ast.go b/plugin/gomark/ast/ast.go index a1416d3d00762..9bf2fba7e8c27 100644 --- a/plugin/gomark/ast/ast.go +++ b/plugin/gomark/ast/ast.go @@ -74,7 +74,7 @@ func (n *BaseNode) SetNextSibling(node Node) { func IsBlockNode(node Node) bool { switch node.Type() { - case ParagraphNode, CodeBlockNode, HeadingNode, HorizontalRuleNode, BlockquoteNode, OrderedListNode, UnorderedListNode, TaskListNode: + case ParagraphNode, CodeBlockNode, HeadingNode, HorizontalRuleNode, BlockquoteNode, OrderedListNode, UnorderedListNode, TaskListNode, MathBlockNode: return true default: return false diff --git a/plugin/gomark/parser/math_block.go b/plugin/gomark/parser/math_block.go index ad3a78527bd60..41c0a8ebb3205 100644 --- a/plugin/gomark/parser/math_block.go +++ b/plugin/gomark/parser/math_block.go @@ -18,7 +18,7 @@ func (*MathBlockParser) Match(tokens []*tokenizer.Token) (int, bool) { return 0, false } - if tokens[0].Type != tokenizer.DollarSign && tokens[1].Type != tokenizer.DollarSign && tokens[2].Type != tokenizer.Newline { + if tokens[0].Type != tokenizer.DollarSign || tokens[1].Type != tokenizer.DollarSign || tokens[2].Type != tokenizer.Newline { return 0, false } diff --git a/plugin/gomark/parser/math_block_test.go b/plugin/gomark/parser/math_block_test.go index 5f489980cb79a..cc7bff9364bea 100644 --- a/plugin/gomark/parser/math_block_test.go +++ b/plugin/gomark/parser/math_block_test.go @@ -21,6 +21,12 @@ func TestMathBlockParser(t *testing.T) { Content: "(1+x)^2", }, }, + { + text: "$$\na=3\n$$", + link: &ast.MathBlock{ + Content: "a=3", + }, + }, } for _, test := range tests { tokens := tokenizer.Tokenize(test.text) diff --git a/plugin/gomark/parser/parser_test.go b/plugin/gomark/parser/parser_test.go index 2d5effaba416c..197da2554fdb0 100644 --- a/plugin/gomark/parser/parser_test.go +++ b/plugin/gomark/parser/parser_test.go @@ -197,6 +197,22 @@ func TestParser(t *testing.T) { }, }, }, + { + text: "\n\n", + nodes: []ast.Node{ + &ast.LineBreak{}, + &ast.LineBreak{}, + }, + }, + { + text: "\n$$\na=3\n$$", + nodes: []ast.Node{ + &ast.LineBreak{}, + &ast.MathBlock{ + Content: "a=3", + }, + }, + }, } for _, test := range tests {
chore
fix math block matcher
2ed3e34636920ad4afe37d99b82410a2ce869609
2025-02-06 20:50:37
Steven
refactor: update root layout
false
diff --git a/web/index.html b/web/index.html index faa0ef6e21e45..a434cced813ac 100644 --- a/web/index.html +++ b/web/index.html @@ -18,7 +18,7 @@ } </script> </head> - <body class="text-base w-full min-h-[100svh] bg-zinc-100 dark:bg-zinc-900"> + <body class="text-base w-full min-h-[100svh] bg-zinc-50 dark:bg-zinc-900"> <div id="root" class="relative w-full min-h-full"></div> <script type="module" src="/src/main.tsx"></script> <!-- memos.metadata.body --> diff --git a/web/src/components/HomeSidebar/HomeSidebar.tsx b/web/src/components/HomeSidebar/HomeSidebar.tsx index a15567bfd65ce..b3b04092804a3 100644 --- a/web/src/components/HomeSidebar/HomeSidebar.tsx +++ b/web/src/components/HomeSidebar/HomeSidebar.tsx @@ -4,6 +4,7 @@ import StatisticsView from "@/components/StatisticsView"; import useCurrentUser from "@/hooks/useCurrentUser"; import { useMemoList, useUserStatsStore } from "@/store/v1"; import { cn } from "@/utils"; +import MemoFilters from "../MemoFilters"; import ShortcutsSection from "./ShortcutsSection"; import TagsSection from "./TagsSection"; @@ -25,13 +26,9 @@ const HomeSidebar = (props: Props) => { ); return ( - <aside - className={cn( - "relative w-full h-auto max-h-screen overflow-auto hide-scrollbar flex flex-col justify-start items-start", - props.className, - )} - > + <aside className={cn("relative w-full h-full overflow-auto hide-scrollbar flex flex-col justify-start items-start", props.className)}> <SearchBar /> + <MemoFilters /> <StatisticsView /> <ShortcutsSection /> <TagsSection /> diff --git a/web/src/components/MemoFilters.tsx b/web/src/components/MemoFilters.tsx index 4804c21668f5c..52bba068ca4f5 100644 --- a/web/src/components/MemoFilters.tsx +++ b/web/src/components/MemoFilters.tsx @@ -1,12 +1,10 @@ import { isEqual } from "lodash-es"; -import { CalendarIcon, CheckCircleIcon, CodeIcon, EyeIcon, FilterIcon, HashIcon, LinkIcon, SearchIcon, XIcon } from "lucide-react"; +import { CalendarIcon, CheckCircleIcon, CodeIcon, EyeIcon, HashIcon, LinkIcon, SearchIcon, XIcon } from "lucide-react"; import { useEffect, useRef } from "react"; import { useSearchParams } from "react-router-dom"; import { FilterFactor, getMemoFilterKey, MemoFilter, parseFilterQuery, stringifyFilters, useMemoFilterStore } from "@/store/v1"; -import { useTranslate } from "@/utils/i18n"; const MemoFilters = () => { - const t = useTranslate(); const [searchParams, setSearchParams] = useSearchParams(); const memoFilterStore = useMemoFilterStore(); const filters = memoFilterStore.filters; @@ -74,26 +72,20 @@ const MemoFilters = () => { } return ( - <div className="w-full mb-2 flex flex-row justify-start items-start gap-2"> - <span className="flex flex-row items-center gap-0.5 text-gray-500 text-sm leading-7 border border-transparent"> - <FilterIcon className="w-4 h-auto opacity-60 inline" /> - {t("memo.filters")} - </span> - <div className="flex flex-row justify-start items-center flex-wrap gap-x-2 gap-y-1 leading-7 h-7"> - {filters.map((filter) => ( - <div - key={getMemoFilterKey(filter)} - className="w-auto h-full flex flex-row items-center gap-1 bg-white dark:bg-zinc-800 border dark:border-zinc-700 pl-1.5 pr-1 rounded-md hover:line-through cursor-pointer" - onClick={() => memoFilterStore.removeFilter((f) => isEqual(f, filter))} - > - <FactorIcon className="w-4 h-auto text-gray-500 dark:text-gray-400 opacity-60" factor={filter.factor} /> - <span className="text-gray-500 dark:text-gray-400 text-sm max-w-32 truncate">{getFilterDisplayText(filter)}</span> - <button className="text-gray-500 dark:text-gray-300 opacity-60 hover:opacity-100"> - <XIcon className="w-4 h-auto" /> - </button> - </div> - ))} - </div> + <div className="w-full mt-3 flex flex-row justify-start items-center flex-wrap gap-x-2 gap-y-1"> + {filters.map((filter) => ( + <div + key={getMemoFilterKey(filter)} + className="w-auto leading-7 h-7 shrink-0 flex flex-row items-center gap-1 bg-white dark:bg-zinc-800 border dark:border-zinc-700 pl-1.5 pr-1 rounded-md hover:line-through cursor-pointer" + onClick={() => memoFilterStore.removeFilter((f) => isEqual(f, filter))} + > + <FactorIcon className="w-4 h-auto text-gray-500 dark:text-gray-400 opacity-60" factor={filter.factor} /> + <span className="text-gray-500 dark:text-gray-400 text-sm max-w-32 truncate">{getFilterDisplayText(filter)}</span> + <button className="text-gray-500 dark:text-gray-300 opacity-60 hover:opacity-100"> + <XIcon className="w-4 h-auto" /> + </button> + </div> + ))} </div> ); }; diff --git a/web/src/components/MobileHeader.tsx b/web/src/components/MobileHeader.tsx index 4f77a146852e6..055e448cc26aa 100644 --- a/web/src/components/MobileHeader.tsx +++ b/web/src/components/MobileHeader.tsx @@ -22,7 +22,7 @@ const MobileHeader = (props: Props) => { return ( <div className={cn( - "sticky top-0 pt-3 pb-2 sm:pt-2 px-4 sm:px-6 sm:mb-1 bg-zinc-100 dark:bg-zinc-900 bg-opacity-80 backdrop-blur-lg flex md:hidden flex-row justify-between items-center w-full h-auto flex-nowrap shrink-0 z-1", + "sticky top-0 pt-3 pb-2 sm:pt-2 px-4 sm:px-6 sm:mb-1 bg-zinc-50 dark:bg-zinc-900 bg-opacity-80 backdrop-blur-lg flex md:hidden flex-row justify-between items-center w-full h-auto flex-nowrap shrink-0 z-1", offsetTop > 0 && "shadow-md", className, )} diff --git a/web/src/components/StatisticsView.tsx b/web/src/components/StatisticsView.tsx index a49bd8f9ee60e..2914651e62e3d 100644 --- a/web/src/components/StatisticsView.tsx +++ b/web/src/components/StatisticsView.tsx @@ -42,7 +42,7 @@ const StatisticsView = () => { }; return ( - <div className="group w-full mt-4 space-y-1 text-gray-500 dark:text-gray-400"> + <div className="group w-full mt-3 space-y-1 text-gray-500 dark:text-gray-400"> <div className="w-full mb-1 flex flex-row justify-between items-center gap-1"> <div className="relative text-sm font-medium inline-flex flex-row items-center w-auto dark:text-gray-400 truncate"> <span className="truncate"> diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx index 4520f74a7a645..435720fa244b7 100644 --- a/web/src/components/UserBanner.tsx +++ b/web/src/components/UserBanner.tsx @@ -37,7 +37,7 @@ const UserBanner = (props: Props) => { <MenuButton disabled={!user} slots={{ root: "div" }}> <div className={cn( - "py-1 my-1 w-auto flex flex-row justify-start items-center cursor-pointer text-gray-800 dark:text-gray-400", + "py-1 w-auto flex flex-row justify-start items-center cursor-pointer text-gray-800 dark:text-gray-400", collapsed ? "px-1" : "px-3", )} > diff --git a/web/src/layouts/RootLayout.tsx b/web/src/layouts/RootLayout.tsx index 843bf29fb8f71..0c0e52763dc29 100644 --- a/web/src/layouts/RootLayout.tsx +++ b/web/src/layouts/RootLayout.tsx @@ -1,9 +1,5 @@ -import { Tooltip } from "@mui/joy"; -import { Button } from "@usememos/mui"; -import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; import { Suspense, useEffect, useMemo, useState } from "react"; import { Outlet, useLocation, useSearchParams } from "react-router-dom"; -import useLocalStorage from "react-use/lib/useLocalStorage"; import usePrevious from "react-use/lib/usePrevious"; import Navigation from "@/components/Navigation"; import useCurrentUser from "@/hooks/useCurrentUser"; @@ -12,16 +8,13 @@ import Loading from "@/pages/Loading"; import { Routes } from "@/router"; import { useMemoFilterStore } from "@/store/v1"; import { cn } from "@/utils"; -import { useTranslate } from "@/utils/i18n"; const RootLayout = () => { - const t = useTranslate(); const location = useLocation(); const [searchParams] = useSearchParams(); const { sm } = useResponsiveWidth(); const currentUser = useCurrentUser(); const memoFilterStore = useMemoFilterStore(); - const [collapsed, setCollapsed] = useLocalStorage<boolean>("navigation-collapsed", false); const [initialized, setInitialized] = useState(false); const pathname = useMemo(() => location.pathname, [location.pathname]); const prevPathname = usePrevious(pathname); @@ -47,34 +40,15 @@ const RootLayout = () => { <Loading /> ) : ( <div className="w-full min-h-full"> - <div className={cn("w-full transition-all mx-auto flex flex-row justify-center items-start", collapsed ? "sm:pl-16" : "sm:pl-56")}> + <div className={cn("w-full transition-all mx-auto flex flex-row justify-center items-start", "sm:pl-16")}> {sm && ( <div className={cn( - "group flex flex-col justify-start items-start fixed top-0 left-0 select-none border-r dark:border-zinc-800 h-full bg-zinc-50 dark:bg-zinc-800 dark:bg-opacity-40 transition-all hover:shadow-xl z-2", - collapsed ? "w-16 px-2" : "w-56 px-4", + "group flex flex-col justify-start items-start fixed top-0 left-0 select-none border-r dark:border-zinc-800 h-full bg-zinc-100 dark:bg-zinc-800 dark:bg-opacity-40 transition-all hover:shadow-xl z-2", + "w-16 px-2", )} > - <Navigation className="!h-auto" collapsed={collapsed} /> - <div className={cn("w-full grow h-auto flex flex-col justify-end", collapsed ? "items-center" : "items-start")}> - <div - className={cn("hidden py-3 group-hover:flex flex-col justify-center items-center")} - onClick={() => setCollapsed(!collapsed)} - > - {!collapsed ? ( - <Button className="rounded-xl" variant="plain"> - <ChevronLeftIcon className="w-5 h-auto opacity-70 mr-1" /> - {t("common.collapse")} - </Button> - ) : ( - <Tooltip title={t("common.expand")} placement="right" arrow> - <Button className="rounded-xl" variant="plain"> - <ChevronRightIcon className="w-5 h-auto opacity-70" /> - </Button> - </Tooltip> - )} - </div> - </div> + <Navigation collapsed={true} /> </div> )} <main className="w-full h-auto flex-grow shrink flex flex-col justify-start items-center"> diff --git a/web/src/pages/Explore.tsx b/web/src/pages/Explore.tsx index d52723b776aca..ffb184f1e3780 100644 --- a/web/src/pages/Explore.tsx +++ b/web/src/pages/Explore.tsx @@ -1,7 +1,6 @@ import dayjs from "dayjs"; import { useMemo } from "react"; import { ExploreSidebar, ExploreSidebarDrawer } from "@/components/ExploreSidebar"; -import MemoFilters from "@/components/MemoFilters"; import MemoView from "@/components/MemoView"; import MobileHeader from "@/components/MobileHeader"; import PagedMemoList from "@/components/PagedMemoList"; @@ -13,7 +12,7 @@ import { Memo } from "@/types/proto/api/v1/memo_service"; import { cn } from "@/utils"; const Explore = () => { - const { md } = useResponsiveWidth(); + const { md, lg } = useResponsiveWidth(); const user = useCurrentUser(); const memoFilterStore = useMemoFilterStore(); @@ -50,15 +49,25 @@ const Explore = () => { }, [user, memoFilterStore.filters, memoFilterStore.orderByTimeAsc]); return ( - <section className="@container w-full max-w-5xl min-h-full flex flex-col justify-start items-center sm:pt-3 md:pt-6 pb-8"> + <section className="@container w-full min-h-full flex flex-col justify-start items-center"> {!md && ( <MobileHeader> <ExploreSidebarDrawer /> </MobileHeader> )} - <div className={cn("w-full flex flex-row justify-start items-start px-4 sm:px-6 gap-4")}> - <div className={cn(md ? "w-[calc(100%-15rem)]" : "w-full")}> - <MemoFilters /> + <div className={cn("w-full min-h-full flex flex-row justify-start items-start")}> + {md && ( + <div + className={cn( + "sticky top-0 left-0 shrink-0 h-[100svh] transition-all", + "border-r border-gray-200 dark:border-zinc-800", + lg ? "px-5 w-72" : "px-4 w-56", + )} + > + <ExploreSidebar className={cn("py-6")} /> + </div> + )} + <div className={cn("w-full mx-auto px-4 sm:px-6 sm:pt-3 md:pt-6 pb-8", md && "max-w-3xl")}> <div className="flex flex-col justify-start items-start w-full max-w-full"> <PagedMemoList renderer={(memo: Memo) => <MemoView key={`${memo.name}-${memo.updateTime}`} memo={memo} showCreator showVisibility compact />} @@ -76,11 +85,6 @@ const Explore = () => { /> </div> </div> - {md && ( - <div className="sticky top-0 left-0 shrink-0 -mt-6 w-56 h-full"> - <ExploreSidebar className="py-6" /> - </div> - )} </div> </section> ); diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsx index baadaacc1fbea..7ef68802bc2bb 100644 --- a/web/src/pages/Home.tsx +++ b/web/src/pages/Home.tsx @@ -2,7 +2,6 @@ import dayjs from "dayjs"; import { useMemo } from "react"; import { HomeSidebar, HomeSidebarDrawer } from "@/components/HomeSidebar"; import MemoEditor from "@/components/MemoEditor"; -import MemoFilters from "@/components/MemoFilters"; import MemoView from "@/components/MemoView"; import MobileHeader from "@/components/MobileHeader"; import PagedMemoList from "@/components/PagedMemoList"; @@ -14,7 +13,7 @@ import { Memo } from "@/types/proto/api/v1/memo_service"; import { cn } from "@/utils"; const Home = () => { - const { md } = useResponsiveWidth(); + const { md, lg } = useResponsiveWidth(); const user = useCurrentUser(); const userStore = useUserStore(); const memoFilterStore = useMemoFilterStore(); @@ -53,16 +52,26 @@ const Home = () => { }, [user, memoFilterStore.filters, memoFilterStore.orderByTimeAsc]); return ( - <section className="@container w-full max-w-5xl min-h-full flex flex-col justify-start items-center sm:pt-3 md:pt-6 pb-8"> + <section className="@container w-full min-h-full flex flex-col justify-start items-center"> {!md && ( <MobileHeader> <HomeSidebarDrawer /> </MobileHeader> )} - <div className={cn("w-full flex flex-row justify-start items-start px-4 sm:px-6 gap-4")}> - <div className={cn(md ? "w-[calc(100%-15rem)]" : "w-full")}> + <div className={cn("w-full min-h-full flex flex-row justify-start items-start")}> + {md && ( + <div + className={cn( + "sticky top-0 left-0 shrink-0 h-[100svh] transition-all", + "border-r border-gray-200 dark:border-zinc-800", + lg ? "px-5 w-72" : "px-4 w-56", + )} + > + <HomeSidebar className={cn("py-6")} /> + </div> + )} + <div className={cn("w-full mx-auto px-4 sm:px-6 sm:pt-3 md:pt-6 pb-8", md && "max-w-3xl")}> <MemoEditor className="mb-2" cacheKey="home-memo-editor" /> - <MemoFilters /> <div className="flex flex-col justify-start items-start w-full max-w-full"> <PagedMemoList renderer={(memo: Memo) => <MemoView key={`${memo.name}-${memo.displayTime}`} memo={memo} showVisibility showPinned compact />} @@ -83,11 +92,6 @@ const Home = () => { /> </div> </div> - {md && ( - <div className="sticky top-0 left-0 shrink-0 -mt-6 w-56 h-full"> - <HomeSidebar className="py-6" /> - </div> - )} </div> </section> );
refactor
update root layout
465b173b368ab54d6c260bca5e8afd728169e350
2023-09-19 06:35:34
Steven
chore: fix resource int type
false
diff --git a/store/resource.go b/store/resource.go index 91c2c314f3f25..c2a660758a0c6 100644 --- a/store/resource.go +++ b/store/resource.go @@ -156,12 +156,12 @@ func (s *Store) ListResources(ctx context.Context, find *FindResource) ([]*Resou relatedMemoIDList := strings.Split(relatedMemoIDs.String, ",") if len(relatedMemoIDList) > 0 { // Only take the first related memo ID. - relatedMemoIDInt, err := strconv.Atoi(relatedMemoIDList[0]) + relatedMemoIDInt, err := strconv.ParseInt(relatedMemoIDList[0], 10, 32) if err != nil { return nil, err } - relatedMemoIDInt32 := int32(relatedMemoIDInt) - resource.RelatedMemoID = &relatedMemoIDInt32 + relatedMemoID := int32(relatedMemoIDInt) + resource.RelatedMemoID = &relatedMemoID } } list = append(list, &resource)
chore
fix resource int type
45cf1585081b3c38cb31af79cf63254cd85f1c28
2024-01-14 17:55:45
Steven
chore: fix max width of home section
false
diff --git a/web/public/logo.png b/web/public/logo.png index 029df083aa269..217b0c1402667 100644 Binary files a/web/public/logo.png and b/web/public/logo.png differ diff --git a/web/public/logo.webp b/web/public/logo.webp deleted file mode 100644 index b17f939bf351e..0000000000000 Binary files a/web/public/logo.webp and /dev/null differ diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsx index 292f9bf943c3f..c9c10dca40236 100644 --- a/web/src/pages/Home.tsx +++ b/web/src/pages/Home.tsx @@ -67,8 +67,8 @@ const Home = () => { <HomeSidebarDrawer /> </MobileHeader> )} - <div className={classNames("w-full flex flex-row justify-start items-start px-4 sm:px-6 gap-6")}> - <div className="w-full"> + <div className={classNames("w-full flex flex-row justify-start items-start px-4 sm:px-6 gap-4")}> + <div className={classNames(md ? "w-[calc(100%-15rem)]" : "w-full")}> <MemoEditor className="mb-2" cacheKey="home-memo-editor" /> <div className="flex flex-col justify-start items-start w-full max-w-full pb-28"> <MemoFilter />
chore
fix max width of home section
71ee299de7e14d55da97540579e34ca3e55970a1
2023-09-27 04:58:17
Steven
chore: drop shortcut
false
diff --git a/server/version/version.go b/server/version/version.go index 9b3833b16c157..82c89b85c690c 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -12,7 +12,7 @@ import ( var Version = "0.15.2" // DevVersion is the service current development version. -var DevVersion = "0.15.2" +var DevVersion = "0.16.0" func GetCurrentVersion(mode string) string { if mode == "dev" || mode == "demo" { diff --git a/store/db/migration/dev/LATEST__SCHEMA.sql b/store/db/migration/dev/LATEST__SCHEMA.sql index a3a909f1984d8..029bc40e9c371 100644 --- a/store/db/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/migration/dev/LATEST__SCHEMA.sql @@ -59,17 +59,6 @@ CREATE TABLE memo_organizer ( UNIQUE(memo_id, user_id) ); --- shortcut -CREATE TABLE shortcut ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - creator_id INTEGER NOT NULL, - created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), - updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), - row_status TEXT NOT NULL CHECK (row_status IN ('NORMAL', 'ARCHIVED')) DEFAULT 'NORMAL', - title TEXT NOT NULL DEFAULT '', - payload TEXT NOT NULL DEFAULT '{}' -); - -- resource CREATE TABLE resource ( id INTEGER PRIMARY KEY AUTOINCREMENT, diff --git a/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql b/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql index a4d780bca2b9a..5af8ad632f36c 100644 --- a/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql +++ b/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql @@ -8,6 +8,6 @@ SET memo_id = ( LIMIT 1 ); -DROP TABLE memo_resource; - CREATE INDEX idx_resource_memo_id ON resource (memo_id); + +DROP TABLE IF EXISTS memo_resource; diff --git a/store/db/migration/prod/0.16/01__drop_shortcut_table.sql b/store/db/migration/prod/0.16/01__drop_shortcut_table.sql new file mode 100644 index 0000000000000..d830a5b47197c --- /dev/null +++ b/store/db/migration/prod/0.16/01__drop_shortcut_table.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS shortcut;
chore
drop shortcut
c7378e78d9513600887f5fa982cde8b4bcd6cf11
2022-10-17 16:13:02
boojack
chore: update mask animation styles (#306)
false
diff --git a/web/src/less/siderbar.less b/web/src/less/siderbar.less index 5d38d30dab4a8..6c8070d493bf9 100644 --- a/web/src/less/siderbar.less +++ b/web/src/less/siderbar.less @@ -22,9 +22,9 @@ } .mask { - @apply fixed top-0 right-0 w-screen h-screen bg-transparent transition-all duration-300 z-0 sm:hidden; + @apply fixed top-0 left-0 w-screen h-screen bg-black opacity-0 transition-opacity duration-300 pointer-events-none z-20 sm:hidden; &.show { - @apply z-20 bg-black opacity-60; + @apply opacity-60 pointer-events-auto; } }
chore
update mask animation styles (#306)
a41745c9ae15d81d645d59f57a21f2ae59799b6c
2022-12-18 08:32:42
Zeng1998
feat: editor enhancement for order list (#763)
false
diff --git a/web/src/components/Editor/Editor.tsx b/web/src/components/Editor/Editor.tsx index 8c27dd27a336c..110accd645733 100644 --- a/web/src/components/Editor/Editor.tsx +++ b/web/src/components/Editor/Editor.tsx @@ -1,5 +1,4 @@ import { forwardRef, ReactNode, useCallback, useEffect, useImperativeHandle, useRef } from "react"; -import useRefresh from "../../hooks/useRefresh"; import "../../less/editor.less"; export interface EditorRefActions { @@ -10,6 +9,7 @@ export interface EditorRefActions { getContent: () => string; getSelectedContent: () => string; getCursorPosition: () => number; + setCursorPosition: (pos: number) => void; } interface Props { @@ -25,7 +25,6 @@ interface Props { const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<EditorRefActions>) { const { className, initialContent, placeholder, fullscreen, onPaste, onContentChange: handleContentChangeCallback } = props; const editorRef = useRef<HTMLTextAreaElement>(null); - const refresh = useRefresh(); useEffect(() => { if (editorRef.current && initialContent) { @@ -36,10 +35,16 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< useEffect(() => { if (editorRef.current && !fullscreen) { + updateEditorHeight(); + } + }, [editorRef.current?.value, fullscreen]); + + const updateEditorHeight = () => { + if (editorRef.current) { editorRef.current.style.height = "auto"; editorRef.current.style.height = (editorRef.current.scrollHeight ?? 0) + "px"; } - }, [editorRef.current?.value, fullscreen]); + }; useImperativeHandle( ref, @@ -66,7 +71,7 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< editorRef.current.focus(); editorRef.current.selectionEnd = endPosition + prefix.length + content.length; handleContentChangeCallback(editorRef.current.value); - refresh(); + updateEditorHeight(); }, removeText: (start: number, length: number) => { if (!editorRef.current) { @@ -79,14 +84,14 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< editorRef.current.focus(); editorRef.current.selectionEnd = start; handleContentChangeCallback(editorRef.current.value); - refresh(); + updateEditorHeight(); }, setContent: (text: string) => { if (editorRef.current) { editorRef.current.value = text; editorRef.current.focus(); handleContentChangeCallback(editorRef.current.value); - refresh(); + updateEditorHeight(); } }, getContent: (): string => { @@ -100,13 +105,16 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< const end = editorRef.current?.selectionEnd; return editorRef.current?.value.slice(start, end) ?? ""; }, + setCursorPosition: (pos: number) => { + editorRef.current?.setSelectionRange(pos, pos); + }, }), [] ); const handleEditorInput = useCallback(() => { handleContentChangeCallback(editorRef.current?.value ?? ""); - refresh(); + updateEditorHeight(); }, []); return ( diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index 120a65089b754..04f946061ce9b 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -15,6 +15,7 @@ import showResourcesSelectorDialog from "./ResourcesSelectorDialog"; import "../less/memo-editor.less"; const listItemSymbolList = ["- [ ] ", "- [x] ", "- [X] ", "* ", "- "]; +const emptyOlReg = /^([1-9][0-9]*)\. $/; const getEditorContentCache = (): string => { return storage.get(["editorContentCache"]).editorContentCache ?? ""; @@ -124,17 +125,52 @@ const MemoEditor = () => { const contentBeforeCursor = editorRef.current.getContent().slice(0, cursorPosition); const rowValue = last(contentBeforeCursor.split("\n")); if (rowValue) { - if (listItemSymbolList.includes(rowValue)) { + if (listItemSymbolList.includes(rowValue) || emptyOlReg.test(rowValue)) { event.preventDefault(); editorRef.current.removeText(cursorPosition - rowValue.length, rowValue.length); } else { + // unordered list / checked list + let matched = false; for (const listItemSymbol of listItemSymbolList) { if (rowValue.startsWith(listItemSymbol)) { event.preventDefault(); editorRef.current.insertText("", `\n${listItemSymbol}`); + matched = true; break; } } + if (!matched) { + // ordered list + const olReg = /^([1-9][0-9]*)\. /; + const olRes = olReg.exec(rowValue); + if (olRes) { + let order = parseInt(olRes[1]) + 1; + event.preventDefault(); + const contentAfterCursor = editorRef.current.getContent().slice(cursorPosition); + editorRef.current.insertText("", `\n${order}. `); + if (contentAfterCursor) { + // correct the order + order++; + const nextRows = contentAfterCursor.split("\n").slice(1); + const rowStart = contentBeforeCursor.split("\n").length + 1; + const content = editorRef.current.getContent().split("\n"); + let updated = false; + for (let i = 0; i < nextRows.length; i++) { + const rowRes = olReg.exec(nextRows[i]); + if (rowRes) { + content[rowStart + i] = nextRows[i].replace(rowRes[1], (order + i).toString()); + updated = true; + } else { + break; + } + } + if (updated) { + editorRef.current.setContent(content.join("\n")); + editorRef.current.setCursorPosition(cursorPosition + 4); + } + } + } + } } } return; diff --git a/web/src/hooks/useRefresh.ts b/web/src/hooks/useRefresh.ts deleted file mode 100644 index e892d9b65f5d9..0000000000000 --- a/web/src/hooks/useRefresh.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useCallback, useState } from "react"; - -const useRefresh = () => { - const [, setBoolean] = useState<boolean>(false); - - const refresh = useCallback(() => { - setBoolean((ps) => { - return !ps; - }); - }, []); - - return refresh; -}; - -export default useRefresh;
feat
editor enhancement for order list (#763)
2517ea5148309211a485404d55aeaa15d92fb8a6
2022-05-02 08:39:29
boojack
chore: update readme with demo screenshot
false
diff --git a/README.md b/README.md index fc2e01b038e5e..39708711d0458 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ <img alt="GitHub Watchers" src="https://img.shields.io/github/watchers/justmemos/memos" /> </p> +![demo](https://raw.githubusercontent.com/justmemos/memos/main/resources/demo.webp) + Memos is an open source, self-hosted alternative to [flomo](https://flomoapp.com/). Built with `Go` and `React`. Making sure that you are in charge of your data and more customizations.
chore
update readme with demo screenshot
ea6628066d07c0020b986c4a3c1aca28f13eea05
2024-03-29 06:46:55
Steven
chore: update sidebar components
false
diff --git a/server/route/api/v2/tag_service.go b/server/route/api/v2/tag_service.go index 35f75fe16a456..431c596d39961 100644 --- a/server/route/api/v2/tag_service.go +++ b/server/route/api/v2/tag_service.go @@ -51,22 +51,13 @@ func (s *APIV2Service) BatchUpsertTag(ctx context.Context, request *apiv2pb.Batc } func (s *APIV2Service) ListTags(ctx context.Context, request *apiv2pb.ListTagsRequest) (*apiv2pb.ListTagsResponse, error) { + tagFind := &store.FindTag{} userID, err := ExtractUserIDFromName(request.User) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err) } - user, err := s.Store.GetUser(ctx, &store.FindUser{ - ID: &userID, - }) - if err != nil { - return nil, status.Errorf(codes.Internal, "failed to get user: %v", err) - } - if user == nil { - return nil, status.Errorf(codes.NotFound, "user not found") - } - tags, err := s.Store.ListTags(ctx, &store.FindTag{ - CreatorID: user.ID, - }) + tagFind.CreatorID = userID + tags, err := s.Store.ListTags(ctx, tagFind) if err != nil { return nil, status.Errorf(codes.Internal, "failed to list tags: %v", err) } diff --git a/web/src/components/ExploreSidebar/ExploreSidebar.tsx b/web/src/components/ExploreSidebar/ExploreSidebar.tsx index 3b2a8a6ac9d46..ab2744f55b14d 100644 --- a/web/src/components/ExploreSidebar/ExploreSidebar.tsx +++ b/web/src/components/ExploreSidebar/ExploreSidebar.tsx @@ -1,6 +1,6 @@ import classNames from "classnames"; import SearchBar from "@/components/SearchBar"; -import UserList from "../UserList"; +import UsersSection from "./UsersSection"; interface Props { className?: string; @@ -15,7 +15,7 @@ const ExploreSidebar = (props: Props) => { )} > <SearchBar /> - <UserList /> + <UsersSection /> </aside> ); }; diff --git a/web/src/components/UserList.tsx b/web/src/components/ExploreSidebar/UsersSection.tsx similarity index 93% rename from web/src/components/UserList.tsx rename to web/src/components/ExploreSidebar/UsersSection.tsx index 25f2568ec5320..f4bb02513f34e 100644 --- a/web/src/components/UserList.tsx +++ b/web/src/components/ExploreSidebar/UsersSection.tsx @@ -3,10 +3,10 @@ import { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import { useUserStore } from "@/store/v1"; import { User } from "@/types/proto/api/v2/user_service"; -import Icon from "./Icon"; -import UserAvatar from "./UserAvatar"; +import Icon from "../Icon"; +import UserAvatar from "../UserAvatar"; -const UserList = () => { +const UsersSection = () => { const userStore = useUserStore(); const [users, setUsers] = useState<User[]>([]); @@ -48,4 +48,4 @@ const UserList = () => { ); }; -export default UserList; +export default UsersSection; diff --git a/web/src/components/HomeSidebar/HomeSidebar.tsx b/web/src/components/HomeSidebar/HomeSidebar.tsx index c0fec52dd5e5c..d6fca6fcf8a95 100644 --- a/web/src/components/HomeSidebar/HomeSidebar.tsx +++ b/web/src/components/HomeSidebar/HomeSidebar.tsx @@ -1,8 +1,8 @@ import classNames from "classnames"; import PersonalStatistics from "@/components/PersonalStatistics"; import SearchBar from "@/components/SearchBar"; -import TagList from "@/components/TagList"; import useCurrentUser from "@/hooks/useCurrentUser"; +import TagsSection from "./TagsSection"; interface Props { className?: string; @@ -20,7 +20,7 @@ const HomeSidebar = (props: Props) => { > <SearchBar /> <PersonalStatistics user={currentUser} /> - <TagList /> + <TagsSection /> </aside> ); }; diff --git a/web/src/components/TagList.tsx b/web/src/components/HomeSidebar/TagsSection.tsx similarity index 95% rename from web/src/components/TagList.tsx rename to web/src/components/HomeSidebar/TagsSection.tsx index 2ad1c4047fd3a..a45c8d35a5182 100644 --- a/web/src/components/TagList.tsx +++ b/web/src/components/HomeSidebar/TagsSection.tsx @@ -4,10 +4,10 @@ import useToggle from "react-use/lib/useToggle"; import { useFilterStore, useTagStore } from "@/store/module"; import { useMemoList } from "@/store/v1"; import { useTranslate } from "@/utils/i18n"; -import showCreateTagDialog from "./CreateTagDialog"; -import { showCommonDialog } from "./Dialog/CommonDialog"; -import Icon from "./Icon"; -import showRenameTagDialog from "./RenameTagDialog"; +import showCreateTagDialog from "../CreateTagDialog"; +import { showCommonDialog } from "../Dialog/CommonDialog"; +import Icon from "../Icon"; +import showRenameTagDialog from "../RenameTagDialog"; interface KVObject<T = any> { [key: string]: T; @@ -19,7 +19,7 @@ interface Tag { subTags: Tag[]; } -const TagList = () => { +const TagsSection = () => { const t = useTranslate(); const filterStore = useFilterStore(); const tagStore = useTagStore(); @@ -195,4 +195,4 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain ); }; -export default TagList; +export default TagsSection; diff --git a/web/src/components/TimelineSidebar.tsx b/web/src/components/TimelineSidebar/TimelineSidebar.tsx similarity index 78% rename from web/src/components/TimelineSidebar.tsx rename to web/src/components/TimelineSidebar/TimelineSidebar.tsx index 483e12d6bc9ea..bd670d8e02847 100644 --- a/web/src/components/TimelineSidebar.tsx +++ b/web/src/components/TimelineSidebar/TimelineSidebar.tsx @@ -1,6 +1,6 @@ import classNames from "classnames"; -import SearchBar from "./SearchBar"; -import TagList from "./TagList"; +import TagsSection from "../HomeSidebar/TagsSection"; +import SearchBar from "../SearchBar"; interface Props { className?: string; @@ -15,7 +15,7 @@ const TimelineSidebar = (props: Props) => { )} > <SearchBar /> - <TagList /> + <TagsSection /> </aside> ); }; diff --git a/web/src/components/TimelineSidebarDrawer.tsx b/web/src/components/TimelineSidebar/TimelineSidebarDrawer.tsx similarity index 97% rename from web/src/components/TimelineSidebarDrawer.tsx rename to web/src/components/TimelineSidebar/TimelineSidebarDrawer.tsx index a281f99ffee9d..175c102ac67df 100644 --- a/web/src/components/TimelineSidebarDrawer.tsx +++ b/web/src/components/TimelineSidebar/TimelineSidebarDrawer.tsx @@ -1,7 +1,7 @@ import { Drawer, IconButton } from "@mui/joy"; import { useEffect, useState } from "react"; import { useLocation } from "react-router-dom"; -import Icon from "./Icon"; +import Icon from "../Icon"; import TimelineSidebar from "./TimelineSidebar"; const TimelineSidebarDrawer = () => { diff --git a/web/src/components/TimelineSidebar/index.ts b/web/src/components/TimelineSidebar/index.ts new file mode 100644 index 0000000000000..b5dbfcf585101 --- /dev/null +++ b/web/src/components/TimelineSidebar/index.ts @@ -0,0 +1,4 @@ +import TimelineSidebar from "./TimelineSidebar"; +import TimelineSidebarDrawer from "./TimelineSidebarDrawer"; + +export { TimelineSidebar, TimelineSidebarDrawer }; diff --git a/web/src/pages/Timeline.tsx b/web/src/pages/Timeline.tsx index a4048d35ad179..9560163793253 100644 --- a/web/src/pages/Timeline.tsx +++ b/web/src/pages/Timeline.tsx @@ -8,8 +8,7 @@ import showMemoEditorDialog from "@/components/MemoEditor/MemoEditorDialog"; import MemoFilter from "@/components/MemoFilter"; import MemoView from "@/components/MemoView"; import MobileHeader from "@/components/MobileHeader"; -import TimelineSidebar from "@/components/TimelineSidebar"; -import TimelineSidebarDrawer from "@/components/TimelineSidebarDrawer"; +import { TimelineSidebar, TimelineSidebarDrawer } from "@/components/TimelineSidebar"; import { memoServiceClient } from "@/grpcweb"; import { DAILY_TIMESTAMP, DEFAULT_LIST_MEMOS_PAGE_SIZE } from "@/helpers/consts"; import { getNormalizedTimeString, getTimeStampByDate } from "@/helpers/datetime";
chore
update sidebar components
5e069f79a2ad516e0f1062eeb6686b282606f9d2
2022-11-22 17:24:25
Zeng1998
feat: esc to cancel editing (#532)
false
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index 6c547c917dd4b..d9678c265f224 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -99,8 +99,12 @@ const MemoEditor = () => { }, [editorState.editMemoId]); const handleKeyDown = (event: React.KeyboardEvent) => { - if (event.key === "Escape" && state.fullscreen) { - handleFullscreenBtnClick(); + if (event.key === "Escape") { + if (state.fullscreen) { + handleFullscreenBtnClick(); + } else { + handleCancelEdit(); + } return; } if (event.key === "Tab") {
feat
esc to cancel editing (#532)
f221f9bfe96f4af22ddcf0f45bd0503aa42d6c0c
2024-04-16 04:38:40
dependabot[bot]
chore: bump i18next from 23.11.1 to 23.11.2 in /web (#3235) Bumps [i18next](https://github.com/i18next/i18next) from 23.11.1 to 23.11.2. - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v23.11.1...v23.11.2) --- updated-dependencies: - dependency-name: i18next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/web/package.json b/web/package.json index 68f99113f4358..6fac7e35ee6aa 100644 --- a/web/package.json +++ b/web/package.json @@ -18,7 +18,7 @@ "copy-to-clipboard": "^3.3.3", "fuse.js": "^7.0.0", "highlight.js": "^11.9.0", - "i18next": "^23.11.1", + "i18next": "^23.11.2", "katex": "^0.16.10", "lodash-es": "^4.17.21", "lucide-react": "^0.368.0", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 402aa8f8cb48e..a8e947b234f75 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -36,8 +36,8 @@ dependencies: specifier: ^11.9.0 version: 11.9.0 i18next: - specifier: ^23.11.1 - version: 23.11.1 + specifier: ^23.11.2 + version: 23.11.2 katex: specifier: ^0.16.10 version: 0.16.10 @@ -61,7 +61,7 @@ dependencies: version: 2.4.1(csstype@3.1.3)(react-dom@18.2.0)(react@18.2.0) react-i18next: specifier: ^14.1.0 - version: 14.1.0(i18next@23.11.1)(react-dom@18.2.0)(react@18.2.0) + version: 14.1.0(i18next@23.11.2)(react-dom@18.2.0)(react@18.2.0) react-redux: specifier: ^9.1.1 version: 9.1.1(@types/react@18.2.75)(react@18.2.0)(redux@5.0.1) @@ -3363,8 +3363,8 @@ packages: resolution: {integrity: sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==} dev: false - /i18next@23.11.1: - resolution: {integrity: sha512-mXw4A24BiPZKRsbb9ewgSvjYd6fxFCNwJyfK6nYfSTIAX2GkCWcb598m3DFkDZmqADatvuASrKo6qwORz3VwTQ==} + /i18next@23.11.2: + resolution: {integrity: sha512-qMBm7+qT8jdpmmDw/kQD16VpmkL9BdL+XNAK5MNbNFaf1iQQq35ZbPrSlqmnNPOSUY4m342+c0t0evinF5l7sA==} dependencies: '@babel/runtime': 7.24.4 dev: false @@ -4542,7 +4542,7 @@ packages: - csstype dev: false - /react-i18next@14.1.0(i18next@23.11.1)(react-dom@18.2.0)(react@18.2.0): + /react-i18next@14.1.0(i18next@23.11.2)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-3KwX6LHpbvGQ+sBEntjV4sYW3Zovjjl3fpoHbUwSgFHf0uRBcbeCBLR5al6ikncI5+W0EFb71QXZmfop+J6NrQ==} peerDependencies: i18next: '>= 23.2.3' @@ -4557,7 +4557,7 @@ packages: dependencies: '@babel/runtime': 7.24.4 html-parse-stringify: 3.0.1 - i18next: 23.11.1 + i18next: 23.11.2 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false
chore
bump i18next from 23.11.1 to 23.11.2 in /web (#3235) Bumps [i18next](https://github.com/i18next/i18next) from 23.11.1 to 23.11.2. - [Release notes](https://github.com/i18next/i18next/releases) - [Changelog](https://github.com/i18next/i18next/blob/master/CHANGELOG.md) - [Commits](https://github.com/i18next/i18next/compare/v23.11.1...v23.11.2) --- updated-dependencies: - dependency-name: i18next dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9b5a555d1f9231def1a186f1baf9287ffeba324a
2022-07-15 20:19:22
boojack
chore: release `v0.2.1` (#120) * chore: release `v0.2.1` * chore: add tg group link
false
diff --git a/README.md b/README.md index c8937149d2374..99b9b56f9bc85 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ <p align="center"> <a href="https://memos.onrender.com/">Live Demo</a> • - <a href="https://github.com/usememos/memos/discussions">Discussions</a> + <a href="https://t.me/+-_tNF1k70UU4ZTc9">Discuss in Telegram</a> + </p> ![demo](https://raw.githubusercontent.com/usememos/memos/main/resources/demo.webp) diff --git a/common/version.go b/common/version.go index fa4ac24fb344c..30fcc0d6cd82d 100644 --- a/common/version.go +++ b/common/version.go @@ -7,10 +7,10 @@ import ( // Version is the service current released version. // Semantic versioning: https://semver.org/ -var Version = "0.2.0" +var Version = "0.2.1" // DevVersion is the service current development version. -var DevVersion = "0.2.0" +var DevVersion = "0.2.1" func GetCurrentVersion(mode string) string { if mode == "dev" { diff --git a/web/package.json b/web/package.json index e7f3c15e9e6c1..08459b360f5da 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "memos", - "version": "0.2.0", + "version": "0.2.1", "scripts": { "dev": "vite", "build": "tsc && vite build",
chore
release `v0.2.1` (#120) * chore: release `v0.2.1` * chore: add tg group link
ba8e1e5dc2d8bf3529ace5414a5e51139806d525
2023-05-21 09:20:57
boojack
chore: add available generator amount flag (#1696)
false
diff --git a/server/resource.go b/server/resource.go index b8e6fd7a3efec..d59cc1054d464 100644 --- a/server/resource.go +++ b/server/resource.go @@ -501,12 +501,22 @@ func replacePathTemplate(path string, filename string) string { return path } +var availableGeneratorAmount = 32 + func getOrGenerateThumbnailImage(srcBlob []byte, dstPath string) ([]byte, error) { if _, err := os.Stat(dstPath); err != nil { if !errors.Is(err, os.ErrNotExist) { return nil, errors.Wrap(err, "failed to check thumbnail image stat") } + if availableGeneratorAmount <= 0 { + return nil, errors.New("not enough available generator amount") + } + availableGeneratorAmount-- + defer func() { + availableGeneratorAmount++ + }() + reader := bytes.NewReader(srcBlob) src, err := imaging.Decode(reader) if err != nil {
chore
add available generator amount flag (#1696)
db3457e0810f1ffe51c2b8741e7d1bf0178c0c4b
2024-01-26 06:00:22
Steven
chore: bump version
false
diff --git a/server/version/version.go b/server/version/version.go index 68b8111076c8a..a5a318039926a 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -12,7 +12,7 @@ import ( var Version = "0.19.0" // DevVersion is the service current development version. -var DevVersion = "0.18.2" +var DevVersion = "0.19.0" func GetCurrentVersion(mode string) string { if mode == "dev" || mode == "demo" {
chore
bump version
2322f989ea736a443d38ac3aae178787ca12c407
2025-02-02 07:10:04
dependabot[bot]
chore: bump actions/stale from 9.0.0 to 9.1.0 (#4344) Bumps [actions/stale](https://github.com/actions/stale) from 9.0.0 to 9.1.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v9.0.0...v9.1.0) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f787269dbf50d..548fd790967e5 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,7 +11,7 @@ jobs: issues: write steps: - - uses: actions/stale@v9.0.0 + - uses: actions/stale@v9.1.0 with: days-before-issue-stale: 14 days-before-issue-close: 7
chore
bump actions/stale from 9.0.0 to 9.1.0 (#4344) Bumps [actions/stale](https://github.com/actions/stale) from 9.0.0 to 9.1.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v9.0.0...v9.1.0) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
781b1f7b3ab6f06cf4c236fbdbf48b0380887531
2023-06-14 18:33:38
David Angel
chore: add classnames for easy logo/server name customizations via CSS. (#1828) Update MemoDetail.tsx
false
diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index 19994e1de0627..88954c924ac6d 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -48,9 +48,9 @@ const MemoDetail = () => { <section className="relative top-0 w-full h-full overflow-y-auto overflow-x-hidden bg-zinc-100 dark:bg-zinc-800"> <div className="relative w-full min-h-full mx-auto flex flex-col justify-start items-center pb-6"> <div className="max-w-2xl w-full flex flex-row justify-center items-center px-4 py-2 mt-2 bg-zinc-100 dark:bg-zinc-800"> - <div className="flex flex-row justify-start items-center"> - <img className="h-10 w-auto rounded-lg mr-2" src={customizedProfile.logoUrl} alt="" /> - <p className="text-4xl tracking-wide text-black dark:text-white">{customizedProfile.name}</p> + <div className="detail-header flex flex-row justify-start items-center"> + <img className="detail-logo h-10 w-auto rounded-lg mr-2" src={customizedProfile.logoUrl} alt="" /> + <p className="detail-name text-4xl tracking-wide text-black dark:text-white">{customizedProfile.name}</p> </div> </div> {!loadingState.isLoading && (
chore
add classnames for easy logo/server name customizations via CSS. (#1828) Update MemoDetail.tsx
d68891d91d6a086259eb5fc67e5a5df3d6d86bbb
2022-09-05 17:45:34
Steven
chore: fix tag regex
false
diff --git a/server/tag.go b/server/tag.go index f8ac6e0d49a0c..d782422679125 100644 --- a/server/tag.go +++ b/server/tag.go @@ -12,6 +12,8 @@ import ( "github.com/labstack/echo/v4" ) +var tagRegexp = regexp.MustCompile(`#([^\s#]+?) `) + func (s *Server) registerTagRoutes(g *echo.Group) { g.GET("/tag", func(c echo.Context) error { ctx := c.Request().Context() @@ -47,13 +49,9 @@ func (s *Server) registerTagRoutes(g *echo.Group) { tagMapSet := make(map[string]bool) - r := regexp.MustCompile(`#([^\s#]+?) `) - if err != nil { - return echo.NewHTTPError(http.StatusInternalServerError, "Failed to compile regexp").SetInternal(err) - } for _, memo := range memoList { - for _, rawTag := range r.FindAllString(memo.Content, -1) { - tag := r.ReplaceAllString(rawTag, "$1") + for _, rawTag := range tagRegexp.FindAllString(memo.Content, -1) { + tag := tagRegexp.ReplaceAllString(rawTag, "$1") tagMapSet[tag] = true } } diff --git a/web/src/helpers/marked.ts b/web/src/helpers/marked.ts index 28acd1cdde8b7..01c35548f61a4 100644 --- a/web/src/helpers/marked.ts +++ b/web/src/helpers/marked.ts @@ -18,8 +18,6 @@ export const MEMO_LINK_REG = /@\[(.+?)\]\((.+?)\)/g; const parseMarkedToHtml = (markedStr: string): string => { const htmlText = markedStr - .replace(/([\u4e00-\u9fa5])([A-Za-z0-9?.,;[\]]+)/g, "$1 $2") - .replace(/([A-Za-z0-9?.,;[\]]+)([\u4e00-\u9fa5])/g, "$1 $2") .replace(CODE_BLOCK_REG, "<pre lang=''>$1</pre>") .replace(TODO_BLOCK_REG, "<span class='todo-block todo' data-value='TODO'></span>") .replace(DONE_BLOCK_REG, "<span class='todo-block done' data-value='DONE'>✓</span>")
chore
fix tag regex
2a7104e56486339e6ee253de043625c4c68dc109
2023-07-15 07:30:35
Felipe Martínez
fix: exclude commas in tags (#1957)
false
diff --git a/api/v1/tag.go b/api/v1/tag.go index c6188ef9d0d83..acd8407b40522 100644 --- a/api/v1/tag.go +++ b/api/v1/tag.go @@ -176,7 +176,7 @@ func convertTagFromStore(tag *store.Tag) *Tag { } } -var tagRegexp = regexp.MustCompile(`#([^\s#]+)`) +var tagRegexp = regexp.MustCompile(`#([^\s#,]+)`) func findTagListFromMemoContent(memoContent string) []string { tagMapSet := make(map[string]bool) diff --git a/web/src/labs/marked/parser/Tag.tsx b/web/src/labs/marked/parser/Tag.tsx index 5e74b5f42cf6f..95e197a8a0645 100644 --- a/web/src/labs/marked/parser/Tag.tsx +++ b/web/src/labs/marked/parser/Tag.tsx @@ -1,6 +1,6 @@ import { matcher } from "../matcher"; -export const TAG_REG = /#([^\s#]+)/; +export const TAG_REG = /#([^\s#,]+)/; const renderer = (rawStr: string) => { const matchResult = matcher(rawStr, TAG_REG);
fix
exclude commas in tags (#1957)
76d955a69a5ecabc5b6440dda7fa70425ce87900
2023-10-27 18:51:52
Athurg Gooth
chore: docker compose dev (#2458) * add golang build cache volume to speedup build * replace `lint` with `npm` to run more scripts * wrap golangci-lint as entrypoint instead of command
false
diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml index 5cc8de6288b02..2c1e07d978965 100644 --- a/docker-compose.dev.yaml +++ b/docker-compose.dev.yaml @@ -12,6 +12,7 @@ services: - "MEMOS_DRIVER=mysql" volumes: - .:/work/ + - .air/go-build:/root/.cache/go-build - $HOME/go/pkg/:/go/pkg/ # Cache for go mod shared with the host web: image: node:18-alpine @@ -50,17 +51,20 @@ services: profiles: ["tools"] image: golangci/golangci-lint:v1.54.2 working_dir: /work/ - command: golangci-lint run -v + entrypoint: golangci-lint + command: run -v volumes: - $HOME/go/pkg/:/go/pkg/ # Cache for go mod shared with the host + - .air/go-build:/root/.cache/go-build - .:/work/ - # Do javascript lint before create PR - lint: + # run npm + npm: profiles: ["tools"] image: node:18-alpine working_dir: /work - command: npm --no-update-notifier run lint + environment: ["NPM_CONFIG_UPDATE_NOTIFIER=false"] + entrypoint: "npm" volumes: - ./web:/work - ./.air/node_modules/:/work/node_modules/
chore
docker compose dev (#2458) * add golang build cache volume to speedup build * replace `lint` with `npm` to run more scripts * wrap golangci-lint as entrypoint instead of command
d000083b4126ec436b6662c402fed165b9a4769f
2023-07-23 16:47:18
Ajay Kumbhare
fix: hashtag filter for Unicode characters (#2017)
false
diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index c8ea860269a06..d4e07ab63d869 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -43,7 +43,7 @@ const MemoList: React.FC<Props> = (props: Props) => { } if (tagQuery) { const tagsSet = new Set<string>(); - for (const t of Array.from(memo.content.match(new RegExp(TAG_REG, "g")) ?? [])) { + for (const t of Array.from(memo.content.match(new RegExp(TAG_REG, "gu")) ?? [])) { const tag = t.replace(TAG_REG, "$1").trim(); const items = tag.split("/"); let temp = "";
fix
hashtag filter for Unicode characters (#2017)
7b7061846c63d4e3377128e13a1d5a149e2c5eae
2023-02-27 17:20:43
Zeng1998
chore: open url in other tabs (#1173) * chore: open url in other tabs * update: add `rel="noreferrer"`
false
diff --git a/web/src/components/AboutSiteDialog.tsx b/web/src/components/AboutSiteDialog.tsx index 3c171edf3c3cb..9bddc6bf52449 100644 --- a/web/src/components/AboutSiteDialog.tsx +++ b/web/src/components/AboutSiteDialog.tsx @@ -32,7 +32,12 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => { <div className="mt-4 flex flex-row text-sm justify-start items-center"> <div className="flex flex-row justify-start items-center mr-2"> Powered by - <a href="https://usememos.com" className="flex flex-row justify-start items-center mr-1 hover:underline"> + <a + href="https://usememos.com" + target="_blank" + rel="noreferrer" + className="flex flex-row justify-start items-center mr-1 hover:underline" + > <img className="w-6 h-auto" src="/logo.png" alt="" /> memos </a> @@ -42,7 +47,12 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => { </div> <div className="border-t mt-3 pt-2 text-sm flex flex-row justify-start items-center"> <span className="text-gray-500 mr-2">Other projects:</span> - <a href="https://github.com/boojack/sticky-notes" className="flex items-center underline text-blue-600 hover:opacity-80"> + <a + href="https://github.com/boojack/sticky-notes" + target="_blank" + rel="noreferrer" + className="flex items-center underline text-blue-600 hover:opacity-80" + > <img className="w-4 h-auto mr-1" src="https://raw.githubusercontent.com/boojack/sticky-notes/main/public/sticky-notes.ico" diff --git a/web/src/components/GitHubBadge.tsx b/web/src/components/GitHubBadge.tsx index b8c328adf155f..ee434240ad188 100644 --- a/web/src/components/GitHubBadge.tsx +++ b/web/src/components/GitHubBadge.tsx @@ -15,6 +15,8 @@ const GitHubBadge = () => { <a className="h-7 flex flex-row justify-start items-center border dark:border-zinc-600 rounded cursor-pointer hover:opacity-80" href="https://github.com/usememos/memos" + target="_blank" + rel="noreferrer" > <div className="apply w-auto h-full px-2 flex flex-row justify-center items-center text-xs bg-gray-100 dark:bg-zinc-700"> <Icon.Github className="mr-1 w-4 h-4" />
chore
open url in other tabs (#1173) * chore: open url in other tabs * update: add `rel="noreferrer"`
1542f3172a1294cf166f42c0a4f7e7372f415752
2023-10-03 07:09:39
Steven
chore: update tag service
false
diff --git a/api/v2/tag_service.go b/api/v2/tag_service.go index d421987d3d99f..44700be9054b1 100644 --- a/api/v2/tag_service.go +++ b/api/v2/tag_service.go @@ -23,6 +23,25 @@ func NewTagService(store *store.Store) *TagService { } } +func (s *TagService) UpsertTag(ctx context.Context, request *apiv2pb.UpsertTagRequest) (*apiv2pb.UpsertTagResponse, error) { + user, err := getCurrentUser(ctx, s.Store) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to get user") + } + + tag, err := s.Store.UpsertTag(ctx, &store.Tag{ + Name: request.Name, + CreatorID: user.ID, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to upsert tag: %v", err) + } + + return &apiv2pb.UpsertTagResponse{ + Tag: convertTagFromStore(tag), + }, nil +} + func (s *TagService) ListTags(ctx context.Context, request *apiv2pb.ListTagsRequest) (*apiv2pb.ListTagsResponse, error) { tags, err := s.Store.ListTags(ctx, &store.FindTag{ CreatorID: request.CreatorId, @@ -38,6 +57,18 @@ func (s *TagService) ListTags(ctx context.Context, request *apiv2pb.ListTagsRequ return response, nil } +func (s *TagService) DeleteTag(ctx context.Context, request *apiv2pb.DeleteTagRequest) (*apiv2pb.DeleteTagResponse, error) { + err := s.Store.DeleteTag(ctx, &store.DeleteTag{ + Name: request.Tag.Name, + CreatorID: request.Tag.CreatorId, + }) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to delete tag: %v", err) + } + + return &apiv2pb.DeleteTagResponse{}, nil +} + func convertTagFromStore(tag *store.Tag) *apiv2pb.Tag { return &apiv2pb.Tag{ Name: tag.Name, diff --git a/proto/api/v2/tag_service.proto b/proto/api/v2/tag_service.proto index 7c85c9561b596..ebcc50b3b6954 100644 --- a/proto/api/v2/tag_service.proto +++ b/proto/api/v2/tag_service.proto @@ -7,9 +7,15 @@ import "google/api/annotations.proto"; option go_package = "gen/api/v2"; service TagService { + rpc UpsertTag(UpsertTagRequest) returns (UpsertTagResponse) { + option (google.api.http) = {post: "/api/v2/tags"}; + } rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { option (google.api.http) = {get: "/api/v2/tags"}; } + rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) { + option (google.api.http) = {delete: "/api/v2/tags"}; + } } message Tag { @@ -17,6 +23,14 @@ message Tag { int32 creator_id = 2; } +message UpsertTagRequest { + string name = 1; +} + +message UpsertTagResponse { + Tag tag = 1; +} + message ListTagsRequest { int32 creator_id = 1; } @@ -24,3 +38,9 @@ message ListTagsRequest { message ListTagsResponse { repeated Tag tags = 1; } + +message DeleteTagRequest { + Tag tag = 1; +} + +message DeleteTagResponse {} diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md index 06c497170b937..9421cbd2957e2 100644 --- a/proto/gen/api/v2/README.md +++ b/proto/gen/api/v2/README.md @@ -42,9 +42,13 @@ - [SystemService](#memos-api-v2-SystemService) - [api/v2/tag_service.proto](#api_v2_tag_service-proto) + - [DeleteTagRequest](#memos-api-v2-DeleteTagRequest) + - [DeleteTagResponse](#memos-api-v2-DeleteTagResponse) - [ListTagsRequest](#memos-api-v2-ListTagsRequest) - [ListTagsResponse](#memos-api-v2-ListTagsResponse) - [Tag](#memos-api-v2-Tag) + - [UpsertTagRequest](#memos-api-v2-UpsertTagRequest) + - [UpsertTagResponse](#memos-api-v2-UpsertTagResponse) - [TagService](#memos-api-v2-TagService) @@ -528,6 +532,31 @@ +<a name="memos-api-v2-DeleteTagRequest"></a> + +### DeleteTagRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tag | [Tag](#memos-api-v2-Tag) | | | + + + + + + +<a name="memos-api-v2-DeleteTagResponse"></a> + +### DeleteTagResponse + + + + + + + <a name="memos-api-v2-ListTagsRequest"></a> ### ListTagsRequest @@ -573,6 +602,36 @@ + +<a name="memos-api-v2-UpsertTagRequest"></a> + +### UpsertTagRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| name | [string](#string) | | | + + + + + + +<a name="memos-api-v2-UpsertTagResponse"></a> + +### UpsertTagResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tag | [Tag](#memos-api-v2-Tag) | | | + + + + + @@ -587,7 +646,9 @@ | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| +| UpsertTag | [UpsertTagRequest](#memos-api-v2-UpsertTagRequest) | [UpsertTagResponse](#memos-api-v2-UpsertTagResponse) | | | ListTags | [ListTagsRequest](#memos-api-v2-ListTagsRequest) | [ListTagsResponse](#memos-api-v2-ListTagsResponse) | | +| DeleteTag | [DeleteTagRequest](#memos-api-v2-DeleteTagRequest) | [DeleteTagResponse](#memos-api-v2-DeleteTagResponse) | | diff --git a/proto/gen/api/v2/tag_service.pb.go b/proto/gen/api/v2/tag_service.pb.go index d3fb150caa79e..cd4d9bf395eca 100644 --- a/proto/gen/api/v2/tag_service.pb.go +++ b/proto/gen/api/v2/tag_service.pb.go @@ -76,6 +76,100 @@ func (x *Tag) GetCreatorId() int32 { return 0 } +type UpsertTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *UpsertTagRequest) Reset() { + *x = UpsertTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v2_tag_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpsertTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpsertTagRequest) ProtoMessage() {} + +func (x *UpsertTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v2_tag_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpsertTagRequest.ProtoReflect.Descriptor instead. +func (*UpsertTagRequest) Descriptor() ([]byte, []int) { + return file_api_v2_tag_service_proto_rawDescGZIP(), []int{1} +} + +func (x *UpsertTagRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type UpsertTagResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tag *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *UpsertTagResponse) Reset() { + *x = UpsertTagResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v2_tag_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpsertTagResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpsertTagResponse) ProtoMessage() {} + +func (x *UpsertTagResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v2_tag_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpsertTagResponse.ProtoReflect.Descriptor instead. +func (*UpsertTagResponse) Descriptor() ([]byte, []int) { + return file_api_v2_tag_service_proto_rawDescGZIP(), []int{2} +} + +func (x *UpsertTagResponse) GetTag() *Tag { + if x != nil { + return x.Tag + } + return nil +} + type ListTagsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -87,7 +181,7 @@ type ListTagsRequest struct { func (x *ListTagsRequest) Reset() { *x = ListTagsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_tag_service_proto_msgTypes[1] + mi := &file_api_v2_tag_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -100,7 +194,7 @@ func (x *ListTagsRequest) String() string { func (*ListTagsRequest) ProtoMessage() {} func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_tag_service_proto_msgTypes[1] + mi := &file_api_v2_tag_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -113,7 +207,7 @@ func (x *ListTagsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTagsRequest.ProtoReflect.Descriptor instead. func (*ListTagsRequest) Descriptor() ([]byte, []int) { - return file_api_v2_tag_service_proto_rawDescGZIP(), []int{1} + return file_api_v2_tag_service_proto_rawDescGZIP(), []int{3} } func (x *ListTagsRequest) GetCreatorId() int32 { @@ -134,7 +228,7 @@ type ListTagsResponse struct { func (x *ListTagsResponse) Reset() { *x = ListTagsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v2_tag_service_proto_msgTypes[2] + mi := &file_api_v2_tag_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -147,7 +241,7 @@ func (x *ListTagsResponse) String() string { func (*ListTagsResponse) ProtoMessage() {} func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v2_tag_service_proto_msgTypes[2] + mi := &file_api_v2_tag_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -160,7 +254,7 @@ func (x *ListTagsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTagsResponse.ProtoReflect.Descriptor instead. func (*ListTagsResponse) Descriptor() ([]byte, []int) { - return file_api_v2_tag_service_proto_rawDescGZIP(), []int{2} + return file_api_v2_tag_service_proto_rawDescGZIP(), []int{4} } func (x *ListTagsResponse) GetTags() []*Tag { @@ -170,6 +264,91 @@ func (x *ListTagsResponse) GetTags() []*Tag { return nil } +type DeleteTagRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tag *Tag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *DeleteTagRequest) Reset() { + *x = DeleteTagRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v2_tag_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTagRequest) ProtoMessage() {} + +func (x *DeleteTagRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v2_tag_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTagRequest.ProtoReflect.Descriptor instead. +func (*DeleteTagRequest) Descriptor() ([]byte, []int) { + return file_api_v2_tag_service_proto_rawDescGZIP(), []int{5} +} + +func (x *DeleteTagRequest) GetTag() *Tag { + if x != nil { + return x.Tag + } + return nil +} + +type DeleteTagResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteTagResponse) Reset() { + *x = DeleteTagResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v2_tag_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteTagResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteTagResponse) ProtoMessage() {} + +func (x *DeleteTagResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v2_tag_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteTagResponse.ProtoReflect.Descriptor instead. +func (*DeleteTagResponse) Descriptor() ([]byte, []int) { + return file_api_v2_tag_service_proto_rawDescGZIP(), []int{6} +} + var File_api_v2_tag_service_proto protoreflect.FileDescriptor var file_api_v2_tag_service_proto_rawDesc = []byte{ @@ -181,31 +360,55 @@ var file_api_v2_tag_service_proto_rawDesc = []byte{ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x64, - 0x22, 0x30, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x49, 0x64, 0x22, 0x39, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x32, 0x6d, 0x0a, - 0x0a, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x08, 0x4c, - 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, 0x42, 0xa7, 0x01, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x42, 0x0f, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, - 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x26, 0x0a, 0x10, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x11, 0x55, 0x70, 0x73, 0x65, + 0x72, 0x74, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, + 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, + 0x61, 0x67, 0x22, 0x30, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x6f, 0x72, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, + 0x37, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x54, 0x61, 0x67, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb5, 0x02, + 0x0a, 0x0a, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x09, + 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, 0x61, 0x67, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, + 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x73, 0x65, 0x72, 0x74, 0x54, + 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0e, 0x22, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, 0x73, + 0x12, 0x5f, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x74, 0x61, 0x67, + 0x73, 0x12, 0x62, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x12, 0x1e, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x2a, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x74, 0x61, 0x67, 0x73, 0x42, 0xa7, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x0f, 0x54, 0x61, 0x67, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, + 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, + 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, + 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, + 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -220,21 +423,31 @@ func file_api_v2_tag_service_proto_rawDescGZIP() []byte { return file_api_v2_tag_service_proto_rawDescData } -var file_api_v2_tag_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_api_v2_tag_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_api_v2_tag_service_proto_goTypes = []interface{}{ - (*Tag)(nil), // 0: memos.api.v2.Tag - (*ListTagsRequest)(nil), // 1: memos.api.v2.ListTagsRequest - (*ListTagsResponse)(nil), // 2: memos.api.v2.ListTagsResponse + (*Tag)(nil), // 0: memos.api.v2.Tag + (*UpsertTagRequest)(nil), // 1: memos.api.v2.UpsertTagRequest + (*UpsertTagResponse)(nil), // 2: memos.api.v2.UpsertTagResponse + (*ListTagsRequest)(nil), // 3: memos.api.v2.ListTagsRequest + (*ListTagsResponse)(nil), // 4: memos.api.v2.ListTagsResponse + (*DeleteTagRequest)(nil), // 5: memos.api.v2.DeleteTagRequest + (*DeleteTagResponse)(nil), // 6: memos.api.v2.DeleteTagResponse } var file_api_v2_tag_service_proto_depIdxs = []int32{ - 0, // 0: memos.api.v2.ListTagsResponse.tags:type_name -> memos.api.v2.Tag - 1, // 1: memos.api.v2.TagService.ListTags:input_type -> memos.api.v2.ListTagsRequest - 2, // 2: memos.api.v2.TagService.ListTags:output_type -> memos.api.v2.ListTagsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: memos.api.v2.UpsertTagResponse.tag:type_name -> memos.api.v2.Tag + 0, // 1: memos.api.v2.ListTagsResponse.tags:type_name -> memos.api.v2.Tag + 0, // 2: memos.api.v2.DeleteTagRequest.tag:type_name -> memos.api.v2.Tag + 1, // 3: memos.api.v2.TagService.UpsertTag:input_type -> memos.api.v2.UpsertTagRequest + 3, // 4: memos.api.v2.TagService.ListTags:input_type -> memos.api.v2.ListTagsRequest + 5, // 5: memos.api.v2.TagService.DeleteTag:input_type -> memos.api.v2.DeleteTagRequest + 2, // 6: memos.api.v2.TagService.UpsertTag:output_type -> memos.api.v2.UpsertTagResponse + 4, // 7: memos.api.v2.TagService.ListTags:output_type -> memos.api.v2.ListTagsResponse + 6, // 8: memos.api.v2.TagService.DeleteTag:output_type -> memos.api.v2.DeleteTagResponse + 6, // [6:9] is the sub-list for method output_type + 3, // [3:6] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_api_v2_tag_service_proto_init() } @@ -256,7 +469,7 @@ func file_api_v2_tag_service_proto_init() { } } file_api_v2_tag_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTagsRequest); i { + switch v := v.(*UpsertTagRequest); i { case 0: return &v.state case 1: @@ -268,6 +481,30 @@ func file_api_v2_tag_service_proto_init() { } } file_api_v2_tag_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpsertTagResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v2_tag_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListTagsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v2_tag_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListTagsResponse); i { case 0: return &v.state @@ -279,6 +516,30 @@ func file_api_v2_tag_service_proto_init() { return nil } } + file_api_v2_tag_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTagRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v2_tag_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteTagResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -286,7 +547,7 @@ func file_api_v2_tag_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v2_tag_service_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/gen/api/v2/tag_service.pb.gw.go b/proto/gen/api/v2/tag_service.pb.gw.go index 59bf6180a8875..d17731c2189e4 100644 --- a/proto/gen/api/v2/tag_service.pb.gw.go +++ b/proto/gen/api/v2/tag_service.pb.gw.go @@ -31,6 +31,42 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join +var ( + filter_TagService_UpsertTag_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TagService_UpsertTag_0(ctx context.Context, marshaler runtime.Marshaler, client TagServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpsertTagRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TagService_UpsertTag_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpsertTag(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TagService_UpsertTag_0(ctx context.Context, marshaler runtime.Marshaler, server TagServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpsertTagRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TagService_UpsertTag_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpsertTag(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_TagService_ListTags_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -67,12 +103,73 @@ func local_request_TagService_ListTags_0(ctx context.Context, marshaler runtime. } +var ( + filter_TagService_DeleteTag_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_TagService_DeleteTag_0(ctx context.Context, marshaler runtime.Marshaler, client TagServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteTagRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TagService_DeleteTag_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteTag(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_TagService_DeleteTag_0(ctx context.Context, marshaler runtime.Marshaler, server TagServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteTagRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TagService_DeleteTag_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteTag(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterTagServiceHandlerServer registers the http handlers for service TagService to "mux". // UnaryRPC :call TagServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTagServiceHandlerFromEndpoint instead. func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TagServiceServer) error { + mux.Handle("POST", pattern_TagService_UpsertTag_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/UpsertTag", runtime.WithHTTPPathPattern("/api/v2/tags")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TagService_UpsertTag_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_TagService_UpsertTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_TagService_ListTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -98,6 +195,31 @@ func RegisterTagServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("DELETE", pattern_TagService_DeleteTag_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.TagService/DeleteTag", runtime.WithHTTPPathPattern("/api/v2/tags")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_TagService_DeleteTag_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_TagService_DeleteTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -139,6 +261,28 @@ func RegisterTagServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // "TagServiceClient" to call the correct interceptors. func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TagServiceClient) error { + mux.Handle("POST", pattern_TagService_UpsertTag_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/UpsertTag", runtime.WithHTTPPathPattern("/api/v2/tags")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TagService_UpsertTag_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TagService_UpsertTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_TagService_ListTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -161,13 +305,43 @@ func RegisterTagServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, }) + mux.Handle("DELETE", pattern_TagService_DeleteTag_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.TagService/DeleteTag", runtime.WithHTTPPathPattern("/api/v2/tags")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_TagService_DeleteTag_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_TagService_DeleteTag_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( + pattern_TagService_UpsertTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, "")) + pattern_TagService_ListTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, "")) + + pattern_TagService_DeleteTag_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "tags"}, "")) ) var ( + forward_TagService_UpsertTag_0 = runtime.ForwardResponseMessage + forward_TagService_ListTags_0 = runtime.ForwardResponseMessage + + forward_TagService_DeleteTag_0 = runtime.ForwardResponseMessage ) diff --git a/proto/gen/api/v2/tag_service_grpc.pb.go b/proto/gen/api/v2/tag_service_grpc.pb.go index 64d4ae01bc1af..871ef1d40a264 100644 --- a/proto/gen/api/v2/tag_service_grpc.pb.go +++ b/proto/gen/api/v2/tag_service_grpc.pb.go @@ -19,14 +19,18 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - TagService_ListTags_FullMethodName = "/memos.api.v2.TagService/ListTags" + TagService_UpsertTag_FullMethodName = "/memos.api.v2.TagService/UpsertTag" + TagService_ListTags_FullMethodName = "/memos.api.v2.TagService/ListTags" + TagService_DeleteTag_FullMethodName = "/memos.api.v2.TagService/DeleteTag" ) // TagServiceClient is the client API for TagService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TagServiceClient interface { + UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*UpsertTagResponse, error) ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error) + DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*DeleteTagResponse, error) } type tagServiceClient struct { @@ -37,6 +41,15 @@ func NewTagServiceClient(cc grpc.ClientConnInterface) TagServiceClient { return &tagServiceClient{cc} } +func (c *tagServiceClient) UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*UpsertTagResponse, error) { + out := new(UpsertTagResponse) + err := c.cc.Invoke(ctx, TagService_UpsertTag_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *tagServiceClient) ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error) { out := new(ListTagsResponse) err := c.cc.Invoke(ctx, TagService_ListTags_FullMethodName, in, out, opts...) @@ -46,11 +59,22 @@ func (c *tagServiceClient) ListTags(ctx context.Context, in *ListTagsRequest, op return out, nil } +func (c *tagServiceClient) DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*DeleteTagResponse, error) { + out := new(DeleteTagResponse) + err := c.cc.Invoke(ctx, TagService_DeleteTag_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // TagServiceServer is the server API for TagService service. // All implementations must embed UnimplementedTagServiceServer // for forward compatibility type TagServiceServer interface { + UpsertTag(context.Context, *UpsertTagRequest) (*UpsertTagResponse, error) ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) + DeleteTag(context.Context, *DeleteTagRequest) (*DeleteTagResponse, error) mustEmbedUnimplementedTagServiceServer() } @@ -58,9 +82,15 @@ type TagServiceServer interface { type UnimplementedTagServiceServer struct { } +func (UnimplementedTagServiceServer) UpsertTag(context.Context, *UpsertTagRequest) (*UpsertTagResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpsertTag not implemented") +} func (UnimplementedTagServiceServer) ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTags not implemented") } +func (UnimplementedTagServiceServer) DeleteTag(context.Context, *DeleteTagRequest) (*DeleteTagResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteTag not implemented") +} func (UnimplementedTagServiceServer) mustEmbedUnimplementedTagServiceServer() {} // UnsafeTagServiceServer may be embedded to opt out of forward compatibility for this service. @@ -74,6 +104,24 @@ func RegisterTagServiceServer(s grpc.ServiceRegistrar, srv TagServiceServer) { s.RegisterService(&TagService_ServiceDesc, srv) } +func _TagService_UpsertTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpsertTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TagServiceServer).UpsertTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TagService_UpsertTag_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TagServiceServer).UpsertTag(ctx, req.(*UpsertTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _TagService_ListTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListTagsRequest) if err := dec(in); err != nil { @@ -92,6 +140,24 @@ func _TagService_ListTags_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _TagService_DeleteTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TagServiceServer).DeleteTag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TagService_DeleteTag_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TagServiceServer).DeleteTag(ctx, req.(*DeleteTagRequest)) + } + return interceptor(ctx, in, info, handler) +} + // TagService_ServiceDesc is the grpc.ServiceDesc for TagService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -99,10 +165,18 @@ var TagService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "memos.api.v2.TagService", HandlerType: (*TagServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "UpsertTag", + Handler: _TagService_UpsertTag_Handler, + }, { MethodName: "ListTags", Handler: _TagService_ListTags_Handler, }, + { + MethodName: "DeleteTag", + Handler: _TagService_DeleteTag_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v2/tag_service.proto", diff --git a/web/src/helpers/api.ts b/web/src/helpers/api.ts index c68c679cd7754..1d44c1aa7cac9 100644 --- a/web/src/helpers/api.ts +++ b/web/src/helpers/api.ts @@ -155,26 +155,10 @@ export function deleteResourceById(id: ResourceId) { return axios.delete(`/api/v1/resource/${id}`); } -export function getTagList() { - return axios.get<string[]>(`/api/v1/tag`); -} - export function getTagSuggestionList() { return axios.get<string[]>(`/api/v1/tag/suggestion`); } -export function upsertTag(tagName: string) { - return axios.post<string>(`/api/v1/tag`, { - name: tagName, - }); -} - -export function deleteTag(tagName: string) { - return axios.post(`/api/v1/tag/delete`, { - name: tagName, - }); -} - export function getStorageList() { return axios.get<ObjectStorage[]>(`/api/v1/storage`); } diff --git a/web/src/store/module/tag.ts b/web/src/store/module/tag.ts index efad18dca3fe1..76044298b3d61 100644 --- a/web/src/store/module/tag.ts +++ b/web/src/store/module/tag.ts @@ -1,26 +1,45 @@ -import * as api from "@/helpers/api"; +import { tagServiceClient } from "@/grpcweb"; +import useCurrentUser from "@/hooks/useCurrentUser"; import store, { useAppSelector } from ".."; -import { deleteTag, setTags, upsertTag } from "../reducer/tag"; +import { deleteTag as deleteTagAction, setTags, upsertTag as upsertTagAction } from "../reducer/tag"; export const useTagStore = () => { const state = useAppSelector((state) => state.tag); + const currentUser = useCurrentUser(); + + const getState = () => { + return store.getState().tag; + }; + + const fetchTags = async () => { + const { tags } = await tagServiceClient.listTags({ + creatorId: currentUser.id, + }); + store.dispatch(setTags(tags.map((tag) => tag.name))); + }; + + const upsertTag = async (tagName: string) => { + await tagServiceClient.upsertTag({ + name: tagName, + }); + store.dispatch(upsertTagAction(tagName)); + }; + + const deleteTag = async (tagName: string) => { + await tagServiceClient.deleteTag({ + tag: { + name: tagName, + creatorId: currentUser.id, + }, + }); + store.dispatch(deleteTagAction(tagName)); + }; return { state, - getState: () => { - return store.getState().tag; - }, - fetchTags: async () => { - const { data } = await api.getTagList(); - store.dispatch(setTags(data)); - }, - upsertTag: async (tagName: string) => { - await api.upsertTag(tagName); - store.dispatch(upsertTag(tagName)); - }, - deleteTag: async (tagName: string) => { - await api.deleteTag(tagName); - store.dispatch(deleteTag(tagName)); - }, + getState, + fetchTags, + upsertTag, + deleteTag, }; };
chore
update tag service
6325b3eef9f1b5fb399286b449aac88f8b20b795
2024-06-26 05:41:39
dependabot[bot]
chore: bump @types/uuid from 9.0.8 to 10.0.0 in /web (#3616) Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 9.0.8 to 10.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid) --- updated-dependencies: - dependency-name: "@types/uuid" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/web/package.json b/web/package.json index 56480d564f63c..f3091ed1e5b98 100644 --- a/web/package.json +++ b/web/package.json @@ -53,7 +53,7 @@ "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@types/textarea-caret": "^3.0.3", - "@types/uuid": "^9.0.8", + "@types/uuid": "^10.0.0", "@typescript-eslint/eslint-plugin": "^7.13.1", "@typescript-eslint/parser": "^7.14.1", "@vitejs/plugin-react": "^4.3.0", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 0b3db4d5cf487..79f43bcbd9d1a 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -134,8 +134,8 @@ devDependencies: specifier: ^3.0.3 version: 3.0.3 '@types/uuid': - specifier: ^9.0.8 - version: 9.0.8 + specifier: ^10.0.0 + version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: ^7.13.1 version: 7.13.1(@typescript-eslint/parser@7.14.1)(eslint@8.57.0)(typescript@5.4.5) @@ -1738,8 +1738,8 @@ packages: resolution: {integrity: sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==} dev: false - /@types/uuid@9.0.8: - resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==} + /@types/uuid@10.0.0: + resolution: {integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==} dev: true /@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.14.1)(eslint@8.57.0)(typescript@5.4.5):
chore
bump @types/uuid from 9.0.8 to 10.0.0 in /web (#3616) Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 9.0.8 to 10.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid) --- updated-dependencies: - dependency-name: "@types/uuid" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e51046581801d16f020a535a6227fd7eb8bda1bc
2022-05-15 09:07:08
boojack
chore: update tag selector
false
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index b9f747974bdf3..e5fd5cf782c3e 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -254,7 +254,7 @@ const MemoEditor: React.FC<Props> = () => { const handleTagSeletorClick = useCallback((event: React.MouseEvent) => { if (tagSeletorRef.current !== event.target && tagSeletorRef.current?.contains(event.target as Node)) { - editorRef.current?.insertText((event.target as HTMLElement).textContent ?? ""); + editorRef.current?.insertText((event.target as HTMLElement).textContent + " " ?? ""); toggleTagSeletor(false); } }, []); diff --git a/web/src/components/TagList.tsx b/web/src/components/TagList.tsx index d2501ae5bdb4f..4fc2818c172e4 100644 --- a/web/src/components/TagList.tsx +++ b/web/src/components/TagList.tsx @@ -77,7 +77,7 @@ const TagList: React.FC<Props> = () => { ))} <Only when={tags.length < 5 && memoService.initialized}> <p className="tag-tip-container"> - Enter <span className="code-text"># Tag </span> to create a tag + Enter <span className="code-text">#Tag </span> to create a tag </p> </Only> </div> diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx index 95b18d10c2c19..2fb5d5b31e630 100644 --- a/web/src/components/UserBanner.tsx +++ b/web/src/components/UserBanner.tsx @@ -28,9 +28,10 @@ const UserBanner: React.FC<Props> = () => { return ( <div className="user-banner-container"> - <p className="username-text" onClick={handleUsernameClick}> - {username} - </p> + <div className="username-container" onClick={handleUsernameClick}> + <span className="username-text">{username}</span> + {user?.role === "OWNER" ? <span className="tag">MOD</span> : null} + </div> <span className="action-btn menu-popup-btn" onClick={handlePopupBtnClick}> <img src="/icons/more.svg" className="icon-img" /> </span> diff --git a/web/src/less/user-banner.less b/web/src/less/user-banner.less index 383c01d6c1c7f..c0ce978e20865 100644 --- a/web/src/less/user-banner.less +++ b/web/src/less/user-banner.less @@ -4,8 +4,16 @@ .flex(row, space-between, center); @apply w-full h-auto px-6 flex-nowrap mb-1; - > .username-text { - @apply font-bold text-lg pr-2 text-slate-800 cursor-pointer shrink truncate; + > .username-container { + @apply shrink flex flex-row justify-start items-center flex-nowrap truncate; + + > .username-text { + @apply font-bold text-lg pr-1 text-slate-800 cursor-pointer shrink truncate; + } + + > .tag { + @apply text-xs px-1 bg-blue-500 rounded text-white; + } } > .action-btn {
chore
update tag selector
4499f45b67c9903cce440bafa8d9dd172d566f5e
2023-11-08 19:19:03
Steven
chore: deprecate daily review offset local setting
false
diff --git a/web/src/components/Settings/PreferencesSection.tsx b/web/src/components/Settings/PreferencesSection.tsx index 349a8dd5035a3..4ab9792b3ed90 100644 --- a/web/src/components/Settings/PreferencesSection.tsx +++ b/web/src/components/Settings/PreferencesSection.tsx @@ -18,8 +18,6 @@ const PreferencesSection = () => { const { setting, localSetting } = userStore.state.user as User; const [telegramUserId, setTelegramUserId] = useState<string>(setting.telegramUserId); - const dailyReviewTimeOffsetOptions: number[] = [...Array(24).keys()]; - const handleLocaleSelectChange = async (locale: Locale) => { await userStore.upsertUserSetting("locale", locale); globalStore.setLocale(locale); @@ -38,10 +36,6 @@ const PreferencesSection = () => { userStore.upsertLocalSetting({ ...localSetting, enableDoubleClickEditing: event.target.checked }); }; - const handleDailyReviewTimeOffsetChanged = (value: number) => { - userStore.upsertLocalSetting({ ...localSetting, dailyReviewTimeOffset: value }); - }; - const handleSaveTelegramUserId = async () => { try { await userStore.upsertUserSetting("telegram-user-id", telegramUserId); @@ -87,35 +81,6 @@ const PreferencesSection = () => { ))} </Select> </div> - <div className="form-label selector"> - <span className="text-sm break-keep text-ellipsis overflow-hidden">{t("setting.preference-section.daily-review-time-offset")}</span> - <span className="w-auto inline-flex"> - <Select - placeholder="hh" - className="!min-w-fit" - value={localSetting.dailyReviewTimeOffset} - onChange={(_, value) => { - if (value !== null) { - handleDailyReviewTimeOffsetChanged(value); - } - }} - slotProps={{ - listbox: { - sx: { - maxHeight: "15rem", - overflow: "auto", - }, - }, - }} - > - {dailyReviewTimeOffsetOptions.map((item) => ( - <Option key={item} value={item} className="whitespace-nowrap"> - {item.toString().padStart(2, "0")} - </Option> - ))} - </Select> - </span> - </div> <label className="form-label selector"> <span className="text-sm break-keep">{t("setting.preference-section.enable-double-click")}</span> diff --git a/web/src/components/TagList.tsx b/web/src/components/TagList.tsx index 3bf15aaff4c3b..bed7313fd10e3 100644 --- a/web/src/components/TagList.tsx +++ b/web/src/components/TagList.tsx @@ -132,7 +132,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain className={`flex flex-row justify-center items-center w-6 h-6 shrink-0 transition-all rotate-0 ${showSubTags && "rotate-90"}`} onClick={handleToggleBtnClick} > - <Icon.ChevronRight className="w-5 h-5 opacity-80 dark:text-gray-400" /> + <Icon.ChevronRight className="w-5 h-5 opacity-40 dark:text-gray-400" /> </span> ) : null} </div> diff --git a/web/src/pages/DailyReview.tsx b/web/src/pages/DailyReview.tsx index 2d48893bce013..66ff44cc75452 100644 --- a/web/src/pages/DailyReview.tsx +++ b/web/src/pages/DailyReview.tsx @@ -14,23 +14,21 @@ import DatePicker from "@/components/kit/DatePicker"; import { DAILY_TIMESTAMP, DEFAULT_MEMO_LIMIT } from "@/helpers/consts"; import { getDateStampByDate, getNormalizedDateString, getTimeStampByDate, getTimeString } from "@/helpers/datetime"; import useCurrentUser from "@/hooks/useCurrentUser"; -import { useMemoStore, useUserStore } from "@/store/module"; +import { useMemoStore } from "@/store/module"; import { extractUsernameFromName } from "@/store/v1"; import { useTranslate } from "@/utils/i18n"; const DailyReview = () => { const t = useTranslate(); const memoStore = useMemoStore(); - const userStore = useUserStore(); const user = useCurrentUser(); - const { localSetting } = userStore.state.user as User; const currentDateStamp = getDateStampByDate(getNormalizedDateString()) as number; const [selectedDateStamp, setSelectedDateStamp] = useState<number>(currentDateStamp as number); const [showDatePicker, toggleShowDatePicker] = useToggle(false); const dailyMemos = memoStore.state.memos .filter((m) => { const displayTimestamp = getTimeStampByDate(m.displayTs); - const selectedDateStampWithOffset = selectedDateStamp + localSetting.dailyReviewTimeOffset * 60 * 60 * 1000; + const selectedDateStampWithOffset = selectedDateStamp; return ( m.rowStatus === "NORMAL" && m.creatorUsername === extractUsernameFromName(user.name) && diff --git a/web/src/store/module/user.ts b/web/src/store/module/user.ts index 23b281108add6..f4ad3e3d86828 100644 --- a/web/src/store/module/user.ts +++ b/web/src/store/module/user.ts @@ -15,7 +15,6 @@ const defaultSetting: Setting = { const defaultLocalSetting: LocalSetting = { enableDoubleClickEditing: false, - dailyReviewTimeOffset: 0, }; export const convertResponseModelUser = (user: User): User => { diff --git a/web/src/types/modules/setting.d.ts b/web/src/types/modules/setting.d.ts index 0bd58d1b9deec..0254240015afd 100644 --- a/web/src/types/modules/setting.d.ts +++ b/web/src/types/modules/setting.d.ts @@ -13,7 +13,6 @@ interface Setting { interface LocalSetting { enableDoubleClickEditing: boolean; - dailyReviewTimeOffset: number; } interface UserLocaleSetting {
chore
deprecate daily review offset local setting
29770e8bfb3366c1543583c84202fdf413737231
2022-10-04 12:07:44
f97
chore: update vietnamese i18n (#261)
false
diff --git a/web/src/locales/vi.json b/web/src/locales/vi.json index c023e4d7aa381..e5e5b7dc099e7 100644 --- a/web/src/locales/vi.json +++ b/web/src/locales/vi.json @@ -27,7 +27,7 @@ "explore": "Khám phá", "sign-in": "Đăng nhập", "sign-out": "Đăng xuất", - "back-to-home": "Quay về trang chủ", + "back-to-home": "Về trang chủ", "type": "Kiểu", "shortcuts": "Lối tắt", "title": "Tên", @@ -73,7 +73,7 @@ "cant-empty": "Nội dung không thể trống" }, "memo": { - "view-detail": "View Detail", + "view-detail": "Xem chi tiết", "visibility": { "private": "Private", "protected": "Protected",
chore
update vietnamese i18n (#261)
22971c3a93e404810ea16334f4dcbb3e02cc4f51
2022-09-09 05:40:39
Steven
chore: support upload more file type
false
diff --git a/web/src/components/ResourcesDialog.tsx b/web/src/components/ResourcesDialog.tsx index 4c4ea71a57bcf..799659e4e2ec0 100644 --- a/web/src/components/ResourcesDialog.tsx +++ b/web/src/components/ResourcesDialog.tsx @@ -58,7 +58,7 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => { document.body.appendChild(inputEl); inputEl.type = "file"; inputEl.multiple = true; - inputEl.accept = "image/*"; + inputEl.accept = "*"; inputEl.onchange = async () => { if (!inputEl.files || inputEl.files.length === 0) { return; @@ -90,7 +90,12 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => { }; const handlPreviewBtnClick = (resource: Resource) => { - showPreviewImageDialog(`${window.location.origin}/o/r/${resource.id}/${resource.filename}`); + const resourceUrl = `${window.location.origin}/o/r/${resource.id}/${resource.filename}`; + if (resource.type.startsWith("image")) { + showPreviewImageDialog(resourceUrl); + } else { + window.open(resourceUrl); + } }; const handleCopyResourceLinkBtnClick = (resource: Resource) => {
chore
support upload more file type
89179f78c2ae1b0eb2b241723dca4d7537c2d9f9
2022-11-25 06:35:52
boojack
chore: add `SECURITY.md` (#562)
false
diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000000..af97c79abca7d --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +## Reporting a bug + +Report security bugs via GitHub [issues](https://github.com/usememos/memos/issues). + +For more information, please contact [stevenlgtm@gmail.com](stevenlgtm@gmail.com).
chore
add `SECURITY.md` (#562)
921d4b996d87fec4dc8a8771e96101bb5aca7e9b
2023-05-13 20:22:06
boojack
chore: update help button style (#1656)
false
diff --git a/web/src/components/Settings/SSOSection.tsx b/web/src/components/Settings/SSOSection.tsx index fadedeedb5693..d7bdccf0975cf 100644 --- a/web/src/components/Settings/SSOSection.tsx +++ b/web/src/components/Settings/SSOSection.tsx @@ -43,11 +43,11 @@ const SSOSection = () => { return ( <div className="section-container"> - <div className="mb-2 w-full flex flex-row justify-start items-center"> - <span className="font-mono text-sm text-gray-400 mr-2">{t("setting.sso-section.sso-list")}</span> + <div className="mb-2 w-full flex flex-row justify-start items-center gap-1"> + <span className="font-mono text-sm text-gray-400">{t("setting.sso-section.sso-list")}</span> <HelpButton icon="help" url="https://usememos.com/docs/keycloak" /> <button - className="btn-normal px-2 py-0 leading-7" + className="btn-normal px-2 py-0 ml-1" onClick={() => showCreateIdentityProviderDialog(undefined, fetchIdentityProviderList)} > {t("common.create")} diff --git a/web/src/components/Settings/StorageSection.tsx b/web/src/components/Settings/StorageSection.tsx index 075aa8e60f998..3532d164d3512 100644 --- a/web/src/components/Settings/StorageSection.tsx +++ b/web/src/components/Settings/StorageSection.tsx @@ -76,10 +76,10 @@ const StorageSection = () => { ))} </Select> <Divider /> - <div className="mt-4 mb-2 w-full flex flex-row justify-start items-center"> - <span className="font-mono text-sm text-gray-400 mr-2">{t("setting.storage-section.storage-services-list")}</span> + <div className="mt-4 mb-2 w-full flex flex-row justify-start items-center gap-1"> + <span className="font-mono text-sm text-gray-400">{t("setting.storage-section.storage-services-list")}</span> <HelpButton className="btn" icon="info" url="https://usememos.com/docs/storage" /> - <button className="btn-normal px-2 py-0 leading-7" onClick={() => showCreateStorageServiceDialog(undefined, fetchStorageList)}> + <button className="btn-normal px-2 py-0 ml-1" onClick={() => showCreateStorageServiceDialog(undefined, fetchStorageList)}> {t("common.create")} </button> </div> diff --git a/web/src/components/Settings/SystemSection.tsx b/web/src/components/Settings/SystemSection.tsx index 5c7e464967f77..afb2a4ab2c54f 100644 --- a/web/src/components/Settings/SystemSection.tsx +++ b/web/src/components/Settings/SystemSection.tsx @@ -231,9 +231,9 @@ const SystemSection = () => { <Switch checked={state.disablePublicMemos} onChange={(event) => handleDisablePublicMemosChanged(event.target.checked)} /> </div> <div className="form-label"> - <div className="flex flex-row"> - <span className="normal-text">{t("setting.system-section.max-upload-size")}</span> - <HelpButton icon="info" hint={t("setting.system-section.max-upload-size-hint")} hintPlacement="left" /> + <div className="flex flex-row items-center"> + <span className="normal-text mr-1">{t("setting.system-section.max-upload-size")}</span> + <HelpButton icon="info" hint={t("setting.system-section.max-upload-size-hint")} /> </div> <Input className="w-16" @@ -247,8 +247,8 @@ const SystemSection = () => { </div> <Divider className="!mt-3 !my-4" /> <div className="form-label"> - <div className="flex flex-row"> - <span className="normal-text">{t("setting.system-section.openai-api-key")}</span> + <div className="flex flex-row items-center"> + <span className="normal-text mr-1">{t("setting.system-section.openai-api-key")}</span> <HelpButton hint={t("setting.system-section.openai-api-key-description")} url="https://platform.openai.com/account/api-keys" /> </div> <Button onClick={handleSaveOpenAIConfig}>{t("common.save")}</Button> diff --git a/web/src/components/kit/HelpButton.tsx b/web/src/components/kit/HelpButton.tsx index a336f17dd7e21..1b0d56cd584d7 100644 --- a/web/src/components/kit/HelpButton.tsx +++ b/web/src/components/kit/HelpButton.tsx @@ -174,7 +174,7 @@ const HelpButton = (props: HelpProps): JSX.Element => { const { t } = useTranslation(); const color = props.color ?? "neutral"; const variant = props.variant ?? "plain"; - const className = props.className ?? "!-mt-1"; + const className = props.className ?? ""; const hintPlacement = props.hintPlacement ?? "top"; const iconButtonSize = "sm"; @@ -232,12 +232,12 @@ const HelpButton = (props: HelpProps): JSX.Element => { const sizePx = (() => { switch (props.size) { case "sm": - return 16; + return 14; case "lg": - return 48; + return 18; case "md": default: - return 24; + return 16; } })();
chore
update help button style (#1656)
b36e2b630a0b6127729440ca968f6061c67c927a
2025-03-02 15:17:09
dependabot[bot]
chore: bump @bufbuild/buf from 1.48.0 to 1.50.0 in /web (#4452) Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.48.0 to 1.50.0. - [Release notes](https://github.com/bufbuild/buf/releases) - [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md) - [Commits](https://github.com/bufbuild/buf/compare/v1.48.0...v1.50.0) --- updated-dependencies: - dependency-name: "@bufbuild/buf" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/web/package.json b/web/package.json index dd43c40720e17..7ca36788523eb 100644 --- a/web/package.json +++ b/web/package.json @@ -51,7 +51,7 @@ "zustand": "^5.0.2" }, "devDependencies": { - "@bufbuild/buf": "^1.48.0", + "@bufbuild/buf": "^1.50.0", "@bufbuild/protobuf": "^2.2.3", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/d3": "^7.4.3", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 682a2235cafde..32e4268e9e1c7 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -130,8 +130,8 @@ importers: version: 5.0.2(@types/react@18.3.18)(immer@10.1.1)(react@18.3.1)(use-sync-external-store@1.4.0(react@18.3.1)) devDependencies: '@bufbuild/buf': - specifier: ^1.48.0 - version: 1.48.0 + specifier: ^1.50.0 + version: 1.50.0 '@bufbuild/protobuf': specifier: ^2.2.3 version: 2.2.3 @@ -351,50 +351,50 @@ packages: '@braintree/sanitize-url@7.1.1': resolution: {integrity: sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==} - '@bufbuild/buf-darwin-arm64@1.48.0': - resolution: {integrity: sha512-cn00IDkwQVER8Z/PxAdWRPZ5peXcAeWSkRp5NhUd1BmK+1/4hqv41VnFQJCPpnurPcdR3a7ieG5h7ZMOLoy+ww==} + '@bufbuild/buf-darwin-arm64@1.50.0': + resolution: {integrity: sha512-ldj1s0hMhZlz0N4+fqs9jGqC7jKAcsfLNp8kM+G+6XTPh8GWA/U1sYRdHhAlv1+3STfWhGxAhrNGRRVvvimALQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@bufbuild/buf-darwin-x64@1.48.0': - resolution: {integrity: sha512-1CaNgB/xbJdiUdK3AUtIzG6a43V0mHGPWrOxlxsWl9dGYu53yuIUmQI5e4UIU7SghPqwSlaQBeIrQnK2wFUb7Q==} + '@bufbuild/buf-darwin-x64@1.50.0': + resolution: {integrity: sha512-0ODFAnDVr0UOIUHGrI3vA3Cycec186BP5PFOuW6bALxBVN52Lqjjj+/+bVhvbBQlYo3rkxOtxEdoWGHZJrHhHA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@bufbuild/buf-linux-aarch64@1.48.0': - resolution: {integrity: sha512-7npsOiKckcQuXLot3B/gpAf6dtSqW8RRWgCK0Tl7LSnjJHcRhrSYQjaEiwDABK/OZFFL2id6suU9lqN7Wc9zgg==} + '@bufbuild/buf-linux-aarch64@1.50.0': + resolution: {integrity: sha512-Dp0YzLOW7O+C8bAm6/Q2HSrTYpDs2SxQXx+dBNxUotMpzx+uaUvqXb3EGr7s07ro+FsT0sFjzKTBcuCwkj+guQ==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@bufbuild/buf-linux-armv7@1.48.0': - resolution: {integrity: sha512-fHWz7AXP2gpKqtYqhvMN7Jr9BEIrZw2y797SSJ5A0CGEABNXVIjaToRy+iZosijvJu2N5eY+WHw8C6ZCiz1Pgg==} + '@bufbuild/buf-linux-armv7@1.50.0': + resolution: {integrity: sha512-EMYRKSJ4kZo+OiHvMTYM+O27lf/okaf+bk1agRUTmBccp+qoGEC0R3DB/powFf/FURkUF7vKUS4T0GC/4n8OVA==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@bufbuild/buf-linux-x64@1.48.0': - resolution: {integrity: sha512-MtKKmKUY4wpg40P7Es0rvrpq6HGjIOmPt0wKB9tInv7F40Vx8lB9POYmnNTYxo2QbWfves9y/G31THEE/QIwIg==} + '@bufbuild/buf-linux-x64@1.50.0': + resolution: {integrity: sha512-1G6ZQLXYoCXl8ZmCivUuknc6BiMz2bMtfpzYurFhj9wCIQTZsgepTBoiXHTcEdu2fjYAFxRGo4o+ZALU1umY0g==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@bufbuild/buf-win32-arm64@1.48.0': - resolution: {integrity: sha512-5x0pg6qWrKiDb1I7xHZd+s06fVYGJCOzQ7O+PVosxP1Wfop5JBOkewqjEGarWbbmGsRr3ctSHaRwgoBf8tg/6A==} + '@bufbuild/buf-win32-arm64@1.50.0': + resolution: {integrity: sha512-KpbI+f0TnGaa4KlPQXCLx8ZWKfO2pMD1kvVjAaktmm9OUoP9HrvZJ11tDEiFEFbrKbapCIhCCC3XWaldEDJWcA==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@bufbuild/buf-win32-x64@1.48.0': - resolution: {integrity: sha512-Hdp/BNk6d5rBiqE0SjPk4F4G2wwAw6twasCW3ZcmYmzxXWG1YcwAx8kE7uMTF5VM21BNH2nzFksTGU5CrmAjBw==} + '@bufbuild/buf-win32-x64@1.50.0': + resolution: {integrity: sha512-gA9aVuZYfh3pmWNYxmnK6thlcqyu2ht8haFhdB0w14Rtj200FAsMmzF7CPWvXQrV5g0pqXPwoMjZigT4OJHOXg==} engines: {node: '>=12'} cpu: [x64] os: [win32] - '@bufbuild/buf@1.48.0': - resolution: {integrity: sha512-pwq34YC0OnyNeSXu1T7Hfg0etDi+2CS3AIwkFODVtdBLHhhuaLCFKPbUA1L/6ZChin56L5MJiUM2/nRB9HI3zQ==} + '@bufbuild/buf@1.50.0': + resolution: {integrity: sha512-XcdB5/Ls8k1eVcgNwUsRZEhCqiHgsnN+uEk/aDh0urGeiWc/dN6c89ZnAnI9/v0AZWzp6/rowoZhThlTl+D0bw==} engines: {node: '>=12'} hasBin: true @@ -3789,36 +3789,36 @@ snapshots: '@braintree/sanitize-url@7.1.1': {} - '@bufbuild/buf-darwin-arm64@1.48.0': + '@bufbuild/buf-darwin-arm64@1.50.0': optional: true - '@bufbuild/buf-darwin-x64@1.48.0': + '@bufbuild/buf-darwin-x64@1.50.0': optional: true - '@bufbuild/buf-linux-aarch64@1.48.0': + '@bufbuild/buf-linux-aarch64@1.50.0': optional: true - '@bufbuild/buf-linux-armv7@1.48.0': + '@bufbuild/buf-linux-armv7@1.50.0': optional: true - '@bufbuild/buf-linux-x64@1.48.0': + '@bufbuild/buf-linux-x64@1.50.0': optional: true - '@bufbuild/buf-win32-arm64@1.48.0': + '@bufbuild/buf-win32-arm64@1.50.0': optional: true - '@bufbuild/buf-win32-x64@1.48.0': + '@bufbuild/buf-win32-x64@1.50.0': optional: true - '@bufbuild/buf@1.48.0': + '@bufbuild/buf@1.50.0': optionalDependencies: - '@bufbuild/buf-darwin-arm64': 1.48.0 - '@bufbuild/buf-darwin-x64': 1.48.0 - '@bufbuild/buf-linux-aarch64': 1.48.0 - '@bufbuild/buf-linux-armv7': 1.48.0 - '@bufbuild/buf-linux-x64': 1.48.0 - '@bufbuild/buf-win32-arm64': 1.48.0 - '@bufbuild/buf-win32-x64': 1.48.0 + '@bufbuild/buf-darwin-arm64': 1.50.0 + '@bufbuild/buf-darwin-x64': 1.50.0 + '@bufbuild/buf-linux-aarch64': 1.50.0 + '@bufbuild/buf-linux-armv7': 1.50.0 + '@bufbuild/buf-linux-x64': 1.50.0 + '@bufbuild/buf-win32-arm64': 1.50.0 + '@bufbuild/buf-win32-x64': 1.50.0 '@bufbuild/protobuf@2.2.3': {}
chore
bump @bufbuild/buf from 1.48.0 to 1.50.0 in /web (#4452) Bumps [@bufbuild/buf](https://github.com/bufbuild/buf) from 1.48.0 to 1.50.0. - [Release notes](https://github.com/bufbuild/buf/releases) - [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md) - [Commits](https://github.com/bufbuild/buf/compare/v1.48.0...v1.50.0) --- updated-dependencies: - dependency-name: "@bufbuild/buf" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
81aa9b107fc2242c17a0f78f49477e98d965fdd1
2024-02-09 07:00:01
Brilliant Hanabi
feat: add notice when sharing private links in MemoDetail (#2942)
false
diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index 559425bc56931..b99f403ad1442 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -101,7 +101,11 @@ const MemoDetail = () => { const handleCopyLinkBtnClick = () => { copy(`${window.location.origin}/m/${memo.name}`); - toast.success(t("message.succeed-copy-link")); + if (memo.visibility !== Visibility.PUBLIC) { + toast.success(t("message.succeed-copy-link-not-public")); + } else { + toast.success(t("message.succeed-copy-link")); + } }; const handleCommentCreated = async (commentId: number) => {
feat
add notice when sharing private links in MemoDetail (#2942)
f54b05a5218134ce5d24c2d1299d5ccc68761d59
2024-05-20 19:45:51
Steven
chore: tweak comments
false
diff --git a/docs/apidocs.swagger.yaml b/docs/apidocs.swagger.yaml index 8907e0f617aa6..cda21f8a03b51 100644 --- a/docs/apidocs.swagger.yaml +++ b/docs/apidocs.swagger.yaml @@ -310,7 +310,7 @@ paths: - name: filter description: |- Filter is used to filter memos returned in the list. - Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" in: query required: false type: string @@ -410,7 +410,7 @@ paths: - name: filter description: |- Filter is used to filter memos returned. - Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" in: query required: false type: string @@ -545,7 +545,7 @@ paths: - name: filter description: |- Filter is used to filter users returned in the list. - Format: "username == frank" + Format: "username == 'frank'" in: query required: false type: string @@ -1517,7 +1517,7 @@ paths: - name: filter description: |- Filter is used to filter memos. - Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" in: query required: false type: string diff --git a/proto/api/v1/memo_service.proto b/proto/api/v1/memo_service.proto index 9b7bd8b570bd7..52e862c44ede3 100644 --- a/proto/api/v1/memo_service.proto +++ b/proto/api/v1/memo_service.proto @@ -205,7 +205,7 @@ message ListMemosRequest { string page_token = 2; // Filter is used to filter memos returned in the list. - // Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + // Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" string filter = 3; } @@ -219,7 +219,7 @@ message ListMemosResponse { message SearchMemosRequest { // Filter is used to filter memos returned. - // Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + // Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" string filter = 1; } @@ -266,7 +266,7 @@ message ListMemoTagsRequest { string parent = 1; // Filter is used to filter memos. - // Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + // Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" string filter = 2; } diff --git a/proto/api/v1/user_service.proto b/proto/api/v1/user_service.proto index b976231132f4a..80fdf98a513a5 100644 --- a/proto/api/v1/user_service.proto +++ b/proto/api/v1/user_service.proto @@ -129,7 +129,7 @@ message ListUsersResponse { message SearchUsersRequest { // Filter is used to filter users returned in the list. - // Format: "username == frank" + // Format: "username == 'frank'" string filter = 1; } diff --git a/proto/gen/api/v1/activity_service.pb.gw.go b/proto/gen/api/v1/activity_service.pb.gw.go index 4596fa9dfdaa2..df2d3b812a0f3 100644 --- a/proto/gen/api/v1/activity_service.pb.gw.go +++ b/proto/gen/api/v1/activity_service.pb.gw.go @@ -120,21 +120,21 @@ func RegisterActivityServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterActivityServiceHandlerFromEndpoint is same as RegisterActivityServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterActivityServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/auth_service.pb.gw.go b/proto/gen/api/v1/auth_service.pb.gw.go index 417c52c90fb4b..5690b32fa61d6 100644 --- a/proto/gen/api/v1/auth_service.pb.gw.go +++ b/proto/gen/api/v1/auth_service.pb.gw.go @@ -312,21 +312,21 @@ func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/idp_service.pb.gw.go b/proto/gen/api/v1/idp_service.pb.gw.go index 2fdd8b91ddbbf..973dd0de1c132 100644 --- a/proto/gen/api/v1/idp_service.pb.gw.go +++ b/proto/gen/api/v1/idp_service.pb.gw.go @@ -416,21 +416,21 @@ func RegisterIdentityProviderServiceHandlerServer(ctx context.Context, mux *runt // RegisterIdentityProviderServiceHandlerFromEndpoint is same as RegisterIdentityProviderServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterIdentityProviderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/inbox_service.pb.gw.go b/proto/gen/api/v1/inbox_service.pb.gw.go index b0ab788ff3616..51e0b314969d3 100644 --- a/proto/gen/api/v1/inbox_service.pb.gw.go +++ b/proto/gen/api/v1/inbox_service.pb.gw.go @@ -306,21 +306,21 @@ func RegisterInboxServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu // RegisterInboxServiceHandlerFromEndpoint is same as RegisterInboxServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterInboxServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/markdown_service.pb.gw.go b/proto/gen/api/v1/markdown_service.pb.gw.go index ee5f04e27ed76..52e66b87a022b 100644 --- a/proto/gen/api/v1/markdown_service.pb.gw.go +++ b/proto/gen/api/v1/markdown_service.pb.gw.go @@ -206,21 +206,21 @@ func RegisterMarkdownServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterMarkdownServiceHandlerFromEndpoint is same as RegisterMarkdownServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterMarkdownServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/memo_service.pb.go b/proto/gen/api/v1/memo_service.pb.go index 7c4d650fb0dd9..c41f848920561 100644 --- a/proto/gen/api/v1/memo_service.pb.go +++ b/proto/gen/api/v1/memo_service.pb.go @@ -315,7 +315,7 @@ type ListMemosRequest struct { // Provide this to retrieve the subsequent page. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Filter is used to filter memos returned in the list. - // Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + // Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` } @@ -435,7 +435,7 @@ type SearchMemosRequest struct { unknownFields protoimpl.UnknownFields // Filter is used to filter memos returned. - // Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + // Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` } @@ -831,7 +831,7 @@ type ListMemoTagsRequest struct { // Format: memos/{id}. Use "memos/-" to list all tags. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Filter is used to filter memos. - // Format: "creator == users/{uid} && visibilities == ['PUBLIC', 'PROTECTED']" + // Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` } diff --git a/proto/gen/api/v1/memo_service.pb.gw.go b/proto/gen/api/v1/memo_service.pb.gw.go index 4a3b4ee8d0a3e..0385766bef0a5 100644 --- a/proto/gen/api/v1/memo_service.pb.gw.go +++ b/proto/gen/api/v1/memo_service.pb.gw.go @@ -1712,21 +1712,21 @@ func RegisterMemoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterMemoServiceHandlerFromEndpoint is same as RegisterMemoServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterMemoServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/resource_service.pb.gw.go b/proto/gen/api/v1/resource_service.pb.gw.go index 4e0182f104ec0..e6873ef16ff66 100644 --- a/proto/gen/api/v1/resource_service.pb.gw.go +++ b/proto/gen/api/v1/resource_service.pb.gw.go @@ -554,21 +554,21 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterResourceServiceHandlerFromEndpoint is same as RegisterResourceServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterResourceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/user_service.pb.go b/proto/gen/api/v1/user_service.pb.go index 8cebfcb87572f..c1fa7ff00db28 100644 --- a/proto/gen/api/v1/user_service.pb.go +++ b/proto/gen/api/v1/user_service.pb.go @@ -306,7 +306,7 @@ type SearchUsersRequest struct { unknownFields protoimpl.UnknownFields // Filter is used to filter users returned in the list. - // Format: "username == frank" + // Format: "username == 'frank'" Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` } diff --git a/proto/gen/api/v1/user_service.pb.gw.go b/proto/gen/api/v1/user_service.pb.gw.go index 9088bb29e01e1..89e6d6d3e9c49 100644 --- a/proto/gen/api/v1/user_service.pb.gw.go +++ b/proto/gen/api/v1/user_service.pb.gw.go @@ -1033,21 +1033,21 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/webhook_service.pb.gw.go b/proto/gen/api/v1/webhook_service.pb.gw.go index b1728d35ca93b..bd8b960fe64fc 100644 --- a/proto/gen/api/v1/webhook_service.pb.gw.go +++ b/proto/gen/api/v1/webhook_service.pb.gw.go @@ -434,21 +434,21 @@ func RegisterWebhookServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterWebhookServiceHandlerFromEndpoint is same as RegisterWebhookServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterWebhookServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/workspace_service.pb.gw.go b/proto/gen/api/v1/workspace_service.pb.gw.go index 5df16678aafb3..96a80d295087b 100644 --- a/proto/gen/api/v1/workspace_service.pb.gw.go +++ b/proto/gen/api/v1/workspace_service.pb.gw.go @@ -86,21 +86,21 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser // RegisterWorkspaceServiceHandlerFromEndpoint is same as RegisterWorkspaceServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterWorkspaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() diff --git a/proto/gen/api/v1/workspace_setting_service.pb.gw.go b/proto/gen/api/v1/workspace_setting_service.pb.gw.go index fea94724d9683..9df10d8f0a84f 100644 --- a/proto/gen/api/v1/workspace_setting_service.pb.gw.go +++ b/proto/gen/api/v1/workspace_setting_service.pb.gw.go @@ -205,21 +205,21 @@ func RegisterWorkspaceSettingServiceHandlerServer(ctx context.Context, mux *runt // RegisterWorkspaceSettingServiceHandlerFromEndpoint is same as RegisterWorkspaceSettingServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterWorkspaceSettingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }()
chore
tweak comments
56ceba2decd983e7cf6f0b84891205b826b16794
2024-05-06 05:08:15
Nabiel Omar Syarif
fix: fix deleting tag from tag lists (#3311)
false
diff --git a/server/router/api/v1/tag_service.go b/server/router/api/v1/tag_service.go index 38013af0a0c5c..2fb163bad2cf1 100644 --- a/server/router/api/v1/tag_service.go +++ b/server/router/api/v1/tag_service.go @@ -137,13 +137,7 @@ func (s *APIV1Service) RenameTag(ctx context.Context, request *v1pb.RenameTagReq } func (s *APIV1Service) DeleteTag(ctx context.Context, request *v1pb.DeleteTagRequest) (*emptypb.Empty, error) { - userID, err := ExtractUserIDFromName(request.Tag.Creator) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid user name: %v", err) - } - user, err := s.Store.GetUser(ctx, &store.FindUser{ - ID: &userID, - }) + user, err := getCurrentUser(ctx, s.Store) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get user: %v", err) } diff --git a/web/src/components/HomeSidebar/TagsSection.tsx b/web/src/components/HomeSidebar/TagsSection.tsx index f4315b1986a9b..c59b5bfec13ec 100644 --- a/web/src/components/HomeSidebar/TagsSection.tsx +++ b/web/src/components/HomeSidebar/TagsSection.tsx @@ -130,6 +130,7 @@ const TagItemContainer: React.FC<TagItemContainerProps> = (props: TagItemContain dialogName: "delete-tag-dialog", onConfirm: async () => { await tagStore.deleteTag(tag.text); + tagStore.fetchTags({ skipCache: true }); }, }); };
fix
fix deleting tag from tag lists (#3311)
7d5f6034827aa35824b6fcae0263bc48ed9bda8e
2024-03-04 08:51:48
Steven
chore: update compact view
false
diff --git a/proto/api/v2/user_service.proto b/proto/api/v2/user_service.proto index 0dd77afbae704..e5372a2101cea 100644 --- a/proto/api/v2/user_service.proto +++ b/proto/api/v2/user_service.proto @@ -161,8 +161,6 @@ message UserSetting { string memo_visibility = 4; // The telegram user id of the user. string telegram_user_id = 5; - // The compact view for a memo. - bool compact_view = 6; } message GetUserSettingRequest { diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md index c5f08292715b8..de2f25f5932e9 100644 --- a/proto/gen/api/v2/README.md +++ b/proto/gen/api/v2/README.md @@ -718,7 +718,6 @@ Used internally for obfuscating the page token. | appearance | [string](#string) | | The preferred appearance of the user. | | memo_visibility | [string](#string) | | The default visibility of the memo. | | telegram_user_id | [string](#string) | | The telegram user id of the user. | -| compact_view | [bool](#bool) | | The compact view for a memo. | diff --git a/proto/gen/api/v2/user_service.pb.go b/proto/gen/api/v2/user_service.pb.go index 4a357b75a183a..58e60e8556767 100644 --- a/proto/gen/api/v2/user_service.pb.go +++ b/proto/gen/api/v2/user_service.pb.go @@ -684,8 +684,6 @@ type UserSetting struct { MemoVisibility string `protobuf:"bytes,4,opt,name=memo_visibility,json=memoVisibility,proto3" json:"memo_visibility,omitempty"` // The telegram user id of the user. TelegramUserId string `protobuf:"bytes,5,opt,name=telegram_user_id,json=telegramUserId,proto3" json:"telegram_user_id,omitempty"` - // The compact view for a memo. - CompactView bool `protobuf:"varint,6,opt,name=compact_view,json=compactView,proto3" json:"compact_view,omitempty"` } func (x *UserSetting) Reset() { @@ -755,13 +753,6 @@ func (x *UserSetting) GetTelegramUserId() string { return "" } -func (x *UserSetting) GetCompactView() bool { - if x != nil { - return x.CompactView - } - return false -} - type GetUserSettingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1415,7 +1406,7 @@ var file_api_v2_user_service_proto_rawDesc = []byte{ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xac, 0x01, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, @@ -1426,180 +1417,178 @@ var file_api_v2_user_service_proto_rawDesc = []byte{ 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x74, 0x65, 0x6c, 0x65, - 0x67, 0x72, 0x61, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, - 0x6d, 0x70, 0x61, 0x63, 0x74, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x56, 0x69, 0x65, 0x77, 0x22, 0x2b, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4d, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x91, 0x01, 0x0a, 0x18, 0x55, 0x70, + 0x67, 0x72, 0x61, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2b, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4d, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x91, 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x50, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x50, 0x0a, - 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, - 0xca, 0x01, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x31, 0x0a, 0x1b, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xca, 0x01, 0x0a, + 0x0f, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x5f, + 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, + 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x31, 0x0a, 0x1b, 0x4c, 0x69, 0x73, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x62, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x42, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x61, 0x0a, 0x1d, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0d, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x22, 0xa3, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x73, 0x41, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x22, 0x61, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x55, 0x0a, 0x1c, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb5, 0x0b, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x6d, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x73, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xda, 0x41, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0d, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x8d, 0x01, - 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x55, 0x0a, 0x1c, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x32, 0xb5, 0x0b, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x63, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1e, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x6d, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, + 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, + 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, + 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x73, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xda, 0x41, 0x04, 0x75, 0x73, 0x65, 0x72, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0d, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x0a, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0xda, 0x41, + 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x32, 0x1b, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x76, 0x0a, 0x0a, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, + 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, + 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, + 0xb3, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x3c, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, - 0x32, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x76, 0x0a, - 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, + 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0xda, 0x41, 0x13, 0x73, 0x65, 0x74, 0x74, 0x69, + 0x6e, 0x67, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x26, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x29, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x15, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, + 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0xc1, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, - 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x12, 0xb3, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0xda, 0x41, 0x13, 0x73, 0x65, - 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, - 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x32, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, - 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0xa8, 0x01, - 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x36, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, - 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0xc1, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0xda, 0x41, 0x11, - 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x2a, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2f, 0x7b, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, 0xa8, 0x01, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, - 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, - 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0xda, 0x41, 0x11, 0x6e, 0x61, 0x6d, + 0x65, 0x2c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x35, 0x2a, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, + 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, + 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, + 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, + 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, + 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, + 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/gen/store/README.md b/proto/gen/store/README.md index b37d9c2e0cc75..5164aa2fb41db 100644 --- a/proto/gen/store/README.md +++ b/proto/gen/store/README.md @@ -289,7 +289,6 @@ | appearance | [string](#string) | | | | memo_visibility | [string](#string) | | | | telegram_user_id | [string](#string) | | | -| compact_view | [bool](#bool) | | | @@ -311,7 +310,6 @@ | USER_SETTING_APPEARANCE | 3 | The appearance of the user. | | USER_SETTING_MEMO_VISIBILITY | 4 | The visibility of the memo. | | USER_SETTING_TELEGRAM_USER_ID | 5 | The telegram user id of the user. | -| USER_SETTING_COMPACT_VIEW | 6 | The compact view for a memo. | diff --git a/proto/gen/store/user_setting.pb.go b/proto/gen/store/user_setting.pb.go index a5653f6e79899..4046368b73235 100644 --- a/proto/gen/store/user_setting.pb.go +++ b/proto/gen/store/user_setting.pb.go @@ -34,8 +34,6 @@ const ( UserSettingKey_USER_SETTING_MEMO_VISIBILITY UserSettingKey = 4 // The telegram user id of the user. UserSettingKey_USER_SETTING_TELEGRAM_USER_ID UserSettingKey = 5 - // The compact view for a memo. - UserSettingKey_USER_SETTING_COMPACT_VIEW UserSettingKey = 6 ) // Enum value maps for UserSettingKey. @@ -47,7 +45,6 @@ var ( 3: "USER_SETTING_APPEARANCE", 4: "USER_SETTING_MEMO_VISIBILITY", 5: "USER_SETTING_TELEGRAM_USER_ID", - 6: "USER_SETTING_COMPACT_VIEW", } UserSettingKey_value = map[string]int32{ "USER_SETTING_KEY_UNSPECIFIED": 0, @@ -56,7 +53,6 @@ var ( "USER_SETTING_APPEARANCE": 3, "USER_SETTING_MEMO_VISIBILITY": 4, "USER_SETTING_TELEGRAM_USER_ID": 5, - "USER_SETTING_COMPACT_VIEW": 6, } ) @@ -101,7 +97,6 @@ type UserSetting struct { // *UserSetting_Appearance // *UserSetting_MemoVisibility // *UserSetting_TelegramUserId - // *UserSetting_CompactView Value isUserSetting_Value `protobuf_oneof:"value"` } @@ -193,13 +188,6 @@ func (x *UserSetting) GetTelegramUserId() string { return "" } -func (x *UserSetting) GetCompactView() bool { - if x, ok := x.GetValue().(*UserSetting_CompactView); ok { - return x.CompactView - } - return false -} - type isUserSetting_Value interface { isUserSetting_Value() } @@ -224,10 +212,6 @@ type UserSetting_TelegramUserId struct { TelegramUserId string `protobuf:"bytes,7,opt,name=telegram_user_id,json=telegramUserId,proto3,oneof"` } -type UserSetting_CompactView struct { - CompactView bool `protobuf:"varint,8,opt,name=compact_view,json=compactView,proto3,oneof"` -} - func (*UserSetting_AccessTokens) isUserSetting_Value() {} func (*UserSetting_Locale) isUserSetting_Value() {} @@ -238,8 +222,6 @@ func (*UserSetting_MemoVisibility) isUserSetting_Value() {} func (*UserSetting_TelegramUserId) isUserSetting_Value() {} -func (*UserSetting_CompactView) isUserSetting_Value() {} - type AccessTokensUserSetting struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -350,7 +332,7 @@ var File_store_user_setting_proto protoreflect.FileDescriptor var file_store_user_setting_proto_rawDesc = []byte{ 0x0a, 0x18, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xe3, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xbe, 0x02, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, @@ -369,48 +351,44 @@ var file_store_user_setting_proto_rawDesc = []byte{ 0x09, 0x48, 0x00, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x6f, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x23, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, - 0x56, 0x69, 0x65, 0x77, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc4, 0x01, - 0x0a, 0x17, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, - 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x30, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x1a, 0x52, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0xec, 0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, - 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x55, 0x53, 0x45, - 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, - 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x53, 0x45, - 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x45, - 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, - 0x4e, 0x47, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x41, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, - 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, - 0x4d, 0x45, 0x4d, 0x4f, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, - 0x04, 0x12, 0x21, 0x0a, 0x1d, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, - 0x47, 0x5f, 0x54, 0x45, 0x4c, 0x45, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, - 0x49, 0x44, 0x10, 0x05, 0x12, 0x1d, 0x0a, 0x19, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, - 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x43, 0x54, 0x5f, 0x56, 0x49, 0x45, - 0x57, 0x10, 0x06, 0x42, 0x9b, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, - 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0e, 0x74, 0x65, 0x6c, 0x65, 0x67, 0x72, 0x61, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x42, + 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xc4, 0x01, 0x0a, 0x17, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0c, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x1a, 0x52, 0x0a, 0x0b, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, + 0xcd, 0x01, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4b, + 0x65, 0x79, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, + 0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, + 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x4f, 0x4b, 0x45, + 0x4e, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, + 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x1b, 0x0a, + 0x17, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x50, + 0x50, 0x45, 0x41, 0x52, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x53, + 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x45, 0x4d, 0x4f, 0x5f, + 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x04, 0x12, 0x21, 0x0a, 0x1d, + 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x54, 0x45, 0x4c, + 0x45, 0x47, 0x52, 0x41, 0x4d, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x49, 0x44, 0x10, 0x05, 0x42, + 0x9b, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x42, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0xa2, 0x02, 0x03, 0x4d, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, + 0x74, 0x6f, 0x72, 0x65, 0xe2, 0x02, 0x17, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x6f, + 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -493,7 +471,6 @@ func file_store_user_setting_proto_init() { (*UserSetting_Appearance)(nil), (*UserSetting_MemoVisibility)(nil), (*UserSetting_TelegramUserId)(nil), - (*UserSetting_CompactView)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/proto/store/user_setting.proto b/proto/store/user_setting.proto index b6df97bbebba2..085bdb2912687 100644 --- a/proto/store/user_setting.proto +++ b/proto/store/user_setting.proto @@ -16,8 +16,6 @@ enum UserSettingKey { USER_SETTING_MEMO_VISIBILITY = 4; // The telegram user id of the user. USER_SETTING_TELEGRAM_USER_ID = 5; - // The compact view for a memo. - USER_SETTING_COMPACT_VIEW = 6; } message UserSetting { @@ -29,7 +27,6 @@ message UserSetting { string appearance = 5; string memo_visibility = 6; string telegram_user_id = 7; - bool compact_view = 8; } } diff --git a/server/route/api/v2/apidocs.swagger.yaml b/server/route/api/v2/apidocs.swagger.yaml index e1f393c995831..30e653c41f210 100644 --- a/server/route/api/v2/apidocs.swagger.yaml +++ b/server/route/api/v2/apidocs.swagger.yaml @@ -1437,9 +1437,6 @@ paths: telegramUserId: type: string description: The telegram user id of the user. - compactView: - type: boolean - description: The compact view for a memo. tags: - UserService /api/v2/{user.name}: @@ -1626,9 +1623,6 @@ definitions: telegramUserId: type: string description: The telegram user id of the user. - compactView: - type: boolean - description: The compact view for a memo. apiv2Webhook: type: object properties: diff --git a/server/route/api/v2/user_service.go b/server/route/api/v2/user_service.go index 23c9efb7f48a0..f9bc6a565107c 100644 --- a/server/route/api/v2/user_service.go +++ b/server/route/api/v2/user_service.go @@ -219,7 +219,6 @@ func getDefaultUserSetting() *apiv2pb.UserSetting { Locale: "en", Appearance: "system", MemoVisibility: "PRIVATE", - CompactView: false, } } @@ -245,8 +244,6 @@ func (s *APIV2Service) GetUserSetting(ctx context.Context, _ *apiv2pb.GetUserSet userSettingMessage.MemoVisibility = setting.GetMemoVisibility() } else if setting.Key == storepb.UserSettingKey_USER_SETTING_TELEGRAM_USER_ID { userSettingMessage.TelegramUserId = setting.GetTelegramUserId() - } else if setting.Key == storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW { - userSettingMessage.CompactView = setting.GetCompactView() } } return &apiv2pb.GetUserSettingResponse{ @@ -305,16 +302,6 @@ func (s *APIV2Service) UpdateUserSetting(ctx context.Context, request *apiv2pb.U }); err != nil { return nil, status.Errorf(codes.Internal, "failed to upsert user setting: %v", err) } - } else if field == "compact_view" { - if _, err := s.Store.UpsertUserSetting(ctx, &storepb.UserSetting{ - UserId: user.ID, - Key: storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW, - Value: &storepb.UserSetting_CompactView{ - CompactView: request.Setting.CompactView, - }, - }); err != nil { - return nil, status.Errorf(codes.Internal, "failed to upsert user setting: %v", err) - } } else { return nil, status.Errorf(codes.InvalidArgument, "invalid update path: %s", field) } diff --git a/store/db/mysql/user_setting.go b/store/db/mysql/user_setting.go index c41446cae22c6..8a2114de844fb 100644 --- a/store/db/mysql/user_setting.go +++ b/store/db/mysql/user_setting.go @@ -3,7 +3,6 @@ package mysql import ( "context" "database/sql" - "strconv" "strings" "github.com/pkg/errors" @@ -30,8 +29,6 @@ func (d *DB) UpsertUserSetting(ctx context.Context, upsert *storepb.UserSetting) valueString = upsert.GetMemoVisibility() } else if upsert.Key == storepb.UserSettingKey_USER_SETTING_TELEGRAM_USER_ID { valueString = upsert.GetTelegramUserId() - } else if upsert.Key == storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW { - valueString = strconv.FormatBool(upsert.GetCompactView()) } else { return nil, errors.Errorf("unknown user setting key: %s", upsert.Key.String()) } @@ -96,14 +93,6 @@ func (d *DB) ListUserSettings(ctx context.Context, find *store.FindUserSetting) userSetting.Value = &storepb.UserSetting_TelegramUserId{ TelegramUserId: valueString, } - } else if userSetting.Key == storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW { - compactView, err := strconv.ParseBool(valueString) - if err != nil { - return nil, errors.Wrapf(err, "failed to parse compact view value: %s", valueString) - } - userSetting.Value = &storepb.UserSetting_CompactView{ - CompactView: compactView, - } } else { // Skip unknown user setting key. continue diff --git a/store/db/postgres/user_setting.go b/store/db/postgres/user_setting.go index 09078f1541ffb..71c5fd3fa702b 100644 --- a/store/db/postgres/user_setting.go +++ b/store/db/postgres/user_setting.go @@ -3,7 +3,6 @@ package postgres import ( "context" "database/sql" - "strconv" "strings" "github.com/pkg/errors" @@ -37,8 +36,6 @@ func (d *DB) UpsertUserSetting(ctx context.Context, upsert *storepb.UserSetting) valueString = upsert.GetMemoVisibility() } else if upsert.Key == storepb.UserSettingKey_USER_SETTING_TELEGRAM_USER_ID { valueString = upsert.GetTelegramUserId() - } else if upsert.Key == storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW { - valueString = strconv.FormatBool(upsert.GetCompactView()) } else { return nil, errors.Errorf("unknown user setting key: %s", upsert.Key.String()) } @@ -109,14 +106,6 @@ func (d *DB) ListUserSettings(ctx context.Context, find *store.FindUserSetting) userSetting.Value = &storepb.UserSetting_TelegramUserId{ TelegramUserId: valueString, } - } else if userSetting.Key == storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW { - compactView, err := strconv.ParseBool(valueString) - if err != nil { - return nil, errors.Wrapf(err, "failed to parse compact view value: %s", valueString) - } - userSetting.Value = &storepb.UserSetting_CompactView{ - CompactView: compactView, - } } else { // Skip unknown user setting key. continue diff --git a/store/db/sqlite/user_setting.go b/store/db/sqlite/user_setting.go index 3a1c79bbf18ba..95e065e89832b 100644 --- a/store/db/sqlite/user_setting.go +++ b/store/db/sqlite/user_setting.go @@ -3,7 +3,6 @@ package sqlite import ( "context" "database/sql" - "strconv" "strings" "github.com/pkg/errors" @@ -37,8 +36,6 @@ func (d *DB) UpsertUserSetting(ctx context.Context, upsert *storepb.UserSetting) valueString = upsert.GetMemoVisibility() } else if upsert.Key == storepb.UserSettingKey_USER_SETTING_TELEGRAM_USER_ID { valueString = upsert.GetTelegramUserId() - } else if upsert.Key == storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW { - valueString = strconv.FormatBool(upsert.GetCompactView()) } else { return nil, errors.Errorf("unknown user setting key: %s", upsert.Key.String()) } @@ -109,14 +106,6 @@ func (d *DB) ListUserSettings(ctx context.Context, find *store.FindUserSetting) userSetting.Value = &storepb.UserSetting_TelegramUserId{ TelegramUserId: valueString, } - } else if userSetting.Key == storepb.UserSettingKey_USER_SETTING_COMPACT_VIEW { - compactView, err := strconv.ParseBool(valueString) - if err != nil { - return nil, errors.Wrapf(err, "failed to parse compact view value: %s", valueString) - } - userSetting.Value = &storepb.UserSetting_CompactView{ - CompactView: compactView, - } } else { // Skip unknown user setting key. continue diff --git a/web/src/assets/gomark.wasm b/web/src/assets/gomark.wasm index 2d54c883a08fd..19832458ee971 100755 Binary files a/web/src/assets/gomark.wasm and b/web/src/assets/gomark.wasm differ diff --git a/web/src/assets/wasm_exec.js b/web/src/assets/wasm_exec.js index 216bc868a17c6..480c2a4f75415 100644 --- a/web/src/assets/wasm_exec.js +++ b/web/src/assets/wasm_exec.js @@ -363,6 +363,7 @@ "syscall/js.finalizeRef": (v_ref) => { // Note: TinyGo does not support finalizers so this should never be // called. + console.warn("syscall/js.finalizeRef not implemented"); }, // func stringVal(value string) ref diff --git a/web/src/components/MemoContent/CodeBlock.tsx b/web/src/components/MemoContent/CodeBlock.tsx index 2bac583b2ccea..3165b01000172 100644 --- a/web/src/components/MemoContent/CodeBlock.tsx +++ b/web/src/components/MemoContent/CodeBlock.tsx @@ -28,10 +28,13 @@ const CodeBlock: React.FC<Props> = ({ language, content }: Props) => { let highlightedCode = content; try { - const temp = hljs.highlight(content, { - language: formatedLanguage, - }).value; - highlightedCode = temp; + const lang = hljs.getLanguage(formatedLanguage); + if (lang) { + const temp = hljs.highlight(content, { + language: formatedLanguage, + }).value; + highlightedCode = temp; + } } catch (error) { // Skip error and use default highlighted code. } diff --git a/web/src/components/MemoContent/Renderer.tsx b/web/src/components/MemoContent/Renderer.tsx index 6739da017d44f..7667e84169383 100644 --- a/web/src/components/MemoContent/Renderer.tsx +++ b/web/src/components/MemoContent/Renderer.tsx @@ -62,67 +62,66 @@ interface Props { node: Node; } -const Renderer: React.FC<Props> = ({ index, node: rawNode }: Props) => { - const { type, node } = rawNode; - switch (type) { +const Renderer: React.FC<Props> = ({ index, node }: Props) => { + switch (node.type) { case NodeType.LINE_BREAK: return <LineBreak index={index} />; case NodeType.PARAGRAPH: - return <Paragraph index={index} {...(node as ParagraphNode)} />; + return <Paragraph index={index} {...(node.value as ParagraphNode)} />; case NodeType.CODE_BLOCK: - return <CodeBlock index={index} {...(node as CodeBlockNode)} />; + return <CodeBlock index={index} {...(node.value as CodeBlockNode)} />; case NodeType.HEADING: - return <Heading index={index} {...(node as HeadingNode)} />; + return <Heading index={index} {...(node.value as HeadingNode)} />; case NodeType.HORIZONTAL_RULE: - return <HorizontalRule index={index} {...(node as HorizontalRuleNode)} />; + return <HorizontalRule index={index} {...(node.value as HorizontalRuleNode)} />; case NodeType.BLOCKQUOTE: - return <Blockquote index={index} {...(node as BlockquoteNode)} />; + return <Blockquote index={index} {...(node.value as BlockquoteNode)} />; case NodeType.ORDERED_LIST: - return <OrderedList index={index} {...(node as OrderedListNode)} />; + return <OrderedList index={index} {...(node.value as OrderedListNode)} />; case NodeType.UNORDERED_LIST: - return <UnorderedList {...(node as UnorderedListNode)} />; + return <UnorderedList {...(node.value as UnorderedListNode)} />; case NodeType.TASK_LIST: - return <TaskList index={index} {...(node as TaskListNode)} />; + return <TaskList index={index} {...(node.value as TaskListNode)} />; case NodeType.MATH_BLOCK: - return <Math {...(node as MathNode)} block={true} />; + return <Math {...(node.value as MathNode)} block={true} />; case NodeType.TABLE: - return <Table {...(node as TableNode)} />; + return <Table {...(node.value as TableNode)} />; case NodeType.EMBEDDED_CONTENT: - return <EmbeddedContent {...(node as EmbeddedContentNode)} />; + return <EmbeddedContent {...(node.value as EmbeddedContentNode)} />; case NodeType.TEXT: - return <Text {...(node as TextNode)} />; + return <Text {...(node.value as TextNode)} />; case NodeType.BOLD: - return <Bold {...(node as BoldNode)} />; + return <Bold {...(node.value as BoldNode)} />; case NodeType.ITALIC: - return <Italic {...(node as ItalicNode)} />; + return <Italic {...(node.value as ItalicNode)} />; case NodeType.BOLD_ITALIC: - return <BoldItalic {...(node as BoldItalicNode)} />; + return <BoldItalic {...(node.value as BoldItalicNode)} />; case NodeType.CODE: - return <Code {...(node as CodeNode)} />; + return <Code {...(node.value as CodeNode)} />; case NodeType.IMAGE: - return <Image {...(node as ImageNode)} />; + return <Image {...(node.value as ImageNode)} />; case NodeType.LINK: - return <Link {...(node as LinkNode)} />; + return <Link {...(node.value as LinkNode)} />; case NodeType.AUTO_LINK: - return <Link {...(node as AutoLinkNode)} />; + return <Link {...(node.value as AutoLinkNode)} />; case NodeType.TAG: - return <Tag {...(node as TagNode)} />; + return <Tag {...(node.value as TagNode)} />; case NodeType.STRIKETHROUGH: - return <Strikethrough {...(node as StrikethroughNode)} />; + return <Strikethrough {...(node.value as StrikethroughNode)} />; case NodeType.MATH: - return <Math {...(node as MathNode)} />; + return <Math {...(node.value as MathNode)} />; case NodeType.HIGHLIGHT: - return <Highlight {...(node as HighlightNode)} />; + return <Highlight {...(node.value as HighlightNode)} />; case NodeType.ESCAPING_CHARACTER: - return <EscapingCharacter {...(node as EscapingCharacterNode)} />; + return <EscapingCharacter {...(node.value as EscapingCharacterNode)} />; case NodeType.SUBSCRIPT: - return <Subscript {...(node as SubscriptNode)} />; + return <Subscript {...(node.value as SubscriptNode)} />; case NodeType.SUPERSCRIPT: - return <Superscript {...(node as SuperscriptNode)} />; + return <Superscript {...(node.value as SuperscriptNode)} />; case NodeType.REFERENCED_CONTENT: - return <ReferencedContent {...(node as ReferencedContentNode)} />; + return <ReferencedContent {...(node.value as ReferencedContentNode)} />; case NodeType.SPOILER: - return <Spoiler {...(node as SpoilerNode)} />; + return <Spoiler {...(node.value as SpoilerNode)} />; default: return null; } diff --git a/web/src/components/MemoContent/TaskList.tsx b/web/src/components/MemoContent/TaskList.tsx index 3ba4c95ce6c9a..90d8f11d23026 100644 --- a/web/src/components/MemoContent/TaskList.tsx +++ b/web/src/components/MemoContent/TaskList.tsx @@ -31,11 +31,11 @@ const TaskList: React.FC<Props> = ({ index, indent, complete, children }: Props) } const node = context.nodes[nodeIndex]; - if (node.type !== NodeType.TASK_LIST || !node.node) { + if (node.type !== NodeType.TASK_LIST || !node.value) { return; } - (node.node as TaskListNode)!.complete = on; + (node.value as TaskListNode)!.complete = on; const content = window.restore(context.nodes); await memoStore.updateMemo( { diff --git a/web/src/components/MemoContent/index.tsx b/web/src/components/MemoContent/index.tsx index 41cb996c4dfcd..09ed45b9add0d 100644 --- a/web/src/components/MemoContent/index.tsx +++ b/web/src/components/MemoContent/index.tsx @@ -1,13 +1,21 @@ -import { memo, useRef } from "react"; +import classNames from "classnames"; +import { memo, useEffect, useRef, useState } from "react"; +import { Link } from "react-router-dom"; import useCurrentUser from "@/hooks/useCurrentUser"; import { useMemoStore } from "@/store/v1"; import { Node, NodeType } from "@/types/node"; +import { useTranslate } from "@/utils/i18n"; +import Icon from "../Icon"; import Renderer from "./Renderer"; import { RendererContext } from "./types"; +// MAX_DISPLAY_HEIGHT is the maximum height of the memo content to display in compact mode. +const MAX_DISPLAY_HEIGHT = 256; + interface Props { content: string; memoId?: number; + compact?: boolean; readonly?: boolean; disableFilter?: boolean; // embeddedMemos is a set of memo resource names that are embedded in the current memo. @@ -19,11 +27,28 @@ interface Props { const MemoContent: React.FC<Props> = (props: Props) => { const { className, content, memoId, embeddedMemos, onClick } = props; + const t = useTranslate(); const currentUser = useCurrentUser(); const memoStore = useMemoStore(); const memoContentContainerRef = useRef<HTMLDivElement>(null); + const [showCompactMode, setShowCompactMode] = useState<boolean>(false); + const memo = memoId ? memoStore.getMemoById(memoId) : null; const nodes = window.parse(content); - const allowEdit = !props.readonly && memoId && currentUser?.id === memoStore.getMemoById(memoId)?.creatorId; + const allowEdit = !props.readonly && memo && currentUser?.id === memo.creatorId; + + // Initial compact mode. + useEffect(() => { + if (!props.compact) { + return; + } + if (!memoContentContainerRef.current) { + return; + } + + if ((memoContentContainerRef.current as HTMLDivElement).getBoundingClientRect().height > MAX_DISPLAY_HEIGHT) { + setShowCompactMode(true); + } + }, []); const handleMemoContentClick = async (e: React.MouseEvent) => { if (onClick) { @@ -35,34 +60,50 @@ const MemoContent: React.FC<Props> = (props: Props) => { let skipNextLineBreakFlag = false; return ( - <RendererContext.Provider - value={{ - nodes, - memoId, - readonly: !allowEdit, - disableFilter: props.disableFilter, - embeddedMemos: embeddedMemos || new Set(), - }} - > - <div className={`w-full flex flex-col justify-start items-start text-gray-800 dark:text-gray-300 ${className || ""}`}> - <div - ref={memoContentContainerRef} - className="w-full max-w-full word-break text-base leading-6 space-y-1 whitespace-pre-wrap" - onClick={handleMemoContentClick} - > - {nodes.map((node, index) => { - if (prevNode?.type !== NodeType.LINE_BREAK && node.type === NodeType.LINE_BREAK && skipNextLineBreakFlag) { - skipNextLineBreakFlag = false; - return null; - } + <> + <RendererContext.Provider + value={{ + nodes, + memoId, + readonly: !allowEdit, + disableFilter: props.disableFilter, + embeddedMemos: embeddedMemos || new Set(), + }} + > + <div className={`w-full flex flex-col justify-start items-start text-gray-800 dark:text-gray-300 ${className || ""}`}> + <div + ref={memoContentContainerRef} + className={classNames( + "w-full max-w-full word-break text-base leading-6 space-y-1 whitespace-pre-wrap", + showCompactMode && "line-clamp-6", + )} + onClick={handleMemoContentClick} + > + {nodes.map((node, index) => { + if (prevNode?.type !== NodeType.LINE_BREAK && node.type === NodeType.LINE_BREAK && skipNextLineBreakFlag) { + skipNextLineBreakFlag = false; + return null; + } - prevNode = node; - skipNextLineBreakFlag = true; - return <Renderer key={`${node.type}-${index}`} index={String(index)} node={node} />; - })} + prevNode = node; + skipNextLineBreakFlag = true; + return <Renderer key={`${node.type}-${index}`} index={String(index)} node={node} />; + })} + </div> + </div> + </RendererContext.Provider> + {memo && showCompactMode && ( + <div className="w-full mt-2"> + <Link + className="w-auto inline-flex flex-row justify-start items-center text-sm text-blue-600 dark:text-blue-400 hover:underline" + to={`/m/${memo.name}`} + > + <span>{t("memo.show-more")}</span> + <Icon.ChevronRight className="w-4 h-auto" /> + </Link> </div> - </div> - </RendererContext.Provider> + )} + </> ); }; diff --git a/web/src/components/MemoView.tsx b/web/src/components/MemoView.tsx index cae32cc9ec150..8b74a69701eb7 100644 --- a/web/src/components/MemoView.tsx +++ b/web/src/components/MemoView.tsx @@ -42,7 +42,6 @@ const MemoView: React.FC<Props> = (props: Props) => { const [displayTime, setDisplayTime] = useState<string>(getRelativeTimeString(getTimeStampByDate(memo.displayTime))); const [creator, setCreator] = useState(userStore.getUserByUsername(extractUsernameFromName(memo.creator))); const memoContainerRef = useRef<HTMLDivElement>(null); - const [showCompactMode, setShowCompactMode] = useState(false); const referencedMemos = memo.relations.filter((relation) => relation.type === MemoRelation_Type.REFERENCE); const commentAmount = memo.relations.filter((relation) => relation.type === MemoRelation_Type.COMMENT).length; const readonly = memo.creator !== user?.name; @@ -55,16 +54,6 @@ const MemoView: React.FC<Props> = (props: Props) => { })(); }, []); - // Initial compact mode. - useEffect(() => { - if (!memoContainerRef.current) { - return; - } - if ((memoContainerRef.current as HTMLDivElement).getBoundingClientRect().height > 512) { - setShowCompactMode(true); - } - }, []); - // Update display time string. useEffect(() => { let intervalFlag: any = -1; @@ -163,24 +152,13 @@ const MemoView: React.FC<Props> = (props: Props) => { </div> </div> <MemoContent - className={showCompactMode ? "!line-clamp-6" : ""} key={`${memo.id}-${memo.updateTime}`} memoId={memo.id} content={memo.content} readonly={readonly} onClick={handleMemoContentClick} + compact={true} /> - {showCompactMode && ( - <div className="w-full mt-2"> - <Link - className="w-auto flex flex-row justify-start items-center text-sm text-blue-600 dark:text-blue-400 hover:underline" - to={`/m/${memo.name}`} - > - <span>{t("memo.show-more")}</span> - <Icon.ChevronRight className="w-4 h-auto" /> - </Link> - </div> - )} <MemoResourceListView resources={memo.resources} /> <MemoRelationListView memo={memo} relations={referencedMemos} /> <MemoReactionistView memo={memo} reactions={memo.reactions} /> diff --git a/web/src/components/Settings/SystemSection.tsx b/web/src/components/Settings/SystemSection.tsx index f22a20f387c30..db7d15f092371 100644 --- a/web/src/components/Settings/SystemSection.tsx +++ b/web/src/components/Settings/SystemSection.tsx @@ -216,7 +216,7 @@ const SystemSection = () => { <div className="w-full flex flex-col gap-2 pt-2 pb-4"> <p className="font-medium text-gray-700 dark:text-gray-500">{t("common.basic")}</p> <div className="w-full flex flex-row justify-between items-center"> - <div className="normal-text"> + <div> {t("setting.system-section.server-name")}: <span className="font-mono font-bold">{systemStatus.customizedProfile.name}</span> </div> <Button onClick={handleUpdateCustomizedProfileButtonClick}>{t("common.edit")}</Button> @@ -267,7 +267,7 @@ const SystemSection = () => { </div> <div className="space-y-2 border rounded-md py-2 px-3 dark:border-zinc-700"> <div className="w-full flex flex-row justify-between items-center"> - <span className="normal-text">{t("setting.system-section.additional-style")}</span> + <span>{t("setting.system-section.additional-style")}</span> <Button variant="outlined" color="neutral" onClick={handleSaveAdditionalStyle}> {t("common.save")} </Button> @@ -285,7 +285,7 @@ const SystemSection = () => { onChange={(event) => handleAdditionalStyleChanged(event.target.value)} /> <div className="w-full flex flex-row justify-between items-center"> - <span className="normal-text">{t("setting.system-section.additional-script")}</span> + <span>{t("setting.system-section.additional-script")}</span> <Button variant="outlined" color="neutral" onClick={handleSaveAdditionalScript}> {t("common.save")} </Button> @@ -317,16 +317,16 @@ const SystemSection = () => { <Divider className="!my-3" /> <p className="font-medium text-gray-700 dark:text-gray-500">Others</p> <div className="w-full flex flex-row justify-between items-center"> - <span className="normal-text">{t("setting.system-section.disable-public-memos")}</span> + <span>{t("setting.system-section.disable-public-memos")}</span> <Switch checked={state.disablePublicMemos} onChange={(event) => handleDisablePublicMemosChanged(event.target.checked)} /> </div> <div className="w-full flex flex-row justify-between items-center"> - <span className="normal-text">{t("setting.system-section.display-with-updated-time")}</span> + <span>{t("setting.system-section.display-with-updated-time")}</span> <Switch checked={state.memoDisplayWithUpdatedTs} onChange={(event) => handleMemoDisplayWithUpdatedTs(event.target.checked)} /> </div> <div className="w-full flex flex-row justify-between items-center"> <div className="flex flex-row items-center"> - <span className="text-sm mr-1">{t("setting.system-section.max-upload-size")}</span> + <span className="mr-1">{t("setting.system-section.max-upload-size")}</span> <Tooltip title={t("setting.system-section.max-upload-size-hint")} placement="top"> <Icon.HelpCircle className="w-4 h-auto" /> </Tooltip> diff --git a/web/src/types/node.ts b/web/src/types/node.ts index e4fad88025e1b..e09d1bb781f43 100644 --- a/web/src/types/node.ts +++ b/web/src/types/node.ts @@ -32,7 +32,7 @@ export enum NodeType { export interface Node { type: NodeType; - node: + value: | LineBreakNode | ParagraphNode | CodeBlockNode diff --git a/web/src/utils/tag.ts b/web/src/utils/tag.ts index 07690a9f356b6..ceb5a2fbd4c19 100644 --- a/web/src/utils/tag.ts +++ b/web/src/utils/tag.ts @@ -1,4 +1,4 @@ -import { Node } from "@/types/node"; +import { Node, TagNode } from "@/types/node"; export const TAG_REG = /#([^\s#,]+)/; @@ -15,7 +15,7 @@ export const extractTagsFromContent = (content: string) => { handle(node); if (node.type === "PARAGRAPH" || node.type === "ORDERED_LIST" || node.type === "UNORDERED_LIST") { - const children = (node.node as any).children; + const children = (node.value as any).children; if (Array.isArray(children)) { traverse(children, handle); } @@ -24,8 +24,8 @@ export const extractTagsFromContent = (content: string) => { }; traverse(nodes, (node) => { - if (node.type === "TAG" && node.node) { - tags.add((node.node as any).content); + if (node.type === "TAG" && node.value) { + tags.add((node.value as TagNode).content); } });
chore
update compact view
e54ff5ec9e22bc6f7246404c13545c12184b34f4
2022-08-22 17:56:47
boojack
fix: unescape filename (#158)
false
diff --git a/server/webhook.go b/server/webhook.go index 975f7cb9ce658..89cf512029ceb 100644 --- a/server/webhook.go +++ b/server/webhook.go @@ -2,6 +2,7 @@ package server import ( "fmt" + "html" "net/http" "strconv" @@ -22,7 +23,7 @@ func (s *Server) registerWebhookRoutes(g *echo.Group) { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("ID is not a number: %s", c.Param("resourceId"))).SetInternal(err) } - filename := c.Param("filename") + filename := html.UnescapeString(c.Param("filename")) resourceFind := &api.ResourceFind{ ID: &resourceID, Filename: &filename,
fix
unescape filename (#158)
ae61ade2b16a2e40ee3ab3085e131dbb2b09c88b
2023-02-27 19:00:54
boojack
chore: add my account entry in user dropdown (#1187)
false
diff --git a/web/src/components/SettingDialog.tsx b/web/src/components/SettingDialog.tsx index 4cd8e88d89aac..8b5479edec3b2 100644 --- a/web/src/components/SettingDialog.tsx +++ b/web/src/components/SettingDialog.tsx @@ -13,21 +13,23 @@ import StorageSection from "./Settings/StorageSection"; import SSOSection from "./Settings/SSOSection"; import "../less/setting-dialog.less"; -type Props = DialogProps; - type SettingSection = "my-account" | "preference" | "member" | "system" | "storage" | "sso"; +interface Props extends DialogProps { + selectedSection?: SettingSection; +} + interface State { selectedSection: SettingSection; } const SettingDialog: React.FC<Props> = (props: Props) => { - const { destroy } = props; + const { destroy, selectedSection } = props; const { t } = useTranslation(); const userStore = useUserStore(); const user = userStore.state.user; const [state, setState] = useState<State>({ - selectedSection: "my-account", + selectedSection: selectedSection || "my-account", }); const isHost = user?.role === "HOST"; @@ -128,13 +130,15 @@ const SettingDialog: React.FC<Props> = (props: Props) => { ); }; -export default function showSettingDialog(): void { +export default function showSettingDialog(selectedSection?: SettingSection): void { generateDialog( { className: "setting-dialog", dialogName: "setting-dialog", }, SettingDialog, - {} + { + selectedSection, + } ); } diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx index 9029be7b32225..b9b4d212835d6 100644 --- a/web/src/components/UserBanner.tsx +++ b/web/src/components/UserBanner.tsx @@ -7,6 +7,7 @@ import Dropdown from "./common/Dropdown"; import showArchivedMemoDialog from "./ArchivedMemoDialog"; import showAboutSiteDialog from "./AboutSiteDialog"; import UserAvatar from "./UserAvatar"; +import showSettingDialog from "./SettingDialog"; const UserBanner = () => { const { t } = useTranslation(); @@ -44,6 +45,10 @@ const UserBanner = () => { }); }, [memos]); + const handleMyAccountClick = () => { + showSettingDialog("my-account"); + }; + const handleArchivedBtnClick = () => { showArchivedMemoDialog(); }; @@ -77,6 +82,12 @@ const UserBanner = () => { <> {!userStore.isVisitorMode() && ( <> + <button + className="w-full px-3 truncate text-left leading-10 cursor-pointer rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800" + onClick={handleMyAccountClick} + > + <span className="mr-1">🤠</span> {t("setting.my-account")} + </button> <button className="w-full px-3 truncate text-left leading-10 cursor-pointer rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800" onClick={handleArchivedBtnClick} @@ -89,7 +100,7 @@ const UserBanner = () => { className="w-full px-3 truncate text-left leading-10 cursor-pointer rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-800" onClick={handleAboutBtnClick} > - <span className="mr-1">🤠</span> {t("common.about")} + <span className="mr-1">🏂</span> {t("common.about")} </button> {!userStore.isVisitorMode() && ( <button
chore
add my account entry in user dropdown (#1187)
af71ac49bbf0048989b3b6c536208d954bd7b10a
2024-05-25 03:13:37
quaintdev
feat(i18n): added marathi(mr) translations (#3449)
false
diff --git a/web/src/i18n.ts b/web/src/i18n.ts index 377edb06245f9..e391ca98f013d 100644 --- a/web/src/i18n.ts +++ b/web/src/i18n.ts @@ -15,6 +15,7 @@ export const locales = [ "it", "ja", "ko", + "mr", "nl", "pl", "pt-BR", diff --git a/web/src/locales/mr.json b/web/src/locales/mr.json index 8a56569639c31..f12fc28a2bada 100644 --- a/web/src/locales/mr.json +++ b/web/src/locales/mr.json @@ -59,6 +59,251 @@ "select": "निवडा", "settings": "सेटिंग्ज", "share": "शेअर करा", - "sign-in": "साइन इन करा" + "sign-in": "साइन इन करा", + "sign-in-with": "{{provider}} सह साइन इन करा", + "sign-out": "साइन आउट करा", + "sign-up": "साइन अप करा", + "statistics": "आकडेवारी", + "tags": "टॅग्ज", + "title": "शीर्षक", + "type": "प्रकार", + "unpin": "अनपिन", + "update": "अपडेट करा", + "upload": "अपलोड करा", + "username": "वापरकर्तानाव", + "version": "आवृत्ती", + "visibility": "दृश्यमानता", + "yourself": "स्वतः" + }, + "days": { + "fri": "शुक्र", + "mon": "सोम", + "sat": "शनि", + "sun": "रवि", + "thu": "गुरु", + "tue": "मंगळ", + "wed": "बुध" + }, + "editor": { + "add-your-comment-here": "तुमची टिप्पणी येथे जो़डा", + "any-thoughts": "आपले विचार...", + "save": "जतन" + }, + "inbox": { + "memo-comment": "{{user}} ची तुमच्या {{memo}} वर टिप्पणी आहे.", + "version-update": "नवीन आवृत्ती {{version}} आता उपलब्ध आहे!" + }, + "memo": { + "archived-at": "येथे संग्रहित", + "comment": { + "self": "टिप्पण्या", + "write-a-comment": "टिप्पणी लिहा" + }, + "copy-link": "लिंकची प्रत बनवा", + "count-memos-in-date": "{{date}} ला {{count}} मेमो लिहीलीत", + "delete-confirm": "हा मेमो हटवण्याची तुम्हाला खात्री आहे का? हि क्रिया अपरिवर्तनीय आहे", + "delete-memo": "मेमो हटवा", + "embed": "एम्बेड करा", + "fetch-more": "अधिकसाठी क्लिक करा", + "fetching-data": "माहिती मागवत आहे…", + "no-archived-memos": "कोणतेही संग्रहित मेमो नाहीत.", + "search-placeholder": "मेमोज शोधा", + "show-more": "अधिक दाखवा", + "view-detail": "तपशील दाखवा", + "visibility": { + "disabled": "सार्वजनिक मेमो अक्षम केले आहेत", + "private": "खाजगी", + "protected": "कार्यक्षेत्र", + "public": "सार्वजनिक" + }, + "wrapping": "गुंडाळा" + }, + "message": { + "archived-successfully": "यशस्वीरित्या संग्रहित केले", + "change-memo-created-time": "मेमो तयार केलेली वेळ बदला", + "copied": "प्रत बनवली", + "deleted-successfully": "यशस्वीरित्या हटवले", + "fill-all": "कृपया सर्व फील्ड भरा.", + "maximum-upload-size-is": "कमाल अनुमत अपलोड आकार {{size}} MiB आहे", + "memo-not-found": "मेमो सापडला नाही.", + "new-password-not-match": "नवीन पासवर्ड जुळत नाहीत.", + "no-data": "माहिती आढळली नाही.", + "password-changed": "पासवर्ड बदलला", + "password-not-match": "पासवर्ड जुळत नाही.", + "restored-successfully": "यशस्वीरित्या पुनर्संचयित केले", + "succeed-copy-link": "लिंक यशस्वीरित्या कॉपी केली.", + "update-succeed": "अपडेट यशस्वी झाले", + "user-not-found": "वापरकर्ता सापडला नाही" + }, + "reference": { + "add-references": "संदर्भ जोडा", + "embedded-usage": "एम्बेडेड सामग्री म्हणून वापरा", + "no-memos-found": "कोणतेही मेमो आढळले नाहीत", + "search-placeholder": "सामग्री शोधा" + }, + "resource": { + "clear": "साफ", + "copy-link": "लिंक कॉपी करा", + "create-dialog": { + "external-link": { + "file-name": "फाईलचे नाव", + "file-name-placeholder": "फाईलचे नाव", + "link": "लिंक", + "link-placeholder": "https://the.link.to/your/resource", + "option": "बाह्य लिंक", + "type": "प्रकार", + "type-placeholder": "फाईल प्रकार" + }, + "local-file": { + "choose": "एक फाइल निवडा…", + "option": "स्थानिक फाइल" + }, + "title": "संसाधन तयार करा", + "upload-method": "अपलोड पद्धत" + }, + "delete-resource": "संसाधन हटवा", + "delete-selected-resources": "निवडलेली संसाधने हटवा", + "fetching-data": "डेटा आणत आहे…", + "file-drag-drop-prompt": "फाइल अपलोड करण्यासाठी तुमची फाइल येथे ड्रॅग आणि ड्रॉप करा", + "linked-amount": "लिंक केलेली रक्कम", + "no-files-selected": "कोणत्याही फाइल्स निवडल्या नाहीत", + "no-resources": "संसाधने नाहीत.", + "no-unused-resources": "कोणतीही न वापरलेली संसाधने नाहीत", + "reset-link": "लिंक रीसेट करा", + "reset-link-prompt": "तुम्हाला लिंक रीसेट करण्याची खात्री आहे का? हे सर्व वर्तमान लिंक वापर खंडित करेल. ही क्रिया अपरिवर्तनीय आहे", + "reset-resource-link": "संसाधन लिंक रीसेट करा" + }, + "router": { + "back-to-top": "परत वर जा", + "go-to-home": "घरी जा" + }, + "setting": { + "account-section": { + "change-password": "पासवर्ड बदला", + "email-note": "ऐच्छिक", + "export-memos": "मेमो निर्यात करा", + "nickname-note": "बॅनर मध्ये प्रदर्शित", + "openapi-reset": "OpenAPI की रीसेट करा", + "openapi-sample-post": "{{url}} कडून नमस्कार #मेमो", + "openapi-title": "OpenAPI", + "reset-api": "API रीसेट करा", + "title": "खाते माहिती", + "update-information": "माहिती अपडेट करा", + "username-note": "साइन इन करण्यासाठी वापरले जाते" + }, + "appearance-option": { + "dark": "नेहमी अंधार", + "light": "नेहमी प्रकाश", + "system": "प्रणालीचे अनुसरण करा" + }, + "member": "सदस्य", + "member-list": "सदस्य यादी", + "member-section": { + "archive-member": "संग्रहण सदस्य", + "archive-warning": "तुम्हाला {{username}} संग्रहित करण्याची खात्री आहे?", + "create-a-member": "सदस्य तयार करा", + "delete-member": "सदस्य हटवा", + "delete-warning": "तुम्हाला नक्की {{username}} हटवायचे आहे का? ही क्रिया अपरिवर्तनीय आहे" + }, + "my-account": "माझे खाते", + "preference": "प्राधान्ये", + "preference-section": { + "default-memo-sort-option": "मेमो प्रदर्शन वेळ", + "default-memo-visibility": "डीफॉल्ट मेमो दृश्यमानता", + "theme": "थीम" + }, + "sso": "SSO", + "sso-section": { + "authorization-endpoint": "अधिकृतता एन्डपाॅंइन्ट", + "client-id": "क्लायंट आयडी", + "client-secret": "क्लायंट गुपित", + "confirm-delete": "तुम्हाला \"{{name}}\" SSO कॉन्फिगरेशन हटवण्याची खात्री आहे का? ही क्रिया अपरिवर्तनीय आहे", + "create-sso": "SSO तयार करा", + "custom": "सानुकूल", + "delete-sso": "हटविण्याची पुष्टी करा", + "disabled-password-login-warning": "पासवर्ड-लॉगिन अक्षम केले आहे, ओळख प्रदाते काढताना अधिक काळजी घ्या", + "display-name": "प्रदर्शनासाठी नाव", + "identifier": "ओळखकर्ता", + "identifier-filter": "अभिज्ञापक फिल्टर", + "redirect-url": "URL पुनर्निर्देशित करा", + "scopes": "व्याप्ती", + "sso-created": "SSO {{name}} तयार केले", + "sso-list": "SSO सूची", + "sso-updated": "SSO {{name}} अपडेट केले", + "template": "साचा", + "token-endpoint": "टोकन एंडपॉइंट", + "update-sso": "SSO अपडेट करा", + "user-endpoint": "वापरकर्ता एंडपॉइंट" + }, + "storage": "स्टोरेज", + "storage-section": { + "accesskey": "प्रवेश की", + "accesskey-placeholder": "प्रवेश की / प्रवेश आयडी", + "bucket": "बादली", + "bucket-placeholder": "बादली नाव", + "create-a-service": "सेवा तयार करा", + "create-storage": "स्टोरेज तयार करा", + "current-storage": "वर्तमान ऑब्जेक्ट स्टोरेज", + "delete-storage": "स्टोरेज हटवा", + "endpoint": "एन्डपाॅंईन्ट", + "local-storage-path": "स्थानिक स्टोरेज मार्ग", + "path": "स्टोरेज पथ", + "path-description": "तुम्ही स्थानिक स्टोरेजमधून समान डायनॅमिक व्हेरिएबल्स वापरू शकता, जसे की {filename}", + "path-placeholder": "सानुकूल/पथ", + "presign-placeholder": "पूर्व-स्वाक्षरी URL, पर्यायी", + "region": "प्रदेश", + "region-placeholder": "प्रदेशाचे नाव", + "s3-compatible-url": "S3 सुसंगत URL", + "secretkey": "गुप्त की", + "secretkey-placeholder": "गुप्त की / प्रवेश की", + "storage-services": "स्टोरेज सेवा", + "type-database": "डेटाबेस", + "type-local": "स्थानिक फाइल सिस्टम", + "update-a-service": "सेवा अपडेट करा", + "update-local-path": "स्थानिक स्टोरेज पथ अपडेट करा", + "update-local-path-description": "स्थानिक स्टोरेज पथ हा तुमच्या डेटाबेस फाइलचा सापेक्ष मार्ग आहे", + "update-storage": "स्टोरेज अपडेट करा", + "url-prefix": "URL prefix", + "url-prefix-placeholder": "सानुकूल URL उपसर्ग, पर्यायी", + "url-suffix": "URL प्रत्यय", + "url-suffix-placeholder": "सानुकूल URL प्रत्यय, पर्यायी", + "warning-text": "तुम्हाला स्टोरेज सेवा \"{{name}}\" हटवायची खात्री आहे का? ही क्रिया अपरिवर्तनीय आहे" + }, + "system": "प्रणाली", + "system-section": { + "additional-script": "अतिरिक्त स्क्रिप्ट", + "additional-script-placeholder": "अतिरिक्त JavaScript कोड", + "additional-style": "अतिरिक्त शैली", + "additional-style-placeholder": "अतिरिक्त CSS कोड", + "allow-user-signup": "वापरकर्ता साइनअपला अनुमती द्या", + "customize-server": { + "appearance": "सर्व्हरचे स्वरूप", + "description": "वर्णन", + "icon-url": "चिन्ह URL", + "locale": "सर्व्हर लोकेल", + "title": "सर्व्हर सानुकूलित करा" + }, + "disable-password-login": "पासवर्ड लॉगिन अक्षम करा", + "disable-password-login-final-warning": "तुम्ही काय करत आहात हे तुम्हाला माहीत असल्यास कृपया \"CONFIRM\" टाइप करा.", + "disable-password-login-warning": "हे सर्व वापरकर्त्यांसाठी पासवर्ड लॉगिन अक्षम करेल. तुमचे कॉन्फिगर केलेले ओळख प्रदाते अयशस्वी झाल्यास डेटाबेसमध्ये ही सेटिंग पूर्ववत केल्याशिवाय लॉग इन करणे शक्य नाही. ओळख प्रदाता काढून टाकताना तुम्हाला अधिक सावधगिरी बाळगावी लागेल", + "disable-public-memos": "सार्वजनिक मेमो अक्षम करा", + "display-with-updated-time": "अद्यतनित वेळेसह प्रदर्शित करा", + "enable-password-login": "पासवर्ड लॉगिन सक्षम करा", + "enable-password-login-warning": "हे सर्व वापरकर्त्यांसाठी पासवर्ड लॉगिन सक्षम करेल. जर तुम्ही वापरकर्त्यांना SSO आणि पासवर्ड दोन्ही वापरून लॉग इन करू इच्छित असाल तरच सुरू ठेवा", + "max-upload-size": "कमाल अपलोड आकार (MiB)", + "max-upload-size-hint": "शिफारस केलेले मूल्य 32 MiB आहे.", + "server-name": "सर्व्हरचे नाव" + } + }, + "tag": { + "all-tags": "सर्व टॅग", + "create-tag": "टॅग तयार करा", + "create-tags-guide": "तुम्ही `#tag` इनपुट करून टॅग तयार करू शकता.", + "delete-confirm": "तुम्हाला हा टॅग हटवण्याची खात्री आहे का? सर्व संबंधित मेमो संग्रहित केले जातील.", + "delete-tag": "टॅग हटवा", + "no-tag-found": "कोणताही टॅग आढळला नाही" + }, + "timeline": { + "title": "कालक्रम" } }
feat
added marathi(mr) translations (#3449)
5dd1251d1e1d7378b1bc5406ac714cac7e54b945
2024-03-17 15:52:22
Michael
chore: update i18n with Weblate (#3109) * Translated using Weblate (Japanese) Currently translated at 95.2% (279 of 293 strings) Translation: memos-i18n/i18n Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (293 of 293 strings) Translation: memos-i18n/i18n Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/ --------- Co-authored-by: Somme4096 <somme4096@gmail.com> Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
false
diff --git a/web/src/locales/ja.json b/web/src/locales/ja.json index 5663a91e293ff..38ca7d39b5545 100644 --- a/web/src/locales/ja.json +++ b/web/src/locales/ja.json @@ -32,6 +32,7 @@ "create": "作成する", "database": "データベース", "delete": "削除する", + "description": "説明", "edit": "編集する", "email": "Eメール", "explore": "カレンダービュー", @@ -45,7 +46,7 @@ "link": "リンク", "mark": "マーク", "name": "名前", - "new": "New", + "new": "新しく追加", "nickname": "ニックネーム", "null": "null", "or": "もしくは", @@ -117,9 +118,10 @@ "delete-memo": "メモを削除する", "embed": "埋め込む", "fetch-more": "クリックしてさらに取得する", - "fetching-data": "取得中...", + "fetching-data": "取得中…", "no-archived-memos": "アーカイブされたメモはありません。", "search-placeholder": "メモを検索", + "show-more": "続きを見る", "view-detail": "詳細を見る", "visibility": { "disabled": "公開メモは無効化されています。", @@ -192,7 +194,7 @@ "fetching-data": "データを取得中...", "file-drag-drop-prompt": "アップロードするファイルをドラックアンドドロップする", "linked-amount": "Linked amount", - "no-files-selected": "ファイルが選択されていません!", + "no-files-selected": "ファイルが選択されていません", "no-resources": "ファイルはありません。", "no-unused-resources": "未使用のファイルはありません。", "reset-link": "リンクをリセット", diff --git a/web/src/locales/pt-BR.json b/web/src/locales/pt-BR.json index 20e677f10c786..a8a21a6e29690 100644 --- a/web/src/locales/pt-BR.json +++ b/web/src/locales/pt-BR.json @@ -34,6 +34,7 @@ "create": "Criar", "database": "Banco de dados", "delete": "Deletar", + "description": "Descrição", "edit": "Editar", "email": "Email", "explore": "Explorar",
chore
update i18n with Weblate (#3109) * Translated using Weblate (Japanese) Currently translated at 95.2% (279 of 293 strings) Translation: memos-i18n/i18n Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/ * Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (293 of 293 strings) Translation: memos-i18n/i18n Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/ --------- Co-authored-by: Somme4096 <somme4096@gmail.com> Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
bfd2dbfee2dec5e0d016afba49b52245f60963a0
2023-10-21 10:11:55
Steven
chore: fix update resource api
false
diff --git a/api/v2/resource_service.go b/api/v2/resource_service.go index ade548d9a629d..0fef644c60c85 100644 --- a/api/v2/resource_service.go +++ b/api/v2/resource_service.go @@ -58,12 +58,16 @@ func (s *ResourceService) ListResources(ctx context.Context, _ *apiv2pb.ListReso } func (s *ResourceService) UpdateResource(ctx context.Context, request *apiv2pb.UpdateResourceRequest) (*apiv2pb.UpdateResourceResponse, error) { + if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 { + return nil, status.Errorf(codes.InvalidArgument, "update mask is required") + } + currentTs := time.Now().Unix() update := &store.UpdateResource{ - ID: request.Id, + ID: request.Resource.Id, UpdatedTs: &currentTs, } - for _, field := range request.UpdateMask { + for _, field := range request.UpdateMask.Paths { if field == "filename" { update.Filename = &request.Resource.Filename } else if field == "memo_id" { diff --git a/api/v2/system_service.go b/api/v2/system_service.go index 9c187b1c32ba8..06aad4880de20 100644 --- a/api/v2/system_service.go +++ b/api/v2/system_service.go @@ -57,12 +57,12 @@ func (s *SystemService) UpdateSystemInfo(ctx context.Context, request *apiv2pb.U if user.Role != store.RoleHost { return nil, status.Errorf(codes.PermissionDenied, "permission denied") } - if request.UpdateMask == nil || len(request.UpdateMask) == 0 { + if request.UpdateMask == nil || len(request.UpdateMask.Paths) == 0 { return nil, status.Errorf(codes.InvalidArgument, "update mask is required") } // Update system settings. - for _, path := range request.UpdateMask { + for _, path := range request.UpdateMask.Paths { if path == "allow_registration" { _, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{ Name: "allow-signup", diff --git a/proto/api/v2/resource_service.proto b/proto/api/v2/resource_service.proto index 65f49cd6a3212..4c75a7ac123ca 100644 --- a/proto/api/v2/resource_service.proto +++ b/proto/api/v2/resource_service.proto @@ -4,6 +4,7 @@ package memos.api.v2; import "google/api/annotations.proto"; import "google/api/client.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option go_package = "gen/api/v2"; @@ -16,8 +17,11 @@ service ResourceService { option (google.api.http) = {get: "/api/v2/resources"}; } rpc UpdateResource(UpdateResourceRequest) returns (UpdateResourceResponse) { - option (google.api.http) = {put: "/api/v2/resources/{id}"}; - option (google.api.method_signature) = "id"; + option (google.api.http) = { + patch: "/api/v2/resources/{resource.id}", + body: "resource" + }; + option (google.api.method_signature) = "resource,update_mask"; } rpc DeleteResource(DeleteResourceRequest) returns (DeleteResourceResponse) { option (google.api.http) = {get: "/api/v2/resources/{id}"}; @@ -53,11 +57,9 @@ message ListResourcesResponse { } message UpdateResourceRequest { - int32 id = 1; - - Resource resource = 2; + Resource resource = 1; - repeated string update_mask = 3; + google.protobuf.FieldMask update_mask = 2; } message UpdateResourceResponse { diff --git a/proto/api/v2/system_service.proto b/proto/api/v2/system_service.proto index 6c1f32642f339..1af7ed17f2776 100644 --- a/proto/api/v2/system_service.proto +++ b/proto/api/v2/system_service.proto @@ -3,6 +3,8 @@ syntax = "proto3"; package memos.api.v2; import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/protobuf/field_mask.proto"; option go_package = "gen/api/v2"; @@ -11,7 +13,11 @@ service SystemService { option (google.api.http) = {get: "/api/v2/system/info"}; } rpc UpdateSystemInfo(UpdateSystemInfoRequest) returns (UpdateSystemInfoResponse) { - option (google.api.http) = {post: "/api/v2/system/info"}; + option (google.api.http) = { + patch: "/api/v2/system/info", + body: "system_info" + }; + option (google.api.method_signature) = "system_info,update_mask"; } } @@ -34,8 +40,7 @@ message GetSystemInfoResponse { message UpdateSystemInfoRequest { // System info is the updated data. SystemInfo system_info = 1; - // Update mask is the array of paths. - repeated string update_mask = 2; + google.protobuf.FieldMask update_mask = 2; } message UpdateSystemInfoResponse { diff --git a/proto/api/v2/user_service.proto b/proto/api/v2/user_service.proto index f1ecd2abbd782..fbce9267c9e9d 100644 --- a/proto/api/v2/user_service.proto +++ b/proto/api/v2/user_service.proto @@ -25,7 +25,7 @@ service UserService { } rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse) { option (google.api.http) = { - post: "/api/v2/users/{user.username=*}" + patch: "/api/v2/users/{user.username}" body: "user" }; option (google.api.method_signature) = "user,update_mask"; diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md index 9b080e8162702..a83c2648f1449 100644 --- a/proto/gen/api/v2/README.md +++ b/proto/gen/api/v2/README.md @@ -448,9 +448,8 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| id | [int32](#int32) | | | | resource | [Resource](#memos-api-v2-Resource) | | | -| update_mask | [string](#string) | repeated | | +| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | | @@ -556,7 +555,7 @@ | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | system_info | [SystemInfo](#memos-api-v2-SystemInfo) | | System info is the updated data. | -| update_mask | [string](#string) | repeated | Update mask is the array of paths. | +| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | | diff --git a/proto/gen/api/v2/resource_service.pb.go b/proto/gen/api/v2/resource_service.pb.go index d98b3a25734c1..790d1b800852f 100644 --- a/proto/gen/api/v2/resource_service.pb.go +++ b/proto/gen/api/v2/resource_service.pb.go @@ -10,6 +10,7 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" @@ -325,9 +326,8 @@ type UpdateResourceRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Resource *Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` - UpdateMask []string `protobuf:"bytes,3,rep,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateResourceRequest) Reset() { @@ -362,13 +362,6 @@ func (*UpdateResourceRequest) Descriptor() ([]byte, []int) { return file_api_v2_resource_service_proto_rawDescGZIP(), []int{5} } -func (x *UpdateResourceRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - func (x *UpdateResourceRequest) GetResource() *Resource { if x != nil { return x.Resource @@ -376,7 +369,7 @@ func (x *UpdateResourceRequest) GetResource() *Resource { return nil } -func (x *UpdateResourceRequest) GetUpdateMask() []string { +func (x *UpdateResourceRequest) GetUpdateMask() *fieldmaskpb.FieldMask { if x != nil { return x.UpdateMask } @@ -524,105 +517,110 @@ var file_api_v2_resource_service_proto_rawDesc = []byte{ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x69, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x49, - 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x69, 0x64, - 0x22, 0x96, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, - 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, - 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, - 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x1c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, - 0x08, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x16, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x4d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x7c, - 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4c, 0x0a, 0x16, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x6f, + 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x6d, + 0x6f, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, + 0x69, 0x64, 0x22, 0x96, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x1c, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x5f, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x16, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x4d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x22, 0x88, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3b, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4c, 0x0a, 0x16, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa9, 0x04, 0x0a, + 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x76, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, + 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0xa5, 0x01, + 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x84, 0x04, - 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x76, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0d, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x80, - 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xda, 0x41, - 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x1a, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x23, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, - 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, - 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, - 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, - 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0xda, 0x41, 0x14, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x32, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x23, 0xda, 0x41, 0x02, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xac, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x14, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x32, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, + 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, + 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, + 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, + 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -649,26 +647,28 @@ var file_api_v2_resource_service_proto_goTypes = []interface{}{ (*DeleteResourceRequest)(nil), // 7: memos.api.v2.DeleteResourceRequest (*DeleteResourceResponse)(nil), // 8: memos.api.v2.DeleteResourceResponse (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask } var file_api_v2_resource_service_proto_depIdxs = []int32{ - 9, // 0: memos.api.v2.Resource.created_ts:type_name -> google.protobuf.Timestamp - 0, // 1: memos.api.v2.CreateResourceResponse.resource:type_name -> memos.api.v2.Resource - 0, // 2: memos.api.v2.ListResourcesResponse.resources:type_name -> memos.api.v2.Resource - 0, // 3: memos.api.v2.UpdateResourceRequest.resource:type_name -> memos.api.v2.Resource - 0, // 4: memos.api.v2.UpdateResourceResponse.resource:type_name -> memos.api.v2.Resource - 1, // 5: memos.api.v2.ResourceService.CreateResource:input_type -> memos.api.v2.CreateResourceRequest - 3, // 6: memos.api.v2.ResourceService.ListResources:input_type -> memos.api.v2.ListResourcesRequest - 5, // 7: memos.api.v2.ResourceService.UpdateResource:input_type -> memos.api.v2.UpdateResourceRequest - 7, // 8: memos.api.v2.ResourceService.DeleteResource:input_type -> memos.api.v2.DeleteResourceRequest - 2, // 9: memos.api.v2.ResourceService.CreateResource:output_type -> memos.api.v2.CreateResourceResponse - 4, // 10: memos.api.v2.ResourceService.ListResources:output_type -> memos.api.v2.ListResourcesResponse - 6, // 11: memos.api.v2.ResourceService.UpdateResource:output_type -> memos.api.v2.UpdateResourceResponse - 8, // 12: memos.api.v2.ResourceService.DeleteResource:output_type -> memos.api.v2.DeleteResourceResponse - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 9, // 0: memos.api.v2.Resource.created_ts:type_name -> google.protobuf.Timestamp + 0, // 1: memos.api.v2.CreateResourceResponse.resource:type_name -> memos.api.v2.Resource + 0, // 2: memos.api.v2.ListResourcesResponse.resources:type_name -> memos.api.v2.Resource + 0, // 3: memos.api.v2.UpdateResourceRequest.resource:type_name -> memos.api.v2.Resource + 10, // 4: memos.api.v2.UpdateResourceRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 5: memos.api.v2.UpdateResourceResponse.resource:type_name -> memos.api.v2.Resource + 1, // 6: memos.api.v2.ResourceService.CreateResource:input_type -> memos.api.v2.CreateResourceRequest + 3, // 7: memos.api.v2.ResourceService.ListResources:input_type -> memos.api.v2.ListResourcesRequest + 5, // 8: memos.api.v2.ResourceService.UpdateResource:input_type -> memos.api.v2.UpdateResourceRequest + 7, // 9: memos.api.v2.ResourceService.DeleteResource:input_type -> memos.api.v2.DeleteResourceRequest + 2, // 10: memos.api.v2.ResourceService.CreateResource:output_type -> memos.api.v2.CreateResourceResponse + 4, // 11: memos.api.v2.ResourceService.ListResources:output_type -> memos.api.v2.ListResourcesResponse + 6, // 12: memos.api.v2.ResourceService.UpdateResource:output_type -> memos.api.v2.UpdateResourceResponse + 8, // 13: memos.api.v2.ResourceService.DeleteResource:output_type -> memos.api.v2.DeleteResourceResponse + 10, // [10:14] is the sub-list for method output_type + 6, // [6:10] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_api_v2_resource_service_proto_init() } diff --git a/proto/gen/api/v2/resource_service.pb.gw.go b/proto/gen/api/v2/resource_service.pb.gw.go index 33de59c829ead..3ca23e2c28995 100644 --- a/proto/gen/api/v2/resource_service.pb.gw.go +++ b/proto/gen/api/v2/resource_service.pb.gw.go @@ -86,13 +86,28 @@ func local_request_ResourceService_ListResources_0(ctx context.Context, marshale } var ( - filter_ResourceService_UpdateResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_ResourceService_UpdateResource_0 = &utilities.DoubleArray{Encoding: map[string]int{"resource": 0, "id": 1}, Base: []int{1, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 2, 4, 2, 2, 3}} ) func request_ResourceService_UpdateResource_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateResourceRequest var metadata runtime.ServerMetadata + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Resource); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Resource); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + var ( val string ok bool @@ -100,14 +115,14 @@ func request_ResourceService_UpdateResource_0(ctx context.Context, marshaler run _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["resource.id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource.id") } - protoReq.Id, err = runtime.Int32(val) + err = runtime.PopulateFieldFromPath(&protoReq, "resource.id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource.id", err) } if err := req.ParseForm(); err != nil { @@ -126,6 +141,21 @@ func local_request_ResourceService_UpdateResource_0(ctx context.Context, marshal var protoReq UpdateResourceRequest var metadata runtime.ServerMetadata + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Resource); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Resource); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + var ( val string ok bool @@ -133,14 +163,14 @@ func local_request_ResourceService_UpdateResource_0(ctx context.Context, marshal _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["resource.id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource.id") } - protoReq.Id, err = runtime.Int32(val) + err = runtime.PopulateFieldFromPath(&protoReq, "resource.id", val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource.id", err) } if err := req.ParseForm(); err != nil { @@ -263,7 +293,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv }) - mux.Handle("PUT", pattern_ResourceService_UpdateResource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_ResourceService_UpdateResource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -271,7 +301,7 @@ func RegisterResourceServiceHandlerServer(ctx context.Context, mux *runtime.Serv inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v2/resources/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v2/resources/{resource.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -398,13 +428,13 @@ func RegisterResourceServiceHandlerClient(ctx context.Context, mux *runtime.Serv }) - mux.Handle("PUT", pattern_ResourceService_UpdateResource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_ResourceService_UpdateResource_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) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v2/resources/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.ResourceService/UpdateResource", runtime.WithHTTPPathPattern("/api/v2/resources/{resource.id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -450,7 +480,7 @@ var ( pattern_ResourceService_ListResources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v2", "resources"}, "")) - pattern_ResourceService_UpdateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "resources", "id"}, "")) + pattern_ResourceService_UpdateResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "resources", "resource.id"}, "")) pattern_ResourceService_DeleteResource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v2", "resources", "id"}, "")) ) diff --git a/proto/gen/api/v2/system_service.pb.go b/proto/gen/api/v2/system_service.pb.go index 0f33dacae92b2..3a9fedddefb75 100644 --- a/proto/gen/api/v2/system_service.pb.go +++ b/proto/gen/api/v2/system_service.pb.go @@ -10,6 +10,7 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" reflect "reflect" sync "sync" ) @@ -207,9 +208,8 @@ type UpdateSystemInfoRequest struct { unknownFields protoimpl.UnknownFields // System info is the updated data. - SystemInfo *SystemInfo `protobuf:"bytes,1,opt,name=system_info,json=systemInfo,proto3" json:"system_info,omitempty"` - // Update mask is the array of paths. - UpdateMask []string `protobuf:"bytes,2,rep,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + SystemInfo *SystemInfo `protobuf:"bytes,1,opt,name=system_info,json=systemInfo,proto3" json:"system_info,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` } func (x *UpdateSystemInfoRequest) Reset() { @@ -251,7 +251,7 @@ func (x *UpdateSystemInfoRequest) GetSystemInfo() *SystemInfo { return nil } -func (x *UpdateSystemInfoRequest) GetUpdateMask() []string { +func (x *UpdateSystemInfoRequest) GetUpdateMask() *fieldmaskpb.FieldMask { if x != nil { return x.UpdateMask } @@ -312,59 +312,67 @@ var file_api_v2_system_service_proto_rawDesc = []byte{ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x02, 0x0a, 0x0a, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, - 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x61, 0x6c, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, - 0x79, 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x64, 0x62, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x16, 0x0a, 0x14, - 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, - 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x32, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x75, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x02, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, + 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x6f, 0x64, + 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x61, + 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, + 0x6c, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, + 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x64, 0x62, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x64, 0x62, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x52, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, + 0x6e, 0x66, 0x6f, 0x22, 0x91, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x39, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x55, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, - 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, - 0x55, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x0b, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0x86, 0x02, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, - 0x7e, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x66, 0x6f, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x32, 0xae, + 0x02, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x75, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0xa5, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x2e, 0x6d, + 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0xda, 0x41, 0x17, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x0b, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x32, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0xaa, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x12, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x65, 0x72, 0x76, @@ -399,20 +407,22 @@ var file_api_v2_system_service_proto_goTypes = []interface{}{ (*GetSystemInfoResponse)(nil), // 2: memos.api.v2.GetSystemInfoResponse (*UpdateSystemInfoRequest)(nil), // 3: memos.api.v2.UpdateSystemInfoRequest (*UpdateSystemInfoResponse)(nil), // 4: memos.api.v2.UpdateSystemInfoResponse + (*fieldmaskpb.FieldMask)(nil), // 5: google.protobuf.FieldMask } var file_api_v2_system_service_proto_depIdxs = []int32{ 0, // 0: memos.api.v2.GetSystemInfoResponse.system_info:type_name -> memos.api.v2.SystemInfo 0, // 1: memos.api.v2.UpdateSystemInfoRequest.system_info:type_name -> memos.api.v2.SystemInfo - 0, // 2: memos.api.v2.UpdateSystemInfoResponse.system_info:type_name -> memos.api.v2.SystemInfo - 1, // 3: memos.api.v2.SystemService.GetSystemInfo:input_type -> memos.api.v2.GetSystemInfoRequest - 3, // 4: memos.api.v2.SystemService.UpdateSystemInfo:input_type -> memos.api.v2.UpdateSystemInfoRequest - 2, // 5: memos.api.v2.SystemService.GetSystemInfo:output_type -> memos.api.v2.GetSystemInfoResponse - 4, // 6: memos.api.v2.SystemService.UpdateSystemInfo:output_type -> memos.api.v2.UpdateSystemInfoResponse - 5, // [5:7] is the sub-list for method output_type - 3, // [3:5] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 5, // 2: memos.api.v2.UpdateSystemInfoRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 3: memos.api.v2.UpdateSystemInfoResponse.system_info:type_name -> memos.api.v2.SystemInfo + 1, // 4: memos.api.v2.SystemService.GetSystemInfo:input_type -> memos.api.v2.GetSystemInfoRequest + 3, // 5: memos.api.v2.SystemService.UpdateSystemInfo:input_type -> memos.api.v2.UpdateSystemInfoRequest + 2, // 6: memos.api.v2.SystemService.GetSystemInfo:output_type -> memos.api.v2.GetSystemInfoResponse + 4, // 7: memos.api.v2.SystemService.UpdateSystemInfo:output_type -> memos.api.v2.UpdateSystemInfoResponse + 6, // [6:8] is the sub-list for method output_type + 4, // [4:6] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_api_v2_system_service_proto_init() } diff --git a/proto/gen/api/v2/system_service.pb.gw.go b/proto/gen/api/v2/system_service.pb.gw.go index 407f8ed8b2745..dce748e205727 100644 --- a/proto/gen/api/v2/system_service.pb.gw.go +++ b/proto/gen/api/v2/system_service.pb.gw.go @@ -50,13 +50,28 @@ func local_request_SystemService_GetSystemInfo_0(ctx context.Context, marshaler } var ( - filter_SystemService_UpdateSystemInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_SystemService_UpdateSystemInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{"system_info": 0, "systemInfo": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} ) func request_SystemService_UpdateSystemInfo_0(ctx context.Context, marshaler runtime.Marshaler, client SystemServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateSystemInfoRequest var metadata runtime.ServerMetadata + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SystemInfo); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.SystemInfo); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -73,6 +88,21 @@ func local_request_SystemService_UpdateSystemInfo_0(ctx context.Context, marshal var protoReq UpdateSystemInfoRequest var metadata runtime.ServerMetadata + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SystemInfo); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.SystemInfo); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -116,7 +146,7 @@ func RegisterSystemServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) - mux.Handle("POST", pattern_SystemService_UpdateSystemInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_SystemService_UpdateSystemInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -204,7 +234,7 @@ func RegisterSystemServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) - mux.Handle("POST", pattern_SystemService_UpdateSystemInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_SystemService_UpdateSystemInfo_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) diff --git a/proto/gen/api/v2/user_service.pb.go b/proto/gen/api/v2/user_service.pb.go index b759a5f24b456..d53fa1d7ffcd3 100644 --- a/proto/gen/api/v2/user_service.pb.go +++ b/proto/gen/api/v2/user_service.pb.go @@ -971,7 +971,7 @@ var file_api_v2_user_service_proto_rawDesc = []byte{ 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x32, 0xad, 0x07, 0x0a, 0x0b, 0x55, + 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x32, 0xab, 0x07, 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, @@ -987,61 +987,61 @@ var file_api_v2_user_service_proto_rawDesc = []byte{ 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xda, 0x41, 0x04, 0x75, 0x73, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x12, 0x91, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, + 0x12, 0x8f, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x40, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x22, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, + 0x73, 0x65, 0x22, 0x3e, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x32, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x3d, 0x2a, 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x29, 0x2e, - 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, - 0xae, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3c, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x12, 0xc7, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x55, 0xda, 0x41, 0x15, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, - 0x2c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x37, 0x2a, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, - 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, - 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, - 0x61, 0x70, 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, - 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, - 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, - 0x69, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x65, + 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x39, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0xae, 0x01, + 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x3c, 0xda, 0x41, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0xc7, + 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x55, 0xda, 0x41, 0x15, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x37, 0x2a, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x42, 0x10, 0x55, + 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, + 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70, + 0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, + 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, + 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, + 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/gen/api/v2/user_service.pb.gw.go b/proto/gen/api/v2/user_service.pb.gw.go index 250c613ef47e2..8076647ba9d88 100644 --- a/proto/gen/api/v2/user_service.pb.gw.go +++ b/proto/gen/api/v2/user_service.pb.gw.go @@ -132,6 +132,13 @@ func request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Mar if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.User); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } var ( val string @@ -173,6 +180,13 @@ func local_request_UserService_UpdateUser_0(ctx context.Context, marshaler runti if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.User); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.User); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } var ( val string @@ -451,7 +465,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -459,7 +473,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v2/users/{user.username=*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v2/users/{user.username}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -636,13 +650,13 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("POST", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_UserService_UpdateUser_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) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v2/users/{user.username=*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v2.UserService/UpdateUser", runtime.WithHTTPPathPattern("/api/v2/users/{user.username}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 3b21d54cc3397..259712080b90b 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -247,8 +247,8 @@ const MemoEditor = (props: Props) => { uploadedResourceList.push(resource); if (memoId) { await resourceStore.updateResource({ - id: resource.id, resource: Resource.fromPartial({ + id: resource.id, memoId, }), updateMask: ["memo_id"],
chore
fix update resource api
2cf07753e7a68adf81b2a056607c0bb4315f5571
2022-08-20 09:07:19
Steven
chore: update version `0.4.0`
false
diff --git a/common/version.go b/common/version.go index f442e3fbd1174..219197879a60e 100644 --- a/common/version.go +++ b/common/version.go @@ -7,10 +7,10 @@ import ( // Version is the service current released version. // Semantic versioning: https://semver.org/ -var Version = "0.3.1" +var Version = "0.4.0" // DevVersion is the service current development version. -var DevVersion = "0.3.1" +var DevVersion = "0.4.0" func GetCurrentVersion(mode string) string { if mode == "dev" {
chore
update version `0.4.0`
9db1f57307b942a3758372b35545b00bbfa8308f
2021-12-12 10:29:58
steven
web: recover single global memo editor
false
diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index d3ad83068a9fc..edcbeb1989338 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -7,36 +7,31 @@ import toastHelper from "./Toast"; import Editor, { EditorRefActions } from "./Editor/Editor"; import "../less/memo-editor.less"; -interface Props { - className?: string; - editMemoId?: string; -} +interface Props {} -const MemoEditor: React.FC<Props> = (props: Props) => { - const { className, editMemoId } = props; +const MemoEditor: React.FC<Props> = () => { const { globalState } = useContext(appContext); const editorRef = useRef<EditorRefActions>(null); + const prevGlobalStateRef = useRef(globalState); useEffect(() => { if (globalState.markMemoId) { - if (editMemoId === globalState.editMemoId || (!editMemoId && !globalState.editMemoId)) { - const editorCurrentValue = editorRef.current?.getContent(); - const memoLinkText = `${editorCurrentValue ? "\n" : ""}Mark: [@MEMO](${globalState.markMemoId})`; - editorRef.current?.insertText(memoLinkText); - globalStateService.setMarkMemoId(""); - } + const editorCurrentValue = editorRef.current?.getContent(); + const memoLinkText = `${editorCurrentValue ? "\n" : ""}Mark: [@MEMO](${globalState.markMemoId})`; + editorRef.current?.insertText(memoLinkText); + globalStateService.setMarkMemoId(""); } - }, [globalState.markMemoId]); - useEffect(() => { - if (editMemoId) { - const editMemo = memoService.getMemoById(editMemoId); + if (globalState.editMemoId && globalState.editMemoId !== prevGlobalStateRef.current.editMemoId) { + const editMemo = memoService.getMemoById(globalState.editMemoId); if (editMemo) { editorRef.current?.setContent(editMemo.content ?? ""); editorRef.current?.focus(); } } - }, [editMemoId]); + + prevGlobalStateRef.current = globalState; + }, [globalState.markMemoId, globalState.editMemoId]); const handleSaveBtnClick = useCallback(async (content: string) => { if (content === "") { @@ -44,6 +39,8 @@ const MemoEditor: React.FC<Props> = (props: Props) => { return; } + const { editMemoId } = globalStateService.getState(); + content = content.replaceAll("&nbsp;", " "); try { @@ -83,7 +80,7 @@ const MemoEditor: React.FC<Props> = (props: Props) => { setEditorContentCache(content); }, []); - const showEditStatus = Boolean(editMemoId); + const showEditStatus = Boolean(globalState.editMemoId); const editorConfig = useMemo( () => ({ @@ -97,12 +94,12 @@ const MemoEditor: React.FC<Props> = (props: Props) => { onCancelBtnClick: handleCancelBtnClick, onContentChange: handleContentChange, }), - [editMemoId] + [showEditStatus] ); return ( - <div className={`memo-editor-wrapper ${className} ${editMemoId ? "edit-ing" : ""}`}> - <p className={"tip-text " + (editMemoId ? "" : "hidden")}>正在修改中...</p> + <div className={"memo-editor-wrapper " + (showEditStatus ? "edit-ing" : "")}> + <p className={"tip-text " + (showEditStatus ? "" : "hidden")}>正在修改中...</p> <Editor ref={editorRef} {...editorConfig} /> </div> ); diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index 7021baf75bb9b..d3bc005151c0e 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -6,7 +6,6 @@ import utils from "../helpers/utils"; import { checkShouldShowMemoWithFilters } from "../helpers/filter"; import Memo from "./Memo"; import toastHelper from "./Toast"; -import MemoEditor from "./MemoEditor"; import "../less/memolist.less"; interface Props {} @@ -95,13 +94,9 @@ const MemoList: React.FC<Props> = () => { return ( <div className={`memolist-wrapper ${isFetching ? "" : "completed"}`} onClick={handleMemoListClick} ref={wrapperElement}> - {shownMemos.map((memo) => - globalState.editMemoId === memo.id ? ( - <MemoEditor key={memo.id} className="memo-edit" editMemoId={memo.id} /> - ) : ( - <Memo key={`${memo.id}-${memo.updatedAt}`} memo={memo} /> - ) - )} + {shownMemos.map((memo) => ( + <Memo key={`${memo.id}-${memo.updatedAt}`} memo={memo} /> + ))} <div className="status-text-container"> <p className="status-text"> {isFetching ? "努力请求数据中..." : shownMemos.length === 0 ? "空空如也" : showMemoFilter ? "" : "所有数据加载完啦 🎉"} diff --git a/web/src/less/memolist.less b/web/src/less/memolist.less index 2684d375e3157..20ea0703d8356 100644 --- a/web/src/less/memolist.less +++ b/web/src/less/memolist.less @@ -7,11 +7,6 @@ overflow-y: scroll; .hide-scroll-bar(); - > .memo-edit { - margin-top: 8px; - width: 100%; - } - > .status-text-container { .flex(column, flex-start, center); width: 100%;
web
recover single global memo editor
496cde87b20e6f36c8ab6c5c6416daa42eb11e1e
2023-10-24 16:21:01
Athurg Gooth
feat: list access tokens by admin (#2434) * Allow admin user list access_tokens of anyone * fix undefined variable * Update api/v2/user_service.go --------- Co-authored-by: boojack <stevenlgtm@gmail.com>
false
diff --git a/api/v2/user_service.go b/api/v2/user_service.go index 3d0a2f1a4b891..40a589a57d461 100644 --- a/api/v2/user_service.go +++ b/api/v2/user_service.go @@ -156,7 +156,12 @@ func (s *UserService) ListUserAccessTokens(ctx context.Context, request *apiv2pb if err != nil { return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err) } - if user == nil || user.Username != request.Username { + if user == nil { + return nil, status.Errorf(codes.PermissionDenied, "permission denied") + } + + // Normal users can only list their access tokens. + if user.Role == store.RoleUser && user.Username != request.Username { return nil, status.Errorf(codes.PermissionDenied, "permission denied") }
feat
list access tokens by admin (#2434) * Allow admin user list access_tokens of anyone * fix undefined variable * Update api/v2/user_service.go --------- Co-authored-by: boojack <stevenlgtm@gmail.com>
eda1983964b5ab2e7c49dc5c4de93bbf9ebb282b
2024-05-12 11:02:26
Steven
chore: return workspace setting with default value
false
diff --git a/docs/apidocs.swagger.yaml b/docs/apidocs.swagger.yaml index 00a62af4002d2..98aa5b818d6a9 100644 --- a/docs/apidocs.swagger.yaml +++ b/docs/apidocs.swagger.yaml @@ -691,21 +691,6 @@ paths: $ref: '#/definitions/googlerpcStatus' tags: - WorkspaceService - /api/v1/workspace/settings: - get: - summary: ListWorkspaceSetting returns the list of settings. - operationId: WorkspaceSettingService_ListWorkspaceSettings - responses: - "200": - description: A successful response. - schema: - $ref: '#/definitions/v1ListWorkspaceSettingsResponse' - default: - description: An unexpected error response. - schema: - $ref: '#/definitions/googlerpcStatus' - tags: - - WorkspaceSettingService /api/v1/workspace/{name}: get: summary: GetWorkspaceSetting returns the setting by name. @@ -2137,8 +2122,7 @@ definitions: Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with - type.googleapis.com. As of May 2023, there are no widely used type server - implementations and no plans to implement one. + type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics. @@ -2173,7 +2157,7 @@ definitions: foo = any.unpack(Foo.getDefaultInstance()); } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() @@ -2183,7 +2167,7 @@ definitions: any.Unpack(foo) ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) @@ -2203,7 +2187,7 @@ definitions: name "y.z". JSON - ==== + The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: @@ -2543,14 +2527,6 @@ definitions: items: type: object $ref: '#/definitions/v1Webhook' - v1ListWorkspaceSettingsResponse: - type: object - properties: - settings: - type: array - items: - type: object - $ref: '#/definitions/apiv1WorkspaceSetting' v1MathBlockNode: type: object properties: diff --git a/proto/api/v1/workspace_setting_service.proto b/proto/api/v1/workspace_setting_service.proto index 87dade369c1a4..0fc3f22e0e9b5 100644 --- a/proto/api/v1/workspace_setting_service.proto +++ b/proto/api/v1/workspace_setting_service.proto @@ -9,10 +9,6 @@ import "google/api/field_behavior.proto"; option go_package = "gen/api/v1"; service WorkspaceSettingService { - // ListWorkspaceSetting returns the list of settings. - rpc ListWorkspaceSettings(ListWorkspaceSettingsRequest) returns (ListWorkspaceSettingsResponse) { - option (google.api.http) = {get: "/api/v1/workspace/settings"}; - } // GetWorkspaceSetting returns the setting by name. rpc GetWorkspaceSetting(GetWorkspaceSettingRequest) returns (WorkspaceSetting) { option (google.api.http) = {get: "/api/v1/workspace/{name=settings/*}"}; @@ -100,12 +96,6 @@ message WorkspaceMemoRelatedSetting { int32 content_length_limit = 3; } -message ListWorkspaceSettingsRequest {} - -message ListWorkspaceSettingsResponse { - repeated WorkspaceSetting settings = 1; -} - message GetWorkspaceSettingRequest { // The resource name of the workspace setting. // Format: settings/{setting} diff --git a/proto/gen/api/v1/workspace_setting_service.pb.go b/proto/gen/api/v1/workspace_setting_service.pb.go index 0a6cda337a3dd..14c2d18aafa72 100644 --- a/proto/gen/api/v1/workspace_setting_service.pb.go +++ b/proto/gen/api/v1/workspace_setting_service.pb.go @@ -495,91 +495,6 @@ func (x *WorkspaceMemoRelatedSetting) GetContentLengthLimit() int32 { return 0 } -type ListWorkspaceSettingsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListWorkspaceSettingsRequest) Reset() { - *x = ListWorkspaceSettingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceSettingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceSettingsRequest) ProtoMessage() {} - -func (x *ListWorkspaceSettingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListWorkspaceSettingsRequest.ProtoReflect.Descriptor instead. -func (*ListWorkspaceSettingsRequest) Descriptor() ([]byte, []int) { - return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{5} -} - -type ListWorkspaceSettingsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Settings []*WorkspaceSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"` -} - -func (x *ListWorkspaceSettingsResponse) Reset() { - *x = ListWorkspaceSettingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkspaceSettingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkspaceSettingsResponse) ProtoMessage() {} - -func (x *ListWorkspaceSettingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListWorkspaceSettingsResponse.ProtoReflect.Descriptor instead. -func (*ListWorkspaceSettingsResponse) Descriptor() ([]byte, []int) { - return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{6} -} - -func (x *ListWorkspaceSettingsResponse) GetSettings() []*WorkspaceSetting { - if x != nil { - return x.Settings - } - return nil -} - type GetWorkspaceSettingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -593,7 +508,7 @@ type GetWorkspaceSettingRequest struct { func (x *GetWorkspaceSettingRequest) Reset() { *x = GetWorkspaceSettingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[7] + mi := &file_api_v1_workspace_setting_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -606,7 +521,7 @@ func (x *GetWorkspaceSettingRequest) String() string { func (*GetWorkspaceSettingRequest) ProtoMessage() {} func (x *GetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[7] + mi := &file_api_v1_workspace_setting_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -619,7 +534,7 @@ func (x *GetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetWorkspaceSettingRequest.ProtoReflect.Descriptor instead. func (*GetWorkspaceSettingRequest) Descriptor() ([]byte, []int) { - return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{7} + return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{5} } func (x *GetWorkspaceSettingRequest) GetName() string { @@ -641,7 +556,7 @@ type SetWorkspaceSettingRequest struct { func (x *SetWorkspaceSettingRequest) Reset() { *x = SetWorkspaceSettingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[8] + mi := &file_api_v1_workspace_setting_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -654,7 +569,7 @@ func (x *SetWorkspaceSettingRequest) String() string { func (*SetWorkspaceSettingRequest) ProtoMessage() {} func (x *SetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[8] + mi := &file_api_v1_workspace_setting_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -667,7 +582,7 @@ func (x *SetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetWorkspaceSettingRequest.ProtoReflect.Descriptor instead. func (*SetWorkspaceSettingRequest) Descriptor() ([]byte, []int) { - return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{8} + return file_api_v1_workspace_setting_service_proto_rawDescGZIP(), []int{6} } func (x *SetWorkspaceSettingRequest) GetSetting() *WorkspaceSetting { @@ -693,7 +608,7 @@ type WorkspaceStorageSetting_S3Config struct { func (x *WorkspaceStorageSetting_S3Config) Reset() { *x = WorkspaceStorageSetting_S3Config{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[9] + mi := &file_api_v1_workspace_setting_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -706,7 +621,7 @@ func (x *WorkspaceStorageSetting_S3Config) String() string { func (*WorkspaceStorageSetting_S3Config) ProtoMessage() {} func (x *WorkspaceStorageSetting_S3Config) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_workspace_setting_service_proto_msgTypes[9] + mi := &file_api_v1_workspace_setting_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -866,67 +781,50 @@ var file_api_v1_workspace_setting_service_proto_rawDesc = []byte{ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x1e, 0x0a, 0x1c, - 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x1d, - 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, - 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x36, 0x0a, 0x1a, 0x47, 0x65, 0x74, + 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x36, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x56, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0xd9, 0x02, 0x0a, + 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x56, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x38, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x32, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, + 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xa7, + 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0xf0, 0x03, 0x0a, 0x17, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, - 0x2a, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, - 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x93, 0x01, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, - 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x32, - 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, - 0x2a, 0x7d, 0x12, 0xa7, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x2e, 0x6d, 0x65, 0x6d, - 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x57, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, - 0x74, 0x69, 0x6e, 0x67, 0x22, 0x46, 0xda, 0x41, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, - 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, - 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0xb4, 0x01, 0x0a, - 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, - 0x31, 0x42, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, - 0x65, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, - 0x69, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, - 0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, - 0x41, 0x70, 0x69, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x46, 0xda, 0x41, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x36, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x2b, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x7b, + 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0xb4, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x42, 0x1c, 0x57, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x73, 0x65, 0x6d, 0x65, 0x6d, + 0x6f, 0x73, 0x2f, 0x6d, 0x65, 0x6d, 0x6f, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x70, 0x69, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x4d, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x70, + 0x69, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x5c, 0x41, 0x70, 0x69, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x0e, 0x4d, 0x65, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -942,7 +840,7 @@ func file_api_v1_workspace_setting_service_proto_rawDescGZIP() []byte { } var file_api_v1_workspace_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_v1_workspace_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_api_v1_workspace_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_api_v1_workspace_setting_service_proto_goTypes = []interface{}{ (WorkspaceStorageSetting_StorageType)(0), // 0: memos.api.v1.WorkspaceStorageSetting.StorageType (*WorkspaceSetting)(nil), // 1: memos.api.v1.WorkspaceSetting @@ -950,32 +848,27 @@ var file_api_v1_workspace_setting_service_proto_goTypes = []interface{}{ (*WorkspaceCustomProfile)(nil), // 3: memos.api.v1.WorkspaceCustomProfile (*WorkspaceStorageSetting)(nil), // 4: memos.api.v1.WorkspaceStorageSetting (*WorkspaceMemoRelatedSetting)(nil), // 5: memos.api.v1.WorkspaceMemoRelatedSetting - (*ListWorkspaceSettingsRequest)(nil), // 6: memos.api.v1.ListWorkspaceSettingsRequest - (*ListWorkspaceSettingsResponse)(nil), // 7: memos.api.v1.ListWorkspaceSettingsResponse - (*GetWorkspaceSettingRequest)(nil), // 8: memos.api.v1.GetWorkspaceSettingRequest - (*SetWorkspaceSettingRequest)(nil), // 9: memos.api.v1.SetWorkspaceSettingRequest - (*WorkspaceStorageSetting_S3Config)(nil), // 10: memos.api.v1.WorkspaceStorageSetting.S3Config + (*GetWorkspaceSettingRequest)(nil), // 6: memos.api.v1.GetWorkspaceSettingRequest + (*SetWorkspaceSettingRequest)(nil), // 7: memos.api.v1.SetWorkspaceSettingRequest + (*WorkspaceStorageSetting_S3Config)(nil), // 8: memos.api.v1.WorkspaceStorageSetting.S3Config } var file_api_v1_workspace_setting_service_proto_depIdxs = []int32{ - 2, // 0: memos.api.v1.WorkspaceSetting.general_setting:type_name -> memos.api.v1.WorkspaceGeneralSetting - 4, // 1: memos.api.v1.WorkspaceSetting.storage_setting:type_name -> memos.api.v1.WorkspaceStorageSetting - 5, // 2: memos.api.v1.WorkspaceSetting.memo_related_setting:type_name -> memos.api.v1.WorkspaceMemoRelatedSetting - 3, // 3: memos.api.v1.WorkspaceGeneralSetting.custom_profile:type_name -> memos.api.v1.WorkspaceCustomProfile - 0, // 4: memos.api.v1.WorkspaceStorageSetting.storage_type:type_name -> memos.api.v1.WorkspaceStorageSetting.StorageType - 10, // 5: memos.api.v1.WorkspaceStorageSetting.s3_config:type_name -> memos.api.v1.WorkspaceStorageSetting.S3Config - 1, // 6: memos.api.v1.ListWorkspaceSettingsResponse.settings:type_name -> memos.api.v1.WorkspaceSetting - 1, // 7: memos.api.v1.SetWorkspaceSettingRequest.setting:type_name -> memos.api.v1.WorkspaceSetting - 6, // 8: memos.api.v1.WorkspaceSettingService.ListWorkspaceSettings:input_type -> memos.api.v1.ListWorkspaceSettingsRequest - 8, // 9: memos.api.v1.WorkspaceSettingService.GetWorkspaceSetting:input_type -> memos.api.v1.GetWorkspaceSettingRequest - 9, // 10: memos.api.v1.WorkspaceSettingService.SetWorkspaceSetting:input_type -> memos.api.v1.SetWorkspaceSettingRequest - 7, // 11: memos.api.v1.WorkspaceSettingService.ListWorkspaceSettings:output_type -> memos.api.v1.ListWorkspaceSettingsResponse - 1, // 12: memos.api.v1.WorkspaceSettingService.GetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting - 1, // 13: memos.api.v1.WorkspaceSettingService.SetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting - 11, // [11:14] is the sub-list for method output_type - 8, // [8:11] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 2, // 0: memos.api.v1.WorkspaceSetting.general_setting:type_name -> memos.api.v1.WorkspaceGeneralSetting + 4, // 1: memos.api.v1.WorkspaceSetting.storage_setting:type_name -> memos.api.v1.WorkspaceStorageSetting + 5, // 2: memos.api.v1.WorkspaceSetting.memo_related_setting:type_name -> memos.api.v1.WorkspaceMemoRelatedSetting + 3, // 3: memos.api.v1.WorkspaceGeneralSetting.custom_profile:type_name -> memos.api.v1.WorkspaceCustomProfile + 0, // 4: memos.api.v1.WorkspaceStorageSetting.storage_type:type_name -> memos.api.v1.WorkspaceStorageSetting.StorageType + 8, // 5: memos.api.v1.WorkspaceStorageSetting.s3_config:type_name -> memos.api.v1.WorkspaceStorageSetting.S3Config + 1, // 6: memos.api.v1.SetWorkspaceSettingRequest.setting:type_name -> memos.api.v1.WorkspaceSetting + 6, // 7: memos.api.v1.WorkspaceSettingService.GetWorkspaceSetting:input_type -> memos.api.v1.GetWorkspaceSettingRequest + 7, // 8: memos.api.v1.WorkspaceSettingService.SetWorkspaceSetting:input_type -> memos.api.v1.SetWorkspaceSettingRequest + 1, // 9: memos.api.v1.WorkspaceSettingService.GetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting + 1, // 10: memos.api.v1.WorkspaceSettingService.SetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_api_v1_workspace_setting_service_proto_init() } @@ -1045,30 +938,6 @@ func file_api_v1_workspace_setting_service_proto_init() { } } file_api_v1_workspace_setting_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceSettingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_v1_workspace_setting_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkspaceSettingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_v1_workspace_setting_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetWorkspaceSettingRequest); i { case 0: return &v.state @@ -1080,7 +949,7 @@ func file_api_v1_workspace_setting_service_proto_init() { return nil } } - file_api_v1_workspace_setting_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_api_v1_workspace_setting_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetWorkspaceSettingRequest); i { case 0: return &v.state @@ -1092,7 +961,7 @@ func file_api_v1_workspace_setting_service_proto_init() { return nil } } - file_api_v1_workspace_setting_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_api_v1_workspace_setting_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WorkspaceStorageSetting_S3Config); i { case 0: return &v.state @@ -1116,7 +985,7 @@ func file_api_v1_workspace_setting_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_workspace_setting_service_proto_rawDesc, NumEnums: 1, - NumMessages: 10, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/gen/api/v1/workspace_setting_service.pb.gw.go b/proto/gen/api/v1/workspace_setting_service.pb.gw.go index a9839eb32e2fd..fea94724d9683 100644 --- a/proto/gen/api/v1/workspace_setting_service.pb.gw.go +++ b/proto/gen/api/v1/workspace_setting_service.pb.gw.go @@ -31,24 +31,6 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_WorkspaceSettingService_ListWorkspaceSettings_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceSettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceSettingsRequest - var metadata runtime.ServerMetadata - - msg, err := client.ListWorkspaceSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_WorkspaceSettingService_ListWorkspaceSettings_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceSettingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListWorkspaceSettingsRequest - var metadata runtime.ServerMetadata - - msg, err := server.ListWorkspaceSettings(ctx, &protoReq) - return msg, metadata, err - -} - func request_WorkspaceSettingService_GetWorkspaceSetting_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceSettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetWorkspaceSettingRequest var metadata runtime.ServerMetadata @@ -167,31 +149,6 @@ func local_request_WorkspaceSettingService_SetWorkspaceSetting_0(ctx context.Con // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkspaceSettingServiceHandlerFromEndpoint instead. func RegisterWorkspaceSettingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceSettingServiceServer) error { - mux.Handle("GET", pattern_WorkspaceSettingService_ListWorkspaceSettings_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/ListWorkspaceSettings", runtime.WithHTTPPathPattern("/api/v1/workspace/settings")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_WorkspaceSettingService_ListWorkspaceSettings_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_WorkspaceSettingService_ListWorkspaceSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_WorkspaceSettingService_GetWorkspaceSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -283,28 +240,6 @@ func RegisterWorkspaceSettingServiceHandler(ctx context.Context, mux *runtime.Se // "WorkspaceSettingServiceClient" to call the correct interceptors. func RegisterWorkspaceSettingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceSettingServiceClient) error { - mux.Handle("GET", pattern_WorkspaceSettingService_ListWorkspaceSettings_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/memos.api.v1.WorkspaceSettingService/ListWorkspaceSettings", runtime.WithHTTPPathPattern("/api/v1/workspace/settings")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_WorkspaceSettingService_ListWorkspaceSettings_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_WorkspaceSettingService_ListWorkspaceSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_WorkspaceSettingService_GetWorkspaceSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -353,16 +288,12 @@ func RegisterWorkspaceSettingServiceHandlerClient(ctx context.Context, mux *runt } var ( - pattern_WorkspaceSettingService_ListWorkspaceSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "workspace", "settings"}, "")) - pattern_WorkspaceSettingService_GetWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4}, []string{"api", "v1", "workspace", "settings", "name"}, "")) pattern_WorkspaceSettingService_SetWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 2, 5, 4}, []string{"api", "v1", "workspace", "settings", "setting.name"}, "")) ) var ( - forward_WorkspaceSettingService_ListWorkspaceSettings_0 = runtime.ForwardResponseMessage - forward_WorkspaceSettingService_GetWorkspaceSetting_0 = runtime.ForwardResponseMessage forward_WorkspaceSettingService_SetWorkspaceSetting_0 = runtime.ForwardResponseMessage diff --git a/proto/gen/api/v1/workspace_setting_service_grpc.pb.go b/proto/gen/api/v1/workspace_setting_service_grpc.pb.go index 0e9c3cc403321..ed06a241b1ca2 100644 --- a/proto/gen/api/v1/workspace_setting_service_grpc.pb.go +++ b/proto/gen/api/v1/workspace_setting_service_grpc.pb.go @@ -19,17 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - WorkspaceSettingService_ListWorkspaceSettings_FullMethodName = "/memos.api.v1.WorkspaceSettingService/ListWorkspaceSettings" - WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting" - WorkspaceSettingService_SetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/SetWorkspaceSetting" + WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/GetWorkspaceSetting" + WorkspaceSettingService_SetWorkspaceSetting_FullMethodName = "/memos.api.v1.WorkspaceSettingService/SetWorkspaceSetting" ) // WorkspaceSettingServiceClient is the client API for WorkspaceSettingService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type WorkspaceSettingServiceClient interface { - // ListWorkspaceSetting returns the list of settings. - ListWorkspaceSettings(ctx context.Context, in *ListWorkspaceSettingsRequest, opts ...grpc.CallOption) (*ListWorkspaceSettingsResponse, error) // GetWorkspaceSetting returns the setting by name. GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) // SetWorkspaceSetting updates the setting. @@ -44,15 +41,6 @@ func NewWorkspaceSettingServiceClient(cc grpc.ClientConnInterface) WorkspaceSett return &workspaceSettingServiceClient{cc} } -func (c *workspaceSettingServiceClient) ListWorkspaceSettings(ctx context.Context, in *ListWorkspaceSettingsRequest, opts ...grpc.CallOption) (*ListWorkspaceSettingsResponse, error) { - out := new(ListWorkspaceSettingsResponse) - err := c.cc.Invoke(ctx, WorkspaceSettingService_ListWorkspaceSettings_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*WorkspaceSetting, error) { out := new(WorkspaceSetting) err := c.cc.Invoke(ctx, WorkspaceSettingService_GetWorkspaceSetting_FullMethodName, in, out, opts...) @@ -75,8 +63,6 @@ func (c *workspaceSettingServiceClient) SetWorkspaceSetting(ctx context.Context, // All implementations must embed UnimplementedWorkspaceSettingServiceServer // for forward compatibility type WorkspaceSettingServiceServer interface { - // ListWorkspaceSetting returns the list of settings. - ListWorkspaceSettings(context.Context, *ListWorkspaceSettingsRequest) (*ListWorkspaceSettingsResponse, error) // GetWorkspaceSetting returns the setting by name. GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*WorkspaceSetting, error) // SetWorkspaceSetting updates the setting. @@ -88,9 +74,6 @@ type WorkspaceSettingServiceServer interface { type UnimplementedWorkspaceSettingServiceServer struct { } -func (UnimplementedWorkspaceSettingServiceServer) ListWorkspaceSettings(context.Context, *ListWorkspaceSettingsRequest) (*ListWorkspaceSettingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceSettings not implemented") -} func (UnimplementedWorkspaceSettingServiceServer) GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*WorkspaceSetting, error) { return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceSetting not implemented") } @@ -111,24 +94,6 @@ func RegisterWorkspaceSettingServiceServer(s grpc.ServiceRegistrar, srv Workspac s.RegisterService(&WorkspaceSettingService_ServiceDesc, srv) } -func _WorkspaceSettingService_ListWorkspaceSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListWorkspaceSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WorkspaceSettingServiceServer).ListWorkspaceSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: WorkspaceSettingService_ListWorkspaceSettings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WorkspaceSettingServiceServer).ListWorkspaceSettings(ctx, req.(*ListWorkspaceSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _WorkspaceSettingService_GetWorkspaceSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetWorkspaceSettingRequest) if err := dec(in); err != nil { @@ -172,10 +137,6 @@ var WorkspaceSettingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "memos.api.v1.WorkspaceSettingService", HandlerType: (*WorkspaceSettingServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "ListWorkspaceSettings", - Handler: _WorkspaceSettingService_ListWorkspaceSettings_Handler, - }, { MethodName: "GetWorkspaceSetting", Handler: _WorkspaceSettingService_GetWorkspaceSetting_Handler, diff --git a/server/router/api/v1/workspace_setting_service.go b/server/router/api/v1/workspace_setting_service.go index 7b65d70f384e9..dcf668191eaf8 100644 --- a/server/router/api/v1/workspace_setting_service.go +++ b/server/router/api/v1/workspace_setting_service.go @@ -12,40 +12,32 @@ import ( "github.com/usememos/memos/store" ) -func (s *APIV1Service) ListWorkspaceSettings(ctx context.Context, _ *v1pb.ListWorkspaceSettingsRequest) (*v1pb.ListWorkspaceSettingsResponse, error) { - user, err := getCurrentUser(ctx, s.Store) +func (s *APIV1Service) GetWorkspaceSetting(ctx context.Context, request *v1pb.GetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error) { + workspaceSettingKeyString, err := ExtractWorkspaceSettingKeyFromName(request.Name) if err != nil { - return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err) + return nil, status.Errorf(codes.InvalidArgument, "invalid workspace setting name: %v", err) } - workspaceSettingFind := &store.FindWorkspaceSetting{} - if user == nil || user.Role == store.RoleUser { - workspaceSettingFind.Name = storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL.String() + workspaceSettingKey := storepb.WorkspaceSettingKey(storepb.WorkspaceSettingKey_value[workspaceSettingKeyString]) + // Get workspace setting from store with default value. + switch workspaceSettingKey { + case storepb.WorkspaceSettingKey_WORKSPACE_SETTING_BASIC: + _, err = s.Store.GetWorkspaceBasicSetting(ctx) + case storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL: + _, err = s.Store.GetWorkspaceGeneralSetting(ctx) + case storepb.WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED: + _, err = s.Store.GetWorkspaceMemoRelatedSetting(ctx) + case storepb.WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE: + _, err = s.Store.GetWorkspaceStorageSetting(ctx) + default: + return nil, status.Errorf(codes.InvalidArgument, "unsupported workspace setting key: %v", workspaceSettingKey) } - workspaceSettings, err := s.Store.ListWorkspaceSettings(ctx, workspaceSettingFind) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err) } - response := &v1pb.ListWorkspaceSettingsResponse{ - Settings: []*v1pb.WorkspaceSetting{}, - } - for _, workspaceSetting := range workspaceSettings { - if workspaceSetting.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_BASIC { - continue - } - response.Settings = append(response.Settings, convertWorkspaceSettingFromStore(workspaceSetting)) - } - return response, nil -} - -func (s *APIV1Service) GetWorkspaceSetting(ctx context.Context, request *v1pb.GetWorkspaceSettingRequest) (*v1pb.WorkspaceSetting, error) { - settingKeyString, err := ExtractWorkspaceSettingKeyFromName(request.Name) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid workspace setting name: %v", err) - } workspaceSetting, err := s.Store.GetWorkspaceSetting(ctx, &store.FindWorkspaceSetting{ - Name: settingKeyString, + Name: workspaceSettingKey.String(), }) if err != nil { return nil, status.Errorf(codes.Internal, "failed to get workspace setting: %v", err) diff --git a/store/workspace_setting.go b/store/workspace_setting.go index de33bccff7a00..7d319cd41c891 100644 --- a/store/workspace_setting.go +++ b/store/workspace_setting.go @@ -111,6 +111,10 @@ func (s *Store) GetWorkspaceBasicSetting(ctx context.Context) (*storepb.Workspac if workspaceSetting != nil { workspaceBasicSetting = workspaceSetting.GetBasicSetting() } + s.workspaceSettingCache.Store(storepb.WorkspaceSettingKey_WORKSPACE_SETTING_BASIC.String(), &storepb.WorkspaceSetting{ + Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_BASIC, + Value: &storepb.WorkspaceSetting_BasicSetting{BasicSetting: workspaceBasicSetting}, + }) return workspaceBasicSetting, nil } @@ -126,6 +130,10 @@ func (s *Store) GetWorkspaceGeneralSetting(ctx context.Context) (*storepb.Worksp if workspaceSetting != nil { workspaceGeneralSetting = workspaceSetting.GetGeneralSetting() } + s.workspaceSettingCache.Store(storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL.String(), &storepb.WorkspaceSetting{ + Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL, + Value: &storepb.WorkspaceSetting_GeneralSetting{GeneralSetting: workspaceGeneralSetting}, + }) return workspaceGeneralSetting, nil } @@ -149,6 +157,10 @@ func (s *Store) GetWorkspaceMemoRelatedSetting(ctx context.Context) (*storepb.Wo if workspaceMemoRelatedSetting.ContentLengthLimit < DefaultContentLengthLimit { workspaceMemoRelatedSetting.ContentLengthLimit = DefaultContentLengthLimit } + s.workspaceSettingCache.Store(storepb.WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED.String(), &storepb.WorkspaceSetting{ + Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED, + Value: &storepb.WorkspaceSetting_MemoRelatedSetting{MemoRelatedSetting: workspaceMemoRelatedSetting}, + }) return workspaceMemoRelatedSetting, nil } @@ -179,6 +191,10 @@ func (s *Store) GetWorkspaceStorageSetting(ctx context.Context) (*storepb.Worksp if workspaceStorageSetting.FilepathTemplate == "" { workspaceStorageSetting.FilepathTemplate = defaultWorkspaceFilepathTemplate } + s.workspaceSettingCache.Store(storepb.WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE.String(), &storepb.WorkspaceSetting{ + Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE, + Value: &storepb.WorkspaceSetting_StorageSetting{StorageSetting: workspaceStorageSetting}, + }) return workspaceStorageSetting, nil } diff --git a/web/src/layouts/CommonContextProvider.tsx b/web/src/layouts/CommonContextProvider.tsx index 116a811d2ae23..b7ca71d38a14c 100644 --- a/web/src/layouts/CommonContextProvider.tsx +++ b/web/src/layouts/CommonContextProvider.tsx @@ -36,7 +36,7 @@ const CommonContextProvider = ({ children }: { children: React.ReactNode }) => { useEffect(() => { const initialWorkspace = async () => { const workspaceProfile = await workspaceServiceClient.getWorkspaceProfile({}); - await workspaceSettingStore.listWorkspaceSettings(); + await workspaceSettingStore.fetchWorkspaceSetting(WorkspaceSettingKey.WORKSPACE_SETTING_GENERAL); const workspaceGeneralSetting = workspaceSettingStore.getWorkspaceSettingByKey(WorkspaceSettingKey.WORKSPACE_SETTING_GENERAL).generalSetting || diff --git a/web/src/pages/Setting.tsx b/web/src/pages/Setting.tsx index 760c6de384885..d9789fa7d90c4 100644 --- a/web/src/pages/Setting.tsx +++ b/web/src/pages/Setting.tsx @@ -1,6 +1,6 @@ import { Option, Select } from "@mui/joy"; import { LucideIcon } from "lucide-react"; -import { useCallback, useMemo, useState } from "react"; +import { useCallback, useEffect, useMemo, useState } from "react"; import Icon from "@/components/Icon"; import MobileHeader from "@/components/MobileHeader"; import MemberSection from "@/components/Settings/MemberSection"; @@ -12,7 +12,9 @@ import StorageSection from "@/components/Settings/StorageSection"; import WorkspaceSection from "@/components/Settings/WorkspaceSection"; import useCurrentUser from "@/hooks/useCurrentUser"; import { useCommonContext } from "@/layouts/CommonContextProvider"; +import { useWorkspaceSettingStore } from "@/store/v1"; import { User_Role } from "@/types/proto/api/v1/user_service"; +import { WorkspaceSettingKey } from "@/types/proto/store/workspace_setting"; import { useTranslate } from "@/utils/i18n"; type SettingSection = "my-account" | "preference" | "member" | "system" | "storage" | "sso"; @@ -36,10 +38,10 @@ const Setting = () => { const t = useTranslate(); const commonContext = useCommonContext(); const user = useCurrentUser(); + const workspaceSettingStore = useWorkspaceSettingStore(); const [state, setState] = useState<State>({ selectedSection: "my-account", }); - const isHost = user.role === User_Role.HOST; const settingsSectionList = useMemo(() => { @@ -50,6 +52,19 @@ const Setting = () => { return settingList; }, [isHost]); + useEffect(() => { + if (!isHost) { + return; + } + + // Initial fetch for workspace settings. + (async () => { + [WorkspaceSettingKey.WORKSPACE_SETTING_MEMO_RELATED, WorkspaceSettingKey.WORKSPACE_SETTING_STORAGE].forEach(async (key) => { + await workspaceSettingStore.fetchWorkspaceSetting(key); + }); + })(); + }, [isHost]); + const handleSectionSelectorItemClick = useCallback((settingSection: SettingSection) => { setState({ selectedSection: settingSection, diff --git a/web/src/store/v1/workspaceSetting.ts b/web/src/store/v1/workspaceSetting.ts index b1187bed9e1de..31975b1accc83 100644 --- a/web/src/store/v1/workspaceSetting.ts +++ b/web/src/store/v1/workspaceSetting.ts @@ -18,10 +18,6 @@ export const useWorkspaceSettingStore = create( getState: () => { return get(); }, - listWorkspaceSettings: async () => { - const { settings } = await workspaceSettingServiceClient.listWorkspaceSettings({}); - set({ workspaceSettingByName: settings.reduce((acc, setting) => ({ ...acc, [setting.name]: setting }), {}) }); - }, fetchWorkspaceSetting: async (key: WorkspaceSettingKey) => { const setting = await workspaceSettingServiceClient.getWorkspaceSetting({ name: `${WorkspaceSettingPrefix}${key}` }); set({ workspaceSettingByName: { ...get().workspaceSettingByName, [setting.name]: setting } });
chore
return workspace setting with default value
fc7dc58720992198e934a86e020b2187cfb301bd
2025-03-13 18:08:14
Johnny
chore: move archived route
false
diff --git a/web/src/components/HomeSidebar/HomeSidebar.tsx b/web/src/components/HomeSidebar/HomeSidebar.tsx index 3ba2666e7d8f3..fdf62e2469337 100644 --- a/web/src/components/HomeSidebar/HomeSidebar.tsx +++ b/web/src/components/HomeSidebar/HomeSidebar.tsx @@ -1,5 +1,5 @@ import { last } from "lodash-es"; -import { ArchiveIcon, Globe2Icon, HomeIcon } from "lucide-react"; +import { Globe2Icon, HomeIcon } from "lucide-react"; import { observer } from "mobx-react-lite"; import { matchPath, NavLink, useLocation } from "react-router-dom"; import useDebounce from "react-use/lib/useDebounce"; @@ -44,14 +44,8 @@ const HomeSidebar = observer((props: Props) => { title: t("common.explore"), icon: <Globe2Icon className="w-4 h-auto opacity-70 shrink-0" />, }; - const archivedNavLink: NavLinkItem = { - id: "header-archived", - path: Routes.ARCHIVED, - title: t("common.archived"), - icon: <ArchiveIcon className="w-4 h-auto opacity-70 shrink-0" />, - }; - const navLinks: NavLinkItem[] = currentUser ? [homeNavLink, exploreNavLink, archivedNavLink] : [exploreNavLink]; + const navLinks: NavLinkItem[] = currentUser ? [homeNavLink, exploreNavLink] : [exploreNavLink]; useDebounce( async () => { diff --git a/web/src/components/UserBanner.tsx b/web/src/components/UserBanner.tsx index 6e5bf88932281..e3d5e3ba39858 100644 --- a/web/src/components/UserBanner.tsx +++ b/web/src/components/UserBanner.tsx @@ -1,5 +1,5 @@ import { Dropdown, Menu, MenuButton, MenuItem } from "@mui/joy"; -import { LogOutIcon, User2Icon, SmileIcon } from "lucide-react"; +import { ArchiveIcon, LogOutIcon, User2Icon, SquareUserIcon } from "lucide-react"; import { authServiceClient } from "@/grpcweb"; import useCurrentUser from "@/hooks/useCurrentUser"; import useNavigateTo from "@/hooks/useNavigateTo"; @@ -47,9 +47,13 @@ const UserBanner = (props: Props) => { </MenuButton> <Menu placement="bottom-start" style={{ zIndex: "9999" }}> <MenuItem onClick={() => navigateTo(`/u/${encodeURIComponent(currentUser.username)}`)}> - <SmileIcon className="w-4 h-auto opacity-60" /> + <SquareUserIcon className="w-4 h-auto opacity-60" /> <span className="truncate">{t("common.profile")}</span> </MenuItem> + <MenuItem onClick={() => navigateTo(Routes.ARCHIVED)}> + <ArchiveIcon className="w-4 h-auto opacity-60" /> + <span className="truncate">{t("common.archived")}</span> + </MenuItem> <MenuItem onClick={handleSignOut}> <LogOutIcon className="w-4 h-auto opacity-60" /> <span className="truncate">{t("common.sign-out")}</span>
chore
move archived route
4c0c7431c89a17ff745fd5252fbedaa377c20b10
2024-10-02 09:06:12
dependabot[bot]
chore: bump google.golang.org/grpc from 1.67.0 to 1.67.1 (#3977) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.0 to 1.67.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.67.0...v1.67.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
false
diff --git a/go.mod b/go.mod index afb2bc39c5db5..e611179505990 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( golang.org/x/net v0.29.0 golang.org/x/oauth2 v0.23.0 google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 modernc.org/sqlite v1.33.1 ) diff --git a/go.sum b/go.sum index ed764b7ba459f..46e9e6257bcaa 100644 --- a/go.sum +++ b/go.sum @@ -632,8 +632,8 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
chore
bump google.golang.org/grpc from 1.67.0 to 1.67.1 (#3977) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.67.0 to 1.67.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.67.0...v1.67.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6f3d5762ca55d30a48d5bfb662459337e5a9938a
2024-09-12 06:24:33
ti777777
fix: iframe rendering (#3916) * fix iframe rendering * fix eslint check
false
diff --git a/web/src/components/MemoContent/CodeBlock.tsx b/web/src/components/MemoContent/CodeBlock.tsx index 4b733015f57db..25d056cc03b3b 100644 --- a/web/src/components/MemoContent/CodeBlock.tsx +++ b/web/src/components/MemoContent/CodeBlock.tsx @@ -25,7 +25,17 @@ const CodeBlock: React.FC<Props> = ({ language, content }: Props) => { // Users can set Markdown code blocks as `__html` to render HTML directly. if (formatedLanguage === SpecialLanguage.HTML) { const purify = DOMPurify(window); - return <div className="w-full overflow-auto !my-2" dangerouslySetInnerHTML={{ __html: purify.sanitize(content) }} />; + return ( + <div + className="w-full overflow-auto !my-2" + dangerouslySetInnerHTML={{ + __html: purify.sanitize(content, { + ALLOWED_TAGS: ["iframe"], + ADD_ATTR: ["allow", "allowfullscreen", "frameborder", "scrolling"], + }), + }} + /> + ); } else if (formatedLanguage === SpecialLanguage.MERMAID) { return <MermaidBlock content={content} />; }
fix
iframe rendering (#3916) * fix iframe rendering * fix eslint check
3158c4b8b58b60f7512093edc8aadfc212e46c01
2024-01-31 17:25:52
Wen Sun
fix: role error in api/v2 when the first user registers (#2875) Fix role error in api/v2 when the first user registers
false
diff --git a/api/v2/auth_service.go b/api/v2/auth_service.go index 35cd01c934b97..25a43a4ac6520 100644 --- a/api/v2/auth_service.go +++ b/api/v2/auth_service.go @@ -179,7 +179,7 @@ func (s *APIV2Service) SignUp(ctx context.Context, request *apiv2pb.SignUpReques if err != nil { return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to get workspace setting, err: %s", err)) } - if workspaceGeneralSetting.DisallowSignup { + if workspaceGeneralSetting.DisallowSignup || workspaceGeneralSetting.DisallowPasswordLogin { return nil, status.Errorf(codes.PermissionDenied, "sign up is not allowed") } @@ -193,13 +193,17 @@ func (s *APIV2Service) SignUp(ctx context.Context, request *apiv2pb.SignUpReques Nickname: request.Username, PasswordHash: string(passwordHash), } - existingUsers, err := s.Store.ListUsers(ctx, &store.FindUser{}) + + hostUserType := store.RoleHost + existedHostUsers, err := s.Store.ListUsers(ctx, &store.FindUser{ + Role: &hostUserType, + }) if err != nil { return nil, status.Errorf(codes.Internal, fmt.Sprintf("failed to list users, err: %s", err)) } - // The first user to sign up is an admin by default. - if len(existingUsers) == 0 { - create.Role = store.RoleAdmin + if len(existedHostUsers) == 0 { + // Change the default role to host if there is no host user. + create.Role = store.RoleHost } else { create.Role = store.RoleUser }
fix
role error in api/v2 when the first user registers (#2875) Fix role error in api/v2 when the first user registers
f5a0827a3f027c911efdcfe734fe3d43f3691391
2024-11-04 19:08:34
Steven
chore: update explore translate of `zh-hans`
false
diff --git a/web/src/locales/zh-Hans.json b/web/src/locales/zh-Hans.json index abdaf4dca902f..082594da1b990 100644 --- a/web/src/locales/zh-Hans.json +++ b/web/src/locales/zh-Hans.json @@ -30,7 +30,7 @@ "edit": "编辑", "email": "邮箱", "expand": "展开", - "explore": "探索", + "explore": "发现", "file": "文件", "filter": "过滤器", "home": "主页",
chore
update explore translate of `zh-hans`
f80f0f2422d4b57b49ce87a746b797ef4892466a
2022-06-21 19:44:52
Steven
chore: use markdown image syntax (#83)
false
diff --git a/web/src/components/DailyMemo.tsx b/web/src/components/DailyMemo.tsx index 9d90d06f3e89e..9c572cbf7a4be 100644 --- a/web/src/components/DailyMemo.tsx +++ b/web/src/components/DailyMemo.tsx @@ -20,7 +20,7 @@ const DailyMemo: React.FC<Props> = (props: Props) => { createdAtStr: utils.getDateTimeString(propsMemo.createdTs), timeStr: utils.getTimeString(propsMemo.createdTs), }; - const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []); + const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []).map((s) => s.replace(IMAGE_URL_REG, "$1")); return ( <div className="daily-memo-wrapper"> diff --git a/web/src/components/DeletedMemo.tsx b/web/src/components/DeletedMemo.tsx index b4f1c51097584..954c93e97e4c8 100644 --- a/web/src/components/DeletedMemo.tsx +++ b/web/src/components/DeletedMemo.tsx @@ -21,7 +21,7 @@ const DeletedMemo: React.FC<Props> = (props: Props) => { deletedAtStr: utils.getDateTimeString(propsMemo.updatedTs ?? Date.now()), }; const [showConfirmDeleteBtn, toggleConfirmDeleteBtn] = useToggle(false); - const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []); + const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []).map((s) => s.replace(IMAGE_URL_REG, "$1")); const handleDeleteMemoClick = async () => { if (showConfirmDeleteBtn) { diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsx index b307505f7dcbf..2e8aeb722f225 100644 --- a/web/src/components/Memo.tsx +++ b/web/src/components/Memo.tsx @@ -23,7 +23,7 @@ const Memo: React.FC<Props> = (props: Props) => { createdAtStr: utils.getDateTimeString(propsMemo.createdTs), }; const [showConfirmDeleteBtn, toggleConfirmDeleteBtn] = useToggle(false); - const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []); + const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []).map((s) => s.replace(IMAGE_URL_REG, "$1")); const handleShowMemoStoryDialog = () => { showMemoCardDialog(memo); diff --git a/web/src/components/MemoCardDialog.tsx b/web/src/components/MemoCardDialog.tsx index 4d844408eb884..593f39dbcc316 100644 --- a/web/src/components/MemoCardDialog.tsx +++ b/web/src/components/MemoCardDialog.tsx @@ -26,7 +26,7 @@ const MemoCardDialog: React.FC<Props> = (props: Props) => { }); const [linkMemos, setLinkMemos] = useState<LinkedMemo[]>([]); const [linkedMemos, setLinkedMemos] = useState<LinkedMemo[]>([]); - const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []); + const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []).map((s) => s.replace(IMAGE_URL_REG, "$1")); useEffect(() => { const fetchLinkedMemos = async () => { diff --git a/web/src/components/MemoEditor.tsx b/web/src/components/MemoEditor.tsx index e6d111f06050e..c53443cff1feb 100644 --- a/web/src/components/MemoEditor.tsx +++ b/web/src/components/MemoEditor.tsx @@ -80,7 +80,7 @@ const MemoEditor: React.FC<Props> = () => { const file = event.clipboardData.files[0]; const url = await handleUploadFile(file); if (url) { - editorRef.current?.insertText(url + " "); + editorRef.current?.insertText(`![](${url})`); } } }; @@ -91,7 +91,7 @@ const MemoEditor: React.FC<Props> = () => { const file = event.dataTransfer.files[0]; const url = await handleUploadFile(file); if (url) { - editorRef.current?.insertText(url); + editorRef.current?.insertText(`![](${url})`); } } }; @@ -246,7 +246,7 @@ const MemoEditor: React.FC<Props> = () => { const file = inputEl.files[0]; const url = await handleUploadFile(file); if (url) { - editorRef.current?.insertText(url); + editorRef.current?.insertText(`![](${url})`); } }; inputEl.click(); diff --git a/web/src/components/ShareMemoImageDialog.tsx b/web/src/components/ShareMemoImageDialog.tsx index 2418ed9346e5c..948d6fb4b5937 100644 --- a/web/src/components/ShareMemoImageDialog.tsx +++ b/web/src/components/ShareMemoImageDialog.tsx @@ -20,10 +20,10 @@ const ShareMemoImageDialog: React.FC<Props> = (props: Props) => { ...propsMemo, createdAtStr: utils.getDateTimeString(propsMemo.createdTs), }; - const memoImgUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []); + const imageUrls = Array.from(memo.content.match(IMAGE_URL_REG) ?? []).map((s) => s.replace(IMAGE_URL_REG, "$1")); const [shortcutImgUrl, setShortcutImgUrl] = useState(""); - const [imgAmount, setImgAmount] = useState(memoImgUrls.length); + const [imgAmount, setImgAmount] = useState(imageUrls.length); const memoElRef = useRef<HTMLDivElement>(null); useEffect(() => { @@ -81,9 +81,9 @@ const ShareMemoImageDialog: React.FC<Props> = (props: Props) => { </Only> <span className="time-text">{memo.createdAtStr}</span> <div className="memo-content-text" dangerouslySetInnerHTML={{ __html: formatMemoContent(memo.content) }}></div> - <Only when={memoImgUrls.length > 0}> + <Only when={imageUrls.length > 0}> <div className="images-container"> - {memoImgUrls.map((imgUrl, idx) => ( + {imageUrls.map((imgUrl, idx) => ( <img crossOrigin="anonymous" decoding="async" diff --git a/web/src/helpers/consts.ts b/web/src/helpers/consts.ts index 4d762fe3f8b8d..52e9d29daee4f 100644 --- a/web/src/helpers/consts.ts +++ b/web/src/helpers/consts.ts @@ -17,7 +17,7 @@ export const TAG_REG = /#(.+?) /g; export const LINK_REG = /(https?:\/\/[^\s<\\*>']+)/g; // image regex -export const IMAGE_URL_REG = /([^\s<\\*>']+\.(jpeg|jpg|gif|png|svg|webp))/g; +export const IMAGE_URL_REG = /!\[.*?\]\((.+?)\)/g; // linked memo regex export const MEMO_LINK_REG = /\[@(.+?)\]\((.+?)\)/g; diff --git a/web/src/less/daily-memo-diary-dialog.less b/web/src/less/daily-memo-diary-dialog.less index c9ac7ac418ec4..d3b0c1bb511fe 100644 --- a/web/src/less/daily-memo-diary-dialog.less +++ b/web/src/less/daily-memo-diary-dialog.less @@ -20,7 +20,7 @@ } &.share-btn { - @apply w-5 h-auto; + @apply ~"p-0.5"; } } } diff --git a/web/src/less/memo-content.less b/web/src/less/memo-content.less index 30fb4a3cd8b00..eb17f837f2b03 100644 --- a/web/src/less/memo-content.less +++ b/web/src/less/memo-content.less @@ -5,7 +5,7 @@ @apply w-full whitespace-pre-wrap break-words; > p { - @apply inline-block w-full h-auto mb-1 text-base leading-7 whitespace-pre-wrap break-words; + @apply inline-block w-full h-auto mb-1 last:mb-0 text-base leading-7 whitespace-pre-wrap break-words; } .tag-span { diff --git a/web/src/less/memo.less b/web/src/less/memo.less index 4f56f2ef6f7d8..f776fe02c6011 100644 --- a/web/src/less/memo.less +++ b/web/src/less/memo.less @@ -2,7 +2,7 @@ @import "./memo-content.less"; .memo-wrapper { - @apply flex flex-col justify-start items-start w-full max-w-full p-3 px-4 mt-2 bg-white rounded-lg border border-white hover:border-gray-200; + @apply flex flex-col justify-start items-start w-full max-w-full p-4 pt-3 mt-2 bg-white rounded-lg border border-white hover:border-gray-200; &.deleted-memo { @apply border-gray-200; @@ -13,7 +13,7 @@ } > .memo-top-wrapper { - @apply flex flex-row justify-between items-center w-full h-6 mb-2; + @apply flex flex-row justify-between items-center w-full h-6 mb-1; > .time-text { @apply text-xs text-gray-400 cursor-pointer;
chore
use markdown image syntax (#83)
95b02341ebdeae8609a63c65f65d178e35d10b92
2024-03-03 21:15:32
Steven
chore: tweak logger
false
diff --git a/server/route/api/v2/logger_interceptor.go b/server/route/api/v2/logger_interceptor.go index 0761e7879216c..5f7d2f2d995b0 100644 --- a/server/route/api/v2/logger_interceptor.go +++ b/server/route/api/v2/logger_interceptor.go @@ -40,8 +40,9 @@ func (*LoggerInterceptor) loggerInterceptorDo(ctx context.Context, fullMethod st logLevel = slog.LevelError logMsg = "unknown error" } - slog.LogAttrs(ctx, logLevel, logMsg, slog.String("method", fullMethod)) + logAttrs := []slog.Attr{slog.String("method", fullMethod)} if err != nil { - slog.LogAttrs(ctx, logLevel, "", slog.String("error", err.Error())) + logAttrs = append(logAttrs, slog.String("error", err.Error())) } + slog.LogAttrs(ctx, logLevel, logMsg, logAttrs...) }
chore
tweak logger
527745ad15b6464f231282a460af94809813e06c
2021-12-10 12:44:20
steven
update github oauth callback api
false
diff --git a/.gitignore b/.gitignore index 78660904e23d7..abc64caf42067 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ *.log tmp +# Config +config + # Air (hot reload) generated .air diff --git a/api/auth.go b/api/auth.go index 7d69d15f785f1..b93215bf41248 100644 --- a/api/auth.go +++ b/api/auth.go @@ -1,8 +1,14 @@ package api import ( + "bytes" + "database/sql" "encoding/json" + "fmt" + "io/ioutil" "memos/api/e" + "memos/common" + "memos/config" "memos/store" "net/http" @@ -88,10 +94,131 @@ func handleUserSignOut(w http.ResponseWriter, r *http.Request) { }) } +func handleGithubAuthCallback(w http.ResponseWriter, r *http.Request) { + code := r.URL.Query().Get("code") + + requestBody := map[string]string{ + "client_id": config.GITHUB_CLIENTID, + "client_secret": config.GITHUB_SECRET, + "code": code, + } + + requestJSON, _ := json.Marshal(requestBody) + + // POST request to get access_token + req, err := http.NewRequest( + "POST", + "https://github.com/login/oauth/access_token", + bytes.NewBuffer(requestJSON), + ) + + if err != nil { + e.ErrorHandler(w, "REQUEST_BODY_ERROR", "Error in request github api") + return + } + + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Accept", "application/json") + + resp, err := http.DefaultClient.Do(req) + if err != nil { + e.ErrorHandler(w, "REQUEST_BODY_ERROR", "Error in request github api") + return + } + + // Response body converted to stringified JSON + respBody, _ := ioutil.ReadAll(resp.Body) + + // Represents the response received from Github + type GithubAccessTokenResponse struct { + AccessToken string `json:"access_token"` + TokenType string `json:"token_type"` + Scope string `json:"scope"` + } + + ghResp := GithubAccessTokenResponse{} + json.Unmarshal(respBody, &ghResp) + + githubAccessToken := ghResp.AccessToken + + // Get request to a set URL + req, err = http.NewRequest( + "GET", + "https://api.github.com/user", + nil, + ) + if err != nil { + e.ErrorHandler(w, "REQUEST_BODY_ERROR", "Error in request github api") + return + } + + authorizationHeaderValue := fmt.Sprintf("token %s", githubAccessToken) + req.Header.Set("Authorization", authorizationHeaderValue) + + resp, err = http.DefaultClient.Do(req) + + if err != nil { + e.ErrorHandler(w, "REQUEST_BODY_ERROR", "Error in request github api") + return + } + + respBody, _ = ioutil.ReadAll(resp.Body) + + githubData := string(respBody) + + type GithubUser struct { + Login string `json:"login"` + Name string `json:"name"` + } + + githubUser := GithubUser{} + json.Unmarshal([]byte(githubData), &githubUser) + + session, _ := SessionStore.Get(r, "session") + userId := fmt.Sprintf("%v", session.Values["user_id"]) + + if userId != "" { + githubNameUsable, err := store.CheckGithubNameUsable(githubUser.Login) + + if err != nil { + e.ErrorHandler(w, "DATABASE_ERROR", "Error in CheckGithubNameUsable") + return + } + + if !githubNameUsable { + e.ErrorHandler(w, "DATABASE_ERROR", "Error in CheckGithubNameUsable") + return + } + + userPatch := store.UserPatch{ + GithubName: &githubUser.Login, + } + + store.UpdateUser(userId, &userPatch) + } + + user, err := store.GetUserByGithubName(githubUser.Login) + + if err == sql.ErrNoRows { + username := githubUser.Name + usernameUsable, _ := store.CheckUsernameUsable(username) + if !usernameUsable { + username = username + common.GenUUID() + } + user, _ = store.CreateNewUser(username, username, githubUser.Login, "") + } + + session.Values["user_id"] = user.Id + session.Save(r, w) + + http.Redirect(w, r, "/", http.StatusTemporaryRedirect) +} + func RegisterAuthRoutes(r *mux.Router) { authRouter := r.PathPrefix("/api/auth").Subrouter() authRouter.HandleFunc("/signup", handleUserSignUp).Methods("POST") authRouter.HandleFunc("/signin", handleUserSignIn).Methods("POST") authRouter.HandleFunc("/signout", handleUserSignOut).Methods("POST") + authRouter.HandleFunc("/github", handleGithubAuthCallback).Methods("GET") } diff --git a/main.go b/main.go index 50bc2e90df7e9..a8f2b8b4fb2b4 100644 --- a/main.go +++ b/main.go @@ -13,8 +13,8 @@ func main() { r := mux.NewRouter().StrictSlash(true) - api.RegisterUserRoutes(r) api.RegisterAuthRoutes(r) + api.RegisterUserRoutes(r) api.RegisterMemoRoutes(r) api.RegisterQueryRoutes(r) diff --git a/resources/memos.db b/resources/memos.db index e420b8d2c0538..5f0e267e61504 100644 Binary files a/resources/memos.db and b/resources/memos.db differ diff --git a/web/src/App.tsx b/web/src/App.tsx index e448b14154892..0f75e7b653dcd 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -3,7 +3,6 @@ import appContext from "./stores/appContext"; import { appRouterSwitch } from "./routers"; import { globalStateService } from "./services"; import "./less/app.less"; -import 'prismjs/themes/prism.css'; function App() { const { diff --git a/web/src/components/MyAccountSection.tsx b/web/src/components/MyAccountSection.tsx index 85ba67189ae6a..fdd7c5d77877e 100644 --- a/web/src/components/MyAccountSection.tsx +++ b/web/src/components/MyAccountSection.tsx @@ -155,7 +155,7 @@ const MyAccountSection: React.FC<Props> = () => { <Only when={window.location.origin.includes("justsven.top")}> <div className="section-container connect-section-container"> <p className="title-text">关联账号</p> - <label className="form-label input-form-label"> + <label className="form-label input-form-label hidden"> <span className="normal-text">微信 OpenID:</span> {user.wxOpenId ? ( <>
unknown
update github oauth callback api
387799b31c170144b9b5cac3d957d3b91df8da1b
2022-12-10 09:44:02
M. Gschwandtner
fix: added dark theme bg color to buttons (#719)
false
diff --git a/web/src/less/preview-image-dialog.less b/web/src/less/preview-image-dialog.less index e60f7ad3e2566..c1244fd45a779 100644 --- a/web/src/less/preview-image-dialog.less +++ b/web/src/less/preview-image-dialog.less @@ -11,7 +11,7 @@ @apply fixed top-8 right-8 flex flex-col justify-start items-center; > .btn { - @apply mb-3 last:mb-0 w-8 h-8 p-1 cursor-pointer rounded opacity-90 bg-gray-300 z-10 shadow-md hover:opacity-70; + @apply mb-3 last:mb-0 w-8 h-8 p-1 cursor-pointer rounded opacity-90 bg-gray-300 dark:bg-zinc-600 z-10 shadow-md hover:opacity-70; > .icon-img { @apply w-6 h-auto;
fix
added dark theme bg color to buttons (#719)
b4f9c09d8507eda9af8be3887ab67b5a649d3840
2024-11-07 21:02:44
johnnyjoy
chore: upgrade backend dependencies
false
diff --git a/go.mod b/go.mod index 02999770a610b..ca3a181ffc3e5 100644 --- a/go.mod +++ b/go.mod @@ -3,17 +3,17 @@ module github.com/usememos/memos go 1.23 require ( - github.com/aws/aws-sdk-go-v2 v1.32.3 - github.com/aws/aws-sdk-go-v2/config v1.28.1 - github.com/aws/aws-sdk-go-v2/credentials v1.17.42 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.35 - github.com/aws/aws-sdk-go-v2/service/s3 v1.66.2 + github.com/aws/aws-sdk-go-v2 v1.32.4 + github.com/aws/aws-sdk-go-v2/config v1.28.2 + github.com/aws/aws-sdk-go-v2/credentials v1.17.43 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.36 + github.com/aws/aws-sdk-go-v2/service/s3 v1.66.3 github.com/go-sql-driver/mysql v1.8.1 - github.com/google/cel-go v0.21.0 + github.com/google/cel-go v0.22.0 github.com/google/uuid v1.6.0 github.com/gorilla/feeds v1.2.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 github.com/improbable-eng/grpc-web v0.15.0 github.com/joho/godotenv v1.5.1 github.com/labstack/echo/v4 v4.12.0 @@ -25,22 +25,23 @@ require ( github.com/stretchr/testify v1.9.0 github.com/usememos/gomark v0.0.0-20240928134159-9aca881d9121 golang.org/x/crypto v0.28.0 - golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 + golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c golang.org/x/mod v0.21.0 golang.org/x/net v0.30.0 golang.org/x/oauth2 v0.23.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 + google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 google.golang.org/grpc v1.67.1 modernc.org/sqlite v1.33.1 ) require ( + cel.dev/expr v0.18.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/desertbit/timer v1.0.1 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -58,10 +59,10 @@ require ( github.com/stoewer/go-strcase v1.3.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/image v0.20.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect + golang.org/x/image v0.21.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a // indirect + modernc.org/gc/v3 v3.0.0-20241004144649-1aea3fae8852 // indirect modernc.org/libc v1.61.0 // indirect modernc.org/mathutil v1.6.0 // indirect modernc.org/memory v1.8.0 // indirect @@ -72,18 +73,18 @@ require ( require ( github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.22 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.4 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 // indirect github.com/aws/smithy-go v1.22.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/disintegration/imaging v1.6.2 @@ -100,7 +101,7 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect golang.org/x/sys v0.26.0 // indirect golang.org/x/text v0.19.0 // indirect - golang.org/x/time v0.6.0 // indirect - google.golang.org/protobuf v1.34.2 + golang.org/x/time v0.7.0 // indirect + google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 6358bfa350989..3aabda9f85871 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= +cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -26,42 +28,42 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.32.3 h1:T0dRlFBKcdaUPGNtkBSwHZxrtis8CQU17UpNBZYd0wk= -github.com/aws/aws-sdk-go-v2 v1.32.3/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= +github.com/aws/aws-sdk-go-v2 v1.32.4 h1:S13INUiTxgrPueTmrm5DZ+MiAo99zYzHEFh1UNkOxNE= +github.com/aws/aws-sdk-go-v2 v1.32.4/go.mod h1:2SK5n0a2karNTv5tbP1SjsX0uhttou00v/HpXKM1ZUo= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6 h1:pT3hpW0cOHRJx8Y0DfJUEQuqPild8jRGmSFmBgvydr0= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.6/go.mod h1:j/I2++U0xX+cr44QjHay4Cvxj6FUbnxrgmqN3H1jTZA= -github.com/aws/aws-sdk-go-v2/config v1.28.1 h1:oxIvOUXy8x0U3fR//0eq+RdCKimWI900+SV+10xsCBw= -github.com/aws/aws-sdk-go-v2/config v1.28.1/go.mod h1:bRQcttQJiARbd5JZxw6wG0yIK3eLeSCPdg6uqmmlIiI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.42 h1:sBP0RPjBU4neGpIYyx8mkU2QqLPl5u9cmdTWVzIpHkM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.42/go.mod h1:FwZBfU530dJ26rv9saAbxa9Ej3eF/AK0OAY86k13n4M= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18 h1:68jFVtt3NulEzojFesM/WVarlFpCaXLKaBxDpzkQ9OQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.18/go.mod h1:Fjnn5jQVIo6VyedMc0/EhPpfNlPl7dHV916O6B+49aE= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.35 h1:ihPPdcCVSN0IvBByXwqVp28/l4VosBZ6sDulcvU2J7w= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.35/go.mod h1:JkgEhs3SVF51Dj3m1Bj+yL8IznpxzkwlA3jLg3x7Kls= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22 h1:Jw50LwEkVjuVzE1NzkhNKkBf9cRN7MtE1F/b2cOKTUM= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.22/go.mod h1:Y/SmAyPcOTmpeVaWSzSKiILfXTVJwrGmYZhcRbhWuEY= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22 h1:981MHwBaRZM7+9QSR6XamDzF/o7ouUGxFzr+nVSIhrs= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.22/go.mod h1:1RA1+aBEfn+CAB/Mh0MB6LsdCYCnjZm7tKXtnk499ZQ= +github.com/aws/aws-sdk-go-v2/config v1.28.2 h1:FLvWA97elBiSPdIol4CXfIAY1wlq3KzoSgkMuZSuSe8= +github.com/aws/aws-sdk-go-v2/config v1.28.2/go.mod h1:hNmQsKfUqpKz2yfnZUB60GCemPmeqAalVTui0gOxjAE= +github.com/aws/aws-sdk-go-v2/credentials v1.17.43 h1:SEGdVOOE1Wyr2XFKQopQ5GYjym3nYHcphesdt78rNkY= +github.com/aws/aws-sdk-go-v2/credentials v1.17.43/go.mod h1:3aiza5kSyAE4eujSanOkSkAmX/RnVqslM+GRQ/Xvv4c= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19 h1:woXadbf0c7enQ2UGCi8gW/WuKmE0xIzxBF/eD94jMKQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.19/go.mod h1:zminj5ucw7w0r65bP6nhyOd3xL6veAUMc3ElGMoLVb4= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.36 h1:3SMd6Jpp/YUhOv1q7jvXLao//8RvOdxMuub+HasH6g0= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.36/go.mod h1:H6f0wMJHnqlhkPeSX3L/44/04zzWkZDyoxqfl6J2DlU= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23 h1:A2w6m6Tmr+BNXjDsr7M90zkWjsu4JXHwrzPg235STs4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.23/go.mod h1:35EVp9wyeANdujZruvHiQUAo9E3vbhnIO1mTCAxMlY0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23 h1:pgYW9FCabt2M25MoHYCfMrVY2ghiiBKYWUVXfwZs+sU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.23/go.mod h1:c48kLgzO19wAu3CPkDWC28JbaJ+hfQlsdl7I2+oqIbk= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.22 h1:yV+hCAHZZYJQcwAaszoBNwLbPItHvApxT0kVIw6jRgs= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.22/go.mod h1:kbR1TL8llqB1eGnVbybcA4/wgScxdylOdyAd51yxPdw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23 h1:1SZBDiRzzs3sNhOMVApyWPduWYGAX0imGy06XiBnCAM= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.23/go.mod h1:i9TkxgbZmHVh2S0La6CAXtnyFhlCX/pJ0JsOvBAS6Mk= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.3 h1:kT6BcZsmMtNkP/iYMcRG+mIEA/IbeiUimXtGmqF39y0= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.3/go.mod h1:Z8uGua2k4PPaGOYn66pK02rhMrot3Xk3tpBuUFPomZU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3 h1:qcxX0JYlgWH3hpPUnd6U0ikcl6LLA9sLkXE2w1fpMvY= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.3/go.mod h1:cLSNEmI45soc+Ef8K/L+8sEA3A3pYFEYf5B5UI+6bH4= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.3 h1:ZC7Y/XgKUxwqcdhO5LE8P6oGP1eh6xlQReWNKfhvJno= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.3/go.mod h1:WqfO7M9l9yUAw0HcHaikwRd/H6gzYdz7vjejCA5e2oY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.66.2 h1:p9TNFL8bFUMd+38YIpTAXpoxyz0MxC7FlbFEH4P4E1U= -github.com/aws/aws-sdk-go-v2/service/s3 v1.66.2/go.mod h1:fNjyo0Coen9QTwQLWeV6WO2Nytwiu+cCcWaTdKCAqqE= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.3 h1:UTpsIf0loCIWEbrqdLb+0RxnTXfWh2vhw4nQmFi4nPc= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.3/go.mod h1:FZ9j3PFHHAR+w0BSEjK955w5YD2UwB/l/H0yAK3MJvI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3 h1:2YCmIXv3tmiItw0LlYf6v7gEHebLY45kBEnPezbUKyU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.3/go.mod h1:u19stRyNPxGhj6dRm+Cdgu6N75qnbW7+QN0q0dsAk58= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.3 h1:wVnQ6tigGsRqSWDEEyH6lSAJ9OyFUsSnbaUWChuSGzs= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.3/go.mod h1:VZa9yTFyj4o10YGsmDO4gbQJUvvhY72fhumT8W4LqsE= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4 h1:aaPpoG15S2qHkWm4KlEyF01zovK1nW4BBbyXuHNSE90= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.4/go.mod h1:eD9gS2EARTKgGr/W5xwgY/ik9z/zqpW+m/xOQbVxrMk= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4 h1:tHxQi/XHPK0ctd/wdOw0t7Xrc2OxcRCnVzv8lwWPu0c= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.4/go.mod h1:4GQbF1vJzG60poZqWatZlhP31y8PGCCVTvIGPdaaYJ0= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4 h1:E5ZAVOmI2apR8ADb72Q63KqwwwdW1XcMeXIlrZ1Psjg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.4/go.mod h1:wezzqVUOVVdk+2Z/JzQT4NxAU0NbhRe5W8pIE72jsWI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.66.3 h1:neNOYJl72bHrz9ikAEED4VqWyND/Po0DnEx64RW6YM4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.66.3/go.mod h1:TMhLIyRIyoGVlaEMAt+ITMbwskSTpcGsCPDq91/ihY0= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.4 h1:BqE3NRG6bsODh++VMKMsDmFuJTHrdD4rJZqHjDeF6XI= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.4/go.mod h1:wrMCEwjFPms+V86TCQQeOxQF/If4vT44FGIOFiMC2ck= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4 h1:zcx9LiGWZ6i6pjdcoE9oXAB6mUdeyC36Ia/QEiIvYdg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.4/go.mod h1:Tp/ly1cTjRLGBBmNccFumbZ8oqpZlpdhFf80SrRh4is= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.4 h1:yDxvkz3/uOKfxnv8YhzOi9m+2OGIxF+on3KOISbK5IU= +github.com/aws/aws-sdk-go-v2/service/sts v1.32.4/go.mod h1:9XEUty5v5UAsMiFOBJrNibZgwCeOma73jgGwwhgffa8= github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -115,8 +117,8 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= @@ -170,8 +172,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.21.0 h1:cl6uW/gxN+Hy50tNYvI691+sXxioCnstFzLp2WO4GCI= -github.com/google/cel-go v0.21.0/go.mod h1:rHUlWCcBKgyEk+eV03RPdZUekPp6YcJwV0FxuUksYxc= +github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= +github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -201,8 +203,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDa github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -478,13 +480,13 @@ golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= -golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.20.0 h1:7cVCUjQwfL18gyBJOmYvptfSHS8Fb3YUDtfLIZ7Nbpw= -golang.org/x/image v0.20.0/go.mod h1:0a88To4CYVBAHp5FXJm8o7QbUl37Vd85ply1vyD8auM= +golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s= +golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -577,8 +579,8 @@ golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -597,8 +599,8 @@ golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= -golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -615,10 +617,10 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= -google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 h1:M0KvPgPmDZHPlbRbaNU1APr28TvwvvdUPlSv7PUvy8g= +google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:dguCy7UOdZhTvLzDyt15+rOrawrpM4q7DD9dQ1P11P4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28 h1:XVhgTWWV3kGQlwJHR3upFWZeTsei6Oks1apkZSeonIE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241104194629-dd2ea8efbc28/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -644,8 +646,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -684,8 +686,8 @@ modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= modernc.org/gc/v2 v2.5.0 h1:bJ9ChznK1L1mUtAQtxi0wi5AtAs5jQuw4PrPHO5pb6M= modernc.org/gc/v2 v2.5.0/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= -modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a h1:CfbpOLEo2IwNzJdMvE8aiRbPMxoTpgAJeyePh0SmO8M= -modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= +modernc.org/gc/v3 v3.0.0-20241004144649-1aea3fae8852 h1:IYXPPTTjjoSHvUClZIYexDiO7g+4x+XveKT4gCIAwiY= +modernc.org/gc/v3 v3.0.0-20241004144649-1aea3fae8852/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= modernc.org/libc v1.61.0 h1:eGFcvWpqlnoGwzZeZe3PWJkkKbM/3SUGyk1DVZQ0TpE= modernc.org/libc v1.61.0/go.mod h1:DvxVX89wtGTu+r72MLGhygpfi3aUGgZRdAYGCAVVud0= modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4=
chore
upgrade backend dependencies
5258b0a5b49d5288d2c5d7524b918f2d81e01017
2022-11-15 16:25:11
Zeng1998
chore: change memo card's bg color (#471)
false
diff --git a/web/src/less/memo-card-dialog.less b/web/src/less/memo-card-dialog.less index 31c4f864945e6..ce16fb1447b5f 100644 --- a/web/src/less/memo-card-dialog.less +++ b/web/src/less/memo-card-dialog.less @@ -41,7 +41,7 @@ > .layer-container, > .background-layer-container { - @apply bg-amber-100; + @apply bg-white; position: absolute; bottom: -3px; left: 3px; @@ -53,7 +53,7 @@ } > .layer-container { - @apply bg-amber-100; + @apply bg-white; z-index: 0; border: 1px solid lightgray; width: 100%;
chore
change memo card's bg color (#471)
29124f56bbbb16e831d1be5e6e1d9c87f6f0ae3a
2023-02-22 17:37:55
boojack
chore: update memo service (#1138) * chore: update memo service * chore: update
false
diff --git a/api/memo.go b/api/memo.go index b34403d78e483..cc76418d65584 100644 --- a/api/memo.go +++ b/api/memo.go @@ -1,5 +1,8 @@ package api +// MaxContentLength means the max memo content bytes is 1MB. +const MaxContentLength = 1 << 30 + // Visibility is the type of a visibility. type Visibility string @@ -37,7 +40,6 @@ type Memo struct { Content string `json:"content"` Visibility Visibility `json:"visibility"` Pinned bool `json:"pinned"` - DisplayTs int64 `json:"displayTs"` // Related fields Creator *User `json:"creator"` @@ -86,8 +88,8 @@ type MemoFind struct { VisibilityList []Visibility // Pagination - Limit int - Offset int + Limit *int + Offset *int } type MemoDelete struct { diff --git a/api/user_setting.go b/api/user_setting.go index c6c8b47706b2e..a396261f79b75 100644 --- a/api/user_setting.go +++ b/api/user_setting.go @@ -16,8 +16,6 @@ const ( UserSettingAppearanceKey UserSettingKey = "appearance" // UserSettingMemoVisibilityKey is the key type for user preference memo default visibility. UserSettingMemoVisibilityKey UserSettingKey = "memoVisibility" - // UserSettingMemoDisplayTsOptionKey is the key type for memo display ts option. - UserSettingMemoDisplayTsOptionKey UserSettingKey = "memoDisplayTsOption" ) // String returns the string format of UserSettingKey type. @@ -29,17 +27,14 @@ func (key UserSettingKey) String() string { return "appearance" case UserSettingMemoVisibilityKey: return "memoVisibility" - case UserSettingMemoDisplayTsOptionKey: - return "memoDisplayTsOption" } return "" } var ( - UserSettingLocaleValue = []string{"en", "zh", "vi", "fr", "nl", "sv", "de", "es", "uk", "ru", "it", "hant", "ko"} - UserSettingAppearanceValue = []string{"system", "light", "dark"} - UserSettingMemoVisibilityValue = []Visibility{Private, Protected, Public} - UserSettingMemoDisplayTsOptionKeyValue = []string{"created_ts", "updated_ts"} + UserSettingLocaleValue = []string{"en", "zh", "vi", "fr", "nl", "sv", "de", "es", "uk", "ru", "it", "hant", "ko"} + UserSettingAppearanceValue = []string{"system", "light", "dark"} + UserSettingMemoVisibilityValue = []Visibility{Private, Protected, Public} ) type UserSetting struct { @@ -83,15 +78,6 @@ func (upsert UserSettingUpsert) Validate() error { if !slices.Contains(UserSettingMemoVisibilityValue, memoVisibilityValue) { return fmt.Errorf("invalid user setting memo visibility value") } - } else if upsert.Key == UserSettingMemoDisplayTsOptionKey { - memoDisplayTsOption := "created_ts" - err := json.Unmarshal([]byte(upsert.Value), &memoDisplayTsOption) - if err != nil { - return fmt.Errorf("failed to unmarshal user setting memo display ts option") - } - if !slices.Contains(UserSettingMemoDisplayTsOptionKeyValue, memoDisplayTsOption) { - return fmt.Errorf("invalid user setting memo display ts option value") - } } else { return fmt.Errorf("invalid user setting key") } diff --git a/server/memo.go b/server/memo.go index 78e7cafdc4b86..0b0d28882a298 100644 --- a/server/memo.go +++ b/server/memo.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "net/http" - "sort" "strconv" "strings" "time" @@ -71,6 +70,10 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { } } + if len(memoCreate.Content) > api.MaxContentLength { + return echo.NewHTTPError(http.StatusBadRequest, "Content size overflow, up to 1MB").SetInternal(err) + } + memoCreate.CreatorID = userID memo, err := s.Store.CreateMemo(ctx, memoCreate) if err != nil { @@ -127,6 +130,10 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { return echo.NewHTTPError(http.StatusBadRequest, "Malformatted patch memo request").SetInternal(err) } + if memoPatch.Content != nil && len(*memoPatch.Content) > api.MaxContentLength { + return echo.NewHTTPError(http.StatusBadRequest, "Content size overflow, up to 1MB").SetInternal(err) + } + memo, err = s.Store.PatchMemo(ctx, memoPatch) if err != nil { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to patch memo").SetInternal(err) @@ -192,10 +199,10 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { memoFind.VisibilityList = visibilityList } if limit, err := strconv.Atoi(c.QueryParam("limit")); err == nil { - memoFind.Limit = limit + memoFind.Limit = &limit } if offset, err := strconv.Atoi(c.QueryParam("offset")); err == nil { - memoFind.Offset = offset + memoFind.Offset = &offset } list, err := s.Store.FindMemoList(ctx, memoFind) @@ -214,20 +221,9 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { } } - sort.Slice(pinnedMemoList, func(i, j int) bool { - return pinnedMemoList[i].DisplayTs > pinnedMemoList[j].DisplayTs - }) - sort.Slice(unpinnedMemoList, func(i, j int) bool { - return unpinnedMemoList[i].DisplayTs > unpinnedMemoList[j].DisplayTs - }) - memoList := []*api.Memo{} memoList = append(memoList, pinnedMemoList...) memoList = append(memoList, unpinnedMemoList...) - - if memoFind.Limit != 0 { - memoList = memoList[memoFind.Offset:common.Min(len(memoList), memoFind.Offset+memoFind.Limit)] - } return c.JSON(http.StatusOK, composeResponse(memoList)) }) @@ -399,11 +395,11 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to fetch memo list").SetInternal(err) } - displayTsList := []int64{} + createdTsList := []int64{} for _, memo := range list { - displayTsList = append(displayTsList, memo.DisplayTs) + createdTsList = append(createdTsList, memo.CreatedTs) } - return c.JSON(http.StatusOK, composeResponse(displayTsList)) + return c.JSON(http.StatusOK, composeResponse(createdTsList)) }) g.GET("/memo/all", func(c echo.Context) error { @@ -436,10 +432,10 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { memoFind.VisibilityList = visibilityList } if limit, err := strconv.Atoi(c.QueryParam("limit")); err == nil { - memoFind.Limit = limit + memoFind.Limit = &limit } if offset, err := strconv.Atoi(c.QueryParam("offset")); err == nil { - memoFind.Offset = offset + memoFind.Offset = &offset } // Only fetch normal status memos. @@ -450,14 +446,6 @@ func (s *Server) registerMemoRoutes(g *echo.Group) { if err != nil { return echo.NewHTTPError(http.StatusInternalServerError, "Failed to fetch all memo list").SetInternal(err) } - - sort.Slice(list, func(i, j int) bool { - return list[i].DisplayTs > list[j].DisplayTs - }) - - if memoFind.Limit != 0 { - list = list[memoFind.Offset:common.Min(len(list), memoFind.Offset+memoFind.Limit)] - } return c.JSON(http.StatusOK, composeResponse(list)) }) diff --git a/store/memo.go b/store/memo.go index 469491e6351a0..328dd0e067542 100644 --- a/store/memo.go +++ b/store/memo.go @@ -3,7 +3,6 @@ package store import ( "context" "database/sql" - "encoding/json" "fmt" "strings" @@ -43,7 +42,6 @@ func (raw *memoRaw) toMemo() *api.Memo { // Domain specific fields Content: raw.Content, Visibility: raw.Visibility, - DisplayTs: raw.CreatedTs, Pinned: raw.Pinned, } } @@ -56,25 +54,6 @@ func (s *Store) ComposeMemo(ctx context.Context, memo *api.Memo) (*api.Memo, err return nil, err } - memoDisplayTsOptionKey := api.UserSettingMemoDisplayTsOptionKey - memoDisplayTsOptionSetting, err := s.FindUserSetting(ctx, &api.UserSettingFind{ - UserID: memo.CreatorID, - Key: &memoDisplayTsOptionKey, - }) - if err != nil { - return nil, err - } - memoDisplayTsOptionValue := "created_ts" - if memoDisplayTsOptionSetting != nil { - err = json.Unmarshal([]byte(memoDisplayTsOptionSetting.Value), &memoDisplayTsOptionValue) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal user setting memo display ts option value") - } - } - if memoDisplayTsOptionValue == "updated_ts" { - memo.DisplayTs = memo.UpdatedTs - } - return memo, nil } @@ -329,6 +308,13 @@ func findMemoRawList(ctx context.Context, tx *sql.Tx, find *api.MemoFind) ([]*me WHERE ` + strings.Join(where, " AND ") + ` ORDER BY memo.created_ts DESC ` + if find.Limit != nil { + query = fmt.Sprintf("%s LIMIT %d", query, *find.Limit) + if find.Offset != nil { + query = fmt.Sprintf("%s OFFSET %d", query, *find.Offset) + } + } + rows, err := tx.QueryContext(ctx, query, args...) if err != nil { return nil, FormatError(err) diff --git a/web/src/components/DailyMemo.tsx b/web/src/components/DailyMemo.tsx index 0012594528c02..1555b766168a6 100644 --- a/web/src/components/DailyMemo.tsx +++ b/web/src/components/DailyMemo.tsx @@ -9,7 +9,7 @@ interface Props { const DailyMemo: React.FC<Props> = (props: Props) => { const { memo } = props; - const displayTimeStr = utils.getTimeString(memo.displayTs); + const createdTimeStr = utils.getTimeString(memo.createdTs); const displayConfig: DisplayConfig = { enableExpand: false, }; @@ -17,7 +17,7 @@ const DailyMemo: React.FC<Props> = (props: Props) => { return ( <div className="daily-memo-wrapper"> <div className="time-wrapper"> - <span className="normal-text">{displayTimeStr}</span> + <span className="normal-text">{createdTimeStr}</span> </div> <div className="memo-container"> <MemoContent content={memo.content} displayConfig={displayConfig} /> diff --git a/web/src/components/DailyReviewDialog.tsx b/web/src/components/DailyReviewDialog.tsx index 8ababb87a07c9..b8acd07d8173b 100644 --- a/web/src/components/DailyReviewDialog.tsx +++ b/web/src/components/DailyReviewDialog.tsx @@ -31,10 +31,10 @@ const DailyReviewDialog: React.FC<Props> = (props: Props) => { .filter( (m) => m.rowStatus === "NORMAL" && - utils.getTimeStampByDate(m.displayTs) >= currentDateStamp && - utils.getTimeStampByDate(m.displayTs) < currentDateStamp + DAILY_TIMESTAMP + utils.getTimeStampByDate(m.createdTs) >= currentDateStamp && + utils.getTimeStampByDate(m.createdTs) < currentDateStamp + DAILY_TIMESTAMP ) - .sort((a, b) => utils.getTimeStampByDate(a.displayTs) - utils.getTimeStampByDate(b.displayTs)); + .sort((a, b) => utils.getTimeStampByDate(a.createdTs) - utils.getTimeStampByDate(b.createdTs)); const handleShareBtnClick = () => { if (!memosElRef.current) { diff --git a/web/src/components/Memo.tsx b/web/src/components/Memo.tsx index c256a9651eb8e..b75388ddd6f6d 100644 --- a/web/src/components/Memo.tsx +++ b/web/src/components/Memo.tsx @@ -1,3 +1,4 @@ +import { Tooltip } from "@mui/joy"; import copy from "copy-to-clipboard"; import dayjs from "dayjs"; import { memo, useEffect, useRef, useState } from "react"; @@ -34,15 +35,16 @@ const Memo: React.FC<Props> = (props: Props) => { const locationStore = useLocationStore(); const userStore = useUserStore(); const memoStore = useMemoStore(); - const [displayTimeStr, setDisplayTimeStr] = useState<string>(getFormatedMemoTimeStr(memo.displayTs, i18n.language)); + const [createdTimeStr, setCreatedTimeStr] = useState<string>(getFormatedMemoTimeStr(memo.createdTs, i18n.language)); const memoContainerRef = useRef<HTMLDivElement>(null); const isVisitorMode = userStore.isVisitorMode(); + const updatedTimeStr = getFormatedMemoTimeStr(memo.updatedTs, i18n.language); useEffect(() => { let intervalFlag: any = -1; - if (Date.now() - memo.displayTs < 1000 * 60 * 60 * 24) { + if (Date.now() - memo.createdTs < 1000 * 60 * 60 * 24) { intervalFlag = setInterval(() => { - setDisplayTimeStr(getFormatedMemoTimeStr(memo.displayTs, i18n.language)); + setCreatedTimeStr(getFormatedMemoTimeStr(memo.createdTs, i18n.language)); }, 1000 * 1); } @@ -166,7 +168,7 @@ const Memo: React.FC<Props> = (props: Props) => { editorStore.setEditMemoWithId(memo.id); }; - const handleMemoDisplayTimeClick = () => { + const handleMemoCreatedTimeClick = () => { showChangeMemoCreatedTsDialog(memo.id); }; @@ -184,9 +186,11 @@ const Memo: React.FC<Props> = (props: Props) => { {memo.pinned && <div className="corner-container"></div>} <div className="memo-top-wrapper"> <div className="status-text-container"> - <span className="time-text" onDoubleClick={handleMemoDisplayTimeClick}> - {displayTimeStr} - </span> + <Tooltip title={`Updated at ${updatedTimeStr}`} placement="top" arrow> + <span className="time-text" onDoubleClick={handleMemoCreatedTimeClick}> + {createdTimeStr} + </span> + </Tooltip> {memo.visibility !== "PRIVATE" && !isVisitorMode && ( <span className={`status-text ${memo.visibility.toLocaleLowerCase()}`} diff --git a/web/src/components/MemoList.tsx b/web/src/components/MemoList.tsx index cf66fbde7a243..ee177c81b54a9 100644 --- a/web/src/components/MemoList.tsx +++ b/web/src/components/MemoList.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { useLocationStore, useMemoStore, useShortcutStore, useUserStore } from "../store/module"; +import { useLocationStore, useMemoStore, useShortcutStore } from "../store/module"; import { TAG_REG, LINK_REG } from "../labs/marked/parser"; import * as utils from "../helpers/utils"; import { DEFAULT_MEMO_LIMIT } from "../helpers/consts"; @@ -11,12 +11,10 @@ import "../less/memo-list.less"; const MemoList = () => { const { t } = useTranslation(); - const userStore = useUserStore(); const memoStore = useMemoStore(); const shortcutStore = useShortcutStore(); const locationStore = useLocationStore(); const query = locationStore.state.query; - const memoDisplayTsOption = userStore.state.user?.setting.memoDisplayTsOption; const { memos, isFetching } = memoStore.state; const [isComplete, setIsComplete] = useState<boolean>(false); @@ -54,7 +52,7 @@ const MemoList = () => { if ( duration && duration.from < duration.to && - (utils.getTimeStampByDate(memo.displayTs) < duration.from || utils.getTimeStampByDate(memo.displayTs) > duration.to) + (utils.getTimeStampByDate(memo.createdTs) < duration.from || utils.getTimeStampByDate(memo.createdTs) > duration.to) ) { shouldShow = false; } @@ -79,7 +77,7 @@ const MemoList = () => { const pinnedMemos = shownMemos.filter((m) => m.pinned); const unpinnedMemos = shownMemos.filter((m) => !m.pinned); const memoSort = (mi: Memo, mj: Memo) => { - return mj.displayTs - mi.displayTs; + return mj.createdTs - mi.createdTs; }; pinnedMemos.sort(memoSort); unpinnedMemos.sort(memoSort); @@ -99,7 +97,7 @@ const MemoList = () => { console.error(error); toastHelper.error(error.response.data.message); }); - }, [memoDisplayTsOption]); + }, []); useEffect(() => { const pageWrapper = document.body.querySelector(".page-wrapper"); @@ -134,7 +132,7 @@ const MemoList = () => { return ( <div className="memo-list-container"> {sortedMemos.map((memo) => ( - <Memo key={`${memo.id}-${memo.displayTs}`} memo={memo} /> + <Memo key={`${memo.id}-${memo.createdTs}`} memo={memo} /> ))} {isFetching ? ( <div className="status-text-container fetching-tip"> diff --git a/web/src/components/Settings/PreferencesSection.tsx b/web/src/components/Settings/PreferencesSection.tsx index 07654528b9c0a..28ff71e64aee2 100644 --- a/web/src/components/Settings/PreferencesSection.tsx +++ b/web/src/components/Settings/PreferencesSection.tsx @@ -2,7 +2,7 @@ import { Select, Switch, Option } from "@mui/joy"; import React from "react"; import { useTranslation } from "react-i18next"; import { useGlobalStore, useUserStore } from "../../store/module"; -import { VISIBILITY_SELECTOR_ITEMS, MEMO_DISPLAY_TS_OPTION_SELECTOR_ITEMS } from "../../helpers/consts"; +import { VISIBILITY_SELECTOR_ITEMS } from "../../helpers/consts"; import AppearanceSelect from "../AppearanceSelect"; import LocaleSelect from "../LocaleSelect"; import "../../less/settings/preferences-section.less"; @@ -20,13 +20,6 @@ const PreferencesSection = () => { }; }); - const memoDisplayTsOptionSelectorItems = MEMO_DISPLAY_TS_OPTION_SELECTOR_ITEMS.map((item) => { - return { - value: item.value, - text: t(`setting.preference-section.${item.value}`), - }; - }); - const handleLocaleSelectChange = async (locale: Locale) => { await userStore.upsertUserSetting("locale", locale); globalStore.setLocale(locale); @@ -41,10 +34,6 @@ const PreferencesSection = () => { await userStore.upsertUserSetting("memoVisibility", value); }; - const handleMemoDisplayTsOptionChanged = async (value: string) => { - await userStore.upsertUserSetting("memoDisplayTsOption", value); - }; - const handleIsFoldingEnabledChanged = (event: React.ChangeEvent<HTMLInputElement>) => { userStore.upsertLocalSetting({ ...localSetting, enableFoldMemo: event.target.checked }); }; @@ -83,24 +72,6 @@ const PreferencesSection = () => { ))} </Select> </div> - <label className="form-label selector"> - <span className="normal-text">{t("setting.preference-section.default-memo-sort-option")}</span> - <Select - className="!min-w-[10rem] w-auto text-sm" - value={setting.memoDisplayTsOption} - onChange={(_, value) => { - if (value) { - handleMemoDisplayTsOptionChanged(value); - } - }} - > - {memoDisplayTsOptionSelectorItems.map((item) => ( - <Option key={item.value} value={item.value} className="whitespace-nowrap"> - {item.text} - </Option> - ))} - </Select> - </label> <label className="form-label selector"> <span className="normal-text">{t("setting.preference-section.enable-folding-memo")}</span> <Switch className="ml-2" checked={localSetting.enableFoldMemo} onChange={handleIsFoldingEnabledChanged} /> diff --git a/web/src/components/ShareMemoDialog.tsx b/web/src/components/ShareMemoDialog.tsx index b35bc00a4bca8..ef2f3c9865622 100644 --- a/web/src/components/ShareMemoDialog.tsx +++ b/web/src/components/ShareMemoDialog.tsx @@ -44,7 +44,7 @@ const ShareMemoDialog: React.FC<Props> = (props: Props) => { const memoElRef = useRef<HTMLDivElement>(null); const memo = { ...propsMemo, - createdAtStr: utils.getDateTimeString(propsMemo.displayTs), + createdAtStr: utils.getDateTimeString(propsMemo.createdTs), }; const createdDays = Math.ceil((Date.now() - utils.getTimeStampByDate(user.createdTs)) / 1000 / 3600 / 24); diff --git a/web/src/helpers/consts.ts b/web/src/helpers/consts.ts index ca77206557a72..c1f103abbe272 100644 --- a/web/src/helpers/consts.ts +++ b/web/src/helpers/consts.ts @@ -13,11 +13,6 @@ export const VISIBILITY_SELECTOR_ITEMS = [ { text: "PUBLIC", value: "PUBLIC" }, ]; -export const MEMO_DISPLAY_TS_OPTION_SELECTOR_ITEMS = [ - { text: "created_ts", value: "created_ts" }, - { text: "updated_ts", value: "updated_ts" }, -]; - // space width for tab action in editor export const TAB_SPACE_WIDTH = 2; diff --git a/web/src/helpers/filter.ts b/web/src/helpers/filter.ts index d3538b9f32041..f41a1eb1a0123 100644 --- a/web/src/helpers/filter.ts +++ b/web/src/helpers/filter.ts @@ -197,9 +197,9 @@ export const checkShouldShowMemo = (memo: Memo, filter: Filter) => { } } else if (type === "DISPLAY_TIME") { if (operator === "BEFORE") { - return memo.displayTs < dayjs(value).valueOf(); + return memo.createdTs < dayjs(value).valueOf(); } else { - return memo.displayTs > dayjs(value).valueOf(); + return memo.createdTs >= dayjs(value).valueOf(); } } else if (type === "VISIBILITY") { let matched = memo.visibility === value; diff --git a/web/src/pages/EmbedMemo.tsx b/web/src/pages/EmbedMemo.tsx index a4f5b50af0ce6..064bb52bfb282 100644 --- a/web/src/pages/EmbedMemo.tsx +++ b/web/src/pages/EmbedMemo.tsx @@ -48,7 +48,7 @@ const EmbedMemo = () => { <main className="w-full max-w-lg mx-auto my-auto shadow px-4 py-4 rounded-lg"> <div className="w-full flex flex-col justify-start items-start"> <div className="w-full mb-2 flex flex-row justify-start items-center text-sm text-gray-400 dark:text-gray-300"> - <span>{dayjs(state.memo.displayTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss")}</span> + <span>{dayjs(state.memo.createdTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss")}</span> <a className="ml-2 hover:underline hover:text-green-600" href={`/u/${state.memo.creator.id}`}> @{state.memo.creator.nickname || state.memo.creator.username} </a> diff --git a/web/src/pages/Explore.tsx b/web/src/pages/Explore.tsx index 6f4089d8052e8..db9c31ba03285 100644 --- a/web/src/pages/Explore.tsx +++ b/web/src/pages/Explore.tsx @@ -76,7 +76,7 @@ const Explore = () => { const sortedMemos = shownMemos .filter((m) => m.rowStatus === "NORMAL") .sort((mi: Memo, mj: Memo) => { - return mj.displayTs - mi.displayTs; + return mj.createdTs - mi.createdTs; }); const handleFetchMoreClick = async () => { @@ -141,7 +141,7 @@ const Explore = () => { <main className="memos-wrapper"> <MemoFilter /> {sortedMemos.map((memo) => { - const createdAtStr = dayjs(memo.displayTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss"); + const createdAtStr = dayjs(memo.createdTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss"); return ( <div className="memo-container" key={memo.id}> <div className="memo-header"> diff --git a/web/src/pages/MemoDetail.tsx b/web/src/pages/MemoDetail.tsx index 5c02fe64a9d01..e50f9b3c42fe4 100644 --- a/web/src/pages/MemoDetail.tsx +++ b/web/src/pages/MemoDetail.tsx @@ -78,7 +78,7 @@ const MemoDetail = () => { <div className="memo-container"> <div className="memo-header"> <div className="status-container"> - <span className="time-text">{dayjs(state.memo.displayTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss")}</span> + <span className="time-text">{dayjs(state.memo.createdTs).locale(i18n.language).format("YYYY/MM/DD HH:mm:ss")}</span> <a className="name-text" href={`/u/${state.memo.creator.id}`}> @{state.memo.creator.nickname || state.memo.creator.username} </a> diff --git a/web/src/store/module/memo.ts b/web/src/store/module/memo.ts index 7bb24abe229ab..c92c0f4562b87 100644 --- a/web/src/store/module/memo.ts +++ b/web/src/store/module/memo.ts @@ -10,7 +10,6 @@ const convertResponseModelMemo = (memo: Memo): Memo => { ...memo, createdTs: memo.createdTs * 1000, updatedTs: memo.updatedTs * 1000, - displayTs: memo.displayTs * 1000, }; }; diff --git a/web/src/store/module/user.ts b/web/src/store/module/user.ts index 58f5a28afdc1e..bfbdf793e6136 100644 --- a/web/src/store/module/user.ts +++ b/web/src/store/module/user.ts @@ -10,7 +10,6 @@ const defaultSetting: Setting = { locale: "en", appearance: getSystemColorScheme(), memoVisibility: "PRIVATE", - memoDisplayTsOption: "created_ts", }; const defaultLocalSetting: LocalSetting = { diff --git a/web/src/types/modules/memo.d.ts b/web/src/types/modules/memo.d.ts index cb2bd11d3f772..4beb267d25a40 100644 --- a/web/src/types/modules/memo.d.ts +++ b/web/src/types/modules/memo.d.ts @@ -13,7 +13,6 @@ interface Memo { content: string; visibility: Visibility; pinned: boolean; - displayTs: TimeStamp; creator: User; resourceList: Resource[]; diff --git a/web/src/types/modules/setting.d.ts b/web/src/types/modules/setting.d.ts index b88fe61c91a65..b20b0e285308f 100644 --- a/web/src/types/modules/setting.d.ts +++ b/web/src/types/modules/setting.d.ts @@ -4,7 +4,6 @@ interface Setting { locale: Locale; appearance: Appearance; memoVisibility: Visibility; - memoDisplayTsOption: "created_ts" | "updated_ts"; } interface LocalSetting {
chore
update memo service (#1138) * chore: update memo service * chore: update