chore: clean resource definition

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

@ -59,33 +59,31 @@ message Attachment {
plural: "attachments"
};
reserved 2;
// The name of the attachment.
// Format: attachments/{attachment}
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
// 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.
string filename = 4 [(google.api.field_behavior) = REQUIRED];
string filename = 3 [(google.api.field_behavior) = REQUIRED];
// 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.
string external_link = 6 [(google.api.field_behavior) = OPTIONAL];
string external_link = 5 [(google.api.field_behavior) = OPTIONAL];
// 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.
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`.
// Format: memos/{memo}
optional string memo = 9 [(google.api.field_behavior) = OPTIONAL];
optional string memo = 8 [(google.api.field_behavior) = OPTIONAL];
}
message CreateAttachmentRequest {

@ -61,23 +61,21 @@ message IdentityProvider {
// Format: identityProviders/{idp}
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.
Type type = 3 [(google.api.field_behavior) = REQUIRED];
Type type = 2 [(google.api.field_behavior) = REQUIRED];
// 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.
string identifier_filter = 5 [(google.api.field_behavior) = OPTIONAL];
string identifier_filter = 4 [(google.api.field_behavior) = OPTIONAL];
// Required. Configuration for the identity provider.
IdentityProviderConfig config = 6 [(google.api.field_behavior) = REQUIRED];
IdentityProviderConfig config = 5 [(google.api.field_behavior) = REQUIRED];
enum Type {
TYPE_UNSPECIFIED = 0;
// OAuth2 identity provider.
OAUTH2 = 1;
}
}

@ -146,12 +146,9 @@ message Reaction {
(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.
// Format: users/{user}
string creator = 3 [
string creator = 2 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {type: "memos.api.v1/User"}
];
@ -159,16 +156,16 @@ message Reaction {
// The resource name of the content.
// For memo reactions, this should be the memo's resource name.
// Format: memos/{memo}
string content_id = 4 [
string content_id = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {type: "memos.api.v1/Memo"}
];
// 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.
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 {
@ -180,70 +177,68 @@ message Memo {
plural: "memos"
};
reserved 2;
// The resource name of the memo.
// Format: memos/{memo}, memo is the user defined id or uuid.
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
// 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.
// Format: users/{user}
string creator = 4 [
string creator = 3 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {type: "memos.api.v1/User"}
];
// 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.
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.
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.
string content = 8 [(google.api.field_behavior) = REQUIRED];
string content = 7 [(google.api.field_behavior) = REQUIRED];
// 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.
Visibility visibility = 10 [(google.api.field_behavior) = REQUIRED];
Visibility visibility = 9 [(google.api.field_behavior) = REQUIRED];
// 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.
bool pinned = 12 [(google.api.field_behavior) = OPTIONAL];
bool pinned = 11 [(google.api.field_behavior) = OPTIONAL];
// 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.
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.
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.
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.
// Format: memos/{memo}
optional string parent = 18 [
optional string parent = 16 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {type: "memos.api.v1/Memo"}
];
// 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 Location location = 20 [(google.api.field_behavior) = OPTIONAL];
optional Location location = 18 [(google.api.field_behavior) = OPTIONAL];
// Computed properties of a memo.
message Property {
@ -462,11 +457,8 @@ message MemoRelation {
(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.
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}
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.
Role role = 3 [(google.api.field_behavior) = REQUIRED];
Role role = 2 [(google.api.field_behavior) = REQUIRED];
// 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.
string email = 5 [(google.api.field_behavior) = OPTIONAL];
string email = 4 [(google.api.field_behavior) = OPTIONAL];
// 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.
string avatar_url = 7 [(google.api.field_behavior) = OPTIONAL];
string avatar_url = 6 [(google.api.field_behavior) = OPTIONAL];
// 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.
string password = 9 [(google.api.field_behavior) = INPUT_ONLY];
string password = 8 [(google.api.field_behavior) = INPUT_ONLY];
// 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.
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.
google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The etag for this resource.
string etag = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// User role enumeration.
enum Role {

@ -64,30 +64,24 @@ message Webhook {
// Format: webhooks/{webhook}
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.
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.
string url = 4 [(google.api.field_behavior) = REQUIRED];
string url = 3 [(google.api.field_behavior) = REQUIRED];
// Output only. The resource name of the creator.
// 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.
State state = 6 [(google.api.field_behavior) = REQUIRED];
State state = 5 [(google.api.field_behavior) = REQUIRED];
// 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.
google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The etag for this resource.
string etag = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}
message ListWebhooksRequest {

@ -132,8 +132,6 @@ message WorkspaceStorageSetting {
}
message WorkspaceMemoRelatedSetting {
reserved 4, 8;
// disallow_public_visibility disallows set memo as public visibility.
bool disallow_public_visibility = 1;
// 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.
int32 content_length_limit = 3;
// 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.
bool enable_link_preview = 6;
bool enable_link_preview = 5;
// enable_comment enables comment.
bool enable_comment = 7;
bool enable_comment = 6;
// reactions is the list of reactions.
repeated string reactions = 10;
repeated string reactions = 7;
// 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).
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.
repeated string nsfw_tags = 13;
repeated string nsfw_tags = 10;
}
// Request message for GetWorkspaceSetting method.

@ -32,20 +32,20 @@ type Attachment struct {
// Format: attachments/{attachment}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// 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.
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.
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.
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.
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.
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`.
// 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
sizeCache protoimpl.SizeCache
}
@ -549,21 +549,21 @@ var File_api_v1_attachment_service_proto protoreflect.FileDescriptor
const file_api_v1_attachment_service_proto_rawDesc = "" +
"\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" +
"Attachment\x12\x17\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" +
"\bfilename\x18\x04 \x01(\tB\x03\xe0A\x02R\bfilename\x12\x1d\n" +
"\acontent\x18\x05 \x01(\fB\x03\xe0A\x04R\acontent\x12(\n" +
"\rexternal_link\x18\x06 \x01(\tB\x03\xe0A\x01R\fexternalLink\x12\x17\n" +
"\x04type\x18\a \x01(\tB\x03\xe0A\x02R\x04type\x12\x17\n" +
"\x04size\x18\b \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" +
"\bfilename\x18\x03 \x01(\tB\x03\xe0A\x02R\bfilename\x12\x1d\n" +
"\acontent\x18\x04 \x01(\fB\x03\xe0A\x04R\acontent\x12(\n" +
"\rexternal_link\x18\x05 \x01(\tB\x03\xe0A\x01R\fexternalLink\x12\x17\n" +
"\x04type\x18\x06 \x01(\tB\x03\xe0A\x02R\x04type\x12\x17\n" +
"\x04size\x18\a \x01(\x03B\x03\xe0A\x03R\x04size\x12\x1c\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" +
"attachmentB\a\n" +
"\x05_memoJ\x04\b\x02\x10\x03\"\x82\x01\n" +
"\x05_memo\"\x82\x01\n" +
"\x17CreateAttachmentRequest\x12=\n" +
"\n" +
"attachment\x18\x01 \x01(\v2\x18.memos.api.v1.AttachmentB\x03\xe0A\x02R\n" +

