chore: update definition of workspace setting
This commit is contained in:
parent
53d3978507
commit
3f56ce47d2
10 changed files with 811 additions and 721 deletions
|
|
@ -65,25 +65,24 @@ message WorkspaceSetting {
|
||||||
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
||||||
|
|
||||||
oneof value {
|
oneof value {
|
||||||
WorkspaceGeneralSetting general_setting = 2;
|
GeneralSetting general_setting = 2;
|
||||||
WorkspaceStorageSetting storage_setting = 3;
|
StorageSetting storage_setting = 3;
|
||||||
WorkspaceMemoRelatedSetting 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 {
|
// General workspace settings configuration.
|
||||||
|
message 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.
|
||||||
string theme = 1;
|
string theme = 1;
|
||||||
|
|
@ -96,7 +95,7 @@ message WorkspaceGeneralSetting {
|
||||||
// additional_style is the additional style.
|
// additional_style is the additional style.
|
||||||
string additional_style = 5;
|
string additional_style = 5;
|
||||||
// custom_profile is the custom profile.
|
// custom_profile is the custom profile.
|
||||||
WorkspaceCustomProfile custom_profile = 6;
|
CustomProfile custom_profile = 6;
|
||||||
// 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.
|
||||||
|
|
@ -106,17 +105,20 @@ message WorkspaceGeneralSetting {
|
||||||
bool disallow_change_username = 8;
|
bool disallow_change_username = 8;
|
||||||
// disallow_change_nickname disallows changing nickname.
|
// disallow_change_nickname disallows changing nickname.
|
||||||
bool disallow_change_nickname = 9;
|
bool disallow_change_nickname = 9;
|
||||||
}
|
|
||||||
|
|
||||||
message WorkspaceCustomProfile {
|
// Custom profile configuration for workspace branding.
|
||||||
|
message CustomProfile {
|
||||||
string title = 1;
|
string title = 1;
|
||||||
string description = 2;
|
string description = 2;
|
||||||
string logo_url = 3;
|
string logo_url = 3;
|
||||||
string locale = 4;
|
string locale = 4;
|
||||||
string appearance = 5;
|
string appearance = 5;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
message WorkspaceStorageSetting {
|
// Storage configuration settings for workspace attachments.
|
||||||
|
message StorageSetting {
|
||||||
|
// Storage type enumeration for different storage backends.
|
||||||
enum StorageType {
|
enum StorageType {
|
||||||
STORAGE_TYPE_UNSPECIFIED = 0;
|
STORAGE_TYPE_UNSPECIFIED = 0;
|
||||||
// DATABASE is the database storage type.
|
// DATABASE is the database storage type.
|
||||||
|
|
@ -133,6 +135,8 @@ message WorkspaceStorageSetting {
|
||||||
string filepath_template = 2;
|
string filepath_template = 2;
|
||||||
// The max upload size in megabytes.
|
// The max upload size in megabytes.
|
||||||
int64 upload_size_limit_mb = 3;
|
int64 upload_size_limit_mb = 3;
|
||||||
|
|
||||||
|
// 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/
|
||||||
message S3Config {
|
message S3Config {
|
||||||
string access_key_id = 1;
|
string access_key_id = 1;
|
||||||
|
|
@ -144,9 +148,10 @@ message WorkspaceStorageSetting {
|
||||||
}
|
}
|
||||||
// The S3 config.
|
// The S3 config.
|
||||||
S3Config s3_config = 4;
|
S3Config s3_config = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message WorkspaceMemoRelatedSetting {
|
// Memo-related workspace settings and policies.
|
||||||
|
message MemoRelatedSetting {
|
||||||
// disallow_public_visibility disallows set memo as public visibility.
|
// disallow_public_visibility disallows set memo as public visibility.
|
||||||
bool disallow_public_visibility = 1;
|
bool disallow_public_visibility = 1;
|
||||||
// display_with_update_time orders and displays memo with update time.
|
// display_with_update_time orders and displays memo with update time.
|
||||||
|
|
@ -167,6 +172,7 @@ message WorkspaceMemoRelatedSetting {
|
||||||
bool enable_blur_nsfw_content = 9;
|
bool enable_blur_nsfw_content = 9;
|
||||||
// nsfw_tags is the list of tags that mark content as NSFW for blurring.
|
// nsfw_tags is the list of tags that mark content as NSFW for blurring.
|
||||||
repeated string nsfw_tags = 10;
|
repeated string nsfw_tags = 10;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Request message for GetWorkspaceSetting method.
|
// Request message for GetWorkspaceSetting method.
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
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:
|
||||||
$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:
|
||||||
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:
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
description: The target URL for the webhook.
|
description: The target URL for the webhook.
|
||||||
WorkspaceCustomProfile:
|
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:
|
||||||
description: additional_style is the additional style.
|
description: additional_style is the additional style.
|
||||||
customProfile:
|
customProfile:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/WorkspaceCustomProfile'
|
- $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:
|
||||||
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:
|
||||||
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:
|
||||||
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/WorkspaceStorageSetting_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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
return workspaceSetting
|
return workspaceSetting
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSetting) *v1pb.WorkspaceGeneralSetting {
|
func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSetting) *v1pb.WorkspaceSetting_GeneralSetting {
|
||||||
if setting == nil {
|
if setting == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -155,7 +155,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
|
||||||
theme = "default"
|
theme = "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
generalSetting := &v1pb.WorkspaceGeneralSetting{
|
generalSetting := &v1pb.WorkspaceSetting_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
|
||||||
DisallowChangeNickname: setting.DisallowChangeNickname,
|
DisallowChangeNickname: setting.DisallowChangeNickname,
|
||||||
}
|
}
|
||||||
if setting.CustomProfile != nil {
|
if setting.CustomProfile != nil {
|
||||||
generalSetting.CustomProfile = &v1pb.WorkspaceCustomProfile{
|
generalSetting.CustomProfile = &v1pb.WorkspaceSetting_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
|
||||||
return generalSetting
|
return generalSetting
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertWorkspaceGeneralSettingToStore(setting *v1pb.WorkspaceGeneralSetting) *storepb.WorkspaceGeneralSetting {
|
func convertWorkspaceGeneralSettingToStore(setting *v1pb.WorkspaceSetting_GeneralSetting) *storepb.WorkspaceGeneralSetting {
|
||||||
if setting == nil {
|
if setting == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -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.WorkspaceSetting_StorageSetting {
|
||||||
if settingpb == nil {
|
if settingpb == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
setting := &v1pb.WorkspaceStorageSetting{
|
setting := &v1pb.WorkspaceSetting_StorageSetting{
|
||||||
StorageType: v1pb.WorkspaceStorageSetting_StorageType(settingpb.StorageType),
|
StorageType: v1pb.WorkspaceSetting_StorageSetting_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.WorkspaceSetting_StorageSetting_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
|
||||||
return setting
|
return setting
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertWorkspaceStorageSettingToStore(setting *v1pb.WorkspaceStorageSetting) *storepb.WorkspaceStorageSetting {
|
func convertWorkspaceStorageSettingToStore(setting *v1pb.WorkspaceSetting_StorageSetting) *storepb.WorkspaceStorageSetting {
|
||||||
if setting == nil {
|
if setting == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -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.WorkspaceSetting_MemoRelatedSetting {
|
||||||
if setting == nil {
|
if setting == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return &v1pb.WorkspaceMemoRelatedSetting{
|
return &v1pb.WorkspaceSetting_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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertWorkspaceMemoRelatedSettingToStore(setting *v1pb.WorkspaceMemoRelatedSetting) *storepb.WorkspaceMemoRelatedSetting {
|
func convertWorkspaceMemoRelatedSettingToStore(setting *v1pb.WorkspaceSetting_MemoRelatedSetting) *storepb.WorkspaceMemoRelatedSetting {
|
||||||
if setting == nil {
|
if setting == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 { WorkspaceSetting_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<WorkspaceSetting_MemoRelatedSetting>(workspaceStore.state.memoRelatedSetting);
|
||||||
const [memoRelatedSetting, setMemoRelatedSetting] = useState<WorkspaceMemoRelatedSetting>(originalSetting);
|
const [memoRelatedSetting, setMemoRelatedSetting] = useState<WorkspaceSetting_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<WorkspaceSetting_MemoRelatedSetting>) => {
|
||||||
const newWorkspaceMemoRelatedSetting = WorkspaceMemoRelatedSetting.fromPartial({
|
const newWorkspaceMemoRelatedSetting = WorkspaceSetting_MemoRelatedSetting.fromPartial({
|
||||||
...memoRelatedSetting,
|
...memoRelatedSetting,
|
||||||
...partial,
|
...partial,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -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,
|
WorkspaceSetting_StorageSetting,
|
||||||
WorkspaceStorageSetting_S3Config,
|
WorkspaceSetting_StorageSetting_S3Config,
|
||||||
WorkspaceStorageSetting_StorageType,
|
WorkspaceSetting_StorageSetting_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(() => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const origin = WorkspaceStorageSetting.fromPartial(
|
const origin = WorkspaceSetting_StorageSetting.fromPartial(
|
||||||
workspaceStore.getWorkspaceSettingByKey(WorkspaceSetting_Key.STORAGE)?.storageSetting || {},
|
workspaceStore.getWorkspaceSettingByKey(WorkspaceSetting_Key.STORAGE)?.storageSetting || {},
|
||||||
);
|
);
|
||||||
if (workspaceStorageSetting.storageType === WorkspaceStorageSetting_StorageType.LOCAL) {
|
if (workspaceStorageSetting.storageType === WorkspaceSetting_StorageSetting_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 === WorkspaceSetting_StorageSetting_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(() => {
|
||||||
if (Number.isNaN(num)) {
|
if (Number.isNaN(num)) {
|
||||||
num = 0;
|
num = 0;
|
||||||
}
|
}
|
||||||
const update: WorkspaceStorageSetting = {
|
const update: WorkspaceSetting_StorageSetting = {
|
||||||
...workspaceStorageSetting,
|
...workspaceStorageSetting,
|
||||||
uploadSizeLimitMb: num,
|
uploadSizeLimitMb: num,
|
||||||
};
|
};
|
||||||
|
|
@ -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: WorkspaceSetting_StorageSetting = {
|
||||||
...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<WorkspaceSetting_StorageSetting_S3Config>) => {
|
||||||
const update: WorkspaceStorageSetting = {
|
const update: WorkspaceSetting_StorageSetting = {
|
||||||
...workspaceStorageSetting,
|
...workspaceStorageSetting,
|
||||||
s3Config: WorkspaceStorageSetting_S3Config.fromPartial({
|
s3Config: WorkspaceSetting_StorageSetting_S3Config.fromPartial({
|
||||||
...workspaceStorageSetting.s3Config,
|
...workspaceStorageSetting.s3Config,
|
||||||
...s3Config,
|
...s3Config,
|
||||||
}),
|
}),
|
||||||
|
|
@ -116,8 +120,8 @@ const StorageSection = observer(() => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleStorageTypeChanged = async (storageType: WorkspaceStorageSetting_StorageType) => {
|
const handleStorageTypeChanged = async (storageType: WorkspaceSetting_StorageSetting_StorageType) => {
|
||||||
const update: WorkspaceStorageSetting = {
|
const update: WorkspaceSetting_StorageSetting = {
|
||||||
...workspaceStorageSetting,
|
...workspaceStorageSetting,
|
||||||
storageType: storageType,
|
storageType: storageType,
|
||||||
};
|
};
|
||||||
|
|
@ -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 WorkspaceSetting_StorageSetting_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={WorkspaceSetting_StorageSetting_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={WorkspaceSetting_StorageSetting_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={WorkspaceSetting_StorageSetting_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(() => {
|
||||||
</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 !== WorkspaceSetting_StorageSetting_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(() => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{workspaceStorageSetting.storageType === WorkspaceStorageSetting_StorageType.S3 && (
|
{workspaceStorageSetting.storageType === WorkspaceSetting_StorageSetting_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>
|
||||||
|
|
|
||||||
|
|
@ -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 { WorkspaceSetting_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";
|
||||||
const WorkspaceSection = observer(() => {
|
const WorkspaceSection = observer(() => {
|
||||||
const t = useTranslate();
|
const t = useTranslate();
|
||||||
const customizeDialog = useDialog();
|
const customizeDialog = useDialog();
|
||||||
const originalSetting = WorkspaceGeneralSetting.fromPartial(
|
const originalSetting = WorkspaceSetting_GeneralSetting.fromPartial(
|
||||||
workspaceStore.getWorkspaceSettingByKey(WorkspaceSetting_Key.GENERAL)?.generalSetting || {},
|
workspaceStore.getWorkspaceSettingByKey(WorkspaceSetting_Key.GENERAL)?.generalSetting || {},
|
||||||
);
|
);
|
||||||
const [workspaceGeneralSetting, setWorkspaceGeneralSetting] = useState<WorkspaceGeneralSetting>(originalSetting);
|
const [workspaceGeneralSetting, setWorkspaceGeneralSetting] = useState<WorkspaceSetting_GeneralSetting>(originalSetting);
|
||||||
const [identityProviderList, setIdentityProviderList] = useState<IdentityProvider[]>([]);
|
const [identityProviderList, setIdentityProviderList] = useState<IdentityProvider[]>([]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -36,9 +36,9 @@ const WorkspaceSection = observer(() => {
|
||||||
customizeDialog.open();
|
customizeDialog.open();
|
||||||
};
|
};
|
||||||
|
|
||||||
const updatePartialSetting = (partial: Partial<WorkspaceGeneralSetting>) => {
|
const updatePartialSetting = (partial: Partial<WorkspaceSetting_GeneralSetting>) => {
|
||||||
setWorkspaceGeneralSetting(
|
setWorkspaceGeneralSetting(
|
||||||
WorkspaceGeneralSetting.fromPartial({
|
WorkspaceSetting_GeneralSetting.fromPartial({
|
||||||
...workspaceGeneralSetting,
|
...workspaceGeneralSetting,
|
||||||
...partial,
|
...partial,
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -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 { WorkspaceSetting_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 {
|
||||||
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<WorkspaceSetting_GeneralSetting_CustomProfile>(
|
||||||
WorkspaceCustomProfile.fromPartial(workspaceGeneralSetting.customProfile || {}),
|
WorkspaceSetting_GeneralSetting_CustomProfile.fromPartial(workspaceGeneralSetting.customProfile || {}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
const setPartialState = (partialState: Partial<WorkspaceCustomProfile>) => {
|
const setPartialState = (partialState: Partial<WorkspaceSetting_GeneralSetting_CustomProfile>) => {
|
||||||
setCustomProfile((state) => ({
|
setCustomProfile((state) => ({
|
||||||
...state,
|
...state,
|
||||||
...partialState,
|
...partialState,
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
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({})
|
WorkspaceSetting_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 || WorkspaceSetting_MemoRelatedSetting.fromPartial({})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,15 +36,14 @@ export interface WorkspaceSetting {
|
||||||
* Format: workspace/settings/{setting}
|
* Format: workspace/settings/{setting}
|
||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
generalSetting?: WorkspaceGeneralSetting | undefined;
|
generalSetting?: WorkspaceSetting_GeneralSetting | undefined;
|
||||||
storageSetting?: WorkspaceStorageSetting | undefined;
|
storageSetting?: WorkspaceSetting_StorageSetting | undefined;
|
||||||
memoRelatedSetting?: WorkspaceMemoRelatedSetting | undefined;
|
memoRelatedSetting?: WorkspaceSetting_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
|
||||||
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
|
||||||
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 {
|
||||||
additionalStyle: string;
|
additionalStyle: string;
|
||||||
/** custom_profile is the custom profile. */
|
/** custom_profile is the custom profile. */
|
||||||
customProfile?:
|
customProfile?:
|
||||||
| WorkspaceCustomProfile
|
| WorkspaceSetting_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 {
|
||||||
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 {
|
||||||
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: WorkspaceSetting_StorageSetting_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 {
|
||||||
/** 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?: WorkspaceSetting_StorageSetting_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 {
|
||||||
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 WorkspaceSetting_StorageSetting_StorageType.STORAGE_TYPE_UNSPECIFIED;
|
||||||
case 1:
|
case 1:
|
||||||
case "DATABASE":
|
case "DATABASE":
|
||||||
return WorkspaceStorageSetting_StorageType.DATABASE;
|
return WorkspaceSetting_StorageSetting_StorageType.DATABASE;
|
||||||
case 2:
|
case 2:
|
||||||
case "LOCAL":
|
case "LOCAL":
|
||||||
return WorkspaceStorageSetting_StorageType.LOCAL;
|
return WorkspaceSetting_StorageSetting_StorageType.LOCAL;
|
||||||
case 3:
|
case 3:
|
||||||
case "S3":
|
case "S3":
|
||||||
return WorkspaceStorageSetting_StorageType.S3;
|
return WorkspaceSetting_StorageSetting_StorageType.S3;
|
||||||
case -1:
|
case -1:
|
||||||
case "UNRECOGNIZED":
|
case "UNRECOGNIZED":
|
||||||
default:
|
default:
|
||||||
return WorkspaceStorageSetting_StorageType.UNRECOGNIZED;
|
return WorkspaceSetting_StorageSetting_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 WorkspaceSetting_StorageSetting_StorageType.STORAGE_TYPE_UNSPECIFIED:
|
||||||
return 0;
|
return 0;
|
||||||
case WorkspaceStorageSetting_StorageType.DATABASE:
|
case WorkspaceSetting_StorageSetting_StorageType.DATABASE:
|
||||||
return 1;
|
return 1;
|
||||||
case WorkspaceStorageSetting_StorageType.LOCAL:
|
case WorkspaceSetting_StorageSetting_StorageType.LOCAL:
|
||||||
return 2;
|
return 2;
|
||||||
case WorkspaceStorageSetting_StorageType.S3:
|
case WorkspaceSetting_StorageSetting_StorageType.S3:
|
||||||
return 3;
|
return 3;
|
||||||
case WorkspaceStorageSetting_StorageType.UNRECOGNIZED:
|
case WorkspaceSetting_StorageSetting_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 {
|
||||||
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> = {
|
||||||
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();
|
WorkspaceSetting_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();
|
WorkspaceSetting_StorageSetting.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();
|
WorkspaceSetting_MemoRelatedSetting.encode(message.memoRelatedSetting, writer.uint32(34).fork()).join();
|
||||||
}
|
}
|
||||||
return writer;
|
return writer;
|
||||||
},
|
},
|
||||||
|
|
@ -405,7 +411,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.generalSetting = WorkspaceGeneralSetting.decode(reader, reader.uint32());
|
message.generalSetting = WorkspaceSetting_GeneralSetting.decode(reader, reader.uint32());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case 3: {
|
case 3: {
|
||||||
|
|
@ -413,7 +419,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.storageSetting = WorkspaceStorageSetting.decode(reader, reader.uint32());
|
message.storageSetting = WorkspaceSetting_StorageSetting.decode(reader, reader.uint32());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case 4: {
|
case 4: {
|
||||||
|
|
@ -421,7 +427,7 @@ export const WorkspaceSetting: MessageFns<WorkspaceSetting> = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.memoRelatedSetting = WorkspaceMemoRelatedSetting.decode(reader, reader.uint32());
|
message.memoRelatedSetting = WorkspaceSetting_MemoRelatedSetting.decode(reader, reader.uint32());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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)
|
? WorkspaceSetting_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)
|
? WorkspaceSetting_StorageSetting.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)
|
? WorkspaceSetting_MemoRelatedSetting.fromPartial(object.memoRelatedSetting)
|
||||||
: undefined;
|
: undefined;
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function createBaseWorkspaceGeneralSetting(): WorkspaceGeneralSetting {
|
function createBaseWorkspaceSetting_GeneralSetting(): WorkspaceSetting_GeneralSetting {
|
||||||
return {
|
return {
|
||||||
theme: "",
|
theme: "",
|
||||||
disallowUserRegistration: false,
|
disallowUserRegistration: false,
|
||||||
|
|
@ -466,8 +472,8 @@ function createBaseWorkspaceGeneralSetting(): WorkspaceGeneralSetting {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
|
export const WorkspaceSetting_GeneralSetting: MessageFns<WorkspaceSetting_GeneralSetting> = {
|
||||||
encode(message: WorkspaceGeneralSetting, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
encode(message: WorkspaceSetting_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> = {
|
||||||
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();
|
WorkspaceSetting_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> = {
|
||||||
return writer;
|
return writer;
|
||||||
},
|
},
|
||||||
|
|
||||||
decode(input: BinaryReader | Uint8Array, length?: number): WorkspaceGeneralSetting {
|
decode(input: BinaryReader | Uint8Array, length?: number): WorkspaceSetting_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 = createBaseWorkspaceSetting_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> = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.customProfile = WorkspaceCustomProfile.decode(reader, reader.uint32());
|
message.customProfile = WorkspaceSetting_GeneralSetting_CustomProfile.decode(reader, reader.uint32());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case 7: {
|
case 7: {
|
||||||
|
|
@ -586,18 +592,18 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
|
|
||||||
create(base?: DeepPartial<WorkspaceGeneralSetting>): WorkspaceGeneralSetting {
|
create(base?: DeepPartial<WorkspaceSetting_GeneralSetting>): WorkspaceSetting_GeneralSetting {
|
||||||
return WorkspaceGeneralSetting.fromPartial(base ?? {});
|
return WorkspaceSetting_GeneralSetting.fromPartial(base ?? {});
|
||||||
},
|
},
|
||||||
fromPartial(object: DeepPartial<WorkspaceGeneralSetting>): WorkspaceGeneralSetting {
|
fromPartial(object: DeepPartial<WorkspaceSetting_GeneralSetting>): WorkspaceSetting_GeneralSetting {
|
||||||
const message = createBaseWorkspaceGeneralSetting();
|
const message = createBaseWorkspaceSetting_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)
|
? WorkspaceSetting_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,12 +612,16 @@ export const WorkspaceGeneralSetting: MessageFns<WorkspaceGeneralSetting> = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function createBaseWorkspaceCustomProfile(): WorkspaceCustomProfile {
|
function createBaseWorkspaceSetting_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 {
|
{
|
||||||
|
encode(
|
||||||
|
message: WorkspaceSetting_GeneralSetting_CustomProfile,
|
||||||
|
writer: BinaryWriter = new BinaryWriter(),
|
||||||
|
): BinaryWriter {
|
||||||
if (message.title !== "") {
|
if (message.title !== "") {
|
||||||
writer.uint32(10).string(message.title);
|
writer.uint32(10).string(message.title);
|
||||||
}
|
}
|
||||||
|
|
@ -630,10 +640,10 @@ export const WorkspaceCustomProfile: MessageFns<WorkspaceCustomProfile> = {
|
||||||
return writer;
|
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) {
|
||||||
|
|
@ -686,11 +696,15 @@ export const WorkspaceCustomProfile: MessageFns<WorkspaceCustomProfile> = {
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
|
|
||||||
create(base?: DeepPartial<WorkspaceCustomProfile>): WorkspaceCustomProfile {
|
create(
|
||||||
return WorkspaceCustomProfile.fromPartial(base ?? {});
|
base?: DeepPartial<WorkspaceSetting_GeneralSetting_CustomProfile>,
|
||||||
|
): WorkspaceSetting_GeneralSetting_CustomProfile {
|
||||||
|
return WorkspaceSetting_GeneralSetting_CustomProfile.fromPartial(base ?? {});
|
||||||
},
|
},
|
||||||
fromPartial(object: DeepPartial<WorkspaceCustomProfile>): WorkspaceCustomProfile {
|
fromPartial(
|
||||||
const message = createBaseWorkspaceCustomProfile();
|
object: DeepPartial<WorkspaceSetting_GeneralSetting_CustomProfile>,
|
||||||
|
): WorkspaceSetting_GeneralSetting_CustomProfile {
|
||||||
|
const message = createBaseWorkspaceSetting_GeneralSetting_CustomProfile();
|
||||||
message.title = object.title ?? "";
|
message.title = object.title ?? "";
|
||||||
message.description = object.description ?? "";
|
message.description = object.description ?? "";
|
||||||
message.logoUrl = object.logoUrl ?? "";
|
message.logoUrl = object.logoUrl ?? "";
|
||||||
|
|
@ -698,21 +712,21 @@ export const WorkspaceCustomProfile: MessageFns<WorkspaceCustomProfile> = {
|
||||||
message.appearance = object.appearance ?? "";
|
message.appearance = object.appearance ?? "";
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function createBaseWorkspaceStorageSetting(): WorkspaceStorageSetting {
|
function createBaseWorkspaceSetting_StorageSetting(): WorkspaceSetting_StorageSetting {
|
||||||
return {
|
return {
|
||||||
storageType: WorkspaceStorageSetting_StorageType.STORAGE_TYPE_UNSPECIFIED,
|
storageType: WorkspaceSetting_StorageSetting_StorageType.STORAGE_TYPE_UNSPECIFIED,
|
||||||
filepathTemplate: "",
|
filepathTemplate: "",
|
||||||
uploadSizeLimitMb: 0,
|
uploadSizeLimitMb: 0,
|
||||||
s3Config: undefined,
|
s3Config: undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
|
export const WorkspaceSetting_StorageSetting: MessageFns<WorkspaceSetting_StorageSetting> = {
|
||||||
encode(message: WorkspaceStorageSetting, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
encode(message: WorkspaceSetting_StorageSetting, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
||||||
if (message.storageType !== WorkspaceStorageSetting_StorageType.STORAGE_TYPE_UNSPECIFIED) {
|
if (message.storageType !== WorkspaceSetting_StorageSetting_StorageType.STORAGE_TYPE_UNSPECIFIED) {
|
||||||
writer.uint32(8).int32(workspaceStorageSetting_StorageTypeToNumber(message.storageType));
|
writer.uint32(8).int32(workspaceSetting_StorageSetting_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> = {
|
||||||
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();
|
WorkspaceSetting_StorageSetting_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): WorkspaceSetting_StorageSetting {
|
||||||
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 = createBaseWorkspaceSetting_StorageSetting();
|
||||||
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> = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.storageType = workspaceStorageSetting_StorageTypeFromJSON(reader.int32());
|
message.storageType = workspaceSetting_StorageSetting_StorageTypeFromJSON(reader.int32());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
|
|
@ -762,7 +776,7 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
message.s3Config = WorkspaceStorageSetting_S3Config.decode(reader, reader.uint32());
|
message.s3Config = WorkspaceSetting_StorageSetting_S3Config.decode(reader, reader.uint32());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -774,27 +788,27 @@ export const WorkspaceStorageSetting: MessageFns<WorkspaceStorageSetting> = {
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
|
|
||||||
create(base?: DeepPartial<WorkspaceStorageSetting>): WorkspaceStorageSetting {
|
create(base?: DeepPartial<WorkspaceSetting_StorageSetting>): WorkspaceSetting_StorageSetting {
|
||||||
return WorkspaceStorageSetting.fromPartial(base ?? {});
|
return WorkspaceSetting_StorageSetting.fromPartial(base ?? {});
|
||||||
},
|
},
|
||||||
fromPartial(object: DeepPartial<WorkspaceStorageSetting>): WorkspaceStorageSetting {
|
fromPartial(object: DeepPartial<WorkspaceSetting_StorageSetting>): WorkspaceSetting_StorageSetting {
|
||||||
const message = createBaseWorkspaceStorageSetting();
|
const message = createBaseWorkspaceSetting_StorageSetting();
|
||||||
message.storageType = object.storageType ?? WorkspaceStorageSetting_StorageType.STORAGE_TYPE_UNSPECIFIED;
|
message.storageType = object.storageType ?? WorkspaceSetting_StorageSetting_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)
|
? WorkspaceSetting_StorageSetting_S3Config.fromPartial(object.s3Config)
|
||||||
: undefined;
|
: undefined;
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function createBaseWorkspaceStorageSetting_S3Config(): WorkspaceStorageSetting_S3Config {
|
function createBaseWorkspaceSetting_StorageSetting_S3Config(): WorkspaceSetting_StorageSetting_S3Config {
|
||||||
return { accessKeyId: "", accessKeySecret: "", endpoint: "", region: "", bucket: "", usePathStyle: false };
|
return { accessKeyId: "", accessKeySecret: "", endpoint: "", region: "", bucket: "", usePathStyle: false };
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WorkspaceStorageSetting_S3Config: MessageFns<WorkspaceStorageSetting_S3Config> = {
|
export const WorkspaceSetting_StorageSetting_S3Config: MessageFns<WorkspaceSetting_StorageSetting_S3Config> = {
|
||||||
encode(message: WorkspaceStorageSetting_S3Config, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
encode(message: WorkspaceSetting_StorageSetting_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
|
||||||
return writer;
|
return writer;
|
||||||
},
|
},
|
||||||
|
|
||||||
decode(input: BinaryReader | Uint8Array, length?: number): WorkspaceStorageSetting_S3Config {
|
decode(input: BinaryReader | Uint8Array, length?: number): WorkspaceSetting_StorageSetting_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 = createBaseWorkspaceSetting_StorageSetting_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
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
|
|
||||||
create(base?: DeepPartial<WorkspaceStorageSetting_S3Config>): WorkspaceStorageSetting_S3Config {
|
create(base?: DeepPartial<WorkspaceSetting_StorageSetting_S3Config>): WorkspaceSetting_StorageSetting_S3Config {
|
||||||
return WorkspaceStorageSetting_S3Config.fromPartial(base ?? {});
|
return WorkspaceSetting_StorageSetting_S3Config.fromPartial(base ?? {});
|
||||||
},
|
},
|
||||||
fromPartial(object: DeepPartial<WorkspaceStorageSetting_S3Config>): WorkspaceStorageSetting_S3Config {
|
fromPartial(object: DeepPartial<WorkspaceSetting_StorageSetting_S3Config>): WorkspaceSetting_StorageSetting_S3Config {
|
||||||
const message = createBaseWorkspaceStorageSetting_S3Config();
|
const message = createBaseWorkspaceSetting_StorageSetting_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
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function createBaseWorkspaceMemoRelatedSetting(): WorkspaceMemoRelatedSetting {
|
function createBaseWorkspaceSetting_MemoRelatedSetting(): WorkspaceSetting_MemoRelatedSetting {
|
||||||
return {
|
return {
|
||||||
disallowPublicVisibility: false,
|
disallowPublicVisibility: false,
|
||||||
displayWithUpdateTime: false,
|
displayWithUpdateTime: false,
|
||||||
|
|
@ -910,8 +924,8 @@ function createBaseWorkspaceMemoRelatedSetting(): WorkspaceMemoRelatedSetting {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting> = {
|
export const WorkspaceSetting_MemoRelatedSetting: MessageFns<WorkspaceSetting_MemoRelatedSetting> = {
|
||||||
encode(message: WorkspaceMemoRelatedSetting, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
encode(message: WorkspaceSetting_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
|
||||||
return writer;
|
return writer;
|
||||||
},
|
},
|
||||||
|
|
||||||
decode(input: BinaryReader | Uint8Array, length?: number): WorkspaceMemoRelatedSetting {
|
decode(input: BinaryReader | Uint8Array, length?: number): WorkspaceSetting_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 = createBaseWorkspaceSetting_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
|
||||||
return message;
|
return message;
|
||||||
},
|
},
|
||||||
|
|
||||||
create(base?: DeepPartial<WorkspaceMemoRelatedSetting>): WorkspaceMemoRelatedSetting {
|
create(base?: DeepPartial<WorkspaceSetting_MemoRelatedSetting>): WorkspaceSetting_MemoRelatedSetting {
|
||||||
return WorkspaceMemoRelatedSetting.fromPartial(base ?? {});
|
return WorkspaceSetting_MemoRelatedSetting.fromPartial(base ?? {});
|
||||||
},
|
},
|
||||||
fromPartial(object: DeepPartial<WorkspaceMemoRelatedSetting>): WorkspaceMemoRelatedSetting {
|
fromPartial(object: DeepPartial<WorkspaceSetting_MemoRelatedSetting>): WorkspaceSetting_MemoRelatedSetting {
|
||||||
const message = createBaseWorkspaceMemoRelatedSetting();
|
const message = createBaseWorkspaceSetting_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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue