diff --git a/api/v2/apidocs.swagger.md b/api/v2/apidocs.swagger.md index e02d512b..e9f27782 100644 --- a/api/v2/apidocs.swagger.md +++ b/api/v2/apidocs.swagger.md @@ -103,6 +103,10 @@ GetAuthStatus returns the current auth status of the user. ### /api/v2/inboxes #### GET +##### Summary + +ListInboxes lists inboxes for a user. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -119,6 +123,10 @@ GetAuthStatus returns the current auth status of the user. ### /v2/inboxes #### PATCH +##### Summary + +UpdateInbox updates an inbox. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -135,6 +143,10 @@ GetAuthStatus returns the current auth status of the user. ### /v2/{name} #### DELETE +##### Summary + +DeleteInbox deletes an inbox. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -434,6 +446,10 @@ ExportMemos exports memos. ### /api/v2/resources #### GET +##### Summary + +ListResources lists all resources. + ##### Responses | Code | Description | Schema | @@ -442,6 +458,10 @@ ExportMemos exports memos. | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | #### POST +##### Summary + +CreateResource creates a new resource. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -461,6 +481,10 @@ ExportMemos exports memos. ### /api/v2/resources/{id} #### GET +##### Summary + +GetResource returns a resource by id. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -475,6 +499,10 @@ ExportMemos exports memos. | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | #### DELETE +##### Summary + +DeleteResource deletes a resource by id. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -491,6 +519,10 @@ ExportMemos exports memos. ### /api/v2/resources/{name} #### GET +##### Summary + +GetResourceByName returns a resource by name. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -507,6 +539,10 @@ ExportMemos exports memos. ### /api/v2/resources/{resource.id} #### PATCH +##### Summary + +UpdateResource updates a resource. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -527,6 +563,10 @@ ExportMemos exports memos. ### /api/v2/tags #### GET +##### Summary + +ListTags lists tags. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -541,6 +581,10 @@ ExportMemos exports memos. | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | #### DELETE +##### Summary + +DeleteTag deletes a tag. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -556,6 +600,10 @@ ExportMemos exports memos. | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | #### POST +##### Summary + +UpsertTag upserts a tag. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -572,6 +620,10 @@ ExportMemos exports memos. ### /api/v2/tags/suggestion #### GET +##### Summary + +GetTagSuggestions gets tag suggestions from the user's memos. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -588,6 +640,10 @@ ExportMemos exports memos. ### /api/v2/tags:batchUpsert #### POST +##### Summary + +BatchUpsertTag upserts multiple tags. + ##### Responses | Code | Description | Schema | @@ -598,6 +654,11 @@ ExportMemos exports memos. ### /api/v2/tags:rename #### PATCH +##### Summary + +RenameTag renames a tag. +All related memos will be updated. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -731,6 +792,10 @@ DeleteUserAccessToken deletes an access token for a user. ### /api/v2/{name}/setting #### GET +##### Summary + +GetUserSetting gets the setting of a user. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -747,6 +812,10 @@ DeleteUserAccessToken deletes an access token for a user. ### /api/v2/{setting.name} #### PATCH +##### Summary + +UpdateUserSetting updates the setting of a user. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -808,6 +877,10 @@ CreateUser creates a new user. ### /api/v2/webhooks #### GET +##### Summary + +ListWebhooks returns a list of webhooks. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -822,6 +895,10 @@ CreateUser creates a new user. | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | #### POST +##### Summary + +CreateWebhook creates a new webhook. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -838,6 +915,10 @@ CreateUser creates a new user. ### /api/v2/webhooks/{id} #### GET +##### Summary + +GetWebhook returns a webhook by id. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -852,6 +933,10 @@ CreateUser creates a new user. | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | #### DELETE +##### Summary + +DeleteWebhook deletes a webhook by id. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -868,6 +953,10 @@ CreateUser creates a new user. ### /api/v2/webhooks/{webhook.id} #### PATCH +##### Summary + +UpdateWebhook updates a webhook. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -888,6 +977,10 @@ CreateUser creates a new user. ### /api/v2/workspace/profile #### GET +##### Summary + +GetWorkspaceProfile returns the workspace profile. + ##### Responses | Code | Description | Schema | @@ -896,6 +989,10 @@ CreateUser creates a new user. | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | #### PATCH +##### Summary + +UpdateWorkspaceProfile updates the workspace profile. + ##### Parameters | Name | Located in | Description | Required | Schema | @@ -915,6 +1012,10 @@ CreateUser creates a new user. ### /v2/activities #### GET +##### Summary + +GetActivity returns the activity with the given id. + ##### Parameters | Name | Located in | Description | Required | Schema | diff --git a/api/v2/apidocs.swagger.yaml b/api/v2/apidocs.swagger.yaml index 69668934..18cb5bc6 100644 --- a/api/v2/apidocs.swagger.yaml +++ b/api/v2/apidocs.swagger.yaml @@ -130,6 +130,7 @@ paths: - AuthService /api/v2/inboxes: get: + summary: ListInboxes lists inboxes for a user. operationId: InboxService_ListInboxes responses: "200": @@ -503,6 +504,7 @@ paths: - MemoService /api/v2/resources: get: + summary: ListResources lists all resources. operationId: ResourceService_ListResources responses: "200": @@ -516,6 +518,7 @@ paths: tags: - ResourceService post: + summary: CreateResource creates a new resource. operationId: ResourceService_CreateResource responses: "200": @@ -548,6 +551,7 @@ paths: - ResourceService /api/v2/resources/{id}: get: + summary: GetResource returns a resource by id. operationId: ResourceService_GetResource responses: "200": @@ -567,6 +571,7 @@ paths: tags: - ResourceService delete: + summary: DeleteResource deletes a resource by id. operationId: ResourceService_DeleteResource responses: "200": @@ -587,6 +592,7 @@ paths: - ResourceService /api/v2/resources/{name}: get: + summary: GetResourceByName returns a resource by name. operationId: ResourceService_GetResourceByName responses: "200": @@ -606,6 +612,7 @@ paths: - ResourceService /api/v2/resources/{resource.id}: patch: + summary: UpdateResource updates a resource. operationId: ResourceService_UpdateResource responses: "200": @@ -651,6 +658,7 @@ paths: - ResourceService /api/v2/tags: get: + summary: ListTags lists tags. operationId: TagService_ListTags responses: "200": @@ -672,6 +680,7 @@ paths: tags: - TagService delete: + summary: DeleteTag deletes a tag. operationId: TagService_DeleteTag responses: "200": @@ -697,6 +706,7 @@ paths: tags: - TagService post: + summary: UpsertTag upserts a tag. operationId: TagService_UpsertTag responses: "200": @@ -716,6 +726,7 @@ paths: - TagService /api/v2/tags/suggestion: get: + summary: GetTagSuggestions gets tag suggestions from the user's memos. operationId: TagService_GetTagSuggestions responses: "200": @@ -738,6 +749,7 @@ paths: - TagService /api/v2/tags:batchUpsert: post: + summary: BatchUpsertTag upserts multiple tags. operationId: TagService_BatchUpsertTag responses: "200": @@ -752,6 +764,9 @@ paths: - TagService /api/v2/tags:rename: patch: + summary: |- + RenameTag renames a tag. + All related memos will be updated. operationId: TagService_RenameTag responses: "200": @@ -797,6 +812,7 @@ paths: - UserService /api/v2/webhooks: get: + summary: ListWebhooks returns a list of webhooks. operationId: WebhookService_ListWebhooks responses: "200": @@ -816,6 +832,7 @@ paths: tags: - WebhookService post: + summary: CreateWebhook creates a new webhook. operationId: WebhookService_CreateWebhook responses: "200": @@ -836,6 +853,7 @@ paths: - WebhookService /api/v2/webhooks/{id}: get: + summary: GetWebhook returns a webhook by id. operationId: WebhookService_GetWebhook responses: "200": @@ -855,6 +873,7 @@ paths: tags: - WebhookService delete: + summary: DeleteWebhook deletes a webhook by id. operationId: WebhookService_DeleteWebhook responses: "200": @@ -875,6 +894,7 @@ paths: - WebhookService /api/v2/webhooks/{webhook.id}: patch: + summary: UpdateWebhook updates a webhook. operationId: WebhookService_UpdateWebhook responses: "200": @@ -900,6 +920,7 @@ paths: - WebhookService /api/v2/workspace/profile: get: + summary: GetWorkspaceProfile returns the workspace profile. operationId: WorkspaceService_GetWorkspaceProfile responses: "200": @@ -913,6 +934,7 @@ paths: tags: - WorkspaceService patch: + summary: UpdateWorkspaceProfile updates the workspace profile. operationId: WorkspaceService_UpdateWorkspaceProfile responses: "200": @@ -1062,6 +1084,7 @@ paths: - UserService /api/v2/{name}/setting: get: + summary: GetUserSetting gets the setting of a user. operationId: UserService_GetUserSetting responses: "200": @@ -1085,6 +1108,7 @@ paths: - UserService /api/v2/{setting.name}: patch: + summary: UpdateUserSetting updates the setting of a user. operationId: UserService_UpdateUserSetting responses: "200": @@ -1200,6 +1224,7 @@ paths: - UserService /v2/activities: get: + summary: GetActivity returns the activity with the given id. operationId: ActivityService_GetActivity responses: "200": @@ -1220,6 +1245,7 @@ paths: - ActivityService /v2/inboxes: patch: + summary: UpdateInbox updates an inbox. operationId: InboxService_UpdateInbox responses: "200": @@ -1240,6 +1266,7 @@ paths: - InboxService /v2/{name}: delete: + summary: DeleteInbox deletes an inbox. operationId: InboxService_DeleteInbox responses: "200": diff --git a/proto/api/v2/activity_service.proto b/proto/api/v2/activity_service.proto index fb1eb57a..5bcc33ef 100644 --- a/proto/api/v2/activity_service.proto +++ b/proto/api/v2/activity_service.proto @@ -8,6 +8,7 @@ import "google/protobuf/timestamp.proto"; option go_package = "gen/api/v2"; service ActivityService { + // GetActivity returns the activity with the given id. rpc GetActivity(GetActivityRequest) returns (GetActivityResponse) { option (google.api.http) = {get: "/v2/activities"}; } diff --git a/proto/api/v2/inbox_service.proto b/proto/api/v2/inbox_service.proto index 0e4d3977..2607de8b 100644 --- a/proto/api/v2/inbox_service.proto +++ b/proto/api/v2/inbox_service.proto @@ -10,10 +10,11 @@ import "google/protobuf/timestamp.proto"; option go_package = "gen/api/v2"; service InboxService { + // ListInboxes lists inboxes for a user. rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) { option (google.api.http) = {get: "/api/v2/inboxes"}; } - + // UpdateInbox updates an inbox. rpc UpdateInbox(UpdateInboxRequest) returns (UpdateInboxResponse) { option (google.api.http) = { patch: "/v2/inboxes" @@ -21,7 +22,7 @@ service InboxService { }; option (google.api.method_signature) = "inbox,update_mask"; } - + // DeleteInbox deletes an inbox. rpc DeleteInbox(DeleteInboxRequest) returns (DeleteInboxResponse) { option (google.api.http) = {delete: "/v2/{name=inboxes/*}"}; option (google.api.method_signature) = "name"; diff --git a/proto/api/v2/resource_service.proto b/proto/api/v2/resource_service.proto index 226d2100..3373e9ad 100644 --- a/proto/api/v2/resource_service.proto +++ b/proto/api/v2/resource_service.proto @@ -10,20 +10,25 @@ import "google/protobuf/timestamp.proto"; option go_package = "gen/api/v2"; service ResourceService { + // CreateResource creates a new resource. rpc CreateResource(CreateResourceRequest) returns (CreateResourceResponse) { option (google.api.http) = {post: "/api/v2/resources"}; } + // ListResources lists all resources. rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) { option (google.api.http) = {get: "/api/v2/resources"}; } + // GetResource returns a resource by id. rpc GetResource(GetResourceRequest) returns (GetResourceResponse) { option (google.api.http) = {get: "/api/v2/resources/{id}"}; option (google.api.method_signature) = "id"; } + // GetResourceByName returns a resource by name. rpc GetResourceByName(GetResourceByNameRequest) returns (GetResourceByNameResponse) { option (google.api.http) = {get: "/api/v2/resources/{name}"}; option (google.api.method_signature) = "name"; } + // UpdateResource updates a resource. rpc UpdateResource(UpdateResourceRequest) returns (UpdateResourceResponse) { option (google.api.http) = { patch: "/api/v2/resources/{resource.id}", @@ -31,6 +36,7 @@ service ResourceService { }; option (google.api.method_signature) = "resource,update_mask"; } + // DeleteResource deletes a resource by id. rpc DeleteResource(DeleteResourceRequest) returns (DeleteResourceResponse) { option (google.api.http) = {delete: "/api/v2/resources/{id}"}; option (google.api.method_signature) = "id"; diff --git a/proto/api/v2/tag_service.proto b/proto/api/v2/tag_service.proto index 2a53138d..5646bcf6 100644 --- a/proto/api/v2/tag_service.proto +++ b/proto/api/v2/tag_service.proto @@ -7,21 +7,28 @@ import "google/api/annotations.proto"; option go_package = "gen/api/v2"; service TagService { + // UpsertTag upserts a tag. rpc UpsertTag(UpsertTagRequest) returns (UpsertTagResponse) { option (google.api.http) = {post: "/api/v2/tags"}; } + // BatchUpsertTag upserts multiple tags. rpc BatchUpsertTag(BatchUpsertTagRequest) returns (BatchUpsertTagResponse) { option (google.api.http) = {post: "/api/v2/tags:batchUpsert"}; } + // ListTags lists tags. rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { option (google.api.http) = {get: "/api/v2/tags"}; } + // RenameTag renames a tag. + // All related memos will be updated. rpc RenameTag(RenameTagRequest) returns (RenameTagResponse) { option (google.api.http) = {patch: "/api/v2/tags:rename"}; } + // DeleteTag deletes a tag. rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) { option (google.api.http) = {delete: "/api/v2/tags"}; } + // GetTagSuggestions gets tag suggestions from the user's memos. rpc GetTagSuggestions(GetTagSuggestionsRequest) returns (GetTagSuggestionsResponse) { option (google.api.http) = {get: "/api/v2/tags/suggestion"}; } diff --git a/proto/api/v2/user_service.proto b/proto/api/v2/user_service.proto index 6b41f3de..a4250265 100644 --- a/proto/api/v2/user_service.proto +++ b/proto/api/v2/user_service.proto @@ -42,10 +42,12 @@ service UserService { option (google.api.http) = {delete: "/api/v2/{name=users/*}"}; option (google.api.method_signature) = "name"; } + // GetUserSetting gets the setting of a user. rpc GetUserSetting(GetUserSettingRequest) returns (GetUserSettingResponse) { option (google.api.http) = {get: "/api/v2/{name=users/*}/setting"}; option (google.api.method_signature) = "name"; } + // UpdateUserSetting updates the setting of a user. rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UpdateUserSettingResponse) { option (google.api.http) = { patch: "/api/v2/{setting.name=users/*/setting}" diff --git a/proto/api/v2/webhook_service.proto b/proto/api/v2/webhook_service.proto index 8152a529..530001ce 100644 --- a/proto/api/v2/webhook_service.proto +++ b/proto/api/v2/webhook_service.proto @@ -10,24 +10,29 @@ import "google/protobuf/timestamp.proto"; option go_package = "gen/api/v2"; service WebhookService { + // CreateWebhook creates a new webhook. rpc CreateWebhook(CreateWebhookRequest) returns (CreateWebhookResponse) { option (google.api.http) = { post: "/api/v2/webhooks" body: "*" }; } + // GetWebhook returns a webhook by id. rpc GetWebhook(GetWebhookRequest) returns (GetWebhookResponse) { option (google.api.http) = {get: "/api/v2/webhooks/{id}"}; } + // ListWebhooks returns a list of webhooks. rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) { option (google.api.http) = {get: "/api/v2/webhooks"}; } + // UpdateWebhook updates a webhook. rpc UpdateWebhook(UpdateWebhookRequest) returns (UpdateWebhookResponse) { option (google.api.http) = { patch: "/api/v2/webhooks/{webhook.id}" body: "*" }; } + // DeleteWebhook deletes a webhook by id. rpc DeleteWebhook(DeleteWebhookRequest) returns (DeleteWebhookResponse) { option (google.api.http) = {delete: "/api/v2/webhooks/{id}"}; } diff --git a/proto/api/v2/workspace_service.proto b/proto/api/v2/workspace_service.proto index b245108a..0eab3679 100644 --- a/proto/api/v2/workspace_service.proto +++ b/proto/api/v2/workspace_service.proto @@ -9,9 +9,11 @@ import "google/protobuf/field_mask.proto"; option go_package = "gen/api/v2"; service WorkspaceService { + // GetWorkspaceProfile returns the workspace profile. rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (GetWorkspaceProfileResponse) { option (google.api.http) = {get: "/api/v2/workspace/profile"}; } + // UpdateWorkspaceProfile updates the workspace profile. rpc UpdateWorkspaceProfile(UpdateWorkspaceProfileRequest) returns (UpdateWorkspaceProfileResponse) { option (google.api.http) = { patch: "/api/v2/workspace/profile", diff --git a/proto/gen/api/v2/README.md b/proto/gen/api/v2/README.md index a1eef5dd..ec0867bc 100644 --- a/proto/gen/api/v2/README.md +++ b/proto/gen/api/v2/README.md @@ -295,7 +295,7 @@ | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| GetActivity | [GetActivityRequest](#memos-api-v2-GetActivityRequest) | [GetActivityResponse](#memos-api-v2-GetActivityResponse) | | +| GetActivity | [GetActivityRequest](#memos-api-v2-GetActivityRequest) | [GetActivityResponse](#memos-api-v2-GetActivityResponse) | GetActivity returns the activity with the given id. | @@ -737,8 +737,8 @@ Used internally for obfuscating the page token. | CreateUser | [CreateUserRequest](#memos-api-v2-CreateUserRequest) | [CreateUserResponse](#memos-api-v2-CreateUserResponse) | CreateUser creates a new user. | | UpdateUser | [UpdateUserRequest](#memos-api-v2-UpdateUserRequest) | [UpdateUserResponse](#memos-api-v2-UpdateUserResponse) | UpdateUser updates a user. | | DeleteUser | [DeleteUserRequest](#memos-api-v2-DeleteUserRequest) | [DeleteUserResponse](#memos-api-v2-DeleteUserResponse) | DeleteUser deletes a user. | -| GetUserSetting | [GetUserSettingRequest](#memos-api-v2-GetUserSettingRequest) | [GetUserSettingResponse](#memos-api-v2-GetUserSettingResponse) | | -| UpdateUserSetting | [UpdateUserSettingRequest](#memos-api-v2-UpdateUserSettingRequest) | [UpdateUserSettingResponse](#memos-api-v2-UpdateUserSettingResponse) | | +| GetUserSetting | [GetUserSettingRequest](#memos-api-v2-GetUserSettingRequest) | [GetUserSettingResponse](#memos-api-v2-GetUserSettingResponse) | GetUserSetting gets the setting of a user. | +| UpdateUserSetting | [UpdateUserSettingRequest](#memos-api-v2-UpdateUserSettingRequest) | [UpdateUserSettingResponse](#memos-api-v2-UpdateUserSettingResponse) | UpdateUserSetting updates the setting of a user. | | ListUserAccessTokens | [ListUserAccessTokensRequest](#memos-api-v2-ListUserAccessTokensRequest) | [ListUserAccessTokensResponse](#memos-api-v2-ListUserAccessTokensResponse) | ListUserAccessTokens returns a list of access tokens for a user. | | CreateUserAccessToken | [CreateUserAccessTokenRequest](#memos-api-v2-CreateUserAccessTokenRequest) | [CreateUserAccessTokenResponse](#memos-api-v2-CreateUserAccessTokenResponse) | CreateUserAccessToken creates a new access token for a user. | | DeleteUserAccessToken | [DeleteUserAccessTokenRequest](#memos-api-v2-DeleteUserAccessTokenRequest) | [DeleteUserAccessTokenResponse](#memos-api-v2-DeleteUserAccessTokenResponse) | DeleteUserAccessToken deletes an access token for a user. | @@ -1070,9 +1070,9 @@ Used internally for obfuscating the page token. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| ListInboxes | [ListInboxesRequest](#memos-api-v2-ListInboxesRequest) | [ListInboxesResponse](#memos-api-v2-ListInboxesResponse) | | -| UpdateInbox | [UpdateInboxRequest](#memos-api-v2-UpdateInboxRequest) | [UpdateInboxResponse](#memos-api-v2-UpdateInboxResponse) | | -| DeleteInbox | [DeleteInboxRequest](#memos-api-v2-DeleteInboxRequest) | [DeleteInboxResponse](#memos-api-v2-DeleteInboxResponse) | | +| ListInboxes | [ListInboxesRequest](#memos-api-v2-ListInboxesRequest) | [ListInboxesResponse](#memos-api-v2-ListInboxesResponse) | ListInboxes lists inboxes for a user. | +| UpdateInbox | [UpdateInboxRequest](#memos-api-v2-UpdateInboxRequest) | [UpdateInboxResponse](#memos-api-v2-UpdateInboxResponse) | UpdateInbox updates an inbox. | +| DeleteInbox | [DeleteInboxRequest](#memos-api-v2-DeleteInboxRequest) | [DeleteInboxResponse](#memos-api-v2-DeleteInboxResponse) | DeleteInbox deletes an inbox. | @@ -1340,12 +1340,12 @@ Used internally for obfuscating the page token. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| CreateResource | [CreateResourceRequest](#memos-api-v2-CreateResourceRequest) | [CreateResourceResponse](#memos-api-v2-CreateResourceResponse) | | -| ListResources | [ListResourcesRequest](#memos-api-v2-ListResourcesRequest) | [ListResourcesResponse](#memos-api-v2-ListResourcesResponse) | | -| GetResource | [GetResourceRequest](#memos-api-v2-GetResourceRequest) | [GetResourceResponse](#memos-api-v2-GetResourceResponse) | | -| GetResourceByName | [GetResourceByNameRequest](#memos-api-v2-GetResourceByNameRequest) | [GetResourceByNameResponse](#memos-api-v2-GetResourceByNameResponse) | | -| UpdateResource | [UpdateResourceRequest](#memos-api-v2-UpdateResourceRequest) | [UpdateResourceResponse](#memos-api-v2-UpdateResourceResponse) | | -| DeleteResource | [DeleteResourceRequest](#memos-api-v2-DeleteResourceRequest) | [DeleteResourceResponse](#memos-api-v2-DeleteResourceResponse) | | +| CreateResource | [CreateResourceRequest](#memos-api-v2-CreateResourceRequest) | [CreateResourceResponse](#memos-api-v2-CreateResourceResponse) | CreateResource creates a new resource. | +| ListResources | [ListResourcesRequest](#memos-api-v2-ListResourcesRequest) | [ListResourcesResponse](#memos-api-v2-ListResourcesResponse) | ListResources lists all resources. | +| GetResource | [GetResourceRequest](#memos-api-v2-GetResourceRequest) | [GetResourceResponse](#memos-api-v2-GetResourceResponse) | GetResource returns a resource by id. | +| GetResourceByName | [GetResourceByNameRequest](#memos-api-v2-GetResourceByNameRequest) | [GetResourceByNameResponse](#memos-api-v2-GetResourceByNameResponse) | GetResourceByName returns a resource by name. | +| UpdateResource | [UpdateResourceRequest](#memos-api-v2-UpdateResourceRequest) | [UpdateResourceResponse](#memos-api-v2-UpdateResourceResponse) | UpdateResource updates a resource. | +| DeleteResource | [DeleteResourceRequest](#memos-api-v2-DeleteResourceRequest) | [DeleteResourceResponse](#memos-api-v2-DeleteResourceResponse) | DeleteResource deletes a resource by id. | @@ -2072,12 +2072,12 @@ Used internally for obfuscating the page token. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| UpsertTag | [UpsertTagRequest](#memos-api-v2-UpsertTagRequest) | [UpsertTagResponse](#memos-api-v2-UpsertTagResponse) | | -| BatchUpsertTag | [BatchUpsertTagRequest](#memos-api-v2-BatchUpsertTagRequest) | [BatchUpsertTagResponse](#memos-api-v2-BatchUpsertTagResponse) | | -| ListTags | [ListTagsRequest](#memos-api-v2-ListTagsRequest) | [ListTagsResponse](#memos-api-v2-ListTagsResponse) | | -| RenameTag | [RenameTagRequest](#memos-api-v2-RenameTagRequest) | [RenameTagResponse](#memos-api-v2-RenameTagResponse) | | -| DeleteTag | [DeleteTagRequest](#memos-api-v2-DeleteTagRequest) | [DeleteTagResponse](#memos-api-v2-DeleteTagResponse) | | -| GetTagSuggestions | [GetTagSuggestionsRequest](#memos-api-v2-GetTagSuggestionsRequest) | [GetTagSuggestionsResponse](#memos-api-v2-GetTagSuggestionsResponse) | | +| UpsertTag | [UpsertTagRequest](#memos-api-v2-UpsertTagRequest) | [UpsertTagResponse](#memos-api-v2-UpsertTagResponse) | UpsertTag upserts a tag. | +| BatchUpsertTag | [BatchUpsertTagRequest](#memos-api-v2-BatchUpsertTagRequest) | [BatchUpsertTagResponse](#memos-api-v2-BatchUpsertTagResponse) | BatchUpsertTag upserts multiple tags. | +| ListTags | [ListTagsRequest](#memos-api-v2-ListTagsRequest) | [ListTagsResponse](#memos-api-v2-ListTagsResponse) | ListTags lists tags. | +| RenameTag | [RenameTagRequest](#memos-api-v2-RenameTagRequest) | [RenameTagResponse](#memos-api-v2-RenameTagResponse) | RenameTag renames a tag. All related memos will be updated. | +| DeleteTag | [DeleteTagRequest](#memos-api-v2-DeleteTagRequest) | [DeleteTagResponse](#memos-api-v2-DeleteTagResponse) | DeleteTag deletes a tag. | +| GetTagSuggestions | [GetTagSuggestionsRequest](#memos-api-v2-GetTagSuggestionsRequest) | [GetTagSuggestionsResponse](#memos-api-v2-GetTagSuggestionsResponse) | GetTagSuggestions gets tag suggestions from the user's memos. | @@ -2271,11 +2271,11 @@ Used internally for obfuscating the page token. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| CreateWebhook | [CreateWebhookRequest](#memos-api-v2-CreateWebhookRequest) | [CreateWebhookResponse](#memos-api-v2-CreateWebhookResponse) | | -| GetWebhook | [GetWebhookRequest](#memos-api-v2-GetWebhookRequest) | [GetWebhookResponse](#memos-api-v2-GetWebhookResponse) | | -| ListWebhooks | [ListWebhooksRequest](#memos-api-v2-ListWebhooksRequest) | [ListWebhooksResponse](#memos-api-v2-ListWebhooksResponse) | | -| UpdateWebhook | [UpdateWebhookRequest](#memos-api-v2-UpdateWebhookRequest) | [UpdateWebhookResponse](#memos-api-v2-UpdateWebhookResponse) | | -| DeleteWebhook | [DeleteWebhookRequest](#memos-api-v2-DeleteWebhookRequest) | [DeleteWebhookResponse](#memos-api-v2-DeleteWebhookResponse) | | +| CreateWebhook | [CreateWebhookRequest](#memos-api-v2-CreateWebhookRequest) | [CreateWebhookResponse](#memos-api-v2-CreateWebhookResponse) | CreateWebhook creates a new webhook. | +| GetWebhook | [GetWebhookRequest](#memos-api-v2-GetWebhookRequest) | [GetWebhookResponse](#memos-api-v2-GetWebhookResponse) | GetWebhook returns a webhook by id. | +| ListWebhooks | [ListWebhooksRequest](#memos-api-v2-ListWebhooksRequest) | [ListWebhooksResponse](#memos-api-v2-ListWebhooksResponse) | ListWebhooks returns a list of webhooks. | +| UpdateWebhook | [UpdateWebhookRequest](#memos-api-v2-UpdateWebhookRequest) | [UpdateWebhookResponse](#memos-api-v2-UpdateWebhookResponse) | UpdateWebhook updates a webhook. | +| DeleteWebhook | [DeleteWebhookRequest](#memos-api-v2-DeleteWebhookRequest) | [DeleteWebhookResponse](#memos-api-v2-DeleteWebhookResponse) | DeleteWebhook deletes a webhook by id. | @@ -2377,8 +2377,8 @@ Used internally for obfuscating the page token. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| GetWorkspaceProfile | [GetWorkspaceProfileRequest](#memos-api-v2-GetWorkspaceProfileRequest) | [GetWorkspaceProfileResponse](#memos-api-v2-GetWorkspaceProfileResponse) | | -| UpdateWorkspaceProfile | [UpdateWorkspaceProfileRequest](#memos-api-v2-UpdateWorkspaceProfileRequest) | [UpdateWorkspaceProfileResponse](#memos-api-v2-UpdateWorkspaceProfileResponse) | | +| GetWorkspaceProfile | [GetWorkspaceProfileRequest](#memos-api-v2-GetWorkspaceProfileRequest) | [GetWorkspaceProfileResponse](#memos-api-v2-GetWorkspaceProfileResponse) | GetWorkspaceProfile returns the workspace profile. | +| UpdateWorkspaceProfile | [UpdateWorkspaceProfileRequest](#memos-api-v2-UpdateWorkspaceProfileRequest) | [UpdateWorkspaceProfileResponse](#memos-api-v2-UpdateWorkspaceProfileResponse) | UpdateWorkspaceProfile updates the workspace profile. | diff --git a/proto/gen/api/v2/activity_service_grpc.pb.go b/proto/gen/api/v2/activity_service_grpc.pb.go index 1def9148..c19172f3 100644 --- a/proto/gen/api/v2/activity_service_grpc.pb.go +++ b/proto/gen/api/v2/activity_service_grpc.pb.go @@ -26,6 +26,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ActivityServiceClient interface { + // GetActivity returns the activity with the given id. GetActivity(ctx context.Context, in *GetActivityRequest, opts ...grpc.CallOption) (*GetActivityResponse, error) } @@ -50,6 +51,7 @@ func (c *activityServiceClient) GetActivity(ctx context.Context, in *GetActivity // All implementations must embed UnimplementedActivityServiceServer // for forward compatibility type ActivityServiceServer interface { + // GetActivity returns the activity with the given id. GetActivity(context.Context, *GetActivityRequest) (*GetActivityResponse, error) mustEmbedUnimplementedActivityServiceServer() } diff --git a/proto/gen/api/v2/inbox_service_grpc.pb.go b/proto/gen/api/v2/inbox_service_grpc.pb.go index 806ae7ad..214addc4 100644 --- a/proto/gen/api/v2/inbox_service_grpc.pb.go +++ b/proto/gen/api/v2/inbox_service_grpc.pb.go @@ -28,8 +28,11 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type InboxServiceClient interface { + // ListInboxes lists inboxes for a user. ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error) + // UpdateInbox updates an inbox. UpdateInbox(ctx context.Context, in *UpdateInboxRequest, opts ...grpc.CallOption) (*UpdateInboxResponse, error) + // DeleteInbox deletes an inbox. DeleteInbox(ctx context.Context, in *DeleteInboxRequest, opts ...grpc.CallOption) (*DeleteInboxResponse, error) } @@ -72,8 +75,11 @@ func (c *inboxServiceClient) DeleteInbox(ctx context.Context, in *DeleteInboxReq // All implementations must embed UnimplementedInboxServiceServer // for forward compatibility type InboxServiceServer interface { + // ListInboxes lists inboxes for a user. ListInboxes(context.Context, *ListInboxesRequest) (*ListInboxesResponse, error) + // UpdateInbox updates an inbox. UpdateInbox(context.Context, *UpdateInboxRequest) (*UpdateInboxResponse, error) + // DeleteInbox deletes an inbox. DeleteInbox(context.Context, *DeleteInboxRequest) (*DeleteInboxResponse, error) mustEmbedUnimplementedInboxServiceServer() } diff --git a/proto/gen/api/v2/resource_service_grpc.pb.go b/proto/gen/api/v2/resource_service_grpc.pb.go index 36044784..3cb293ff 100644 --- a/proto/gen/api/v2/resource_service_grpc.pb.go +++ b/proto/gen/api/v2/resource_service_grpc.pb.go @@ -31,11 +31,17 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ResourceServiceClient interface { + // CreateResource creates a new resource. CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*CreateResourceResponse, error) + // ListResources lists all resources. ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error) + // GetResource returns a resource by id. GetResource(ctx context.Context, in *GetResourceRequest, opts ...grpc.CallOption) (*GetResourceResponse, error) + // GetResourceByName returns a resource by name. GetResourceByName(ctx context.Context, in *GetResourceByNameRequest, opts ...grpc.CallOption) (*GetResourceByNameResponse, error) + // UpdateResource updates a resource. UpdateResource(ctx context.Context, in *UpdateResourceRequest, opts ...grpc.CallOption) (*UpdateResourceResponse, error) + // DeleteResource deletes a resource by id. DeleteResource(ctx context.Context, in *DeleteResourceRequest, opts ...grpc.CallOption) (*DeleteResourceResponse, error) } @@ -105,11 +111,17 @@ func (c *resourceServiceClient) DeleteResource(ctx context.Context, in *DeleteRe // All implementations must embed UnimplementedResourceServiceServer // for forward compatibility type ResourceServiceServer interface { + // CreateResource creates a new resource. CreateResource(context.Context, *CreateResourceRequest) (*CreateResourceResponse, error) + // ListResources lists all resources. ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) + // GetResource returns a resource by id. GetResource(context.Context, *GetResourceRequest) (*GetResourceResponse, error) + // GetResourceByName returns a resource by name. GetResourceByName(context.Context, *GetResourceByNameRequest) (*GetResourceByNameResponse, error) + // UpdateResource updates a resource. UpdateResource(context.Context, *UpdateResourceRequest) (*UpdateResourceResponse, error) + // DeleteResource deletes a resource by id. DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error) mustEmbedUnimplementedResourceServiceServer() } diff --git a/proto/gen/api/v2/tag_service_grpc.pb.go b/proto/gen/api/v2/tag_service_grpc.pb.go index 5b5d33aa..ad203d6a 100644 --- a/proto/gen/api/v2/tag_service_grpc.pb.go +++ b/proto/gen/api/v2/tag_service_grpc.pb.go @@ -31,11 +31,18 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type TagServiceClient interface { + // UpsertTag upserts a tag. UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*UpsertTagResponse, error) + // BatchUpsertTag upserts multiple tags. BatchUpsertTag(ctx context.Context, in *BatchUpsertTagRequest, opts ...grpc.CallOption) (*BatchUpsertTagResponse, error) + // ListTags lists tags. ListTags(ctx context.Context, in *ListTagsRequest, opts ...grpc.CallOption) (*ListTagsResponse, error) + // RenameTag renames a tag. + // All related memos will be updated. RenameTag(ctx context.Context, in *RenameTagRequest, opts ...grpc.CallOption) (*RenameTagResponse, error) + // DeleteTag deletes a tag. DeleteTag(ctx context.Context, in *DeleteTagRequest, opts ...grpc.CallOption) (*DeleteTagResponse, error) + // GetTagSuggestions gets tag suggestions from the user's memos. GetTagSuggestions(ctx context.Context, in *GetTagSuggestionsRequest, opts ...grpc.CallOption) (*GetTagSuggestionsResponse, error) } @@ -105,11 +112,18 @@ func (c *tagServiceClient) GetTagSuggestions(ctx context.Context, in *GetTagSugg // All implementations must embed UnimplementedTagServiceServer // for forward compatibility type TagServiceServer interface { + // UpsertTag upserts a tag. UpsertTag(context.Context, *UpsertTagRequest) (*UpsertTagResponse, error) + // BatchUpsertTag upserts multiple tags. BatchUpsertTag(context.Context, *BatchUpsertTagRequest) (*BatchUpsertTagResponse, error) + // ListTags lists tags. ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) + // RenameTag renames a tag. + // All related memos will be updated. RenameTag(context.Context, *RenameTagRequest) (*RenameTagResponse, error) + // DeleteTag deletes a tag. DeleteTag(context.Context, *DeleteTagRequest) (*DeleteTagResponse, error) + // GetTagSuggestions gets tag suggestions from the user's memos. GetTagSuggestions(context.Context, *GetTagSuggestionsRequest) (*GetTagSuggestionsResponse, error) mustEmbedUnimplementedTagServiceServer() } diff --git a/proto/gen/api/v2/user_service_grpc.pb.go b/proto/gen/api/v2/user_service_grpc.pb.go index 5d911896..d8345427 100644 --- a/proto/gen/api/v2/user_service_grpc.pb.go +++ b/proto/gen/api/v2/user_service_grpc.pb.go @@ -45,7 +45,9 @@ type UserServiceClient interface { UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) // DeleteUser deletes a user. DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) + // GetUserSetting gets the setting of a user. GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*GetUserSettingResponse, error) + // UpdateUserSetting updates the setting of a user. UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UpdateUserSettingResponse, error) // ListUserAccessTokens returns a list of access tokens for a user. ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error) @@ -167,7 +169,9 @@ type UserServiceServer interface { UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) // DeleteUser deletes a user. DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) + // GetUserSetting gets the setting of a user. GetUserSetting(context.Context, *GetUserSettingRequest) (*GetUserSettingResponse, error) + // UpdateUserSetting updates the setting of a user. UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UpdateUserSettingResponse, error) // ListUserAccessTokens returns a list of access tokens for a user. ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error) diff --git a/proto/gen/api/v2/webhook_service_grpc.pb.go b/proto/gen/api/v2/webhook_service_grpc.pb.go index 6d87541a..83c33ed0 100644 --- a/proto/gen/api/v2/webhook_service_grpc.pb.go +++ b/proto/gen/api/v2/webhook_service_grpc.pb.go @@ -30,10 +30,15 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type WebhookServiceClient interface { + // CreateWebhook creates a new webhook. CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*CreateWebhookResponse, error) + // GetWebhook returns a webhook by id. GetWebhook(ctx context.Context, in *GetWebhookRequest, opts ...grpc.CallOption) (*GetWebhookResponse, error) + // ListWebhooks returns a list of webhooks. ListWebhooks(ctx context.Context, in *ListWebhooksRequest, opts ...grpc.CallOption) (*ListWebhooksResponse, error) + // UpdateWebhook updates a webhook. UpdateWebhook(ctx context.Context, in *UpdateWebhookRequest, opts ...grpc.CallOption) (*UpdateWebhookResponse, error) + // DeleteWebhook deletes a webhook by id. DeleteWebhook(ctx context.Context, in *DeleteWebhookRequest, opts ...grpc.CallOption) (*DeleteWebhookResponse, error) } @@ -94,10 +99,15 @@ func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, in *DeleteWebh // All implementations must embed UnimplementedWebhookServiceServer // for forward compatibility type WebhookServiceServer interface { + // CreateWebhook creates a new webhook. CreateWebhook(context.Context, *CreateWebhookRequest) (*CreateWebhookResponse, error) + // GetWebhook returns a webhook by id. GetWebhook(context.Context, *GetWebhookRequest) (*GetWebhookResponse, error) + // ListWebhooks returns a list of webhooks. ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error) + // UpdateWebhook updates a webhook. UpdateWebhook(context.Context, *UpdateWebhookRequest) (*UpdateWebhookResponse, error) + // DeleteWebhook deletes a webhook by id. DeleteWebhook(context.Context, *DeleteWebhookRequest) (*DeleteWebhookResponse, error) mustEmbedUnimplementedWebhookServiceServer() } diff --git a/proto/gen/api/v2/workspace_service_grpc.pb.go b/proto/gen/api/v2/workspace_service_grpc.pb.go index dcae62b3..6fda09cb 100644 --- a/proto/gen/api/v2/workspace_service_grpc.pb.go +++ b/proto/gen/api/v2/workspace_service_grpc.pb.go @@ -27,7 +27,9 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type WorkspaceServiceClient interface { + // GetWorkspaceProfile returns the workspace profile. GetWorkspaceProfile(ctx context.Context, in *GetWorkspaceProfileRequest, opts ...grpc.CallOption) (*GetWorkspaceProfileResponse, error) + // UpdateWorkspaceProfile updates the workspace profile. UpdateWorkspaceProfile(ctx context.Context, in *UpdateWorkspaceProfileRequest, opts ...grpc.CallOption) (*UpdateWorkspaceProfileResponse, error) } @@ -61,7 +63,9 @@ func (c *workspaceServiceClient) UpdateWorkspaceProfile(ctx context.Context, in // All implementations must embed UnimplementedWorkspaceServiceServer // for forward compatibility type WorkspaceServiceServer interface { + // GetWorkspaceProfile returns the workspace profile. GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*GetWorkspaceProfileResponse, error) + // UpdateWorkspaceProfile updates the workspace profile. UpdateWorkspaceProfile(context.Context, *UpdateWorkspaceProfileRequest) (*UpdateWorkspaceProfileResponse, error) mustEmbedUnimplementedWorkspaceServiceServer() }