@ -28,7 +28,8 @@ type IdentityProvider_Type int32
const (
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.
@ -75,16 +76,14 @@ type IdentityProvider struct {
// The resource name of the identity provider.
// Format: identityProviders/{idp}
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.
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.
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.
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.
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
sizeCache protoimpl.SizeCache
}
@ -126,13 +125,6 @@ func (x *IdentityProvider) GetName() string {
return ""
}
func (x *IdentityProvider) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *IdentityProvider) GetType() IdentityProvider_Type {
if x != nil {
return x.Type
@ -701,14 +693,13 @@ var File_api_v1_idp_service_proto protoreflect.FileDescriptor
const file_api_v1_idp_service_proto_rawDesc = "" +
"\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" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12\x15\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x12<\n" +
"\x04type\x18\x03 \x01(\x0e2#.memos.api.v1.IdentityProvider.TypeB\x03\xe0A\x02R\x04type\x12\x19\n" +
"\x05title\x18\x04 \x01(\tB\x03\xe0A\x02R\x05title\x120\n" +
"\x11identifier_filter\x18\x05 \x01(\tB\x03\xe0A\x01R\x10identifierFilter\x12A\n" +
"\x06config\x18\x06 \x01(\v2$.memos.api.v1.IdentityProviderConfigB\x03\xe0A\x02R\x06config\"(\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12<\n" +
"\x04type\x18\x02 \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" +
"\x11identifier_filter\x18\x04 \x01(\tB\x03\xe0A\x01R\x10identifierFilter\x12A\n" +
"\x06config\x18\x05 \x01(\v2$.memos.api.v1.IdentityProviderConfigB\x03\xe0A\x02R\x06config\"(\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\n" +
"\n" +

@ -132,19 +132,17 @@ type Reaction struct {
// The resource name of the reaction.
// Format: reactions/{reaction}
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.
// 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.
// For memo reactions, this should be the memo's resource name.
// 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., "👍", "❤️", "😄").
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.
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
sizeCache protoimpl.SizeCache
}
@ -186,13 +184,6 @@ func (x *Reaction) GetName() string {
return ""
}
func (x *Reaction) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *Reaction) GetCreator() string {
if x != nil {
return x.Creator
@ -227,41 +218,41 @@ type Memo struct {
// Format: memos/{memo}, memo is the user defined id or uuid.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// 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.
// 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
// 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.
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.
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
sizeCache protoimpl.SizeCache
}
@ -1974,10 +1965,8 @@ type MemoRelation_Memo struct {
// The resource name of the memo.
// Format: memos/{memo}
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.
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
sizeCache protoimpl.SizeCache
}
@ -2019,13 +2008,6 @@ func (x *MemoRelation_Memo) GetName() string {
return ""
}
func (x *MemoRelation_Memo) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *MemoRelation_Memo) GetSnippet() string {
if x != nil {
return x.Snippet
@ -2037,45 +2019,44 @@ var File_api_v1_memo_service_proto protoreflect.FileDescriptor
const file_api_v1_memo_service_proto_rawDesc = "" +
"\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" +
"\x04name\x18\x01 \x01(\tB\x06\xe0A\x03\xe0A\bR\x04name\x12\x15\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x123\n" +
"\acreator\x18\x03 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\x04name\x18\x01 \x01(\tB\x06\xe0A\x03\xe0A\bR\x04name\x123\n" +
"\acreator\x18\x02 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\x11memos.api.v1/UserR\acreator\x128\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" +
"\rreaction_type\x18\x05 \x01(\tB\x03\xe0A\x02R\freactionType\x12@\n" +
"\vcreate_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"\rreaction_type\x18\x04 \x01(\tB\x03\xe0A\x02R\freactionType\x12@\n" +
"\vcreate_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\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" +
"\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" +
"\acreator\x18\x04 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\x05state\x18\x02 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x123\n" +
"\acreator\x18\x03 \x01(\tB\x19\xe0A\x03\xfaA\x13\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" +
"\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" +
"\fdisplay_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x01R\vdisplayTime\x12\x1d\n" +
"\acontent\x18\b \x01(\tB\x03\xe0A\x02R\acontent\x12-\n" +
"\x05nodes\x18\t \x03(\v2\x12.memos.api.v1.NodeB\x03\xe0A\x03R\x05nodes\x12=\n" +
"\fdisplay_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x01R\vdisplayTime\x12\x1d\n" +
"\acontent\x18\a \x01(\tB\x03\xe0A\x02R\acontent\x12-\n" +
"\x05nodes\x18\b \x03(\v2\x12.memos.api.v1.NodeB\x03\xe0A\x03R\x05nodes\x12=\n" +
"\n" +
"visibility\x18\n" +
" \x01(\x0e2\x18.memos.api.v1.VisibilityB\x03\xe0A\x02R\n" +
"visibility\x18\t \x01(\x0e2\x18.memos.api.v1.VisibilityB\x03\xe0A\x02R\n" +
"visibility\x12\x17\n" +
"\x04tags\x18\v \x03(\tB\x03\xe0A\x03R\x04tags\x12\x1b\n" +
"\x06pinned\x18\f \x01(\bB\x03\xe0A\x01R\x06pinned\x12?\n" +
"\vattachments\x18\x0e \x03(\v2\x18.memos.api.v1.AttachmentB\x03\xe0A\x01R\vattachments\x12=\n" +
"\trelations\x18\x0f \x03(\v2\x1a.memos.api.v1.MemoRelationB\x03\xe0A\x01R\trelations\x129\n" +
"\treactions\x18\x10 \x03(\v2\x16.memos.api.v1.ReactionB\x03\xe0A\x03R\treactions\x12<\n" +
"\bproperty\x18\x11 \x01(\v2\x1b.memos.api.v1.Memo.PropertyB\x03\xe0A\x03R\bproperty\x126\n" +
"\x06parent\x18\x12 \x01(\tB\x19\xe0A\x03\xfaA\x13\n" +
"\x04tags\x18\n" +
" \x03(\tB\x03\xe0A\x03R\x04tags\x12\x1b\n" +
"\x06pinned\x18\v \x01(\bB\x03\xe0A\x01R\x06pinned\x12?\n" +
"\vattachments\x18\f \x03(\v2\x18.memos.api.v1.AttachmentB\x03\xe0A\x01R\vattachments\x12=\n" +
"\trelations\x18\r \x03(\v2\x1a.memos.api.v1.MemoRelationB\x03\xe0A\x01R\trelations\x129\n" +
"\treactions\x18\x0e \x03(\v2\x16.memos.api.v1.ReactionB\x03\xe0A\x03R\treactions\x12<\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" +
"\asnippet\x18\x13 \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" +
"\asnippet\x18\x11 \x01(\tB\x03\xe0A\x03R\asnippet\x12<\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" +
"\bhas_link\x18\x01 \x01(\bR\ahasLink\x12\"\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" +
"\x11memos.api.v1/Memo\x12\fmemos/{memo}\x1a\x04name*\x05memos2\x04memoB\t\n" +
"\a_parentB\v\n" +
"\t_locationJ\x04\b\x02\x10\x03\"u\n" +
"\t_location\"u\n" +
"\bLocation\x12%\n" +
"\vplaceholder\x18\x01 \x01(\tB\x03\xe0A\x01R\vplaceholder\x12\x1f\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" +
"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\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" +
"\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" +
"\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" +
"\x04name\x18\x01 \x01(\tB\x19\xe0A\x02\xfaA\x13\n" +
"\x11memos.api.v1/MemoR\x04name\x12\x15\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x12\x1d\n" +
"\asnippet\x18\x03 \x01(\tB\x03\xe0A\x03R\asnippet\"8\n" +
"\x11memos.api.v1/MemoR\x04name\x12\x1d\n" +
"\asnippet\x18\x02 \x01(\tB\x03\xe0A\x03R\asnippet\"8\n" +
"\x04Type\x12\x14\n" +
"\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n" +
"\tREFERENCE\x10\x01\x12\v\n" +

@ -88,30 +88,26 @@ type User struct {
// The resource name of the user.
// Format: users/{user}
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,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"`
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -153,13 +149,6 @@ func (x *User) GetName() string {
return ""
}
func (x *User) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *User) GetRole() User_Role {
if x != nil {
return x.Role
@ -230,13 +219,6 @@ func (x *User) GetUpdateTime() *timestamppb.Timestamp {
return nil
}
func (x *User) GetEtag() string {
if x != nil {
return x.Etag
}
return ""
}
type ListUsersRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// 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 = "" +
"\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" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12\x15\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x120\n" +
"\x04role\x18\x03 \x01(\x0e2\x17.memos.api.v1.User.RoleB\x03\xe0A\x02R\x04role\x12\x1f\n" +
"\busername\x18\x04 \x01(\tB\x03\xe0A\x02R\busername\x12\x19\n" +
"\x05email\x18\x05 \x01(\tB\x03\xe0A\x01R\x05email\x12&\n" +
"\fdisplay_name\x18\x06 \x01(\tB\x03\xe0A\x01R\vdisplayName\x12\"\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x120\n" +
"\x04role\x18\x02 \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" +
"\x05email\x18\x04 \x01(\tB\x03\xe0A\x01R\x05email\x12&\n" +
"\fdisplay_name\x18\x05 \x01(\tB\x03\xe0A\x01R\vdisplayName\x12\"\n" +
"\n" +
"avatar_url\x18\a \x01(\tB\x03\xe0A\x01R\tavatarUrl\x12%\n" +
"\vdescription\x18\b \x01(\tB\x03\xe0A\x01R\vdescription\x12\x1f\n" +
"\bpassword\x18\t \x01(\tB\x03\xe0A\x04R\bpassword\x12.\n" +
"\x05state\x18\n" +
" \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x12@\n" +
"\vcreate_time\x18\v \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"avatar_url\x18\x06 \x01(\tB\x03\xe0A\x01R\tavatarUrl\x12%\n" +
"\vdescription\x18\a \x01(\tB\x03\xe0A\x01R\vdescription\x12\x1f\n" +
"\bpassword\x18\b \x01(\tB\x03\xe0A\x04R\bpassword\x12.\n" +
"\x05state\x18\t \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x12@\n" +
"\vcreate_time\x18\n" +
" \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"createTime\x12@\n" +
"\vupdate_time\x18\f \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"updateTime\x12\x17\n" +
"\x04etag\x18\r \x01(\tB\x03\xe0A\x03R\x04etag\";\n" +
"\vupdate_time\x18\v \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"updateTime\";\n" +
"\x04Role\x12\x14\n" +
"\x10ROLE_UNSPECIFIED\x10\x00\x12\b\n" +
"\x04HOST\x10\x01\x12\t\n" +

@ -30,23 +30,19 @@ type Webhook struct {
// The resource name of the webhook.
// Format: webhooks/{webhook}
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.
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.
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.
// 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.
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.
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.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,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"`
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@ -88,13 +84,6 @@ func (x *Webhook) GetName() string {
return ""
}
func (x *Webhook) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *Webhook) GetDisplayName() string {
if x != nil {
return x.DisplayName
@ -137,13 +126,6 @@ func (x *Webhook) GetUpdateTime() *timestamppb.Timestamp {
return nil
}
func (x *Webhook) GetEtag() string {
if x != nil {
return x.Etag
}
return ""
}
type ListWebhooksRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// 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 = "" +
"\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" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12\x15\n" +
"\x03uid\x18\x02 \x01(\tB\x03\xe0A\x03R\x03uid\x12&\n" +
"\fdisplay_name\x18\x03 \x01(\tB\x03\xe0A\x02R\vdisplayName\x12\x15\n" +
"\x03url\x18\x04 \x01(\tB\x03\xe0A\x02R\x03url\x12\x1d\n" +
"\acreator\x18\x05 \x01(\tB\x03\xe0A\x03R\acreator\x12.\n" +
"\x05state\x18\x06 \x01(\x0e2\x13.memos.api.v1.StateB\x03\xe0A\x02R\x05state\x12@\n" +
"\vcreate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x12&\n" +
"\fdisplay_name\x18\x02 \x01(\tB\x03\xe0A\x02R\vdisplayName\x12\x15\n" +
"\x03url\x18\x03 \x01(\tB\x03\xe0A\x02R\x03url\x12\x1d\n" +
"\acreator\x18\x04 \x01(\tB\x03\xe0A\x03R\acreator\x12.\n" +
"\x05state\x18\x05 \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" +
"createTime\x12@\n" +
"\vupdate_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"updateTime\x12\x17\n" +
"\x04etag\x18\t \x01(\tB\x03\xe0A\x03R\x04etag:F\xeaAC\n" +
"\vupdate_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
"updateTime:F\xeaAC\n" +
"\x14memos.api.v1/Webhook\x12\x12webhooks/{webhook}\x1a\x04name*\bwebhooks2\awebhook\"\xc0\x01\n" +
"\x13ListWebhooksRequest\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.
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.
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.
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.
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 []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.
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).
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.
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
sizeCache protoimpl.SizeCache
}
@ -921,19 +921,19 @@ const file_api_v1_workspace_service_proto_rawDesc = "" +
"\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\f\n" +
"\bDATABASE\x10\x01\x12\t\n" +
"\x05LOCAL\x10\x02\x12\x06\n" +
"\x02S3\x10\x03\"\x94\x04\n" +
"\x02S3\x10\x03\"\x88\x04\n" +
"\x1bWorkspaceMemoRelatedSetting\x12<\n" +
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" +
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12\x1c\n" +
"\treactions\x18\n" +
" \x03(\tR\treactions\x12<\n" +
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05J\x04\b\b\x10\t\"X\n" +
"\x18enable_double_click_edit\x18\x04 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
"\x13enable_link_preview\x18\x05 \x01(\bR\x11enableLinkPreview\x12%\n" +
"\x0eenable_comment\x18\x06 \x01(\bR\renableComment\x12\x1c\n" +
"\treactions\x18\a \x03(\tR\treactions\x12<\n" +
"\x1adisable_markdown_shortcuts\x18\b \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
"\x18enable_blur_nsfw_content\x18\t \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
"\tnsfw_tags\x18\n" +
" \x03(\tR\bnsfwTags\"X\n" +
"\x1aGetWorkspaceSettingRequest\x12:\n" +
"\x04name\x18\x01 \x01(\tB&\xe0A\x02\xfaA \n" +
"\x1eapi.memos.dev/WorkspaceSettingR\x04name\"\xa0\x01\n" +

@ -819,10 +819,6 @@ paths:
schema:
type: object
properties:
uid:
type: string
description: Output only. The system generated unique identifier.
readOnly: true
type:
$ref: '#/definitions/apiv1IdentityProviderType'
description: Required. The type of the identity provider.
@ -2369,10 +2365,6 @@ paths:
schema:
type: object
properties:
uid:
type: string
description: Output only. The system generated unique identifier.
readOnly: true
role:
$ref: '#/definitions/UserRole'
description: The role of the user.
@ -2407,10 +2399,6 @@ paths:
format: date-time
description: Output only. The last update timestamp.
readOnly: true
etag:
type: string
description: Output only. The etag for this resource.
readOnly: true
title: Required. The user to update.
required:
- role
@ -2453,10 +2441,6 @@ paths:
schema:
type: object
properties:
uid:
type: string
description: Output only. The system generated unique identifier.
readOnly: true
displayName:
type: string
description: Required. The display name of the webhook.
@ -2482,10 +2466,6 @@ paths:
format: date-time
description: Output only. The last update timestamp.
readOnly: true
etag:
type: string
description: Output only. The etag for this resource.
readOnly: true
title: Required. The webhook to update.
required:
- displayName
@ -2755,10 +2735,6 @@ definitions:
title: |-
The resource name of the identity provider.
Format: identityProviders/{idp}
uid:
type: string
description: Output only. The system generated unique identifier.
readOnly: true
type:
$ref: '#/definitions/apiv1IdentityProviderType'
description: Required. The type of the identity provider.
@ -2786,6 +2762,7 @@ definitions:
- TYPE_UNSPECIFIED
- OAUTH2
default: TYPE_UNSPECIFIED
description: ' - OAUTH2: OAuth2 identity provider.'
apiv1Location:
type: object
properties:
@ -3792,10 +3769,6 @@ definitions:
title: |-
The resource name of the memo.
Format: memos/{memo}
uid:
type: string
description: Output only. The unique identifier of the memo.
readOnly: true
snippet:
type: string
description: Output only. The snippet of the memo content. Plain text only.
@ -3982,10 +3955,6 @@ definitions:
The resource name of the reaction.
Format: reactions/{reaction}
readOnly: true
uid:
type: string
description: Output only. The system generated unique identifier.
readOnly: true
creator:
type: string
title: |-
@ -4181,10 +4150,6 @@ definitions:
title: |-
The resource name of the user.
Format: users/{user}
uid:
type: string
description: Output only. The system generated unique identifier.
readOnly: true
role:
$ref: '#/definitions/UserRole'
description: The role of the user.
@ -4219,10 +4184,6 @@ definitions:
format: date-time
description: Output only. The last update timestamp.
readOnly: true
etag:
type: string
description: Output only. The etag for this resource.
readOnly: true
required:
- role
- username
@ -4350,10 +4311,6 @@ definitions:
title: |-
The resource name of the webhook.
Format: webhooks/{webhook}
uid:
type: string
description: Output only. The system generated unique identifier.
readOnly: true
displayName:
type: string
description: Required. The display name of the webhook.
@ -4379,10 +4336,6 @@ definitions:
format: date-time
description: Output only. The last update timestamp.
readOnly: true
etag:
type: string
description: Output only. The etag for this resource.
readOnly: true
required:
- displayName
- url

@ -664,19 +664,19 @@ type WorkspaceMemoRelatedSetting struct {
// 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"`
// 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.
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.
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 []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
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).
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.
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
sizeCache protoimpl.SizeCache
}
@ -830,19 +830,19 @@ const file_store_workspace_setting_proto_rawDesc = "" +
"\bendpoint\x18\x03 \x01(\tR\bendpoint\x12\x16\n" +
"\x06region\x18\x04 \x01(\tR\x06region\x12\x16\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" +
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" +
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12\x1c\n" +
"\treactions\x18\n" +
" \x03(\tR\treactions\x12<\n" +
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05J\x04\b\b\x10\t*s\n" +
"\x18enable_double_click_edit\x18\x04 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
"\x13enable_link_preview\x18\x05 \x01(\bR\x11enableLinkPreview\x12%\n" +
"\x0eenable_comment\x18\x06 \x01(\bR\renableComment\x12\x1c\n" +
"\treactions\x18\a \x03(\tR\treactions\x12<\n" +
"\x1adisable_markdown_shortcuts\x18\b \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
"\x18enable_blur_nsfw_content\x18\t \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
"\tnsfw_tags\x18\n" +
" \x03(\tR\bnsfwTags*s\n" +
"\x13WorkspaceSettingKey\x12%\n" +
"!WORKSPACE_SETTING_KEY_UNSPECIFIED\x10\x00\x12\t\n" +
"\x05BASIC\x10\x01\x12\v\n" +

@ -95,8 +95,6 @@ message StorageS3Config {
}
message WorkspaceMemoRelatedSetting {
reserved 4, 8;
// disallow_public_visibility disallows set memo as public visibility.
bool disallow_public_visibility = 1;
// 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.
int32 content_length_limit = 3;
// 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.
bool enable_link_preview = 6;
bool enable_link_preview = 5;
// enable_comment enables comment.
bool enable_comment = 7;
bool enable_comment = 6;
// reactions is the list of reactions.
repeated string reactions = 10;
repeated string reactions = 7;
// 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).
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.
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 {
temp := &v1pb.IdentityProvider{
Name: fmt.Sprintf("%s%d", IdentityProviderNamePrefix, identityProvider.Id),
Uid: fmt.Sprintf("%d", identityProvider.Id),
Title: identityProvider.Name,
IdentifierFilter: identityProvider.IdentifierFilter,
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{
Memo: &v1pb.MemoRelation_Memo{
Name: fmt.Sprintf("%s%s", MemoNamePrefix, memo.UID),
Uid: memo.UID,
Snippet: memoSnippet,
},
RelatedMemo: &v1pb.MemoRelation_Memo{
Name: fmt.Sprintf("%s%s", MemoNamePrefix, relatedMemo.UID),
Uid: relatedMemo.UID,
Snippet: relatedMemoSnippet,
},
Type: convertMemoRelationTypeFromStore(memoRelation.Type),

@ -82,7 +82,6 @@ func (s *APIV1Service) convertReactionFromStore(ctx context.Context, reaction *s
reactionUID := fmt.Sprintf("%d", reaction.ID)
return &v1pb.Reaction{
Name: fmt.Sprintf("%s%s", ReactionNamePrefix, reactionUID),
Uid: reactionUID,
Creator: fmt.Sprintf("%s%d", UserNamePrefix, creator.ID),
ContentId: reaction.ContentID,
ReactionType: reaction.ReactionType,

@ -57,7 +57,6 @@ func TestCreateIdentityProvider(t *testing.T) {
require.Equal(t, "Test OAuth2 Provider", resp.Title)
require.Equal(t, v1pb.IdentityProvider_OAUTH2, resp.Type)
require.Contains(t, resp.Name, "identityProviders/")
require.NotEmpty(t, resp.Uid)
require.NotNil(t, resp.Config.GetOauth2Config())
require.Equal(t, "test-client-id", resp.Config.GetOauth2Config().ClientId)
})

@ -2,7 +2,6 @@ package v1
import (
"context"
"crypto/md5"
"encoding/base64"
"fmt"
"net/http"
@ -736,11 +735,6 @@ func (s *APIV1Service) UpsertAccessTokenToStore(ctx context.Context, user *store
}
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{
Name: fmt.Sprintf("%s%d", UserNamePrefix, user.ID),
State: convertStateFromStore(user.RowStatus),
@ -752,7 +746,6 @@ func convertUserFromStore(user *store.User) *v1pb.User {
DisplayName: user.Nickname,
AvatarUrl: user.AvatarURL,
Description: user.Description,
Etag: etag,
}
// Use the avatar URL instead of raw base64 image data to reduce the response size.
if user.AvatarURL != "" {

@ -2,7 +2,6 @@ package v1
import (
"context"
"crypto/md5"
"fmt"
"strings"
"time"
@ -213,19 +212,13 @@ func (s *APIV1Service) DeleteWebhook(ctx context.Context, request *v1pb.DeleteWe
}
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{
Name: fmt.Sprintf("webhooks/%d", webhook.ID),
Uid: fmt.Sprintf("%d", webhook.ID),
DisplayName: webhook.Name,
Url: webhook.URL,
Creator: fmt.Sprintf("users/%d", webhook.CreatorID),
State: v1pb.State_NORMAL, // Default to NORMAL state for webhooks
CreateTime: timestamppb.New(time.Unix(webhook.CreatedTs, 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);
}
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 !== "") {
writer.uint32(34).string(message.filename);
writer.uint32(26).string(message.filename);
}
if (message.content.length !== 0) {
writer.uint32(42).bytes(message.content);
writer.uint32(34).bytes(message.content);
}
if (message.externalLink !== "") {
writer.uint32(50).string(message.externalLink);
writer.uint32(42).string(message.externalLink);
}
if (message.type !== "") {
writer.uint32(58).string(message.type);
writer.uint32(50).string(message.type);
}
if (message.size !== 0) {
writer.uint32(64).int64(message.size);
writer.uint32(56).int64(message.size);
}
if (message.memo !== undefined) {
writer.uint32(74).string(message.memo);
writer.uint32(66).string(message.memo);
}
return writer;
},
@ -185,56 +185,56 @@ export const Attachment: MessageFns<Attachment> = {
message.name = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
case 2: {
if (tag !== 18) {
break;
}
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 4: {
if (tag !== 34) {
case 3: {
if (tag !== 26) {
break;
}
message.filename = reader.string();
continue;
}
case 5: {
if (tag !== 42) {
case 4: {
if (tag !== 34) {
break;
}
message.content = reader.bytes();
continue;
}
case 6: {
if (tag !== 50) {
case 5: {
if (tag !== 42) {
break;
}
message.externalLink = reader.string();
continue;
}
case 7: {
if (tag !== 58) {
case 6: {
if (tag !== 50) {
break;
}
message.type = reader.string();
continue;
}
case 8: {
if (tag !== 64) {
case 7: {
if (tag !== 56) {
break;
}
message.size = longToNumber(reader.int64());
continue;
}
case 9: {
if (tag !== 74) {
case 8: {
if (tag !== 66) {
break;
}

@ -17,8 +17,6 @@ export interface IdentityProvider {
* Format: identityProviders/{idp}
*/
name: string;
/** Output only. The system generated unique identifier. */
uid: string;
/** Required. The type of the identity provider. */
type: IdentityProvider_Type;
/** Required. The display title of the identity provider. */
@ -31,6 +29,7 @@ export interface IdentityProvider {
export enum IdentityProvider_Type {
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
/** OAUTH2 - OAuth2 identity provider. */
OAUTH2 = "OAUTH2",
UNRECOGNIZED = "UNRECOGNIZED",
}
@ -138,14 +137,7 @@ export interface DeleteIdentityProviderRequest {
}
function createBaseIdentityProvider(): IdentityProvider {
return {
name: "",
uid: "",
type: IdentityProvider_Type.TYPE_UNSPECIFIED,
title: "",
identifierFilter: "",
config: undefined,
};
return { name: "", type: IdentityProvider_Type.TYPE_UNSPECIFIED, title: "", identifierFilter: "", config: undefined };
}
export const IdentityProvider: MessageFns<IdentityProvider> = {
@ -153,20 +145,17 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
if (message.uid !== "") {
writer.uint32(18).string(message.uid);
}
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 !== "") {
writer.uint32(34).string(message.title);
writer.uint32(26).string(message.title);
}
if (message.identifierFilter !== "") {
writer.uint32(42).string(message.identifierFilter);
writer.uint32(34).string(message.identifierFilter);
}
if (message.config !== undefined) {
IdentityProviderConfig.encode(message.config, writer.uint32(50).fork()).join();
IdentityProviderConfig.encode(message.config, writer.uint32(42).fork()).join();
}
return writer;
},
@ -187,19 +176,19 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
continue;
}
case 2: {
if (tag !== 18) {
if (tag !== 16) {
break;
}
message.uid = reader.string();
message.type = identityProvider_TypeFromJSON(reader.int32());
continue;
}
case 3: {
if (tag !== 24) {
if (tag !== 26) {
break;
}
message.type = identityProvider_TypeFromJSON(reader.int32());
message.title = reader.string();
continue;
}
case 4: {
@ -207,7 +196,7 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
break;
}
message.title = reader.string();
message.identifierFilter = reader.string();
continue;
}
case 5: {
@ -215,14 +204,6 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
break;
}
message.identifierFilter = reader.string();
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.config = IdentityProviderConfig.decode(reader, reader.uint32());
continue;
}
@ -241,7 +222,6 @@ export const IdentityProvider: MessageFns<IdentityProvider> = {
fromPartial(object: DeepPartial<IdentityProvider>): IdentityProvider {
const message = createBaseIdentityProvider();
message.name = object.name ?? "";
message.uid = object.uid ?? "";
message.type = object.type ?? IdentityProvider_Type.TYPE_UNSPECIFIED;
message.title = object.title ?? "";
message.identifierFilter = object.identifierFilter ?? "";

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

@ -20,8 +20,6 @@ export interface User {
* Format: users/{user}
*/
name: string;
/** Output only. The system generated unique identifier. */
uid: string;
/** The role of the user. */
role: User_Role;
/** Required. The unique username for login. */
@ -43,11 +41,7 @@ export interface User {
| Date
| undefined;
/** Output only. The last update timestamp. */
updateTime?:
| Date
| undefined;
/** Output only. The etag for this resource. */
etag: string;
updateTime?: Date | undefined;
}
/** User role enumeration. */
@ -436,7 +430,6 @@ export interface ListAllUserStatsResponse {
function createBaseUser(): User {
return {
name: "",
uid: "",
role: User_Role.ROLE_UNSPECIFIED,
username: "",
email: "",
@ -447,7 +440,6 @@ function createBaseUser(): User {
state: State.STATE_UNSPECIFIED,
createTime: undefined,
updateTime: undefined,
etag: "",
};
}
@ -456,41 +448,35 @@ export const User: MessageFns<User> = {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
if (message.uid !== "") {
writer.uint32(18).string(message.uid);
}
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 !== "") {
writer.uint32(34).string(message.username);
writer.uint32(26).string(message.username);
}
if (message.email !== "") {
writer.uint32(42).string(message.email);
writer.uint32(34).string(message.email);
}
if (message.displayName !== "") {
writer.uint32(50).string(message.displayName);
writer.uint32(42).string(message.displayName);
}
if (message.avatarUrl !== "") {
writer.uint32(58).string(message.avatarUrl);
writer.uint32(50).string(message.avatarUrl);
}
if (message.description !== "") {
writer.uint32(66).string(message.description);
writer.uint32(58).string(message.description);
}
if (message.password !== "") {
writer.uint32(74).string(message.password);
writer.uint32(66).string(message.password);
}
if (message.state !== State.STATE_UNSPECIFIED) {
writer.uint32(80).int32(stateToNumber(message.state));
writer.uint32(72).int32(stateToNumber(message.state));
}
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) {
Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(98).fork()).join();
}
if (message.etag !== "") {
writer.uint32(106).string(message.etag);
Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(90).fork()).join();
}
return writer;
},
@ -511,19 +497,19 @@ export const User: MessageFns<User> = {
continue;
}
case 2: {
if (tag !== 18) {
if (tag !== 16) {
break;
}
message.uid = reader.string();
message.role = user_RoleFromJSON(reader.int32());
continue;
}
case 3: {
if (tag !== 24) {
if (tag !== 26) {
break;
}
message.role = user_RoleFromJSON(reader.int32());
message.username = reader.string();
continue;
}
case 4: {
@ -531,7 +517,7 @@ export const User: MessageFns<User> = {
break;
}
message.username = reader.string();
message.email = reader.string();
continue;
}
case 5: {
@ -539,7 +525,7 @@ export const User: MessageFns<User> = {
break;
}
message.email = reader.string();
message.displayName = reader.string();
continue;
}
case 6: {
@ -547,7 +533,7 @@ export const User: MessageFns<User> = {
break;
}
message.displayName = reader.string();
message.avatarUrl = reader.string();
continue;
}
case 7: {
@ -555,7 +541,7 @@ export const User: MessageFns<User> = {
break;
}
message.avatarUrl = reader.string();
message.description = reader.string();
continue;
}
case 8: {
@ -563,23 +549,23 @@ export const User: MessageFns<User> = {
break;
}
message.description = reader.string();
message.password = reader.string();
continue;
}
case 9: {
if (tag !== 74) {
if (tag !== 72) {
break;
}
message.password = reader.string();
message.state = stateFromJSON(reader.int32());
continue;
}
case 10: {
if (tag !== 80) {
if (tag !== 82) {
break;
}
message.state = stateFromJSON(reader.int32());
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 11: {
@ -587,25 +573,9 @@ export const User: MessageFns<User> = {
break;
}
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 12: {
if (tag !== 98) {
break;
}
message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 13: {
if (tag !== 106) {
break;
}
message.etag = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
@ -621,7 +591,6 @@ export const User: MessageFns<User> = {
fromPartial(object: DeepPartial<User>): User {
const message = createBaseUser();
message.name = object.name ?? "";
message.uid = object.uid ?? "";
message.role = object.role ?? User_Role.ROLE_UNSPECIFIED;
message.username = object.username ?? "";
message.email = object.email ?? "";
@ -632,7 +601,6 @@ export const User: MessageFns<User> = {
message.state = object.state ?? State.STATE_UNSPECIFIED;
message.createTime = object.createTime ?? undefined;
message.updateTime = object.updateTime ?? undefined;
message.etag = object.etag ?? "";
return message;
},
};

@ -20,8 +20,6 @@ export interface Webhook {
* Format: webhooks/{webhook}
*/
name: string;
/** Output only. The system generated unique identifier. */
uid: string;
/** Required. The display name of the webhook. */
displayName: string;
/** Required. The target URL for the webhook. */
@ -38,11 +36,7 @@ export interface Webhook {
| Date
| undefined;
/** Output only. The last update timestamp. */
updateTime?:
| Date
| undefined;
/** Output only. The etag for this resource. */
etag: string;
updateTime?: Date | undefined;
}
export interface ListWebhooksRequest {
@ -163,14 +157,12 @@ export interface WebhookRequestPayload {
function createBaseWebhook(): Webhook {
return {
name: "",
uid: "",
displayName: "",
url: "",
creator: "",
state: State.STATE_UNSPECIFIED,
createTime: undefined,
updateTime: undefined,
etag: "",
};
}
@ -179,29 +171,23 @@ export const Webhook: MessageFns<Webhook> = {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
if (message.uid !== "") {
writer.uint32(18).string(message.uid);
}
if (message.displayName !== "") {
writer.uint32(26).string(message.displayName);
writer.uint32(18).string(message.displayName);
}
if (message.url !== "") {
writer.uint32(34).string(message.url);
writer.uint32(26).string(message.url);
}
if (message.creator !== "") {
writer.uint32(42).string(message.creator);
writer.uint32(34).string(message.creator);
}
if (message.state !== State.STATE_UNSPECIFIED) {
writer.uint32(48).int32(stateToNumber(message.state));
writer.uint32(40).int32(stateToNumber(message.state));
}
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) {
Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(66).fork()).join();
}
if (message.etag !== "") {
writer.uint32(74).string(message.etag);
Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(58).fork()).join();
}
return writer;
},
@ -226,7 +212,7 @@ export const Webhook: MessageFns<Webhook> = {
break;
}
message.uid = reader.string();
message.displayName = reader.string();
continue;
}
case 3: {
@ -234,7 +220,7 @@ export const Webhook: MessageFns<Webhook> = {
break;
}
message.displayName = reader.string();
message.url = reader.string();
continue;
}
case 4: {
@ -242,23 +228,23 @@ export const Webhook: MessageFns<Webhook> = {
break;
}
message.url = reader.string();
message.creator = reader.string();
continue;
}
case 5: {
if (tag !== 42) {
if (tag !== 40) {
break;
}
message.creator = reader.string();
message.state = stateFromJSON(reader.int32());
continue;
}
case 6: {
if (tag !== 48) {
if (tag !== 50) {
break;
}
message.state = stateFromJSON(reader.int32());
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 7: {
@ -266,25 +252,9 @@ export const Webhook: MessageFns<Webhook> = {
break;
}
message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 8: {
if (tag !== 66) {
break;
}
message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 9: {
if (tag !== 74) {
break;
}
message.etag = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
@ -300,14 +270,12 @@ export const Webhook: MessageFns<Webhook> = {
fromPartial(object: DeepPartial<Webhook>): Webhook {
const message = createBaseWebhook();
message.name = object.name ?? "";
message.uid = object.uid ?? "";
message.displayName = object.displayName ?? "";
message.url = object.url ?? "";
message.creator = object.creator ?? "";
message.state = object.state ?? State.STATE_UNSPECIFIED;
message.createTime = object.createTime ?? undefined;
message.updateTime = object.updateTime ?? undefined;
message.etag = object.etag ?? "";
return message;
},
};

@ -849,25 +849,25 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
writer.uint32(24).int32(message.contentLengthLimit);
}
if (message.enableDoubleClickEdit !== false) {
writer.uint32(40).bool(message.enableDoubleClickEdit);
writer.uint32(32).bool(message.enableDoubleClickEdit);
}
if (message.enableLinkPreview !== false) {
writer.uint32(48).bool(message.enableLinkPreview);
writer.uint32(40).bool(message.enableLinkPreview);
}
if (message.enableComment !== false) {
writer.uint32(56).bool(message.enableComment);
writer.uint32(48).bool(message.enableComment);
}
for (const v of message.reactions) {
writer.uint32(82).string(v!);
writer.uint32(58).string(v!);
}
if (message.disableMarkdownShortcuts !== false) {
writer.uint32(88).bool(message.disableMarkdownShortcuts);
writer.uint32(64).bool(message.disableMarkdownShortcuts);
}
if (message.enableBlurNsfwContent !== false) {
writer.uint32(96).bool(message.enableBlurNsfwContent);
writer.uint32(72).bool(message.enableBlurNsfwContent);
}
for (const v of message.nsfwTags) {
writer.uint32(106).string(v!);
writer.uint32(82).string(v!);
}
return writer;
},
@ -903,56 +903,56 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
message.contentLengthLimit = reader.int32();
continue;
}
case 5: {
if (tag !== 40) {
case 4: {
if (tag !== 32) {
break;
}
message.enableDoubleClickEdit = reader.bool();
continue;
}
case 6: {
if (tag !== 48) {
case 5: {
if (tag !== 40) {
break;
}
message.enableLinkPreview = reader.bool();
continue;
}
case 7: {
if (tag !== 56) {
case 6: {
if (tag !== 48) {
break;
}
message.enableComment = reader.bool();
continue;
}
case 10: {
if (tag !== 82) {
case 7: {
if (tag !== 58) {
break;
}
message.reactions.push(reader.string());
continue;
}
case 11: {
if (tag !== 88) {
case 8: {
if (tag !== 64) {
break;
}
message.disableMarkdownShortcuts = reader.bool();
continue;
}
case 12: {
if (tag !== 96) {
case 9: {
if (tag !== 72) {
break;
}
message.enableBlurNsfwContent = reader.bool();
continue;
}
case 13: {
if (tag !== 106) {
case 10: {
if (tag !== 82) {
break;
}

Loading…
Cancel
Save