Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
8f51791d
Commit
8f51791d
authored
Jul 29, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update user setting definition
parent
3b8bfe72
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
340 additions
and
1422 deletions
+340
-1422
user_service.proto
proto/api/v1/user_service.proto
+7
-71
user_service.pb.go
proto/gen/api/v1/user_service.pb.go
+153
-603
openapi.yaml
proto/gen/openapi.yaml
+5
-111
user_service.go
server/router/api/v1/user_service.go
+36
-67
user.ts
web/src/store/user.ts
+3
-15
user_service.ts
web/src/types/proto/api/v1/user_service.ts
+16
-536
descriptor.ts
web/src/types/proto/google/protobuf/descriptor.ts
+120
-19
No files found.
proto/api/v1/user_service.proto
View file @
8f51791d
...
@@ -403,15 +403,15 @@ message UserSetting {
...
@@ -403,15 +403,15 @@ message UserSetting {
};
};
// The name of the user setting.
// The name of the user setting.
// Format: users/{user}/settings/{setting}
// Format: users/{user}/settings/{setting}, {setting} is the key for the setting.
// For example, "users/123/settings/GENERAL" for general settings.
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
oneof
value
{
oneof
value
{
GeneralSetting
general_setting
=
2
;
GeneralSetting
general_setting
=
2
;
SessionsSetting
sessions_setting
=
3
;
SessionsSetting
sessions_setting
=
3
;
AccessTokensSetting
access_tokens_setting
=
4
;
AccessTokensSetting
access_tokens_setting
=
4
;
ShortcutsSetting
shortcuts_setting
=
5
;
WebhooksSetting
webhooks_setting
=
5
;
WebhooksSetting
webhooks_setting
=
6
;
}
}
// Enumeration of user setting keys.
// Enumeration of user setting keys.
...
@@ -423,10 +423,8 @@ message UserSetting {
...
@@ -423,10 +423,8 @@ message UserSetting {
SESSIONS
=
2
;
SESSIONS
=
2
;
// ACCESS_TOKENS is the key for access tokens.
// ACCESS_TOKENS is the key for access tokens.
ACCESS_TOKENS
=
3
;
ACCESS_TOKENS
=
3
;
// SHORTCUTS is the key for user shortcuts.
SHORTCUTS
=
4
;
// WEBHOOKS is the key for user webhooks.
// WEBHOOKS is the key for user webhooks.
WEBHOOKS
=
5
;
WEBHOOKS
=
4
;
}
}
// General user settings configuration.
// General user settings configuration.
...
@@ -446,81 +444,19 @@ message UserSetting {
...
@@ -446,81 +444,19 @@ message UserSetting {
// User authentication sessions configuration.
// User authentication sessions configuration.
message
SessionsSetting
{
message
SessionsSetting
{
// List of active user sessions.
// List of active user sessions.
repeated
Session
sessions
=
1
;
repeated
UserSession
sessions
=
1
;
// User session information.
message
Session
{
// Unique session identifier.
string
session_id
=
1
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Timestamp when the session was created.
google.protobuf.Timestamp
create_time
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Timestamp when the session was last accessed.
// Used for sliding expiration calculation (last_accessed_time + 2 weeks).
google.protobuf.Timestamp
last_accessed_time
=
3
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Client information associated with this session.
ClientInfo
client_info
=
4
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
}
// Client information for a session.
message
ClientInfo
{
// User agent string of the client.
string
user_agent
=
1
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// IP address of the client.
string
ip_address
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Optional. Device type (e.g., "mobile", "desktop", "tablet").
string
device_type
=
3
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Optional. Operating system (e.g., "iOS 17.0", "Windows 11").
string
os
=
4
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Optional. Browser name and version (e.g., "Chrome 119.0").
string
browser
=
5
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
}
}
}
// User access tokens configuration.
// User access tokens configuration.
message
AccessTokensSetting
{
message
AccessTokensSetting
{
// List of user access tokens.
// List of user access tokens.
repeated
AccessToken
access_tokens
=
1
;
repeated
UserAccessToken
access_tokens
=
1
;
// User access token information.
message
AccessToken
{
// The access token is a JWT token.
// Including expiration time, issuer, etc.
string
access_token
=
1
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// A description for the access token.
string
description
=
2
[(
google.api.field_behavior
)
=
OPTIONAL
];
}
}
// User shortcuts configuration.
message
ShortcutsSetting
{
// List of user shortcuts.
repeated
Shortcut
shortcuts
=
1
;
// User shortcut definition.
message
Shortcut
{
// Unique identifier for the shortcut.
string
id
=
1
[(
google.api.field_behavior
)
=
REQUIRED
];
// Display title for the shortcut.
string
title
=
2
[(
google.api.field_behavior
)
=
REQUIRED
];
// Filter expression for the shortcut.
string
filter
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
}
}
}
// User webhooks configuration.
// User webhooks configuration.
message
WebhooksSetting
{
message
WebhooksSetting
{
// List of user webhooks.
// List of user webhooks.
repeated
Webhook
webhooks
=
1
;
repeated
UserWebhook
webhooks
=
1
;
// User webhook definition.
message
Webhook
{
// Unique identifier for the webhook.
string
id
=
1
[(
google.api.field_behavior
)
=
REQUIRED
];
// Descriptive title for the webhook.
string
title
=
2
[(
google.api.field_behavior
)
=
REQUIRED
];
// The webhook URL endpoint.
string
url
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
}
}
}
}
}
...
...
proto/gen/api/v1/user_service.pb.go
View file @
8f51791d
...
@@ -94,10 +94,8 @@ const (
...
@@ -94,10 +94,8 @@ const (
UserSetting_SESSIONS
UserSetting_Key
=
2
UserSetting_SESSIONS
UserSetting_Key
=
2
// ACCESS_TOKENS is the key for access tokens.
// ACCESS_TOKENS is the key for access tokens.
UserSetting_ACCESS_TOKENS
UserSetting_Key
=
3
UserSetting_ACCESS_TOKENS
UserSetting_Key
=
3
// SHORTCUTS is the key for user shortcuts.
UserSetting_SHORTCUTS
UserSetting_Key
=
4
// WEBHOOKS is the key for user webhooks.
// WEBHOOKS is the key for user webhooks.
UserSetting_WEBHOOKS
UserSetting_Key
=
5
UserSetting_WEBHOOKS
UserSetting_Key
=
4
)
)
// Enum value maps for UserSetting_Key.
// Enum value maps for UserSetting_Key.
...
@@ -107,16 +105,14 @@ var (
...
@@ -107,16 +105,14 @@ var (
1
:
"GENERAL"
,
1
:
"GENERAL"
,
2
:
"SESSIONS"
,
2
:
"SESSIONS"
,
3
:
"ACCESS_TOKENS"
,
3
:
"ACCESS_TOKENS"
,
4
:
"SHORTCUTS"
,
4
:
"WEBHOOKS"
,
5
:
"WEBHOOKS"
,
}
}
UserSetting_Key_value
=
map
[
string
]
int32
{
UserSetting_Key_value
=
map
[
string
]
int32
{
"KEY_UNSPECIFIED"
:
0
,
"KEY_UNSPECIFIED"
:
0
,
"GENERAL"
:
1
,
"GENERAL"
:
1
,
"SESSIONS"
:
2
,
"SESSIONS"
:
2
,
"ACCESS_TOKENS"
:
3
,
"ACCESS_TOKENS"
:
3
,
"SHORTCUTS"
:
4
,
"WEBHOOKS"
:
4
,
"WEBHOOKS"
:
5
,
}
}
)
)
...
@@ -1080,14 +1076,14 @@ func (x *ListAllUserStatsResponse) GetStats() []*UserStats {
...
@@ -1080,14 +1076,14 @@ func (x *ListAllUserStatsResponse) GetStats() []*UserStats {
type
UserSetting
struct
{
type
UserSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The name of the user setting.
// The name of the user setting.
// Format: users/{user}/settings/{setting}
// Format: users/{user}/settings/{setting}, {setting} is the key for the setting.
// For example, "users/123/settings/GENERAL" for general settings.
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Types that are valid to be assigned to Value:
// Types that are valid to be assigned to Value:
//
//
// *UserSetting_GeneralSetting_
// *UserSetting_GeneralSetting_
// *UserSetting_SessionsSetting_
// *UserSetting_SessionsSetting_
// *UserSetting_AccessTokensSetting_
// *UserSetting_AccessTokensSetting_
// *UserSetting_ShortcutsSetting_
// *UserSetting_WebhooksSetting_
// *UserSetting_WebhooksSetting_
Value
isUserSetting_Value
`protobuf_oneof:"value"`
Value
isUserSetting_Value
`protobuf_oneof:"value"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
...
@@ -1165,15 +1161,6 @@ func (x *UserSetting) GetAccessTokensSetting() *UserSetting_AccessTokensSetting
...
@@ -1165,15 +1161,6 @@ func (x *UserSetting) GetAccessTokensSetting() *UserSetting_AccessTokensSetting
return
nil
return
nil
}
}
func
(
x
*
UserSetting
)
GetShortcutsSetting
()
*
UserSetting_ShortcutsSetting
{
if
x
!=
nil
{
if
x
,
ok
:=
x
.
Value
.
(
*
UserSetting_ShortcutsSetting_
);
ok
{
return
x
.
ShortcutsSetting
}
}
return
nil
}
func
(
x
*
UserSetting
)
GetWebhooksSetting
()
*
UserSetting_WebhooksSetting
{
func
(
x
*
UserSetting
)
GetWebhooksSetting
()
*
UserSetting_WebhooksSetting
{
if
x
!=
nil
{
if
x
!=
nil
{
if
x
,
ok
:=
x
.
Value
.
(
*
UserSetting_WebhooksSetting_
);
ok
{
if
x
,
ok
:=
x
.
Value
.
(
*
UserSetting_WebhooksSetting_
);
ok
{
...
@@ -1199,12 +1186,8 @@ type UserSetting_AccessTokensSetting_ struct {
...
@@ -1199,12 +1186,8 @@ type UserSetting_AccessTokensSetting_ struct {
AccessTokensSetting
*
UserSetting_AccessTokensSetting
`protobuf:"bytes,4,opt,name=access_tokens_setting,json=accessTokensSetting,proto3,oneof"`
AccessTokensSetting
*
UserSetting_AccessTokensSetting
`protobuf:"bytes,4,opt,name=access_tokens_setting,json=accessTokensSetting,proto3,oneof"`
}
}
type
UserSetting_ShortcutsSetting_
struct
{
ShortcutsSetting
*
UserSetting_ShortcutsSetting
`protobuf:"bytes,5,opt,name=shortcuts_setting,json=shortcutsSetting,proto3,oneof"`
}
type
UserSetting_WebhooksSetting_
struct
{
type
UserSetting_WebhooksSetting_
struct
{
WebhooksSetting
*
UserSetting_WebhooksSetting
`protobuf:"bytes,
6
,opt,name=webhooks_setting,json=webhooksSetting,proto3,oneof"`
WebhooksSetting
*
UserSetting_WebhooksSetting
`protobuf:"bytes,
5
,opt,name=webhooks_setting,json=webhooksSetting,proto3,oneof"`
}
}
func
(
*
UserSetting_GeneralSetting_
)
isUserSetting_Value
()
{}
func
(
*
UserSetting_GeneralSetting_
)
isUserSetting_Value
()
{}
...
@@ -1213,8 +1196,6 @@ func (*UserSetting_SessionsSetting_) isUserSetting_Value() {}
...
@@ -1213,8 +1196,6 @@ func (*UserSetting_SessionsSetting_) isUserSetting_Value() {}
func
(
*
UserSetting_AccessTokensSetting_
)
isUserSetting_Value
()
{}
func
(
*
UserSetting_AccessTokensSetting_
)
isUserSetting_Value
()
{}
func
(
*
UserSetting_ShortcutsSetting_
)
isUserSetting_Value
()
{}
func
(
*
UserSetting_WebhooksSetting_
)
isUserSetting_Value
()
{}
func
(
*
UserSetting_WebhooksSetting_
)
isUserSetting_Value
()
{}
type
GetUserSettingRequest
struct
{
type
GetUserSettingRequest
struct
{
...
@@ -2468,7 +2449,7 @@ func (x *UserSetting_GeneralSetting) GetTheme() string {
...
@@ -2468,7 +2449,7 @@ func (x *UserSetting_GeneralSetting) GetTheme() string {
type
UserSetting_SessionsSetting
struct
{
type
UserSetting_SessionsSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// List of active user sessions.
// List of active user sessions.
Sessions
[]
*
UserSe
tting_SessionsSetting_Se
ssion
`protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
Sessions
[]
*
UserSession
`protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -2503,7 +2484,7 @@ func (*UserSetting_SessionsSetting) Descriptor() ([]byte, []int) {
...
@@ -2503,7 +2484,7 @@ func (*UserSetting_SessionsSetting) Descriptor() ([]byte, []int) {
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
1
}
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
1
}
}
}
func
(
x
*
UserSetting_SessionsSetting
)
GetSessions
()
[]
*
UserSe
tting_SessionsSetting_Se
ssion
{
func
(
x
*
UserSetting_SessionsSetting
)
GetSessions
()
[]
*
UserSession
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Sessions
return
x
.
Sessions
}
}
...
@@ -2514,7 +2495,7 @@ func (x *UserSetting_SessionsSetting) GetSessions() []*UserSetting_SessionsSetti
...
@@ -2514,7 +2495,7 @@ func (x *UserSetting_SessionsSetting) GetSessions() []*UserSetting_SessionsSetti
type
UserSetting_AccessTokensSetting
struct
{
type
UserSetting_AccessTokensSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// List of user access tokens.
// List of user access tokens.
AccessTokens
[]
*
User
Setting_AccessTokensSetting_
AccessToken
`protobuf:"bytes,1,rep,name=access_tokens,json=accessTokens,proto3" json:"access_tokens,omitempty"`
AccessTokens
[]
*
UserAccessToken
`protobuf:"bytes,1,rep,name=access_tokens,json=accessTokens,proto3" json:"access_tokens,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -2549,71 +2530,25 @@ func (*UserSetting_AccessTokensSetting) Descriptor() ([]byte, []int) {
...
@@ -2549,71 +2530,25 @@ func (*UserSetting_AccessTokensSetting) Descriptor() ([]byte, []int) {
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
2
}
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
2
}
}
}
func
(
x
*
UserSetting_AccessTokensSetting
)
GetAccessTokens
()
[]
*
User
Setting_AccessTokensSetting_
AccessToken
{
func
(
x
*
UserSetting_AccessTokensSetting
)
GetAccessTokens
()
[]
*
UserAccessToken
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
AccessTokens
return
x
.
AccessTokens
}
}
return
nil
return
nil
}
}
// User shortcuts configuration.
type
UserSetting_ShortcutsSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// List of user shortcuts.
Shortcuts
[]
*
UserSetting_ShortcutsSetting_Shortcut
`protobuf:"bytes,1,rep,name=shortcuts,proto3" json:"shortcuts,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UserSetting_ShortcutsSetting
)
Reset
()
{
*
x
=
UserSetting_ShortcutsSetting
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
39
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UserSetting_ShortcutsSetting
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UserSetting_ShortcutsSetting
)
ProtoMessage
()
{}
func
(
x
*
UserSetting_ShortcutsSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
39
]
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 UserSetting_ShortcutsSetting.ProtoReflect.Descriptor instead.
func
(
*
UserSetting_ShortcutsSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
3
}
}
func
(
x
*
UserSetting_ShortcutsSetting
)
GetShortcuts
()
[]
*
UserSetting_ShortcutsSetting_Shortcut
{
if
x
!=
nil
{
return
x
.
Shortcuts
}
return
nil
}
// User webhooks configuration.
// User webhooks configuration.
type
UserSetting_WebhooksSetting
struct
{
type
UserSetting_WebhooksSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// List of user webhooks.
// List of user webhooks.
Webhooks
[]
*
User
Setting_WebhooksSetting_
Webhook
`protobuf:"bytes,1,rep,name=webhooks,proto3" json:"webhooks,omitempty"`
Webhooks
[]
*
UserWebhook
`protobuf:"bytes,1,rep,name=webhooks,proto3" json:"webhooks,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
func
(
x
*
UserSetting_WebhooksSetting
)
Reset
()
{
func
(
x
*
UserSetting_WebhooksSetting
)
Reset
()
{
*
x
=
UserSetting_WebhooksSetting
{}
*
x
=
UserSetting_WebhooksSetting
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
40
]
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
39
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -2625,7 +2560,7 @@ func (x *UserSetting_WebhooksSetting) String() string {
...
@@ -2625,7 +2560,7 @@ func (x *UserSetting_WebhooksSetting) String() string {
func
(
*
UserSetting_WebhooksSetting
)
ProtoMessage
()
{}
func
(
*
UserSetting_WebhooksSetting
)
ProtoMessage
()
{}
func
(
x
*
UserSetting_WebhooksSetting
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
UserSetting_WebhooksSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
40
]
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
39
]
if
x
!=
nil
{
if
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -2638,356 +2573,16 @@ func (x *UserSetting_WebhooksSetting) ProtoReflect() protoreflect.Message {
...
@@ -2638,356 +2573,16 @@ func (x *UserSetting_WebhooksSetting) ProtoReflect() protoreflect.Message {
// Deprecated: Use UserSetting_WebhooksSetting.ProtoReflect.Descriptor instead.
// Deprecated: Use UserSetting_WebhooksSetting.ProtoReflect.Descriptor instead.
func
(
*
UserSetting_WebhooksSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UserSetting_WebhooksSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
4
}
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
3
}
}
}
func
(
x
*
UserSetting_WebhooksSetting
)
GetWebhooks
()
[]
*
User
Setting_WebhooksSetting_
Webhook
{
func
(
x
*
UserSetting_WebhooksSetting
)
GetWebhooks
()
[]
*
UserWebhook
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Webhooks
return
x
.
Webhooks
}
}
return
nil
return
nil
}
}
// User session information.
type
UserSetting_SessionsSetting_Session
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// Unique session identifier.
SessionId
string
`protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
// Timestamp when the session was created.
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Timestamp when the session was last accessed.
// Used for sliding expiration calculation (last_accessed_time + 2 weeks).
LastAccessedTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,3,opt,name=last_accessed_time,json=lastAccessedTime,proto3" json:"last_accessed_time,omitempty"`
// Client information associated with this session.
ClientInfo
*
UserSetting_SessionsSetting_ClientInfo
`protobuf:"bytes,4,opt,name=client_info,json=clientInfo,proto3" json:"client_info,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UserSetting_SessionsSetting_Session
)
Reset
()
{
*
x
=
UserSetting_SessionsSetting_Session
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
41
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UserSetting_SessionsSetting_Session
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UserSetting_SessionsSetting_Session
)
ProtoMessage
()
{}
func
(
x
*
UserSetting_SessionsSetting_Session
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
41
]
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 UserSetting_SessionsSetting_Session.ProtoReflect.Descriptor instead.
func
(
*
UserSetting_SessionsSetting_Session
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
1
,
0
}
}
func
(
x
*
UserSetting_SessionsSetting_Session
)
GetSessionId
()
string
{
if
x
!=
nil
{
return
x
.
SessionId
}
return
""
}
func
(
x
*
UserSetting_SessionsSetting_Session
)
GetCreateTime
()
*
timestamppb
.
Timestamp
{
if
x
!=
nil
{
return
x
.
CreateTime
}
return
nil
}
func
(
x
*
UserSetting_SessionsSetting_Session
)
GetLastAccessedTime
()
*
timestamppb
.
Timestamp
{
if
x
!=
nil
{
return
x
.
LastAccessedTime
}
return
nil
}
func
(
x
*
UserSetting_SessionsSetting_Session
)
GetClientInfo
()
*
UserSetting_SessionsSetting_ClientInfo
{
if
x
!=
nil
{
return
x
.
ClientInfo
}
return
nil
}
// Client information for a session.
type
UserSetting_SessionsSetting_ClientInfo
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// User agent string of the client.
UserAgent
string
`protobuf:"bytes,1,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
// IP address of the client.
IpAddress
string
`protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
// Optional. Device type (e.g., "mobile", "desktop", "tablet").
DeviceType
string
`protobuf:"bytes,3,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
// Optional. Operating system (e.g., "iOS 17.0", "Windows 11").
Os
string
`protobuf:"bytes,4,opt,name=os,proto3" json:"os,omitempty"`
// Optional. Browser name and version (e.g., "Chrome 119.0").
Browser
string
`protobuf:"bytes,5,opt,name=browser,proto3" json:"browser,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
Reset
()
{
*
x
=
UserSetting_SessionsSetting_ClientInfo
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
42
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UserSetting_SessionsSetting_ClientInfo
)
ProtoMessage
()
{}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
42
]
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 UserSetting_SessionsSetting_ClientInfo.ProtoReflect.Descriptor instead.
func
(
*
UserSetting_SessionsSetting_ClientInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
1
,
1
}
}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
GetUserAgent
()
string
{
if
x
!=
nil
{
return
x
.
UserAgent
}
return
""
}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
GetIpAddress
()
string
{
if
x
!=
nil
{
return
x
.
IpAddress
}
return
""
}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
GetDeviceType
()
string
{
if
x
!=
nil
{
return
x
.
DeviceType
}
return
""
}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
GetOs
()
string
{
if
x
!=
nil
{
return
x
.
Os
}
return
""
}
func
(
x
*
UserSetting_SessionsSetting_ClientInfo
)
GetBrowser
()
string
{
if
x
!=
nil
{
return
x
.
Browser
}
return
""
}
// User access token information.
type
UserSetting_AccessTokensSetting_AccessToken
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The access token is a JWT token.
// Including expiration time, issuer, etc.
AccessToken
string
`protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
// A description for the access token.
Description
string
`protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UserSetting_AccessTokensSetting_AccessToken
)
Reset
()
{
*
x
=
UserSetting_AccessTokensSetting_AccessToken
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
43
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UserSetting_AccessTokensSetting_AccessToken
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UserSetting_AccessTokensSetting_AccessToken
)
ProtoMessage
()
{}
func
(
x
*
UserSetting_AccessTokensSetting_AccessToken
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
43
]
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 UserSetting_AccessTokensSetting_AccessToken.ProtoReflect.Descriptor instead.
func
(
*
UserSetting_AccessTokensSetting_AccessToken
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
2
,
0
}
}
func
(
x
*
UserSetting_AccessTokensSetting_AccessToken
)
GetAccessToken
()
string
{
if
x
!=
nil
{
return
x
.
AccessToken
}
return
""
}
func
(
x
*
UserSetting_AccessTokensSetting_AccessToken
)
GetDescription
()
string
{
if
x
!=
nil
{
return
x
.
Description
}
return
""
}
// User shortcut definition.
type
UserSetting_ShortcutsSetting_Shortcut
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// Unique identifier for the shortcut.
Id
string
`protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Display title for the shortcut.
Title
string
`protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
// Filter expression for the shortcut.
Filter
string
`protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UserSetting_ShortcutsSetting_Shortcut
)
Reset
()
{
*
x
=
UserSetting_ShortcutsSetting_Shortcut
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
44
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UserSetting_ShortcutsSetting_Shortcut
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UserSetting_ShortcutsSetting_Shortcut
)
ProtoMessage
()
{}
func
(
x
*
UserSetting_ShortcutsSetting_Shortcut
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
44
]
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 UserSetting_ShortcutsSetting_Shortcut.ProtoReflect.Descriptor instead.
func
(
*
UserSetting_ShortcutsSetting_Shortcut
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
3
,
0
}
}
func
(
x
*
UserSetting_ShortcutsSetting_Shortcut
)
GetId
()
string
{
if
x
!=
nil
{
return
x
.
Id
}
return
""
}
func
(
x
*
UserSetting_ShortcutsSetting_Shortcut
)
GetTitle
()
string
{
if
x
!=
nil
{
return
x
.
Title
}
return
""
}
func
(
x
*
UserSetting_ShortcutsSetting_Shortcut
)
GetFilter
()
string
{
if
x
!=
nil
{
return
x
.
Filter
}
return
""
}
// User webhook definition.
type
UserSetting_WebhooksSetting_Webhook
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// Unique identifier for the webhook.
Id
string
`protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Descriptive title for the webhook.
Title
string
`protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
// The webhook URL endpoint.
Url
string
`protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UserSetting_WebhooksSetting_Webhook
)
Reset
()
{
*
x
=
UserSetting_WebhooksSetting_Webhook
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
45
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UserSetting_WebhooksSetting_Webhook
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UserSetting_WebhooksSetting_Webhook
)
ProtoMessage
()
{}
func
(
x
*
UserSetting_WebhooksSetting_Webhook
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
45
]
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 UserSetting_WebhooksSetting_Webhook.ProtoReflect.Descriptor instead.
func
(
*
UserSetting_WebhooksSetting_Webhook
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_user_service_proto_rawDescGZIP
(),
[]
int
{
14
,
4
,
0
}
}
func
(
x
*
UserSetting_WebhooksSetting_Webhook
)
GetId
()
string
{
if
x
!=
nil
{
return
x
.
Id
}
return
""
}
func
(
x
*
UserSetting_WebhooksSetting_Webhook
)
GetTitle
()
string
{
if
x
!=
nil
{
return
x
.
Title
}
return
""
}
func
(
x
*
UserSetting_WebhooksSetting_Webhook
)
GetUrl
()
string
{
if
x
!=
nil
{
return
x
.
Url
}
return
""
}
type
UserSession_ClientInfo
struct
{
type
UserSession_ClientInfo
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// User agent string of the client.
// User agent string of the client.
...
@@ -3006,7 +2601,7 @@ type UserSession_ClientInfo struct {
...
@@ -3006,7 +2601,7 @@ type UserSession_ClientInfo struct {
func
(
x
*
UserSession_ClientInfo
)
Reset
()
{
func
(
x
*
UserSession_ClientInfo
)
Reset
()
{
*
x
=
UserSession_ClientInfo
{}
*
x
=
UserSession_ClientInfo
{}
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
4
6
]
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
4
0
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -3018,7 +2613,7 @@ func (x *UserSession_ClientInfo) String() string {
...
@@ -3018,7 +2613,7 @@ func (x *UserSession_ClientInfo) String() string {
func
(
*
UserSession_ClientInfo
)
ProtoMessage
()
{}
func
(
*
UserSession_ClientInfo
)
ProtoMessage
()
{}
func
(
x
*
UserSession_ClientInfo
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
UserSession_ClientInfo
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
4
6
]
mi
:=
&
file_api_v1_user_service_proto_msgTypes
[
4
0
]
if
x
!=
nil
{
if
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -3165,65 +2760,32 @@ const file_api_v1_user_service_proto_rawDesc = "" +
...
@@ -3165,65 +2760,32 @@ const file_api_v1_user_service_proto_rawDesc = "" +
"
\x11
memos.api.v1/UserR
\x04
name
\"\x19\n
"
+
"
\x11
memos.api.v1/UserR
\x04
name
\"\x19\n
"
+
"
\x17
ListAllUserStatsRequest
\"
I
\n
"
+
"
\x17
ListAllUserStatsRequest
\"
I
\n
"
+
"
\x18
ListAllUserStatsResponse
\x12
-
\n
"
+
"
\x18
ListAllUserStatsResponse
\x12
-
\n
"
+
"
\x05
stats
\x18\x01
\x03
(
\v
2
\x17
.memos.api.v1.UserStatsR
\x05
stats
\"\xd
1\x0f
\n
"
+
"
\x05
stats
\x18\x01
\x03
(
\v
2
\x17
.memos.api.v1.UserStatsR
\x05
stats
\"\xd
9\a
\n
"
+
"
\v
UserSetting
\x12\x17\n
"
+
"
\v
UserSetting
\x12\x17\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
S
\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
S
\n
"
+
"
\x0f
general_setting
\x18\x02
\x01
(
\v
2(.memos.api.v1.UserSetting.GeneralSettingH
\x00
R
\x0e
generalSetting
\x12
V
\n
"
+
"
\x0f
general_setting
\x18\x02
\x01
(
\v
2(.memos.api.v1.UserSetting.GeneralSettingH
\x00
R
\x0e
generalSetting
\x12
V
\n
"
+
"
\x10
sessions_setting
\x18\x03
\x01
(
\v
2).memos.api.v1.UserSetting.SessionsSettingH
\x00
R
\x0f
sessionsSetting
\x12
c
\n
"
+
"
\x10
sessions_setting
\x18\x03
\x01
(
\v
2).memos.api.v1.UserSetting.SessionsSettingH
\x00
R
\x0f
sessionsSetting
\x12
c
\n
"
+
"
\x15
access_tokens_setting
\x18\x04
\x01
(
\v
2-.memos.api.v1.UserSetting.AccessTokensSettingH
\x00
R
\x13
accessTokensSetting
\x12
Y
\n
"
+
"
\x15
access_tokens_setting
\x18\x04
\x01
(
\v
2-.memos.api.v1.UserSetting.AccessTokensSettingH
\x00
R
\x13
accessTokensSetting
\x12
V
\n
"
+
"
\x11
shortcuts_setting
\x18\x05
\x01
(
\v
2*.memos.api.v1.UserSetting.ShortcutsSettingH
\x00
R
\x10
shortcutsSetting
\x12
V
\n
"
+
"
\x10
webhooks_setting
\x18\x05
\x01
(
\v
2).memos.api.v1.UserSetting.WebhooksSettingH
\x00
R
\x0f
webhooksSetting
\x1a\x9b\x01\n
"
+
"
\x10
webhooks_setting
\x18\x06
\x01
(
\v
2).memos.api.v1.UserSetting.WebhooksSettingH
\x00
R
\x0f
webhooksSetting
\x1a\x9b\x01\n
"
+
"
\x0e
GeneralSetting
\x12\x1b\n
"
+
"
\x0e
GeneralSetting
\x12\x1b\n
"
+
"
\x06
locale
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x06
locale
\x12
#
\n
"
+
"
\x06
locale
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x06
locale
\x12
#
\n
"
+
"
\n
"
+
"
\n
"
+
"appearance
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x01
R
\n
"
+
"appearance
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x01
R
\n
"
+
"appearance
\x12
,
\n
"
+
"appearance
\x12
,
\n
"
+
"
\x0f
memo_visibility
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x0e
memoVisibility
\x12\x19\n
"
+
"
\x0f
memo_visibility
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x0e
memoVisibility
\x12\x19\n
"
+
"
\x05
theme
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x05
theme
\x1a\xae\x04\n
"
+
"
\x05
theme
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x05
theme
\x1a
H
\n
"
+
"
\x0f
SessionsSetting
\x12
M
\n
"
+
"
\x0f
SessionsSetting
\x12
5
\n
"
+
"
\b
sessions
\x18\x01
\x03
(
\v
21.memos.api.v1.UserSetting.SessionsSetting.SessionR
\b
sessions
\x1a\x9a\x02\n
"
+
"
\b
sessions
\x18\x01
\x03
(
\v
2
\x19
.memos.api.v1.UserSessionR
\b
sessions
\x1a
Y
\n
"
+
"
\a
Session
\x12\"\n
"
+
"
\x13
AccessTokensSetting
\x12
B
\n
"
+
"
\n
"
+
"
\r
access_tokens
\x18\x01
\x03
(
\v
2
\x1d
.memos.api.v1.UserAccessTokenR
\f
accessTokens
\x1a
H
\n
"
+
"session_id
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\x03
R
\t
sessionId
\x12
@
\n
"
+
"
\x0f
WebhooksSetting
\x12
5
\n
"
+
"
\v
create_time
\x18\x02
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"
\b
webhooks
\x18\x01
\x03
(
\v
2
\x19
.memos.api.v1.UserWebhookR
\b
webhooks
\"
V
\n
"
+
"createTime
\x12
M
\n
"
+
"
\x12
last_accessed_time
\x18\x03
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\x10
lastAccessedTime
\x12
Z
\n
"
+
"
\v
client_info
\x18\x04
\x01
(
\v
24.memos.api.v1.UserSetting.SessionsSetting.ClientInfoB
\x03\xe0
A
\x03
R
\n
"
+
"clientInfo
\x1a\xae\x01\n
"
+
"
\n
"
+
"ClientInfo
\x12\"\n
"
+
"
\n
"
+
"user_agent
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\x03
R
\t
userAgent
\x12\"\n
"
+
"
\n
"
+
"ip_address
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x03
R
\t
ipAddress
\x12
$
\n
"
+
"
\v
device_type
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x03
R
\n
"
+
"deviceType
\x12\x13\n
"
+
"
\x02
os
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x03
R
\x02
os
\x12\x1d\n
"
+
"
\a
browser
\x18\x05
\x01
(
\t
B
\x03\xe0
A
\x03
R
\a
browser
\x1a\xd3\x01\n
"
+
"
\x13
AccessTokensSetting
\x12
^
\n
"
+
"
\r
access_tokens
\x18\x01
\x03
(
\v
29.memos.api.v1.UserSetting.AccessTokensSetting.AccessTokenR
\f
accessTokens
\x1a\\\n
"
+
"
\v
AccessToken
\x12
&
\n
"
+
"
\f
access_token
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\x03
R
\v
accessToken
\x12
%
\n
"
+
"
\v
description
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x01
R
\v
description
\x1a\xbe\x01\n
"
+
"
\x10
ShortcutsSetting
\x12
Q
\n
"
+
"
\t
shortcuts
\x18\x01
\x03
(
\v
23.memos.api.v1.UserSetting.ShortcutsSetting.ShortcutR
\t
shortcuts
\x1a
W
\n
"
+
"
\b
Shortcut
\x12\x13\n
"
+
"
\x02
id
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x02
id
\x12\x19\n
"
+
"
\x05
title
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x05
title
\x12\x1b\n
"
+
"
\x06
filter
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x06
filter
\x1a\xb2\x01\n
"
+
"
\x0f
WebhooksSetting
\x12
M
\n
"
+
"
\b
webhooks
\x18\x01
\x03
(
\v
21.memos.api.v1.UserSetting.WebhooksSetting.WebhookR
\b
webhooks
\x1a
P
\n
"
+
"
\a
Webhook
\x12\x13\n
"
+
"
\x02
id
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x02
id
\x12\x19\n
"
+
"
\x05
title
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x05
title
\x12\x15\n
"
+
"
\x03
url
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x03
url
\"
e
\n
"
+
"
\x03
Key
\x12\x13\n
"
+
"
\x03
Key
\x12\x13\n
"
+
"
\x0f
KEY_UNSPECIFIED
\x10\x00\x12\v\n
"
+
"
\x0f
KEY_UNSPECIFIED
\x10\x00\x12\v\n
"
+
"
\a
GENERAL
\x10\x01\x12\f\n
"
+
"
\a
GENERAL
\x10\x01\x12\f\n
"
+
"
\b
SESSIONS
\x10\x02\x12\x11\n
"
+
"
\b
SESSIONS
\x10\x02\x12\x11\n
"
+
"
\r
ACCESS_TOKENS
\x10\x03\x12\r\n
"
+
"
\r
ACCESS_TOKENS
\x10\x03\x12\f\n
"
+
"
\t
SHORTCUTS
\x10\x04\x12\f\n
"
+
"
\b
WEBHOOKS
\x10\x04
:Y
\xea
AV
\n
"
+
"
\b
WEBHOOKS
\x10\x05
:Y
\xea
AV
\n
"
+
"
\x18
memos.api.v1/UserSetting
\x12\x1f
users/{user}/settings/{setting}*
\f
userSettings2
\v
userSettingB
\a\n
"
+
"
\x18
memos.api.v1/UserSetting
\x12\x1f
users/{user}/settings/{setting}*
\f
userSettings2
\v
userSettingB
\a\n
"
+
"
\x05
value
\"
M
\n
"
+
"
\x05
value
\"
M
\n
"
+
"
\x15
GetUserSettingRequest
\x12
4
\n
"
+
"
\x15
GetUserSettingRequest
\x12
4
\n
"
+
...
@@ -3359,154 +2921,143 @@ func file_api_v1_user_service_proto_rawDescGZIP() []byte {
...
@@ -3359,154 +2921,143 @@ func file_api_v1_user_service_proto_rawDescGZIP() []byte {
}
}
var
file_api_v1_user_service_proto_enumTypes
=
make
([]
protoimpl
.
EnumInfo
,
2
)
var
file_api_v1_user_service_proto_enumTypes
=
make
([]
protoimpl
.
EnumInfo
,
2
)
var
file_api_v1_user_service_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
4
7
)
var
file_api_v1_user_service_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
4
1
)
var
file_api_v1_user_service_proto_goTypes
=
[]
any
{
var
file_api_v1_user_service_proto_goTypes
=
[]
any
{
(
User_Role
)(
0
),
// 0: memos.api.v1.User.Role
(
User_Role
)(
0
),
// 0: memos.api.v1.User.Role
(
UserSetting_Key
)(
0
),
// 1: memos.api.v1.UserSetting.Key
(
UserSetting_Key
)(
0
),
// 1: memos.api.v1.UserSetting.Key
(
*
User
)(
nil
),
// 2: memos.api.v1.User
(
*
User
)(
nil
),
// 2: memos.api.v1.User
(
*
ListUsersRequest
)(
nil
),
// 3: memos.api.v1.ListUsersRequest
(
*
ListUsersRequest
)(
nil
),
// 3: memos.api.v1.ListUsersRequest
(
*
ListUsersResponse
)(
nil
),
// 4: memos.api.v1.ListUsersResponse
(
*
ListUsersResponse
)(
nil
),
// 4: memos.api.v1.ListUsersResponse
(
*
GetUserRequest
)(
nil
),
// 5: memos.api.v1.GetUserRequest
(
*
GetUserRequest
)(
nil
),
// 5: memos.api.v1.GetUserRequest
(
*
CreateUserRequest
)(
nil
),
// 6: memos.api.v1.CreateUserRequest
(
*
CreateUserRequest
)(
nil
),
// 6: memos.api.v1.CreateUserRequest
(
*
UpdateUserRequest
)(
nil
),
// 7: memos.api.v1.UpdateUserRequest
(
*
UpdateUserRequest
)(
nil
),
// 7: memos.api.v1.UpdateUserRequest
(
*
DeleteUserRequest
)(
nil
),
// 8: memos.api.v1.DeleteUserRequest
(
*
DeleteUserRequest
)(
nil
),
// 8: memos.api.v1.DeleteUserRequest
(
*
SearchUsersRequest
)(
nil
),
// 9: memos.api.v1.SearchUsersRequest
(
*
SearchUsersRequest
)(
nil
),
// 9: memos.api.v1.SearchUsersRequest
(
*
SearchUsersResponse
)(
nil
),
// 10: memos.api.v1.SearchUsersResponse
(
*
SearchUsersResponse
)(
nil
),
// 10: memos.api.v1.SearchUsersResponse
(
*
GetUserAvatarRequest
)(
nil
),
// 11: memos.api.v1.GetUserAvatarRequest
(
*
GetUserAvatarRequest
)(
nil
),
// 11: memos.api.v1.GetUserAvatarRequest
(
*
UserStats
)(
nil
),
// 12: memos.api.v1.UserStats
(
*
UserStats
)(
nil
),
// 12: memos.api.v1.UserStats
(
*
GetUserStatsRequest
)(
nil
),
// 13: memos.api.v1.GetUserStatsRequest
(
*
GetUserStatsRequest
)(
nil
),
// 13: memos.api.v1.GetUserStatsRequest
(
*
ListAllUserStatsRequest
)(
nil
),
// 14: memos.api.v1.ListAllUserStatsRequest
(
*
ListAllUserStatsRequest
)(
nil
),
// 14: memos.api.v1.ListAllUserStatsRequest
(
*
ListAllUserStatsResponse
)(
nil
),
// 15: memos.api.v1.ListAllUserStatsResponse
(
*
ListAllUserStatsResponse
)(
nil
),
// 15: memos.api.v1.ListAllUserStatsResponse
(
*
UserSetting
)(
nil
),
// 16: memos.api.v1.UserSetting
(
*
UserSetting
)(
nil
),
// 16: memos.api.v1.UserSetting
(
*
GetUserSettingRequest
)(
nil
),
// 17: memos.api.v1.GetUserSettingRequest
(
*
GetUserSettingRequest
)(
nil
),
// 17: memos.api.v1.GetUserSettingRequest
(
*
UpdateUserSettingRequest
)(
nil
),
// 18: memos.api.v1.UpdateUserSettingRequest
(
*
UpdateUserSettingRequest
)(
nil
),
// 18: memos.api.v1.UpdateUserSettingRequest
(
*
ListUserSettingsRequest
)(
nil
),
// 19: memos.api.v1.ListUserSettingsRequest
(
*
ListUserSettingsRequest
)(
nil
),
// 19: memos.api.v1.ListUserSettingsRequest
(
*
ListUserSettingsResponse
)(
nil
),
// 20: memos.api.v1.ListUserSettingsResponse
(
*
ListUserSettingsResponse
)(
nil
),
// 20: memos.api.v1.ListUserSettingsResponse
(
*
UserAccessToken
)(
nil
),
// 21: memos.api.v1.UserAccessToken
(
*
UserAccessToken
)(
nil
),
// 21: memos.api.v1.UserAccessToken
(
*
ListUserAccessTokensRequest
)(
nil
),
// 22: memos.api.v1.ListUserAccessTokensRequest
(
*
ListUserAccessTokensRequest
)(
nil
),
// 22: memos.api.v1.ListUserAccessTokensRequest
(
*
ListUserAccessTokensResponse
)(
nil
),
// 23: memos.api.v1.ListUserAccessTokensResponse
(
*
ListUserAccessTokensResponse
)(
nil
),
// 23: memos.api.v1.ListUserAccessTokensResponse
(
*
CreateUserAccessTokenRequest
)(
nil
),
// 24: memos.api.v1.CreateUserAccessTokenRequest
(
*
CreateUserAccessTokenRequest
)(
nil
),
// 24: memos.api.v1.CreateUserAccessTokenRequest
(
*
DeleteUserAccessTokenRequest
)(
nil
),
// 25: memos.api.v1.DeleteUserAccessTokenRequest
(
*
DeleteUserAccessTokenRequest
)(
nil
),
// 25: memos.api.v1.DeleteUserAccessTokenRequest
(
*
UserSession
)(
nil
),
// 26: memos.api.v1.UserSession
(
*
UserSession
)(
nil
),
// 26: memos.api.v1.UserSession
(
*
ListUserSessionsRequest
)(
nil
),
// 27: memos.api.v1.ListUserSessionsRequest
(
*
ListUserSessionsRequest
)(
nil
),
// 27: memos.api.v1.ListUserSessionsRequest
(
*
ListUserSessionsResponse
)(
nil
),
// 28: memos.api.v1.ListUserSessionsResponse
(
*
ListUserSessionsResponse
)(
nil
),
// 28: memos.api.v1.ListUserSessionsResponse
(
*
RevokeUserSessionRequest
)(
nil
),
// 29: memos.api.v1.RevokeUserSessionRequest
(
*
RevokeUserSessionRequest
)(
nil
),
// 29: memos.api.v1.RevokeUserSessionRequest
(
*
UserWebhook
)(
nil
),
// 30: memos.api.v1.UserWebhook
(
*
UserWebhook
)(
nil
),
// 30: memos.api.v1.UserWebhook
(
*
ListUserWebhooksRequest
)(
nil
),
// 31: memos.api.v1.ListUserWebhooksRequest
(
*
ListUserWebhooksRequest
)(
nil
),
// 31: memos.api.v1.ListUserWebhooksRequest
(
*
ListUserWebhooksResponse
)(
nil
),
// 32: memos.api.v1.ListUserWebhooksResponse
(
*
ListUserWebhooksResponse
)(
nil
),
// 32: memos.api.v1.ListUserWebhooksResponse
(
*
CreateUserWebhookRequest
)(
nil
),
// 33: memos.api.v1.CreateUserWebhookRequest
(
*
CreateUserWebhookRequest
)(
nil
),
// 33: memos.api.v1.CreateUserWebhookRequest
(
*
UpdateUserWebhookRequest
)(
nil
),
// 34: memos.api.v1.UpdateUserWebhookRequest
(
*
UpdateUserWebhookRequest
)(
nil
),
// 34: memos.api.v1.UpdateUserWebhookRequest
(
*
DeleteUserWebhookRequest
)(
nil
),
// 35: memos.api.v1.DeleteUserWebhookRequest
(
*
DeleteUserWebhookRequest
)(
nil
),
// 35: memos.api.v1.DeleteUserWebhookRequest
nil
,
// 36: memos.api.v1.UserStats.TagCountEntry
nil
,
// 36: memos.api.v1.UserStats.TagCountEntry
(
*
UserStats_MemoTypeStats
)(
nil
),
// 37: memos.api.v1.UserStats.MemoTypeStats
(
*
UserStats_MemoTypeStats
)(
nil
),
// 37: memos.api.v1.UserStats.MemoTypeStats
(
*
UserSetting_GeneralSetting
)(
nil
),
// 38: memos.api.v1.UserSetting.GeneralSetting
(
*
UserSetting_GeneralSetting
)(
nil
),
// 38: memos.api.v1.UserSetting.GeneralSetting
(
*
UserSetting_SessionsSetting
)(
nil
),
// 39: memos.api.v1.UserSetting.SessionsSetting
(
*
UserSetting_SessionsSetting
)(
nil
),
// 39: memos.api.v1.UserSetting.SessionsSetting
(
*
UserSetting_AccessTokensSetting
)(
nil
),
// 40: memos.api.v1.UserSetting.AccessTokensSetting
(
*
UserSetting_AccessTokensSetting
)(
nil
),
// 40: memos.api.v1.UserSetting.AccessTokensSetting
(
*
UserSetting_ShortcutsSetting
)(
nil
),
// 41: memos.api.v1.UserSetting.ShortcutsSetting
(
*
UserSetting_WebhooksSetting
)(
nil
),
// 41: memos.api.v1.UserSetting.WebhooksSetting
(
*
UserSetting_WebhooksSetting
)(
nil
),
// 42: memos.api.v1.UserSetting.WebhooksSetting
(
*
UserSession_ClientInfo
)(
nil
),
// 42: memos.api.v1.UserSession.ClientInfo
(
*
UserSetting_SessionsSetting_Session
)(
nil
),
// 43: memos.api.v1.UserSetting.SessionsSetting.Session
(
State
)(
0
),
// 43: memos.api.v1.State
(
*
UserSetting_SessionsSetting_ClientInfo
)(
nil
),
// 44: memos.api.v1.UserSetting.SessionsSetting.ClientInfo
(
*
timestamppb
.
Timestamp
)(
nil
),
// 44: google.protobuf.Timestamp
(
*
UserSetting_AccessTokensSetting_AccessToken
)(
nil
),
// 45: memos.api.v1.UserSetting.AccessTokensSetting.AccessToken
(
*
fieldmaskpb
.
FieldMask
)(
nil
),
// 45: google.protobuf.FieldMask
(
*
UserSetting_ShortcutsSetting_Shortcut
)(
nil
),
// 46: memos.api.v1.UserSetting.ShortcutsSetting.Shortcut
(
*
emptypb
.
Empty
)(
nil
),
// 46: google.protobuf.Empty
(
*
UserSetting_WebhooksSetting_Webhook
)(
nil
),
// 47: memos.api.v1.UserSetting.WebhooksSetting.Webhook
(
*
httpbody
.
HttpBody
)(
nil
),
// 47: google.api.HttpBody
(
*
UserSession_ClientInfo
)(
nil
),
// 48: memos.api.v1.UserSession.ClientInfo
(
State
)(
0
),
// 49: memos.api.v1.State
(
*
timestamppb
.
Timestamp
)(
nil
),
// 50: google.protobuf.Timestamp
(
*
fieldmaskpb
.
FieldMask
)(
nil
),
// 51: google.protobuf.FieldMask
(
*
emptypb
.
Empty
)(
nil
),
// 52: google.protobuf.Empty
(
*
httpbody
.
HttpBody
)(
nil
),
// 53: google.api.HttpBody
}
}
var
file_api_v1_user_service_proto_depIdxs
=
[]
int32
{
var
file_api_v1_user_service_proto_depIdxs
=
[]
int32
{
0
,
// 0: memos.api.v1.User.role:type_name -> memos.api.v1.User.Role
0
,
// 0: memos.api.v1.User.role:type_name -> memos.api.v1.User.Role
4
9
,
// 1: memos.api.v1.User.state:type_name -> memos.api.v1.State
4
3
,
// 1: memos.api.v1.User.state:type_name -> memos.api.v1.State
50
,
// 2: memos.api.v1.User.create_time:type_name -> google.protobuf.Timestamp
44
,
// 2: memos.api.v1.User.create_time:type_name -> google.protobuf.Timestamp
50
,
// 3: memos.api.v1.User.update_time:type_name -> google.protobuf.Timestamp
44
,
// 3: memos.api.v1.User.update_time:type_name -> google.protobuf.Timestamp
2
,
// 4: memos.api.v1.ListUsersResponse.users:type_name -> memos.api.v1.User
2
,
// 4: memos.api.v1.ListUsersResponse.users:type_name -> memos.api.v1.User
51
,
// 5: memos.api.v1.GetUserRequest.read_mask:type_name -> google.protobuf.FieldMask
45
,
// 5: memos.api.v1.GetUserRequest.read_mask:type_name -> google.protobuf.FieldMask
2
,
// 6: memos.api.v1.CreateUserRequest.user:type_name -> memos.api.v1.User
2
,
// 6: memos.api.v1.CreateUserRequest.user:type_name -> memos.api.v1.User
2
,
// 7: memos.api.v1.UpdateUserRequest.user:type_name -> memos.api.v1.User
2
,
// 7: memos.api.v1.UpdateUserRequest.user:type_name -> memos.api.v1.User
51
,
// 8: memos.api.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask
45
,
// 8: memos.api.v1.UpdateUserRequest.update_mask:type_name -> google.protobuf.FieldMask
2
,
// 9: memos.api.v1.SearchUsersResponse.users:type_name -> memos.api.v1.User
2
,
// 9: memos.api.v1.SearchUsersResponse.users:type_name -> memos.api.v1.User
50
,
// 10: memos.api.v1.UserStats.memo_display_timestamps:type_name -> google.protobuf.Timestamp
44
,
// 10: memos.api.v1.UserStats.memo_display_timestamps:type_name -> google.protobuf.Timestamp
37
,
// 11: memos.api.v1.UserStats.memo_type_stats:type_name -> memos.api.v1.UserStats.MemoTypeStats
37
,
// 11: memos.api.v1.UserStats.memo_type_stats:type_name -> memos.api.v1.UserStats.MemoTypeStats
36
,
// 12: memos.api.v1.UserStats.tag_count:type_name -> memos.api.v1.UserStats.TagCountEntry
36
,
// 12: memos.api.v1.UserStats.tag_count:type_name -> memos.api.v1.UserStats.TagCountEntry
12
,
// 13: memos.api.v1.ListAllUserStatsResponse.stats:type_name -> memos.api.v1.UserStats
12
,
// 13: memos.api.v1.ListAllUserStatsResponse.stats:type_name -> memos.api.v1.UserStats
38
,
// 14: memos.api.v1.UserSetting.general_setting:type_name -> memos.api.v1.UserSetting.GeneralSetting
38
,
// 14: memos.api.v1.UserSetting.general_setting:type_name -> memos.api.v1.UserSetting.GeneralSetting
39
,
// 15: memos.api.v1.UserSetting.sessions_setting:type_name -> memos.api.v1.UserSetting.SessionsSetting
39
,
// 15: memos.api.v1.UserSetting.sessions_setting:type_name -> memos.api.v1.UserSetting.SessionsSetting
40
,
// 16: memos.api.v1.UserSetting.access_tokens_setting:type_name -> memos.api.v1.UserSetting.AccessTokensSetting
40
,
// 16: memos.api.v1.UserSetting.access_tokens_setting:type_name -> memos.api.v1.UserSetting.AccessTokensSetting
41
,
// 17: memos.api.v1.UserSetting.shortcuts_setting:type_name -> memos.api.v1.UserSetting.ShortcutsSetting
41
,
// 17: memos.api.v1.UserSetting.webhooks_setting:type_name -> memos.api.v1.UserSetting.WebhooksSetting
42
,
// 18: memos.api.v1.UserSetting.webhooks_setting:type_name -> memos.api.v1.UserSetting.WebhooksSetting
16
,
// 18: memos.api.v1.UpdateUserSettingRequest.setting:type_name -> memos.api.v1.UserSetting
16
,
// 19: memos.api.v1.UpdateUserSettingRequest.setting:type_name -> memos.api.v1.UserSetting
45
,
// 19: memos.api.v1.UpdateUserSettingRequest.update_mask:type_name -> google.protobuf.FieldMask
51
,
// 20: memos.api.v1.UpdateUserSettingRequest.update_mask:type_name -> google.protobuf.FieldMask
16
,
// 20: memos.api.v1.ListUserSettingsResponse.settings:type_name -> memos.api.v1.UserSetting
16
,
// 21: memos.api.v1.ListUserSettingsResponse.settings:type_name -> memos.api.v1.UserSetting
44
,
// 21: memos.api.v1.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp
50
,
// 22: memos.api.v1.UserAccessToken.issued_at:type_name -> google.protobuf.Timestamp
44
,
// 22: memos.api.v1.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp
50
,
// 23: memos.api.v1.UserAccessToken.expires_at:type_name -> google.protobuf.Timestamp
21
,
// 23: memos.api.v1.ListUserAccessTokensResponse.access_tokens:type_name -> memos.api.v1.UserAccessToken
21
,
// 24: memos.api.v1.ListUserAccessTokensResponse.access_tokens:type_name -> memos.api.v1.UserAccessToken
21
,
// 24: memos.api.v1.CreateUserAccessTokenRequest.access_token:type_name -> memos.api.v1.UserAccessToken
21
,
// 25: memos.api.v1.CreateUserAccessTokenRequest.access_token:type_name -> memos.api.v1.UserAccessToken
44
,
// 25: memos.api.v1.UserSession.create_time:type_name -> google.protobuf.Timestamp
50
,
// 26: memos.api.v1.UserSession.create_time:type_name -> google.protobuf.Timestamp
44
,
// 26: memos.api.v1.UserSession.last_accessed_time:type_name -> google.protobuf.Timestamp
50
,
// 27: memos.api.v1.UserSession.last_accessed_time:type_name -> google.protobuf.Timestamp
42
,
// 27: memos.api.v1.UserSession.client_info:type_name -> memos.api.v1.UserSession.ClientInfo
48
,
// 28: memos.api.v1.UserSession.client_info:type_name -> memos.api.v1.UserSession.ClientInfo
26
,
// 28: memos.api.v1.ListUserSessionsResponse.sessions:type_name -> memos.api.v1.UserSession
26
,
// 29: memos.api.v1.ListUserSessionsResponse.sessions:type_name -> memos.api.v1.UserSession
44
,
// 29: memos.api.v1.UserWebhook.create_time:type_name -> google.protobuf.Timestamp
50
,
// 30: memos.api.v1.UserWebhook.create_time:type_name -> google.protobuf.Timestamp
44
,
// 30: memos.api.v1.UserWebhook.update_time:type_name -> google.protobuf.Timestamp
50
,
// 31: memos.api.v1.UserWebhook.update_time:type_name -> google.protobuf.Timestamp
30
,
// 31: memos.api.v1.ListUserWebhooksResponse.webhooks:type_name -> memos.api.v1.UserWebhook
30
,
// 32: memos.api.v1.ListUserWebhooksResponse.webhooks:type_name -> memos.api.v1.UserWebhook
30
,
// 32: memos.api.v1.CreateUserWebhookRequest.webhook:type_name -> memos.api.v1.UserWebhook
30
,
// 33: memos.api.v1.CreateUserWebhookRequest.webhook:type_name -> memos.api.v1.UserWebhook
30
,
// 33: memos.api.v1.UpdateUserWebhookRequest.webhook:type_name -> memos.api.v1.UserWebhook
30
,
// 34: memos.api.v1.UpdateUserWebhookRequest.webhook:type_name -> memos.api.v1.UserWebhook
45
,
// 34: memos.api.v1.UpdateUserWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
51
,
// 35: memos.api.v1.UpdateUserWebhookRequest.update_mask:type_name -> google.protobuf.FieldMask
26
,
// 35: memos.api.v1.UserSetting.SessionsSetting.sessions:type_name -> memos.api.v1.UserSession
43
,
// 36: memos.api.v1.UserSetting.SessionsSetting.sessions:type_name -> memos.api.v1.UserSetting.SessionsSetting.Session
21
,
// 36: memos.api.v1.UserSetting.AccessTokensSetting.access_tokens:type_name -> memos.api.v1.UserAccessToken
45
,
// 37: memos.api.v1.UserSetting.AccessTokensSetting.access_tokens:type_name -> memos.api.v1.UserSetting.AccessTokensSetting.AccessToken
30
,
// 37: memos.api.v1.UserSetting.WebhooksSetting.webhooks:type_name -> memos.api.v1.UserWebhook
46
,
// 38: memos.api.v1.UserSetting.ShortcutsSetting.shortcuts:type_name -> memos.api.v1.UserSetting.ShortcutsSetting.Shortcut
3
,
// 38: memos.api.v1.UserService.ListUsers:input_type -> memos.api.v1.ListUsersRequest
47
,
// 39: memos.api.v1.UserSetting.WebhooksSetting.webhooks:type_name -> memos.api.v1.UserSetting.WebhooksSetting.Webhook
5
,
// 39: memos.api.v1.UserService.GetUser:input_type -> memos.api.v1.GetUserRequest
50
,
// 40: memos.api.v1.UserSetting.SessionsSetting.Session.create_time:type_name -> google.protobuf.Timestamp
6
,
// 40: memos.api.v1.UserService.CreateUser:input_type -> memos.api.v1.CreateUserRequest
50
,
// 41: memos.api.v1.UserSetting.SessionsSetting.Session.last_accessed_time:type_name -> google.protobuf.Timestamp
7
,
// 41: memos.api.v1.UserService.UpdateUser:input_type -> memos.api.v1.UpdateUserRequest
44
,
// 42: memos.api.v1.UserSetting.SessionsSetting.Session.client_info:type_name -> memos.api.v1.UserSetting.SessionsSetting.ClientInfo
8
,
// 42: memos.api.v1.UserService.DeleteUser:input_type -> memos.api.v1.DeleteUserRequest
3
,
// 43: memos.api.v1.UserService.ListUsers:input_type -> memos.api.v1.ListUsersRequest
9
,
// 43: memos.api.v1.UserService.SearchUsers:input_type -> memos.api.v1.SearchUsersRequest
5
,
// 44: memos.api.v1.UserService.GetUser:input_type -> memos.api.v1.GetUserRequest
11
,
// 44: memos.api.v1.UserService.GetUserAvatar:input_type -> memos.api.v1.GetUserAvatarRequest
6
,
// 45: memos.api.v1.UserService.CreateUser:input_type -> memos.api.v1.CreateUserRequest
14
,
// 45: memos.api.v1.UserService.ListAllUserStats:input_type -> memos.api.v1.ListAllUserStatsRequest
7
,
// 46: memos.api.v1.UserService.UpdateUser:input_type -> memos.api.v1.UpdateUserRequest
13
,
// 46: memos.api.v1.UserService.GetUserStats:input_type -> memos.api.v1.GetUserStatsRequest
8
,
// 47: memos.api.v1.UserService.DeleteUser:input_type -> memos.api.v1.DeleteUserRequest
17
,
// 47: memos.api.v1.UserService.GetUserSetting:input_type -> memos.api.v1.GetUserSettingRequest
9
,
// 48: memos.api.v1.UserService.SearchUsers:input_type -> memos.api.v1.SearchUsersRequest
18
,
// 48: memos.api.v1.UserService.UpdateUserSetting:input_type -> memos.api.v1.UpdateUserSettingRequest
11
,
// 49: memos.api.v1.UserService.GetUserAvatar:input_type -> memos.api.v1.GetUserAvatarRequest
19
,
// 49: memos.api.v1.UserService.ListUserSettings:input_type -> memos.api.v1.ListUserSettingsRequest
14
,
// 50: memos.api.v1.UserService.ListAllUserStats:input_type -> memos.api.v1.ListAllUserStatsRequest
22
,
// 50: memos.api.v1.UserService.ListUserAccessTokens:input_type -> memos.api.v1.ListUserAccessTokensRequest
13
,
// 51: memos.api.v1.UserService.GetUserStats:input_type -> memos.api.v1.GetUserStatsRequest
24
,
// 51: memos.api.v1.UserService.CreateUserAccessToken:input_type -> memos.api.v1.CreateUserAccessTokenRequest
17
,
// 52: memos.api.v1.UserService.GetUserSetting:input_type -> memos.api.v1.GetUserSettingRequest
25
,
// 52: memos.api.v1.UserService.DeleteUserAccessToken:input_type -> memos.api.v1.DeleteUserAccessTokenRequest
18
,
// 53: memos.api.v1.UserService.UpdateUserSetting:input_type -> memos.api.v1.UpdateUserSettingRequest
27
,
// 53: memos.api.v1.UserService.ListUserSessions:input_type -> memos.api.v1.ListUserSessionsRequest
19
,
// 54: memos.api.v1.UserService.ListUserSettings:input_type -> memos.api.v1.ListUserSettingsRequest
29
,
// 54: memos.api.v1.UserService.RevokeUserSession:input_type -> memos.api.v1.RevokeUserSessionRequest
22
,
// 55: memos.api.v1.UserService.ListUserAccessTokens:input_type -> memos.api.v1.ListUserAccessTokensRequest
31
,
// 55: memos.api.v1.UserService.ListUserWebhooks:input_type -> memos.api.v1.ListUserWebhooksRequest
24
,
// 56: memos.api.v1.UserService.CreateUserAccessToken:input_type -> memos.api.v1.CreateUserAccessTokenRequest
33
,
// 56: memos.api.v1.UserService.CreateUserWebhook:input_type -> memos.api.v1.CreateUserWebhookRequest
25
,
// 57: memos.api.v1.UserService.DeleteUserAccessToken:input_type -> memos.api.v1.DeleteUserAccessTokenRequest
34
,
// 57: memos.api.v1.UserService.UpdateUserWebhook:input_type -> memos.api.v1.UpdateUserWebhookRequest
27
,
// 58: memos.api.v1.UserService.ListUserSessions:input_type -> memos.api.v1.ListUserSessionsRequest
35
,
// 58: memos.api.v1.UserService.DeleteUserWebhook:input_type -> memos.api.v1.DeleteUserWebhookRequest
29
,
// 59: memos.api.v1.UserService.RevokeUserSession:input_type -> memos.api.v1.RevokeUserSessionRequest
4
,
// 59: memos.api.v1.UserService.ListUsers:output_type -> memos.api.v1.ListUsersResponse
31
,
// 60: memos.api.v1.UserService.ListUserWebhooks:input_type -> memos.api.v1.ListUserWebhooksRequest
2
,
// 60: memos.api.v1.UserService.GetUser:output_type -> memos.api.v1.User
33
,
// 61: memos.api.v1.UserService.CreateUserWebhook:input_type -> memos.api.v1.CreateUserWebhookRequest
2
,
// 61: memos.api.v1.UserService.CreateUser:output_type -> memos.api.v1.User
34
,
// 62: memos.api.v1.UserService.UpdateUserWebhook:input_type -> memos.api.v1.UpdateUserWebhookRequest
2
,
// 62: memos.api.v1.UserService.UpdateUser:output_type -> memos.api.v1.User
35
,
// 63: memos.api.v1.UserService.DeleteUserWebhook:input_type -> memos.api.v1.DeleteUserWebhookRequest
46
,
// 63: memos.api.v1.UserService.DeleteUser:output_type -> google.protobuf.Empty
4
,
// 64: memos.api.v1.UserService.ListUsers:output_type -> memos.api.v1.ListUsersResponse
10
,
// 64: memos.api.v1.UserService.SearchUsers:output_type -> memos.api.v1.SearchUsersResponse
2
,
// 65: memos.api.v1.UserService.GetUser:output_type -> memos.api.v1.User
47
,
// 65: memos.api.v1.UserService.GetUserAvatar:output_type -> google.api.HttpBody
2
,
// 66: memos.api.v1.UserService.CreateUser:output_type -> memos.api.v1.User
15
,
// 66: memos.api.v1.UserService.ListAllUserStats:output_type -> memos.api.v1.ListAllUserStatsResponse
2
,
// 67: memos.api.v1.UserService.UpdateUser:output_type -> memos.api.v1.User
12
,
// 67: memos.api.v1.UserService.GetUserStats:output_type -> memos.api.v1.UserStats
52
,
// 68: memos.api.v1.UserService.DeleteUser:output_type -> google.protobuf.Empty
16
,
// 68: memos.api.v1.UserService.GetUserSetting:output_type -> memos.api.v1.UserSetting
10
,
// 69: memos.api.v1.UserService.SearchUsers:output_type -> memos.api.v1.SearchUsersResponse
16
,
// 69: memos.api.v1.UserService.UpdateUserSetting:output_type -> memos.api.v1.UserSetting
53
,
// 70: memos.api.v1.UserService.GetUserAvatar:output_type -> google.api.HttpBody
20
,
// 70: memos.api.v1.UserService.ListUserSettings:output_type -> memos.api.v1.ListUserSettingsResponse
15
,
// 71: memos.api.v1.UserService.ListAllUserStats:output_type -> memos.api.v1.ListAllUserStatsResponse
23
,
// 71: memos.api.v1.UserService.ListUserAccessTokens:output_type -> memos.api.v1.ListUserAccessTokensResponse
12
,
// 72: memos.api.v1.UserService.GetUserStats:output_type -> memos.api.v1.UserStats
21
,
// 72: memos.api.v1.UserService.CreateUserAccessToken:output_type -> memos.api.v1.UserAccessToken
16
,
// 73: memos.api.v1.UserService.GetUserSetting:output_type -> memos.api.v1.UserSetting
46
,
// 73: memos.api.v1.UserService.DeleteUserAccessToken:output_type -> google.protobuf.Empty
16
,
// 74: memos.api.v1.UserService.UpdateUserSetting:output_type -> memos.api.v1.UserSetting
28
,
// 74: memos.api.v1.UserService.ListUserSessions:output_type -> memos.api.v1.ListUserSessionsResponse
20
,
// 75: memos.api.v1.UserService.ListUserSettings:output_type -> memos.api.v1.ListUserSettingsResponse
46
,
// 75: memos.api.v1.UserService.RevokeUserSession:output_type -> google.protobuf.Empty
23
,
// 76: memos.api.v1.UserService.ListUserAccessTokens:output_type -> memos.api.v1.ListUserAccessTokensResponse
32
,
// 76: memos.api.v1.UserService.ListUserWebhooks:output_type -> memos.api.v1.ListUserWebhooksResponse
21
,
// 77: memos.api.v1.UserService.CreateUserAccessToken:output_type -> memos.api.v1.UserAccessToken
30
,
// 77: memos.api.v1.UserService.CreateUserWebhook:output_type -> memos.api.v1.UserWebhook
52
,
// 78: memos.api.v1.UserService.DeleteUserAccessToken:output_type -> google.protobuf.Empty
30
,
// 78: memos.api.v1.UserService.UpdateUserWebhook:output_type -> memos.api.v1.UserWebhook
28
,
// 79: memos.api.v1.UserService.ListUserSessions:output_type -> memos.api.v1.ListUserSessionsResponse
46
,
// 79: memos.api.v1.UserService.DeleteUserWebhook:output_type -> google.protobuf.Empty
52
,
// 80: memos.api.v1.UserService.RevokeUserSession:output_type -> google.protobuf.Empty
59
,
// [59:80] is the sub-list for method output_type
32
,
// 81: memos.api.v1.UserService.ListUserWebhooks:output_type -> memos.api.v1.ListUserWebhooksResponse
38
,
// [38:59] is the sub-list for method input_type
30
,
// 82: memos.api.v1.UserService.CreateUserWebhook:output_type -> memos.api.v1.UserWebhook
38
,
// [38:38] is the sub-list for extension type_name
30
,
// 83: memos.api.v1.UserService.UpdateUserWebhook:output_type -> memos.api.v1.UserWebhook
38
,
// [38:38] is the sub-list for extension extendee
52
,
// 84: memos.api.v1.UserService.DeleteUserWebhook:output_type -> google.protobuf.Empty
0
,
// [0:38] is the sub-list for field type_name
64
,
// [64:85] is the sub-list for method output_type
43
,
// [43:64] is the sub-list for method input_type
43
,
// [43:43] is the sub-list for extension type_name
43
,
// [43:43] is the sub-list for extension extendee
0
,
// [0:43] is the sub-list for field type_name
}
}
func
init
()
{
file_api_v1_user_service_proto_init
()
}
func
init
()
{
file_api_v1_user_service_proto_init
()
}
...
@@ -3519,7 +3070,6 @@ func file_api_v1_user_service_proto_init() {
...
@@ -3519,7 +3070,6 @@ func file_api_v1_user_service_proto_init() {
(
*
UserSetting_GeneralSetting_
)(
nil
),
(
*
UserSetting_GeneralSetting_
)(
nil
),
(
*
UserSetting_SessionsSetting_
)(
nil
),
(
*
UserSetting_SessionsSetting_
)(
nil
),
(
*
UserSetting_AccessTokensSetting_
)(
nil
),
(
*
UserSetting_AccessTokensSetting_
)(
nil
),
(
*
UserSetting_ShortcutsSetting_
)(
nil
),
(
*
UserSetting_WebhooksSetting_
)(
nil
),
(
*
UserSetting_WebhooksSetting_
)(
nil
),
}
}
type
x
struct
{}
type
x
struct
{}
...
@@ -3528,7 +3078,7 @@ func file_api_v1_user_service_proto_init() {
...
@@ -3528,7 +3078,7 @@ func file_api_v1_user_service_proto_init() {
GoPackagePath
:
reflect
.
TypeOf
(
x
{})
.
PkgPath
(),
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
)),
RawDescriptor
:
unsafe
.
Slice
(
unsafe
.
StringData
(
file_api_v1_user_service_proto_rawDesc
),
len
(
file_api_v1_user_service_proto_rawDesc
)),
NumEnums
:
2
,
NumEnums
:
2
,
NumMessages
:
4
7
,
NumMessages
:
4
1
,
NumExtensions
:
0
,
NumExtensions
:
0
,
NumServices
:
1
,
NumServices
:
1
,
},
},
...
...
proto/gen/openapi.yaml
View file @
8f51791d
...
@@ -2256,19 +2256,6 @@ paths:
...
@@ -2256,19 +2256,6 @@ paths:
$ref
:
'
#/components/schemas/Status'
$ref
:
'
#/components/schemas/Status'
components
:
components
:
schemas
:
schemas
:
AccessTokensSetting_AccessToken
:
type
:
object
properties
:
accessToken
:
readOnly
:
true
type
:
string
description
:
|-
The access token is a JWT token.
Including expiration time, issuer, etc.
description
:
type
:
string
description
:
A description for the access token.
description
:
User access token information.
Activity
:
Activity
:
type
:
object
type
:
object
properties
:
properties
:
...
@@ -3344,55 +3331,6 @@ components:
...
@@ -3344,55 +3331,6 @@ components:
type
:
integer
type
:
integer
description
:
The total count of matching users.
description
:
The total count of matching users.
format
:
int32
format
:
int32
SessionsSetting_ClientInfo
:
type
:
object
properties
:
userAgent
:
readOnly
:
true
type
:
string
description
:
User agent string of the client.
ipAddress
:
readOnly
:
true
type
:
string
description
:
IP address of the client.
deviceType
:
readOnly
:
true
type
:
string
description
:
Optional. Device type (e.g., "mobile", "desktop", "tablet").
os
:
readOnly
:
true
type
:
string
description
:
Optional. Operating system (e.g., "iOS 17.0", "Windows 11").
browser
:
readOnly
:
true
type
:
string
description
:
Optional. Browser name and version (e.g., "Chrome 119.0").
description
:
Client information for a session.
SessionsSetting_Session
:
type
:
object
properties
:
sessionId
:
readOnly
:
true
type
:
string
description
:
Unique session identifier.
createTime
:
readOnly
:
true
type
:
string
description
:
Timestamp when the session was created.
format
:
date-time
lastAccessedTime
:
readOnly
:
true
type
:
string
description
:
|-
Timestamp when the session was last accessed.
Used for sliding expiration calculation (last_accessed_time + 2 weeks).
format: date-time
clientInfo
:
readOnly
:
true
allOf
:
-
$ref
:
'
#/components/schemas/SessionsSetting_ClientInfo'
description
:
Client information associated with this session.
description
:
User session information.
SetMemoAttachmentsRequest
:
SetMemoAttachmentsRequest
:
required
:
required
:
-
name
-
name
...
@@ -3441,23 +3379,6 @@ components:
...
@@ -3441,23 +3379,6 @@ components:
filter
:
filter
:
type
:
string
type
:
string
description
:
The filter expression for the shortcut.
description
:
The filter expression for the shortcut.
ShortcutsSetting_Shortcut
:
required
:
-
id
-
title
-
filter
type
:
object
properties
:
id
:
type
:
string
description
:
Unique identifier for the shortcut.
title
:
type
:
string
description
:
Display title for the shortcut.
filter
:
type
:
string
description
:
Filter expression for the shortcut.
description
:
User shortcut definition.
SpoilerNode
:
SpoilerNode
:
type
:
object
type
:
object
properties
:
properties
:
...
@@ -3738,15 +3659,14 @@ components:
...
@@ -3738,15 +3659,14 @@ components:
type
:
string
type
:
string
description
:
|-
description
:
|-
The name of the user setting.
The name of the user setting.
Format: users/{user}/settings/{setting}
Format: users/{user}/settings/{setting}, {setting} is the key for the setting.
For example, "users/123/settings/GENERAL" for general settings.
generalSetting
:
generalSetting
:
$ref
:
'
#/components/schemas/UserSetting_GeneralSetting'
$ref
:
'
#/components/schemas/UserSetting_GeneralSetting'
sessionsSetting
:
sessionsSetting
:
$ref
:
'
#/components/schemas/UserSetting_SessionsSetting'
$ref
:
'
#/components/schemas/UserSetting_SessionsSetting'
accessTokensSetting
:
accessTokensSetting
:
$ref
:
'
#/components/schemas/UserSetting_AccessTokensSetting'
$ref
:
'
#/components/schemas/UserSetting_AccessTokensSetting'
shortcutsSetting
:
$ref
:
'
#/components/schemas/UserSetting_ShortcutsSetting'
webhooksSetting
:
webhooksSetting
:
$ref
:
'
#/components/schemas/UserSetting_WebhooksSetting'
$ref
:
'
#/components/schemas/UserSetting_WebhooksSetting'
description
:
User settings message
description
:
User settings message
...
@@ -3756,7 +3676,7 @@ components:
...
@@ -3756,7 +3676,7 @@ components:
accessTokens
:
accessTokens
:
type
:
array
type
:
array
items
:
items
:
$ref
:
'
#/components/schemas/
AccessTokensSetting_
AccessToken'
$ref
:
'
#/components/schemas/
User
AccessToken'
description
:
List of user access tokens.
description
:
List of user access tokens.
description
:
User access tokens configuration.
description
:
User access tokens configuration.
UserSetting_GeneralSetting
:
UserSetting_GeneralSetting
:
...
@@ -3784,25 +3704,16 @@ components:
...
@@ -3784,25 +3704,16 @@ components:
sessions
:
sessions
:
type
:
array
type
:
array
items
:
items
:
$ref
:
'
#/components/schemas/
SessionsSetting_
Session'
$ref
:
'
#/components/schemas/
User
Session'
description
:
List of active user sessions.
description
:
List of active user sessions.
description
:
User authentication sessions configuration.
description
:
User authentication sessions configuration.
UserSetting_ShortcutsSetting
:
type
:
object
properties
:
shortcuts
:
type
:
array
items
:
$ref
:
'
#/components/schemas/ShortcutsSetting_Shortcut'
description
:
List of user shortcuts.
description
:
User shortcuts configuration.
UserSetting_WebhooksSetting
:
UserSetting_WebhooksSetting
:
type
:
object
type
:
object
properties
:
properties
:
webhooks
:
webhooks
:
type
:
array
type
:
array
items
:
items
:
$ref
:
'
#/components/schemas/
WebhooksSetting_
Webhook'
$ref
:
'
#/components/schemas/
User
Webhook'
description
:
List of user webhooks.
description
:
List of user webhooks.
description
:
User webhooks configuration.
description
:
User webhooks configuration.
UserStats
:
UserStats
:
...
@@ -3880,23 +3791,6 @@ components:
...
@@ -3880,23 +3791,6 @@ components:
description
:
The last update time of the webhook.
description
:
The last update time of the webhook.
format
:
date-time
format
:
date-time
description
:
UserWebhook represents a webhook owned by a user.
description
:
UserWebhook represents a webhook owned by a user.
WebhooksSetting_Webhook
:
required
:
-
id
-
title
-
url
type
:
object
properties
:
id
:
type
:
string
description
:
Unique identifier for the webhook.
title
:
type
:
string
description
:
Descriptive title for the webhook.
url
:
type
:
string
description
:
The webhook URL endpoint.
description
:
User webhook definition.
WorkspaceProfile
:
WorkspaceProfile
:
type
:
object
type
:
object
properties
:
properties
:
...
...
server/router/api/v1/user_service.go
View file @
8f51791d
...
@@ -1067,15 +1067,13 @@ func ExtractUserIDAndSettingKeyFromName(name string) (int32, string, error) {
...
@@ -1067,15 +1067,13 @@ func ExtractUserIDAndSettingKeyFromName(name string) (int32, string, error) {
// convertSettingKeyToStore converts API setting key to store enum.
// convertSettingKeyToStore converts API setting key to store enum.
func
convertSettingKeyToStore
(
key
string
)
(
storepb
.
UserSetting_Key
,
error
)
{
func
convertSettingKeyToStore
(
key
string
)
(
storepb
.
UserSetting_Key
,
error
)
{
switch
key
{
switch
key
{
case
"general"
:
case
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_GENERAL
)]
:
return
storepb
.
UserSetting_GENERAL
,
nil
return
storepb
.
UserSetting_GENERAL
,
nil
case
"sessions"
:
case
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_SESSIONS
)]
:
return
storepb
.
UserSetting_SESSIONS
,
nil
return
storepb
.
UserSetting_SESSIONS
,
nil
case
"access-tokens"
:
case
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_ACCESS_TOKENS
)]
:
return
storepb
.
UserSetting_ACCESS_TOKENS
,
nil
return
storepb
.
UserSetting_ACCESS_TOKENS
,
nil
case
"shortcuts"
:
case
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_WEBHOOKS
)]
:
return
storepb
.
UserSetting_SHORTCUTS
,
nil
case
"webhooks"
:
return
storepb
.
UserSetting_WEBHOOKS
,
nil
return
storepb
.
UserSetting_WEBHOOKS
,
nil
default
:
default
:
return
storepb
.
UserSetting_KEY_UNSPECIFIED
,
errors
.
Errorf
(
"unknown setting key: %s"
,
key
)
return
storepb
.
UserSetting_KEY_UNSPECIFIED
,
errors
.
Errorf
(
"unknown setting key: %s"
,
key
)
...
@@ -1086,15 +1084,15 @@ func convertSettingKeyToStore(key string) (storepb.UserSetting_Key, error) {
...
@@ -1086,15 +1084,15 @@ func convertSettingKeyToStore(key string) (storepb.UserSetting_Key, error) {
func
convertSettingKeyFromStore
(
key
storepb
.
UserSetting_Key
)
string
{
func
convertSettingKeyFromStore
(
key
storepb
.
UserSetting_Key
)
string
{
switch
key
{
switch
key
{
case
storepb
.
UserSetting_GENERAL
:
case
storepb
.
UserSetting_GENERAL
:
return
"general"
return
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_GENERAL
)]
case
storepb
.
UserSetting_SESSIONS
:
case
storepb
.
UserSetting_SESSIONS
:
return
"sessions"
return
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_SESSIONS
)]
case
storepb
.
UserSetting_ACCESS_TOKENS
:
case
storepb
.
UserSetting_ACCESS_TOKENS
:
return
"access-tokens"
return
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_ACCESS_TOKENS
)]
case
storepb
.
UserSetting_SHORTCUTS
:
case
storepb
.
UserSetting_SHORTCUTS
:
return
"
shortcuts"
return
"
SHORTCUTS"
// Not defined in API proto
case
storepb
.
UserSetting_WEBHOOKS
:
case
storepb
.
UserSetting_WEBHOOKS
:
return
"webhooks"
return
v1pb
.
UserSetting_Key_name
[
int32
(
v1pb
.
UserSetting_WEBHOOKS
)]
default
:
default
:
return
"unknown"
return
"unknown"
}
}
...
@@ -1117,25 +1115,19 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
...
@@ -1117,25 +1115,19 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
case
storepb
.
UserSetting_SESSIONS
:
case
storepb
.
UserSetting_SESSIONS
:
setting
.
Value
=
&
v1pb
.
UserSetting_SessionsSetting_
{
setting
.
Value
=
&
v1pb
.
UserSetting_SessionsSetting_
{
SessionsSetting
:
&
v1pb
.
UserSetting_SessionsSetting
{
SessionsSetting
:
&
v1pb
.
UserSetting_SessionsSetting
{
Sessions
:
[]
*
v1pb
.
UserSe
tting_SessionsSetting_Se
ssion
{},
Sessions
:
[]
*
v1pb
.
UserSession
{},
},
},
}
}
case
storepb
.
UserSetting_ACCESS_TOKENS
:
case
storepb
.
UserSetting_ACCESS_TOKENS
:
setting
.
Value
=
&
v1pb
.
UserSetting_AccessTokensSetting_
{
setting
.
Value
=
&
v1pb
.
UserSetting_AccessTokensSetting_
{
AccessTokensSetting
:
&
v1pb
.
UserSetting_AccessTokensSetting
{
AccessTokensSetting
:
&
v1pb
.
UserSetting_AccessTokensSetting
{
AccessTokens
:
[]
*
v1pb
.
UserSetting_AccessTokensSetting_AccessToken
{},
AccessTokens
:
[]
*
v1pb
.
UserAccessToken
{},
},
}
case
storepb
.
UserSetting_SHORTCUTS
:
setting
.
Value
=
&
v1pb
.
UserSetting_ShortcutsSetting_
{
ShortcutsSetting
:
&
v1pb
.
UserSetting_ShortcutsSetting
{
Shortcuts
:
[]
*
v1pb
.
UserSetting_ShortcutsSetting_Shortcut
{},
},
},
}
}
case
storepb
.
UserSetting_WEBHOOKS
:
case
storepb
.
UserSetting_WEBHOOKS
:
setting
.
Value
=
&
v1pb
.
UserSetting_WebhooksSetting_
{
setting
.
Value
=
&
v1pb
.
UserSetting_WebhooksSetting_
{
WebhooksSetting
:
&
v1pb
.
UserSetting_WebhooksSetting
{
WebhooksSetting
:
&
v1pb
.
UserSetting_WebhooksSetting
{
Webhooks
:
[]
*
v1pb
.
User
Setting_WebhooksSetting_
Webhook
{},
Webhooks
:
[]
*
v1pb
.
UserWebhook
{},
},
},
}
}
}
}
...
@@ -1165,13 +1157,14 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
...
@@ -1165,13 +1157,14 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
}
}
case
storepb
.
UserSetting_SESSIONS
:
case
storepb
.
UserSetting_SESSIONS
:
sessions
:=
storeSetting
.
GetSessions
()
sessions
:=
storeSetting
.
GetSessions
()
apiSessions
:=
make
([]
*
v1pb
.
UserSe
tting_SessionsSetting_Se
ssion
,
0
,
len
(
sessions
.
Sessions
))
apiSessions
:=
make
([]
*
v1pb
.
UserSession
,
0
,
len
(
sessions
.
Sessions
))
for
_
,
session
:=
range
sessions
.
Sessions
{
for
_
,
session
:=
range
sessions
.
Sessions
{
apiSession
:=
&
v1pb
.
UserSetting_SessionsSetting_Session
{
apiSession
:=
&
v1pb
.
UserSession
{
Name
:
fmt
.
Sprintf
(
"users/%d/sessions/%s"
,
userID
,
session
.
SessionId
),
SessionId
:
session
.
SessionId
,
SessionId
:
session
.
SessionId
,
CreateTime
:
session
.
CreateTime
,
CreateTime
:
session
.
CreateTime
,
LastAccessedTime
:
session
.
LastAccessedTime
,
LastAccessedTime
:
session
.
LastAccessedTime
,
ClientInfo
:
&
v1pb
.
UserSe
tting_SessionsSetting
_ClientInfo
{
ClientInfo
:
&
v1pb
.
UserSe
ssion
_ClientInfo
{
UserAgent
:
session
.
ClientInfo
.
UserAgent
,
UserAgent
:
session
.
ClientInfo
.
UserAgent
,
IpAddress
:
session
.
ClientInfo
.
IpAddress
,
IpAddress
:
session
.
ClientInfo
.
IpAddress
,
DeviceType
:
session
.
ClientInfo
.
DeviceType
,
DeviceType
:
session
.
ClientInfo
.
DeviceType
,
...
@@ -1188,9 +1181,10 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
...
@@ -1188,9 +1181,10 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
}
}
case
storepb
.
UserSetting_ACCESS_TOKENS
:
case
storepb
.
UserSetting_ACCESS_TOKENS
:
accessTokens
:=
storeSetting
.
GetAccessTokens
()
accessTokens
:=
storeSetting
.
GetAccessTokens
()
apiTokens
:=
make
([]
*
v1pb
.
User
Setting_AccessTokensSetting_
AccessToken
,
0
,
len
(
accessTokens
.
AccessTokens
))
apiTokens
:=
make
([]
*
v1pb
.
UserAccessToken
,
0
,
len
(
accessTokens
.
AccessTokens
))
for
_
,
token
:=
range
accessTokens
.
AccessTokens
{
for
_
,
token
:=
range
accessTokens
.
AccessTokens
{
apiToken
:=
&
v1pb
.
UserSetting_AccessTokensSetting_AccessToken
{
apiToken
:=
&
v1pb
.
UserAccessToken
{
Name
:
fmt
.
Sprintf
(
"users/%d/accessTokens/%s"
,
userID
,
token
.
AccessToken
),
AccessToken
:
token
.
AccessToken
,
AccessToken
:
token
.
AccessToken
,
Description
:
token
.
Description
,
Description
:
token
.
Description
,
}
}
...
@@ -1201,30 +1195,14 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
...
@@ -1201,30 +1195,14 @@ func convertUserSettingFromStore(storeSetting *storepb.UserSetting, userID int32
AccessTokens
:
apiTokens
,
AccessTokens
:
apiTokens
,
},
},
}
}
case
storepb
.
UserSetting_SHORTCUTS
:
shortcuts
:=
storeSetting
.
GetShortcuts
()
apiShortcuts
:=
make
([]
*
v1pb
.
UserSetting_ShortcutsSetting_Shortcut
,
0
,
len
(
shortcuts
.
Shortcuts
))
for
_
,
shortcut
:=
range
shortcuts
.
Shortcuts
{
apiShortcut
:=
&
v1pb
.
UserSetting_ShortcutsSetting_Shortcut
{
Id
:
shortcut
.
Id
,
Title
:
shortcut
.
Title
,
Filter
:
shortcut
.
Filter
,
}
apiShortcuts
=
append
(
apiShortcuts
,
apiShortcut
)
}
setting
.
Value
=
&
v1pb
.
UserSetting_ShortcutsSetting_
{
ShortcutsSetting
:
&
v1pb
.
UserSetting_ShortcutsSetting
{
Shortcuts
:
apiShortcuts
,
},
}
case
storepb
.
UserSetting_WEBHOOKS
:
case
storepb
.
UserSetting_WEBHOOKS
:
webhooks
:=
storeSetting
.
GetWebhooks
()
webhooks
:=
storeSetting
.
GetWebhooks
()
apiWebhooks
:=
make
([]
*
v1pb
.
User
Setting_WebhooksSetting_
Webhook
,
0
,
len
(
webhooks
.
Webhooks
))
apiWebhooks
:=
make
([]
*
v1pb
.
UserWebhook
,
0
,
len
(
webhooks
.
Webhooks
))
for
_
,
webhook
:=
range
webhooks
.
Webhooks
{
for
_
,
webhook
:=
range
webhooks
.
Webhooks
{
apiWebhook
:=
&
v1pb
.
User
Setting_WebhooksSetting_
Webhook
{
apiWebhook
:=
&
v1pb
.
UserWebhook
{
Id
:
webhook
.
Id
,
Name
:
fmt
.
Sprintf
(
"users/%d/webhooks/%s"
,
userID
,
webhook
.
Id
)
,
Title
:
webhook
.
Title
,
Url
:
webhook
.
Url
,
Url
:
webhook
.
Url
,
DisplayName
:
webhook
.
Title
,
}
}
apiWebhooks
=
append
(
apiWebhooks
,
apiWebhook
)
apiWebhooks
=
append
(
apiWebhooks
,
apiWebhook
)
}
}
...
@@ -1303,32 +1281,13 @@ func convertUserSettingToStore(apiSetting *v1pb.UserSetting, userID int32, key s
...
@@ -1303,32 +1281,13 @@ func convertUserSettingToStore(apiSetting *v1pb.UserSetting, userID int32, key s
}
else
{
}
else
{
return
nil
,
errors
.
Errorf
(
"access tokens setting is required"
)
return
nil
,
errors
.
Errorf
(
"access tokens setting is required"
)
}
}
case
storepb
.
UserSetting_SHORTCUTS
:
if
shortcuts
:=
apiSetting
.
GetShortcutsSetting
();
shortcuts
!=
nil
{
storeShortcuts
:=
make
([]
*
storepb
.
ShortcutsUserSetting_Shortcut
,
0
,
len
(
shortcuts
.
Shortcuts
))
for
_
,
shortcut
:=
range
shortcuts
.
Shortcuts
{
storeShortcut
:=
&
storepb
.
ShortcutsUserSetting_Shortcut
{
Id
:
shortcut
.
Id
,
Title
:
shortcut
.
Title
,
Filter
:
shortcut
.
Filter
,
}
storeShortcuts
=
append
(
storeShortcuts
,
storeShortcut
)
}
storeSetting
.
Value
=
&
storepb
.
UserSetting_Shortcuts
{
Shortcuts
:
&
storepb
.
ShortcutsUserSetting
{
Shortcuts
:
storeShortcuts
,
},
}
}
else
{
return
nil
,
errors
.
Errorf
(
"shortcuts setting is required"
)
}
case
storepb
.
UserSetting_WEBHOOKS
:
case
storepb
.
UserSetting_WEBHOOKS
:
if
webhooks
:=
apiSetting
.
GetWebhooksSetting
();
webhooks
!=
nil
{
if
webhooks
:=
apiSetting
.
GetWebhooksSetting
();
webhooks
!=
nil
{
storeWebhooks
:=
make
([]
*
storepb
.
WebhooksUserSetting_Webhook
,
0
,
len
(
webhooks
.
Webhooks
))
storeWebhooks
:=
make
([]
*
storepb
.
WebhooksUserSetting_Webhook
,
0
,
len
(
webhooks
.
Webhooks
))
for
_
,
webhook
:=
range
webhooks
.
Webhooks
{
for
_
,
webhook
:=
range
webhooks
.
Webhooks
{
storeWebhook
:=
&
storepb
.
WebhooksUserSetting_Webhook
{
storeWebhook
:=
&
storepb
.
WebhooksUserSetting_Webhook
{
Id
:
webhook
.
Id
,
Id
:
extractWebhookIDFromName
(
webhook
.
Name
)
,
Title
:
webhook
.
Titl
e
,
Title
:
webhook
.
DisplayNam
e
,
Url
:
webhook
.
Url
,
Url
:
webhook
.
Url
,
}
}
storeWebhooks
=
append
(
storeWebhooks
,
storeWebhook
)
storeWebhooks
=
append
(
storeWebhooks
,
storeWebhook
)
...
@@ -1347,3 +1306,13 @@ func convertUserSettingToStore(apiSetting *v1pb.UserSetting, userID int32, key s
...
@@ -1347,3 +1306,13 @@ func convertUserSettingToStore(apiSetting *v1pb.UserSetting, userID int32, key s
return
storeSetting
,
nil
return
storeSetting
,
nil
}
}
// extractWebhookIDFromName extracts webhook ID from resource name.
// e.g., "users/123/webhooks/webhook-id" -> "webhook-id".
func
extractWebhookIDFromName
(
name
string
)
string
{
parts
:=
strings
.
Split
(
name
,
"/"
)
if
len
(
parts
)
>=
4
&&
parts
[
0
]
==
"users"
&&
parts
[
2
]
==
"webhooks"
{
return
parts
[
3
]
}
return
""
}
web/src/store/user.ts
View file @
8f51791d
...
@@ -6,10 +6,10 @@ import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
...
@@ -6,10 +6,10 @@ import { Shortcut } from "@/types/proto/api/v1/shortcut_service";
import
{
import
{
User
,
User
,
UserSetting
,
UserSetting
,
UserSetting_Key
,
UserSetting_GeneralSetting
,
UserSetting_GeneralSetting
,
UserSetting_SessionsSetting
,
UserSetting_SessionsSetting
,
UserSetting_AccessTokensSetting
,
UserSetting_AccessTokensSetting
,
UserSetting_ShortcutsSetting
,
UserSetting_WebhooksSetting
,
UserSetting_WebhooksSetting
,
UserStats
,
UserStats
,
}
from
"@/types/proto/api/v1/user_service"
;
}
from
"@/types/proto/api/v1/user_service"
;
...
@@ -21,7 +21,6 @@ class LocalState {
...
@@ -21,7 +21,6 @@ class LocalState {
userGeneralSetting
?:
UserSetting_GeneralSetting
;
userGeneralSetting
?:
UserSetting_GeneralSetting
;
userSessionsSetting
?:
UserSetting_SessionsSetting
;
userSessionsSetting
?:
UserSetting_SessionsSetting
;
userAccessTokensSetting
?:
UserSetting_AccessTokensSetting
;
userAccessTokensSetting
?:
UserSetting_AccessTokensSetting
;
userShortcutsSetting
?:
UserSetting_ShortcutsSetting
;
userWebhooksSetting
?:
UserSetting_WebhooksSetting
;
userWebhooksSetting
?:
UserSetting_WebhooksSetting
;
shortcuts
:
Shortcut
[]
=
[];
shortcuts
:
Shortcut
[]
=
[];
inboxes
:
Inbox
[]
=
[];
inboxes
:
Inbox
[]
=
[];
...
@@ -145,7 +144,7 @@ const userStore = (() => {
...
@@ -145,7 +144,7 @@ const userStore = (() => {
throw
new
Error
(
"No current user"
);
throw
new
Error
(
"No current user"
);
}
}
const
settingName
=
`
${
state
.
currentUser
}
/settings/
general
`
;
const
settingName
=
`
${
state
.
currentUser
}
/settings/
${
UserSetting_Key
.
GENERAL
}
`
;
const
userSetting
:
UserSetting
=
{
const
userSetting
:
UserSetting
=
{
name
:
settingName
,
name
:
settingName
,
generalSetting
:
generalSetting
as
UserSetting_GeneralSetting
,
generalSetting
:
generalSetting
as
UserSetting_GeneralSetting
,
...
@@ -166,7 +165,7 @@ const userStore = (() => {
...
@@ -166,7 +165,7 @@ const userStore = (() => {
throw
new
Error
(
"No current user"
);
throw
new
Error
(
"No current user"
);
}
}
const
settingName
=
`
${
state
.
currentUser
}
/settings/
general
`
;
const
settingName
=
`
${
state
.
currentUser
}
/settings/
${
UserSetting_Key
.
GENERAL
}
`
;
const
userSetting
=
await
userServiceClient
.
getUserSetting
({
name
:
settingName
});
const
userSetting
=
await
userServiceClient
.
getUserSetting
({
name
:
settingName
});
state
.
setPartial
({
state
.
setPartial
({
...
@@ -187,24 +186,13 @@ const userStore = (() => {
...
@@ -187,24 +186,13 @@ const userStore = (() => {
const
generalSetting
=
settings
.
find
((
s
)
=>
s
.
generalSetting
)?.
generalSetting
;
const
generalSetting
=
settings
.
find
((
s
)
=>
s
.
generalSetting
)?.
generalSetting
;
const
sessionsSetting
=
settings
.
find
((
s
)
=>
s
.
sessionsSetting
)?.
sessionsSetting
;
const
sessionsSetting
=
settings
.
find
((
s
)
=>
s
.
sessionsSetting
)?.
sessionsSetting
;
const
accessTokensSetting
=
settings
.
find
((
s
)
=>
s
.
accessTokensSetting
)?.
accessTokensSetting
;
const
accessTokensSetting
=
settings
.
find
((
s
)
=>
s
.
accessTokensSetting
)?.
accessTokensSetting
;
const
shortcutsSetting
=
settings
.
find
((
s
)
=>
s
.
shortcutsSetting
)?.
shortcutsSetting
;
const
webhooksSetting
=
settings
.
find
((
s
)
=>
s
.
webhooksSetting
)?.
webhooksSetting
;
const
webhooksSetting
=
settings
.
find
((
s
)
=>
s
.
webhooksSetting
)?.
webhooksSetting
;
// Convert user setting shortcuts to proper Shortcut format
const
shortcuts
:
Shortcut
[]
=
shortcutsSetting
?.
shortcuts
.
map
((
shortcut
)
=>
({
name
:
`
${
state
.
currentUser
}
/shortcuts/
${
shortcut
.
id
}
`
,
title
:
shortcut
.
title
,
filter
:
shortcut
.
filter
,
}))
||
[];
state
.
setPartial
({
state
.
setPartial
({
userGeneralSetting
:
generalSetting
,
userGeneralSetting
:
generalSetting
,
userSessionsSetting
:
sessionsSetting
,
userSessionsSetting
:
sessionsSetting
,
userAccessTokensSetting
:
accessTokensSetting
,
userAccessTokensSetting
:
accessTokensSetting
,
userShortcutsSetting
:
shortcutsSetting
,
userWebhooksSetting
:
webhooksSetting
,
userWebhooksSetting
:
webhooksSetting
,
shortcuts
,
});
});
};
};
...
...
web/src/types/proto/api/v1/user_service.ts
View file @
8f51791d
...
@@ -272,13 +272,13 @@ export interface ListAllUserStatsResponse {
...
@@ -272,13 +272,13 @@ export interface ListAllUserStatsResponse {
export
interface
UserSetting
{
export
interface
UserSetting
{
/**
/**
* The name of the user setting.
* The name of the user setting.
* Format: users/{user}/settings/{setting}
* Format: users/{user}/settings/{setting}, {setting} is the key for the setting.
* For example, "users/123/settings/GENERAL" for general settings.
*/
*/
name
:
string
;
name
:
string
;
generalSetting
?:
UserSetting_GeneralSetting
|
undefined
;
generalSetting
?:
UserSetting_GeneralSetting
|
undefined
;
sessionsSetting
?:
UserSetting_SessionsSetting
|
undefined
;
sessionsSetting
?:
UserSetting_SessionsSetting
|
undefined
;
accessTokensSetting
?:
UserSetting_AccessTokensSetting
|
undefined
;
accessTokensSetting
?:
UserSetting_AccessTokensSetting
|
undefined
;
shortcutsSetting
?:
UserSetting_ShortcutsSetting
|
undefined
;
webhooksSetting
?:
UserSetting_WebhooksSetting
|
undefined
;
webhooksSetting
?:
UserSetting_WebhooksSetting
|
undefined
;
}
}
...
@@ -291,8 +291,6 @@ export enum UserSetting_Key {
...
@@ -291,8 +291,6 @@ export enum UserSetting_Key {
SESSIONS
=
"SESSIONS"
,
SESSIONS
=
"SESSIONS"
,
/** ACCESS_TOKENS - ACCESS_TOKENS is the key for access tokens. */
/** ACCESS_TOKENS - ACCESS_TOKENS is the key for access tokens. */
ACCESS_TOKENS
=
"ACCESS_TOKENS"
,
ACCESS_TOKENS
=
"ACCESS_TOKENS"
,
/** SHORTCUTS - SHORTCUTS is the key for user shortcuts. */
SHORTCUTS
=
"SHORTCUTS"
,
/** WEBHOOKS - WEBHOOKS is the key for user webhooks. */
/** WEBHOOKS - WEBHOOKS is the key for user webhooks. */
WEBHOOKS
=
"WEBHOOKS"
,
WEBHOOKS
=
"WEBHOOKS"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
...
@@ -313,9 +311,6 @@ export function userSetting_KeyFromJSON(object: any): UserSetting_Key {
...
@@ -313,9 +311,6 @@ export function userSetting_KeyFromJSON(object: any): UserSetting_Key {
case
"ACCESS_TOKENS"
:
case
"ACCESS_TOKENS"
:
return
UserSetting_Key
.
ACCESS_TOKENS
;
return
UserSetting_Key
.
ACCESS_TOKENS
;
case
4
:
case
4
:
case
"SHORTCUTS"
:
return
UserSetting_Key
.
SHORTCUTS
;
case
5
:
case
"WEBHOOKS"
:
case
"WEBHOOKS"
:
return
UserSetting_Key
.
WEBHOOKS
;
return
UserSetting_Key
.
WEBHOOKS
;
case
-
1
:
case
-
1
:
...
@@ -335,10 +330,8 @@ export function userSetting_KeyToNumber(object: UserSetting_Key): number {
...
@@ -335,10 +330,8 @@ export function userSetting_KeyToNumber(object: UserSetting_Key): number {
return
2
;
return
2
;
case
UserSetting_Key
.
ACCESS_TOKENS
:
case
UserSetting_Key
.
ACCESS_TOKENS
:
return
3
;
return
3
;
case
UserSetting_Key
.
SHORTCUTS
:
return
4
;
case
UserSetting_Key
.
WEBHOOKS
:
case
UserSetting_Key
.
WEBHOOKS
:
return
5
;
return
4
;
case
UserSetting_Key
.
UNRECOGNIZED
:
case
UserSetting_Key
.
UNRECOGNIZED
:
default
:
default
:
return
-
1
;
return
-
1
;
...
@@ -364,89 +357,19 @@ export interface UserSetting_GeneralSetting {
...
@@ -364,89 +357,19 @@ export interface UserSetting_GeneralSetting {
/** User authentication sessions configuration. */
/** User authentication sessions configuration. */
export
interface
UserSetting_SessionsSetting
{
export
interface
UserSetting_SessionsSetting
{
/** List of active user sessions. */
/** List of active user sessions. */
sessions
:
UserSetting_SessionsSetting_Session
[];
sessions
:
UserSession
[];
}
/** User session information. */
export
interface
UserSetting_SessionsSetting_Session
{
/** Unique session identifier. */
sessionId
:
string
;
/** Timestamp when the session was created. */
createTime
?:
|
Date
|
undefined
;
/**
* Timestamp when the session was last accessed.
* Used for sliding expiration calculation (last_accessed_time + 2 weeks).
*/
lastAccessedTime
?:
|
Date
|
undefined
;
/** Client information associated with this session. */
clientInfo
?:
UserSetting_SessionsSetting_ClientInfo
|
undefined
;
}
/** Client information for a session. */
export
interface
UserSetting_SessionsSetting_ClientInfo
{
/** User agent string of the client. */
userAgent
:
string
;
/** IP address of the client. */
ipAddress
:
string
;
/** Optional. Device type (e.g., "mobile", "desktop", "tablet"). */
deviceType
:
string
;
/** Optional. Operating system (e.g., "iOS 17.0", "Windows 11"). */
os
:
string
;
/** Optional. Browser name and version (e.g., "Chrome 119.0"). */
browser
:
string
;
}
}
/** User access tokens configuration. */
/** User access tokens configuration. */
export
interface
UserSetting_AccessTokensSetting
{
export
interface
UserSetting_AccessTokensSetting
{
/** List of user access tokens. */
/** List of user access tokens. */
accessTokens
:
UserSetting_AccessTokensSetting_AccessToken
[];
accessTokens
:
UserAccessToken
[];
}
/** User access token information. */
export
interface
UserSetting_AccessTokensSetting_AccessToken
{
/**
* The access token is a JWT token.
* Including expiration time, issuer, etc.
*/
accessToken
:
string
;
/** A description for the access token. */
description
:
string
;
}
/** User shortcuts configuration. */
export
interface
UserSetting_ShortcutsSetting
{
/** List of user shortcuts. */
shortcuts
:
UserSetting_ShortcutsSetting_Shortcut
[];
}
/** User shortcut definition. */
export
interface
UserSetting_ShortcutsSetting_Shortcut
{
/** Unique identifier for the shortcut. */
id
:
string
;
/** Display title for the shortcut. */
title
:
string
;
/** Filter expression for the shortcut. */
filter
:
string
;
}
}
/** User webhooks configuration. */
/** User webhooks configuration. */
export
interface
UserSetting_WebhooksSetting
{
export
interface
UserSetting_WebhooksSetting
{
/** List of user webhooks. */
/** List of user webhooks. */
webhooks
:
UserSetting_WebhooksSetting_Webhook
[];
webhooks
:
UserWebhook
[];
}
/** User webhook definition. */
export
interface
UserSetting_WebhooksSetting_Webhook
{
/** Unique identifier for the webhook. */
id
:
string
;
/** Descriptive title for the webhook. */
title
:
string
;
/** The webhook URL endpoint. */
url
:
string
;
}
}
export
interface
GetUserSettingRequest
{
export
interface
GetUserSettingRequest
{
...
@@ -1869,7 +1792,6 @@ function createBaseUserSetting(): UserSetting {
...
@@ -1869,7 +1792,6 @@ function createBaseUserSetting(): UserSetting {
generalSetting
:
undefined
,
generalSetting
:
undefined
,
sessionsSetting
:
undefined
,
sessionsSetting
:
undefined
,
accessTokensSetting
:
undefined
,
accessTokensSetting
:
undefined
,
shortcutsSetting
:
undefined
,
webhooksSetting
:
undefined
,
webhooksSetting
:
undefined
,
};
};
}
}
...
@@ -1888,11 +1810,8 @@ export const UserSetting: MessageFns<UserSetting> = {
...
@@ -1888,11 +1810,8 @@ export const UserSetting: MessageFns<UserSetting> = {
if
(
message
.
accessTokensSetting
!==
undefined
)
{
if
(
message
.
accessTokensSetting
!==
undefined
)
{
UserSetting_AccessTokensSetting
.
encode
(
message
.
accessTokensSetting
,
writer
.
uint32
(
34
).
fork
()).
join
();
UserSetting_AccessTokensSetting
.
encode
(
message
.
accessTokensSetting
,
writer
.
uint32
(
34
).
fork
()).
join
();
}
}
if
(
message
.
shortcutsSetting
!==
undefined
)
{
UserSetting_ShortcutsSetting
.
encode
(
message
.
shortcutsSetting
,
writer
.
uint32
(
42
).
fork
()).
join
();
}
if
(
message
.
webhooksSetting
!==
undefined
)
{
if
(
message
.
webhooksSetting
!==
undefined
)
{
UserSetting_WebhooksSetting
.
encode
(
message
.
webhooksSetting
,
writer
.
uint32
(
50
).
fork
()).
join
();
UserSetting_WebhooksSetting
.
encode
(
message
.
webhooksSetting
,
writer
.
uint32
(
42
).
fork
()).
join
();
}
}
return
writer
;
return
writer
;
},
},
...
@@ -1941,14 +1860,6 @@ export const UserSetting: MessageFns<UserSetting> = {
...
@@ -1941,14 +1860,6 @@ export const UserSetting: MessageFns<UserSetting> = {
break
;
break
;
}
}
message
.
shortcutsSetting
=
UserSetting_ShortcutsSetting
.
decode
(
reader
,
reader
.
uint32
());
continue
;
}
case
6
:
{
if
(
tag
!==
50
)
{
break
;
}
message
.
webhooksSetting
=
UserSetting_WebhooksSetting
.
decode
(
reader
,
reader
.
uint32
());
message
.
webhooksSetting
=
UserSetting_WebhooksSetting
.
decode
(
reader
,
reader
.
uint32
());
continue
;
continue
;
}
}
...
@@ -1976,9 +1887,6 @@ export const UserSetting: MessageFns<UserSetting> = {
...
@@ -1976,9 +1887,6 @@ export const UserSetting: MessageFns<UserSetting> = {
message
.
accessTokensSetting
=
(
object
.
accessTokensSetting
!==
undefined
&&
object
.
accessTokensSetting
!==
null
)
message
.
accessTokensSetting
=
(
object
.
accessTokensSetting
!==
undefined
&&
object
.
accessTokensSetting
!==
null
)
?
UserSetting_AccessTokensSetting
.
fromPartial
(
object
.
accessTokensSetting
)
?
UserSetting_AccessTokensSetting
.
fromPartial
(
object
.
accessTokensSetting
)
:
undefined
;
:
undefined
;
message
.
shortcutsSetting
=
(
object
.
shortcutsSetting
!==
undefined
&&
object
.
shortcutsSetting
!==
null
)
?
UserSetting_ShortcutsSetting
.
fromPartial
(
object
.
shortcutsSetting
)
:
undefined
;
message
.
webhooksSetting
=
(
object
.
webhooksSetting
!==
undefined
&&
object
.
webhooksSetting
!==
null
)
message
.
webhooksSetting
=
(
object
.
webhooksSetting
!==
undefined
&&
object
.
webhooksSetting
!==
null
)
?
UserSetting_WebhooksSetting
.
fromPartial
(
object
.
webhooksSetting
)
?
UserSetting_WebhooksSetting
.
fromPartial
(
object
.
webhooksSetting
)
:
undefined
;
:
undefined
;
...
@@ -2075,7 +1983,7 @@ function createBaseUserSetting_SessionsSetting(): UserSetting_SessionsSetting {
...
@@ -2075,7 +1983,7 @@ function createBaseUserSetting_SessionsSetting(): UserSetting_SessionsSetting {
export
const
UserSetting_SessionsSetting
:
MessageFns
<
UserSetting_SessionsSetting
>
=
{
export
const
UserSetting_SessionsSetting
:
MessageFns
<
UserSetting_SessionsSetting
>
=
{
encode
(
message
:
UserSetting_SessionsSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
encode
(
message
:
UserSetting_SessionsSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
for
(
const
v
of
message
.
sessions
)
{
for
(
const
v
of
message
.
sessions
)
{
UserSe
tting_SessionsSetting_Se
ssion
.
encode
(
v
!
,
writer
.
uint32
(
10
).
fork
()).
join
();
UserSession
.
encode
(
v
!
,
writer
.
uint32
(
10
).
fork
()).
join
();
}
}
return
writer
;
return
writer
;
},
},
...
@@ -2092,7 +2000,7 @@ export const UserSetting_SessionsSetting: MessageFns<UserSetting_SessionsSetting
...
@@ -2092,7 +2000,7 @@ export const UserSetting_SessionsSetting: MessageFns<UserSetting_SessionsSetting
break
;
break
;
}
}
message
.
sessions
.
push
(
UserSe
tting_SessionsSetting_Se
ssion
.
decode
(
reader
,
reader
.
uint32
()));
message
.
sessions
.
push
(
UserSession
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
continue
;
}
}
}
}
...
@@ -2109,185 +2017,7 @@ export const UserSetting_SessionsSetting: MessageFns<UserSetting_SessionsSetting
...
@@ -2109,185 +2017,7 @@ export const UserSetting_SessionsSetting: MessageFns<UserSetting_SessionsSetting
},
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_SessionsSetting
>
):
UserSetting_SessionsSetting
{
fromPartial
(
object
:
DeepPartial
<
UserSetting_SessionsSetting
>
):
UserSetting_SessionsSetting
{
const
message
=
createBaseUserSetting_SessionsSetting
();
const
message
=
createBaseUserSetting_SessionsSetting
();
message
.
sessions
=
object
.
sessions
?.
map
((
e
)
=>
UserSetting_SessionsSetting_Session
.
fromPartial
(
e
))
||
[];
message
.
sessions
=
object
.
sessions
?.
map
((
e
)
=>
UserSession
.
fromPartial
(
e
))
||
[];
return
message
;
},
};
function
createBaseUserSetting_SessionsSetting_Session
():
UserSetting_SessionsSetting_Session
{
return
{
sessionId
:
""
,
createTime
:
undefined
,
lastAccessedTime
:
undefined
,
clientInfo
:
undefined
};
}
export
const
UserSetting_SessionsSetting_Session
:
MessageFns
<
UserSetting_SessionsSetting_Session
>
=
{
encode
(
message
:
UserSetting_SessionsSetting_Session
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
sessionId
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
sessionId
);
}
if
(
message
.
createTime
!==
undefined
)
{
Timestamp
.
encode
(
toTimestamp
(
message
.
createTime
),
writer
.
uint32
(
18
).
fork
()).
join
();
}
if
(
message
.
lastAccessedTime
!==
undefined
)
{
Timestamp
.
encode
(
toTimestamp
(
message
.
lastAccessedTime
),
writer
.
uint32
(
26
).
fork
()).
join
();
}
if
(
message
.
clientInfo
!==
undefined
)
{
UserSetting_SessionsSetting_ClientInfo
.
encode
(
message
.
clientInfo
,
writer
.
uint32
(
34
).
fork
()).
join
();
}
return
writer
;
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
UserSetting_SessionsSetting_Session
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseUserSetting_SessionsSetting_Session
();
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
case
1
:
{
if
(
tag
!==
10
)
{
break
;
}
message
.
sessionId
=
reader
.
string
();
continue
;
}
case
2
:
{
if
(
tag
!==
18
)
{
break
;
}
message
.
createTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
}
case
3
:
{
if
(
tag
!==
26
)
{
break
;
}
message
.
lastAccessedTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
}
case
4
:
{
if
(
tag
!==
34
)
{
break
;
}
message
.
clientInfo
=
UserSetting_SessionsSetting_ClientInfo
.
decode
(
reader
,
reader
.
uint32
());
continue
;
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
}
reader
.
skip
(
tag
&
7
);
}
return
message
;
},
create
(
base
?:
DeepPartial
<
UserSetting_SessionsSetting_Session
>
):
UserSetting_SessionsSetting_Session
{
return
UserSetting_SessionsSetting_Session
.
fromPartial
(
base
??
{});
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_SessionsSetting_Session
>
):
UserSetting_SessionsSetting_Session
{
const
message
=
createBaseUserSetting_SessionsSetting_Session
();
message
.
sessionId
=
object
.
sessionId
??
""
;
message
.
createTime
=
object
.
createTime
??
undefined
;
message
.
lastAccessedTime
=
object
.
lastAccessedTime
??
undefined
;
message
.
clientInfo
=
(
object
.
clientInfo
!==
undefined
&&
object
.
clientInfo
!==
null
)
?
UserSetting_SessionsSetting_ClientInfo
.
fromPartial
(
object
.
clientInfo
)
:
undefined
;
return
message
;
},
};
function
createBaseUserSetting_SessionsSetting_ClientInfo
():
UserSetting_SessionsSetting_ClientInfo
{
return
{
userAgent
:
""
,
ipAddress
:
""
,
deviceType
:
""
,
os
:
""
,
browser
:
""
};
}
export
const
UserSetting_SessionsSetting_ClientInfo
:
MessageFns
<
UserSetting_SessionsSetting_ClientInfo
>
=
{
encode
(
message
:
UserSetting_SessionsSetting_ClientInfo
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
userAgent
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
userAgent
);
}
if
(
message
.
ipAddress
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
ipAddress
);
}
if
(
message
.
deviceType
!==
""
)
{
writer
.
uint32
(
26
).
string
(
message
.
deviceType
);
}
if
(
message
.
os
!==
""
)
{
writer
.
uint32
(
34
).
string
(
message
.
os
);
}
if
(
message
.
browser
!==
""
)
{
writer
.
uint32
(
42
).
string
(
message
.
browser
);
}
return
writer
;
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
UserSetting_SessionsSetting_ClientInfo
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseUserSetting_SessionsSetting_ClientInfo
();
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
case
1
:
{
if
(
tag
!==
10
)
{
break
;
}
message
.
userAgent
=
reader
.
string
();
continue
;
}
case
2
:
{
if
(
tag
!==
18
)
{
break
;
}
message
.
ipAddress
=
reader
.
string
();
continue
;
}
case
3
:
{
if
(
tag
!==
26
)
{
break
;
}
message
.
deviceType
=
reader
.
string
();
continue
;
}
case
4
:
{
if
(
tag
!==
34
)
{
break
;
}
message
.
os
=
reader
.
string
();
continue
;
}
case
5
:
{
if
(
tag
!==
42
)
{
break
;
}
message
.
browser
=
reader
.
string
();
continue
;
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
}
reader
.
skip
(
tag
&
7
);
}
return
message
;
},
create
(
base
?:
DeepPartial
<
UserSetting_SessionsSetting_ClientInfo
>
):
UserSetting_SessionsSetting_ClientInfo
{
return
UserSetting_SessionsSetting_ClientInfo
.
fromPartial
(
base
??
{});
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_SessionsSetting_ClientInfo
>
):
UserSetting_SessionsSetting_ClientInfo
{
const
message
=
createBaseUserSetting_SessionsSetting_ClientInfo
();
message
.
userAgent
=
object
.
userAgent
??
""
;
message
.
ipAddress
=
object
.
ipAddress
??
""
;
message
.
deviceType
=
object
.
deviceType
??
""
;
message
.
os
=
object
.
os
??
""
;
message
.
browser
=
object
.
browser
??
""
;
return
message
;
return
message
;
},
},
};
};
...
@@ -2299,7 +2029,7 @@ function createBaseUserSetting_AccessTokensSetting(): UserSetting_AccessTokensSe
...
@@ -2299,7 +2029,7 @@ function createBaseUserSetting_AccessTokensSetting(): UserSetting_AccessTokensSe
export
const
UserSetting_AccessTokensSetting
:
MessageFns
<
UserSetting_AccessTokensSetting
>
=
{
export
const
UserSetting_AccessTokensSetting
:
MessageFns
<
UserSetting_AccessTokensSetting
>
=
{
encode
(
message
:
UserSetting_AccessTokensSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
encode
(
message
:
UserSetting_AccessTokensSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
for
(
const
v
of
message
.
accessTokens
)
{
for
(
const
v
of
message
.
accessTokens
)
{
User
Setting_AccessTokensSetting_
AccessToken
.
encode
(
v
!
,
writer
.
uint32
(
10
).
fork
()).
join
();
UserAccessToken
.
encode
(
v
!
,
writer
.
uint32
(
10
).
fork
()).
join
();
}
}
return
writer
;
return
writer
;
},
},
...
@@ -2316,7 +2046,7 @@ export const UserSetting_AccessTokensSetting: MessageFns<UserSetting_AccessToken
...
@@ -2316,7 +2046,7 @@ export const UserSetting_AccessTokensSetting: MessageFns<UserSetting_AccessToken
break
;
break
;
}
}
message
.
accessTokens
.
push
(
User
Setting_AccessTokensSetting_
AccessToken
.
decode
(
reader
,
reader
.
uint32
()));
message
.
accessTokens
.
push
(
UserAccessToken
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
continue
;
}
}
}
}
...
@@ -2333,187 +2063,7 @@ export const UserSetting_AccessTokensSetting: MessageFns<UserSetting_AccessToken
...
@@ -2333,187 +2063,7 @@ export const UserSetting_AccessTokensSetting: MessageFns<UserSetting_AccessToken
},
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_AccessTokensSetting
>
):
UserSetting_AccessTokensSetting
{
fromPartial
(
object
:
DeepPartial
<
UserSetting_AccessTokensSetting
>
):
UserSetting_AccessTokensSetting
{
const
message
=
createBaseUserSetting_AccessTokensSetting
();
const
message
=
createBaseUserSetting_AccessTokensSetting
();
message
.
accessTokens
=
message
.
accessTokens
=
object
.
accessTokens
?.
map
((
e
)
=>
UserAccessToken
.
fromPartial
(
e
))
||
[];
object
.
accessTokens
?.
map
((
e
)
=>
UserSetting_AccessTokensSetting_AccessToken
.
fromPartial
(
e
))
||
[];
return
message
;
},
};
function
createBaseUserSetting_AccessTokensSetting_AccessToken
():
UserSetting_AccessTokensSetting_AccessToken
{
return
{
accessToken
:
""
,
description
:
""
};
}
export
const
UserSetting_AccessTokensSetting_AccessToken
:
MessageFns
<
UserSetting_AccessTokensSetting_AccessToken
>
=
{
encode
(
message
:
UserSetting_AccessTokensSetting_AccessToken
,
writer
:
BinaryWriter
=
new
BinaryWriter
(),
):
BinaryWriter
{
if
(
message
.
accessToken
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
accessToken
);
}
if
(
message
.
description
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
description
);
}
return
writer
;
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
UserSetting_AccessTokensSetting_AccessToken
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseUserSetting_AccessTokensSetting_AccessToken
();
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
case
1
:
{
if
(
tag
!==
10
)
{
break
;
}
message
.
accessToken
=
reader
.
string
();
continue
;
}
case
2
:
{
if
(
tag
!==
18
)
{
break
;
}
message
.
description
=
reader
.
string
();
continue
;
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
}
reader
.
skip
(
tag
&
7
);
}
return
message
;
},
create
(
base
?:
DeepPartial
<
UserSetting_AccessTokensSetting_AccessToken
>
):
UserSetting_AccessTokensSetting_AccessToken
{
return
UserSetting_AccessTokensSetting_AccessToken
.
fromPartial
(
base
??
{});
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_AccessTokensSetting_AccessToken
>
,
):
UserSetting_AccessTokensSetting_AccessToken
{
const
message
=
createBaseUserSetting_AccessTokensSetting_AccessToken
();
message
.
accessToken
=
object
.
accessToken
??
""
;
message
.
description
=
object
.
description
??
""
;
return
message
;
},
};
function
createBaseUserSetting_ShortcutsSetting
():
UserSetting_ShortcutsSetting
{
return
{
shortcuts
:
[]
};
}
export
const
UserSetting_ShortcutsSetting
:
MessageFns
<
UserSetting_ShortcutsSetting
>
=
{
encode
(
message
:
UserSetting_ShortcutsSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
for
(
const
v
of
message
.
shortcuts
)
{
UserSetting_ShortcutsSetting_Shortcut
.
encode
(
v
!
,
writer
.
uint32
(
10
).
fork
()).
join
();
}
return
writer
;
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
UserSetting_ShortcutsSetting
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseUserSetting_ShortcutsSetting
();
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
case
1
:
{
if
(
tag
!==
10
)
{
break
;
}
message
.
shortcuts
.
push
(
UserSetting_ShortcutsSetting_Shortcut
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
}
reader
.
skip
(
tag
&
7
);
}
return
message
;
},
create
(
base
?:
DeepPartial
<
UserSetting_ShortcutsSetting
>
):
UserSetting_ShortcutsSetting
{
return
UserSetting_ShortcutsSetting
.
fromPartial
(
base
??
{});
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_ShortcutsSetting
>
):
UserSetting_ShortcutsSetting
{
const
message
=
createBaseUserSetting_ShortcutsSetting
();
message
.
shortcuts
=
object
.
shortcuts
?.
map
((
e
)
=>
UserSetting_ShortcutsSetting_Shortcut
.
fromPartial
(
e
))
||
[];
return
message
;
},
};
function
createBaseUserSetting_ShortcutsSetting_Shortcut
():
UserSetting_ShortcutsSetting_Shortcut
{
return
{
id
:
""
,
title
:
""
,
filter
:
""
};
}
export
const
UserSetting_ShortcutsSetting_Shortcut
:
MessageFns
<
UserSetting_ShortcutsSetting_Shortcut
>
=
{
encode
(
message
:
UserSetting_ShortcutsSetting_Shortcut
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
id
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
id
);
}
if
(
message
.
title
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
title
);
}
if
(
message
.
filter
!==
""
)
{
writer
.
uint32
(
26
).
string
(
message
.
filter
);
}
return
writer
;
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
UserSetting_ShortcutsSetting_Shortcut
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseUserSetting_ShortcutsSetting_Shortcut
();
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
case
1
:
{
if
(
tag
!==
10
)
{
break
;
}
message
.
id
=
reader
.
string
();
continue
;
}
case
2
:
{
if
(
tag
!==
18
)
{
break
;
}
message
.
title
=
reader
.
string
();
continue
;
}
case
3
:
{
if
(
tag
!==
26
)
{
break
;
}
message
.
filter
=
reader
.
string
();
continue
;
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
}
reader
.
skip
(
tag
&
7
);
}
return
message
;
},
create
(
base
?:
DeepPartial
<
UserSetting_ShortcutsSetting_Shortcut
>
):
UserSetting_ShortcutsSetting_Shortcut
{
return
UserSetting_ShortcutsSetting_Shortcut
.
fromPartial
(
base
??
{});
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_ShortcutsSetting_Shortcut
>
):
UserSetting_ShortcutsSetting_Shortcut
{
const
message
=
createBaseUserSetting_ShortcutsSetting_Shortcut
();
message
.
id
=
object
.
id
??
""
;
message
.
title
=
object
.
title
??
""
;
message
.
filter
=
object
.
filter
??
""
;
return
message
;
return
message
;
},
},
};
};
...
@@ -2525,7 +2075,7 @@ function createBaseUserSetting_WebhooksSetting(): UserSetting_WebhooksSetting {
...
@@ -2525,7 +2075,7 @@ function createBaseUserSetting_WebhooksSetting(): UserSetting_WebhooksSetting {
export
const
UserSetting_WebhooksSetting
:
MessageFns
<
UserSetting_WebhooksSetting
>
=
{
export
const
UserSetting_WebhooksSetting
:
MessageFns
<
UserSetting_WebhooksSetting
>
=
{
encode
(
message
:
UserSetting_WebhooksSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
encode
(
message
:
UserSetting_WebhooksSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
for
(
const
v
of
message
.
webhooks
)
{
for
(
const
v
of
message
.
webhooks
)
{
User
Setting_WebhooksSetting_
Webhook
.
encode
(
v
!
,
writer
.
uint32
(
10
).
fork
()).
join
();
UserWebhook
.
encode
(
v
!
,
writer
.
uint32
(
10
).
fork
()).
join
();
}
}
return
writer
;
return
writer
;
},
},
...
@@ -2542,7 +2092,7 @@ export const UserSetting_WebhooksSetting: MessageFns<UserSetting_WebhooksSetting
...
@@ -2542,7 +2092,7 @@ export const UserSetting_WebhooksSetting: MessageFns<UserSetting_WebhooksSetting
break
;
break
;
}
}
message
.
webhooks
.
push
(
User
Setting_WebhooksSetting_
Webhook
.
decode
(
reader
,
reader
.
uint32
()));
message
.
webhooks
.
push
(
UserWebhook
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
continue
;
}
}
}
}
...
@@ -2559,77 +2109,7 @@ export const UserSetting_WebhooksSetting: MessageFns<UserSetting_WebhooksSetting
...
@@ -2559,77 +2109,7 @@ export const UserSetting_WebhooksSetting: MessageFns<UserSetting_WebhooksSetting
},
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_WebhooksSetting
>
):
UserSetting_WebhooksSetting
{
fromPartial
(
object
:
DeepPartial
<
UserSetting_WebhooksSetting
>
):
UserSetting_WebhooksSetting
{
const
message
=
createBaseUserSetting_WebhooksSetting
();
const
message
=
createBaseUserSetting_WebhooksSetting
();
message
.
webhooks
=
object
.
webhooks
?.
map
((
e
)
=>
UserSetting_WebhooksSetting_Webhook
.
fromPartial
(
e
))
||
[];
message
.
webhooks
=
object
.
webhooks
?.
map
((
e
)
=>
UserWebhook
.
fromPartial
(
e
))
||
[];
return
message
;
},
};
function
createBaseUserSetting_WebhooksSetting_Webhook
():
UserSetting_WebhooksSetting_Webhook
{
return
{
id
:
""
,
title
:
""
,
url
:
""
};
}
export
const
UserSetting_WebhooksSetting_Webhook
:
MessageFns
<
UserSetting_WebhooksSetting_Webhook
>
=
{
encode
(
message
:
UserSetting_WebhooksSetting_Webhook
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
id
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
id
);
}
if
(
message
.
title
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
title
);
}
if
(
message
.
url
!==
""
)
{
writer
.
uint32
(
26
).
string
(
message
.
url
);
}
return
writer
;
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
UserSetting_WebhooksSetting_Webhook
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseUserSetting_WebhooksSetting_Webhook
();
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
case
1
:
{
if
(
tag
!==
10
)
{
break
;
}
message
.
id
=
reader
.
string
();
continue
;
}
case
2
:
{
if
(
tag
!==
18
)
{
break
;
}
message
.
title
=
reader
.
string
();
continue
;
}
case
3
:
{
if
(
tag
!==
26
)
{
break
;
}
message
.
url
=
reader
.
string
();
continue
;
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
}
reader
.
skip
(
tag
&
7
);
}
return
message
;
},
create
(
base
?:
DeepPartial
<
UserSetting_WebhooksSetting_Webhook
>
):
UserSetting_WebhooksSetting_Webhook
{
return
UserSetting_WebhooksSetting_Webhook
.
fromPartial
(
base
??
{});
},
fromPartial
(
object
:
DeepPartial
<
UserSetting_WebhooksSetting_Webhook
>
):
UserSetting_WebhooksSetting_Webhook
{
const
message
=
createBaseUserSetting_WebhooksSetting_Webhook
();
message
.
id
=
object
.
id
??
""
;
message
.
title
=
object
.
title
??
""
;
message
.
url
=
object
.
url
??
""
;
return
message
;
return
message
;
},
},
};
};
...
...
web/src/types/proto/google/protobuf/descriptor.ts
View file @
8f51791d
...
@@ -35,7 +35,7 @@ export enum Edition {
...
@@ -35,7 +35,7 @@ export enum Edition {
EDITION_2024
=
"EDITION_2024"
,
EDITION_2024
=
"EDITION_2024"
,
/**
/**
* EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be
* EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be
* used or rel
y
ed on outside of tests.
* used or rel
i
ed on outside of tests.
*/
*/
EDITION_1_TEST_ONLY
=
"EDITION_1_TEST_ONLY"
,
EDITION_1_TEST_ONLY
=
"EDITION_1_TEST_ONLY"
,
EDITION_2_TEST_ONLY
=
"EDITION_2_TEST_ONLY"
,
EDITION_2_TEST_ONLY
=
"EDITION_2_TEST_ONLY"
,
...
@@ -177,11 +177,19 @@ export interface FileDescriptorProto {
...
@@ -177,11 +177,19 @@ export interface FileDescriptorProto {
* The supported values are "proto2", "proto3", and "editions".
* The supported values are "proto2", "proto3", and "editions".
*
*
* If `edition` is present, this value must be "editions".
* If `edition` is present, this value must be "editions".
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
*/
syntax
?:
syntax
?:
|
string
|
string
|
undefined
;
|
undefined
;
/** The edition of the proto file. */
/**
* The edition of the proto file.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
edition
?:
Edition
|
undefined
;
edition
?:
Edition
|
undefined
;
}
}
...
@@ -828,7 +836,12 @@ export interface FileOptions {
...
@@ -828,7 +836,12 @@ export interface FileOptions {
rubyPackage
?:
rubyPackage
?:
|
string
|
string
|
undefined
;
|
undefined
;
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
features
?:
|
FeatureSet
|
FeatureSet
|
undefined
;
|
undefined
;
...
@@ -966,7 +979,12 @@ export interface MessageOptions {
...
@@ -966,7 +979,12 @@ export interface MessageOptions {
deprecatedLegacyJsonFieldConflicts
?:
deprecatedLegacyJsonFieldConflicts
?:
|
boolean
|
boolean
|
undefined
;
|
undefined
;
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
features
?:
|
FeatureSet
|
FeatureSet
|
undefined
;
|
undefined
;
...
@@ -976,12 +994,13 @@ export interface MessageOptions {
...
@@ -976,12 +994,13 @@ export interface MessageOptions {
export
interface
FieldOptions
{
export
interface
FieldOptions
{
/**
/**
* NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
* The ctype option instructs the C++ code generator to use a different
* The ctype option instructs the C++ code generator to use a different
* representation of the field than it normally would. See the specific
* representation of the field than it normally would. See the specific
* options below. This option is only implemented to support use of
* options below. This option is only implemented to support use of
* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
* [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
* type "bytes" in the open source release
-- sorry, we'll try to include
* type "bytes" in the open source release
.
*
other types in a future version!
*
TODO: make ctype actually deprecated.
*/
*/
ctype
?:
ctype
?:
|
FieldOptions_CType
|
FieldOptions_CType
...
@@ -1070,7 +1089,12 @@ export interface FieldOptions {
...
@@ -1070,7 +1089,12 @@ export interface FieldOptions {
retention
?:
FieldOptions_OptionRetention
|
undefined
;
retention
?:
FieldOptions_OptionRetention
|
undefined
;
targets
:
FieldOptions_OptionTargetType
[];
targets
:
FieldOptions_OptionTargetType
[];
editionDefaults
:
FieldOptions_EditionDefault
[];
editionDefaults
:
FieldOptions_EditionDefault
[];
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
FeatureSet
|
undefined
;
features
?:
FeatureSet
|
undefined
;
featureSupport
?:
featureSupport
?:
|
FieldOptions_FeatureSupport
|
FieldOptions_FeatureSupport
...
@@ -1169,11 +1193,7 @@ export function fieldOptions_JSTypeToNumber(object: FieldOptions_JSType): number
...
@@ -1169,11 +1193,7 @@ export function fieldOptions_JSTypeToNumber(object: FieldOptions_JSType): number
}
}
}
}
/**
/** If set to RETENTION_SOURCE, the option will be omitted from the binary. */
* If set to RETENTION_SOURCE, the option will be omitted from the binary.
* Note: as of January 2023, support for this is in progress and does not yet
* have an effect (b/264593489).
*/
export
enum
FieldOptions_OptionRetention
{
export
enum
FieldOptions_OptionRetention
{
RETENTION_UNKNOWN
=
"RETENTION_UNKNOWN"
,
RETENTION_UNKNOWN
=
"RETENTION_UNKNOWN"
,
RETENTION_RUNTIME
=
"RETENTION_RUNTIME"
,
RETENTION_RUNTIME
=
"RETENTION_RUNTIME"
,
...
@@ -1216,8 +1236,7 @@ export function fieldOptions_OptionRetentionToNumber(object: FieldOptions_Option
...
@@ -1216,8 +1236,7 @@ export function fieldOptions_OptionRetentionToNumber(object: FieldOptions_Option
/**
/**
* This indicates the types of entities that the field may apply to when used
* This indicates the types of entities that the field may apply to when used
* as an option. If it is unset, then the field may be freely used as an
* as an option. If it is unset, then the field may be freely used as an
* option on any kind of entity. Note: as of January 2023, support for this is
* option on any kind of entity.
* in progress and does not yet have an effect (b/264593489).
*/
*/
export
enum
FieldOptions_OptionTargetType
{
export
enum
FieldOptions_OptionTargetType
{
TARGET_TYPE_UNKNOWN
=
"TARGET_TYPE_UNKNOWN"
,
TARGET_TYPE_UNKNOWN
=
"TARGET_TYPE_UNKNOWN"
,
...
@@ -1341,7 +1360,12 @@ export interface FieldOptions_FeatureSupport {
...
@@ -1341,7 +1360,12 @@ export interface FieldOptions_FeatureSupport {
}
}
export
interface
OneofOptions
{
export
interface
OneofOptions
{
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
features
?:
|
FeatureSet
|
FeatureSet
|
undefined
;
|
undefined
;
...
@@ -1379,7 +1403,12 @@ export interface EnumOptions {
...
@@ -1379,7 +1403,12 @@ export interface EnumOptions {
deprecatedLegacyJsonFieldConflicts
?:
deprecatedLegacyJsonFieldConflicts
?:
|
boolean
|
boolean
|
undefined
;
|
undefined
;
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
features
?:
|
FeatureSet
|
FeatureSet
|
undefined
;
|
undefined
;
...
@@ -1397,7 +1426,12 @@ export interface EnumValueOptions {
...
@@ -1397,7 +1426,12 @@ export interface EnumValueOptions {
deprecated
?:
deprecated
?:
|
boolean
|
boolean
|
undefined
;
|
undefined
;
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
features
?:
|
FeatureSet
|
FeatureSet
|
undefined
;
|
undefined
;
...
@@ -1418,7 +1452,12 @@ export interface EnumValueOptions {
...
@@ -1418,7 +1452,12 @@ export interface EnumValueOptions {
}
}
export
interface
ServiceOptions
{
export
interface
ServiceOptions
{
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
features
?:
|
FeatureSet
|
FeatureSet
|
undefined
;
|
undefined
;
...
@@ -1446,7 +1485,12 @@ export interface MethodOptions {
...
@@ -1446,7 +1485,12 @@ export interface MethodOptions {
idempotencyLevel
?:
idempotencyLevel
?:
|
MethodOptions_IdempotencyLevel
|
MethodOptions_IdempotencyLevel
|
undefined
;
|
undefined
;
/** Any features defined in the specific edition. */
/**
* Any features defined in the specific edition.
* WARNING: This field should only be used by protobuf plugins or special
* cases like the proto compiler. Other uses are discouraged and
* developers should rely on the protoreflect APIs for their client language.
*/
features
?:
features
?:
|
FeatureSet
|
FeatureSet
|
undefined
;
|
undefined
;
...
@@ -1549,6 +1593,7 @@ export interface FeatureSet {
...
@@ -1549,6 +1593,7 @@ export interface FeatureSet {
utf8Validation
?:
FeatureSet_Utf8Validation
|
undefined
;
utf8Validation
?:
FeatureSet_Utf8Validation
|
undefined
;
messageEncoding
?:
FeatureSet_MessageEncoding
|
undefined
;
messageEncoding
?:
FeatureSet_MessageEncoding
|
undefined
;
jsonFormat
?:
FeatureSet_JsonFormat
|
undefined
;
jsonFormat
?:
FeatureSet_JsonFormat
|
undefined
;
enforceNamingStyle
?:
FeatureSet_EnforceNamingStyle
|
undefined
;
}
}
export
enum
FeatureSet_FieldPresence
{
export
enum
FeatureSet_FieldPresence
{
...
@@ -1791,6 +1836,45 @@ export function featureSet_JsonFormatToNumber(object: FeatureSet_JsonFormat): nu
...
@@ -1791,6 +1836,45 @@ export function featureSet_JsonFormatToNumber(object: FeatureSet_JsonFormat): nu
}
}
}
}
export
enum
FeatureSet_EnforceNamingStyle
{
ENFORCE_NAMING_STYLE_UNKNOWN
=
"ENFORCE_NAMING_STYLE_UNKNOWN"
,
STYLE2024
=
"STYLE2024"
,
STYLE_LEGACY
=
"STYLE_LEGACY"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
}
export
function
featureSet_EnforceNamingStyleFromJSON
(
object
:
any
):
FeatureSet_EnforceNamingStyle
{
switch
(
object
)
{
case
0
:
case
"ENFORCE_NAMING_STYLE_UNKNOWN"
:
return
FeatureSet_EnforceNamingStyle
.
ENFORCE_NAMING_STYLE_UNKNOWN
;
case
1
:
case
"STYLE2024"
:
return
FeatureSet_EnforceNamingStyle
.
STYLE2024
;
case
2
:
case
"STYLE_LEGACY"
:
return
FeatureSet_EnforceNamingStyle
.
STYLE_LEGACY
;
case
-
1
:
case
"UNRECOGNIZED"
:
default
:
return
FeatureSet_EnforceNamingStyle
.
UNRECOGNIZED
;
}
}
export
function
featureSet_EnforceNamingStyleToNumber
(
object
:
FeatureSet_EnforceNamingStyle
):
number
{
switch
(
object
)
{
case
FeatureSet_EnforceNamingStyle
.
ENFORCE_NAMING_STYLE_UNKNOWN
:
return
0
;
case
FeatureSet_EnforceNamingStyle
.
STYLE2024
:
return
1
;
case
FeatureSet_EnforceNamingStyle
.
STYLE_LEGACY
:
return
2
;
case
FeatureSet_EnforceNamingStyle
.
UNRECOGNIZED
:
default
:
return
-
1
;
}
}
/**
/**
* A compiled specification for the defaults of a set of features. These
* A compiled specification for the defaults of a set of features. These
* messages are generated from FeatureSet extensions and can be used to seed
* messages are generated from FeatureSet extensions and can be used to seed
...
@@ -4914,6 +4998,7 @@ function createBaseFeatureSet(): FeatureSet {
...
@@ -4914,6 +4998,7 @@ function createBaseFeatureSet(): FeatureSet {
utf8Validation
:
FeatureSet_Utf8Validation
.
UTF8_VALIDATION_UNKNOWN
,
utf8Validation
:
FeatureSet_Utf8Validation
.
UTF8_VALIDATION_UNKNOWN
,
messageEncoding
:
FeatureSet_MessageEncoding
.
MESSAGE_ENCODING_UNKNOWN
,
messageEncoding
:
FeatureSet_MessageEncoding
.
MESSAGE_ENCODING_UNKNOWN
,
jsonFormat
:
FeatureSet_JsonFormat
.
JSON_FORMAT_UNKNOWN
,
jsonFormat
:
FeatureSet_JsonFormat
.
JSON_FORMAT_UNKNOWN
,
enforceNamingStyle
:
FeatureSet_EnforceNamingStyle
.
ENFORCE_NAMING_STYLE_UNKNOWN
,
};
};
}
}
...
@@ -4948,6 +5033,12 @@ export const FeatureSet: MessageFns<FeatureSet> = {
...
@@ -4948,6 +5033,12 @@ export const FeatureSet: MessageFns<FeatureSet> = {
if
(
message
.
jsonFormat
!==
undefined
&&
message
.
jsonFormat
!==
FeatureSet_JsonFormat
.
JSON_FORMAT_UNKNOWN
)
{
if
(
message
.
jsonFormat
!==
undefined
&&
message
.
jsonFormat
!==
FeatureSet_JsonFormat
.
JSON_FORMAT_UNKNOWN
)
{
writer
.
uint32
(
48
).
int32
(
featureSet_JsonFormatToNumber
(
message
.
jsonFormat
));
writer
.
uint32
(
48
).
int32
(
featureSet_JsonFormatToNumber
(
message
.
jsonFormat
));
}
}
if
(
message
.
enforceNamingStyle
!==
undefined
&&
message
.
enforceNamingStyle
!==
FeatureSet_EnforceNamingStyle
.
ENFORCE_NAMING_STYLE_UNKNOWN
)
{
writer
.
uint32
(
56
).
int32
(
featureSet_EnforceNamingStyleToNumber
(
message
.
enforceNamingStyle
));
}
return
writer
;
return
writer
;
},
},
...
@@ -5006,6 +5097,14 @@ export const FeatureSet: MessageFns<FeatureSet> = {
...
@@ -5006,6 +5097,14 @@ export const FeatureSet: MessageFns<FeatureSet> = {
message
.
jsonFormat
=
featureSet_JsonFormatFromJSON
(
reader
.
int32
());
message
.
jsonFormat
=
featureSet_JsonFormatFromJSON
(
reader
.
int32
());
continue
;
continue
;
}
}
case
7
:
{
if
(
tag
!==
56
)
{
break
;
}
message
.
enforceNamingStyle
=
featureSet_EnforceNamingStyleFromJSON
(
reader
.
int32
());
continue
;
}
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
break
;
...
@@ -5027,6 +5126,8 @@ export const FeatureSet: MessageFns<FeatureSet> = {
...
@@ -5027,6 +5126,8 @@ export const FeatureSet: MessageFns<FeatureSet> = {
message
.
utf8Validation
=
object
.
utf8Validation
??
FeatureSet_Utf8Validation
.
UTF8_VALIDATION_UNKNOWN
;
message
.
utf8Validation
=
object
.
utf8Validation
??
FeatureSet_Utf8Validation
.
UTF8_VALIDATION_UNKNOWN
;
message
.
messageEncoding
=
object
.
messageEncoding
??
FeatureSet_MessageEncoding
.
MESSAGE_ENCODING_UNKNOWN
;
message
.
messageEncoding
=
object
.
messageEncoding
??
FeatureSet_MessageEncoding
.
MESSAGE_ENCODING_UNKNOWN
;
message
.
jsonFormat
=
object
.
jsonFormat
??
FeatureSet_JsonFormat
.
JSON_FORMAT_UNKNOWN
;
message
.
jsonFormat
=
object
.
jsonFormat
??
FeatureSet_JsonFormat
.
JSON_FORMAT_UNKNOWN
;
message
.
enforceNamingStyle
=
object
.
enforceNamingStyle
??
FeatureSet_EnforceNamingStyle
.
ENFORCE_NAMING_STYLE_UNKNOWN
;
return
message
;
return
message
;
},
},
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment