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
3f56ce47
Commit
3f56ce47
authored
Jul 27, 2025
by
johnnyjoy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update definition of workspace setting
parent
53d39785
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
792 additions
and
702 deletions
+792
-702
workspace_service.proto
proto/api/v1/workspace_service.proto
+96
-90
workspace_service.pb.go
proto/gen/api/v1/workspace_service.pb.go
+312
-310
openapi.yaml
proto/gen/openapi.yaml
+138
-78
workspace_service.go
server/router/api/v1/workspace_service.go
+15
-15
MemoRelatedSettings.tsx
web/src/components/Settings/MemoRelatedSettings.tsx
+5
-5
StorageSection.tsx
web/src/components/Settings/StorageSection.tsx
+26
-22
WorkspaceSection.tsx
web/src/components/Settings/WorkspaceSection.tsx
+5
-5
UpdateCustomizedProfileDialog.tsx
web/src/components/UpdateCustomizedProfileDialog.tsx
+4
-4
workspace.ts
web/src/store/workspace.ts
+7
-3
workspace_service.ts
web/src/types/proto/api/v1/workspace_service.ts
+184
-170
No files found.
proto/api/v1/workspace_service.proto
View file @
3f56ce47
...
@@ -65,108 +65,114 @@ message WorkspaceSetting {
...
@@ -65,108 +65,114 @@ message WorkspaceSetting {
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
oneof
value
{
oneof
value
{
Workspace
GeneralSetting
general_setting
=
2
;
GeneralSetting
general_setting
=
2
;
Workspace
StorageSetting
storage_setting
=
3
;
StorageSetting
storage_setting
=
3
;
Workspace
MemoRelatedSetting
memo_related_setting
=
4
;
MemoRelatedSetting
memo_related_setting
=
4
;
}
}
// Enumeration of workspace setting keys.
enum
Key
{
enum
Key
{
KEY_UNSPECIFIED
=
0
;
KEY_UNSPECIFIED
=
0
;
// BASIC is the key for basic settings.
BASIC
=
1
;
// GENERAL is the key for general settings.
// GENERAL is the key for general settings.
GENERAL
=
2
;
GENERAL
=
1
;
// STORAGE is the key for storage settings.
// STORAGE is the key for storage settings.
STORAGE
=
3
;
STORAGE
=
2
;
// MEMO_RELATED is the key for memo related settings.
// MEMO_RELATED is the key for memo related settings.
MEMO_RELATED
=
4
;
MEMO_RELATED
=
3
;
}
}
}
message
WorkspaceGeneralSetting
{
// theme is the name of the selected theme.
// This references a CSS file in the web/public/themes/ directory.
string
theme
=
1
;
// disallow_user_registration disallows user registration.
bool
disallow_user_registration
=
2
;
// disallow_password_auth disallows password authentication.
bool
disallow_password_auth
=
3
;
// additional_script is the additional script.
string
additional_script
=
4
;
// additional_style is the additional style.
string
additional_style
=
5
;
// custom_profile is the custom profile.
WorkspaceCustomProfile
custom_profile
=
6
;
// week_start_day_offset is the week start day offset from Sunday.
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// Default is Sunday.
int32
week_start_day_offset
=
7
;
// disallow_change_username disallows changing username.
bool
disallow_change_username
=
8
;
// disallow_change_nickname disallows changing nickname.
bool
disallow_change_nickname
=
9
;
}
message
WorkspaceCustomProfile
{
string
title
=
1
;
string
description
=
2
;
string
logo_url
=
3
;
string
locale
=
4
;
string
appearance
=
5
;
}
message
WorkspaceStorageSetting
{
// General workspace settings configuration.
enum
StorageType
{
message
GeneralSetting
{
STORAGE_TYPE_UNSPECIFIED
=
0
;
// theme is the name of the selected theme.
// DATABASE is the database storage type.
// This references a CSS file in the web/public/themes/ directory.
DATABASE
=
1
;
string
theme
=
1
;
// LOCAL is the local storage type.
// disallow_user_registration disallows user registration.
LOCAL
=
2
;
bool
disallow_user_registration
=
2
;
// S3 is the S3 storage type.
// disallow_password_auth disallows password authentication.
S3
=
3
;
bool
disallow_password_auth
=
3
;
// additional_script is the additional script.
string
additional_script
=
4
;
// additional_style is the additional style.
string
additional_style
=
5
;
// custom_profile is the custom profile.
CustomProfile
custom_profile
=
6
;
// week_start_day_offset is the week start day offset from Sunday.
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// Default is Sunday.
int32
week_start_day_offset
=
7
;
// disallow_change_username disallows changing username.
bool
disallow_change_username
=
8
;
// disallow_change_nickname disallows changing nickname.
bool
disallow_change_nickname
=
9
;
// Custom profile configuration for workspace branding.
message
CustomProfile
{
string
title
=
1
;
string
description
=
2
;
string
logo_url
=
3
;
string
locale
=
4
;
string
appearance
=
5
;
}
}
}
// storage_type is the storage type.
StorageType
storage_type
=
1
;
// Storage configuration settings for workspace attachments.
// The template of file path.
message
StorageSetting
{
// e.g. assets/{timestamp}_{filename}
// Storage type enumeration for different storage backends.
string
filepath_template
=
2
;
enum
StorageType
{
// The max upload size in megabytes.
STORAGE_TYPE_UNSPECIFIED
=
0
;
int64
upload_size_limit_mb
=
3
;
// DATABASE is the database storage type.
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
DATABASE
=
1
;
message
S3Config
{
// LOCAL is the local storage type.
string
access_key_id
=
1
;
LOCAL
=
2
;
string
access_key_secret
=
2
;
// S3 is the S3 storage type.
string
endpoint
=
3
;
S3
=
3
;
string
region
=
4
;
}
string
bucket
=
5
;
// storage_type is the storage type.
bool
use_path_style
=
6
;
StorageType
storage_type
=
1
;
// The template of file path.
// e.g. assets/{timestamp}_{filename}
string
filepath_template
=
2
;
// The max upload size in megabytes.
int64
upload_size_limit_mb
=
3
;
// S3 configuration for cloud storage backend.
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
message
S3Config
{
string
access_key_id
=
1
;
string
access_key_secret
=
2
;
string
endpoint
=
3
;
string
region
=
4
;
string
bucket
=
5
;
bool
use_path_style
=
6
;
}
// The S3 config.
S3Config
s3_config
=
4
;
}
}
// The S3 config.
S3Config
s3_config
=
4
;
}
message
WorkspaceMemoRelatedSetting
{
// Memo-related workspace settings and policies.
// disallow_public_visibility disallows set memo as public visibility.
message
MemoRelatedSetting
{
bool
disallow_public_visibility
=
1
;
// disallow_public_visibility disallows set memo as public visibility.
// display_with_update_time orders and displays memo with update time.
bool
disallow_public_visibility
=
1
;
bool
display_with_update_time
=
2
;
// display_with_update_time orders and displays memo with update time.
// content_length_limit is the limit of content length. Unit is byte.
bool
display_with_update_time
=
2
;
int32
content_length_limit
=
3
;
// content_length_limit is the limit of content length. Unit is byte.
// enable_double_click_edit enables editing on double click.
int32
content_length_limit
=
3
;
bool
enable_double_click_edit
=
4
;
// enable_double_click_edit enables editing on double click.
// enable_link_preview enables links preview.
bool
enable_double_click_edit
=
4
;
bool
enable_link_preview
=
5
;
// enable_link_preview enables links preview.
// enable_comment enables comment.
bool
enable_link_preview
=
5
;
bool
enable_comment
=
6
;
// enable_comment enables comment.
// reactions is the list of reactions.
bool
enable_comment
=
6
;
repeated
string
reactions
=
7
;
// reactions is the list of reactions.
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
repeated
string
reactions
=
7
;
bool
disable_markdown_shortcuts
=
8
;
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
bool
disable_markdown_shortcuts
=
8
;
bool
enable_blur_nsfw_content
=
9
;
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
// nsfw_tags is the list of tags that mark content as NSFW for blurring.
bool
enable_blur_nsfw_content
=
9
;
repeated
string
nsfw_tags
=
10
;
// nsfw_tags is the list of tags that mark content as NSFW for blurring.
repeated
string
nsfw_tags
=
10
;
}
}
}
// Request message for GetWorkspaceSetting method.
// Request message for GetWorkspaceSetting method.
...
...
proto/gen/api/v1/workspace_service.pb.go
View file @
3f56ce47
...
@@ -23,35 +23,32 @@ const (
...
@@ -23,35 +23,32 @@ const (
_
=
protoimpl
.
EnforceVersion
(
protoimpl
.
MaxVersion
-
20
)
_
=
protoimpl
.
EnforceVersion
(
protoimpl
.
MaxVersion
-
20
)
)
)
// Enumeration of workspace setting keys.
type
WorkspaceSetting_Key
int32
type
WorkspaceSetting_Key
int32
const
(
const
(
WorkspaceSetting_KEY_UNSPECIFIED
WorkspaceSetting_Key
=
0
WorkspaceSetting_KEY_UNSPECIFIED
WorkspaceSetting_Key
=
0
// BASIC is the key for basic settings.
WorkspaceSetting_BASIC
WorkspaceSetting_Key
=
1
// GENERAL is the key for general settings.
// GENERAL is the key for general settings.
WorkspaceSetting_GENERAL
WorkspaceSetting_Key
=
2
WorkspaceSetting_GENERAL
WorkspaceSetting_Key
=
1
// STORAGE is the key for storage settings.
// STORAGE is the key for storage settings.
WorkspaceSetting_STORAGE
WorkspaceSetting_Key
=
3
WorkspaceSetting_STORAGE
WorkspaceSetting_Key
=
2
// MEMO_RELATED is the key for memo related settings.
// MEMO_RELATED is the key for memo related settings.
WorkspaceSetting_MEMO_RELATED
WorkspaceSetting_Key
=
4
WorkspaceSetting_MEMO_RELATED
WorkspaceSetting_Key
=
3
)
)
// Enum value maps for WorkspaceSetting_Key.
// Enum value maps for WorkspaceSetting_Key.
var
(
var
(
WorkspaceSetting_Key_name
=
map
[
int32
]
string
{
WorkspaceSetting_Key_name
=
map
[
int32
]
string
{
0
:
"KEY_UNSPECIFIED"
,
0
:
"KEY_UNSPECIFIED"
,
1
:
"BASIC"
,
1
:
"GENERAL"
,
2
:
"GENERAL"
,
2
:
"STORAGE"
,
3
:
"STORAGE"
,
3
:
"MEMO_RELATED"
,
4
:
"MEMO_RELATED"
,
}
}
WorkspaceSetting_Key_value
=
map
[
string
]
int32
{
WorkspaceSetting_Key_value
=
map
[
string
]
int32
{
"KEY_UNSPECIFIED"
:
0
,
"KEY_UNSPECIFIED"
:
0
,
"BASIC"
:
1
,
"GENERAL"
:
1
,
"GENERAL"
:
2
,
"STORAGE"
:
2
,
"STORAGE"
:
3
,
"MEMO_RELATED"
:
3
,
"MEMO_RELATED"
:
4
,
}
}
)
)
...
@@ -82,27 +79,28 @@ func (WorkspaceSetting_Key) EnumDescriptor() ([]byte, []int) {
...
@@ -82,27 +79,28 @@ func (WorkspaceSetting_Key) EnumDescriptor() ([]byte, []int) {
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
0
}
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
0
}
}
}
type
WorkspaceStorageSetting_StorageType
int32
// Storage type enumeration for different storage backends.
type
WorkspaceSetting_StorageSetting_StorageType
int32
const
(
const
(
WorkspaceS
torageSetting_STORAGE_TYPE_UNSPECIFIED
Workspace
StorageSetting_StorageType
=
0
WorkspaceS
etting_StorageSetting_STORAGE_TYPE_UNSPECIFIED
WorkspaceSetting_
StorageSetting_StorageType
=
0
// DATABASE is the database storage type.
// DATABASE is the database storage type.
WorkspaceS
torageSetting_DATABASE
Workspace
StorageSetting_StorageType
=
1
WorkspaceS
etting_StorageSetting_DATABASE
WorkspaceSetting_
StorageSetting_StorageType
=
1
// LOCAL is the local storage type.
// LOCAL is the local storage type.
WorkspaceS
torageSetting_LOCAL
Workspace
StorageSetting_StorageType
=
2
WorkspaceS
etting_StorageSetting_LOCAL
WorkspaceSetting_
StorageSetting_StorageType
=
2
// S3 is the S3 storage type.
// S3 is the S3 storage type.
WorkspaceS
torageSetting_S3
Workspace
StorageSetting_StorageType
=
3
WorkspaceS
etting_StorageSetting_S3
WorkspaceSetting_
StorageSetting_StorageType
=
3
)
)
// Enum value maps for WorkspaceStorageSetting_StorageType.
// Enum value maps for WorkspaceS
etting_S
torageSetting_StorageType.
var
(
var
(
WorkspaceStorageSetting_StorageType_name
=
map
[
int32
]
string
{
WorkspaceS
etting_S
torageSetting_StorageType_name
=
map
[
int32
]
string
{
0
:
"STORAGE_TYPE_UNSPECIFIED"
,
0
:
"STORAGE_TYPE_UNSPECIFIED"
,
1
:
"DATABASE"
,
1
:
"DATABASE"
,
2
:
"LOCAL"
,
2
:
"LOCAL"
,
3
:
"S3"
,
3
:
"S3"
,
}
}
WorkspaceStorageSetting_StorageType_value
=
map
[
string
]
int32
{
WorkspaceS
etting_S
torageSetting_StorageType_value
=
map
[
string
]
int32
{
"STORAGE_TYPE_UNSPECIFIED"
:
0
,
"STORAGE_TYPE_UNSPECIFIED"
:
0
,
"DATABASE"
:
1
,
"DATABASE"
:
1
,
"LOCAL"
:
2
,
"LOCAL"
:
2
,
...
@@ -110,31 +108,31 @@ var (
...
@@ -110,31 +108,31 @@ var (
}
}
)
)
func
(
x
WorkspaceS
torageSetting_StorageType
)
Enum
()
*
Workspace
StorageSetting_StorageType
{
func
(
x
WorkspaceS
etting_StorageSetting_StorageType
)
Enum
()
*
WorkspaceSetting_
StorageSetting_StorageType
{
p
:=
new
(
WorkspaceStorageSetting_StorageType
)
p
:=
new
(
WorkspaceS
etting_S
torageSetting_StorageType
)
*
p
=
x
*
p
=
x
return
p
return
p
}
}
func
(
x
WorkspaceStorageSetting_StorageType
)
String
()
string
{
func
(
x
WorkspaceS
etting_S
torageSetting_StorageType
)
String
()
string
{
return
protoimpl
.
X
.
EnumStringOf
(
x
.
Descriptor
(),
protoreflect
.
EnumNumber
(
x
))
return
protoimpl
.
X
.
EnumStringOf
(
x
.
Descriptor
(),
protoreflect
.
EnumNumber
(
x
))
}
}
func
(
WorkspaceStorageSetting_StorageType
)
Descriptor
()
protoreflect
.
EnumDescriptor
{
func
(
WorkspaceS
etting_S
torageSetting_StorageType
)
Descriptor
()
protoreflect
.
EnumDescriptor
{
return
file_api_v1_workspace_service_proto_enumTypes
[
1
]
.
Descriptor
()
return
file_api_v1_workspace_service_proto_enumTypes
[
1
]
.
Descriptor
()
}
}
func
(
WorkspaceStorageSetting_StorageType
)
Type
()
protoreflect
.
EnumType
{
func
(
WorkspaceS
etting_S
torageSetting_StorageType
)
Type
()
protoreflect
.
EnumType
{
return
&
file_api_v1_workspace_service_proto_enumTypes
[
1
]
return
&
file_api_v1_workspace_service_proto_enumTypes
[
1
]
}
}
func
(
x
WorkspaceStorageSetting_StorageType
)
Number
()
protoreflect
.
EnumNumber
{
func
(
x
WorkspaceS
etting_S
torageSetting_StorageType
)
Number
()
protoreflect
.
EnumNumber
{
return
protoreflect
.
EnumNumber
(
x
)
return
protoreflect
.
EnumNumber
(
x
)
}
}
// Deprecated: Use WorkspaceStorageSetting_StorageType.Descriptor instead.
// Deprecated: Use WorkspaceS
etting_S
torageSetting_StorageType.Descriptor instead.
func
(
WorkspaceStorageSetting_StorageType
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
func
(
WorkspaceS
etting_S
torageSetting_StorageType
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
5
,
0
}
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
1
,
0
}
}
}
// Workspace profile message containing basic workspace information.
// Workspace profile message containing basic workspace information.
...
@@ -256,9 +254,9 @@ type WorkspaceSetting struct {
...
@@ -256,9 +254,9 @@ type WorkspaceSetting struct {
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:
//
//
// *WorkspaceSetting_GeneralSetting
// *WorkspaceSetting_GeneralSetting
_
// *WorkspaceSetting_StorageSetting
// *WorkspaceSetting_StorageSetting
_
// *WorkspaceSetting_MemoRelatedSetting
// *WorkspaceSetting_MemoRelatedSetting
_
Value
isWorkspaceSetting_Value
`protobuf_oneof:"value"`
Value
isWorkspaceSetting_Value
`protobuf_oneof:"value"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -308,27 +306,27 @@ func (x *WorkspaceSetting) GetValue() isWorkspaceSetting_Value {
...
@@ -308,27 +306,27 @@ func (x *WorkspaceSetting) GetValue() isWorkspaceSetting_Value {
return
nil
return
nil
}
}
func
(
x
*
WorkspaceSetting
)
GetGeneralSetting
()
*
WorkspaceGeneralSetting
{
func
(
x
*
WorkspaceSetting
)
GetGeneralSetting
()
*
Workspace
Setting_
GeneralSetting
{
if
x
!=
nil
{
if
x
!=
nil
{
if
x
,
ok
:=
x
.
Value
.
(
*
WorkspaceSetting_GeneralSetting
);
ok
{
if
x
,
ok
:=
x
.
Value
.
(
*
WorkspaceSetting_GeneralSetting
_
);
ok
{
return
x
.
GeneralSetting
return
x
.
GeneralSetting
}
}
}
}
return
nil
return
nil
}
}
func
(
x
*
WorkspaceSetting
)
GetStorageSetting
()
*
WorkspaceStorageSetting
{
func
(
x
*
WorkspaceSetting
)
GetStorageSetting
()
*
WorkspaceS
etting_S
torageSetting
{
if
x
!=
nil
{
if
x
!=
nil
{
if
x
,
ok
:=
x
.
Value
.
(
*
WorkspaceSetting_StorageSetting
);
ok
{
if
x
,
ok
:=
x
.
Value
.
(
*
WorkspaceSetting_StorageSetting
_
);
ok
{
return
x
.
StorageSetting
return
x
.
StorageSetting
}
}
}
}
return
nil
return
nil
}
}
func
(
x
*
WorkspaceSetting
)
GetMemoRelatedSetting
()
*
WorkspaceMemoRelatedSetting
{
func
(
x
*
WorkspaceSetting
)
GetMemoRelatedSetting
()
*
Workspace
Setting_
MemoRelatedSetting
{
if
x
!=
nil
{
if
x
!=
nil
{
if
x
,
ok
:=
x
.
Value
.
(
*
WorkspaceSetting_MemoRelatedSetting
);
ok
{
if
x
,
ok
:=
x
.
Value
.
(
*
WorkspaceSetting_MemoRelatedSetting
_
);
ok
{
return
x
.
MemoRelatedSetting
return
x
.
MemoRelatedSetting
}
}
}
}
...
@@ -339,25 +337,128 @@ type isWorkspaceSetting_Value interface {
...
@@ -339,25 +337,128 @@ type isWorkspaceSetting_Value interface {
isWorkspaceSetting_Value
()
isWorkspaceSetting_Value
()
}
}
type
WorkspaceSetting_GeneralSetting
struct
{
type
WorkspaceSetting_GeneralSetting
_
struct
{
GeneralSetting
*
WorkspaceGeneralSetting
`protobuf:"bytes,2,opt,name=general_setting,json=generalSetting,proto3,oneof"`
GeneralSetting
*
Workspace
Setting_
GeneralSetting
`protobuf:"bytes,2,opt,name=general_setting,json=generalSetting,proto3,oneof"`
}
}
type
WorkspaceSetting_StorageSetting
struct
{
type
WorkspaceSetting_StorageSetting
_
struct
{
StorageSetting
*
WorkspaceStorageSetting
`protobuf:"bytes,3,opt,name=storage_setting,json=storageSetting,proto3,oneof"`
StorageSetting
*
WorkspaceS
etting_S
torageSetting
`protobuf:"bytes,3,opt,name=storage_setting,json=storageSetting,proto3,oneof"`
}
}
type
WorkspaceSetting_MemoRelatedSetting
struct
{
type
WorkspaceSetting_MemoRelatedSetting
_
struct
{
MemoRelatedSetting
*
WorkspaceMemoRelatedSetting
`protobuf:"bytes,4,opt,name=memo_related_setting,json=memoRelatedSetting,proto3,oneof"`
MemoRelatedSetting
*
Workspace
Setting_
MemoRelatedSetting
`protobuf:"bytes,4,opt,name=memo_related_setting,json=memoRelatedSetting,proto3,oneof"`
}
}
func
(
*
WorkspaceSetting_GeneralSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_GeneralSetting
_
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_StorageSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_StorageSetting
_
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_MemoRelatedSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_MemoRelatedSetting
_
)
isWorkspaceSetting_Value
()
{}
type
WorkspaceGeneralSetting
struct
{
// Request message for GetWorkspaceSetting method.
type
GetWorkspaceSettingRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The resource name of the workspace setting.
// Format: workspace/settings/{setting}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
GetWorkspaceSettingRequest
)
Reset
()
{
*
x
=
GetWorkspaceSettingRequest
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
3
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
GetWorkspaceSettingRequest
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
GetWorkspaceSettingRequest
)
ProtoMessage
()
{}
func
(
x
*
GetWorkspaceSettingRequest
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
3
]
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 GetWorkspaceSettingRequest.ProtoReflect.Descriptor instead.
func
(
*
GetWorkspaceSettingRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
3
}
}
func
(
x
*
GetWorkspaceSettingRequest
)
GetName
()
string
{
if
x
!=
nil
{
return
x
.
Name
}
return
""
}
// Request message for UpdateWorkspaceSetting method.
type
UpdateWorkspaceSettingRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The workspace setting resource which replaces the resource on the server.
Setting
*
WorkspaceSetting
`protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
// The list of fields to update.
UpdateMask
*
fieldmaskpb
.
FieldMask
`protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
Reset
()
{
*
x
=
UpdateWorkspaceSettingRequest
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
4
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UpdateWorkspaceSettingRequest
)
ProtoMessage
()
{}
func
(
x
*
UpdateWorkspaceSettingRequest
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
4
]
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 UpdateWorkspaceSettingRequest.ProtoReflect.Descriptor instead.
func
(
*
UpdateWorkspaceSettingRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
4
}
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
GetSetting
()
*
WorkspaceSetting
{
if
x
!=
nil
{
return
x
.
Setting
}
return
nil
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
GetUpdateMask
()
*
fieldmaskpb
.
FieldMask
{
if
x
!=
nil
{
return
x
.
UpdateMask
}
return
nil
}
// General workspace settings configuration.
type
WorkspaceSetting_GeneralSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// theme is the name of the selected theme.
// theme is the name of the selected theme.
// This references a CSS file in the web/public/themes/ directory.
// This references a CSS file in the web/public/themes/ directory.
...
@@ -371,7 +472,7 @@ type WorkspaceGeneralSetting struct {
...
@@ -371,7 +472,7 @@ type WorkspaceGeneralSetting struct {
// additional_style is the additional style.
// additional_style is the additional style.
AdditionalStyle
string
`protobuf:"bytes,5,opt,name=additional_style,json=additionalStyle,proto3" json:"additional_style,omitempty"`
AdditionalStyle
string
`protobuf:"bytes,5,opt,name=additional_style,json=additionalStyle,proto3" json:"additional_style,omitempty"`
// custom_profile is the custom profile.
// custom_profile is the custom profile.
CustomProfile
*
WorkspaceCustomProfile
`protobuf:"bytes,6,opt,name=custom_profile,json=customProfile,proto3" json:"custom_profile,omitempty"`
CustomProfile
*
Workspace
Setting_GeneralSetting_
CustomProfile
`protobuf:"bytes,6,opt,name=custom_profile,json=customProfile,proto3" json:"custom_profile,omitempty"`
// week_start_day_offset is the week start day offset from Sunday.
// week_start_day_offset is the week start day offset from Sunday.
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// Default is Sunday.
// Default is Sunday.
...
@@ -384,21 +485,21 @@ type WorkspaceGeneralSetting struct {
...
@@ -384,21 +485,21 @@ type WorkspaceGeneralSetting struct {
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
func
(
x
*
WorkspaceGeneralSetting
)
Reset
()
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
Reset
()
{
*
x
=
WorkspaceGeneralSetting
{}
*
x
=
Workspace
Setting_
GeneralSetting
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
3
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
5
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WorkspaceGeneralSetting
)
String
()
string
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
}
func
(
*
WorkspaceGeneralSetting
)
ProtoMessage
()
{}
func
(
*
Workspace
Setting_
GeneralSetting
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceGeneralSetting
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
3
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
5
]
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
{
...
@@ -409,180 +510,105 @@ func (x *WorkspaceGeneralSetting) ProtoReflect() protoreflect.Message {
...
@@ -409,180 +510,105 @@ func (x *WorkspaceGeneralSetting) ProtoReflect() protoreflect.Message {
return
mi
.
MessageOf
(
x
)
return
mi
.
MessageOf
(
x
)
}
}
// Deprecated: Use WorkspaceGeneralSetting.ProtoReflect.Descriptor instead.
// Deprecated: Use Workspace
Setting_
GeneralSetting.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceGeneralSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Workspace
Setting_
GeneralSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
3
}
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
0
}
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetTheme
()
string
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetTheme
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Theme
return
x
.
Theme
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetDisallowUserRegistration
()
bool
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetDisallowUserRegistration
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisallowUserRegistration
return
x
.
DisallowUserRegistration
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetDisallowPasswordAuth
()
bool
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetDisallowPasswordAuth
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisallowPasswordAuth
return
x
.
DisallowPasswordAuth
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetAdditionalScript
()
string
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetAdditionalScript
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
AdditionalScript
return
x
.
AdditionalScript
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetAdditionalStyle
()
string
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetAdditionalStyle
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
AdditionalStyle
return
x
.
AdditionalStyle
}
}
return
""
return
""
}
}
func
(
x
*
Workspace
GeneralSetting
)
GetCustomProfile
()
*
Workspace
CustomProfile
{
func
(
x
*
Workspace
Setting_GeneralSetting
)
GetCustomProfile
()
*
WorkspaceSetting_GeneralSetting_
CustomProfile
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
CustomProfile
return
x
.
CustomProfile
}
}
return
nil
return
nil
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetWeekStartDayOffset
()
int32
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetWeekStartDayOffset
()
int32
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
WeekStartDayOffset
return
x
.
WeekStartDayOffset
}
}
return
0
return
0
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetDisallowChangeUsername
()
bool
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetDisallowChangeUsername
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisallowChangeUsername
return
x
.
DisallowChangeUsername
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceGeneralSetting
)
GetDisallowChangeNickname
()
bool
{
func
(
x
*
Workspace
Setting_
GeneralSetting
)
GetDisallowChangeNickname
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisallowChangeNickname
return
x
.
DisallowChangeNickname
}
}
return
false
return
false
}
}
type
WorkspaceCustomProfile
struct
{
// Storage configuration settings for workspace attachments.
state
protoimpl
.
MessageState
`protogen:"open.v1"`
type
WorkspaceSetting_StorageSetting
struct
{
Title
string
`protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Description
string
`protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
LogoUrl
string
`protobuf:"bytes,3,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
Locale
string
`protobuf:"bytes,4,opt,name=locale,proto3" json:"locale,omitempty"`
Appearance
string
`protobuf:"bytes,5,opt,name=appearance,proto3" json:"appearance,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
WorkspaceCustomProfile
)
Reset
()
{
*
x
=
WorkspaceCustomProfile
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
4
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
WorkspaceCustomProfile
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WorkspaceCustomProfile
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceCustomProfile
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
4
]
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 WorkspaceCustomProfile.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceCustomProfile
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
4
}
}
func
(
x
*
WorkspaceCustomProfile
)
GetTitle
()
string
{
if
x
!=
nil
{
return
x
.
Title
}
return
""
}
func
(
x
*
WorkspaceCustomProfile
)
GetDescription
()
string
{
if
x
!=
nil
{
return
x
.
Description
}
return
""
}
func
(
x
*
WorkspaceCustomProfile
)
GetLogoUrl
()
string
{
if
x
!=
nil
{
return
x
.
LogoUrl
}
return
""
}
func
(
x
*
WorkspaceCustomProfile
)
GetLocale
()
string
{
if
x
!=
nil
{
return
x
.
Locale
}
return
""
}
func
(
x
*
WorkspaceCustomProfile
)
GetAppearance
()
string
{
if
x
!=
nil
{
return
x
.
Appearance
}
return
""
}
type
WorkspaceStorageSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// storage_type is the storage type.
// storage_type is the storage type.
StorageType
WorkspaceS
torageSetting_StorageType
`protobuf:"varint,1,opt,name=storage_type,json=storageType,proto3,enum=memos.api.v1.Workspace
StorageSetting_StorageType" json:"storage_type,omitempty"`
StorageType
WorkspaceS
etting_StorageSetting_StorageType
`protobuf:"varint,1,opt,name=storage_type,json=storageType,proto3,enum=memos.api.v1.WorkspaceSetting_
StorageSetting_StorageType" json:"storage_type,omitempty"`
// The template of file path.
// The template of file path.
// e.g. assets/{timestamp}_{filename}
// e.g. assets/{timestamp}_{filename}
FilepathTemplate
string
`protobuf:"bytes,2,opt,name=filepath_template,json=filepathTemplate,proto3" json:"filepath_template,omitempty"`
FilepathTemplate
string
`protobuf:"bytes,2,opt,name=filepath_template,json=filepathTemplate,proto3" json:"filepath_template,omitempty"`
// The max upload size in megabytes.
// The max upload size in megabytes.
UploadSizeLimitMb
int64
`protobuf:"varint,3,opt,name=upload_size_limit_mb,json=uploadSizeLimitMb,proto3" json:"upload_size_limit_mb,omitempty"`
UploadSizeLimitMb
int64
`protobuf:"varint,3,opt,name=upload_size_limit_mb,json=uploadSizeLimitMb,proto3" json:"upload_size_limit_mb,omitempty"`
// The S3 config.
// The S3 config.
S3Config
*
WorkspaceStorageSetting_S3Config
`protobuf:"bytes,4,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
S3Config
*
WorkspaceS
etting_S
torageSetting_S3Config
`protobuf:"bytes,4,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
func
(
x
*
WorkspaceStorageSetting
)
Reset
()
{
func
(
x
*
WorkspaceS
etting_S
torageSetting
)
Reset
()
{
*
x
=
WorkspaceStorageSetting
{}
*
x
=
WorkspaceS
etting_S
torageSetting
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
5
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
6
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WorkspaceStorageSetting
)
String
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
}
func
(
*
WorkspaceStorageSetting
)
ProtoMessage
()
{}
func
(
*
WorkspaceS
etting_S
torageSetting
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceStorageSetting
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
WorkspaceS
etting_S
torageSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
5
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
6
]
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
{
...
@@ -593,40 +619,41 @@ func (x *WorkspaceStorageSetting) ProtoReflect() protoreflect.Message {
...
@@ -593,40 +619,41 @@ func (x *WorkspaceStorageSetting) ProtoReflect() protoreflect.Message {
return
mi
.
MessageOf
(
x
)
return
mi
.
MessageOf
(
x
)
}
}
// Deprecated: Use WorkspaceStorageSetting.ProtoReflect.Descriptor instead.
// Deprecated: Use WorkspaceS
etting_S
torageSetting.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceStorageSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
WorkspaceS
etting_S
torageSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
5
}
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
1
}
}
}
func
(
x
*
WorkspaceS
torageSetting
)
GetStorageType
()
Workspace
StorageSetting_StorageType
{
func
(
x
*
WorkspaceS
etting_StorageSetting
)
GetStorageType
()
WorkspaceSetting_
StorageSetting_StorageType
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
StorageType
return
x
.
StorageType
}
}
return
WorkspaceStorageSetting_STORAGE_TYPE_UNSPECIFIED
return
WorkspaceS
etting_S
torageSetting_STORAGE_TYPE_UNSPECIFIED
}
}
func
(
x
*
WorkspaceStorageSetting
)
GetFilepathTemplate
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting
)
GetFilepathTemplate
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
FilepathTemplate
return
x
.
FilepathTemplate
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceStorageSetting
)
GetUploadSizeLimitMb
()
int64
{
func
(
x
*
WorkspaceS
etting_S
torageSetting
)
GetUploadSizeLimitMb
()
int64
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
UploadSizeLimitMb
return
x
.
UploadSizeLimitMb
}
}
return
0
return
0
}
}
func
(
x
*
WorkspaceS
torageSetting
)
GetS3Config
()
*
Workspace
StorageSetting_S3Config
{
func
(
x
*
WorkspaceS
etting_StorageSetting
)
GetS3Config
()
*
WorkspaceSetting_
StorageSetting_S3Config
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
S3Config
return
x
.
S3Config
}
}
return
nil
return
nil
}
}
type
WorkspaceMemoRelatedSetting
struct
{
// Memo-related workspace settings and policies.
type
WorkspaceSetting_MemoRelatedSetting
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// disallow_public_visibility disallows set memo as public visibility.
// disallow_public_visibility disallows set memo as public visibility.
DisallowPublicVisibility
bool
`protobuf:"varint,1,opt,name=disallow_public_visibility,json=disallowPublicVisibility,proto3" json:"disallow_public_visibility,omitempty"`
DisallowPublicVisibility
bool
`protobuf:"varint,1,opt,name=disallow_public_visibility,json=disallowPublicVisibility,proto3" json:"disallow_public_visibility,omitempty"`
...
@@ -652,21 +679,21 @@ type WorkspaceMemoRelatedSetting struct {
...
@@ -652,21 +679,21 @@ type WorkspaceMemoRelatedSetting struct {
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
Reset
()
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
Reset
()
{
*
x
=
WorkspaceMemoRelatedSetting
{}
*
x
=
Workspace
Setting_
MemoRelatedSetting
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
6
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
7
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
String
()
string
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
}
func
(
*
WorkspaceMemoRelatedSetting
)
ProtoMessage
()
{}
func
(
*
Workspace
Setting_
MemoRelatedSetting
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceMemoRelatedSetting
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
6
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
7
]
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
{
...
@@ -677,106 +704,108 @@ func (x *WorkspaceMemoRelatedSetting) ProtoReflect() protoreflect.Message {
...
@@ -677,106 +704,108 @@ func (x *WorkspaceMemoRelatedSetting) ProtoReflect() protoreflect.Message {
return
mi
.
MessageOf
(
x
)
return
mi
.
MessageOf
(
x
)
}
}
// Deprecated: Use WorkspaceMemoRelatedSetting.ProtoReflect.Descriptor instead.
// Deprecated: Use Workspace
Setting_
MemoRelatedSetting.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceMemoRelatedSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
Workspace
Setting_
MemoRelatedSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
6
}
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
2
}
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetDisallowPublicVisibility
()
bool
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetDisallowPublicVisibility
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisallowPublicVisibility
return
x
.
DisallowPublicVisibility
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetDisplayWithUpdateTime
()
bool
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetDisplayWithUpdateTime
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisplayWithUpdateTime
return
x
.
DisplayWithUpdateTime
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetContentLengthLimit
()
int32
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetContentLengthLimit
()
int32
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
ContentLengthLimit
return
x
.
ContentLengthLimit
}
}
return
0
return
0
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetEnableDoubleClickEdit
()
bool
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetEnableDoubleClickEdit
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
EnableDoubleClickEdit
return
x
.
EnableDoubleClickEdit
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetEnableLinkPreview
()
bool
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetEnableLinkPreview
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
EnableLinkPreview
return
x
.
EnableLinkPreview
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetEnableComment
()
bool
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetEnableComment
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
EnableComment
return
x
.
EnableComment
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetReactions
()
[]
string
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetReactions
()
[]
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Reactions
return
x
.
Reactions
}
}
return
nil
return
nil
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetDisableMarkdownShortcuts
()
bool
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetDisableMarkdownShortcuts
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisableMarkdownShortcuts
return
x
.
DisableMarkdownShortcuts
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetEnableBlurNsfwContent
()
bool
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetEnableBlurNsfwContent
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
EnableBlurNsfwContent
return
x
.
EnableBlurNsfwContent
}
}
return
false
return
false
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetNsfwTags
()
[]
string
{
func
(
x
*
Workspace
Setting_
MemoRelatedSetting
)
GetNsfwTags
()
[]
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
NsfwTags
return
x
.
NsfwTags
}
}
return
nil
return
nil
}
}
// Request message for GetWorkspaceSetting method.
// Custom profile configuration for workspace branding.
type
GetWorkspaceSettingRequest
struct
{
type
WorkspaceSetting_GeneralSetting_CustomProfile
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The resource name of the workspace setting.
Title
string
`protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
// Format: workspace/settings/{setting}
Description
string
`protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
LogoUrl
string
`protobuf:"bytes,3,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
Locale
string
`protobuf:"bytes,4,opt,name=locale,proto3" json:"locale,omitempty"`
Appearance
string
`protobuf:"bytes,5,opt,name=appearance,proto3" json:"appearance,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
func
(
x
*
GetWorkspaceSettingRequest
)
Reset
()
{
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
Reset
()
{
*
x
=
GetWorkspaceSettingRequest
{}
*
x
=
WorkspaceSetting_GeneralSetting_CustomProfile
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
7
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
8
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
GetWorkspaceSettingRequest
)
String
()
string
{
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
}
func
(
*
GetWorkspaceSettingRequest
)
ProtoMessage
()
{}
func
(
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
ProtoMessage
()
{}
func
(
x
*
GetWorkspaceSettingRequest
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
7
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
8
]
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
{
...
@@ -787,75 +816,49 @@ func (x *GetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
...
@@ -787,75 +816,49 @@ func (x *GetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
return
mi
.
MessageOf
(
x
)
return
mi
.
MessageOf
(
x
)
}
}
// Deprecated: Use
GetWorkspaceSettingRequest
.ProtoReflect.Descriptor instead.
// Deprecated: Use
WorkspaceSetting_GeneralSetting_CustomProfile
.ProtoReflect.Descriptor instead.
func
(
*
GetWorkspaceSettingRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
7
}
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
0
,
0
}
}
}
func
(
x
*
GetWorkspaceSettingRequest
)
GetNam
e
()
string
{
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
GetTitl
e
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Nam
e
return
x
.
Titl
e
}
}
return
""
return
""
}
}
// Request message for UpdateWorkspaceSetting method.
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
GetDescription
()
string
{
type
UpdateWorkspaceSettingRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// The workspace setting resource which replaces the resource on the server.
Setting
*
WorkspaceSetting
`protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
// The list of fields to update.
UpdateMask
*
fieldmaskpb
.
FieldMask
`protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
Reset
()
{
*
x
=
UpdateWorkspaceSettingRequest
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
8
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
UpdateWorkspaceSettingRequest
)
ProtoMessage
()
{}
func
(
x
*
UpdateWorkspaceSettingRequest
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
8
]
if
x
!=
nil
{
if
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
return
x
.
Description
if
ms
.
LoadMessageInfo
()
==
nil
{
ms
.
StoreMessageInfo
(
mi
)
}
return
ms
}
}
return
mi
.
MessageOf
(
x
)
return
""
}
}
// Deprecated: Use UpdateWorkspaceSettingRequest.ProtoReflect.Descriptor instead.
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
GetLogoUrl
()
string
{
func
(
*
UpdateWorkspaceSettingRequest
)
Descriptor
()
([]
byte
,
[]
int
)
{
if
x
!=
nil
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
8
}
return
x
.
LogoUrl
}
return
""
}
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
GetSetting
()
*
WorkspaceSett
ing
{
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
GetLocale
()
str
ing
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Setting
return
x
.
Locale
}
}
return
nil
return
""
}
}
func
(
x
*
UpdateWorkspaceSettingRequest
)
GetUpdateMask
()
*
fieldmaskpb
.
FieldMask
{
func
(
x
*
WorkspaceSetting_GeneralSetting_CustomProfile
)
GetAppearance
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
UpdateMask
return
x
.
Appearance
}
}
return
nil
return
""
}
}
// S3 configuration for cloud storage backend.
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
type
WorkspaceStorageSetting_S3Config
struct
{
type
WorkspaceS
etting_S
torageSetting_S3Config
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
AccessKeyId
string
`protobuf:"bytes,1,opt,name=access_key_id,json=accessKeyId,proto3" json:"access_key_id,omitempty"`
AccessKeyId
string
`protobuf:"bytes,1,opt,name=access_key_id,json=accessKeyId,proto3" json:"access_key_id,omitempty"`
AccessKeySecret
string
`protobuf:"bytes,2,opt,name=access_key_secret,json=accessKeySecret,proto3" json:"access_key_secret,omitempty"`
AccessKeySecret
string
`protobuf:"bytes,2,opt,name=access_key_secret,json=accessKeySecret,proto3" json:"access_key_secret,omitempty"`
...
@@ -867,20 +870,20 @@ type WorkspaceStorageSetting_S3Config struct {
...
@@ -867,20 +870,20 @@ type WorkspaceStorageSetting_S3Config struct {
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
Reset
()
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
Reset
()
{
*
x
=
WorkspaceStorageSetting_S3Config
{}
*
x
=
WorkspaceS
etting_S
torageSetting_S3Config
{}
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
9
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
9
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
String
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
}
func
(
*
WorkspaceStorageSetting_S3Config
)
ProtoMessage
()
{}
func
(
*
WorkspaceS
etting_S
torageSetting_S3Config
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
9
]
mi
:=
&
file_api_v1_workspace_service_proto_msgTypes
[
9
]
if
x
!=
nil
{
if
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
...
@@ -892,47 +895,47 @@ func (x *WorkspaceStorageSetting_S3Config) ProtoReflect() protoreflect.Message {
...
@@ -892,47 +895,47 @@ func (x *WorkspaceStorageSetting_S3Config) ProtoReflect() protoreflect.Message {
return
mi
.
MessageOf
(
x
)
return
mi
.
MessageOf
(
x
)
}
}
// Deprecated: Use WorkspaceStorageSetting_S3Config.ProtoReflect.Descriptor instead.
// Deprecated: Use WorkspaceS
etting_S
torageSetting_S3Config.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceStorageSetting_S3Config
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
WorkspaceS
etting_S
torageSetting_S3Config
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
5
,
0
}
return
file_api_v1_workspace_service_proto_rawDescGZIP
(),
[]
int
{
2
,
1
,
0
}
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
GetAccessKeyId
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
GetAccessKeyId
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
AccessKeyId
return
x
.
AccessKeyId
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
GetAccessKeySecret
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
GetAccessKeySecret
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
AccessKeySecret
return
x
.
AccessKeySecret
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
GetEndpoint
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
GetEndpoint
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Endpoint
return
x
.
Endpoint
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
GetRegion
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
GetRegion
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Region
return
x
.
Region
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
GetBucket
()
string
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
GetBucket
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Bucket
return
x
.
Bucket
}
}
return
""
return
""
}
}
func
(
x
*
WorkspaceStorageSetting_S3Config
)
GetUsePathStyle
()
bool
{
func
(
x
*
WorkspaceS
etting_S
torageSetting_S3Config
)
GetUsePathStyle
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
UsePathStyle
return
x
.
UsePathStyle
}
}
...
@@ -949,43 +952,35 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
...
@@ -949,43 +952,35 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
"
\a
version
\x18\x02
\x01
(
\t
R
\a
version
\x12\x12\n
"
+
"
\a
version
\x18\x02
\x01
(
\t
R
\a
version
\x12\x12\n
"
+
"
\x04
mode
\x18\x03
\x01
(
\t
R
\x04
mode
\x12
!
\n
"
+
"
\x04
mode
\x18\x03
\x01
(
\t
R
\x04
mode
\x12
!
\n
"
+
"
\f
instance_url
\x18\x06
\x01
(
\t
R
\v
instanceUrl
\"\x1c\n
"
+
"
\f
instance_url
\x18\x06
\x01
(
\t
R
\v
instanceUrl
\"\x1c\n
"
+
"
\x1a
GetWorkspaceProfileRequest
\"\x
f2\x03
\n
"
+
"
\x1a
GetWorkspaceProfileRequest
\"\x
df\x11
\n
"
+
"
\x10
WorkspaceSetting
\x12\x17\n
"
+
"
\x10
WorkspaceSetting
\x12\x17\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
P
\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
X
\n
"
+
"
\x0f
general_setting
\x18\x02
\x01
(
\v
2%.memos.api.v1.WorkspaceGeneralSettingH
\x00
R
\x0e
generalSetting
\x12
P
\n
"
+
"
\x0f
general_setting
\x18\x02
\x01
(
\v
2-.memos.api.v1.WorkspaceSetting.GeneralSettingH
\x00
R
\x0e
generalSetting
\x12
X
\n
"
+
"
\x0f
storage_setting
\x18\x03
\x01
(
\v
2%.memos.api.v1.WorkspaceStorageSettingH
\x00
R
\x0e
storageSetting
\x12
]
\n
"
+
"
\x0f
storage_setting
\x18\x03
\x01
(
\v
2-.memos.api.v1.WorkspaceSetting.StorageSettingH
\x00
R
\x0e
storageSetting
\x12
e
\n
"
+
"
\x14
memo_related_setting
\x18\x04
\x01
(
\v
2).memos.api.v1.WorkspaceMemoRelatedSettingH
\x00
R
\x12
memoRelatedSetting
\"
Q
\n
"
+
"
\x14
memo_related_setting
\x18\x04
\x01
(
\v
21.memos.api.v1.WorkspaceSetting.MemoRelatedSettingH
\x00
R
\x12
memoRelatedSetting
\x1a\x9a\x05\n
"
+
"
\x03
Key
\x12\x13\n
"
+
"
\x0e
GeneralSetting
\x12\x14\n
"
+
"
\x0f
KEY_UNSPECIFIED
\x10\x00\x12\t\n
"
+
"
\x05
BASIC
\x10\x01\x12\v\n
"
+
"
\a
GENERAL
\x10\x02\x12\v\n
"
+
"
\a
STORAGE
\x10\x03\x12\x10\n
"
+
"
\f
MEMO_RELATED
\x10\x04
:f
\xea
Ac
\n
"
+
"
\x1e
api.memos.dev/WorkspaceSetting
\x12\x1c
workspace/settings/{setting}*
\x11
workspaceSettings2
\x10
workspaceSettingB
\a\n
"
+
"
\x05
value
\"\xef\x03\n
"
+
"
\x17
WorkspaceGeneralSetting
\x12\x14\n
"
+
"
\x05
theme
\x18\x01
\x01
(
\t
R
\x05
theme
\x12
<
\n
"
+
"
\x05
theme
\x18\x01
\x01
(
\t
R
\x05
theme
\x12
<
\n
"
+
"
\x1a
disallow_user_registration
\x18\x02
\x01
(
\b
R
\x18
disallowUserRegistration
\x12
4
\n
"
+
"
\x1a
disallow_user_registration
\x18\x02
\x01
(
\b
R
\x18
disallowUserRegistration
\x12
4
\n
"
+
"
\x16
disallow_password_auth
\x18\x03
\x01
(
\b
R
\x14
disallowPasswordAuth
\x12
+
\n
"
+
"
\x16
disallow_password_auth
\x18\x03
\x01
(
\b
R
\x14
disallowPasswordAuth
\x12
+
\n
"
+
"
\x11
additional_script
\x18\x04
\x01
(
\t
R
\x10
additionalScript
\x12
)
\n
"
+
"
\x11
additional_script
\x18\x04
\x01
(
\t
R
\x10
additionalScript
\x12
)
\n
"
+
"
\x10
additional_style
\x18\x05
\x01
(
\t
R
\x0f
additionalStyle
\x12
K
\n
"
+
"
\x10
additional_style
\x18\x05
\x01
(
\t
R
\x0f
additionalStyle
\x12
b
\n
"
+
"
\x0e
custom_profile
\x18\x06
\x01
(
\v
2
$.memos.api.v1.Workspace
CustomProfileR
\r
customProfile
\x12
1
\n
"
+
"
\x0e
custom_profile
\x18\x06
\x01
(
\v
2
;.memos.api.v1.WorkspaceSetting.GeneralSetting.
CustomProfileR
\r
customProfile
\x12
1
\n
"
+
"
\x15
week_start_day_offset
\x18\a
\x01
(
\x05
R
\x12
weekStartDayOffset
\x12
8
\n
"
+
"
\x15
week_start_day_offset
\x18\a
\x01
(
\x05
R
\x12
weekStartDayOffset
\x12
8
\n
"
+
"
\x18
disallow_change_username
\x18\b
\x01
(
\b
R
\x16
disallowChangeUsername
\x12
8
\n
"
+
"
\x18
disallow_change_username
\x18\b
\x01
(
\b
R
\x16
disallowChangeUsername
\x12
8
\n
"
+
"
\x18
disallow_change_nickname
\x18\t
\x01
(
\b
R
\x16
disallowChangeNickname
\
"\xa3
\x01\n
"
+
"
\x18
disallow_change_nickname
\x18\t
\x01
(
\b
R
\x16
disallowChangeNickname
\
x1a\x9a
\x01\n
"
+
"
\
x16
Workspace
CustomProfile
\x12\x14\n
"
+
"
\
r
CustomProfile
\x12\x14\n
"
+
"
\x05
title
\x18\x01
\x01
(
\t
R
\x05
title
\x12
\n
"
+
"
\x05
title
\x18\x01
\x01
(
\t
R
\x05
title
\x12
\n
"
+
"
\v
description
\x18\x02
\x01
(
\t
R
\v
description
\x12\x19\n
"
+
"
\v
description
\x18\x02
\x01
(
\t
R
\v
description
\x12\x19\n
"
+
"
\b
logo_url
\x18\x03
\x01
(
\t
R
\a
logoUrl
\x12\x16\n
"
+
"
\b
logo_url
\x18\x03
\x01
(
\t
R
\a
logoUrl
\x12\x16\n
"
+
"
\x06
locale
\x18\x04
\x01
(
\t
R
\x06
locale
\x12\x1e\n
"
+
"
\x06
locale
\x18\x04
\x01
(
\t
R
\x06
locale
\x12\x1e\n
"
+
"
\n
"
+
"
\n
"
+
"appearance
\x18\x05
\x01
(
\t
R
\n
"
+
"appearance
\x18\x05
\x01
(
\t
R
\n
"
+
"appearance
\
"\xb7
\x04\n
"
+
"appearance
\
x1a\xbe
\x04\n
"
+
"
\x
17
WorkspaceStorageSetting
\x12
T
\n
"
+
"
\x
0e
StorageSetting
\x12\\
\n
"
+
"
\f
storage_type
\x18\x01
\x01
(
\x0e
2
1.memos.api.v1.Workspace
StorageSetting.StorageTypeR
\v
storageType
\x12
+
\n
"
+
"
\f
storage_type
\x18\x01
\x01
(
\x0e
2
9.memos.api.v1.WorkspaceSetting.
StorageSetting.StorageTypeR
\v
storageType
\x12
+
\n
"
+
"
\x11
filepath_template
\x18\x02
\x01
(
\t
R
\x10
filepathTemplate
\x12
/
\n
"
+
"
\x11
filepath_template
\x18\x02
\x01
(
\t
R
\x10
filepathTemplate
\x12
/
\n
"
+
"
\x14
upload_size_limit_mb
\x18\x03
\x01
(
\x03
R
\x11
uploadSizeLimitMb
\x12
K
\n
"
+
"
\x14
upload_size_limit_mb
\x18\x03
\x01
(
\x03
R
\x11
uploadSizeLimitMb
\x12
S
\n
"
+
"
\t
s3_config
\x18\x04
\x01
(
\v
2
..memos.api.v1.Workspace
StorageSetting.S3ConfigR
\b
s3Config
\x1a\xcc\x01\n
"
+
"
\t
s3_config
\x18\x04
\x01
(
\v
2
6.memos.api.v1.WorkspaceSetting.
StorageSetting.S3ConfigR
\b
s3Config
\x1a\xcc\x01\n
"
+
"
\b
S3Config
\x12\"\n
"
+
"
\b
S3Config
\x12\"\n
"
+
"
\r
access_key_id
\x18\x01
\x01
(
\t
R
\v
accessKeyId
\x12
*
\n
"
+
"
\r
access_key_id
\x18\x01
\x01
(
\t
R
\v
accessKeyId
\x12
*
\n
"
+
"
\x11
access_key_secret
\x18\x02
\x01
(
\t
R
\x0f
accessKeySecret
\x12\x1a\n
"
+
"
\x11
access_key_secret
\x18\x02
\x01
(
\t
R
\x0f
accessKeySecret
\x12\x1a\n
"
+
...
@@ -997,8 +992,8 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
...
@@ -997,8 +992,8 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
"
\x18
STORAGE_TYPE_UNSPECIFIED
\x10\x00\x12\f\n
"
+
"
\x18
STORAGE_TYPE_UNSPECIFIED
\x10\x00\x12\f\n
"
+
"
\b
DATABASE
\x10\x01\x12\t\n
"
+
"
\b
DATABASE
\x10\x01\x12\t\n
"
+
"
\x05
LOCAL
\x10\x02\x12\x06\n
"
+
"
\x05
LOCAL
\x10\x02\x12\x06\n
"
+
"
\x02
S3
\x10\x03\
"\x88\x04
\n
"
+
"
\x02
S3
\x10\x03\
x1a\xff\x03
\n
"
+
"
\x1
b
Workspace
MemoRelatedSetting
\x12
<
\n
"
+
"
\x1
2
MemoRelatedSetting
\x12
<
\n
"
+
"
\x1a
disallow_public_visibility
\x18\x01
\x01
(
\b
R
\x18
disallowPublicVisibility
\x12
7
\n
"
+
"
\x1a
disallow_public_visibility
\x18\x01
\x01
(
\b
R
\x18
disallowPublicVisibility
\x12
7
\n
"
+
"
\x18
display_with_update_time
\x18\x02
\x01
(
\b
R
\x15
displayWithUpdateTime
\x12
0
\n
"
+
"
\x18
display_with_update_time
\x18\x02
\x01
(
\b
R
\x15
displayWithUpdateTime
\x12
0
\n
"
+
"
\x14
content_length_limit
\x18\x03
\x01
(
\x05
R
\x12
contentLengthLimit
\x12
7
\n
"
+
"
\x14
content_length_limit
\x18\x03
\x01
(
\x05
R
\x12
contentLengthLimit
\x12
7
\n
"
+
...
@@ -1009,7 +1004,14 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
...
@@ -1009,7 +1004,14 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
"
\x1a
disable_markdown_shortcuts
\x18\b
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x1a
disable_markdown_shortcuts
\x18\b
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x18
enable_blur_nsfw_content
\x18\t
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b\n
"
+
"
\x18
enable_blur_nsfw_content
\x18\t
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b\n
"
+
"
\t
nsfw_tags
\x18\n
"
+
"
\t
nsfw_tags
\x18\n
"
+
"
\x03
(
\t
R
\b
nsfwTags
\"
X
\n
"
+
"
\x03
(
\t
R
\b
nsfwTags
\"
F
\n
"
+
"
\x03
Key
\x12\x13\n
"
+
"
\x0f
KEY_UNSPECIFIED
\x10\x00\x12\v\n
"
+
"
\a
GENERAL
\x10\x01\x12\v\n
"
+
"
\a
STORAGE
\x10\x02\x12\x10\n
"
+
"
\f
MEMO_RELATED
\x10\x03
:f
\xea
Ac
\n
"
+
"
\x1e
api.memos.dev/WorkspaceSetting
\x12\x1c
workspace/settings/{setting}*
\x11
workspaceSettings2
\x10
workspaceSettingB
\a\n
"
+
"
\x05
value
\"
X
\n
"
+
"
\x1a
GetWorkspaceSettingRequest
\x12
:
\n
"
+
"
\x1a
GetWorkspaceSettingRequest
\x12
:
\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B&
\xe0
A
\x02\xfa
A
\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B&
\xe0
A
\x02\xfa
A
\n
"
+
"
\x1e
api.memos.dev/WorkspaceSettingR
\x04
name
\"\xa0\x01\n
"
+
"
\x1e
api.memos.dev/WorkspaceSettingR
\x04
name
\"\xa0\x01\n
"
+
...
@@ -1038,32 +1040,32 @@ func file_api_v1_workspace_service_proto_rawDescGZIP() []byte {
...
@@ -1038,32 +1040,32 @@ func file_api_v1_workspace_service_proto_rawDescGZIP() []byte {
var
file_api_v1_workspace_service_proto_enumTypes
=
make
([]
protoimpl
.
EnumInfo
,
2
)
var
file_api_v1_workspace_service_proto_enumTypes
=
make
([]
protoimpl
.
EnumInfo
,
2
)
var
file_api_v1_workspace_service_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
10
)
var
file_api_v1_workspace_service_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
10
)
var
file_api_v1_workspace_service_proto_goTypes
=
[]
any
{
var
file_api_v1_workspace_service_proto_goTypes
=
[]
any
{
(
WorkspaceSetting_Key
)(
0
),
// 0: memos.api.v1.WorkspaceSetting.Key
(
WorkspaceSetting_Key
)(
0
),
// 0: memos.api.v1.WorkspaceSetting.Key
(
WorkspaceS
torageSetting_StorageType
)(
0
),
// 1: memos.api.v1.Workspace
StorageSetting.StorageType
(
WorkspaceS
etting_StorageSetting_StorageType
)(
0
),
// 1: memos.api.v1.WorkspaceSetting.
StorageSetting.StorageType
(
*
WorkspaceProfile
)(
nil
),
// 2: memos.api.v1.WorkspaceProfile
(
*
WorkspaceProfile
)(
nil
),
// 2: memos.api.v1.WorkspaceProfile
(
*
GetWorkspaceProfileRequest
)(
nil
),
// 3: memos.api.v1.GetWorkspaceProfileRequest
(
*
GetWorkspaceProfileRequest
)(
nil
),
// 3: memos.api.v1.GetWorkspaceProfileRequest
(
*
WorkspaceSetting
)(
nil
),
// 4: memos.api.v1.WorkspaceSetting
(
*
WorkspaceSetting
)(
nil
),
// 4: memos.api.v1.WorkspaceSetting
(
*
WorkspaceGeneralSetting
)(
nil
),
// 5: memos.api.v1.WorkspaceGeneralSetting
(
*
GetWorkspaceSettingRequest
)(
nil
),
// 5: memos.api.v1.GetWorkspaceSettingRequest
(
*
WorkspaceCustomProfile
)(
nil
),
// 6: memos.api.v1.WorkspaceCustomProfile
(
*
UpdateWorkspaceSettingRequest
)(
nil
),
// 6: memos.api.v1.UpdateWorkspaceSettingRequest
(
*
WorkspaceS
torageSetting
)(
nil
),
// 7: memos.api.v1.WorkspaceStorage
Setting
(
*
WorkspaceS
etting_GeneralSetting
)(
nil
),
// 7: memos.api.v1.WorkspaceSetting.General
Setting
(
*
Workspace
MemoRelatedSetting
)(
nil
),
// 8: memos.api.v1.WorkspaceMemoRelated
Setting
(
*
Workspace
Setting_StorageSetting
)(
nil
),
// 8: memos.api.v1.WorkspaceSetting.Storage
Setting
(
*
GetWorkspaceSettingRequest
)(
nil
),
// 9: memos.api.v1.GetWorkspaceSettingRequest
(
*
WorkspaceSetting_MemoRelatedSetting
)(
nil
),
// 9: memos.api.v1.WorkspaceSetting.MemoRelatedSetting
(
*
UpdateWorkspaceSettingRequest
)(
nil
),
// 10: memos.api.v1.UpdateWorkspaceSettingRequest
(
*
WorkspaceSetting_GeneralSetting_CustomProfile
)(
nil
),
// 10: memos.api.v1.WorkspaceSetting.GeneralSetting.CustomProfile
(
*
WorkspaceS
torageSetting_S3Config
)(
nil
),
// 11: memos.api.v1.Workspace
StorageSetting.S3Config
(
*
WorkspaceS
etting_StorageSetting_S3Config
)(
nil
),
// 11: memos.api.v1.WorkspaceSetting.
StorageSetting.S3Config
(
*
fieldmaskpb
.
FieldMask
)(
nil
),
// 12: google.protobuf.FieldMask
(
*
fieldmaskpb
.
FieldMask
)(
nil
),
// 12: google.protobuf.FieldMask
}
}
var
file_api_v1_workspace_service_proto_depIdxs
=
[]
int32
{
var
file_api_v1_workspace_service_proto_depIdxs
=
[]
int32
{
5
,
// 0: memos.api.v1.WorkspaceSetting.general_setting:type_name -> memos.api.v1.Workspace
GeneralSetting
7
,
// 0: memos.api.v1.WorkspaceSetting.general_setting:type_name -> memos.api.v1.WorkspaceSetting.
GeneralSetting
7
,
// 1: memos.api.v1.WorkspaceSetting.storage_setting:type_name -> memos.api.v1.Workspace
StorageSetting
8
,
// 1: memos.api.v1.WorkspaceSetting.storage_setting:type_name -> memos.api.v1.WorkspaceSetting.
StorageSetting
8
,
// 2: memos.api.v1.WorkspaceSetting.memo_related_setting:type_name -> memos.api.v1.Workspace
MemoRelatedSetting
9
,
// 2: memos.api.v1.WorkspaceSetting.memo_related_setting:type_name -> memos.api.v1.WorkspaceSetting.
MemoRelatedSetting
6
,
// 3: memos.api.v1.WorkspaceGeneralSetting.custom_profile:type_name -> memos.api.v1.WorkspaceCustomProfile
4
,
// 3: memos.api.v1.UpdateWorkspaceSettingRequest.setting:type_name -> memos.api.v1.WorkspaceSetting
1
,
// 4: memos.api.v1.WorkspaceStorageSetting.storage_type:type_name -> memos.api.v1.WorkspaceStorageSetting.StorageType
1
2
,
// 4: memos.api.v1.UpdateWorkspaceSettingRequest.update_mask:type_name -> google.protobuf.FieldMask
1
1
,
// 5: memos.api.v1.WorkspaceStorageSetting.s3_config:type_name -> memos.api.v1.WorkspaceStorageSetting.S3Config
1
0
,
// 5: memos.api.v1.WorkspaceSetting.GeneralSetting.custom_profile:type_name -> memos.api.v1.WorkspaceSetting.GeneralSetting.CustomProfile
4
,
// 6: memos.api.v1.UpdateWorkspaceSettingRequest.setting:type_name -> memos.api.v1.WorkspaceSetting
1
,
// 6: memos.api.v1.WorkspaceSetting.StorageSetting.storage_type:type_name -> memos.api.v1.WorkspaceSetting.StorageSetting.StorageType
1
2
,
// 7: memos.api.v1.UpdateWorkspaceSettingRequest.update_mask:type_name -> google.protobuf.FieldMask
1
1
,
// 7: memos.api.v1.WorkspaceSetting.StorageSetting.s3_config:type_name -> memos.api.v1.WorkspaceSetting.StorageSetting.S3Config
3
,
// 8: memos.api.v1.WorkspaceService.GetWorkspaceProfile:input_type -> memos.api.v1.GetWorkspaceProfileRequest
3
,
// 8: memos.api.v1.WorkspaceService.GetWorkspaceProfile:input_type -> memos.api.v1.GetWorkspaceProfileRequest
9
,
// 9: memos.api.v1.WorkspaceService.GetWorkspaceSetting:input_type -> memos.api.v1.GetWorkspaceSettingRequest
5
,
// 9: memos.api.v1.WorkspaceService.GetWorkspaceSetting:input_type -> memos.api.v1.GetWorkspaceSettingRequest
10
,
// 10: memos.api.v1.WorkspaceService.UpdateWorkspaceSetting:input_type -> memos.api.v1.UpdateWorkspaceSettingRequest
6
,
// 10: memos.api.v1.WorkspaceService.UpdateWorkspaceSetting:input_type -> memos.api.v1.UpdateWorkspaceSettingRequest
2
,
// 11: memos.api.v1.WorkspaceService.GetWorkspaceProfile:output_type -> memos.api.v1.WorkspaceProfile
2
,
// 11: memos.api.v1.WorkspaceService.GetWorkspaceProfile:output_type -> memos.api.v1.WorkspaceProfile
4
,
// 12: memos.api.v1.WorkspaceService.GetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting
4
,
// 12: memos.api.v1.WorkspaceService.GetWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting
4
,
// 13: memos.api.v1.WorkspaceService.UpdateWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting
4
,
// 13: memos.api.v1.WorkspaceService.UpdateWorkspaceSetting:output_type -> memos.api.v1.WorkspaceSetting
...
@@ -1080,9 +1082,9 @@ func file_api_v1_workspace_service_proto_init() {
...
@@ -1080,9 +1082,9 @@ func file_api_v1_workspace_service_proto_init() {
return
return
}
}
file_api_v1_workspace_service_proto_msgTypes
[
2
]
.
OneofWrappers
=
[]
any
{
file_api_v1_workspace_service_proto_msgTypes
[
2
]
.
OneofWrappers
=
[]
any
{
(
*
WorkspaceSetting_GeneralSetting
)(
nil
),
(
*
WorkspaceSetting_GeneralSetting
_
)(
nil
),
(
*
WorkspaceSetting_StorageSetting
)(
nil
),
(
*
WorkspaceSetting_StorageSetting
_
)(
nil
),
(
*
WorkspaceSetting_MemoRelatedSetting
)(
nil
),
(
*
WorkspaceSetting_MemoRelatedSetting
_
)(
nil
),
}
}
type
x
struct
{}
type
x
struct
{}
out
:=
protoimpl
.
TypeBuilder
{
out
:=
protoimpl
.
TypeBuilder
{
...
...
proto/gen/openapi.yaml
View file @
3f56ce47
...
@@ -624,18 +624,26 @@ paths:
...
@@ -624,18 +624,26 @@ paths:
parameters
:
parameters
:
-
name
:
pageSize
-
name
:
pageSize
in
:
query
in
:
query
description
:
"
Optional.
The
maximum
number
of
memos
to
return.
\r\n
The
service
may
return
fewer
than
this
value.
\r\n
If
unspecified,
at
most
50
memos
will
be
returned.
\r\n
The
maximum
value
is
1000;
values
above
1000
will
be
coerced
to
1000."
description
:
|-
Optional. The maximum number of memos to return.
The service may return fewer than this value.
If unspecified, at most 50 memos will be returned.
The maximum value is 1000; values above 1000 will be coerced to 1000.
schema:
schema:
type: integer
type: integer
format: int32
format: int32
-
name
:
pageToken
-
name
:
pageToken
in
:
query
in
:
query
description
:
"
Optional.
A
page
token,
received
from
a
previous
`ListMemos`
call.
\r\n
Provide
this
to
retrieve
the
subsequent
page."
description
:
|-
Optional. A page token, received from a previous `ListMemos` call.
Provide this to retrieve the subsequent page.
schema:
schema:
type: string
type: string
-
name
:
state
-
name
:
state
in
:
query
in
:
query
description
:
"
Optional.
The
state
of
the
memos
to
list.
\r\n
Default
to
`NORMAL`.
Set
to
`ARCHIVED`
to
list
archived
memos."
description
:
|-
Optional. The state of the memos to list.
Default to `NORMAL`. Set to `ARCHIVED` to list archived memos.
schema:
schema:
enum:
enum:
- STATE_UNSPECIFIED
- STATE_UNSPECIFIED
...
@@ -645,12 +653,18 @@ paths:
...
@@ -645,12 +653,18 @@ paths:
format: enum
format: enum
-
name
:
orderBy
-
name
:
orderBy
in
:
query
in
:
query
description
:
"
Optional.
The
order
to
sort
results
by.
\r\n
Default
to
\"
display_time
desc
\"
.
\r\n
Example:
\"
display_time
desc
\"
or
\"
create_time
asc
\"
"
description
:
|-
Optional. The order to sort results by.
Default to "display_time desc".
Example: "display_time desc" or "create_time asc"
schema:
schema:
type: string
type: string
-
name
:
filter
-
name
:
filter
in
:
query
in
:
query
description
:
"
Optional.
Filter
to
apply
to
the
list
results.
\r\n
Filter
is
a
CEL
expression
to
filter
memos.
\r\n
Refer
to
`Shortcut.filter`."
description
:
|-
Optional. Filter to apply to the list results.
Filter is a CEL expression to filter memos.
Refer to `Shortcut.filter`.
schema:
schema:
type: string
type: string
-
name
:
showDeleted
-
name
:
showDeleted
...
@@ -679,7 +693,9 @@ paths:
...
@@ -679,7 +693,9 @@ paths:
parameters
:
parameters
:
-
name
:
memoId
-
name
:
memoId
in
:
query
in
:
query
description
:
"
Optional.
The
memo
ID
to
use
for
this
memo.
\r\n
If
empty,
a
unique
ID
will
be
generated."
description
:
|-
Optional. The memo ID to use for this memo.
If empty, a unique ID will be generated.
schema:
schema:
type: string
type: string
-
name
:
validateOnly
-
name
:
validateOnly
...
@@ -726,7 +742,9 @@ paths:
...
@@ -726,7 +742,9 @@ paths:
type
:
string
type
:
string
-
name
:
readMask
-
name
:
readMask
in
:
query
in
:
query
description
:
"
Optional.
The
fields
to
return
in
the
response.
\r\n
If
not
specified,
all
fields
are
returned."
description
:
|-
Optional. The fields to return in the response.
If not specified, all fields are returned.
schema:
schema:
type: string
type: string
format: field-mask
format: field-mask
...
@@ -2468,6 +2486,20 @@ components:
...
@@ -2468,6 +2486,20 @@ components:
type
:
string
type
:
string
avatarUrl
:
avatarUrl
:
type
:
string
type
:
string
GeneralSetting_CustomProfile
:
type
:
object
properties
:
title
:
type
:
string
description
:
type
:
string
logoUrl
:
type
:
string
locale
:
type
:
string
appearance
:
type
:
string
description
:
Custom profile configuration for workspace branding.
GetCurrentSessionResponse
:
GetCurrentSessionResponse
:
type
:
object
type
:
object
properties
:
properties
:
...
@@ -2777,7 +2809,9 @@ components:
...
@@ -2777,7 +2809,9 @@ components:
description
:
The list of memos.
description
:
The list of memos.
nextPageToken
:
nextPageToken
:
type
:
string
type
:
string
description
:
"
A
token
that
can
be
sent
as
`page_token`
to
retrieve
the
next
page.
\r\n
If
this
field
is
omitted,
there
are
no
subsequent
pages."
description
:
|-
A token that can be sent as `page_token` to retrieve the next page.
If this field is omitted, there are no subsequent pages.
totalSize
:
totalSize
:
type
:
integer
type
:
integer
description
:
The total count of memos (may be approximate).
description
:
The total count of memos (may be approximate).
...
@@ -2889,7 +2923,9 @@ components:
...
@@ -2889,7 +2923,9 @@ components:
properties
:
properties
:
name
:
name
:
type
:
string
type
:
string
description
:
"
The
resource
name
of
the
memo.
\r\n
Format:
memos/{memo},
memo
is
the
user
defined
id
or
uuid."
description
:
|-
The resource name of the memo.
Format: memos/{memo}, memo is the user defined id or uuid.
state
:
state
:
enum
:
enum
:
-
STATE_UNSPECIFIED
-
STATE_UNSPECIFIED
...
@@ -2901,7 +2937,9 @@ components:
...
@@ -2901,7 +2937,9 @@ components:
creator
:
creator
:
readOnly
:
true
readOnly
:
true
type
:
string
type
:
string
description
:
"
The
name
of
the
creator.
\r\n
Format:
users/{user}"
description
:
|-
The name of the creator.
Format: users/{user}
createTime
:
createTime
:
readOnly
:
true
readOnly
:
true
type
:
string
type
:
string
...
@@ -2967,7 +3005,9 @@ components:
...
@@ -2967,7 +3005,9 @@ components:
parent
:
parent
:
readOnly
:
true
readOnly
:
true
type
:
string
type
:
string
description
:
"
Output
only.
The
name
of
the
parent
memo.
\r\n
Format:
memos/{memo}"
description
:
|-
Output only. The name of the parent memo.
Format: memos/{memo}
snippet
:
snippet
:
readOnly
:
true
readOnly
:
true
type
:
string
type
:
string
...
@@ -3005,7 +3045,9 @@ components:
...
@@ -3005,7 +3045,9 @@ components:
properties
:
properties
:
name
:
name
:
type
:
string
type
:
string
description
:
"
The
resource
name
of
the
memo.
\r\n
Format:
memos/{memo}"
description
:
|-
The resource name of the memo.
Format: memos/{memo}
snippet
:
snippet
:
readOnly
:
true
readOnly
:
true
type
:
string
type
:
string
...
@@ -3191,14 +3233,21 @@ components:
...
@@ -3191,14 +3233,21 @@ components:
name
:
name
:
readOnly
:
true
readOnly
:
true
type
:
string
type
:
string
description
:
"
The
resource
name
of
the
reaction.
\r\n
Format:
reactions/{reaction}"
description
:
|-
The resource name of the reaction.
Format: reactions/{reaction}
creator
:
creator
:
readOnly
:
true
readOnly
:
true
type
:
string
type
:
string
description
:
"
The
resource
name
of
the
creator.
\r\n
Format:
users/{user}"
description
:
|-
The resource name of the creator.
Format: users/{user}
contentId
:
contentId
:
type
:
string
type
:
string
description
:
"
The
resource
name
of
the
content.
\r\n
For
memo
reactions,
this
should
be
the
memo's
resource
name.
\r\n
Format:
memos/{memo}"
description
:
|-
The resource name of the content.
For memo reactions, this should be the memo's resource name.
Format: memos/{memo}
reactionType
:
reactionType
:
type
:
string
type
:
string
description
:
"
Required.
The
type
of
reaction
(e.g.,
\"\U0001F44D\"
,
\"
❤️
\"
,
\"\U0001F604\"
)."
description
:
"
Required.
The
type
of
reaction
(e.g.,
\"\U0001F44D\"
,
\"
❤️
\"
,
\"\U0001F604\"
)."
...
@@ -3225,7 +3274,9 @@ components:
...
@@ -3225,7 +3274,9 @@ components:
properties
:
properties
:
parent
:
parent
:
type
:
string
type
:
string
description
:
"
Required.
The
parent,
who
owns
the
tags.
\r\n
Format:
memos/{memo}.
Use
\"
memos/-
\"
to
rename
all
tags."
description
:
|-
Required. The parent, who owns the tags.
Format: memos/{memo}. Use "memos/-" to rename all tags.
oldTag
:
oldTag
:
type
:
string
type
:
string
description
:
Required. The old tag name to rename.
description
:
Required. The old tag name to rename.
...
@@ -3271,7 +3322,9 @@ components:
...
@@ -3271,7 +3322,9 @@ components:
properties
:
properties
:
name
:
name
:
type
:
string
type
:
string
description
:
"
Required.
The
resource
name
of
the
memo.
\r\n
Format:
memos/{memo}"
description
:
|-
Required. The resource name of the memo.
Format: memos/{memo}
attachments
:
attachments
:
type
:
array
type
:
array
items
:
items
:
...
@@ -3285,7 +3338,9 @@ components:
...
@@ -3285,7 +3338,9 @@ components:
properties
:
properties
:
name
:
name
:
type
:
string
type
:
string
description
:
"
Required.
The
resource
name
of
the
memo.
\r\n
Format:
memos/{memo}"
description
:
|-
Required. The resource name of the memo.
Format: memos/{memo}
relations
:
relations
:
type
:
array
type
:
array
items
:
items
:
...
@@ -3328,6 +3383,24 @@ components:
...
@@ -3328,6 +3383,24 @@ components:
$ref
:
'
#/components/schemas/GoogleProtobufAny'
$ref
:
'
#/components/schemas/GoogleProtobufAny'
description
:
A list of messages that carry the error details. There is a common set of message types for APIs to use.
description
:
A list of messages that carry the error details. There is a common set of message types for APIs to use.
description
:
'
The
`Status`
type
defines
a
logical
error
model
that
is
suitable
for
different
programming
environments,
including
REST
APIs
and
RPC
APIs.
It
is
used
by
[gRPC](https://github.com/grpc).
Each
`Status`
message
contains
three
pieces
of
data:
error
code,
error
message,
and
error
details.
You
can
find
out
more
about
this
error
model
and
how
to
work
with
it
in
the
[API
Design
Guide](https://cloud.google.com/apis/design/errors).'
description
:
'
The
`Status`
type
defines
a
logical
error
model
that
is
suitable
for
different
programming
environments,
including
REST
APIs
and
RPC
APIs.
It
is
used
by
[gRPC](https://github.com/grpc).
Each
`Status`
message
contains
three
pieces
of
data:
error
code,
error
message,
and
error
details.
You
can
find
out
more
about
this
error
model
and
how
to
work
with
it
in
the
[API
Design
Guide](https://cloud.google.com/apis/design/errors).'
StorageSetting_S3Config
:
type
:
object
properties
:
accessKeyId
:
type
:
string
accessKeySecret
:
type
:
string
endpoint
:
type
:
string
region
:
type
:
string
bucket
:
type
:
string
usePathStyle
:
type
:
boolean
description
:
|-
S3 configuration for cloud storage backend.
Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
StrikethroughNode
:
StrikethroughNode
:
type
:
object
type
:
object
properties
:
properties
:
...
@@ -3425,7 +3498,9 @@ components:
...
@@ -3425,7 +3498,9 @@ components:
properties
:
properties
:
name
:
name
:
type
:
string
type
:
string
description
:
"
Required.
The
resource
name
of
the
memo.
\r\n
Format:
memos/{memo}"
description
:
|-
Required. The resource name of the memo.
Format: memos/{memo}
reaction
:
reaction
:
allOf
:
allOf
:
-
$ref
:
'
#/components/schemas/Reaction'
-
$ref
:
'
#/components/schemas/Reaction'
...
@@ -3651,25 +3726,47 @@ components:
...
@@ -3651,25 +3726,47 @@ components:
url
:
url
:
type
:
string
type
:
string
description
:
The target URL for the webhook.
description
:
The target URL for the webhook.
Workspace
Custom
Profile
:
WorkspaceProfile
:
type
:
object
type
:
object
properties
:
properties
:
title
:
owner
:
type
:
string
type
:
string
description
:
description
:
|-
The name of instance owner.
Format: users/{user}
version
:
type
:
string
type
:
string
logoUrl
:
description
:
Version is the current version of instance.
mode
:
type
:
string
type
:
string
locale
:
description
:
Mode is the instance mode (e.g. "prod", "dev" or "demo").
instanceUrl
:
type
:
string
type
:
string
appearance
:
description
:
Instance URL is the URL of the instance.
description
:
Workspace profile message containing basic workspace information.
WorkspaceSetting
:
type
:
object
properties
:
name
:
type
:
string
type
:
string
WorkspaceGeneralSetting
:
description
:
|-
The name of the workspace setting.
Format: workspace/settings/{setting}
generalSetting
:
$ref
:
'
#/components/schemas/WorkspaceSetting_GeneralSetting'
storageSetting
:
$ref
:
'
#/components/schemas/WorkspaceSetting_StorageSetting'
memoRelatedSetting
:
$ref
:
'
#/components/schemas/WorkspaceSetting_MemoRelatedSetting'
description
:
A workspace setting resource.
WorkspaceSetting_GeneralSetting
:
type
:
object
type
:
object
properties
:
properties
:
theme
:
theme
:
type
:
string
type
:
string
description
:
"
theme
is
the
name
of
the
selected
theme.
\r\n
This
references
a
CSS
file
in
the
web/public/themes/
directory."
description
:
|-
theme is the name of the selected theme.
This references a CSS file in the web/public/themes/ directory.
disallowUserRegistration
:
disallowUserRegistration
:
type
:
boolean
type
:
boolean
description
:
disallow_user_registration disallows user registration.
description
:
disallow_user_registration disallows user registration.
...
@@ -3684,11 +3781,14 @@ components:
...
@@ -3684,11 +3781,14 @@ components:
description
:
additional_style is the additional style.
description
:
additional_style is the additional style.
customProfile
:
customProfile
:
allOf
:
allOf
:
-
$ref
:
'
#/components/schemas/
Workspace
CustomProfile'
-
$ref
:
'
#/components/schemas/
GeneralSetting_
CustomProfile'
description
:
custom_profile is the custom profile.
description
:
custom_profile is the custom profile.
weekStartDayOffset
:
weekStartDayOffset
:
type
:
integer
type
:
integer
description
:
"
week_start_day_offset
is
the
week
start
day
offset
from
Sunday.
\r\n
0:
Sunday,
1:
Monday,
2:
Tuesday,
3:
Wednesday,
4:
Thursday,
5:
Friday,
6:
Saturday
\r\n
Default
is
Sunday."
description
:
|-
week_start_day_offset is the week start day offset from Sunday.
0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
Default is Sunday.
format: int32
format: int32
disallowChangeUsername
:
disallowChangeUsername
:
type
:
boolean
type
:
boolean
...
@@ -3696,7 +3796,8 @@ components:
...
@@ -3696,7 +3796,8 @@ components:
disallowChangeNickname
:
disallowChangeNickname
:
type
:
boolean
type
:
boolean
description
:
disallow_change_nickname disallows changing nickname.
description
:
disallow_change_nickname disallows changing nickname.
WorkspaceMemoRelatedSetting
:
description
:
General workspace settings configuration.
WorkspaceSetting_MemoRelatedSetting
:
type
:
object
type
:
object
properties
:
properties
:
disallowPublicVisibility
:
disallowPublicVisibility
:
...
@@ -3734,36 +3835,8 @@ components:
...
@@ -3734,36 +3835,8 @@ components:
items
:
items
:
type
:
string
type
:
string
description
:
nsfw_tags is the list of tags that mark content as NSFW for blurring.
description
:
nsfw_tags is the list of tags that mark content as NSFW for blurring.
WorkspaceProfile
:
description
:
Memo-related workspace settings and policies.
type
:
object
WorkspaceSetting_StorageSetting
:
properties
:
owner
:
type
:
string
description
:
"
The
name
of
instance
owner.
\r\n
Format:
users/{user}"
version
:
type
:
string
description
:
Version is the current version of instance.
mode
:
type
:
string
description
:
Mode is the instance mode (e.g. "prod", "dev" or "demo").
instanceUrl
:
type
:
string
description
:
Instance URL is the URL of the instance.
description
:
Workspace profile message containing basic workspace information.
WorkspaceSetting
:
type
:
object
properties
:
name
:
type
:
string
description
:
"
The
name
of
the
workspace
setting.
\r\n
Format:
workspace/settings/{setting}"
generalSetting
:
$ref
:
'
#/components/schemas/WorkspaceGeneralSetting'
storageSetting
:
$ref
:
'
#/components/schemas/WorkspaceStorageSetting'
memoRelatedSetting
:
$ref
:
'
#/components/schemas/WorkspaceMemoRelatedSetting'
description
:
A workspace setting resource.
WorkspaceStorageSetting
:
type
:
object
type
:
object
properties
:
properties
:
storageType
:
storageType
:
...
@@ -3777,30 +3850,17 @@ components:
...
@@ -3777,30 +3850,17 @@ components:
format
:
enum
format
:
enum
filepathTemplate
:
filepathTemplate
:
type
:
string
type
:
string
description
:
"
The
template
of
file
path.
\r\n
e.g.
assets/{timestamp}_{filename}"
description
:
|-
The template of file path.
e.g. assets/{timestamp}_{filename}
uploadSizeLimitMb
:
uploadSizeLimitMb
:
type
:
string
type
:
string
description
:
The max upload size in megabytes.
description
:
The max upload size in megabytes.
s3Config
:
s3Config
:
allOf
:
allOf
:
-
$ref
:
'
#/components/schemas/
Workspace
StorageSetting_S3Config'
-
$ref
:
'
#/components/schemas/StorageSetting_S3Config'
description
:
The S3 config.
description
:
The S3 config.
WorkspaceStorageSetting_S3Config
:
description
:
Storage configuration settings for workspace attachments.
type
:
object
properties
:
accessKeyId
:
type
:
string
accessKeySecret
:
type
:
string
endpoint
:
type
:
string
region
:
type
:
string
bucket
:
type
:
string
usePathStyle
:
type
:
boolean
description
:
'
Reference:
https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/'
tags
:
tags
:
-
name
:
ActivityService
-
name
:
ActivityService
-
name
:
AttachmentService
-
name
:
AttachmentService
...
...
server/router/api/v1/workspace_service.go
View file @
3f56ce47
...
@@ -105,15 +105,15 @@ func convertWorkspaceSettingFromStore(setting *storepb.WorkspaceSetting) *v1pb.W
...
@@ -105,15 +105,15 @@ func convertWorkspaceSettingFromStore(setting *storepb.WorkspaceSetting) *v1pb.W
}
}
switch
setting
.
Value
.
(
type
)
{
switch
setting
.
Value
.
(
type
)
{
case
*
storepb
.
WorkspaceSetting_GeneralSetting
:
case
*
storepb
.
WorkspaceSetting_GeneralSetting
:
workspaceSetting
.
Value
=
&
v1pb
.
WorkspaceSetting_GeneralSetting
{
workspaceSetting
.
Value
=
&
v1pb
.
WorkspaceSetting_GeneralSetting
_
{
GeneralSetting
:
convertWorkspaceGeneralSettingFromStore
(
setting
.
GetGeneralSetting
()),
GeneralSetting
:
convertWorkspaceGeneralSettingFromStore
(
setting
.
GetGeneralSetting
()),
}
}
case
*
storepb
.
WorkspaceSetting_StorageSetting
:
case
*
storepb
.
WorkspaceSetting_StorageSetting
:
workspaceSetting
.
Value
=
&
v1pb
.
WorkspaceSetting_StorageSetting
{
workspaceSetting
.
Value
=
&
v1pb
.
WorkspaceSetting_StorageSetting
_
{
StorageSetting
:
convertWorkspaceStorageSettingFromStore
(
setting
.
GetStorageSetting
()),
StorageSetting
:
convertWorkspaceStorageSettingFromStore
(
setting
.
GetStorageSetting
()),
}
}
case
*
storepb
.
WorkspaceSetting_MemoRelatedSetting
:
case
*
storepb
.
WorkspaceSetting_MemoRelatedSetting
:
workspaceSetting
.
Value
=
&
v1pb
.
WorkspaceSetting_MemoRelatedSetting
{
workspaceSetting
.
Value
=
&
v1pb
.
WorkspaceSetting_MemoRelatedSetting
_
{
MemoRelatedSetting
:
convertWorkspaceMemoRelatedSettingFromStore
(
setting
.
GetMemoRelatedSetting
()),
MemoRelatedSetting
:
convertWorkspaceMemoRelatedSettingFromStore
(
setting
.
GetMemoRelatedSetting
()),
}
}
}
}
...
@@ -145,7 +145,7 @@ func convertWorkspaceSettingToStore(setting *v1pb.WorkspaceSetting) *storepb.Wor
...
@@ -145,7 +145,7 @@ func convertWorkspaceSettingToStore(setting *v1pb.WorkspaceSetting) *storepb.Wor
return
workspaceSetting
return
workspaceSetting
}
}
func
convertWorkspaceGeneralSettingFromStore
(
setting
*
storepb
.
WorkspaceGeneralSetting
)
*
v1pb
.
WorkspaceGeneralSetting
{
func
convertWorkspaceGeneralSettingFromStore
(
setting
*
storepb
.
WorkspaceGeneralSetting
)
*
v1pb
.
Workspace
Setting_
GeneralSetting
{
if
setting
==
nil
{
if
setting
==
nil
{
return
nil
return
nil
}
}
...
@@ -155,7 +155,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
...
@@ -155,7 +155,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
theme
=
"default"
theme
=
"default"
}
}
generalSetting
:=
&
v1pb
.
WorkspaceGeneralSetting
{
generalSetting
:=
&
v1pb
.
Workspace
Setting_
GeneralSetting
{
Theme
:
theme
,
Theme
:
theme
,
DisallowUserRegistration
:
setting
.
DisallowUserRegistration
,
DisallowUserRegistration
:
setting
.
DisallowUserRegistration
,
DisallowPasswordAuth
:
setting
.
DisallowPasswordAuth
,
DisallowPasswordAuth
:
setting
.
DisallowPasswordAuth
,
...
@@ -166,7 +166,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
...
@@ -166,7 +166,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
DisallowChangeNickname
:
setting
.
DisallowChangeNickname
,
DisallowChangeNickname
:
setting
.
DisallowChangeNickname
,
}
}
if
setting
.
CustomProfile
!=
nil
{
if
setting
.
CustomProfile
!=
nil
{
generalSetting
.
CustomProfile
=
&
v1pb
.
WorkspaceCustomProfile
{
generalSetting
.
CustomProfile
=
&
v1pb
.
Workspace
Setting_GeneralSetting_
CustomProfile
{
Title
:
setting
.
CustomProfile
.
Title
,
Title
:
setting
.
CustomProfile
.
Title
,
Description
:
setting
.
CustomProfile
.
Description
,
Description
:
setting
.
CustomProfile
.
Description
,
LogoUrl
:
setting
.
CustomProfile
.
LogoUrl
,
LogoUrl
:
setting
.
CustomProfile
.
LogoUrl
,
...
@@ -177,7 +177,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
...
@@ -177,7 +177,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
return
generalSetting
return
generalSetting
}
}
func
convertWorkspaceGeneralSettingToStore
(
setting
*
v1pb
.
WorkspaceGeneralSetting
)
*
storepb
.
WorkspaceGeneralSetting
{
func
convertWorkspaceGeneralSettingToStore
(
setting
*
v1pb
.
Workspace
Setting_
GeneralSetting
)
*
storepb
.
WorkspaceGeneralSetting
{
if
setting
==
nil
{
if
setting
==
nil
{
return
nil
return
nil
}
}
...
@@ -203,17 +203,17 @@ func convertWorkspaceGeneralSettingToStore(setting *v1pb.WorkspaceGeneralSetting
...
@@ -203,17 +203,17 @@ func convertWorkspaceGeneralSettingToStore(setting *v1pb.WorkspaceGeneralSetting
return
generalSetting
return
generalSetting
}
}
func
convertWorkspaceStorageSettingFromStore
(
settingpb
*
storepb
.
WorkspaceStorageSetting
)
*
v1pb
.
WorkspaceStorageSetting
{
func
convertWorkspaceStorageSettingFromStore
(
settingpb
*
storepb
.
WorkspaceStorageSetting
)
*
v1pb
.
WorkspaceS
etting_S
torageSetting
{
if
settingpb
==
nil
{
if
settingpb
==
nil
{
return
nil
return
nil
}
}
setting
:=
&
v1pb
.
WorkspaceStorageSetting
{
setting
:=
&
v1pb
.
WorkspaceS
etting_S
torageSetting
{
StorageType
:
v1pb
.
WorkspaceStorageSetting_StorageType
(
settingpb
.
StorageType
),
StorageType
:
v1pb
.
WorkspaceS
etting_S
torageSetting_StorageType
(
settingpb
.
StorageType
),
FilepathTemplate
:
settingpb
.
FilepathTemplate
,
FilepathTemplate
:
settingpb
.
FilepathTemplate
,
UploadSizeLimitMb
:
settingpb
.
UploadSizeLimitMb
,
UploadSizeLimitMb
:
settingpb
.
UploadSizeLimitMb
,
}
}
if
settingpb
.
S3Config
!=
nil
{
if
settingpb
.
S3Config
!=
nil
{
setting
.
S3Config
=
&
v1pb
.
WorkspaceStorageSetting_S3Config
{
setting
.
S3Config
=
&
v1pb
.
WorkspaceS
etting_S
torageSetting_S3Config
{
AccessKeyId
:
settingpb
.
S3Config
.
AccessKeyId
,
AccessKeyId
:
settingpb
.
S3Config
.
AccessKeyId
,
AccessKeySecret
:
settingpb
.
S3Config
.
AccessKeySecret
,
AccessKeySecret
:
settingpb
.
S3Config
.
AccessKeySecret
,
Endpoint
:
settingpb
.
S3Config
.
Endpoint
,
Endpoint
:
settingpb
.
S3Config
.
Endpoint
,
...
@@ -225,7 +225,7 @@ func convertWorkspaceStorageSettingFromStore(settingpb *storepb.WorkspaceStorage
...
@@ -225,7 +225,7 @@ func convertWorkspaceStorageSettingFromStore(settingpb *storepb.WorkspaceStorage
return
setting
return
setting
}
}
func
convertWorkspaceStorageSettingToStore
(
setting
*
v1pb
.
WorkspaceStorageSetting
)
*
storepb
.
WorkspaceStorageSetting
{
func
convertWorkspaceStorageSettingToStore
(
setting
*
v1pb
.
WorkspaceS
etting_S
torageSetting
)
*
storepb
.
WorkspaceStorageSetting
{
if
setting
==
nil
{
if
setting
==
nil
{
return
nil
return
nil
}
}
...
@@ -247,11 +247,11 @@ func convertWorkspaceStorageSettingToStore(setting *v1pb.WorkspaceStorageSetting
...
@@ -247,11 +247,11 @@ func convertWorkspaceStorageSettingToStore(setting *v1pb.WorkspaceStorageSetting
return
settingpb
return
settingpb
}
}
func
convertWorkspaceMemoRelatedSettingFromStore
(
setting
*
storepb
.
WorkspaceMemoRelatedSetting
)
*
v1pb
.
WorkspaceMemoRelatedSetting
{
func
convertWorkspaceMemoRelatedSettingFromStore
(
setting
*
storepb
.
WorkspaceMemoRelatedSetting
)
*
v1pb
.
Workspace
Setting_
MemoRelatedSetting
{
if
setting
==
nil
{
if
setting
==
nil
{
return
nil
return
nil
}
}
return
&
v1pb
.
WorkspaceMemoRelatedSetting
{
return
&
v1pb
.
Workspace
Setting_
MemoRelatedSetting
{
DisallowPublicVisibility
:
setting
.
DisallowPublicVisibility
,
DisallowPublicVisibility
:
setting
.
DisallowPublicVisibility
,
DisplayWithUpdateTime
:
setting
.
DisplayWithUpdateTime
,
DisplayWithUpdateTime
:
setting
.
DisplayWithUpdateTime
,
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
...
@@ -265,7 +265,7 @@ func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoR
...
@@ -265,7 +265,7 @@ func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoR
}
}
}
}
func
convertWorkspaceMemoRelatedSettingToStore
(
setting
*
v1pb
.
WorkspaceMemoRelatedSetting
)
*
storepb
.
WorkspaceMemoRelatedSetting
{
func
convertWorkspaceMemoRelatedSettingToStore
(
setting
*
v1pb
.
Workspace
Setting_
MemoRelatedSetting
)
*
storepb
.
WorkspaceMemoRelatedSetting
{
if
setting
==
nil
{
if
setting
==
nil
{
return
nil
return
nil
}
}
...
...
web/src/components/Settings/MemoRelatedSettings.tsx
View file @
3f56ce47
...
@@ -9,18 +9,18 @@ import { Input } from "@/components/ui/input";
...
@@ -9,18 +9,18 @@ import { Input } from "@/components/ui/input";
import
{
Switch
}
from
"@/components/ui/switch"
;
import
{
Switch
}
from
"@/components/ui/switch"
;
import
{
workspaceStore
}
from
"@/store"
;
import
{
workspaceStore
}
from
"@/store"
;
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
WorkspaceMemoRelatedSetting
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
Workspace
Setting_
MemoRelatedSetting
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
const
MemoRelatedSettings
=
observer
(()
=>
{
const
MemoRelatedSettings
=
observer
(()
=>
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
[
originalSetting
,
setOriginalSetting
]
=
useState
<
WorkspaceMemoRelatedSetting
>
(
workspaceStore
.
state
.
memoRelatedSetting
);
const
[
originalSetting
,
setOriginalSetting
]
=
useState
<
Workspace
Setting_
MemoRelatedSetting
>
(
workspaceStore
.
state
.
memoRelatedSetting
);
const
[
memoRelatedSetting
,
setMemoRelatedSetting
]
=
useState
<
WorkspaceMemoRelatedSetting
>
(
originalSetting
);
const
[
memoRelatedSetting
,
setMemoRelatedSetting
]
=
useState
<
Workspace
Setting_
MemoRelatedSetting
>
(
originalSetting
);
const
[
editingReaction
,
setEditingReaction
]
=
useState
<
string
>
(
""
);
const
[
editingReaction
,
setEditingReaction
]
=
useState
<
string
>
(
""
);
const
[
editingNsfwTag
,
setEditingNsfwTag
]
=
useState
<
string
>
(
""
);
const
[
editingNsfwTag
,
setEditingNsfwTag
]
=
useState
<
string
>
(
""
);
const
updatePartialSetting
=
(
partial
:
Partial
<
WorkspaceMemoRelatedSetting
>
)
=>
{
const
updatePartialSetting
=
(
partial
:
Partial
<
Workspace
Setting_
MemoRelatedSetting
>
)
=>
{
const
newWorkspaceMemoRelatedSetting
=
WorkspaceMemoRelatedSetting
.
fromPartial
({
const
newWorkspaceMemoRelatedSetting
=
Workspace
Setting_
MemoRelatedSetting
.
fromPartial
({
...
memoRelatedSetting
,
...
memoRelatedSetting
,
...
partial
,
...
partial
,
});
});
...
...
web/src/components/Settings/StorageSection.tsx
View file @
3f56ce47
...
@@ -15,21 +15,25 @@ import { workspaceStore } from "@/store";
...
@@ -15,21 +15,25 @@ import { workspaceStore } from "@/store";
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
import
{
WorkspaceSetting_Key
,
WorkspaceSetting_Key
,
WorkspaceStorageSetting
,
WorkspaceS
etting_S
torageSetting
,
WorkspaceStorageSetting_S3Config
,
WorkspaceS
etting_S
torageSetting_S3Config
,
WorkspaceStorageSetting_StorageType
,
WorkspaceS
etting_S
torageSetting_StorageType
,
}
from
"@/types/proto/api/v1/workspace_service"
;
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
const
StorageSection
=
observer
(()
=>
{
const
StorageSection
=
observer
(()
=>
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
[
workspaceStorageSetting
,
setWorkspaceStorageSetting
]
=
useState
<
WorkspaceStorageSetting
>
(
const
[
workspaceStorageSetting
,
setWorkspaceStorageSetting
]
=
useState
<
WorkspaceSetting_StorageSetting
>
(
WorkspaceStorageSetting
.
fromPartial
(
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)?.
storageSetting
||
{}),
WorkspaceSetting_StorageSetting
.
fromPartial
(
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)?.
storageSetting
||
{},
),
);
);
useEffect
(()
=>
{
useEffect
(()
=>
{
setWorkspaceStorageSetting
(
setWorkspaceStorageSetting
(
WorkspaceStorageSetting
.
fromPartial
(
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)?.
storageSetting
||
{}),
WorkspaceSetting_StorageSetting
.
fromPartial
(
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)?.
storageSetting
||
{},
),
);
);
},
[
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)]);
},
[
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)]);
...
@@ -38,14 +42,14 @@ const StorageSection = observer(() => {
...
@@ -38,14 +42,14 @@ const StorageSection = observer(() => {
return
false
;
return
false
;
}
}
const
origin
=
WorkspaceStorageSetting
.
fromPartial
(
const
origin
=
WorkspaceS
etting_S
torageSetting
.
fromPartial
(
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)?.
storageSetting
||
{},
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
STORAGE
)?.
storageSetting
||
{},
);
);
if
(
workspaceStorageSetting
.
storageType
===
WorkspaceStorageSetting_StorageType
.
LOCAL
)
{
if
(
workspaceStorageSetting
.
storageType
===
WorkspaceS
etting_S
torageSetting_StorageType
.
LOCAL
)
{
if
(
workspaceStorageSetting
.
filepathTemplate
.
length
===
0
)
{
if
(
workspaceStorageSetting
.
filepathTemplate
.
length
===
0
)
{
return
false
;
return
false
;
}
}
}
else
if
(
workspaceStorageSetting
.
storageType
===
WorkspaceStorageSetting_StorageType
.
S3
)
{
}
else
if
(
workspaceStorageSetting
.
storageType
===
WorkspaceS
etting_S
torageSetting_StorageType
.
S3
)
{
if
(
if
(
workspaceStorageSetting
.
s3Config
?.
accessKeyId
.
length
===
0
||
workspaceStorageSetting
.
s3Config
?.
accessKeyId
.
length
===
0
||
workspaceStorageSetting
.
s3Config
?.
accessKeySecret
.
length
===
0
||
workspaceStorageSetting
.
s3Config
?.
accessKeySecret
.
length
===
0
||
...
@@ -64,7 +68,7 @@ const StorageSection = observer(() => {
...
@@ -64,7 +68,7 @@ const StorageSection = observer(() => {
if
(
Number
.
isNaN
(
num
))
{
if
(
Number
.
isNaN
(
num
))
{
num
=
0
;
num
=
0
;
}
}
const
update
:
WorkspaceStorageSetting
=
{
const
update
:
WorkspaceS
etting_S
torageSetting
=
{
...
workspaceStorageSetting
,
...
workspaceStorageSetting
,
uploadSizeLimitMb
:
num
,
uploadSizeLimitMb
:
num
,
};
};
...
@@ -72,17 +76,17 @@ const StorageSection = observer(() => {
...
@@ -72,17 +76,17 @@ const StorageSection = observer(() => {
};
};
const
handleFilepathTemplateChanged
=
async
(
event
:
React
.
FocusEvent
<
HTMLInputElement
>
)
=>
{
const
handleFilepathTemplateChanged
=
async
(
event
:
React
.
FocusEvent
<
HTMLInputElement
>
)
=>
{
const
update
:
WorkspaceStorageSetting
=
{
const
update
:
WorkspaceS
etting_S
torageSetting
=
{
...
workspaceStorageSetting
,
...
workspaceStorageSetting
,
filepathTemplate
:
event
.
target
.
value
,
filepathTemplate
:
event
.
target
.
value
,
};
};
setWorkspaceStorageSetting
(
update
);
setWorkspaceStorageSetting
(
update
);
};
};
const
handlePartialS3ConfigChanged
=
async
(
s3Config
:
Partial
<
WorkspaceStorageSetting_S3Config
>
)
=>
{
const
handlePartialS3ConfigChanged
=
async
(
s3Config
:
Partial
<
WorkspaceS
etting_S
torageSetting_S3Config
>
)
=>
{
const
update
:
WorkspaceStorageSetting
=
{
const
update
:
WorkspaceS
etting_S
torageSetting
=
{
...
workspaceStorageSetting
,
...
workspaceStorageSetting
,
s3Config
:
WorkspaceStorageSetting_S3Config
.
fromPartial
({
s3Config
:
WorkspaceS
etting_S
torageSetting_S3Config
.
fromPartial
({
...
workspaceStorageSetting
.
s3Config
,
...
workspaceStorageSetting
.
s3Config
,
...
s3Config
,
...
s3Config
,
}),
}),
...
@@ -116,8 +120,8 @@ const StorageSection = observer(() => {
...
@@ -116,8 +120,8 @@ const StorageSection = observer(() => {
});
});
};
};
const
handleStorageTypeChanged
=
async
(
storageType
:
WorkspaceStorageSetting_StorageType
)
=>
{
const
handleStorageTypeChanged
=
async
(
storageType
:
WorkspaceS
etting_S
torageSetting_StorageType
)
=>
{
const
update
:
WorkspaceStorageSetting
=
{
const
update
:
WorkspaceS
etting_S
torageSetting
=
{
...
workspaceStorageSetting
,
...
workspaceStorageSetting
,
storageType
:
storageType
,
storageType
:
storageType
,
};
};
...
@@ -138,20 +142,20 @@ const StorageSection = observer(() => {
...
@@ -138,20 +142,20 @@ const StorageSection = observer(() => {
<
RadioGroup
<
RadioGroup
value=
{
workspaceStorageSetting
.
storageType
}
value=
{
workspaceStorageSetting
.
storageType
}
onValueChange=
{
(
value
)
=>
{
onValueChange=
{
(
value
)
=>
{
handleStorageTypeChanged
(
value
as
WorkspaceStorageSetting_StorageType
);
handleStorageTypeChanged
(
value
as
WorkspaceS
etting_S
torageSetting_StorageType
);
}
}
}
}
className=
"flex flex-row gap-4"
className=
"flex flex-row gap-4"
>
>
<
div
className=
"flex items-center space-x-2"
>
<
div
className=
"flex items-center space-x-2"
>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
DATABASE
}
id=
"database"
/>
<
RadioGroupItem
value=
{
WorkspaceS
etting_S
torageSetting_StorageType
.
DATABASE
}
id=
"database"
/>
<
Label
htmlFor=
"database"
>
{
t
(
"setting.storage-section.type-database"
)
}
</
Label
>
<
Label
htmlFor=
"database"
>
{
t
(
"setting.storage-section.type-database"
)
}
</
Label
>
</
div
>
</
div
>
<
div
className=
"flex items-center space-x-2"
>
<
div
className=
"flex items-center space-x-2"
>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
LOCAL
}
id=
"local"
/>
<
RadioGroupItem
value=
{
WorkspaceS
etting_S
torageSetting_StorageType
.
LOCAL
}
id=
"local"
/>
<
Label
htmlFor=
"local"
>
{
t
(
"setting.storage-section.type-local"
)
}
</
Label
>
<
Label
htmlFor=
"local"
>
{
t
(
"setting.storage-section.type-local"
)
}
</
Label
>
</
div
>
</
div
>
<
div
className=
"flex items-center space-x-2"
>
<
div
className=
"flex items-center space-x-2"
>
<
RadioGroupItem
value=
{
WorkspaceStorageSetting_StorageType
.
S3
}
id=
"s3"
/>
<
RadioGroupItem
value=
{
WorkspaceS
etting_S
torageSetting_StorageType
.
S3
}
id=
"s3"
/>
<
Label
htmlFor=
"s3"
>
S3
</
Label
>
<
Label
htmlFor=
"s3"
>
S3
</
Label
>
</
div
>
</
div
>
</
RadioGroup
>
</
RadioGroup
>
...
@@ -171,7 +175,7 @@ const StorageSection = observer(() => {
...
@@ -171,7 +175,7 @@ const StorageSection = observer(() => {
</
div
>
</
div
>
<
Input
className=
"w-16 font-mono"
value=
{
workspaceStorageSetting
.
uploadSizeLimitMb
}
onChange=
{
handleMaxUploadSizeChanged
}
/>
<
Input
className=
"w-16 font-mono"
value=
{
workspaceStorageSetting
.
uploadSizeLimitMb
}
onChange=
{
handleMaxUploadSizeChanged
}
/>
</
div
>
</
div
>
{
workspaceStorageSetting
.
storageType
!==
WorkspaceStorageSetting_StorageType
.
DATABASE
&&
(
{
workspaceStorageSetting
.
storageType
!==
WorkspaceS
etting_S
torageSetting_StorageType
.
DATABASE
&&
(
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
{
t
(
"setting.storage-section.filepath-template"
)
}
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
{
t
(
"setting.storage-section.filepath-template"
)
}
</
span
>
<
Input
<
Input
...
@@ -182,7 +186,7 @@ const StorageSection = observer(() => {
...
@@ -182,7 +186,7 @@ const StorageSection = observer(() => {
/>
/>
</
div
>
</
div
>
)
}
)
}
{
workspaceStorageSetting
.
storageType
===
WorkspaceStorageSetting_StorageType
.
S3
&&
(
{
workspaceStorageSetting
.
storageType
===
WorkspaceS
etting_S
torageSetting_StorageType
.
S3
&&
(
<>
<>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"text-muted-foreground mr-1"
>
Access key id
</
span
>
<
span
className=
"text-muted-foreground mr-1"
>
Access key id
</
span
>
...
...
web/src/components/Settings/WorkspaceSection.tsx
View file @
3f56ce47
...
@@ -14,7 +14,7 @@ import useDialog from "@/hooks/useDialog";
...
@@ -14,7 +14,7 @@ import useDialog from "@/hooks/useDialog";
import
{
workspaceStore
}
from
"@/store"
;
import
{
workspaceStore
}
from
"@/store"
;
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
IdentityProvider
}
from
"@/types/proto/api/v1/idp_service"
;
import
{
IdentityProvider
}
from
"@/types/proto/api/v1/idp_service"
;
import
{
WorkspaceGeneralSetting
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
Workspace
Setting_
GeneralSetting
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
ThemeSelector
from
"../ThemeSelector"
;
import
ThemeSelector
from
"../ThemeSelector"
;
import
UpdateCustomizedProfileDialog
from
"../UpdateCustomizedProfileDialog"
;
import
UpdateCustomizedProfileDialog
from
"../UpdateCustomizedProfileDialog"
;
...
@@ -22,10 +22,10 @@ import UpdateCustomizedProfileDialog from "../UpdateCustomizedProfileDialog";
...
@@ -22,10 +22,10 @@ import UpdateCustomizedProfileDialog from "../UpdateCustomizedProfileDialog";
const
WorkspaceSection
=
observer
(()
=>
{
const
WorkspaceSection
=
observer
(()
=>
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
customizeDialog
=
useDialog
();
const
customizeDialog
=
useDialog
();
const
originalSetting
=
WorkspaceGeneralSetting
.
fromPartial
(
const
originalSetting
=
Workspace
Setting_
GeneralSetting
.
fromPartial
(
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
GENERAL
)?.
generalSetting
||
{},
workspaceStore
.
getWorkspaceSettingByKey
(
WorkspaceSetting_Key
.
GENERAL
)?.
generalSetting
||
{},
);
);
const
[
workspaceGeneralSetting
,
setWorkspaceGeneralSetting
]
=
useState
<
WorkspaceGeneralSetting
>
(
originalSetting
);
const
[
workspaceGeneralSetting
,
setWorkspaceGeneralSetting
]
=
useState
<
Workspace
Setting_
GeneralSetting
>
(
originalSetting
);
const
[
identityProviderList
,
setIdentityProviderList
]
=
useState
<
IdentityProvider
[]
>
([]);
const
[
identityProviderList
,
setIdentityProviderList
]
=
useState
<
IdentityProvider
[]
>
([]);
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -36,9 +36,9 @@ const WorkspaceSection = observer(() => {
...
@@ -36,9 +36,9 @@ const WorkspaceSection = observer(() => {
customizeDialog
.
open
();
customizeDialog
.
open
();
};
};
const
updatePartialSetting
=
(
partial
:
Partial
<
WorkspaceGeneralSetting
>
)
=>
{
const
updatePartialSetting
=
(
partial
:
Partial
<
Workspace
Setting_
GeneralSetting
>
)
=>
{
setWorkspaceGeneralSetting
(
setWorkspaceGeneralSetting
(
WorkspaceGeneralSetting
.
fromPartial
({
Workspace
Setting_
GeneralSetting
.
fromPartial
({
...
workspaceGeneralSetting
,
...
workspaceGeneralSetting
,
...
partial
,
...
partial
,
}),
}),
...
...
web/src/components/UpdateCustomizedProfileDialog.tsx
View file @
3f56ce47
...
@@ -7,7 +7,7 @@ import { Label } from "@/components/ui/label";
...
@@ -7,7 +7,7 @@ import { Label } from "@/components/ui/label";
import
{
Textarea
}
from
"@/components/ui/textarea"
;
import
{
Textarea
}
from
"@/components/ui/textarea"
;
import
{
workspaceStore
}
from
"@/store"
;
import
{
workspaceStore
}
from
"@/store"
;
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
workspaceSettingNamePrefix
}
from
"@/store/common"
;
import
{
WorkspaceCustomProfile
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
Workspace
Setting_GeneralSetting_
CustomProfile
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
AppearanceSelect
from
"./AppearanceSelect"
;
import
AppearanceSelect
from
"./AppearanceSelect"
;
import
LocaleSelect
from
"./LocaleSelect"
;
import
LocaleSelect
from
"./LocaleSelect"
;
...
@@ -21,13 +21,13 @@ interface Props {
...
@@ -21,13 +21,13 @@ interface Props {
function
UpdateCustomizedProfileDialog
({
open
,
onOpenChange
,
onSuccess
}:
Props
)
{
function
UpdateCustomizedProfileDialog
({
open
,
onOpenChange
,
onSuccess
}:
Props
)
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
workspaceGeneralSetting
=
workspaceStore
.
state
.
generalSetting
;
const
workspaceGeneralSetting
=
workspaceStore
.
state
.
generalSetting
;
const
[
customProfile
,
setCustomProfile
]
=
useState
<
WorkspaceCustomProfile
>
(
const
[
customProfile
,
setCustomProfile
]
=
useState
<
Workspace
Setting_GeneralSetting_
CustomProfile
>
(
WorkspaceCustomProfile
.
fromPartial
(
workspaceGeneralSetting
.
customProfile
||
{}),
Workspace
Setting_GeneralSetting_
CustomProfile
.
fromPartial
(
workspaceGeneralSetting
.
customProfile
||
{}),
);
);
const
[
isLoading
,
setIsLoading
]
=
useState
(
false
);
const
[
isLoading
,
setIsLoading
]
=
useState
(
false
);
const
setPartialState
=
(
partialState
:
Partial
<
WorkspaceCustomProfile
>
)
=>
{
const
setPartialState
=
(
partialState
:
Partial
<
Workspace
Setting_GeneralSetting_
CustomProfile
>
)
=>
{
setCustomProfile
((
state
)
=>
({
setCustomProfile
((
state
)
=>
({
...
state
,
...
state
,
...
partialState
,
...
partialState
,
...
...
web/src/store/workspace.ts
View file @
3f56ce47
...
@@ -2,7 +2,11 @@ import { uniqBy } from "lodash-es";
...
@@ -2,7 +2,11 @@ import { uniqBy } from "lodash-es";
import
{
makeAutoObservable
}
from
"mobx"
;
import
{
makeAutoObservable
}
from
"mobx"
;
import
{
workspaceServiceClient
}
from
"@/grpcweb"
;
import
{
workspaceServiceClient
}
from
"@/grpcweb"
;
import
{
WorkspaceProfile
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
WorkspaceProfile
,
WorkspaceSetting_Key
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
WorkspaceGeneralSetting
,
WorkspaceMemoRelatedSetting
,
WorkspaceSetting
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
WorkspaceSetting_GeneralSetting
,
WorkspaceSetting_MemoRelatedSetting
,
WorkspaceSetting
,
}
from
"@/types/proto/api/v1/workspace_service"
;
import
{
isValidateLocale
}
from
"@/utils/i18n"
;
import
{
isValidateLocale
}
from
"@/utils/i18n"
;
import
{
workspaceSettingNamePrefix
}
from
"./common"
;
import
{
workspaceSettingNamePrefix
}
from
"./common"
;
...
@@ -15,14 +19,14 @@ class LocalState {
...
@@ -15,14 +19,14 @@ class LocalState {
get
generalSetting
()
{
get
generalSetting
()
{
return
(
return
(
this
.
settings
.
find
((
setting
)
=>
setting
.
name
===
`
${
workspaceSettingNamePrefix
}${
WorkspaceSetting_Key
.
GENERAL
}
`
)?.
generalSetting
||
this
.
settings
.
find
((
setting
)
=>
setting
.
name
===
`
${
workspaceSettingNamePrefix
}${
WorkspaceSetting_Key
.
GENERAL
}
`
)?.
generalSetting
||
WorkspaceGeneralSetting
.
fromPartial
({})
Workspace
Setting_
GeneralSetting
.
fromPartial
({})
);
);
}
}
get
memoRelatedSetting
()
{
get
memoRelatedSetting
()
{
return
(
return
(
this
.
settings
.
find
((
setting
)
=>
setting
.
name
===
`
${
workspaceSettingNamePrefix
}${
WorkspaceSetting_Key
.
MEMO_RELATED
}
`
)
this
.
settings
.
find
((
setting
)
=>
setting
.
name
===
`
${
workspaceSettingNamePrefix
}${
WorkspaceSetting_Key
.
MEMO_RELATED
}
`
)
?.
memoRelatedSetting
||
WorkspaceMemoRelatedSetting
.
fromPartial
({})
?.
memoRelatedSetting
||
Workspace
Setting_
MemoRelatedSetting
.
fromPartial
({})
);
);
}
}
...
...
web/src/types/proto/api/v1/workspace_service.ts
View file @
3f56ce47
...
@@ -36,15 +36,14 @@ export interface WorkspaceSetting {
...
@@ -36,15 +36,14 @@ export interface WorkspaceSetting {
* Format: workspace/settings/{setting}
* Format: workspace/settings/{setting}
*/
*/
name
:
string
;
name
:
string
;
generalSetting
?:
WorkspaceGeneralSetting
|
undefined
;
generalSetting
?:
Workspace
Setting_
GeneralSetting
|
undefined
;
storageSetting
?:
WorkspaceStorageSetting
|
undefined
;
storageSetting
?:
WorkspaceS
etting_S
torageSetting
|
undefined
;
memoRelatedSetting
?:
WorkspaceMemoRelatedSetting
|
undefined
;
memoRelatedSetting
?:
Workspace
Setting_
MemoRelatedSetting
|
undefined
;
}
}
/** Enumeration of workspace setting keys. */
export
enum
WorkspaceSetting_Key
{
export
enum
WorkspaceSetting_Key
{
KEY_UNSPECIFIED
=
"KEY_UNSPECIFIED"
,
KEY_UNSPECIFIED
=
"KEY_UNSPECIFIED"
,
/** BASIC - BASIC is the key for basic settings. */
BASIC
=
"BASIC"
,
/** GENERAL - GENERAL is the key for general settings. */
/** GENERAL - GENERAL is the key for general settings. */
GENERAL
=
"GENERAL"
,
GENERAL
=
"GENERAL"
,
/** STORAGE - STORAGE is the key for storage settings. */
/** STORAGE - STORAGE is the key for storage settings. */
...
@@ -60,15 +59,12 @@ export function workspaceSetting_KeyFromJSON(object: any): WorkspaceSetting_Key
...
@@ -60,15 +59,12 @@ export function workspaceSetting_KeyFromJSON(object: any): WorkspaceSetting_Key
case
"KEY_UNSPECIFIED"
:
case
"KEY_UNSPECIFIED"
:
return
WorkspaceSetting_Key
.
KEY_UNSPECIFIED
;
return
WorkspaceSetting_Key
.
KEY_UNSPECIFIED
;
case
1
:
case
1
:
case
"BASIC"
:
return
WorkspaceSetting_Key
.
BASIC
;
case
2
:
case
"GENERAL"
:
case
"GENERAL"
:
return
WorkspaceSetting_Key
.
GENERAL
;
return
WorkspaceSetting_Key
.
GENERAL
;
case
3
:
case
2
:
case
"STORAGE"
:
case
"STORAGE"
:
return
WorkspaceSetting_Key
.
STORAGE
;
return
WorkspaceSetting_Key
.
STORAGE
;
case
4
:
case
3
:
case
"MEMO_RELATED"
:
case
"MEMO_RELATED"
:
return
WorkspaceSetting_Key
.
MEMO_RELATED
;
return
WorkspaceSetting_Key
.
MEMO_RELATED
;
case
-
1
:
case
-
1
:
...
@@ -82,21 +78,20 @@ export function workspaceSetting_KeyToNumber(object: WorkspaceSetting_Key): numb
...
@@ -82,21 +78,20 @@ export function workspaceSetting_KeyToNumber(object: WorkspaceSetting_Key): numb
switch
(
object
)
{
switch
(
object
)
{
case
WorkspaceSetting_Key
.
KEY_UNSPECIFIED
:
case
WorkspaceSetting_Key
.
KEY_UNSPECIFIED
:
return
0
;
return
0
;
case
WorkspaceSetting_Key
.
BASIC
:
return
1
;
case
WorkspaceSetting_Key
.
GENERAL
:
case
WorkspaceSetting_Key
.
GENERAL
:
return
2
;
return
1
;
case
WorkspaceSetting_Key
.
STORAGE
:
case
WorkspaceSetting_Key
.
STORAGE
:
return
3
;
return
2
;
case
WorkspaceSetting_Key
.
MEMO_RELATED
:
case
WorkspaceSetting_Key
.
MEMO_RELATED
:
return
4
;
return
3
;
case
WorkspaceSetting_Key
.
UNRECOGNIZED
:
case
WorkspaceSetting_Key
.
UNRECOGNIZED
:
default
:
default
:
return
-
1
;
return
-
1
;
}
}
}
}
export
interface
WorkspaceGeneralSetting
{
/** General workspace settings configuration. */
export
interface
WorkspaceSetting_GeneralSetting
{
/**
/**
* theme is the name of the selected theme.
* theme is the name of the selected theme.
* This references a CSS file in the web/public/themes/ directory.
* This references a CSS file in the web/public/themes/ directory.
...
@@ -112,7 +107,7 @@ export interface WorkspaceGeneralSetting {
...
@@ -112,7 +107,7 @@ export interface WorkspaceGeneralSetting {
additionalStyle
:
string
;
additionalStyle
:
string
;
/** custom_profile is the custom profile. */
/** custom_profile is the custom profile. */
customProfile
?:
customProfile
?:
|
WorkspaceCustomProfile
|
Workspace
Setting_GeneralSetting_
CustomProfile
|
undefined
;
|
undefined
;
/**
/**
* week_start_day_offset is the week start day offset from Sunday.
* week_start_day_offset is the week start day offset from Sunday.
...
@@ -126,7 +121,8 @@ export interface WorkspaceGeneralSetting {
...
@@ -126,7 +121,8 @@ export interface WorkspaceGeneralSetting {
disallowChangeNickname
:
boolean
;
disallowChangeNickname
:
boolean
;
}
}
export
interface
WorkspaceCustomProfile
{
/** Custom profile configuration for workspace branding. */
export
interface
WorkspaceSetting_GeneralSetting_CustomProfile
{
title
:
string
;
title
:
string
;
description
:
string
;
description
:
string
;
logoUrl
:
string
;
logoUrl
:
string
;
...
@@ -134,9 +130,10 @@ export interface WorkspaceCustomProfile {
...
@@ -134,9 +130,10 @@ export interface WorkspaceCustomProfile {
appearance
:
string
;
appearance
:
string
;
}
}
export
interface
WorkspaceStorageSetting
{
/** Storage configuration settings for workspace attachments. */
export
interface
WorkspaceSetting_StorageSetting
{
/** storage_type is the storage type. */
/** storage_type is the storage type. */
storageType
:
WorkspaceStorageSetting_StorageType
;
storageType
:
WorkspaceS
etting_S
torageSetting_StorageType
;
/**
/**
* The template of file path.
* The template of file path.
* e.g. assets/{timestamp}_{filename}
* e.g. assets/{timestamp}_{filename}
...
@@ -145,10 +142,11 @@ export interface WorkspaceStorageSetting {
...
@@ -145,10 +142,11 @@ export interface WorkspaceStorageSetting {
/** The max upload size in megabytes. */
/** The max upload size in megabytes. */
uploadSizeLimitMb
:
number
;
uploadSizeLimitMb
:
number
;
/** The S3 config. */
/** The S3 config. */
s3Config
?:
WorkspaceStorageSetting_S3Config
|
undefined
;
s3Config
?:
WorkspaceS
etting_S
torageSetting_S3Config
|
undefined
;
}
}
export
enum
WorkspaceStorageSetting_StorageType
{
/** Storage type enumeration for different storage backends. */
export
enum
WorkspaceSetting_StorageSetting_StorageType
{
STORAGE_TYPE_UNSPECIFIED
=
"STORAGE_TYPE_UNSPECIFIED"
,
STORAGE_TYPE_UNSPECIFIED
=
"STORAGE_TYPE_UNSPECIFIED"
,
/** DATABASE - DATABASE is the database storage type. */
/** DATABASE - DATABASE is the database storage type. */
DATABASE
=
"DATABASE"
,
DATABASE
=
"DATABASE"
,
...
@@ -159,45 +157,52 @@ export enum WorkspaceStorageSetting_StorageType {
...
@@ -159,45 +157,52 @@ export enum WorkspaceStorageSetting_StorageType {
UNRECOGNIZED
=
"UNRECOGNIZED"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
}
}
export
function
workspaceStorageSetting_StorageTypeFromJSON
(
object
:
any
):
WorkspaceStorageSetting_StorageType
{
export
function
workspaceSetting_StorageSetting_StorageTypeFromJSON
(
object
:
any
,
):
WorkspaceSetting_StorageSetting_StorageType
{
switch
(
object
)
{
switch
(
object
)
{
case
0
:
case
0
:
case
"STORAGE_TYPE_UNSPECIFIED"
:
case
"STORAGE_TYPE_UNSPECIFIED"
:
return
WorkspaceStorageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
;
return
WorkspaceS
etting_S
torageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
;
case
1
:
case
1
:
case
"DATABASE"
:
case
"DATABASE"
:
return
WorkspaceStorageSetting_StorageType
.
DATABASE
;
return
WorkspaceS
etting_S
torageSetting_StorageType
.
DATABASE
;
case
2
:
case
2
:
case
"LOCAL"
:
case
"LOCAL"
:
return
WorkspaceStorageSetting_StorageType
.
LOCAL
;
return
WorkspaceS
etting_S
torageSetting_StorageType
.
LOCAL
;
case
3
:
case
3
:
case
"S3"
:
case
"S3"
:
return
WorkspaceStorageSetting_StorageType
.
S3
;
return
WorkspaceS
etting_S
torageSetting_StorageType
.
S3
;
case
-
1
:
case
-
1
:
case
"UNRECOGNIZED"
:
case
"UNRECOGNIZED"
:
default
:
default
:
return
WorkspaceStorageSetting_StorageType
.
UNRECOGNIZED
;
return
WorkspaceS
etting_S
torageSetting_StorageType
.
UNRECOGNIZED
;
}
}
}
}
export
function
workspaceStorageSetting_StorageTypeToNumber
(
object
:
WorkspaceStorageSetting_StorageType
):
number
{
export
function
workspaceSetting_StorageSetting_StorageTypeToNumber
(
object
:
WorkspaceSetting_StorageSetting_StorageType
,
):
number
{
switch
(
object
)
{
switch
(
object
)
{
case
WorkspaceStorageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
:
case
WorkspaceS
etting_S
torageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
:
return
0
;
return
0
;
case
WorkspaceStorageSetting_StorageType
.
DATABASE
:
case
WorkspaceS
etting_S
torageSetting_StorageType
.
DATABASE
:
return
1
;
return
1
;
case
WorkspaceStorageSetting_StorageType
.
LOCAL
:
case
WorkspaceS
etting_S
torageSetting_StorageType
.
LOCAL
:
return
2
;
return
2
;
case
WorkspaceStorageSetting_StorageType
.
S3
:
case
WorkspaceS
etting_S
torageSetting_StorageType
.
S3
:
return
3
;
return
3
;
case
WorkspaceStorageSetting_StorageType
.
UNRECOGNIZED
:
case
WorkspaceS
etting_S
torageSetting_StorageType
.
UNRECOGNIZED
:
default
:
default
:
return
-
1
;
return
-
1
;
}
}
}
}
/** Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/ */
/**
export
interface
WorkspaceStorageSetting_S3Config
{
* S3 configuration for cloud storage backend.
* Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
*/
export
interface
WorkspaceSetting_StorageSetting_S3Config
{
accessKeyId
:
string
;
accessKeyId
:
string
;
accessKeySecret
:
string
;
accessKeySecret
:
string
;
endpoint
:
string
;
endpoint
:
string
;
...
@@ -206,7 +211,8 @@ export interface WorkspaceStorageSetting_S3Config {
...
@@ -206,7 +211,8 @@ export interface WorkspaceStorageSetting_S3Config {
usePathStyle
:
boolean
;
usePathStyle
:
boolean
;
}
}
export
interface
WorkspaceMemoRelatedSetting
{
/** Memo-related workspace settings and policies. */
export
interface
WorkspaceSetting_MemoRelatedSetting
{
/** disallow_public_visibility disallows set memo as public visibility. */
/** disallow_public_visibility disallows set memo as public visibility. */
disallowPublicVisibility
:
boolean
;
disallowPublicVisibility
:
boolean
;
/** display_with_update_time orders and displays memo with update time. */
/** display_with_update_time orders and displays memo with update time. */
...
@@ -374,13 +380,13 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
...
@@ -374,13 +380,13 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
writer
.
uint32
(
10
).
string
(
message
.
name
);
writer
.
uint32
(
10
).
string
(
message
.
name
);
}
}
if
(
message
.
generalSetting
!==
undefined
)
{
if
(
message
.
generalSetting
!==
undefined
)
{
WorkspaceGeneralSetting
.
encode
(
message
.
generalSetting
,
writer
.
uint32
(
18
).
fork
()).
join
();
Workspace
Setting_
GeneralSetting
.
encode
(
message
.
generalSetting
,
writer
.
uint32
(
18
).
fork
()).
join
();
}
}
if
(
message
.
storageSetting
!==
undefined
)
{
if
(
message
.
storageSetting
!==
undefined
)
{
WorkspaceStorageSetting
.
encode
(
message
.
storageSetting
,
writer
.
uint32
(
26
).
fork
()).
join
();
WorkspaceS
etting_S
torageSetting
.
encode
(
message
.
storageSetting
,
writer
.
uint32
(
26
).
fork
()).
join
();
}
}
if
(
message
.
memoRelatedSetting
!==
undefined
)
{
if
(
message
.
memoRelatedSetting
!==
undefined
)
{
WorkspaceMemoRelatedSetting
.
encode
(
message
.
memoRelatedSetting
,
writer
.
uint32
(
34
).
fork
()).
join
();
Workspace
Setting_
MemoRelatedSetting
.
encode
(
message
.
memoRelatedSetting
,
writer
.
uint32
(
34
).
fork
()).
join
();
}
}
return
writer
;
return
writer
;
},
},
...
@@ -405,7 +411,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
...
@@ -405,7 +411,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
break
;
break
;
}
}
message
.
generalSetting
=
WorkspaceGeneralSetting
.
decode
(
reader
,
reader
.
uint32
());
message
.
generalSetting
=
Workspace
Setting_
GeneralSetting
.
decode
(
reader
,
reader
.
uint32
());
continue
;
continue
;
}
}
case
3
:
{
case
3
:
{
...
@@ -413,7 +419,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
...
@@ -413,7 +419,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
break
;
break
;
}
}
message
.
storageSetting
=
WorkspaceStorageSetting
.
decode
(
reader
,
reader
.
uint32
());
message
.
storageSetting
=
WorkspaceS
etting_S
torageSetting
.
decode
(
reader
,
reader
.
uint32
());
continue
;
continue
;
}
}
case
4
:
{
case
4
:
{
...
@@ -421,7 +427,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
...
@@ -421,7 +427,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
break
;
break
;
}
}
message
.
memoRelatedSetting
=
WorkspaceMemoRelatedSetting
.
decode
(
reader
,
reader
.
uint32
());
message
.
memoRelatedSetting
=
Workspace
Setting_
MemoRelatedSetting
.
decode
(
reader
,
reader
.
uint32
());
continue
;
continue
;
}
}
}
}
...
@@ -440,19 +446,19 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
...
@@ -440,19 +446,19 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
const
message
=
createBaseWorkspaceSetting
();
const
message
=
createBaseWorkspaceSetting
();
message
.
name
=
object
.
name
??
""
;
message
.
name
=
object
.
name
??
""
;
message
.
generalSetting
=
(
object
.
generalSetting
!==
undefined
&&
object
.
generalSetting
!==
null
)
message
.
generalSetting
=
(
object
.
generalSetting
!==
undefined
&&
object
.
generalSetting
!==
null
)
?
WorkspaceGeneralSetting
.
fromPartial
(
object
.
generalSetting
)
?
Workspace
Setting_
GeneralSetting
.
fromPartial
(
object
.
generalSetting
)
:
undefined
;
:
undefined
;
message
.
storageSetting
=
(
object
.
storageSetting
!==
undefined
&&
object
.
storageSetting
!==
null
)
message
.
storageSetting
=
(
object
.
storageSetting
!==
undefined
&&
object
.
storageSetting
!==
null
)
?
WorkspaceStorageSetting
.
fromPartial
(
object
.
storageSetting
)
?
WorkspaceS
etting_S
torageSetting
.
fromPartial
(
object
.
storageSetting
)
:
undefined
;
:
undefined
;
message
.
memoRelatedSetting
=
(
object
.
memoRelatedSetting
!==
undefined
&&
object
.
memoRelatedSetting
!==
null
)
message
.
memoRelatedSetting
=
(
object
.
memoRelatedSetting
!==
undefined
&&
object
.
memoRelatedSetting
!==
null
)
?
WorkspaceMemoRelatedSetting
.
fromPartial
(
object
.
memoRelatedSetting
)
?
Workspace
Setting_
MemoRelatedSetting
.
fromPartial
(
object
.
memoRelatedSetting
)
:
undefined
;
:
undefined
;
return
message
;
return
message
;
},
},
};
};
function
createBaseWorkspace
GeneralSetting
():
Workspace
GeneralSetting
{
function
createBaseWorkspace
Setting_GeneralSetting
():
WorkspaceSetting_
GeneralSetting
{
return
{
return
{
theme
:
""
,
theme
:
""
,
disallowUserRegistration
:
false
,
disallowUserRegistration
:
false
,
...
@@ -466,8 +472,8 @@ function createBaseWorkspaceGeneralSetting(): WorkspaceGeneralSetting {
...
@@ -466,8 +472,8 @@ function createBaseWorkspaceGeneralSetting(): WorkspaceGeneralSetting {
};
};
}
}
export
const
Workspace
GeneralSetting
:
MessageFns
<
Workspace
GeneralSetting
>
=
{
export
const
Workspace
Setting_GeneralSetting
:
MessageFns
<
WorkspaceSetting_
GeneralSetting
>
=
{
encode
(
message
:
WorkspaceGeneralSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
encode
(
message
:
Workspace
Setting_
GeneralSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
theme
!==
""
)
{
if
(
message
.
theme
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
theme
);
writer
.
uint32
(
10
).
string
(
message
.
theme
);
}
}
...
@@ -484,7 +490,7 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
...
@@ -484,7 +490,7 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
writer
.
uint32
(
42
).
string
(
message
.
additionalStyle
);
writer
.
uint32
(
42
).
string
(
message
.
additionalStyle
);
}
}
if
(
message
.
customProfile
!==
undefined
)
{
if
(
message
.
customProfile
!==
undefined
)
{
WorkspaceCustomProfile
.
encode
(
message
.
customProfile
,
writer
.
uint32
(
50
).
fork
()).
join
();
Workspace
Setting_GeneralSetting_
CustomProfile
.
encode
(
message
.
customProfile
,
writer
.
uint32
(
50
).
fork
()).
join
();
}
}
if
(
message
.
weekStartDayOffset
!==
0
)
{
if
(
message
.
weekStartDayOffset
!==
0
)
{
writer
.
uint32
(
56
).
int32
(
message
.
weekStartDayOffset
);
writer
.
uint32
(
56
).
int32
(
message
.
weekStartDayOffset
);
...
@@ -498,10 +504,10 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
...
@@ -498,10 +504,10 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
return
writer
;
return
writer
;
},
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceGeneralSetting
{
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
Workspace
Setting_
GeneralSetting
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseWorkspaceGeneralSetting
();
const
message
=
createBaseWorkspace
Setting_
GeneralSetting
();
while
(
reader
.
pos
<
end
)
{
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
switch
(
tag
>>>
3
)
{
...
@@ -550,7 +556,7 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
...
@@ -550,7 +556,7 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
break
;
break
;
}
}
message
.
customProfile
=
WorkspaceCustomProfile
.
decode
(
reader
,
reader
.
uint32
());
message
.
customProfile
=
Workspace
Setting_GeneralSetting_
CustomProfile
.
decode
(
reader
,
reader
.
uint32
());
continue
;
continue
;
}
}
case
7
:
{
case
7
:
{
...
@@ -586,18 +592,18 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
...
@@ -586,18 +592,18 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
return
message
;
return
message
;
},
},
create
(
base
?:
DeepPartial
<
Workspace
GeneralSetting
>
):
Workspace
GeneralSetting
{
create
(
base
?:
DeepPartial
<
Workspace
Setting_GeneralSetting
>
):
WorkspaceSetting_
GeneralSetting
{
return
WorkspaceGeneralSetting
.
fromPartial
(
base
??
{});
return
Workspace
Setting_
GeneralSetting
.
fromPartial
(
base
??
{});
},
},
fromPartial
(
object
:
DeepPartial
<
Workspace
GeneralSetting
>
):
Workspace
GeneralSetting
{
fromPartial
(
object
:
DeepPartial
<
Workspace
Setting_GeneralSetting
>
):
WorkspaceSetting_
GeneralSetting
{
const
message
=
createBaseWorkspaceGeneralSetting
();
const
message
=
createBaseWorkspace
Setting_
GeneralSetting
();
message
.
theme
=
object
.
theme
??
""
;
message
.
theme
=
object
.
theme
??
""
;
message
.
disallowUserRegistration
=
object
.
disallowUserRegistration
??
false
;
message
.
disallowUserRegistration
=
object
.
disallowUserRegistration
??
false
;
message
.
disallowPasswordAuth
=
object
.
disallowPasswordAuth
??
false
;
message
.
disallowPasswordAuth
=
object
.
disallowPasswordAuth
??
false
;
message
.
additionalScript
=
object
.
additionalScript
??
""
;
message
.
additionalScript
=
object
.
additionalScript
??
""
;
message
.
additionalStyle
=
object
.
additionalStyle
??
""
;
message
.
additionalStyle
=
object
.
additionalStyle
??
""
;
message
.
customProfile
=
(
object
.
customProfile
!==
undefined
&&
object
.
customProfile
!==
null
)
message
.
customProfile
=
(
object
.
customProfile
!==
undefined
&&
object
.
customProfile
!==
null
)
?
WorkspaceCustomProfile
.
fromPartial
(
object
.
customProfile
)
?
Workspace
Setting_GeneralSetting_
CustomProfile
.
fromPartial
(
object
.
customProfile
)
:
undefined
;
:
undefined
;
message
.
weekStartDayOffset
=
object
.
weekStartDayOffset
??
0
;
message
.
weekStartDayOffset
=
object
.
weekStartDayOffset
??
0
;
message
.
disallowChangeUsername
=
object
.
disallowChangeUsername
??
false
;
message
.
disallowChangeUsername
=
object
.
disallowChangeUsername
??
false
;
...
@@ -606,113 +612,121 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
...
@@ -606,113 +612,121 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
},
},
};
};
function
createBaseWorkspace
CustomProfile
():
Workspace
CustomProfile
{
function
createBaseWorkspace
Setting_GeneralSetting_CustomProfile
():
WorkspaceSetting_GeneralSetting_
CustomProfile
{
return
{
title
:
""
,
description
:
""
,
logoUrl
:
""
,
locale
:
""
,
appearance
:
""
};
return
{
title
:
""
,
description
:
""
,
logoUrl
:
""
,
locale
:
""
,
appearance
:
""
};
}
}
export
const
WorkspaceCustomProfile
:
MessageFns
<
WorkspaceCustomProfile
>
=
{
export
const
WorkspaceSetting_GeneralSetting_CustomProfile
:
MessageFns
<
WorkspaceSetting_GeneralSetting_CustomProfile
>
=
encode
(
message
:
WorkspaceCustomProfile
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
{
if
(
message
.
title
!==
""
)
{
encode
(
writer
.
uint32
(
10
).
string
(
message
.
title
);
message
:
WorkspaceSetting_GeneralSetting_CustomProfile
,
}
writer
:
BinaryWriter
=
new
BinaryWriter
(),
if
(
message
.
description
!==
""
)
{
):
BinaryWriter
{
writer
.
uint32
(
18
).
string
(
message
.
description
);
if
(
message
.
title
!==
""
)
{
}
writer
.
uint32
(
10
).
string
(
message
.
title
);
if
(
message
.
logoUrl
!==
""
)
{
}
writer
.
uint32
(
26
).
string
(
message
.
logoUrl
);
if
(
message
.
description
!==
""
)
{
}
writer
.
uint32
(
18
).
string
(
message
.
description
);
if
(
message
.
locale
!==
""
)
{
}
writer
.
uint32
(
34
).
string
(
message
.
locale
);
if
(
message
.
logoUrl
!==
""
)
{
}
writer
.
uint32
(
26
).
string
(
message
.
logoUrl
);
if
(
message
.
appearance
!==
""
)
{
}
writer
.
uint32
(
42
).
string
(
message
.
appearance
);
if
(
message
.
locale
!==
""
)
{
}
writer
.
uint32
(
34
).
string
(
message
.
locale
);
return
writer
;
}
},
if
(
message
.
appearance
!==
""
)
{
writer
.
uint32
(
42
).
string
(
message
.
appearance
);
}
return
writer
;
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceCustomProfile
{
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceSetting_GeneralSetting_CustomProfile
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseWorkspaceCustomProfile
();
const
message
=
createBaseWorkspaceSetting_GeneralSetting_CustomProfile
();
while
(
reader
.
pos
<
end
)
{
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
switch
(
tag
>>>
3
)
{
case
1
:
{
case
1
:
{
if
(
tag
!==
10
)
{
if
(
tag
!==
10
)
{
break
;
break
;
}
message
.
title
=
reader
.
string
();
continue
;
}
}
case
2
:
{
if
(
tag
!==
18
)
{
break
;
}
message
.
title
=
reader
.
string
();
message
.
description
=
reader
.
string
();
continue
;
continue
;
}
case
2
:
{
if
(
tag
!==
18
)
{
break
;
}
}
case
3
:
{
if
(
tag
!==
26
)
{
break
;
}
message
.
description
=
reader
.
string
();
message
.
logoUrl
=
reader
.
string
();
continue
;
continue
;
}
case
3
:
{
if
(
tag
!==
26
)
{
break
;
}
}
case
4
:
{
if
(
tag
!==
34
)
{
break
;
}
message
.
logoUrl
=
reader
.
string
();
message
.
locale
=
reader
.
string
();
continue
;
continue
;
}
case
4
:
{
if
(
tag
!==
34
)
{
break
;
}
}
case
5
:
{
if
(
tag
!==
42
)
{
break
;
}
message
.
locale
=
reader
.
string
();
message
.
appearance
=
reader
.
string
();
continue
;
continue
;
}
case
5
:
{
if
(
tag
!==
42
)
{
break
;
}
}
message
.
appearance
=
reader
.
string
();
continue
;
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
}
reader
.
skip
(
tag
&
7
);
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
return
message
;
break
;
},
}
reader
.
skip
(
tag
&
7
);
}
return
message
;
},
create
(
base
?:
DeepPartial
<
WorkspaceCustomProfile
>
):
WorkspaceCustomProfile
{
create
(
return
WorkspaceCustomProfile
.
fromPartial
(
base
??
{});
base
?:
DeepPartial
<
WorkspaceSetting_GeneralSetting_CustomProfile
>
,
},
):
WorkspaceSetting_GeneralSetting_CustomProfile
{
fromPartial
(
object
:
DeepPartial
<
WorkspaceCustomProfile
>
):
WorkspaceCustomProfile
{
return
WorkspaceSetting_GeneralSetting_CustomProfile
.
fromPartial
(
base
??
{});
const
message
=
createBaseWorkspaceCustomProfile
();
},
message
.
title
=
object
.
title
??
""
;
fromPartial
(
message
.
description
=
object
.
description
??
""
;
object
:
DeepPartial
<
WorkspaceSetting_GeneralSetting_CustomProfile
>
,
message
.
logoUrl
=
object
.
logoUrl
??
""
;
):
WorkspaceSetting_GeneralSetting_CustomProfile
{
message
.
locale
=
object
.
locale
??
""
;
const
message
=
createBaseWorkspaceSetting_GeneralSetting_CustomProfile
();
message
.
appearance
=
object
.
appearance
??
""
;
message
.
title
=
object
.
title
??
""
;
return
message
;
message
.
description
=
object
.
description
??
""
;
},
message
.
logoUrl
=
object
.
logoUrl
??
""
;
};
message
.
locale
=
object
.
locale
??
""
;
message
.
appearance
=
object
.
appearance
??
""
;
return
message
;
},
};
function
createBaseWorkspaceS
torageSetting
():
Workspace
StorageSetting
{
function
createBaseWorkspaceS
etting_StorageSetting
():
WorkspaceSetting_
StorageSetting
{
return
{
return
{
storageType
:
WorkspaceStorageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
,
storageType
:
WorkspaceS
etting_S
torageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
,
filepathTemplate
:
""
,
filepathTemplate
:
""
,
uploadSizeLimitMb
:
0
,
uploadSizeLimitMb
:
0
,
s3Config
:
undefined
,
s3Config
:
undefined
,
};
};
}
}
export
const
WorkspaceS
torageSetting
:
MessageFns
<
Workspace
StorageSetting
>
=
{
export
const
WorkspaceS
etting_StorageSetting
:
MessageFns
<
WorkspaceSetting_
StorageSetting
>
=
{
encode
(
message
:
WorkspaceStorageSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
encode
(
message
:
WorkspaceS
etting_S
torageSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
storageType
!==
WorkspaceStorageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
)
{
if
(
message
.
storageType
!==
WorkspaceS
etting_S
torageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
)
{
writer
.
uint32
(
8
).
int32
(
workspaceStorageSetting_StorageTypeToNumber
(
message
.
storageType
));
writer
.
uint32
(
8
).
int32
(
workspaceS
etting_S
torageSetting_StorageTypeToNumber
(
message
.
storageType
));
}
}
if
(
message
.
filepathTemplate
!==
""
)
{
if
(
message
.
filepathTemplate
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
filepathTemplate
);
writer
.
uint32
(
18
).
string
(
message
.
filepathTemplate
);
...
@@ -721,15 +735,15 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
...
@@ -721,15 +735,15 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
writer
.
uint32
(
24
).
int64
(
message
.
uploadSizeLimitMb
);
writer
.
uint32
(
24
).
int64
(
message
.
uploadSizeLimitMb
);
}
}
if
(
message
.
s3Config
!==
undefined
)
{
if
(
message
.
s3Config
!==
undefined
)
{
WorkspaceStorageSetting_S3Config
.
encode
(
message
.
s3Config
,
writer
.
uint32
(
34
).
fork
()).
join
();
WorkspaceS
etting_S
torageSetting_S3Config
.
encode
(
message
.
s3Config
,
writer
.
uint32
(
34
).
fork
()).
join
();
}
}
return
writer
;
return
writer
;
},
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceStorageSetting
{
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceS
etting_S
torageSetting
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseWorkspaceStorageSetting
();
const
message
=
createBaseWorkspaceS
etting_S
torageSetting
();
while
(
reader
.
pos
<
end
)
{
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
switch
(
tag
>>>
3
)
{
...
@@ -738,7 +752,7 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
...
@@ -738,7 +752,7 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
break
;
break
;
}
}
message
.
storageType
=
workspaceStorageSetting_StorageTypeFromJSON
(
reader
.
int32
());
message
.
storageType
=
workspaceS
etting_S
torageSetting_StorageTypeFromJSON
(
reader
.
int32
());
continue
;
continue
;
}
}
case
2
:
{
case
2
:
{
...
@@ -762,7 +776,7 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
...
@@ -762,7 +776,7 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
break
;
break
;
}
}
message
.
s3Config
=
WorkspaceStorageSetting_S3Config
.
decode
(
reader
,
reader
.
uint32
());
message
.
s3Config
=
WorkspaceS
etting_S
torageSetting_S3Config
.
decode
(
reader
,
reader
.
uint32
());
continue
;
continue
;
}
}
}
}
...
@@ -774,27 +788,27 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
...
@@ -774,27 +788,27 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
return
message
;
return
message
;
},
},
create
(
base
?:
DeepPartial
<
WorkspaceS
torageSetting
>
):
Workspace
StorageSetting
{
create
(
base
?:
DeepPartial
<
WorkspaceS
etting_StorageSetting
>
):
WorkspaceSetting_
StorageSetting
{
return
WorkspaceStorageSetting
.
fromPartial
(
base
??
{});
return
WorkspaceS
etting_S
torageSetting
.
fromPartial
(
base
??
{});
},
},
fromPartial
(
object
:
DeepPartial
<
WorkspaceS
torageSetting
>
):
Workspace
StorageSetting
{
fromPartial
(
object
:
DeepPartial
<
WorkspaceS
etting_StorageSetting
>
):
WorkspaceSetting_
StorageSetting
{
const
message
=
createBaseWorkspaceStorageSetting
();
const
message
=
createBaseWorkspaceS
etting_S
torageSetting
();
message
.
storageType
=
object
.
storageType
??
WorkspaceStorageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
;
message
.
storageType
=
object
.
storageType
??
WorkspaceS
etting_S
torageSetting_StorageType
.
STORAGE_TYPE_UNSPECIFIED
;
message
.
filepathTemplate
=
object
.
filepathTemplate
??
""
;
message
.
filepathTemplate
=
object
.
filepathTemplate
??
""
;
message
.
uploadSizeLimitMb
=
object
.
uploadSizeLimitMb
??
0
;
message
.
uploadSizeLimitMb
=
object
.
uploadSizeLimitMb
??
0
;
message
.
s3Config
=
(
object
.
s3Config
!==
undefined
&&
object
.
s3Config
!==
null
)
message
.
s3Config
=
(
object
.
s3Config
!==
undefined
&&
object
.
s3Config
!==
null
)
?
WorkspaceStorageSetting_S3Config
.
fromPartial
(
object
.
s3Config
)
?
WorkspaceS
etting_S
torageSetting_S3Config
.
fromPartial
(
object
.
s3Config
)
:
undefined
;
:
undefined
;
return
message
;
return
message
;
},
},
};
};
function
createBaseWorkspaceS
torageSetting_S3Config
():
Workspace
StorageSetting_S3Config
{
function
createBaseWorkspaceS
etting_StorageSetting_S3Config
():
WorkspaceSetting_
StorageSetting_S3Config
{
return
{
accessKeyId
:
""
,
accessKeySecret
:
""
,
endpoint
:
""
,
region
:
""
,
bucket
:
""
,
usePathStyle
:
false
};
return
{
accessKeyId
:
""
,
accessKeySecret
:
""
,
endpoint
:
""
,
region
:
""
,
bucket
:
""
,
usePathStyle
:
false
};
}
}
export
const
WorkspaceS
torageSetting_S3Config
:
MessageFns
<
Workspace
StorageSetting_S3Config
>
=
{
export
const
WorkspaceS
etting_StorageSetting_S3Config
:
MessageFns
<
WorkspaceSetting_
StorageSetting_S3Config
>
=
{
encode
(
message
:
WorkspaceStorageSetting_S3Config
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
encode
(
message
:
WorkspaceS
etting_S
torageSetting_S3Config
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
accessKeyId
!==
""
)
{
if
(
message
.
accessKeyId
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
accessKeyId
);
writer
.
uint32
(
10
).
string
(
message
.
accessKeyId
);
}
}
...
@@ -816,10 +830,10 @@ export const WorkspaceStorageSetting_S3Config: MessageFns<WorkspaceStorageSettin
...
@@ -816,10 +830,10 @@ export const WorkspaceStorageSetting_S3Config: MessageFns<WorkspaceStorageSettin
return
writer
;
return
writer
;
},
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceStorageSetting_S3Config
{
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceS
etting_S
torageSetting_S3Config
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseWorkspaceStorageSetting_S3Config
();
const
message
=
createBaseWorkspaceS
etting_S
torageSetting_S3Config
();
while
(
reader
.
pos
<
end
)
{
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
switch
(
tag
>>>
3
)
{
...
@@ -880,11 +894,11 @@ export const WorkspaceStorageSetting_S3Config: MessageFns<WorkspaceStorageSettin
...
@@ -880,11 +894,11 @@ export const WorkspaceStorageSetting_S3Config: MessageFns<WorkspaceStorageSettin
return
message
;
return
message
;
},
},
create
(
base
?:
DeepPartial
<
WorkspaceS
torageSetting_S3Config
>
):
Workspace
StorageSetting_S3Config
{
create
(
base
?:
DeepPartial
<
WorkspaceS
etting_StorageSetting_S3Config
>
):
WorkspaceSetting_
StorageSetting_S3Config
{
return
WorkspaceStorageSetting_S3Config
.
fromPartial
(
base
??
{});
return
WorkspaceS
etting_S
torageSetting_S3Config
.
fromPartial
(
base
??
{});
},
},
fromPartial
(
object
:
DeepPartial
<
WorkspaceS
torageSetting_S3Config
>
):
Workspace
StorageSetting_S3Config
{
fromPartial
(
object
:
DeepPartial
<
WorkspaceS
etting_StorageSetting_S3Config
>
):
WorkspaceSetting_
StorageSetting_S3Config
{
const
message
=
createBaseWorkspaceStorageSetting_S3Config
();
const
message
=
createBaseWorkspaceS
etting_S
torageSetting_S3Config
();
message
.
accessKeyId
=
object
.
accessKeyId
??
""
;
message
.
accessKeyId
=
object
.
accessKeyId
??
""
;
message
.
accessKeySecret
=
object
.
accessKeySecret
??
""
;
message
.
accessKeySecret
=
object
.
accessKeySecret
??
""
;
message
.
endpoint
=
object
.
endpoint
??
""
;
message
.
endpoint
=
object
.
endpoint
??
""
;
...
@@ -895,7 +909,7 @@ export const WorkspaceStorageSetting_S3Config: MessageFns<WorkspaceStorageSettin
...
@@ -895,7 +909,7 @@ export const WorkspaceStorageSetting_S3Config: MessageFns<WorkspaceStorageSettin
},
},
};
};
function
createBaseWorkspace
MemoRelatedSetting
():
Workspace
MemoRelatedSetting
{
function
createBaseWorkspace
Setting_MemoRelatedSetting
():
WorkspaceSetting_
MemoRelatedSetting
{
return
{
return
{
disallowPublicVisibility
:
false
,
disallowPublicVisibility
:
false
,
displayWithUpdateTime
:
false
,
displayWithUpdateTime
:
false
,
...
@@ -910,8 +924,8 @@ function createBaseWorkspaceMemoRelatedSetting(): WorkspaceMemoRelatedSetting {
...
@@ -910,8 +924,8 @@ function createBaseWorkspaceMemoRelatedSetting(): WorkspaceMemoRelatedSetting {
};
};
}
}
export
const
Workspace
MemoRelatedSetting
:
MessageFns
<
Workspace
MemoRelatedSetting
>
=
{
export
const
Workspace
Setting_MemoRelatedSetting
:
MessageFns
<
WorkspaceSetting_
MemoRelatedSetting
>
=
{
encode
(
message
:
WorkspaceMemoRelatedSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
encode
(
message
:
Workspace
Setting_
MemoRelatedSetting
,
writer
:
BinaryWriter
=
new
BinaryWriter
()):
BinaryWriter
{
if
(
message
.
disallowPublicVisibility
!==
false
)
{
if
(
message
.
disallowPublicVisibility
!==
false
)
{
writer
.
uint32
(
8
).
bool
(
message
.
disallowPublicVisibility
);
writer
.
uint32
(
8
).
bool
(
message
.
disallowPublicVisibility
);
}
}
...
@@ -945,10 +959,10 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
...
@@ -945,10 +959,10 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
return
writer
;
return
writer
;
},
},
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
WorkspaceMemoRelatedSetting
{
decode
(
input
:
BinaryReader
|
Uint8Array
,
length
?:
number
):
Workspace
Setting_
MemoRelatedSetting
{
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
const
reader
=
input
instanceof
BinaryReader
?
input
:
new
BinaryReader
(
input
);
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
let
end
=
length
===
undefined
?
reader
.
len
:
reader
.
pos
+
length
;
const
message
=
createBaseWorkspaceMemoRelatedSetting
();
const
message
=
createBaseWorkspace
Setting_
MemoRelatedSetting
();
while
(
reader
.
pos
<
end
)
{
while
(
reader
.
pos
<
end
)
{
const
tag
=
reader
.
uint32
();
const
tag
=
reader
.
uint32
();
switch
(
tag
>>>
3
)
{
switch
(
tag
>>>
3
)
{
...
@@ -1041,11 +1055,11 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
...
@@ -1041,11 +1055,11 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
return
message
;
return
message
;
},
},
create
(
base
?:
DeepPartial
<
Workspace
MemoRelatedSetting
>
):
Workspace
MemoRelatedSetting
{
create
(
base
?:
DeepPartial
<
Workspace
Setting_MemoRelatedSetting
>
):
WorkspaceSetting_
MemoRelatedSetting
{
return
WorkspaceMemoRelatedSetting
.
fromPartial
(
base
??
{});
return
Workspace
Setting_
MemoRelatedSetting
.
fromPartial
(
base
??
{});
},
},
fromPartial
(
object
:
DeepPartial
<
Workspace
MemoRelatedSetting
>
):
Workspace
MemoRelatedSetting
{
fromPartial
(
object
:
DeepPartial
<
Workspace
Setting_MemoRelatedSetting
>
):
WorkspaceSetting_
MemoRelatedSetting
{
const
message
=
createBaseWorkspaceMemoRelatedSetting
();
const
message
=
createBaseWorkspace
Setting_
MemoRelatedSetting
();
message
.
disallowPublicVisibility
=
object
.
disallowPublicVisibility
??
false
;
message
.
disallowPublicVisibility
=
object
.
disallowPublicVisibility
??
false
;
message
.
displayWithUpdateTime
=
object
.
displayWithUpdateTime
??
false
;
message
.
displayWithUpdateTime
=
object
.
displayWithUpdateTime
??
false
;
message
.
contentLengthLimit
=
object
.
contentLengthLimit
??
0
;
message
.
contentLengthLimit
=
object
.
contentLengthLimit
??
0
;
...
...
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