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
83febf99
Commit
83febf99
authored
Jun 23, 2025
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: clean resource definition
parent
5821bb7a
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
368 additions
and
643 deletions
+368
-643
attachment_service.proto
proto/api/v1/attachment_service.proto
+7
-9
idp_service.proto
proto/api/v1/idp_service.proto
+5
-7
memo_service.proto
proto/api/v1/memo_service.proto
+22
-30
user_service.proto
proto/api/v1/user_service.proto
+10
-16
webhook_service.proto
proto/api/v1/webhook_service.proto
+6
-12
workspace_service.proto
proto/api/v1/workspace_service.proto
+7
-9
attachment_service.pb.go
proto/gen/api/v1/attachment_service.pb.go
+16
-16
idp_service.pb.go
proto/gen/api/v1/idp_service.pb.go
+12
-21
memo_service.pb.go
proto/gen/api/v1/memo_service.pb.go
+52
-72
user_service.pb.go
proto/gen/api/v1/user_service.pb.go
+24
-44
webhook_service.pb.go
proto/gen/api/v1/webhook_service.pb.go
+15
-35
workspace_service.pb.go
proto/gen/api/v1/workspace_service.pb.go
+16
-16
apidocs.swagger.yaml
proto/gen/apidocs.swagger.yaml
+1
-48
workspace_setting.pb.go
proto/gen/store/workspace_setting.pb.go
+16
-16
workspace_setting.proto
proto/store/workspace_setting.proto
+7
-9
idp_service.go
server/router/api/v1/idp_service.go
+0
-1
memo_relation_service.go
server/router/api/v1/memo_relation_service.go
+0
-2
reaction_service.go
server/router/api/v1/reaction_service.go
+0
-1
idp_service_test.go
server/router/api/v1/test/idp_service_test.go
+0
-1
user_service.go
server/router/api/v1/user_service.go
+0
-7
webhook_service.go
server/router/api/v1/webhook_service.go
+0
-7
attachment_service.ts
web/src/types/proto/api/v1/attachment_service.ts
+21
-21
idp_service.ts
web/src/types/proto/api/v1/idp_service.ts
+11
-31
memo_service.ts
web/src/types/proto/api/v1/memo_service.ts
+61
-89
user_service.ts
web/src/types/proto/api/v1/user_service.ts
+24
-56
webhook_service.ts
web/src/types/proto/api/v1/webhook_service.ts
+14
-46
workspace_service.ts
web/src/types/proto/api/v1/workspace_service.ts
+21
-21
No files found.
proto/api/v1/attachment_service.proto
View file @
83febf99
...
@@ -59,33 +59,31 @@ message Attachment {
...
@@ -59,33 +59,31 @@ message Attachment {
plural
:
"attachments"
plural
:
"attachments"
};
};
reserved
2
;
// The name of the attachment.
// The name of the attachment.
// Format: attachments/{attachment}
// Format: attachments/{attachment}
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
// Output only. The creation timestamp.
// Output only. The creation timestamp.
google.protobuf.Timestamp
create_time
=
3
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
create_time
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The filename of the attachment.
// The filename of the attachment.
string
filename
=
4
[(
google.api.field_behavior
)
=
REQUIRED
];
string
filename
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
// Input only. The content of the attachment.
// Input only. The content of the attachment.
bytes
content
=
5
[(
google.api.field_behavior
)
=
INPUT_ONLY
];
bytes
content
=
4
[(
google.api.field_behavior
)
=
INPUT_ONLY
];
// Optional. The external link of the attachment.
// Optional. The external link of the attachment.
string
external_link
=
6
[(
google.api.field_behavior
)
=
OPTIONAL
];
string
external_link
=
5
[(
google.api.field_behavior
)
=
OPTIONAL
];
// The MIME type of the attachment.
// The MIME type of the attachment.
string
type
=
7
[(
google.api.field_behavior
)
=
REQUIRED
];
string
type
=
6
[(
google.api.field_behavior
)
=
REQUIRED
];
// Output only. The size of the attachment in bytes.
// Output only. The size of the attachment in bytes.
int64
size
=
8
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
int64
size
=
7
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Optional. The related memo. Refer to `Memo.name`.
// Optional. The related memo. Refer to `Memo.name`.
// Format: memos/{memo}
// Format: memos/{memo}
optional
string
memo
=
9
[(
google.api.field_behavior
)
=
OPTIONAL
];
optional
string
memo
=
8
[(
google.api.field_behavior
)
=
OPTIONAL
];
}
}
message
CreateAttachmentRequest
{
message
CreateAttachmentRequest
{
...
...
proto/api/v1/idp_service.proto
View file @
83febf99
...
@@ -61,23 +61,21 @@ message IdentityProvider {
...
@@ -61,23 +61,21 @@ message IdentityProvider {
// Format: identityProviders/{idp}
// Format: identityProviders/{idp}
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
// Output only. The system generated unique identifier.
string
uid
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Required. The type of the identity provider.
// Required. The type of the identity provider.
Type
type
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
Type
type
=
2
[(
google.api.field_behavior
)
=
REQUIRED
];
// Required. The display title of the identity provider.
// Required. The display title of the identity provider.
string
title
=
4
[(
google.api.field_behavior
)
=
REQUIRED
];
string
title
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
// Optional. Filter applied to user identifiers.
// Optional. Filter applied to user identifiers.
string
identifier_filter
=
5
[(
google.api.field_behavior
)
=
OPTIONAL
];
string
identifier_filter
=
4
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Required. Configuration for the identity provider.
// Required. Configuration for the identity provider.
IdentityProviderConfig
config
=
6
[(
google.api.field_behavior
)
=
REQUIRED
];
IdentityProviderConfig
config
=
5
[(
google.api.field_behavior
)
=
REQUIRED
];
enum
Type
{
enum
Type
{
TYPE_UNSPECIFIED
=
0
;
TYPE_UNSPECIFIED
=
0
;
// OAuth2 identity provider.
OAUTH2
=
1
;
OAUTH2
=
1
;
}
}
}
}
...
...
proto/api/v1/memo_service.proto
View file @
83febf99
...
@@ -146,12 +146,9 @@ message Reaction {
...
@@ -146,12 +146,9 @@ message Reaction {
(
google.api.field_behavior
)
=
IDENTIFIER
(
google.api.field_behavior
)
=
IDENTIFIER
];
];
// Output only. The system generated unique identifier.
string
uid
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The resource name of the creator.
// The resource name of the creator.
// Format: users/{user}
// Format: users/{user}
string
creator
=
3
[
string
creator
=
2
[
(
google.api.field_behavior
)
=
OUTPUT_ONLY
,
(
google.api.field_behavior
)
=
OUTPUT_ONLY
,
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/User"
}
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/User"
}
];
];
...
@@ -159,16 +156,16 @@ message Reaction {
...
@@ -159,16 +156,16 @@ message Reaction {
// The resource name of the content.
// The resource name of the content.
// For memo reactions, this should be the memo's resource name.
// For memo reactions, this should be the memo's resource name.
// Format: memos/{memo}
// Format: memos/{memo}
string
content_id
=
4
[
string
content_id
=
3
[
(
google.api.field_behavior
)
=
REQUIRED
,
(
google.api.field_behavior
)
=
REQUIRED
,
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/Memo"
}
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/Memo"
}
];
];
// Required. The type of reaction (e.g., "👍", "❤️", "😄").
// Required. The type of reaction (e.g., "👍", "❤️", "😄").
string
reaction_type
=
5
[(
google.api.field_behavior
)
=
REQUIRED
];
string
reaction_type
=
4
[(
google.api.field_behavior
)
=
REQUIRED
];
// Output only. The creation timestamp.
// Output only. The creation timestamp.
google.protobuf.Timestamp
create_time
=
6
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
create_time
=
5
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
}
}
message
Memo
{
message
Memo
{
...
@@ -180,70 +177,68 @@ message Memo {
...
@@ -180,70 +177,68 @@ message Memo {
plural
:
"memos"
plural
:
"memos"
};
};
reserved
2
;
// The resource name of the memo.
// The resource name of the memo.
// Format: memos/{memo}, memo is the user defined id or uuid.
// Format: memos/{memo}, memo is the user defined id or uuid.
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
// The state of the memo.
// The state of the memo.
State
state
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
State
state
=
2
[(
google.api.field_behavior
)
=
REQUIRED
];
// The name of the creator.
// The name of the creator.
// Format: users/{user}
// Format: users/{user}
string
creator
=
4
[
string
creator
=
3
[
(
google.api.field_behavior
)
=
OUTPUT_ONLY
,
(
google.api.field_behavior
)
=
OUTPUT_ONLY
,
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/User"
}
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/User"
}
];
];
// Output only. The creation timestamp.
// Output only. The creation timestamp.
google.protobuf.Timestamp
create_time
=
5
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
create_time
=
4
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The last update timestamp.
// Output only. The last update timestamp.
google.protobuf.Timestamp
update_time
=
6
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
update_time
=
5
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The display timestamp of the memo.
// The display timestamp of the memo.
google.protobuf.Timestamp
display_time
=
7
[(
google.api.field_behavior
)
=
OPTIONAL
];
google.protobuf.Timestamp
display_time
=
6
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Required. The content of the memo in Markdown format.
// Required. The content of the memo in Markdown format.
string
content
=
8
[(
google.api.field_behavior
)
=
REQUIRED
];
string
content
=
7
[(
google.api.field_behavior
)
=
REQUIRED
];
// Output only. The parsed nodes from the content.
// Output only. The parsed nodes from the content.
repeated
Node
nodes
=
9
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
Node
nodes
=
8
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The visibility of the memo.
// The visibility of the memo.
Visibility
visibility
=
10
[(
google.api.field_behavior
)
=
REQUIRED
];
Visibility
visibility
=
9
[(
google.api.field_behavior
)
=
REQUIRED
];
// Output only. The tags extracted from the content.
// Output only. The tags extracted from the content.
repeated
string
tags
=
1
1
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
string
tags
=
1
0
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Whether the memo is pinned.
// Whether the memo is pinned.
bool
pinned
=
1
2
[(
google.api.field_behavior
)
=
OPTIONAL
];
bool
pinned
=
1
1
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Optional. The attachments of the memo.
// Optional. The attachments of the memo.
repeated
Attachment
attachments
=
1
4
[(
google.api.field_behavior
)
=
OPTIONAL
];
repeated
Attachment
attachments
=
1
2
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Optional. The relations of the memo.
// Optional. The relations of the memo.
repeated
MemoRelation
relations
=
1
5
[(
google.api.field_behavior
)
=
OPTIONAL
];
repeated
MemoRelation
relations
=
1
3
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Output only. The reactions to the memo.
// Output only. The reactions to the memo.
repeated
Reaction
reactions
=
1
6
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
repeated
Reaction
reactions
=
1
4
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The computed properties of the memo.
// Output only. The computed properties of the memo.
Property
property
=
1
7
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
Property
property
=
1
5
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The name of the parent memo.
// Output only. The name of the parent memo.
// Format: memos/{memo}
// Format: memos/{memo}
optional
string
parent
=
1
8
[
optional
string
parent
=
1
6
[
(
google.api.field_behavior
)
=
OUTPUT_ONLY
,
(
google.api.field_behavior
)
=
OUTPUT_ONLY
,
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/Memo"
}
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/Memo"
}
];
];
// Output only. The snippet of the memo content. Plain text only.
// Output only. The snippet of the memo content. Plain text only.
string
snippet
=
1
9
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
string
snippet
=
1
7
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Optional. The location of the memo.
// Optional. The location of the memo.
optional
Location
location
=
20
[(
google.api.field_behavior
)
=
OPTIONAL
];
optional
Location
location
=
18
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Computed properties of a memo.
// Computed properties of a memo.
message
Property
{
message
Property
{
...
@@ -462,11 +457,8 @@ message MemoRelation {
...
@@ -462,11 +457,8 @@ message MemoRelation {
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/Memo"
}
(
google.api.resource_reference
)
=
{
type
:
"memos.api.v1/Memo"
}
];
];
// Output only. The unique identifier of the memo.
string
uid
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The snippet of the memo content. Plain text only.
// Output only. The snippet of the memo content. Plain text only.
string
snippet
=
3
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
string
snippet
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
}
}
}
}
...
...
proto/api/v1/user_service.proto
View file @
83febf99
...
@@ -135,41 +135,35 @@ message User {
...
@@ -135,41 +135,35 @@ message User {
// Format: users/{user}
// Format: users/{user}
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
// Output only. The system generated unique identifier.
string
uid
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The role of the user.
// The role of the user.
Role
role
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
Role
role
=
2
[(
google.api.field_behavior
)
=
REQUIRED
];
// Required. The unique username for login.
// Required. The unique username for login.
string
username
=
4
[(
google.api.field_behavior
)
=
REQUIRED
];
string
username
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
// Optional. The email address of the user.
// Optional. The email address of the user.
string
email
=
5
[(
google.api.field_behavior
)
=
OPTIONAL
];
string
email
=
4
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Optional. The display name of the user.
// Optional. The display name of the user.
string
display_name
=
6
[(
google.api.field_behavior
)
=
OPTIONAL
];
string
display_name
=
5
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Optional. The avatar URL of the user.
// Optional. The avatar URL of the user.
string
avatar_url
=
7
[(
google.api.field_behavior
)
=
OPTIONAL
];
string
avatar_url
=
6
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Optional. The description of the user.
// Optional. The description of the user.
string
description
=
8
[(
google.api.field_behavior
)
=
OPTIONAL
];
string
description
=
7
[(
google.api.field_behavior
)
=
OPTIONAL
];
// Input only. The password for the user.
// Input only. The password for the user.
string
password
=
9
[(
google.api.field_behavior
)
=
INPUT_ONLY
];
string
password
=
8
[(
google.api.field_behavior
)
=
INPUT_ONLY
];
// The state of the user.
// The state of the user.
State
state
=
10
[(
google.api.field_behavior
)
=
REQUIRED
];
State
state
=
9
[(
google.api.field_behavior
)
=
REQUIRED
];
// Output only. The creation timestamp.
// Output only. The creation timestamp.
google.protobuf.Timestamp
create_time
=
1
1
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
create_time
=
1
0
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The last update timestamp.
// Output only. The last update timestamp.
google.protobuf.Timestamp
update_time
=
12
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
update_time
=
11
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The etag for this resource.
string
etag
=
13
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// User role enumeration.
// User role enumeration.
enum
Role
{
enum
Role
{
...
...
proto/api/v1/webhook_service.proto
View file @
83febf99
...
@@ -64,30 +64,24 @@ message Webhook {
...
@@ -64,30 +64,24 @@ message Webhook {
// Format: webhooks/{webhook}
// Format: webhooks/{webhook}
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
string
name
=
1
[(
google.api.field_behavior
)
=
IDENTIFIER
];
// Output only. The system generated unique identifier.
string
uid
=
2
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Required. The display name of the webhook.
// Required. The display name of the webhook.
string
display_name
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
string
display_name
=
2
[(
google.api.field_behavior
)
=
REQUIRED
];
// Required. The target URL for the webhook.
// Required. The target URL for the webhook.
string
url
=
4
[(
google.api.field_behavior
)
=
REQUIRED
];
string
url
=
3
[(
google.api.field_behavior
)
=
REQUIRED
];
// Output only. The resource name of the creator.
// Output only. The resource name of the creator.
// Format: users/{user}
// Format: users/{user}
string
creator
=
5
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
string
creator
=
4
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// The state of the webhook.
// The state of the webhook.
State
state
=
6
[(
google.api.field_behavior
)
=
REQUIRED
];
State
state
=
5
[(
google.api.field_behavior
)
=
REQUIRED
];
// Output only. The creation timestamp.
// Output only. The creation timestamp.
google.protobuf.Timestamp
create_time
=
7
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
create_time
=
6
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The last update timestamp.
// Output only. The last update timestamp.
google.protobuf.Timestamp
update_time
=
8
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
google.protobuf.Timestamp
update_time
=
7
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
// Output only. The etag for this resource.
string
etag
=
9
[(
google.api.field_behavior
)
=
OUTPUT_ONLY
];
}
}
message
ListWebhooksRequest
{
message
ListWebhooksRequest
{
...
...
proto/api/v1/workspace_service.proto
View file @
83febf99
...
@@ -132,8 +132,6 @@ message WorkspaceStorageSetting {
...
@@ -132,8 +132,6 @@ message WorkspaceStorageSetting {
}
}
message
WorkspaceMemoRelatedSetting
{
message
WorkspaceMemoRelatedSetting
{
reserved
4
,
8
;
// 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.
...
@@ -141,19 +139,19 @@ message WorkspaceMemoRelatedSetting {
...
@@ -141,19 +139,19 @@ message WorkspaceMemoRelatedSetting {
// content_length_limit is the limit of content length. Unit is byte.
// content_length_limit is the limit of content length. Unit is byte.
int32
content_length_limit
=
3
;
int32
content_length_limit
=
3
;
// enable_double_click_edit enables editing on double click.
// enable_double_click_edit enables editing on double click.
bool
enable_double_click_edit
=
5
;
bool
enable_double_click_edit
=
4
;
// enable_link_preview enables links preview.
// enable_link_preview enables links preview.
bool
enable_link_preview
=
6
;
bool
enable_link_preview
=
5
;
// enable_comment enables comment.
// enable_comment enables comment.
bool
enable_comment
=
7
;
bool
enable_comment
=
6
;
// reactions is the list of reactions.
// reactions is the list of reactions.
repeated
string
reactions
=
10
;
repeated
string
reactions
=
7
;
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
bool
disable_markdown_shortcuts
=
11
;
bool
disable_markdown_shortcuts
=
8
;
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
bool
enable_blur_nsfw_content
=
12
;
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
=
1
3
;
repeated
string
nsfw_tags
=
1
0
;
}
}
// Request message for GetWorkspaceSetting method.
// Request message for GetWorkspaceSetting method.
...
...
proto/gen/api/v1/attachment_service.pb.go
View file @
83febf99
...
@@ -32,20 +32,20 @@ type Attachment struct {
...
@@ -32,20 +32,20 @@ type Attachment struct {
// Format: attachments/{attachment}
// Format: attachments/{attachment}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The creation timestamp.
// Output only. The creation timestamp.
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,
3
,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,
2
,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The filename of the attachment.
// The filename of the attachment.
Filename
string
`protobuf:"bytes,
4
,opt,name=filename,proto3" json:"filename,omitempty"`
Filename
string
`protobuf:"bytes,
3
,opt,name=filename,proto3" json:"filename,omitempty"`
// Input only. The content of the attachment.
// Input only. The content of the attachment.
Content
[]
byte
`protobuf:"bytes,
5
,opt,name=content,proto3" json:"content,omitempty"`
Content
[]
byte
`protobuf:"bytes,
4
,opt,name=content,proto3" json:"content,omitempty"`
// Optional. The external link of the attachment.
// Optional. The external link of the attachment.
ExternalLink
string
`protobuf:"bytes,
6
,opt,name=external_link,json=externalLink,proto3" json:"external_link,omitempty"`
ExternalLink
string
`protobuf:"bytes,
5
,opt,name=external_link,json=externalLink,proto3" json:"external_link,omitempty"`
// The MIME type of the attachment.
// The MIME type of the attachment.
Type
string
`protobuf:"bytes,
7
,opt,name=type,proto3" json:"type,omitempty"`
Type
string
`protobuf:"bytes,
6
,opt,name=type,proto3" json:"type,omitempty"`
// Output only. The size of the attachment in bytes.
// Output only. The size of the attachment in bytes.
Size
int64
`protobuf:"varint,
8
,opt,name=size,proto3" json:"size,omitempty"`
Size
int64
`protobuf:"varint,
7
,opt,name=size,proto3" json:"size,omitempty"`
// Optional. The related memo. Refer to `Memo.name`.
// Optional. The related memo. Refer to `Memo.name`.
// Format: memos/{memo}
// Format: memos/{memo}
Memo
*
string
`protobuf:"bytes,
9
,opt,name=memo,proto3,oneof" json:"memo,omitempty"`
Memo
*
string
`protobuf:"bytes,
8
,opt,name=memo,proto3,oneof" json:"memo,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -549,21 +549,21 @@ var File_api_v1_attachment_service_proto protoreflect.FileDescriptor
...
@@ -549,21 +549,21 @@ var File_api_v1_attachment_service_proto protoreflect.FileDescriptor
const
file_api_v1_attachment_service_proto_rawDesc
=
""
+
const
file_api_v1_attachment_service_proto_rawDesc
=
""
+
"
\n
"
+
"
\n
"
+
"
\x1f
api/v1/attachment_service.proto
\x12\f
memos.api.v1
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/httpbody.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
81\x03
\n
"
+
"
\x1f
api/v1/attachment_service.proto
\x12\f
memos.api.v1
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/httpbody.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
fb\x02
\n
"
+
"
\n
"
+
"
\n
"
+
"Attachment
\x12\x17\n
"
+
"Attachment
\x12\x17\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
@
\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
@
\n
"
+
"
\v
create_time
\x18\x0
3
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"
\v
create_time
\x18\x0
2
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"createTime
\x12\x1f\n
"
+
"createTime
\x12\x1f\n
"
+
"
\b
filename
\x18\x0
4
\x01
(
\t
B
\x03\xe0
A
\x02
R
\b
filename
\x12\x1d\n
"
+
"
\b
filename
\x18\x0
3
\x01
(
\t
B
\x03\xe0
A
\x02
R
\b
filename
\x12\x1d\n
"
+
"
\a
content
\x18\x0
5
\x01
(
\f
B
\x03\xe0
A
\x04
R
\a
content
\x12
(
\n
"
+
"
\a
content
\x18\x0
4
\x01
(
\f
B
\x03\xe0
A
\x04
R
\a
content
\x12
(
\n
"
+
"
\r
external_link
\x18\x0
6
\x01
(
\t
B
\x03\xe0
A
\x01
R
\f
externalLink
\x12\x17\n
"
+
"
\r
external_link
\x18\x0
5
\x01
(
\t
B
\x03\xe0
A
\x01
R
\f
externalLink
\x12\x17\n
"
+
"
\x04
type
\x18\
a
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x04
type
\x12\x17\n
"
+
"
\x04
type
\x18\
x06
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x04
type
\x12\x17\n
"
+
"
\x04
size
\x18\
b
\x01
(
\x03
B
\x03\xe0
A
\x03
R
\x04
size
\x12\x1c\n
"
+
"
\x04
size
\x18\
a
\x01
(
\x03
B
\x03\xe0
A
\x03
R
\x04
size
\x12\x1c\n
"
+
"
\x04
memo
\x18\
t
\x01
(
\t
B
\x03\xe0
A
\x01
H
\x00
R
\x04
memo
\x88\x01\x01
:O
\xea
AL
\n
"
+
"
\x04
memo
\x18\
b
\x01
(
\t
B
\x03\xe0
A
\x01
H
\x00
R
\x04
memo
\x88\x01\x01
:O
\xea
AL
\n
"
+
"
\x17
memos.api.v1/Attachment
\x12\x18
attachments/{attachment}*
\v
attachments2
\n
"
+
"
\x17
memos.api.v1/Attachment
\x12\x18
attachments/{attachment}*
\v
attachments2
\n
"
+
"attachmentB
\a\n
"
+
"attachmentB
\a\n
"
+
"
\x05
_memo
J
\x04\b\x02\x10\x03
\"\x82\x01\n
"
+
"
\x05
_memo
\"\x82\x01\n
"
+
"
\x17
CreateAttachmentRequest
\x12
=
\n
"
+
"
\x17
CreateAttachmentRequest
\x12
=
\n
"
+
"
\n
"
+
"
\n
"
+
"attachment
\x18\x01
\x01
(
\v
2
\x18
.memos.api.v1.AttachmentB
\x03\xe0
A
\x02
R
\n
"
+
"attachment
\x18\x01
\x01
(
\v
2
\x18
.memos.api.v1.AttachmentB
\x03\xe0
A
\x02
R
\n
"
+
...
...
proto/gen/api/v1/idp_service.pb.go
View file @
83febf99
...
@@ -28,7 +28,8 @@ type IdentityProvider_Type int32
...
@@ -28,7 +28,8 @@ type IdentityProvider_Type int32
const
(
const
(
IdentityProvider_TYPE_UNSPECIFIED
IdentityProvider_Type
=
0
IdentityProvider_TYPE_UNSPECIFIED
IdentityProvider_Type
=
0
IdentityProvider_OAUTH2
IdentityProvider_Type
=
1
// OAuth2 identity provider.
IdentityProvider_OAUTH2
IdentityProvider_Type
=
1
)
)
// Enum value maps for IdentityProvider_Type.
// Enum value maps for IdentityProvider_Type.
...
@@ -75,16 +76,14 @@ type IdentityProvider struct {
...
@@ -75,16 +76,14 @@ type IdentityProvider struct {
// The resource name of the identity provider.
// The resource name of the identity provider.
// Format: identityProviders/{idp}
// Format: identityProviders/{idp}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The system generated unique identifier.
Uid
string
`protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// Required. The type of the identity provider.
// Required. The type of the identity provider.
Type
IdentityProvider_Type
`protobuf:"varint,
3
,opt,name=type,proto3,enum=memos.api.v1.IdentityProvider_Type" json:"type,omitempty"`
Type
IdentityProvider_Type
`protobuf:"varint,
2
,opt,name=type,proto3,enum=memos.api.v1.IdentityProvider_Type" json:"type,omitempty"`
// Required. The display title of the identity provider.
// Required. The display title of the identity provider.
Title
string
`protobuf:"bytes,
4
,opt,name=title,proto3" json:"title,omitempty"`
Title
string
`protobuf:"bytes,
3
,opt,name=title,proto3" json:"title,omitempty"`
// Optional. Filter applied to user identifiers.
// Optional. Filter applied to user identifiers.
IdentifierFilter
string
`protobuf:"bytes,
5
,opt,name=identifier_filter,json=identifierFilter,proto3" json:"identifier_filter,omitempty"`
IdentifierFilter
string
`protobuf:"bytes,
4
,opt,name=identifier_filter,json=identifierFilter,proto3" json:"identifier_filter,omitempty"`
// Required. Configuration for the identity provider.
// Required. Configuration for the identity provider.
Config
*
IdentityProviderConfig
`protobuf:"bytes,
6
,opt,name=config,proto3" json:"config,omitempty"`
Config
*
IdentityProviderConfig
`protobuf:"bytes,
5
,opt,name=config,proto3" json:"config,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -126,13 +125,6 @@ func (x *IdentityProvider) GetName() string {
...
@@ -126,13 +125,6 @@ func (x *IdentityProvider) GetName() string {
return
""
return
""
}
}
func
(
x
*
IdentityProvider
)
GetUid
()
string
{
if
x
!=
nil
{
return
x
.
Uid
}
return
""
}
func
(
x
*
IdentityProvider
)
GetType
()
IdentityProvider_Type
{
func
(
x
*
IdentityProvider
)
GetType
()
IdentityProvider_Type
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Type
return
x
.
Type
...
@@ -701,14 +693,13 @@ var File_api_v1_idp_service_proto protoreflect.FileDescriptor
...
@@ -701,14 +693,13 @@ var File_api_v1_idp_service_proto protoreflect.FileDescriptor
const
file_api_v1_idp_service_proto_rawDesc
=
""
+
const
file_api_v1_idp_service_proto_rawDesc
=
""
+
"
\n
"
+
"
\n
"
+
"
\x18
api/v1/idp_service.proto
\x12\f
memos.api.v1
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\"\x
a2
\x03\n
"
+
"
\x18
api/v1/idp_service.proto
\x12\f
memos.api.v1
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\"\x
8b
\x03\n
"
+
"
\x10
IdentityProvider
\x12\x17\n
"
+
"
\x10
IdentityProvider
\x12\x17\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12\x15\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
<
\n
"
+
"
\x03
uid
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x03
R
\x03
uid
\x12
<
\n
"
+
"
\x04
type
\x18\x02
\x01
(
\x0e
2#.memos.api.v1.IdentityProvider.TypeB
\x03\xe0
A
\x02
R
\x04
type
\x12\x19\n
"
+
"
\x04
type
\x18\x03
\x01
(
\x0e
2#.memos.api.v1.IdentityProvider.TypeB
\x03\xe0
A
\x02
R
\x04
type
\x12\x19\n
"
+
"
\x05
title
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x05
title
\x12
0
\n
"
+
"
\x05
title
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x05
title
\x12
0
\n
"
+
"
\x11
identifier_filter
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x10
identifierFilter
\x12
A
\n
"
+
"
\x11
identifier_filter
\x18\x05
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x10
identifierFilter
\x12
A
\n
"
+
"
\x06
config
\x18\x05
\x01
(
\v
2$.memos.api.v1.IdentityProviderConfigB
\x03\xe0
A
\x02
R
\x06
config
\"
(
\n
"
+
"
\x06
config
\x18\x06
\x01
(
\v
2$.memos.api.v1.IdentityProviderConfigB
\x03\xe0
A
\x02
R
\x06
config
\"
(
\n
"
+
"
\x04
Type
\x12\x14\n
"
+
"
\x04
Type
\x12\x14\n
"
+
"
\x10
TYPE_UNSPECIFIED
\x10\x00\x12\n
"
+
"
\x10
TYPE_UNSPECIFIED
\x10\x00\x12\n
"
+
"
\n
"
+
"
\n
"
+
...
...
proto/gen/api/v1/memo_service.pb.go
View file @
83febf99
This diff is collapsed.
Click to expand it.
proto/gen/api/v1/user_service.pb.go
View file @
83febf99
...
@@ -88,30 +88,26 @@ type User struct {
...
@@ -88,30 +88,26 @@ type User struct {
// The resource name of the user.
// The resource name of the user.
// Format: users/{user}
// Format: users/{user}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The system generated unique identifier.
Uid
string
`protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// The role of the user.
// The role of the user.
Role
User_Role
`protobuf:"varint,
3
,opt,name=role,proto3,enum=memos.api.v1.User_Role" json:"role,omitempty"`
Role
User_Role
`protobuf:"varint,
2
,opt,name=role,proto3,enum=memos.api.v1.User_Role" json:"role,omitempty"`
// Required. The unique username for login.
// Required. The unique username for login.
Username
string
`protobuf:"bytes,
4
,opt,name=username,proto3" json:"username,omitempty"`
Username
string
`protobuf:"bytes,
3
,opt,name=username,proto3" json:"username,omitempty"`
// Optional. The email address of the user.
// Optional. The email address of the user.
Email
string
`protobuf:"bytes,
5
,opt,name=email,proto3" json:"email,omitempty"`
Email
string
`protobuf:"bytes,
4
,opt,name=email,proto3" json:"email,omitempty"`
// Optional. The display name of the user.
// Optional. The display name of the user.
DisplayName
string
`protobuf:"bytes,
6
,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
DisplayName
string
`protobuf:"bytes,
5
,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Optional. The avatar URL of the user.
// Optional. The avatar URL of the user.
AvatarUrl
string
`protobuf:"bytes,
7
,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
AvatarUrl
string
`protobuf:"bytes,
6
,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
// Optional. The description of the user.
// Optional. The description of the user.
Description
string
`protobuf:"bytes,
8
,opt,name=description,proto3" json:"description,omitempty"`
Description
string
`protobuf:"bytes,
7
,opt,name=description,proto3" json:"description,omitempty"`
// Input only. The password for the user.
// Input only. The password for the user.
Password
string
`protobuf:"bytes,
9
,opt,name=password,proto3" json:"password,omitempty"`
Password
string
`protobuf:"bytes,
8
,opt,name=password,proto3" json:"password,omitempty"`
// The state of the user.
// The state of the user.
State
State
`protobuf:"varint,
10
,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"`
State
State
`protobuf:"varint,
9
,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"`
// Output only. The creation timestamp.
// Output only. The creation timestamp.
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,1
1
,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,1
0
,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The last update timestamp.
// Output only. The last update timestamp.
UpdateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
UpdateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Output only. The etag for this resource.
Etag
string
`protobuf:"bytes,13,opt,name=etag,proto3" json:"etag,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -153,13 +149,6 @@ func (x *User) GetName() string {
...
@@ -153,13 +149,6 @@ func (x *User) GetName() string {
return
""
return
""
}
}
func
(
x
*
User
)
GetUid
()
string
{
if
x
!=
nil
{
return
x
.
Uid
}
return
""
}
func
(
x
*
User
)
GetRole
()
User_Role
{
func
(
x
*
User
)
GetRole
()
User_Role
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
Role
return
x
.
Role
...
@@ -230,13 +219,6 @@ func (x *User) GetUpdateTime() *timestamppb.Timestamp {
...
@@ -230,13 +219,6 @@ func (x *User) GetUpdateTime() *timestamppb.Timestamp {
return
nil
return
nil
}
}
func
(
x
*
User
)
GetEtag
()
string
{
if
x
!=
nil
{
return
x
.
Etag
}
return
""
}
type
ListUsersRequest
struct
{
type
ListUsersRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// Optional. The maximum number of users to return.
// Optional. The maximum number of users to return.
...
@@ -1942,25 +1924,23 @@ var File_api_v1_user_service_proto protoreflect.FileDescriptor
...
@@ -1942,25 +1924,23 @@ var File_api_v1_user_service_proto protoreflect.FileDescriptor
const
file_api_v1_user_service_proto_rawDesc
=
""
+
const
file_api_v1_user_service_proto_rawDesc
=
""
+
"
\n
"
+
"
\n
"
+
"
\x19
api/v1/user_service.proto
\x12\f
memos.api.v1
\x1a\x13
api/v1/common.proto
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/httpbody.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
f
b\x04\n
"
+
"
\x19
api/v1/user_service.proto
\x12\f
memos.api.v1
\x1a\x13
api/v1/common.proto
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/httpbody.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
c
b\x04\n
"
+
"
\x04
User
\x12\x17\n
"
+
"
\x04
User
\x12\x17\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12\x15\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
0
\n
"
+
"
\x03
uid
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x03
R
\x03
uid
\x12
0
\n
"
+
"
\x04
role
\x18\x02
\x01
(
\x0e
2
\x17
.memos.api.v1.User.RoleB
\x03\xe0
A
\x02
R
\x04
role
\x12\x1f\n
"
+
"
\x04
role
\x18\x03
\x01
(
\x0e
2
\x17
.memos.api.v1.User.RoleB
\x03\xe0
A
\x02
R
\x04
role
\x12\x1f\n
"
+
"
\b
username
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x02
R
\b
username
\x12\x19\n
"
+
"
\b
username
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x02
R
\b
username
\x12\x19\n
"
+
"
\x05
email
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x05
email
\x12
&
\n
"
+
"
\x05
email
\x18\x05
\x01
(
\t
B
\x03\xe0
A
\x01
R
\x05
email
\x12
&
\n
"
+
"
\f
display_name
\x18\x05
\x01
(
\t
B
\x03\xe0
A
\x01
R
\v
displayName
\x12\"\n
"
+
"
\f
display_name
\x18\x06
\x01
(
\t
B
\x03\xe0
A
\x01
R
\v
displayName
\x12\"\n
"
+
"
\n
"
+
"
\n
"
+
"avatar_url
\x18\
a
\x01
(
\t
B
\x03\xe0
A
\x01
R
\t
avatarUrl
\x12
%
\n
"
+
"avatar_url
\x18\
x06
\x01
(
\t
B
\x03\xe0
A
\x01
R
\t
avatarUrl
\x12
%
\n
"
+
"
\v
description
\x18\
b
\x01
(
\t
B
\x03\xe0
A
\x01
R
\v
description
\x12\x1f\n
"
+
"
\v
description
\x18\
a
\x01
(
\t
B
\x03\xe0
A
\x01
R
\v
description
\x12\x1f\n
"
+
"
\b
password
\x18\
t
\x01
(
\t
B
\x03\xe0
A
\x04
R
\b
password
\x12
.
\n
"
+
"
\b
password
\x18\
b
\x01
(
\t
B
\x03\xe0
A
\x04
R
\b
password
\x12
.
\n
"
+
"
\x05
state
\x18\n
"
+
"
\x05
state
\x18\
t
\x01
(
\x0e
2
\x13
.memos.api.v1.StateB
\x03\xe0
A
\x02
R
\x05
state
\x12
@
\
n
"
+
"
\x01
(
\x0e
2
\x13
.memos.api.v1.StateB
\x03\xe0
A
\x02
R
\x05
state
\x12
@
\n
"
+
"
\v
create_time
\x18
\n
"
+
"
\v
create_time
\x18\v
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"createTime
\x12
@
\n
"
+
"createTime
\x12
@
\n
"
+
"
\v
update_time
\x18\f
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"
\v
update_time
\x18\v
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"updateTime
\x12\x17\n
"
+
"updateTime
\"
;
\n
"
+
"
\x04
etag
\x18\r
\x01
(
\t
B
\x03\xe0
A
\x03
R
\x04
etag
\"
;
\n
"
+
"
\x04
Role
\x12\x14\n
"
+
"
\x04
Role
\x12\x14\n
"
+
"
\x10
ROLE_UNSPECIFIED
\x10\x00\x12\b\n
"
+
"
\x10
ROLE_UNSPECIFIED
\x10\x00\x12\b\n
"
+
"
\x04
HOST
\x10\x01\x12\t\n
"
+
"
\x04
HOST
\x10\x01\x12\t\n
"
+
...
...
proto/gen/api/v1/webhook_service.pb.go
View file @
83febf99
...
@@ -30,23 +30,19 @@ type Webhook struct {
...
@@ -30,23 +30,19 @@ type Webhook struct {
// The resource name of the webhook.
// The resource name of the webhook.
// Format: webhooks/{webhook}
// Format: webhooks/{webhook}
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name
string
`protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The system generated unique identifier.
Uid
string
`protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// Required. The display name of the webhook.
// Required. The display name of the webhook.
DisplayName
string
`protobuf:"bytes,
3
,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
DisplayName
string
`protobuf:"bytes,
2
,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Required. The target URL for the webhook.
// Required. The target URL for the webhook.
Url
string
`protobuf:"bytes,
4
,opt,name=url,proto3" json:"url,omitempty"`
Url
string
`protobuf:"bytes,
3
,opt,name=url,proto3" json:"url,omitempty"`
// Output only. The resource name of the creator.
// Output only. The resource name of the creator.
// Format: users/{user}
// Format: users/{user}
Creator
string
`protobuf:"bytes,
5
,opt,name=creator,proto3" json:"creator,omitempty"`
Creator
string
`protobuf:"bytes,
4
,opt,name=creator,proto3" json:"creator,omitempty"`
// The state of the webhook.
// The state of the webhook.
State
State
`protobuf:"varint,
6
,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"`
State
State
`protobuf:"varint,
5
,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"`
// Output only. The creation timestamp.
// Output only. The creation timestamp.
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,
7
,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
CreateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,
6
,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The last update timestamp.
// Output only. The last update timestamp.
UpdateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
UpdateTime
*
timestamppb
.
Timestamp
`protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Output only. The etag for this resource.
Etag
string
`protobuf:"bytes,9,opt,name=etag,proto3" json:"etag,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -88,13 +84,6 @@ func (x *Webhook) GetName() string {
...
@@ -88,13 +84,6 @@ func (x *Webhook) GetName() string {
return
""
return
""
}
}
func
(
x
*
Webhook
)
GetUid
()
string
{
if
x
!=
nil
{
return
x
.
Uid
}
return
""
}
func
(
x
*
Webhook
)
GetDisplayName
()
string
{
func
(
x
*
Webhook
)
GetDisplayName
()
string
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisplayName
return
x
.
DisplayName
...
@@ -137,13 +126,6 @@ func (x *Webhook) GetUpdateTime() *timestamppb.Timestamp {
...
@@ -137,13 +126,6 @@ func (x *Webhook) GetUpdateTime() *timestamppb.Timestamp {
return
nil
return
nil
}
}
func
(
x
*
Webhook
)
GetEtag
()
string
{
if
x
!=
nil
{
return
x
.
Etag
}
return
""
}
type
ListWebhooksRequest
struct
{
type
ListWebhooksRequest
struct
{
state
protoimpl
.
MessageState
`protogen:"open.v1"`
state
protoimpl
.
MessageState
`protogen:"open.v1"`
// Optional. The maximum number of webhooks to return.
// Optional. The maximum number of webhooks to return.
...
@@ -632,19 +614,17 @@ var File_api_v1_webhook_service_proto protoreflect.FileDescriptor
...
@@ -632,19 +614,17 @@ var File_api_v1_webhook_service_proto protoreflect.FileDescriptor
const
file_api_v1_webhook_service_proto_rawDesc
=
""
+
const
file_api_v1_webhook_service_proto_rawDesc
=
""
+
"
\n
"
+
"
\n
"
+
"
\x1c
api/v1/webhook_service.proto
\x12\f
memos.api.v1
\x1a\x13
api/v1/common.proto
\x1a\x19
api/v1/memo_service.proto
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
ac\x03
\n
"
+
"
\x1c
api/v1/webhook_service.proto
\x12\f
memos.api.v1
\x1a\x13
api/v1/common.proto
\x1a\x19
api/v1/memo_service.proto
\x1a\x1c
google/api/annotations.proto
\x1a\x17
google/api/client.proto
\x1a\x1f
google/api/field_behavior.proto
\x1a\x19
google/api/resource.proto
\x1a\x1b
google/protobuf/empty.proto
\x1a
google/protobuf/field_mask.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\x
fc\x02
\n
"
+
"
\a
Webhook
\x12\x17\n
"
+
"
\a
Webhook
\x12\x17\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12\x15\n
"
+
"
\x04
name
\x18\x01
\x01
(
\t
B
\x03\xe0
A
\b
R
\x04
name
\x12
&
\n
"
+
"
\x03
uid
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x03
R
\x03
uid
\x12
&
\n
"
+
"
\f
display_name
\x18\x02
\x01
(
\t
B
\x03\xe0
A
\x02
R
\v
displayName
\x12\x15\n
"
+
"
\f
display_name
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x02
R
\v
displayName
\x12\x15\n
"
+
"
\x03
url
\x18\x03
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x03
url
\x12\x1d\n
"
+
"
\x03
url
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x02
R
\x03
url
\x12\x1d\n
"
+
"
\a
creator
\x18\x04
\x01
(
\t
B
\x03\xe0
A
\x03
R
\a
creator
\x12
.
\n
"
+
"
\a
creator
\x18\x05
\x01
(
\t
B
\x03\xe0
A
\x03
R
\a
creator
\x12
.
\n
"
+
"
\x05
state
\x18\x05
\x01
(
\x0e
2
\x13
.memos.api.v1.StateB
\x03\xe0
A
\x02
R
\x05
state
\x12
@
\n
"
+
"
\x05
state
\x18\x06
\x01
(
\x0e
2
\x13
.memos.api.v1.StateB
\x03\xe0
A
\x02
R
\x05
state
\x12
@
\n
"
+
"
\v
create_time
\x18\x06
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"
\v
create_time
\x18\a
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"createTime
\x12
@
\n
"
+
"createTime
\x12
@
\n
"
+
"
\v
update_time
\x18\b
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"
\v
update_time
\x18\a
\x01
(
\v
2
\x1a
.google.protobuf.TimestampB
\x03\xe0
A
\x03
R
\n
"
+
"updateTime
\x12\x17\n
"
+
"updateTime:F
\xea
AC
\n
"
+
"
\x04
etag
\x18\t
\x01
(
\t
B
\x03\xe0
A
\x03
R
\x04
etag:F
\xea
AC
\n
"
+
"
\x14
memos.api.v1/Webhook
\x12\x12
webhooks/{webhook}
\x1a\x04
name*
\b
webhooks2
\a
webhook
\"\xc0\x01\n
"
+
"
\x14
memos.api.v1/Webhook
\x12\x12
webhooks/{webhook}
\x1a\x04
name*
\b
webhooks2
\a
webhook
\"\xc0\x01\n
"
+
"
\x13
ListWebhooksRequest
\x12
\n
"
+
"
\x13
ListWebhooksRequest
\x12
\n
"
+
"
\t
page_size
\x18\x01
\x01
(
\x05
B
\x03\xe0
A
\x01
R
\b
pageSize
\x12\"\n
"
+
"
\t
page_size
\x18\x01
\x01
(
\x05
B
\x03\xe0
A
\x01
R
\b
pageSize
\x12\"\n
"
+
...
...
proto/gen/api/v1/workspace_service.pb.go
View file @
83febf99
...
@@ -566,19 +566,19 @@ type WorkspaceMemoRelatedSetting struct {
...
@@ -566,19 +566,19 @@ type WorkspaceMemoRelatedSetting struct {
// content_length_limit is the limit of content length. Unit is byte.
// content_length_limit is the limit of content length. Unit is byte.
ContentLengthLimit
int32
`protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"`
ContentLengthLimit
int32
`protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"`
// enable_double_click_edit enables editing on double click.
// enable_double_click_edit enables editing on double click.
EnableDoubleClickEdit
bool
`protobuf:"varint,
5
,opt,name=enable_double_click_edit,json=enableDoubleClickEdit,proto3" json:"enable_double_click_edit,omitempty"`
EnableDoubleClickEdit
bool
`protobuf:"varint,
4
,opt,name=enable_double_click_edit,json=enableDoubleClickEdit,proto3" json:"enable_double_click_edit,omitempty"`
// enable_link_preview enables links preview.
// enable_link_preview enables links preview.
EnableLinkPreview
bool
`protobuf:"varint,
6
,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
EnableLinkPreview
bool
`protobuf:"varint,
5
,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
// enable_comment enables comment.
// enable_comment enables comment.
EnableComment
bool
`protobuf:"varint,
7
,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
EnableComment
bool
`protobuf:"varint,
6
,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
// reactions is the list of reactions.
// reactions is the list of reactions.
Reactions
[]
string
`protobuf:"bytes,
10
,rep,name=reactions,proto3" json:"reactions,omitempty"`
Reactions
[]
string
`protobuf:"bytes,
7
,rep,name=reactions,proto3" json:"reactions,omitempty"`
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
DisableMarkdownShortcuts
bool
`protobuf:"varint,
11
,opt,name=disable_markdown_shortcuts,json=disableMarkdownShortcuts,proto3" json:"disable_markdown_shortcuts,omitempty"`
DisableMarkdownShortcuts
bool
`protobuf:"varint,
8
,opt,name=disable_markdown_shortcuts,json=disableMarkdownShortcuts,proto3" json:"disable_markdown_shortcuts,omitempty"`
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
EnableBlurNsfwContent
bool
`protobuf:"varint,
12
,opt,name=enable_blur_nsfw_content,json=enableBlurNsfwContent,proto3" json:"enable_blur_nsfw_content,omitempty"`
EnableBlurNsfwContent
bool
`protobuf:"varint,
9
,opt,name=enable_blur_nsfw_content,json=enableBlurNsfwContent,proto3" json:"enable_blur_nsfw_content,omitempty"`
// 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.
NsfwTags
[]
string
`protobuf:"bytes,1
3
,rep,name=nsfw_tags,json=nsfwTags,proto3" json:"nsfw_tags,omitempty"`
NsfwTags
[]
string
`protobuf:"bytes,1
0
,rep,name=nsfw_tags,json=nsfwTags,proto3" json:"nsfw_tags,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -921,19 +921,19 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
...
@@ -921,19 +921,19 @@ 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\"\x
94
\x04\n
"
+
"
\x02
S3
\x10\x03\"\x
88
\x04\n
"
+
"
\x1b
WorkspaceMemoRelatedSetting
\x12
<
\n
"
+
"
\x1b
WorkspaceMemoRelatedSetting
\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
"
+
"
\x18
enable_double_click_edit
\x18\x0
5
\x01
(
\b
R
\x15
enableDoubleClickEdit
\x12
.
\n
"
+
"
\x18
enable_double_click_edit
\x18\x0
4
\x01
(
\b
R
\x15
enableDoubleClickEdit
\x12
.
\n
"
+
"
\x13
enable_link_preview
\x18\x0
6
\x01
(
\b
R
\x11
enableLinkPreview
\x12
%
\n
"
+
"
\x13
enable_link_preview
\x18\x0
5
\x01
(
\b
R
\x11
enableLinkPreview
\x12
%
\n
"
+
"
\x0e
enable_comment
\x18\
a
\x01
(
\b
R
\r
enableComment
\x12\x1c\n
"
+
"
\x0e
enable_comment
\x18\
x06
\x01
(
\b
R
\r
enableComment
\x12\x1c\n
"
+
"
\t
reactions
\x18\n
"
+
"
\t
reactions
\x18\
a
\x03
(
\t
R
\t
reactions
\x12
<
\
n
"
+
"
\x03
(
\t
R
\t
reactions
\x12
<
\n
"
+
"
\x1a
disable_markdown_shortcuts
\x18\b
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x1
a
disable_markdown_shortcuts
\x18\v
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x1
8
enable_blur_nsfw_content
\x18\t
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b
\n
"
+
"
\
x18
enable_blur_nsfw_content
\x18\f
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b
\n
"
+
"
\
t
nsfw_tags
\x18
\n
"
+
"
\t
nsfw_tags
\x18\r
\x03
(
\t
R
\b
nsfwTagsJ
\x04\b\x04\x10\x05
J
\x04\b\b\x10\t
\"
X
\n
"
+
"
\x03
(
\t
R
\b
nsfwTags
\"
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
"
+
...
...
proto/gen/apidocs.swagger.yaml
View file @
83febf99
...
@@ -819,10 +819,6 @@ paths:
...
@@ -819,10 +819,6 @@ paths:
schema
:
schema
:
type
:
object
type
:
object
properties
:
properties
:
uid
:
type
:
string
description
:
Output only. The system generated unique identifier.
readOnly
:
true
type
:
type
:
$ref
:
'
#/definitions/apiv1IdentityProviderType'
$ref
:
'
#/definitions/apiv1IdentityProviderType'
description
:
Required. The type of the identity provider.
description
:
Required. The type of the identity provider.
...
@@ -2369,10 +2365,6 @@ paths:
...
@@ -2369,10 +2365,6 @@ paths:
schema
:
schema
:
type
:
object
type
:
object
properties
:
properties
:
uid
:
type
:
string
description
:
Output only. The system generated unique identifier.
readOnly
:
true
role
:
role
:
$ref
:
'
#/definitions/UserRole'
$ref
:
'
#/definitions/UserRole'
description
:
The role of the user.
description
:
The role of the user.
...
@@ -2407,10 +2399,6 @@ paths:
...
@@ -2407,10 +2399,6 @@ paths:
format
:
date-time
format
:
date-time
description
:
Output only. The last update timestamp.
description
:
Output only. The last update timestamp.
readOnly
:
true
readOnly
:
true
etag
:
type
:
string
description
:
Output only. The etag for this resource.
readOnly
:
true
title
:
Required. The user to update.
title
:
Required. The user to update.
required
:
required
:
-
role
-
role
...
@@ -2453,10 +2441,6 @@ paths:
...
@@ -2453,10 +2441,6 @@ paths:
schema
:
schema
:
type
:
object
type
:
object
properties
:
properties
:
uid
:
type
:
string
description
:
Output only. The system generated unique identifier.
readOnly
:
true
displayName
:
displayName
:
type
:
string
type
:
string
description
:
Required. The display name of the webhook.
description
:
Required. The display name of the webhook.
...
@@ -2482,10 +2466,6 @@ paths:
...
@@ -2482,10 +2466,6 @@ paths:
format
:
date-time
format
:
date-time
description
:
Output only. The last update timestamp.
description
:
Output only. The last update timestamp.
readOnly
:
true
readOnly
:
true
etag
:
type
:
string
description
:
Output only. The etag for this resource.
readOnly
:
true
title
:
Required. The webhook to update.
title
:
Required. The webhook to update.
required
:
required
:
-
displayName
-
displayName
...
@@ -2755,10 +2735,6 @@ definitions:
...
@@ -2755,10 +2735,6 @@ definitions:
title
:
|-
title
:
|-
The resource name of the identity provider.
The resource name of the identity provider.
Format: identityProviders/{idp}
Format: identityProviders/{idp}
uid
:
type
:
string
description
:
Output only. The system generated unique identifier.
readOnly
:
true
type
:
type
:
$ref
:
'
#/definitions/apiv1IdentityProviderType'
$ref
:
'
#/definitions/apiv1IdentityProviderType'
description
:
Required. The type of the identity provider.
description
:
Required. The type of the identity provider.
...
@@ -2786,6 +2762,7 @@ definitions:
...
@@ -2786,6 +2762,7 @@ definitions:
-
TYPE_UNSPECIFIED
-
TYPE_UNSPECIFIED
-
OAUTH2
-
OAUTH2
default
:
TYPE_UNSPECIFIED
default
:
TYPE_UNSPECIFIED
description
:
'
-
OAUTH2:
OAuth2
identity
provider.'
apiv1Location
:
apiv1Location
:
type
:
object
type
:
object
properties
:
properties
:
...
@@ -3792,10 +3769,6 @@ definitions:
...
@@ -3792,10 +3769,6 @@ definitions:
title
:
|-
title
:
|-
The resource name of the memo.
The resource name of the memo.
Format: memos/{memo}
Format: memos/{memo}
uid
:
type
:
string
description
:
Output only. The unique identifier of the memo.
readOnly
:
true
snippet
:
snippet
:
type
:
string
type
:
string
description
:
Output only. The snippet of the memo content. Plain text only.
description
:
Output only. The snippet of the memo content. Plain text only.
...
@@ -3982,10 +3955,6 @@ definitions:
...
@@ -3982,10 +3955,6 @@ definitions:
The resource name of the reaction.
The resource name of the reaction.
Format: reactions/{reaction}
Format: reactions/{reaction}
readOnly: true
readOnly: true
uid
:
type
:
string
description
:
Output only. The system generated unique identifier.
readOnly
:
true
creator
:
creator
:
type
:
string
type
:
string
title
:
|-
title
:
|-
...
@@ -4181,10 +4150,6 @@ definitions:
...
@@ -4181,10 +4150,6 @@ definitions:
title
:
|-
title
:
|-
The resource name of the user.
The resource name of the user.
Format: users/{user}
Format: users/{user}
uid
:
type
:
string
description
:
Output only. The system generated unique identifier.
readOnly
:
true
role
:
role
:
$ref
:
'
#/definitions/UserRole'
$ref
:
'
#/definitions/UserRole'
description
:
The role of the user.
description
:
The role of the user.
...
@@ -4219,10 +4184,6 @@ definitions:
...
@@ -4219,10 +4184,6 @@ definitions:
format
:
date-time
format
:
date-time
description
:
Output only. The last update timestamp.
description
:
Output only. The last update timestamp.
readOnly
:
true
readOnly
:
true
etag
:
type
:
string
description
:
Output only. The etag for this resource.
readOnly
:
true
required
:
required
:
-
role
-
role
-
username
-
username
...
@@ -4350,10 +4311,6 @@ definitions:
...
@@ -4350,10 +4311,6 @@ definitions:
title
:
|-
title
:
|-
The resource name of the webhook.
The resource name of the webhook.
Format: webhooks/{webhook}
Format: webhooks/{webhook}
uid
:
type
:
string
description
:
Output only. The system generated unique identifier.
readOnly
:
true
displayName
:
displayName
:
type
:
string
type
:
string
description
:
Required. The display name of the webhook.
description
:
Required. The display name of the webhook.
...
@@ -4379,10 +4336,6 @@ definitions:
...
@@ -4379,10 +4336,6 @@ definitions:
format
:
date-time
format
:
date-time
description
:
Output only. The last update timestamp.
description
:
Output only. The last update timestamp.
readOnly
:
true
readOnly
:
true
etag
:
type
:
string
description
:
Output only. The etag for this resource.
readOnly
:
true
required
:
required
:
-
displayName
-
displayName
-
url
-
url
...
...
proto/gen/store/workspace_setting.pb.go
View file @
83febf99
...
@@ -664,19 +664,19 @@ type WorkspaceMemoRelatedSetting struct {
...
@@ -664,19 +664,19 @@ type WorkspaceMemoRelatedSetting struct {
// content_length_limit is the limit of content length. Unit is byte.
// content_length_limit is the limit of content length. Unit is byte.
ContentLengthLimit
int32
`protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"`
ContentLengthLimit
int32
`protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"`
// enable_double_click_edit enables editing on double click.
// enable_double_click_edit enables editing on double click.
EnableDoubleClickEdit
bool
`protobuf:"varint,
5
,opt,name=enable_double_click_edit,json=enableDoubleClickEdit,proto3" json:"enable_double_click_edit,omitempty"`
EnableDoubleClickEdit
bool
`protobuf:"varint,
4
,opt,name=enable_double_click_edit,json=enableDoubleClickEdit,proto3" json:"enable_double_click_edit,omitempty"`
// enable_link_preview enables links preview.
// enable_link_preview enables links preview.
EnableLinkPreview
bool
`protobuf:"varint,
6
,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
EnableLinkPreview
bool
`protobuf:"varint,
5
,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
// enable_comment enables comment.
// enable_comment enables comment.
EnableComment
bool
`protobuf:"varint,
7
,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
EnableComment
bool
`protobuf:"varint,
6
,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
// reactions is the list of reactions.
// reactions is the list of reactions.
Reactions
[]
string
`protobuf:"bytes,
10
,rep,name=reactions,proto3" json:"reactions,omitempty"`
Reactions
[]
string
`protobuf:"bytes,
7
,rep,name=reactions,proto3" json:"reactions,omitempty"`
// disable markdown shortcuts
// disable markdown shortcuts
DisableMarkdownShortcuts
bool
`protobuf:"varint,
11
,opt,name=disable_markdown_shortcuts,json=disableMarkdownShortcuts,proto3" json:"disable_markdown_shortcuts,omitempty"`
DisableMarkdownShortcuts
bool
`protobuf:"varint,
8
,opt,name=disable_markdown_shortcuts,json=disableMarkdownShortcuts,proto3" json:"disable_markdown_shortcuts,omitempty"`
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
EnableBlurNsfwContent
bool
`protobuf:"varint,
12
,opt,name=enable_blur_nsfw_content,json=enableBlurNsfwContent,proto3" json:"enable_blur_nsfw_content,omitempty"`
EnableBlurNsfwContent
bool
`protobuf:"varint,
9
,opt,name=enable_blur_nsfw_content,json=enableBlurNsfwContent,proto3" json:"enable_blur_nsfw_content,omitempty"`
// 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.
NsfwTags
[]
string
`protobuf:"bytes,1
3
,rep,name=nsfw_tags,json=nsfwTags,proto3" json:"nsfw_tags,omitempty"`
NsfwTags
[]
string
`protobuf:"bytes,1
0
,rep,name=nsfw_tags,json=nsfwTags,proto3" json:"nsfw_tags,omitempty"`
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
}
}
...
@@ -830,19 +830,19 @@ const file_store_workspace_setting_proto_rawDesc = "" +
...
@@ -830,19 +830,19 @@ const file_store_workspace_setting_proto_rawDesc = "" +
"
\b
endpoint
\x18\x03
\x01
(
\t
R
\b
endpoint
\x12\x16\n
"
+
"
\b
endpoint
\x18\x03
\x01
(
\t
R
\b
endpoint
\x12\x16\n
"
+
"
\x06
region
\x18\x04
\x01
(
\t
R
\x06
region
\x12\x16\n
"
+
"
\x06
region
\x18\x04
\x01
(
\t
R
\x06
region
\x12\x16\n
"
+
"
\x06
bucket
\x18\x05
\x01
(
\t
R
\x06
bucket
\x12
$
\n
"
+
"
\x06
bucket
\x18\x05
\x01
(
\t
R
\x06
bucket
\x12
$
\n
"
+
"
\x0e
use_path_style
\x18\x06
\x01
(
\b
R
\f
usePathStyle
\"\x
94
\x04\n
"
+
"
\x0e
use_path_style
\x18\x06
\x01
(
\b
R
\f
usePathStyle
\"\x
88
\x04\n
"
+
"
\x1b
WorkspaceMemoRelatedSetting
\x12
<
\n
"
+
"
\x1b
WorkspaceMemoRelatedSetting
\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
"
+
"
\x18
enable_double_click_edit
\x18\x0
5
\x01
(
\b
R
\x15
enableDoubleClickEdit
\x12
.
\n
"
+
"
\x18
enable_double_click_edit
\x18\x0
4
\x01
(
\b
R
\x15
enableDoubleClickEdit
\x12
.
\n
"
+
"
\x13
enable_link_preview
\x18\x0
6
\x01
(
\b
R
\x11
enableLinkPreview
\x12
%
\n
"
+
"
\x13
enable_link_preview
\x18\x0
5
\x01
(
\b
R
\x11
enableLinkPreview
\x12
%
\n
"
+
"
\x0e
enable_comment
\x18\
a
\x01
(
\b
R
\r
enableComment
\x12\x1c\n
"
+
"
\x0e
enable_comment
\x18\
x06
\x01
(
\b
R
\r
enableComment
\x12\x1c\n
"
+
"
\t
reactions
\x18\n
"
+
"
\t
reactions
\x18\
a
\x03
(
\t
R
\t
reactions
\x12
<
\
n
"
+
"
\x03
(
\t
R
\t
reactions
\x12
<
\n
"
+
"
\x1a
disable_markdown_shortcuts
\x18\b
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x1
a
disable_markdown_shortcuts
\x18\v
\x01
(
\b
R
\x18
disableMarkdownShortcuts
\x12
7
\n
"
+
"
\x1
8
enable_blur_nsfw_content
\x18\t
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b
\n
"
+
"
\
x18
enable_blur_nsfw_content
\x18\f
\x01
(
\b
R
\x15
enableBlurNsfwContent
\x12\x1b
\n
"
+
"
\
t
nsfw_tags
\x18
\n
"
+
"
\t
nsfw_tags
\x18\r
\x03
(
\t
R
\b
nsfwTagsJ
\x04\b\x04\x10\x05
J
\x04\b\b\x10\t
*s
\n
"
+
"
\x03
(
\t
R
\b
nsfwTags
*s
\n
"
+
"
\x13
WorkspaceSettingKey
\x12
%
\n
"
+
"
\x13
WorkspaceSettingKey
\x12
%
\n
"
+
"!WORKSPACE_SETTING_KEY_UNSPECIFIED
\x10\x00\x12\t\n
"
+
"!WORKSPACE_SETTING_KEY_UNSPECIFIED
\x10\x00\x12\t\n
"
+
"
\x05
BASIC
\x10\x01\x12\v\n
"
+
"
\x05
BASIC
\x10\x01\x12\v\n
"
+
...
...
proto/store/workspace_setting.proto
View file @
83febf99
...
@@ -95,8 +95,6 @@ message StorageS3Config {
...
@@ -95,8 +95,6 @@ message StorageS3Config {
}
}
message
WorkspaceMemoRelatedSetting
{
message
WorkspaceMemoRelatedSetting
{
reserved
4
,
8
;
// 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.
...
@@ -104,17 +102,17 @@ message WorkspaceMemoRelatedSetting {
...
@@ -104,17 +102,17 @@ message WorkspaceMemoRelatedSetting {
// content_length_limit is the limit of content length. Unit is byte.
// content_length_limit is the limit of content length. Unit is byte.
int32
content_length_limit
=
3
;
int32
content_length_limit
=
3
;
// enable_double_click_edit enables editing on double click.
// enable_double_click_edit enables editing on double click.
bool
enable_double_click_edit
=
5
;
bool
enable_double_click_edit
=
4
;
// enable_link_preview enables links preview.
// enable_link_preview enables links preview.
bool
enable_link_preview
=
6
;
bool
enable_link_preview
=
5
;
// enable_comment enables comment.
// enable_comment enables comment.
bool
enable_comment
=
7
;
bool
enable_comment
=
6
;
// reactions is the list of reactions.
// reactions is the list of reactions.
repeated
string
reactions
=
10
;
repeated
string
reactions
=
7
;
// disable markdown shortcuts
// disable markdown shortcuts
bool
disable_markdown_shortcuts
=
11
;
bool
disable_markdown_shortcuts
=
8
;
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
bool
enable_blur_nsfw_content
=
12
;
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
=
1
3
;
repeated
string
nsfw_tags
=
1
0
;
}
}
server/router/api/v1/idp_service.go
View file @
83febf99
...
@@ -116,7 +116,6 @@ func (s *APIV1Service) DeleteIdentityProvider(ctx context.Context, request *v1pb
...
@@ -116,7 +116,6 @@ func (s *APIV1Service) DeleteIdentityProvider(ctx context.Context, request *v1pb
func
convertIdentityProviderFromStore
(
identityProvider
*
storepb
.
IdentityProvider
)
*
v1pb
.
IdentityProvider
{
func
convertIdentityProviderFromStore
(
identityProvider
*
storepb
.
IdentityProvider
)
*
v1pb
.
IdentityProvider
{
temp
:=
&
v1pb
.
IdentityProvider
{
temp
:=
&
v1pb
.
IdentityProvider
{
Name
:
fmt
.
Sprintf
(
"%s%d"
,
IdentityProviderNamePrefix
,
identityProvider
.
Id
),
Name
:
fmt
.
Sprintf
(
"%s%d"
,
IdentityProviderNamePrefix
,
identityProvider
.
Id
),
Uid
:
fmt
.
Sprintf
(
"%d"
,
identityProvider
.
Id
),
Title
:
identityProvider
.
Name
,
Title
:
identityProvider
.
Name
,
IdentifierFilter
:
identityProvider
.
IdentifierFilter
,
IdentifierFilter
:
identityProvider
.
IdentifierFilter
,
Type
:
v1pb
.
IdentityProvider_Type
(
v1pb
.
IdentityProvider_Type_value
[
identityProvider
.
Type
.
String
()]),
Type
:
v1pb
.
IdentityProvider_Type
(
v1pb
.
IdentityProvider_Type_value
[
identityProvider
.
Type
.
String
()]),
...
...
server/router/api/v1/memo_relation_service.go
View file @
83febf99
...
@@ -137,12 +137,10 @@ func (s *APIV1Service) convertMemoRelationFromStore(ctx context.Context, memoRel
...
@@ -137,12 +137,10 @@ func (s *APIV1Service) convertMemoRelationFromStore(ctx context.Context, memoRel
return
&
v1pb
.
MemoRelation
{
return
&
v1pb
.
MemoRelation
{
Memo
:
&
v1pb
.
MemoRelation_Memo
{
Memo
:
&
v1pb
.
MemoRelation_Memo
{
Name
:
fmt
.
Sprintf
(
"%s%s"
,
MemoNamePrefix
,
memo
.
UID
),
Name
:
fmt
.
Sprintf
(
"%s%s"
,
MemoNamePrefix
,
memo
.
UID
),
Uid
:
memo
.
UID
,
Snippet
:
memoSnippet
,
Snippet
:
memoSnippet
,
},
},
RelatedMemo
:
&
v1pb
.
MemoRelation_Memo
{
RelatedMemo
:
&
v1pb
.
MemoRelation_Memo
{
Name
:
fmt
.
Sprintf
(
"%s%s"
,
MemoNamePrefix
,
relatedMemo
.
UID
),
Name
:
fmt
.
Sprintf
(
"%s%s"
,
MemoNamePrefix
,
relatedMemo
.
UID
),
Uid
:
relatedMemo
.
UID
,
Snippet
:
relatedMemoSnippet
,
Snippet
:
relatedMemoSnippet
,
},
},
Type
:
convertMemoRelationTypeFromStore
(
memoRelation
.
Type
),
Type
:
convertMemoRelationTypeFromStore
(
memoRelation
.
Type
),
...
...
server/router/api/v1/reaction_service.go
View file @
83febf99
...
@@ -82,7 +82,6 @@ func (s *APIV1Service) convertReactionFromStore(ctx context.Context, reaction *s
...
@@ -82,7 +82,6 @@ func (s *APIV1Service) convertReactionFromStore(ctx context.Context, reaction *s
reactionUID
:=
fmt
.
Sprintf
(
"%d"
,
reaction
.
ID
)
reactionUID
:=
fmt
.
Sprintf
(
"%d"
,
reaction
.
ID
)
return
&
v1pb
.
Reaction
{
return
&
v1pb
.
Reaction
{
Name
:
fmt
.
Sprintf
(
"%s%s"
,
ReactionNamePrefix
,
reactionUID
),
Name
:
fmt
.
Sprintf
(
"%s%s"
,
ReactionNamePrefix
,
reactionUID
),
Uid
:
reactionUID
,
Creator
:
fmt
.
Sprintf
(
"%s%d"
,
UserNamePrefix
,
creator
.
ID
),
Creator
:
fmt
.
Sprintf
(
"%s%d"
,
UserNamePrefix
,
creator
.
ID
),
ContentId
:
reaction
.
ContentID
,
ContentId
:
reaction
.
ContentID
,
ReactionType
:
reaction
.
ReactionType
,
ReactionType
:
reaction
.
ReactionType
,
...
...
server/router/api/v1/test/idp_service_test.go
View file @
83febf99
...
@@ -57,7 +57,6 @@ func TestCreateIdentityProvider(t *testing.T) {
...
@@ -57,7 +57,6 @@ func TestCreateIdentityProvider(t *testing.T) {
require
.
Equal
(
t
,
"Test OAuth2 Provider"
,
resp
.
Title
)
require
.
Equal
(
t
,
"Test OAuth2 Provider"
,
resp
.
Title
)
require
.
Equal
(
t
,
v1pb
.
IdentityProvider_OAUTH2
,
resp
.
Type
)
require
.
Equal
(
t
,
v1pb
.
IdentityProvider_OAUTH2
,
resp
.
Type
)
require
.
Contains
(
t
,
resp
.
Name
,
"identityProviders/"
)
require
.
Contains
(
t
,
resp
.
Name
,
"identityProviders/"
)
require
.
NotEmpty
(
t
,
resp
.
Uid
)
require
.
NotNil
(
t
,
resp
.
Config
.
GetOauth2Config
())
require
.
NotNil
(
t
,
resp
.
Config
.
GetOauth2Config
())
require
.
Equal
(
t
,
"test-client-id"
,
resp
.
Config
.
GetOauth2Config
()
.
ClientId
)
require
.
Equal
(
t
,
"test-client-id"
,
resp
.
Config
.
GetOauth2Config
()
.
ClientId
)
})
})
...
...
server/router/api/v1/user_service.go
View file @
83febf99
...
@@ -2,7 +2,6 @@ package v1
...
@@ -2,7 +2,6 @@ package v1
import
(
import
(
"context"
"context"
"crypto/md5"
"encoding/base64"
"encoding/base64"
"fmt"
"fmt"
"net/http"
"net/http"
...
@@ -736,11 +735,6 @@ func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store
...
@@ -736,11 +735,6 @@ func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store
}
}
func
convertUserFromStore
(
user
*
store
.
User
)
*
v1pb
.
User
{
func
convertUserFromStore
(
user
*
store
.
User
)
*
v1pb
.
User
{
// Generate etag based on user data
etagData
:=
fmt
.
Sprintf
(
"%d-%d-%s-%s-%s"
,
user
.
ID
,
user
.
UpdatedTs
,
user
.
Username
,
user
.
Email
,
user
.
Nickname
)
hash
:=
md5
.
Sum
([]
byte
(
etagData
))
etag
:=
fmt
.
Sprintf
(
"%x"
,
hash
)
userpb
:=
&
v1pb
.
User
{
userpb
:=
&
v1pb
.
User
{
Name
:
fmt
.
Sprintf
(
"%s%d"
,
UserNamePrefix
,
user
.
ID
),
Name
:
fmt
.
Sprintf
(
"%s%d"
,
UserNamePrefix
,
user
.
ID
),
State
:
convertStateFromStore
(
user
.
RowStatus
),
State
:
convertStateFromStore
(
user
.
RowStatus
),
...
@@ -752,7 +746,6 @@ func convertUserFromStore(user *store.User) *v1pb.User {
...
@@ -752,7 +746,6 @@ func convertUserFromStore(user *store.User) *v1pb.User {
DisplayName
:
user
.
Nickname
,
DisplayName
:
user
.
Nickname
,
AvatarUrl
:
user
.
AvatarURL
,
AvatarUrl
:
user
.
AvatarURL
,
Description
:
user
.
Description
,
Description
:
user
.
Description
,
Etag
:
etag
,
}
}
// Use the avatar URL instead of raw base64 image data to reduce the response size.
// Use the avatar URL instead of raw base64 image data to reduce the response size.
if
user
.
AvatarURL
!=
""
{
if
user
.
AvatarURL
!=
""
{
...
...
server/router/api/v1/webhook_service.go
View file @
83febf99
...
@@ -2,7 +2,6 @@ package v1
...
@@ -2,7 +2,6 @@ package v1
import
(
import
(
"context"
"context"
"crypto/md5"
"fmt"
"fmt"
"strings"
"strings"
"time"
"time"
...
@@ -213,19 +212,13 @@ func (s *APIV1Service) DeleteWebhook(ctx context.Context, request *v1pb.DeleteWe
...
@@ -213,19 +212,13 @@ func (s *APIV1Service) DeleteWebhook(ctx context.Context, request *v1pb.DeleteWe
}
}
func
convertWebhookFromStore
(
webhook
*
store
.
Webhook
)
*
v1pb
.
Webhook
{
func
convertWebhookFromStore
(
webhook
*
store
.
Webhook
)
*
v1pb
.
Webhook
{
// Generate etag using MD5 hash of webhook data
etag
:=
fmt
.
Sprintf
(
"%x"
,
md5
.
Sum
([]
byte
(
fmt
.
Sprintf
(
"%d-%d-%s-%s"
,
webhook
.
ID
,
webhook
.
UpdatedTs
,
webhook
.
Name
,
webhook
.
URL
))))
return
&
v1pb
.
Webhook
{
return
&
v1pb
.
Webhook
{
Name
:
fmt
.
Sprintf
(
"webhooks/%d"
,
webhook
.
ID
),
Name
:
fmt
.
Sprintf
(
"webhooks/%d"
,
webhook
.
ID
),
Uid
:
fmt
.
Sprintf
(
"%d"
,
webhook
.
ID
),
DisplayName
:
webhook
.
Name
,
DisplayName
:
webhook
.
Name
,
Url
:
webhook
.
URL
,
Url
:
webhook
.
URL
,
Creator
:
fmt
.
Sprintf
(
"users/%d"
,
webhook
.
CreatorID
),
Creator
:
fmt
.
Sprintf
(
"users/%d"
,
webhook
.
CreatorID
),
State
:
v1pb
.
State_NORMAL
,
// Default to NORMAL state for webhooks
State
:
v1pb
.
State_NORMAL
,
// Default to NORMAL state for webhooks
CreateTime
:
timestamppb
.
New
(
time
.
Unix
(
webhook
.
CreatedTs
,
0
)),
CreateTime
:
timestamppb
.
New
(
time
.
Unix
(
webhook
.
CreatedTs
,
0
)),
UpdateTime
:
timestamppb
.
New
(
time
.
Unix
(
webhook
.
UpdatedTs
,
0
)),
UpdateTime
:
timestamppb
.
New
(
time
.
Unix
(
webhook
.
UpdatedTs
,
0
)),
Etag
:
etag
,
}
}
}
}
web/src/types/proto/api/v1/attachment_service.ts
View file @
83febf99
...
@@ -147,25 +147,25 @@ export const Attachment: MessageFns<Attachment> = {
...
@@ -147,25 +147,25 @@ export const Attachment: MessageFns<Attachment> = {
writer
.
uint32
(
10
).
string
(
message
.
name
);
writer
.
uint32
(
10
).
string
(
message
.
name
);
}
}
if
(
message
.
createTime
!==
undefined
)
{
if
(
message
.
createTime
!==
undefined
)
{
Timestamp
.
encode
(
toTimestamp
(
message
.
createTime
),
writer
.
uint32
(
26
).
fork
()).
join
();
Timestamp
.
encode
(
toTimestamp
(
message
.
createTime
),
writer
.
uint32
(
18
).
fork
()).
join
();
}
}
if
(
message
.
filename
!==
""
)
{
if
(
message
.
filename
!==
""
)
{
writer
.
uint32
(
34
).
string
(
message
.
filename
);
writer
.
uint32
(
26
).
string
(
message
.
filename
);
}
}
if
(
message
.
content
.
length
!==
0
)
{
if
(
message
.
content
.
length
!==
0
)
{
writer
.
uint32
(
42
).
bytes
(
message
.
content
);
writer
.
uint32
(
34
).
bytes
(
message
.
content
);
}
}
if
(
message
.
externalLink
!==
""
)
{
if
(
message
.
externalLink
!==
""
)
{
writer
.
uint32
(
50
).
string
(
message
.
externalLink
);
writer
.
uint32
(
42
).
string
(
message
.
externalLink
);
}
}
if
(
message
.
type
!==
""
)
{
if
(
message
.
type
!==
""
)
{
writer
.
uint32
(
5
8
).
string
(
message
.
type
);
writer
.
uint32
(
5
0
).
string
(
message
.
type
);
}
}
if
(
message
.
size
!==
0
)
{
if
(
message
.
size
!==
0
)
{
writer
.
uint32
(
64
).
int64
(
message
.
size
);
writer
.
uint32
(
56
).
int64
(
message
.
size
);
}
}
if
(
message
.
memo
!==
undefined
)
{
if
(
message
.
memo
!==
undefined
)
{
writer
.
uint32
(
74
).
string
(
message
.
memo
);
writer
.
uint32
(
66
).
string
(
message
.
memo
);
}
}
return
writer
;
return
writer
;
},
},
...
@@ -185,56 +185,56 @@ export const Attachment: MessageFns<Attachment> = {
...
@@ -185,56 +185,56 @@ export const Attachment: MessageFns<Attachment> = {
message
.
name
=
reader
.
string
();
message
.
name
=
reader
.
string
();
continue
;
continue
;
}
}
case
3
:
{
case
2
:
{
if
(
tag
!==
26
)
{
if
(
tag
!==
18
)
{
break
;
break
;
}
}
message
.
createTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
message
.
createTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
continue
;
}
}
case
4
:
{
case
3
:
{
if
(
tag
!==
34
)
{
if
(
tag
!==
26
)
{
break
;
break
;
}
}
message
.
filename
=
reader
.
string
();
message
.
filename
=
reader
.
string
();
continue
;
continue
;
}
}
case
5
:
{
case
4
:
{
if
(
tag
!==
42
)
{
if
(
tag
!==
34
)
{
break
;
break
;
}
}
message
.
content
=
reader
.
bytes
();
message
.
content
=
reader
.
bytes
();
continue
;
continue
;
}
}
case
6
:
{
case
5
:
{
if
(
tag
!==
50
)
{
if
(
tag
!==
42
)
{
break
;
break
;
}
}
message
.
externalLink
=
reader
.
string
();
message
.
externalLink
=
reader
.
string
();
continue
;
continue
;
}
}
case
7
:
{
case
6
:
{
if
(
tag
!==
5
8
)
{
if
(
tag
!==
5
0
)
{
break
;
break
;
}
}
message
.
type
=
reader
.
string
();
message
.
type
=
reader
.
string
();
continue
;
continue
;
}
}
case
8
:
{
case
7
:
{
if
(
tag
!==
64
)
{
if
(
tag
!==
56
)
{
break
;
break
;
}
}
message
.
size
=
longToNumber
(
reader
.
int64
());
message
.
size
=
longToNumber
(
reader
.
int64
());
continue
;
continue
;
}
}
case
9
:
{
case
8
:
{
if
(
tag
!==
74
)
{
if
(
tag
!==
66
)
{
break
;
break
;
}
}
...
...
web/src/types/proto/api/v1/idp_service.ts
View file @
83febf99
...
@@ -17,8 +17,6 @@ export interface IdentityProvider {
...
@@ -17,8 +17,6 @@ export interface IdentityProvider {
* Format: identityProviders/{idp}
* Format: identityProviders/{idp}
*/
*/
name
:
string
;
name
:
string
;
/** Output only. The system generated unique identifier. */
uid
:
string
;
/** Required. The type of the identity provider. */
/** Required. The type of the identity provider. */
type
:
IdentityProvider_Type
;
type
:
IdentityProvider_Type
;
/** Required. The display title of the identity provider. */
/** Required. The display title of the identity provider. */
...
@@ -31,6 +29,7 @@ export interface IdentityProvider {
...
@@ -31,6 +29,7 @@ export interface IdentityProvider {
export
enum
IdentityProvider_Type
{
export
enum
IdentityProvider_Type
{
TYPE_UNSPECIFIED
=
"TYPE_UNSPECIFIED"
,
TYPE_UNSPECIFIED
=
"TYPE_UNSPECIFIED"
,
/** OAUTH2 - OAuth2 identity provider. */
OAUTH2
=
"OAUTH2"
,
OAUTH2
=
"OAUTH2"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
UNRECOGNIZED
=
"UNRECOGNIZED"
,
}
}
...
@@ -138,14 +137,7 @@ export interface DeleteIdentityProviderRequest {
...
@@ -138,14 +137,7 @@ export interface DeleteIdentityProviderRequest {
}
}
function
createBaseIdentityProvider
():
IdentityProvider
{
function
createBaseIdentityProvider
():
IdentityProvider
{
return
{
return
{
name
:
""
,
type
:
IdentityProvider_Type
.
TYPE_UNSPECIFIED
,
title
:
""
,
identifierFilter
:
""
,
config
:
undefined
};
name
:
""
,
uid
:
""
,
type
:
IdentityProvider_Type
.
TYPE_UNSPECIFIED
,
title
:
""
,
identifierFilter
:
""
,
config
:
undefined
,
};
}
}
export
const
IdentityProvider
:
MessageFns
<
IdentityProvider
>
=
{
export
const
IdentityProvider
:
MessageFns
<
IdentityProvider
>
=
{
...
@@ -153,20 +145,17 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
...
@@ -153,20 +145,17 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
if
(
message
.
name
!==
""
)
{
if
(
message
.
name
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
name
);
writer
.
uint32
(
10
).
string
(
message
.
name
);
}
}
if
(
message
.
uid
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
uid
);
}
if
(
message
.
type
!==
IdentityProvider_Type
.
TYPE_UNSPECIFIED
)
{
if
(
message
.
type
!==
IdentityProvider_Type
.
TYPE_UNSPECIFIED
)
{
writer
.
uint32
(
24
).
int32
(
identityProvider_TypeToNumber
(
message
.
type
));
writer
.
uint32
(
16
).
int32
(
identityProvider_TypeToNumber
(
message
.
type
));
}
}
if
(
message
.
title
!==
""
)
{
if
(
message
.
title
!==
""
)
{
writer
.
uint32
(
34
).
string
(
message
.
title
);
writer
.
uint32
(
26
).
string
(
message
.
title
);
}
}
if
(
message
.
identifierFilter
!==
""
)
{
if
(
message
.
identifierFilter
!==
""
)
{
writer
.
uint32
(
42
).
string
(
message
.
identifierFilter
);
writer
.
uint32
(
34
).
string
(
message
.
identifierFilter
);
}
}
if
(
message
.
config
!==
undefined
)
{
if
(
message
.
config
!==
undefined
)
{
IdentityProviderConfig
.
encode
(
message
.
config
,
writer
.
uint32
(
50
).
fork
()).
join
();
IdentityProviderConfig
.
encode
(
message
.
config
,
writer
.
uint32
(
42
).
fork
()).
join
();
}
}
return
writer
;
return
writer
;
},
},
...
@@ -187,19 +176,19 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
...
@@ -187,19 +176,19 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
continue
;
continue
;
}
}
case
2
:
{
case
2
:
{
if
(
tag
!==
1
8
)
{
if
(
tag
!==
1
6
)
{
break
;
break
;
}
}
message
.
uid
=
reader
.
string
(
);
message
.
type
=
identityProvider_TypeFromJSON
(
reader
.
int32
()
);
continue
;
continue
;
}
}
case
3
:
{
case
3
:
{
if
(
tag
!==
2
4
)
{
if
(
tag
!==
2
6
)
{
break
;
break
;
}
}
message
.
t
ype
=
identityProvider_TypeFromJSON
(
reader
.
int32
()
);
message
.
t
itle
=
reader
.
string
(
);
continue
;
continue
;
}
}
case
4
:
{
case
4
:
{
...
@@ -207,7 +196,7 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
...
@@ -207,7 +196,7 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
break
;
break
;
}
}
message
.
title
=
reader
.
string
();
message
.
identifierFilter
=
reader
.
string
();
continue
;
continue
;
}
}
case
5
:
{
case
5
:
{
...
@@ -215,14 +204,6 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
...
@@ -215,14 +204,6 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
break
;
break
;
}
}
message
.
identifierFilter
=
reader
.
string
();
continue
;
}
case
6
:
{
if
(
tag
!==
50
)
{
break
;
}
message
.
config
=
IdentityProviderConfig
.
decode
(
reader
,
reader
.
uint32
());
message
.
config
=
IdentityProviderConfig
.
decode
(
reader
,
reader
.
uint32
());
continue
;
continue
;
}
}
...
@@ -241,7 +222,6 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
...
@@ -241,7 +222,6 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
fromPartial
(
object
:
DeepPartial
<
IdentityProvider
>
):
IdentityProvider
{
fromPartial
(
object
:
DeepPartial
<
IdentityProvider
>
):
IdentityProvider
{
const
message
=
createBaseIdentityProvider
();
const
message
=
createBaseIdentityProvider
();
message
.
name
=
object
.
name
??
""
;
message
.
name
=
object
.
name
??
""
;
message
.
uid
=
object
.
uid
??
""
;
message
.
type
=
object
.
type
??
IdentityProvider_Type
.
TYPE_UNSPECIFIED
;
message
.
type
=
object
.
type
??
IdentityProvider_Type
.
TYPE_UNSPECIFIED
;
message
.
title
=
object
.
title
??
""
;
message
.
title
=
object
.
title
??
""
;
message
.
identifierFilter
=
object
.
identifierFilter
??
""
;
message
.
identifierFilter
=
object
.
identifierFilter
??
""
;
...
...
web/src/types/proto/api/v1/memo_service.ts
View file @
83febf99
This diff is collapsed.
Click to expand it.
web/src/types/proto/api/v1/user_service.ts
View file @
83febf99
...
@@ -20,8 +20,6 @@ export interface User {
...
@@ -20,8 +20,6 @@ export interface User {
* Format: users/{user}
* Format: users/{user}
*/
*/
name
:
string
;
name
:
string
;
/** Output only. The system generated unique identifier. */
uid
:
string
;
/** The role of the user. */
/** The role of the user. */
role
:
User_Role
;
role
:
User_Role
;
/** Required. The unique username for login. */
/** Required. The unique username for login. */
...
@@ -43,11 +41,7 @@ export interface User {
...
@@ -43,11 +41,7 @@ export interface User {
|
Date
|
Date
|
undefined
;
|
undefined
;
/** Output only. The last update timestamp. */
/** Output only. The last update timestamp. */
updateTime
?:
updateTime
?:
Date
|
undefined
;
|
Date
|
undefined
;
/** Output only. The etag for this resource. */
etag
:
string
;
}
}
/** User role enumeration. */
/** User role enumeration. */
...
@@ -436,7 +430,6 @@ export interface ListAllUserStatsResponse {
...
@@ -436,7 +430,6 @@ export interface ListAllUserStatsResponse {
function
createBaseUser
():
User
{
function
createBaseUser
():
User
{
return
{
return
{
name
:
""
,
name
:
""
,
uid
:
""
,
role
:
User_Role
.
ROLE_UNSPECIFIED
,
role
:
User_Role
.
ROLE_UNSPECIFIED
,
username
:
""
,
username
:
""
,
email
:
""
,
email
:
""
,
...
@@ -447,7 +440,6 @@ function createBaseUser(): User {
...
@@ -447,7 +440,6 @@ function createBaseUser(): User {
state
:
State
.
STATE_UNSPECIFIED
,
state
:
State
.
STATE_UNSPECIFIED
,
createTime
:
undefined
,
createTime
:
undefined
,
updateTime
:
undefined
,
updateTime
:
undefined
,
etag
:
""
,
};
};
}
}
...
@@ -456,41 +448,35 @@ export const User: MessageFns<User> = {
...
@@ -456,41 +448,35 @@ export const User: MessageFns<User> = {
if
(
message
.
name
!==
""
)
{
if
(
message
.
name
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
name
);
writer
.
uint32
(
10
).
string
(
message
.
name
);
}
}
if
(
message
.
uid
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
uid
);
}
if
(
message
.
role
!==
User_Role
.
ROLE_UNSPECIFIED
)
{
if
(
message
.
role
!==
User_Role
.
ROLE_UNSPECIFIED
)
{
writer
.
uint32
(
24
).
int32
(
user_RoleToNumber
(
message
.
role
));
writer
.
uint32
(
16
).
int32
(
user_RoleToNumber
(
message
.
role
));
}
}
if
(
message
.
username
!==
""
)
{
if
(
message
.
username
!==
""
)
{
writer
.
uint32
(
34
).
string
(
message
.
username
);
writer
.
uint32
(
26
).
string
(
message
.
username
);
}
}
if
(
message
.
email
!==
""
)
{
if
(
message
.
email
!==
""
)
{
writer
.
uint32
(
42
).
string
(
message
.
email
);
writer
.
uint32
(
34
).
string
(
message
.
email
);
}
}
if
(
message
.
displayName
!==
""
)
{
if
(
message
.
displayName
!==
""
)
{
writer
.
uint32
(
50
).
string
(
message
.
displayName
);
writer
.
uint32
(
42
).
string
(
message
.
displayName
);
}
}
if
(
message
.
avatarUrl
!==
""
)
{
if
(
message
.
avatarUrl
!==
""
)
{
writer
.
uint32
(
5
8
).
string
(
message
.
avatarUrl
);
writer
.
uint32
(
5
0
).
string
(
message
.
avatarUrl
);
}
}
if
(
message
.
description
!==
""
)
{
if
(
message
.
description
!==
""
)
{
writer
.
uint32
(
66
).
string
(
message
.
description
);
writer
.
uint32
(
58
).
string
(
message
.
description
);
}
}
if
(
message
.
password
!==
""
)
{
if
(
message
.
password
!==
""
)
{
writer
.
uint32
(
74
).
string
(
message
.
password
);
writer
.
uint32
(
66
).
string
(
message
.
password
);
}
}
if
(
message
.
state
!==
State
.
STATE_UNSPECIFIED
)
{
if
(
message
.
state
!==
State
.
STATE_UNSPECIFIED
)
{
writer
.
uint32
(
80
).
int32
(
stateToNumber
(
message
.
state
));
writer
.
uint32
(
72
).
int32
(
stateToNumber
(
message
.
state
));
}
}
if
(
message
.
createTime
!==
undefined
)
{
if
(
message
.
createTime
!==
undefined
)
{
Timestamp
.
encode
(
toTimestamp
(
message
.
createTime
),
writer
.
uint32
(
90
).
fork
()).
join
();
Timestamp
.
encode
(
toTimestamp
(
message
.
createTime
),
writer
.
uint32
(
82
).
fork
()).
join
();
}
}
if
(
message
.
updateTime
!==
undefined
)
{
if
(
message
.
updateTime
!==
undefined
)
{
Timestamp
.
encode
(
toTimestamp
(
message
.
updateTime
),
writer
.
uint32
(
98
).
fork
()).
join
();
Timestamp
.
encode
(
toTimestamp
(
message
.
updateTime
),
writer
.
uint32
(
90
).
fork
()).
join
();
}
if
(
message
.
etag
!==
""
)
{
writer
.
uint32
(
106
).
string
(
message
.
etag
);
}
}
return
writer
;
return
writer
;
},
},
...
@@ -511,19 +497,19 @@ export const User: MessageFns<User> = {
...
@@ -511,19 +497,19 @@ export const User: MessageFns<User> = {
continue
;
continue
;
}
}
case
2
:
{
case
2
:
{
if
(
tag
!==
1
8
)
{
if
(
tag
!==
1
6
)
{
break
;
break
;
}
}
message
.
uid
=
reader
.
string
(
);
message
.
role
=
user_RoleFromJSON
(
reader
.
int32
()
);
continue
;
continue
;
}
}
case
3
:
{
case
3
:
{
if
(
tag
!==
2
4
)
{
if
(
tag
!==
2
6
)
{
break
;
break
;
}
}
message
.
role
=
user_RoleFromJSON
(
reader
.
int32
()
);
message
.
username
=
reader
.
string
(
);
continue
;
continue
;
}
}
case
4
:
{
case
4
:
{
...
@@ -531,7 +517,7 @@ export const User: MessageFns<User> = {
...
@@ -531,7 +517,7 @@ export const User: MessageFns<User> = {
break
;
break
;
}
}
message
.
username
=
reader
.
string
();
message
.
email
=
reader
.
string
();
continue
;
continue
;
}
}
case
5
:
{
case
5
:
{
...
@@ -539,7 +525,7 @@ export const User: MessageFns<User> = {
...
@@ -539,7 +525,7 @@ export const User: MessageFns<User> = {
break
;
break
;
}
}
message
.
email
=
reader
.
string
();
message
.
displayName
=
reader
.
string
();
continue
;
continue
;
}
}
case
6
:
{
case
6
:
{
...
@@ -547,7 +533,7 @@ export const User: MessageFns<User> = {
...
@@ -547,7 +533,7 @@ export const User: MessageFns<User> = {
break
;
break
;
}
}
message
.
displayName
=
reader
.
string
();
message
.
avatarUrl
=
reader
.
string
();
continue
;
continue
;
}
}
case
7
:
{
case
7
:
{
...
@@ -555,7 +541,7 @@ export const User: MessageFns<User> = {
...
@@ -555,7 +541,7 @@ export const User: MessageFns<User> = {
break
;
break
;
}
}
message
.
avatarUrl
=
reader
.
string
();
message
.
description
=
reader
.
string
();
continue
;
continue
;
}
}
case
8
:
{
case
8
:
{
...
@@ -563,23 +549,23 @@ export const User: MessageFns<User> = {
...
@@ -563,23 +549,23 @@ export const User: MessageFns<User> = {
break
;
break
;
}
}
message
.
description
=
reader
.
string
();
message
.
password
=
reader
.
string
();
continue
;
continue
;
}
}
case
9
:
{
case
9
:
{
if
(
tag
!==
7
4
)
{
if
(
tag
!==
7
2
)
{
break
;
break
;
}
}
message
.
password
=
reader
.
string
(
);
message
.
state
=
stateFromJSON
(
reader
.
int32
()
);
continue
;
continue
;
}
}
case
10
:
{
case
10
:
{
if
(
tag
!==
8
0
)
{
if
(
tag
!==
8
2
)
{
break
;
break
;
}
}
message
.
state
=
stateFromJSON
(
reader
.
int32
(
));
message
.
createTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()
));
continue
;
continue
;
}
}
case
11
:
{
case
11
:
{
...
@@ -587,25 +573,9 @@ export const User: MessageFns<User> = {
...
@@ -587,25 +573,9 @@ export const User: MessageFns<User> = {
break
;
break
;
}
}
message
.
createTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
}
case
12
:
{
if
(
tag
!==
98
)
{
break
;
}
message
.
updateTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
message
.
updateTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
continue
;
}
}
case
13
:
{
if
(
tag
!==
106
)
{
break
;
}
message
.
etag
=
reader
.
string
();
continue
;
}
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
break
;
...
@@ -621,7 +591,6 @@ export const User: MessageFns<User> = {
...
@@ -621,7 +591,6 @@ export const User: MessageFns<User> = {
fromPartial
(
object
:
DeepPartial
<
User
>
):
User
{
fromPartial
(
object
:
DeepPartial
<
User
>
):
User
{
const
message
=
createBaseUser
();
const
message
=
createBaseUser
();
message
.
name
=
object
.
name
??
""
;
message
.
name
=
object
.
name
??
""
;
message
.
uid
=
object
.
uid
??
""
;
message
.
role
=
object
.
role
??
User_Role
.
ROLE_UNSPECIFIED
;
message
.
role
=
object
.
role
??
User_Role
.
ROLE_UNSPECIFIED
;
message
.
username
=
object
.
username
??
""
;
message
.
username
=
object
.
username
??
""
;
message
.
email
=
object
.
email
??
""
;
message
.
email
=
object
.
email
??
""
;
...
@@ -632,7 +601,6 @@ export const User: MessageFns<User> = {
...
@@ -632,7 +601,6 @@ export const User: MessageFns<User> = {
message
.
state
=
object
.
state
??
State
.
STATE_UNSPECIFIED
;
message
.
state
=
object
.
state
??
State
.
STATE_UNSPECIFIED
;
message
.
createTime
=
object
.
createTime
??
undefined
;
message
.
createTime
=
object
.
createTime
??
undefined
;
message
.
updateTime
=
object
.
updateTime
??
undefined
;
message
.
updateTime
=
object
.
updateTime
??
undefined
;
message
.
etag
=
object
.
etag
??
""
;
return
message
;
return
message
;
},
},
};
};
...
...
web/src/types/proto/api/v1/webhook_service.ts
View file @
83febf99
...
@@ -20,8 +20,6 @@ export interface Webhook {
...
@@ -20,8 +20,6 @@ export interface Webhook {
* Format: webhooks/{webhook}
* Format: webhooks/{webhook}
*/
*/
name
:
string
;
name
:
string
;
/** Output only. The system generated unique identifier. */
uid
:
string
;
/** Required. The display name of the webhook. */
/** Required. The display name of the webhook. */
displayName
:
string
;
displayName
:
string
;
/** Required. The target URL for the webhook. */
/** Required. The target URL for the webhook. */
...
@@ -38,11 +36,7 @@ export interface Webhook {
...
@@ -38,11 +36,7 @@ export interface Webhook {
|
Date
|
Date
|
undefined
;
|
undefined
;
/** Output only. The last update timestamp. */
/** Output only. The last update timestamp. */
updateTime
?:
updateTime
?:
Date
|
undefined
;
|
Date
|
undefined
;
/** Output only. The etag for this resource. */
etag
:
string
;
}
}
export
interface
ListWebhooksRequest
{
export
interface
ListWebhooksRequest
{
...
@@ -163,14 +157,12 @@ export interface WebhookRequestPayload {
...
@@ -163,14 +157,12 @@ export interface WebhookRequestPayload {
function
createBaseWebhook
():
Webhook
{
function
createBaseWebhook
():
Webhook
{
return
{
return
{
name
:
""
,
name
:
""
,
uid
:
""
,
displayName
:
""
,
displayName
:
""
,
url
:
""
,
url
:
""
,
creator
:
""
,
creator
:
""
,
state
:
State
.
STATE_UNSPECIFIED
,
state
:
State
.
STATE_UNSPECIFIED
,
createTime
:
undefined
,
createTime
:
undefined
,
updateTime
:
undefined
,
updateTime
:
undefined
,
etag
:
""
,
};
};
}
}
...
@@ -179,29 +171,23 @@ export const Webhook: MessageFns<Webhook> = {
...
@@ -179,29 +171,23 @@ export const Webhook: MessageFns<Webhook> = {
if
(
message
.
name
!==
""
)
{
if
(
message
.
name
!==
""
)
{
writer
.
uint32
(
10
).
string
(
message
.
name
);
writer
.
uint32
(
10
).
string
(
message
.
name
);
}
}
if
(
message
.
uid
!==
""
)
{
writer
.
uint32
(
18
).
string
(
message
.
uid
);
}
if
(
message
.
displayName
!==
""
)
{
if
(
message
.
displayName
!==
""
)
{
writer
.
uint32
(
26
).
string
(
message
.
displayName
);
writer
.
uint32
(
18
).
string
(
message
.
displayName
);
}
}
if
(
message
.
url
!==
""
)
{
if
(
message
.
url
!==
""
)
{
writer
.
uint32
(
34
).
string
(
message
.
url
);
writer
.
uint32
(
26
).
string
(
message
.
url
);
}
}
if
(
message
.
creator
!==
""
)
{
if
(
message
.
creator
!==
""
)
{
writer
.
uint32
(
42
).
string
(
message
.
creator
);
writer
.
uint32
(
34
).
string
(
message
.
creator
);
}
}
if
(
message
.
state
!==
State
.
STATE_UNSPECIFIED
)
{
if
(
message
.
state
!==
State
.
STATE_UNSPECIFIED
)
{
writer
.
uint32
(
4
8
).
int32
(
stateToNumber
(
message
.
state
));
writer
.
uint32
(
4
0
).
int32
(
stateToNumber
(
message
.
state
));
}
}
if
(
message
.
createTime
!==
undefined
)
{
if
(
message
.
createTime
!==
undefined
)
{
Timestamp
.
encode
(
toTimestamp
(
message
.
createTime
),
writer
.
uint32
(
5
8
).
fork
()).
join
();
Timestamp
.
encode
(
toTimestamp
(
message
.
createTime
),
writer
.
uint32
(
5
0
).
fork
()).
join
();
}
}
if
(
message
.
updateTime
!==
undefined
)
{
if
(
message
.
updateTime
!==
undefined
)
{
Timestamp
.
encode
(
toTimestamp
(
message
.
updateTime
),
writer
.
uint32
(
66
).
fork
()).
join
();
Timestamp
.
encode
(
toTimestamp
(
message
.
updateTime
),
writer
.
uint32
(
58
).
fork
()).
join
();
}
if
(
message
.
etag
!==
""
)
{
writer
.
uint32
(
74
).
string
(
message
.
etag
);
}
}
return
writer
;
return
writer
;
},
},
...
@@ -226,7 +212,7 @@ export const Webhook: MessageFns<Webhook> = {
...
@@ -226,7 +212,7 @@ export const Webhook: MessageFns<Webhook> = {
break
;
break
;
}
}
message
.
uid
=
reader
.
string
();
message
.
displayName
=
reader
.
string
();
continue
;
continue
;
}
}
case
3
:
{
case
3
:
{
...
@@ -234,7 +220,7 @@ export const Webhook: MessageFns<Webhook> = {
...
@@ -234,7 +220,7 @@ export const Webhook: MessageFns<Webhook> = {
break
;
break
;
}
}
message
.
displayName
=
reader
.
string
();
message
.
url
=
reader
.
string
();
continue
;
continue
;
}
}
case
4
:
{
case
4
:
{
...
@@ -242,23 +228,23 @@ export const Webhook: MessageFns<Webhook> = {
...
@@ -242,23 +228,23 @@ export const Webhook: MessageFns<Webhook> = {
break
;
break
;
}
}
message
.
url
=
reader
.
string
();
message
.
creator
=
reader
.
string
();
continue
;
continue
;
}
}
case
5
:
{
case
5
:
{
if
(
tag
!==
4
2
)
{
if
(
tag
!==
4
0
)
{
break
;
break
;
}
}
message
.
creator
=
reader
.
string
(
);
message
.
state
=
stateFromJSON
(
reader
.
int32
()
);
continue
;
continue
;
}
}
case
6
:
{
case
6
:
{
if
(
tag
!==
48
)
{
if
(
tag
!==
50
)
{
break
;
break
;
}
}
message
.
state
=
stateFromJSON
(
reader
.
int32
(
));
message
.
createTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()
));
continue
;
continue
;
}
}
case
7
:
{
case
7
:
{
...
@@ -266,25 +252,9 @@ export const Webhook: MessageFns<Webhook> = {
...
@@ -266,25 +252,9 @@ export const Webhook: MessageFns<Webhook> = {
break
;
break
;
}
}
message
.
createTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
}
case
8
:
{
if
(
tag
!==
66
)
{
break
;
}
message
.
updateTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
message
.
updateTime
=
fromTimestamp
(
Timestamp
.
decode
(
reader
,
reader
.
uint32
()));
continue
;
continue
;
}
}
case
9
:
{
if
(
tag
!==
74
)
{
break
;
}
message
.
etag
=
reader
.
string
();
continue
;
}
}
}
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
if
((
tag
&
7
)
===
4
||
tag
===
0
)
{
break
;
break
;
...
@@ -300,14 +270,12 @@ export const Webhook: MessageFns<Webhook> = {
...
@@ -300,14 +270,12 @@ export const Webhook: MessageFns<Webhook> = {
fromPartial
(
object
:
DeepPartial
<
Webhook
>
):
Webhook
{
fromPartial
(
object
:
DeepPartial
<
Webhook
>
):
Webhook
{
const
message
=
createBaseWebhook
();
const
message
=
createBaseWebhook
();
message
.
name
=
object
.
name
??
""
;
message
.
name
=
object
.
name
??
""
;
message
.
uid
=
object
.
uid
??
""
;
message
.
displayName
=
object
.
displayName
??
""
;
message
.
displayName
=
object
.
displayName
??
""
;
message
.
url
=
object
.
url
??
""
;
message
.
url
=
object
.
url
??
""
;
message
.
creator
=
object
.
creator
??
""
;
message
.
creator
=
object
.
creator
??
""
;
message
.
state
=
object
.
state
??
State
.
STATE_UNSPECIFIED
;
message
.
state
=
object
.
state
??
State
.
STATE_UNSPECIFIED
;
message
.
createTime
=
object
.
createTime
??
undefined
;
message
.
createTime
=
object
.
createTime
??
undefined
;
message
.
updateTime
=
object
.
updateTime
??
undefined
;
message
.
updateTime
=
object
.
updateTime
??
undefined
;
message
.
etag
=
object
.
etag
??
""
;
return
message
;
return
message
;
},
},
};
};
...
...
web/src/types/proto/api/v1/workspace_service.ts
View file @
83febf99
...
@@ -849,25 +849,25 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
...
@@ -849,25 +849,25 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
writer
.
uint32
(
24
).
int32
(
message
.
contentLengthLimit
);
writer
.
uint32
(
24
).
int32
(
message
.
contentLengthLimit
);
}
}
if
(
message
.
enableDoubleClickEdit
!==
false
)
{
if
(
message
.
enableDoubleClickEdit
!==
false
)
{
writer
.
uint32
(
40
).
bool
(
message
.
enableDoubleClickEdit
);
writer
.
uint32
(
32
).
bool
(
message
.
enableDoubleClickEdit
);
}
}
if
(
message
.
enableLinkPreview
!==
false
)
{
if
(
message
.
enableLinkPreview
!==
false
)
{
writer
.
uint32
(
4
8
).
bool
(
message
.
enableLinkPreview
);
writer
.
uint32
(
4
0
).
bool
(
message
.
enableLinkPreview
);
}
}
if
(
message
.
enableComment
!==
false
)
{
if
(
message
.
enableComment
!==
false
)
{
writer
.
uint32
(
56
).
bool
(
message
.
enableComment
);
writer
.
uint32
(
48
).
bool
(
message
.
enableComment
);
}
}
for
(
const
v
of
message
.
reactions
)
{
for
(
const
v
of
message
.
reactions
)
{
writer
.
uint32
(
82
).
string
(
v
!
);
writer
.
uint32
(
58
).
string
(
v
!
);
}
}
if
(
message
.
disableMarkdownShortcuts
!==
false
)
{
if
(
message
.
disableMarkdownShortcuts
!==
false
)
{
writer
.
uint32
(
88
).
bool
(
message
.
disableMarkdownShortcuts
);
writer
.
uint32
(
64
).
bool
(
message
.
disableMarkdownShortcuts
);
}
}
if
(
message
.
enableBlurNsfwContent
!==
false
)
{
if
(
message
.
enableBlurNsfwContent
!==
false
)
{
writer
.
uint32
(
96
).
bool
(
message
.
enableBlurNsfwContent
);
writer
.
uint32
(
72
).
bool
(
message
.
enableBlurNsfwContent
);
}
}
for
(
const
v
of
message
.
nsfwTags
)
{
for
(
const
v
of
message
.
nsfwTags
)
{
writer
.
uint32
(
106
).
string
(
v
!
);
writer
.
uint32
(
82
).
string
(
v
!
);
}
}
return
writer
;
return
writer
;
},
},
...
@@ -903,56 +903,56 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
...
@@ -903,56 +903,56 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
message
.
contentLengthLimit
=
reader
.
int32
();
message
.
contentLengthLimit
=
reader
.
int32
();
continue
;
continue
;
}
}
case
5
:
{
case
4
:
{
if
(
tag
!==
40
)
{
if
(
tag
!==
32
)
{
break
;
break
;
}
}
message
.
enableDoubleClickEdit
=
reader
.
bool
();
message
.
enableDoubleClickEdit
=
reader
.
bool
();
continue
;
continue
;
}
}
case
6
:
{
case
5
:
{
if
(
tag
!==
4
8
)
{
if
(
tag
!==
4
0
)
{
break
;
break
;
}
}
message
.
enableLinkPreview
=
reader
.
bool
();
message
.
enableLinkPreview
=
reader
.
bool
();
continue
;
continue
;
}
}
case
7
:
{
case
6
:
{
if
(
tag
!==
56
)
{
if
(
tag
!==
48
)
{
break
;
break
;
}
}
message
.
enableComment
=
reader
.
bool
();
message
.
enableComment
=
reader
.
bool
();
continue
;
continue
;
}
}
case
10
:
{
case
7
:
{
if
(
tag
!==
82
)
{
if
(
tag
!==
58
)
{
break
;
break
;
}
}
message
.
reactions
.
push
(
reader
.
string
());
message
.
reactions
.
push
(
reader
.
string
());
continue
;
continue
;
}
}
case
11
:
{
case
8
:
{
if
(
tag
!==
88
)
{
if
(
tag
!==
64
)
{
break
;
break
;
}
}
message
.
disableMarkdownShortcuts
=
reader
.
bool
();
message
.
disableMarkdownShortcuts
=
reader
.
bool
();
continue
;
continue
;
}
}
case
12
:
{
case
9
:
{
if
(
tag
!==
96
)
{
if
(
tag
!==
72
)
{
break
;
break
;
}
}
message
.
enableBlurNsfwContent
=
reader
.
bool
();
message
.
enableBlurNsfwContent
=
reader
.
bool
();
continue
;
continue
;
}
}
case
1
3
:
{
case
1
0
:
{
if
(
tag
!==
106
)
{
if
(
tag
!==
82
)
{
break
;
break
;
}
}
...
...
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