chore: clean resource definition

pull/4784/head
Steven 3 days ago
parent 5821bb7a65
commit 83febf9928

@ -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 {

@ -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;
} }
} }

@ -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 {
// 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 {
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 = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; repeated string tags = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// Whether the memo is pinned. // Whether the memo is pinned.
bool pinned = 12 [(google.api.field_behavior) = OPTIONAL]; bool pinned = 11 [(google.api.field_behavior) = OPTIONAL];
// Optional. The attachments of the memo. // Optional. The attachments of the memo.
repeated Attachment attachments = 14 [(google.api.field_behavior) = OPTIONAL]; repeated Attachment attachments = 12 [(google.api.field_behavior) = OPTIONAL];
// Optional. The relations of the memo. // Optional. The relations of the memo.
repeated MemoRelation relations = 15 [(google.api.field_behavior) = OPTIONAL]; repeated MemoRelation relations = 13 [(google.api.field_behavior) = OPTIONAL];
// Output only. The reactions to the memo. // Output only. The reactions to the memo.
repeated Reaction reactions = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; repeated Reaction reactions = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The computed properties of the memo. // Output only. The computed properties of the memo.
Property property = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; Property property = 15 [(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 = 18 [ optional string parent = 16 [
(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 = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; string snippet = 17 [(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 {
(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];
} }
} }

@ -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 = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; google.protobuf.Timestamp create_time = 10 [(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 {

@ -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 {

@ -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 {
// 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 = 13; repeated string nsfw_tags = 10;
} }
// Request message for GetWorkspaceSetting method. // Request message for GetWorkspaceSetting method.

@ -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
const file_api_v1_attachment_service_proto_rawDesc = "" + const file_api_v1_attachment_service_proto_rawDesc = "" +
"\n" + "\n" +
"\x1fapi/v1/attachment_service.proto\x12\fmemos.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x03\n" + "\x1fapi/v1/attachment_service.proto\x12\fmemos.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfb\x02\n" +
"\n" + "\n" +
"Attachment\x12\x17\n" + "Attachment\x12\x17\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12@\n" + "\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12@\n" +
"\vcreate_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + "\vcreate_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"createTime\x12\x1f\n" + "createTime\x12\x1f\n" +
"\bfilename\x18\x04 \x01(\tB\x03\xe0A\x02R\bfilename\x12\x1d\n" + "\bfilename\x18\x03 \x01(\tB\x03\xe0A\x02R\bfilename\x12\x1d\n" +
"\acontent\x18\x05 \x01(\fB\x03\xe0A\x04R\acontent\x12(\n" + "\acontent\x18\x04 \x01(\fB\x03\xe0A\x04R\acontent\x12(\n" +
"\rexternal_link\x18\x06 \x01(\tB\x03\xe0A\x01R\fexternalLink\x12\x17\n" + "\rexternal_link\x18\x05 \x01(\tB\x03\xe0A\x01R\fexternalLink\x12\x17\n" +
"\x04type\x18\a \x01(\tB\x03\xe0A\x02R\x04type\x12\x17\n" + "\x04type\x18\x06 \x01(\tB\x03\xe0A\x02R\x04type\x12\x17\n" +
"\x04size\x18\b \x01(\x03B\x03\xe0A\x03R\x04size\x12\x1c\n" + "\x04size\x18\a \x01(\x03B\x03\xe0A\x03R\x04size\x12\x1c\n" +
"\x04memo\x18\t \x01(\tB\x03\xe0A\x01H\x00R\x04memo\x88\x01\x01:O\xeaAL\n" + "\x04memo\x18\b \x01(\tB\x03\xe0A\x01H\x00R\x04memo\x88\x01\x01:O\xeaAL\n" +
"\x17memos.api.v1/Attachment\x12\x18attachments/{attachment}*\vattachments2\n" + "\x17memos.api.v1/Attachment\x12\x18attachments/{attachment}*\vattachments2\n" +
"attachmentB\a\n" + "attachmentB\a\n" +
"\x05_memoJ\x04\b\x02\x10\x03\"\x82\x01\n" + "\x05_memo\"\x82\x01\n" +
"\x17CreateAttachmentRequest\x12=\n" + "\x17CreateAttachmentRequest\x12=\n" +
"\n" + "\n" +
"attachment\x18\x01 \x01(\v2\x18.memos.api.v1.AttachmentB\x03\xe0A\x02R\n" + "attachment\x18\x01 \x01(\v2\x18.memos.api.v1.AttachmentB\x03\xe0A\x02R\n" +

@ -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 {
// 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 {
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
const file_api_v1_idp_service_proto_rawDesc = "" + const file_api_v1_idp_service_proto_rawDesc = "" +
"\n" + "\n" +
"\x18api/v1/idp_service.proto\x12\fmemos.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xa2\x03\n" + "\x18api/v1/idp_service.proto\x12\fmemos.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x8b\x03\n" +
"\x10IdentityProvider\x12\x17\n" + "\x10IdentityProvider\x12\x17\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12\x15\n" + "\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12<\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x12<\n" + "\x04type\x18\x02 \x01(\x0e2#.memos.api.v1.IdentityProvider.TypeB\x03\xe0A\x02R\x04type\x12\x19\n" +
"\x04type\x18\x03 \x01(\x0e2#.memos.api.v1.IdentityProvider.TypeB\x03\xe0A\x02R\x04type\x12\x19\n" + "\x05title\x18\x03 \x01(\tB\x03\xe0A\x02R\x05title\x120\n" +
"\x05title\x18\x04 \x01(\tB\x03\xe0A\x02R\x05title\x120\n" + "\x11identifier_filter\x18\x04 \x01(\tB\x03\xe0A\x01R\x10identifierFilter\x12A\n" +
"\x11identifier_filter\x18\x05 \x01(\tB\x03\xe0A\x01R\x10identifierFilter\x12A\n" + "\x06config\x18\x05 \x01(\v2$.memos.api.v1.IdentityProviderConfigB\x03\xe0A\x02R\x06config\"(\n" +
"\x06config\x18\x06 \x01(\v2$.memos.api.v1.IdentityProviderConfigB\x03\xe0A\x02R\x06config\"(\n" +
"\x04Type\x12\x14\n" + "\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\n" + "\x10TYPE_UNSPECIFIED\x10\x00\x12\n" +
"\n" + "\n" +

@ -132,19 +132,17 @@ type Reaction struct {
// The resource name of the reaction. // The resource name of the reaction.
// Format: reactions/{reaction} // Format: reactions/{reaction}
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 resource name of the creator. // The resource name of the creator.
// Format: users/{user} // Format: users/{user}
Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"` Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
// 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}
ContentId string `protobuf:"bytes,4,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"` ContentId string `protobuf:"bytes,3,opt,name=content_id,json=contentId,proto3" json:"content_id,omitempty"`
// Required. The type of reaction (e.g., "👍", "❤️", "😄"). // Required. The type of reaction (e.g., "👍", "❤️", "😄").
ReactionType string `protobuf:"bytes,5,opt,name=reaction_type,json=reactionType,proto3" json:"reaction_type,omitempty"` ReactionType string `protobuf:"bytes,4,opt,name=reaction_type,json=reactionType,proto3" json:"reaction_type,omitempty"`
// Output only. The creation timestamp. // Output only. The creation timestamp.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@ -186,13 +184,6 @@ func (x *Reaction) GetName() string {
return "" return ""
} }
func (x *Reaction) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *Reaction) GetCreator() string { func (x *Reaction) GetCreator() string {
if x != nil { if x != nil {
return x.Creator return x.Creator
@ -227,41 +218,41 @@ type Memo struct {
// Format: memos/{memo}, memo is the user defined id or uuid. // Format: memos/{memo}, memo is the user defined id or uuid.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The state of the memo. // The state of the memo.
State State `protobuf:"varint,3,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"` State State `protobuf:"varint,2,opt,name=state,proto3,enum=memos.api.v1.State" json:"state,omitempty"`
// The name of the creator. // The name of the creator.
// Format: users/{user} // Format: users/{user}
Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"` Creator string `protobuf:"bytes,3,opt,name=creator,proto3" json:"creator,omitempty"`
// Output only. The creation timestamp. // Output only. The creation timestamp.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,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,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// The display timestamp of the memo. // The display timestamp of the memo.
DisplayTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=display_time,json=displayTime,proto3" json:"display_time,omitempty"` DisplayTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=display_time,json=displayTime,proto3" json:"display_time,omitempty"`
// Required. The content of the memo in Markdown format. // Required. The content of the memo in Markdown format.
Content string `protobuf:"bytes,8,opt,name=content,proto3" json:"content,omitempty"` Content string `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"`
// Output only. The parsed nodes from the content. // Output only. The parsed nodes from the content.
Nodes []*Node `protobuf:"bytes,9,rep,name=nodes,proto3" json:"nodes,omitempty"` Nodes []*Node `protobuf:"bytes,8,rep,name=nodes,proto3" json:"nodes,omitempty"`
// The visibility of the memo. // The visibility of the memo.
Visibility Visibility `protobuf:"varint,10,opt,name=visibility,proto3,enum=memos.api.v1.Visibility" json:"visibility,omitempty"` Visibility Visibility `protobuf:"varint,9,opt,name=visibility,proto3,enum=memos.api.v1.Visibility" json:"visibility,omitempty"`
// Output only. The tags extracted from the content. // Output only. The tags extracted from the content.
Tags []string `protobuf:"bytes,11,rep,name=tags,proto3" json:"tags,omitempty"` Tags []string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"`
// Whether the memo is pinned. // Whether the memo is pinned.
Pinned bool `protobuf:"varint,12,opt,name=pinned,proto3" json:"pinned,omitempty"` Pinned bool `protobuf:"varint,11,opt,name=pinned,proto3" json:"pinned,omitempty"`
// Optional. The attachments of the memo. // Optional. The attachments of the memo.
Attachments []*Attachment `protobuf:"bytes,14,rep,name=attachments,proto3" json:"attachments,omitempty"` Attachments []*Attachment `protobuf:"bytes,12,rep,name=attachments,proto3" json:"attachments,omitempty"`
// Optional. The relations of the memo. // Optional. The relations of the memo.
Relations []*MemoRelation `protobuf:"bytes,15,rep,name=relations,proto3" json:"relations,omitempty"` Relations []*MemoRelation `protobuf:"bytes,13,rep,name=relations,proto3" json:"relations,omitempty"`
// Output only. The reactions to the memo. // Output only. The reactions to the memo.
Reactions []*Reaction `protobuf:"bytes,16,rep,name=reactions,proto3" json:"reactions,omitempty"` Reactions []*Reaction `protobuf:"bytes,14,rep,name=reactions,proto3" json:"reactions,omitempty"`
// Output only. The computed properties of the memo. // Output only. The computed properties of the memo.
Property *Memo_Property `protobuf:"bytes,17,opt,name=property,proto3" json:"property,omitempty"` Property *Memo_Property `protobuf:"bytes,15,opt,name=property,proto3" json:"property,omitempty"`
// Output only. The name of the parent memo. // Output only. The name of the parent memo.
// Format: memos/{memo} // Format: memos/{memo}
Parent *string `protobuf:"bytes,18,opt,name=parent,proto3,oneof" json:"parent,omitempty"` Parent *string `protobuf:"bytes,16,opt,name=parent,proto3,oneof" json:"parent,omitempty"`
// Output only. The snippet of the memo content. Plain text only. // Output only. The snippet of the memo content. Plain text only.
Snippet string `protobuf:"bytes,19,opt,name=snippet,proto3" json:"snippet,omitempty"` Snippet string `protobuf:"bytes,17,opt,name=snippet,proto3" json:"snippet,omitempty"`
// Optional. The location of the memo. // Optional. The location of the memo.
Location *Location `protobuf:"bytes,20,opt,name=location,proto3,oneof" json:"location,omitempty"` Location *Location `protobuf:"bytes,18,opt,name=location,proto3,oneof" json:"location,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@ -1974,10 +1965,8 @@ type MemoRelation_Memo struct {
// The resource name of the memo. // The resource name of the memo.
// Format: memos/{memo} // Format: memos/{memo}
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 unique identifier of the memo.
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
// Output only. The snippet of the memo content. Plain text only. // Output only. The snippet of the memo content. Plain text only.
Snippet string `protobuf:"bytes,3,opt,name=snippet,proto3" json:"snippet,omitempty"` Snippet string `protobuf:"bytes,2,opt,name=snippet,proto3" json:"snippet,omitempty"`
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@ -2019,13 +2008,6 @@ func (x *MemoRelation_Memo) GetName() string {
return "" return ""
} }
func (x *MemoRelation_Memo) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *MemoRelation_Memo) GetSnippet() string { func (x *MemoRelation_Memo) GetSnippet() string {
if x != nil { if x != nil {
return x.Snippet return x.Snippet
@ -2037,45 +2019,44 @@ var File_api_v1_memo_service_proto protoreflect.FileDescriptor
const file_api_v1_memo_service_proto_rawDesc = "" + const file_api_v1_memo_service_proto_rawDesc = "" +
"\n" + "\n" +
"\x19api/v1/memo_service.proto\x12\fmemos.api.v1\x1a\x1fapi/v1/attachment_service.proto\x1a\x13api/v1/common.proto\x1a\x1dapi/v1/markdown_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe5\x02\n" + "\x19api/v1/memo_service.proto\x12\fmemos.api.v1\x1a\x1fapi/v1/attachment_service.proto\x1a\x13api/v1/common.proto\x1a\x1dapi/v1/markdown_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xce\x02\n" +
"\bReaction\x12\x1a\n" + "\bReaction\x12\x1a\n" +
"\x04name\x18\x01 \x01(\tB\x06\xe0A\x03\xe0A\bR\x04name\x12\x15\n" + "\x04name\x18\x01 \x01(\tB\x06\xe0A\x03\xe0A\bR\x04name\x123\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x123\n" + "\acreator\x18\x02 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\acreator\x18\x03 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\x11memos.api.v1/UserR\acreator\x128\n" + "\x11memos.api.v1/UserR\acreator\x128\n" +
"\n" + "\n" +
"content_id\x18\x04 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + "content_id\x18\x03 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" +
"\x11memos.api.v1/MemoR\tcontentId\x12(\n" + "\x11memos.api.v1/MemoR\tcontentId\x12(\n" +
"\rreaction_type\x18\x05 \x01(\tB\x03\xe0A\x02R\freactionType\x12@\n" + "\rreaction_type\x18\x04 \x01(\tB\x03\xe0A\x02R\freactionType\x12@\n" +
"\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + "\vcreate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"createTime:K\xeaAH\n" + "createTime:K\xeaAH\n" +
"\x15memos.api.v1/Reaction\x12\x14reactions/{reaction}\x1a\x04name*\treactions2\breaction\"\x8d\t\n" + "\x15memos.api.v1/Reaction\x12\x14reactions/{reaction}\x1a\x04name*\treactions2\breaction\"\x87\t\n" +
"\x04Memo\x12\x17\n" + "\x04Memo\x12\x17\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12.\n" + "\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12.\n" +
"\x05state\x18\x03 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x123\n" + "\x05state\x18\x02 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x123\n" +
"\acreator\x18\x04 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" + "\acreator\x18\x03 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\x11memos.api.v1/UserR\acreator\x12@\n" + "\x11memos.api.v1/UserR\acreator\x12@\n" +
"\vcreate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + "\vcreate_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"createTime\x12@\n" + "createTime\x12@\n" +
"\vupdate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + "\vupdate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"updateTime\x12B\n" + "updateTime\x12B\n" +
"\fdisplay_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x01R\vdisplayTime\x12\x1d\n" + "\fdisplay_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x01R\vdisplayTime\x12\x1d\n" +
"\acontent\x18\b \x01(\tB\x03\xe0A\x02R\acontent\x12-\n" + "\acontent\x18\a \x01(\tB\x03\xe0A\x02R\acontent\x12-\n" +
"\x05nodes\x18\t \x03(\v2\x12.memos.api.v1.NodeB\x03\xe0A\x03R\x05nodes\x12=\n" + "\x05nodes\x18\b \x03(\v2\x12.memos.api.v1.NodeB\x03\xe0A\x03R\x05nodes\x12=\n" +
"\n" + "\n" +
"visibility\x18\n" + "visibility\x18\t \x01(\x0e2\x18.memos.api.v1.VisibilityB\x03\xe0A\x02R\n" +
" \x01(\x0e2\x18.memos.api.v1.VisibilityB\x03\xe0A\x02R\n" +
"visibility\x12\x17\n" + "visibility\x12\x17\n" +
"\x04tags\x18\v \x03(\tB\x03\xe0A\x03R\x04tags\x12\x1b\n" + "\x04tags\x18\n" +
"\x06pinned\x18\f \x01(\bB\x03\xe0A\x01R\x06pinned\x12?\n" + " \x03(\tB\x03\xe0A\x03R\x04tags\x12\x1b\n" +
"\vattachments\x18\x0e \x03(\v2\x18.memos.api.v1.AttachmentB\x03\xe0A\x01R\vattachments\x12=\n" + "\x06pinned\x18\v \x01(\bB\x03\xe0A\x01R\x06pinned\x12?\n" +
"\trelations\x18\x0f \x03(\v2\x1a.memos.api.v1.MemoRelationB\x03\xe0A\x01R\trelations\x129\n" + "\vattachments\x18\f \x03(\v2\x18.memos.api.v1.AttachmentB\x03\xe0A\x01R\vattachments\x12=\n" +
"\treactions\x18\x10 \x03(\v2\x16.memos.api.v1.ReactionB\x03\xe0A\x03R\treactions\x12<\n" + "\trelations\x18\r \x03(\v2\x1a.memos.api.v1.MemoRelationB\x03\xe0A\x01R\trelations\x129\n" +
"\bproperty\x18\x11 \x01(\v2\x1b.memos.api.v1.Memo.PropertyB\x03\xe0A\x03R\bproperty\x126\n" + "\treactions\x18\x0e \x03(\v2\x16.memos.api.v1.ReactionB\x03\xe0A\x03R\treactions\x12<\n" +
"\x06parent\x18\x12 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" + "\bproperty\x18\x0f \x01(\v2\x1b.memos.api.v1.Memo.PropertyB\x03\xe0A\x03R\bproperty\x126\n" +
"\x06parent\x18\x10 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\x11memos.api.v1/MemoH\x00R\x06parent\x88\x01\x01\x12\x1d\n" + "\x11memos.api.v1/MemoH\x00R\x06parent\x88\x01\x01\x12\x1d\n" +
"\asnippet\x18\x13 \x01(\tB\x03\xe0A\x03R\asnippet\x12<\n" + "\asnippet\x18\x11 \x01(\tB\x03\xe0A\x03R\asnippet\x12<\n" +
"\blocation\x18\x14 \x01(\v2\x16.memos.api.v1.LocationB\x03\xe0A\x01H\x01R\blocation\x88\x01\x01\x1a\x96\x01\n" + "\blocation\x18\x12 \x01(\v2\x16.memos.api.v1.LocationB\x03\xe0A\x01H\x01R\blocation\x88\x01\x01\x1a\x96\x01\n" +
"\bProperty\x12\x19\n" + "\bProperty\x12\x19\n" +
"\bhas_link\x18\x01 \x01(\bR\ahasLink\x12\"\n" + "\bhas_link\x18\x01 \x01(\bR\ahasLink\x12\"\n" +
"\rhas_task_list\x18\x02 \x01(\bR\vhasTaskList\x12\x19\n" + "\rhas_task_list\x18\x02 \x01(\bR\vhasTaskList\x12\x19\n" +
@ -2083,7 +2064,7 @@ const file_api_v1_memo_service_proto_rawDesc = "" +
"\x14has_incomplete_tasks\x18\x04 \x01(\bR\x12hasIncompleteTasks:7\xeaA4\n" + "\x14has_incomplete_tasks\x18\x04 \x01(\bR\x12hasIncompleteTasks:7\xeaA4\n" +
"\x11memos.api.v1/Memo\x12\fmemos/{memo}\x1a\x04name*\x05memos2\x04memoB\t\n" + "\x11memos.api.v1/Memo\x12\fmemos/{memo}\x1a\x04name*\x05memos2\x04memoB\t\n" +
"\a_parentB\v\n" + "\a_parentB\v\n" +
"\t_locationJ\x04\b\x02\x10\x03\"u\n" + "\t_location\"u\n" +
"\bLocation\x12%\n" + "\bLocation\x12%\n" +
"\vplaceholder\x18\x01 \x01(\tB\x03\xe0A\x01R\vplaceholder\x12\x1f\n" + "\vplaceholder\x18\x01 \x01(\tB\x03\xe0A\x01R\vplaceholder\x12\x1f\n" +
"\blatitude\x18\x02 \x01(\x01B\x03\xe0A\x01R\blatitude\x12!\n" + "\blatitude\x18\x02 \x01(\x01B\x03\xe0A\x01R\blatitude\x12!\n" +
@ -2148,16 +2129,15 @@ const file_api_v1_memo_service_proto_rawDesc = "" +
"\vattachments\x18\x01 \x03(\v2\x18.memos.api.v1.AttachmentR\vattachments\x12&\n" + "\vattachments\x18\x01 \x03(\v2\x18.memos.api.v1.AttachmentR\vattachments\x12&\n" +
"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" +
"\n" + "\n" +
"total_size\x18\x03 \x01(\x05R\ttotalSize\"\xf2\x02\n" + "total_size\x18\x03 \x01(\x05R\ttotalSize\"\xdb\x02\n" +
"\fMemoRelation\x128\n" + "\fMemoRelation\x128\n" +
"\x04memo\x18\x01 \x01(\v2\x1f.memos.api.v1.MemoRelation.MemoB\x03\xe0A\x02R\x04memo\x12G\n" + "\x04memo\x18\x01 \x01(\v2\x1f.memos.api.v1.MemoRelation.MemoB\x03\xe0A\x02R\x04memo\x12G\n" +
"\frelated_memo\x18\x02 \x01(\v2\x1f.memos.api.v1.MemoRelation.MemoB\x03\xe0A\x02R\vrelatedMemo\x128\n" + "\frelated_memo\x18\x02 \x01(\v2\x1f.memos.api.v1.MemoRelation.MemoB\x03\xe0A\x02R\vrelatedMemo\x128\n" +
"\x04type\x18\x03 \x01(\x0e2\x1f.memos.api.v1.MemoRelation.TypeB\x03\xe0A\x02R\x04type\x1ak\n" + "\x04type\x18\x03 \x01(\x0e2\x1f.memos.api.v1.MemoRelation.TypeB\x03\xe0A\x02R\x04type\x1aT\n" +
"\x04Memo\x12-\n" + "\x04Memo\x12-\n" +
"\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" + "\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" +
"\x11memos.api.v1/MemoR\x04name\x12\x15\n" + "\x11memos.api.v1/MemoR\x04name\x12\x1d\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x12\x1d\n" + "\asnippet\x18\x02 \x01(\tB\x03\xe0A\x03R\asnippet\"8\n" +
"\asnippet\x18\x03 \x01(\tB\x03\xe0A\x03R\asnippet\"8\n" +
"\x04Type\x12\x14\n" + "\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n" + "\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n" +
"\tREFERENCE\x10\x01\x12\v\n" + "\tREFERENCE\x10\x01\x12\v\n" +

@ -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,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` CreateTime *timestamppb.Timestamp `protobuf:"bytes,10,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 {
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 {
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
const file_api_v1_user_service_proto_rawDesc = "" + const file_api_v1_user_service_proto_rawDesc = "" +
"\n" + "\n" +
"\x19api/v1/user_service.proto\x12\fmemos.api.v1\x1a\x13api/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfb\x04\n" + "\x19api/v1/user_service.proto\x12\fmemos.api.v1\x1a\x13api/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcb\x04\n" +
"\x04User\x12\x17\n" + "\x04User\x12\x17\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12\x15\n" + "\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x120\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x120\n" + "\x04role\x18\x02 \x01(\x0e2\x17.memos.api.v1.User.RoleB\x03\xe0A\x02R\x04role\x12\x1f\n" +
"\x04role\x18\x03 \x01(\x0e2\x17.memos.api.v1.User.RoleB\x03\xe0A\x02R\x04role\x12\x1f\n" + "\busername\x18\x03 \x01(\tB\x03\xe0A\x02R\busername\x12\x19\n" +
"\busername\x18\x04 \x01(\tB\x03\xe0A\x02R\busername\x12\x19\n" + "\x05email\x18\x04 \x01(\tB\x03\xe0A\x01R\x05email\x12&\n" +
"\x05email\x18\x05 \x01(\tB\x03\xe0A\x01R\x05email\x12&\n" + "\fdisplay_name\x18\x05 \x01(\tB\x03\xe0A\x01R\vdisplayName\x12\"\n" +
"\fdisplay_name\x18\x06 \x01(\tB\x03\xe0A\x01R\vdisplayName\x12\"\n" +
"\n" + "\n" +
"avatar_url\x18\a \x01(\tB\x03\xe0A\x01R\tavatarUrl\x12%\n" + "avatar_url\x18\x06 \x01(\tB\x03\xe0A\x01R\tavatarUrl\x12%\n" +
"\vdescription\x18\b \x01(\tB\x03\xe0A\x01R\vdescription\x12\x1f\n" + "\vdescription\x18\a \x01(\tB\x03\xe0A\x01R\vdescription\x12\x1f\n" +
"\bpassword\x18\t \x01(\tB\x03\xe0A\x04R\bpassword\x12.\n" + "\bpassword\x18\b \x01(\tB\x03\xe0A\x04R\bpassword\x12.\n" +
"\x05state\x18\n" + "\x05state\x18\t \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x12@\n" +
" \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x12@\n" + "\vcreate_time\x18\n" +
"\vcreate_time\x18\v \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + " \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"createTime\x12@\n" + "createTime\x12@\n" +
"\vupdate_time\x18\f \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + "\vupdate_time\x18\v \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"updateTime\x12\x17\n" + "updateTime\";\n" +
"\x04etag\x18\r \x01(\tB\x03\xe0A\x03R\x04etag\";\n" +
"\x04Role\x12\x14\n" + "\x04Role\x12\x14\n" +
"\x10ROLE_UNSPECIFIED\x10\x00\x12\b\n" + "\x10ROLE_UNSPECIFIED\x10\x00\x12\b\n" +
"\x04HOST\x10\x01\x12\t\n" + "\x04HOST\x10\x01\x12\t\n" +

@ -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 {
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 {
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
const file_api_v1_webhook_service_proto_rawDesc = "" + const file_api_v1_webhook_service_proto_rawDesc = "" +
"\n" + "\n" +
"\x1capi/v1/webhook_service.proto\x12\fmemos.api.v1\x1a\x13api/v1/common.proto\x1a\x19api/v1/memo_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xac\x03\n" + "\x1capi/v1/webhook_service.proto\x12\fmemos.api.v1\x1a\x13api/v1/common.proto\x1a\x19api/v1/memo_service.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x02\n" +
"\aWebhook\x12\x17\n" + "\aWebhook\x12\x17\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12\x15\n" + "\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12&\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x12&\n" + "\fdisplay_name\x18\x02 \x01(\tB\x03\xe0A\x02R\vdisplayName\x12\x15\n" +
"\fdisplay_name\x18\x03 \x01(\tB\x03\xe0A\x02R\vdisplayName\x12\x15\n" + "\x03url\x18\x03 \x01(\tB\x03\xe0A\x02R\x03url\x12\x1d\n" +
"\x03url\x18\x04 \x01(\tB\x03\xe0A\x02R\x03url\x12\x1d\n" + "\acreator\x18\x04 \x01(\tB\x03\xe0A\x03R\acreator\x12.\n" +
"\acreator\x18\x05 \x01(\tB\x03\xe0A\x03R\acreator\x12.\n" + "\x05state\x18\x05 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x12@\n" +
"\x05state\x18\x06 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x12@\n" + "\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"\vcreate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"createTime\x12@\n" + "createTime\x12@\n" +
"\vupdate_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" + "\vupdate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"updateTime\x12\x17\n" + "updateTime:F\xeaAC\n" +
"\x04etag\x18\t \x01(\tB\x03\xe0A\x03R\x04etag:F\xeaAC\n" +
"\x14memos.api.v1/Webhook\x12\x12webhooks/{webhook}\x1a\x04name*\bwebhooks2\awebhook\"\xc0\x01\n" + "\x14memos.api.v1/Webhook\x12\x12webhooks/{webhook}\x1a\x04name*\bwebhooks2\awebhook\"\xc0\x01\n" +
"\x13ListWebhooksRequest\x12 \n" + "\x13ListWebhooksRequest\x12 \n" +
"\tpage_size\x18\x01 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" + "\tpage_size\x18\x01 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" +

@ -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,13,rep,name=nsfw_tags,json=nsfwTags,proto3" json:"nsfw_tags,omitempty"` NsfwTags []string `protobuf:"bytes,10,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 = "" +
"\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\f\n" + "\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\f\n" +
"\bDATABASE\x10\x01\x12\t\n" + "\bDATABASE\x10\x01\x12\t\n" +
"\x05LOCAL\x10\x02\x12\x06\n" + "\x05LOCAL\x10\x02\x12\x06\n" +
"\x02S3\x10\x03\"\x94\x04\n" + "\x02S3\x10\x03\"\x88\x04\n" +
"\x1bWorkspaceMemoRelatedSetting\x12<\n" + "\x1bWorkspaceMemoRelatedSetting\x12<\n" +
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" + "\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" + "\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" + "\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" + "\x18enable_double_click_edit\x18\x04 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" + "\x13enable_link_preview\x18\x05 \x01(\bR\x11enableLinkPreview\x12%\n" +
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12\x1c\n" + "\x0eenable_comment\x18\x06 \x01(\bR\renableComment\x12\x1c\n" +
"\treactions\x18\n" + "\treactions\x18\a \x03(\tR\treactions\x12<\n" +
" \x03(\tR\treactions\x12<\n" + "\x1adisable_markdown_shortcuts\x18\b \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" + "\x18enable_blur_nsfw_content\x18\t \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" + "\tnsfw_tags\x18\n" +
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05J\x04\b\b\x10\t\"X\n" + " \x03(\tR\bnsfwTags\"X\n" +
"\x1aGetWorkspaceSettingRequest\x12:\n" + "\x1aGetWorkspaceSettingRequest\x12:\n" +
"\x04name\x18\x01 \x01(\tB&\xe0A\x02\xfaA \n" + "\x04name\x18\x01 \x01(\tB&\xe0A\x02\xfaA \n" +
"\x1eapi.memos.dev/WorkspaceSettingR\x04name\"\xa0\x01\n" + "\x1eapi.memos.dev/WorkspaceSettingR\x04name\"\xa0\x01\n" +

@ -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:
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:
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:
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:
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:
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:
- 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:
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:
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:
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:
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:
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:
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

@ -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,13,rep,name=nsfw_tags,json=nsfwTags,proto3" json:"nsfw_tags,omitempty"` NsfwTags []string `protobuf:"bytes,10,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 = "" +
"\bendpoint\x18\x03 \x01(\tR\bendpoint\x12\x16\n" + "\bendpoint\x18\x03 \x01(\tR\bendpoint\x12\x16\n" +
"\x06region\x18\x04 \x01(\tR\x06region\x12\x16\n" + "\x06region\x18\x04 \x01(\tR\x06region\x12\x16\n" +
"\x06bucket\x18\x05 \x01(\tR\x06bucket\x12$\n" + "\x06bucket\x18\x05 \x01(\tR\x06bucket\x12$\n" +
"\x0euse_path_style\x18\x06 \x01(\bR\fusePathStyle\"\x94\x04\n" + "\x0euse_path_style\x18\x06 \x01(\bR\fusePathStyle\"\x88\x04\n" +
"\x1bWorkspaceMemoRelatedSetting\x12<\n" + "\x1bWorkspaceMemoRelatedSetting\x12<\n" +
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" + "\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" + "\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" + "\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" + "\x18enable_double_click_edit\x18\x04 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" + "\x13enable_link_preview\x18\x05 \x01(\bR\x11enableLinkPreview\x12%\n" +
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12\x1c\n" + "\x0eenable_comment\x18\x06 \x01(\bR\renableComment\x12\x1c\n" +
"\treactions\x18\n" + "\treactions\x18\a \x03(\tR\treactions\x12<\n" +
" \x03(\tR\treactions\x12<\n" + "\x1adisable_markdown_shortcuts\x18\b \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" + "\x18enable_blur_nsfw_content\x18\t \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" + "\tnsfw_tags\x18\n" +
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05J\x04\b\b\x10\t*s\n" + " \x03(\tR\bnsfwTags*s\n" +
"\x13WorkspaceSettingKey\x12%\n" + "\x13WorkspaceSettingKey\x12%\n" +
"!WORKSPACE_SETTING_KEY_UNSPECIFIED\x10\x00\x12\t\n" + "!WORKSPACE_SETTING_KEY_UNSPECIFIED\x10\x00\x12\t\n" +
"\x05BASIC\x10\x01\x12\v\n" + "\x05BASIC\x10\x01\x12\v\n" +

@ -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 {
// 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 = 13; repeated string nsfw_tags = 10;
} }

@ -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()]),

@ -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),

@ -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,

@ -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)
}) })

@ -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
} }
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 {
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 != "" {

@ -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
} }
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,
} }
} }

@ -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(58).string(message.type); writer.uint32(50).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> = {
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 !== 58) { if (tag !== 50) {
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;
} }

@ -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 {
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 {
} }
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> = {
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> = {
continue; continue;
} }
case 2: { case 2: {
if (tag !== 18) { if (tag !== 16) {
break; break;
} }
message.uid = reader.string(); message.type = identityProvider_TypeFromJSON(reader.int32());
continue; continue;
} }
case 3: { case 3: {
if (tag !== 24) { if (tag !== 26) {
break; break;
} }
message.type = identityProvider_TypeFromJSON(reader.int32()); message.title = reader.string();
continue; continue;
} }
case 4: { case 4: {
@ -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> = {
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> = {
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 ?? "";

@ -66,8 +66,6 @@ export interface Reaction {
* Format: reactions/{reaction} * Format: reactions/{reaction}
*/ */
name: string; name: string;
/** Output only. The system generated unique identifier. */
uid: string;
/** /**
* The resource name of the creator. * The resource name of the creator.
* Format: users/{user} * Format: users/{user}
@ -384,8 +382,6 @@ export interface MemoRelation_Memo {
* Format: memos/{memo} * Format: memos/{memo}
*/ */
name: string; name: string;
/** Output only. The unique identifier of the memo. */
uid: string;
/** Output only. The snippet of the memo content. Plain text only. */ /** Output only. The snippet of the memo content. Plain text only. */
snippet: string; snippet: string;
} }
@ -498,7 +494,7 @@ export interface DeleteMemoReactionRequest {
} }
function createBaseReaction(): Reaction { function createBaseReaction(): Reaction {
return { name: "", uid: "", creator: "", contentId: "", reactionType: "", createTime: undefined }; return { name: "", creator: "", contentId: "", reactionType: "", createTime: undefined };
} }
export const Reaction: MessageFns<Reaction> = { export const Reaction: MessageFns<Reaction> = {
@ -506,20 +502,17 @@ export const Reaction: MessageFns<Reaction> = {
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.creator !== "") { if (message.creator !== "") {
writer.uint32(26).string(message.creator); writer.uint32(18).string(message.creator);
} }
if (message.contentId !== "") { if (message.contentId !== "") {
writer.uint32(34).string(message.contentId); writer.uint32(26).string(message.contentId);
} }
if (message.reactionType !== "") { if (message.reactionType !== "") {
writer.uint32(42).string(message.reactionType); writer.uint32(34).string(message.reactionType);
} }
if (message.createTime !== undefined) { if (message.createTime !== undefined) {
Timestamp.encode(toTimestamp(message.createTime), writer.uint32(50).fork()).join(); Timestamp.encode(toTimestamp(message.createTime), writer.uint32(42).fork()).join();
} }
return writer; return writer;
}, },
@ -544,7 +537,7 @@ export const Reaction: MessageFns<Reaction> = {
break; break;
} }
message.uid = reader.string(); message.creator = reader.string();
continue; continue;
} }
case 3: { case 3: {
@ -552,7 +545,7 @@ export const Reaction: MessageFns<Reaction> = {
break; break;
} }
message.creator = reader.string(); message.contentId = reader.string();
continue; continue;
} }
case 4: { case 4: {
@ -560,7 +553,7 @@ export const Reaction: MessageFns<Reaction> = {
break; break;
} }
message.contentId = reader.string(); message.reactionType = reader.string();
continue; continue;
} }
case 5: { case 5: {
@ -568,14 +561,6 @@ export const Reaction: MessageFns<Reaction> = {
break; break;
} }
message.reactionType = reader.string();
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue; continue;
} }
@ -594,7 +579,6 @@ export const Reaction: MessageFns<Reaction> = {
fromPartial(object: DeepPartial<Reaction>): Reaction { fromPartial(object: DeepPartial<Reaction>): Reaction {
const message = createBaseReaction(); const message = createBaseReaction();
message.name = object.name ?? ""; message.name = object.name ?? "";
message.uid = object.uid ?? "";
message.creator = object.creator ?? ""; message.creator = object.creator ?? "";
message.contentId = object.contentId ?? ""; message.contentId = object.contentId ?? "";
message.reactionType = object.reactionType ?? ""; message.reactionType = object.reactionType ?? "";
@ -632,55 +616,55 @@ export const Memo: MessageFns<Memo> = {
writer.uint32(10).string(message.name); writer.uint32(10).string(message.name);
} }
if (message.state !== State.STATE_UNSPECIFIED) { if (message.state !== State.STATE_UNSPECIFIED) {
writer.uint32(24).int32(stateToNumber(message.state)); writer.uint32(16).int32(stateToNumber(message.state));
} }
if (message.creator !== "") { if (message.creator !== "") {
writer.uint32(34).string(message.creator); writer.uint32(26).string(message.creator);
} }
if (message.createTime !== undefined) { if (message.createTime !== undefined) {
Timestamp.encode(toTimestamp(message.createTime), writer.uint32(42).fork()).join(); Timestamp.encode(toTimestamp(message.createTime), writer.uint32(34).fork()).join();
} }
if (message.updateTime !== undefined) { if (message.updateTime !== undefined) {
Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(50).fork()).join(); Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(42).fork()).join();
} }
if (message.displayTime !== undefined) { if (message.displayTime !== undefined) {
Timestamp.encode(toTimestamp(message.displayTime), writer.uint32(58).fork()).join(); Timestamp.encode(toTimestamp(message.displayTime), writer.uint32(50).fork()).join();
} }
if (message.content !== "") { if (message.content !== "") {
writer.uint32(66).string(message.content); writer.uint32(58).string(message.content);
} }
for (const v of message.nodes) { for (const v of message.nodes) {
Node.encode(v!, writer.uint32(74).fork()).join(); Node.encode(v!, writer.uint32(66).fork()).join();
} }
if (message.visibility !== Visibility.VISIBILITY_UNSPECIFIED) { if (message.visibility !== Visibility.VISIBILITY_UNSPECIFIED) {
writer.uint32(80).int32(visibilityToNumber(message.visibility)); writer.uint32(72).int32(visibilityToNumber(message.visibility));
} }
for (const v of message.tags) { for (const v of message.tags) {
writer.uint32(90).string(v!); writer.uint32(82).string(v!);
} }
if (message.pinned !== false) { if (message.pinned !== false) {
writer.uint32(96).bool(message.pinned); writer.uint32(88).bool(message.pinned);
} }
for (const v of message.attachments) { for (const v of message.attachments) {
Attachment.encode(v!, writer.uint32(114).fork()).join(); Attachment.encode(v!, writer.uint32(98).fork()).join();
} }
for (const v of message.relations) { for (const v of message.relations) {
MemoRelation.encode(v!, writer.uint32(122).fork()).join(); MemoRelation.encode(v!, writer.uint32(106).fork()).join();
} }
for (const v of message.reactions) { for (const v of message.reactions) {
Reaction.encode(v!, writer.uint32(130).fork()).join(); Reaction.encode(v!, writer.uint32(114).fork()).join();
} }
if (message.property !== undefined) { if (message.property !== undefined) {
Memo_Property.encode(message.property, writer.uint32(138).fork()).join(); Memo_Property.encode(message.property, writer.uint32(122).fork()).join();
} }
if (message.parent !== undefined) { if (message.parent !== undefined) {
writer.uint32(146).string(message.parent); writer.uint32(130).string(message.parent);
} }
if (message.snippet !== "") { if (message.snippet !== "") {
writer.uint32(154).string(message.snippet); writer.uint32(138).string(message.snippet);
} }
if (message.location !== undefined) { if (message.location !== undefined) {
Location.encode(message.location, writer.uint32(162).fork()).join(); Location.encode(message.location, writer.uint32(146).fork()).join();
} }
return writer; return writer;
}, },
@ -700,136 +684,136 @@ export const Memo: MessageFns<Memo> = {
message.name = reader.string(); message.name = reader.string();
continue; continue;
} }
case 3: { case 2: {
if (tag !== 24) { if (tag !== 16) {
break; break;
} }
message.state = stateFromJSON(reader.int32()); message.state = stateFromJSON(reader.int32());
continue; continue;
} }
case 4: { case 3: {
if (tag !== 34) { if (tag !== 26) {
break; break;
} }
message.creator = reader.string(); message.creator = reader.string();
continue; continue;
} }
case 5: { case 4: {
if (tag !== 42) { if (tag !== 34) {
break; break;
} }
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue; continue;
} }
case 6: { case 5: {
if (tag !== 50) { if (tag !== 42) {
break; break;
} }
message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue; continue;
} }
case 7: { case 6: {
if (tag !== 58) { if (tag !== 50) {
break; break;
} }
message.displayTime = fromTimestamp(Timestamp.decode(reader, reader.uint32())); message.displayTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue; continue;
} }
case 8: { case 7: {
if (tag !== 66) { if (tag !== 58) {
break; break;
} }
message.content = reader.string(); message.content = reader.string();
continue; continue;
} }
case 9: { case 8: {
if (tag !== 74) { if (tag !== 66) {
break; break;
} }
message.nodes.push(Node.decode(reader, reader.uint32())); message.nodes.push(Node.decode(reader, reader.uint32()));
continue; continue;
} }
case 10: { case 9: {
if (tag !== 80) { if (tag !== 72) {
break; break;
} }
message.visibility = visibilityFromJSON(reader.int32()); message.visibility = visibilityFromJSON(reader.int32());
continue; continue;
} }
case 11: { case 10: {
if (tag !== 90) { if (tag !== 82) {
break; break;
} }
message.tags.push(reader.string()); message.tags.push(reader.string());
continue; continue;
} }
case 12: { case 11: {
if (tag !== 96) { if (tag !== 88) {
break; break;
} }
message.pinned = reader.bool(); message.pinned = reader.bool();
continue; continue;
} }
case 14: { case 12: {
if (tag !== 114) { if (tag !== 98) {
break; break;
} }
message.attachments.push(Attachment.decode(reader, reader.uint32())); message.attachments.push(Attachment.decode(reader, reader.uint32()));
continue; continue;
} }
case 15: { case 13: {
if (tag !== 122) { if (tag !== 106) {
break; break;
} }
message.relations.push(MemoRelation.decode(reader, reader.uint32())); message.relations.push(MemoRelation.decode(reader, reader.uint32()));
continue; continue;
} }
case 16: { case 14: {
if (tag !== 130) { if (tag !== 114) {
break; break;
} }
message.reactions.push(Reaction.decode(reader, reader.uint32())); message.reactions.push(Reaction.decode(reader, reader.uint32()));
continue; continue;
} }
case 17: { case 15: {
if (tag !== 138) { if (tag !== 122) {
break; break;
} }
message.property = Memo_Property.decode(reader, reader.uint32()); message.property = Memo_Property.decode(reader, reader.uint32());
continue; continue;
} }
case 18: { case 16: {
if (tag !== 146) { if (tag !== 130) {
break; break;
} }
message.parent = reader.string(); message.parent = reader.string();
continue; continue;
} }
case 19: { case 17: {
if (tag !== 154) { if (tag !== 138) {
break; break;
} }
message.snippet = reader.string(); message.snippet = reader.string();
continue; continue;
} }
case 20: { case 18: {
if (tag !== 162) { if (tag !== 146) {
break; break;
} }
@ -1918,7 +1902,7 @@ export const MemoRelation: MessageFns<MemoRelation> = {
}; };
function createBaseMemoRelation_Memo(): MemoRelation_Memo { function createBaseMemoRelation_Memo(): MemoRelation_Memo {
return { name: "", uid: "", snippet: "" }; return { name: "", snippet: "" };
} }
export const MemoRelation_Memo: MessageFns<MemoRelation_Memo> = { export const MemoRelation_Memo: MessageFns<MemoRelation_Memo> = {
@ -1926,11 +1910,8 @@ export const MemoRelation_Memo: MessageFns<MemoRelation_Memo> = {
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.snippet !== "") { if (message.snippet !== "") {
writer.uint32(26).string(message.snippet); writer.uint32(18).string(message.snippet);
} }
return writer; return writer;
}, },
@ -1955,14 +1936,6 @@ export const MemoRelation_Memo: MessageFns<MemoRelation_Memo> = {
break; break;
} }
message.uid = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.snippet = reader.string(); message.snippet = reader.string();
continue; continue;
} }
@ -1981,7 +1954,6 @@ export const MemoRelation_Memo: MessageFns<MemoRelation_Memo> = {
fromPartial(object: DeepPartial<MemoRelation_Memo>): MemoRelation_Memo { fromPartial(object: DeepPartial<MemoRelation_Memo>): MemoRelation_Memo {
const message = createBaseMemoRelation_Memo(); const message = createBaseMemoRelation_Memo();
message.name = object.name ?? ""; message.name = object.name ?? "";
message.uid = object.uid ?? "";
message.snippet = object.snippet ?? ""; message.snippet = object.snippet ?? "";
return message; return message;
}, },

@ -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 {
| 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 {
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 {
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> = {
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(58).string(message.avatarUrl); writer.uint32(50).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> = {
continue; continue;
} }
case 2: { case 2: {
if (tag !== 18) { if (tag !== 16) {
break; break;
} }
message.uid = reader.string(); message.role = user_RoleFromJSON(reader.int32());
continue; continue;
} }
case 3: { case 3: {
if (tag !== 24) { if (tag !== 26) {
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> = {
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> = {
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> = {
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> = {
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> = {
break; break;
} }
message.description = reader.string(); message.password = reader.string();
continue; continue;
} }
case 9: { case 9: {
if (tag !== 74) { if (tag !== 72) {
break; break;
} }
message.password = reader.string(); message.state = stateFromJSON(reader.int32());
continue; continue;
} }
case 10: { case 10: {
if (tag !== 80) { if (tag !== 82) {
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> = {
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> = {
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> = {
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;
}, },
}; };

@ -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 {
| 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 {
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> = {
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(48).int32(stateToNumber(message.state)); writer.uint32(40).int32(stateToNumber(message.state));
} }
if (message.createTime !== undefined) { if (message.createTime !== undefined) {
Timestamp.encode(toTimestamp(message.createTime), writer.uint32(58).fork()).join(); Timestamp.encode(toTimestamp(message.createTime), writer.uint32(50).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> = {
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> = {
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> = {
break; break;
} }
message.url = reader.string(); message.creator = reader.string();
continue; continue;
} }
case 5: { case 5: {
if (tag !== 42) { if (tag !== 40) {
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> = {
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> = {
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;
}, },
}; };

@ -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(48).bool(message.enableLinkPreview); writer.uint32(40).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
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 !== 48) { if (tag !== 40) {
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 13: { case 10: {
if (tag !== 106) { if (tag !== 82) {
break; break;
} }

Loading…
Cancel
Save