chore: update services comment

This commit is contained in:
Steven
2024-02-01 21:26:09 +08:00
parent f6f193af2d
commit c342c464a2
17 changed files with 231 additions and 27 deletions

View File

@@ -103,6 +103,10 @@ GetAuthStatus returns the current auth status of the user.
### /api/v2/inboxes ### /api/v2/inboxes
#### GET #### GET
##### Summary
ListInboxes lists inboxes for a user.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -119,6 +123,10 @@ GetAuthStatus returns the current auth status of the user.
### /v2/inboxes ### /v2/inboxes
#### PATCH #### PATCH
##### Summary
UpdateInbox updates an inbox.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -135,6 +143,10 @@ GetAuthStatus returns the current auth status of the user.
### /v2/{name} ### /v2/{name}
#### DELETE #### DELETE
##### Summary
DeleteInbox deletes an inbox.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -434,6 +446,10 @@ ExportMemos exports memos.
### /api/v2/resources ### /api/v2/resources
#### GET #### GET
##### Summary
ListResources lists all resources.
##### Responses ##### Responses
| Code | Description | Schema | | Code | Description | Schema |
@@ -442,6 +458,10 @@ ExportMemos exports memos.
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
#### POST #### POST
##### Summary
CreateResource creates a new resource.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -461,6 +481,10 @@ ExportMemos exports memos.
### /api/v2/resources/{id} ### /api/v2/resources/{id}
#### GET #### GET
##### Summary
GetResource returns a resource by id.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -475,6 +499,10 @@ ExportMemos exports memos.
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
#### DELETE #### DELETE
##### Summary
DeleteResource deletes a resource by id.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -491,6 +519,10 @@ ExportMemos exports memos.
### /api/v2/resources/{name} ### /api/v2/resources/{name}
#### GET #### GET
##### Summary
GetResourceByName returns a resource by name.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -507,6 +539,10 @@ ExportMemos exports memos.
### /api/v2/resources/{resource.id} ### /api/v2/resources/{resource.id}
#### PATCH #### PATCH
##### Summary
UpdateResource updates a resource.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -527,6 +563,10 @@ ExportMemos exports memos.
### /api/v2/tags ### /api/v2/tags
#### GET #### GET
##### Summary
ListTags lists tags.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -541,6 +581,10 @@ ExportMemos exports memos.
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
#### DELETE #### DELETE
##### Summary
DeleteTag deletes a tag.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -556,6 +600,10 @@ ExportMemos exports memos.
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
#### POST #### POST
##### Summary
UpsertTag upserts a tag.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -572,6 +620,10 @@ ExportMemos exports memos.
### /api/v2/tags/suggestion ### /api/v2/tags/suggestion
#### GET #### GET
##### Summary
GetTagSuggestions gets tag suggestions from the user's memos.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -588,6 +640,10 @@ ExportMemos exports memos.
### /api/v2/tags:batchUpsert ### /api/v2/tags:batchUpsert
#### POST #### POST
##### Summary
BatchUpsertTag upserts multiple tags.
##### Responses ##### Responses
| Code | Description | Schema | | Code | Description | Schema |
@@ -598,6 +654,11 @@ ExportMemos exports memos.
### /api/v2/tags:rename ### /api/v2/tags:rename
#### PATCH #### PATCH
##### Summary
RenameTag renames a tag.
All related memos will be updated.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -731,6 +792,10 @@ DeleteUserAccessToken deletes an access token for a user.
### /api/v2/{name}/setting ### /api/v2/{name}/setting
#### GET #### GET
##### Summary
GetUserSetting gets the setting of a user.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -747,6 +812,10 @@ DeleteUserAccessToken deletes an access token for a user.
### /api/v2/{setting.name} ### /api/v2/{setting.name}
#### PATCH #### PATCH
##### Summary
UpdateUserSetting updates the setting of a user.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -808,6 +877,10 @@ CreateUser creates a new user.
### /api/v2/webhooks ### /api/v2/webhooks
#### GET #### GET
##### Summary
ListWebhooks returns a list of webhooks.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -822,6 +895,10 @@ CreateUser creates a new user.
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
#### POST #### POST
##### Summary
CreateWebhook creates a new webhook.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -838,6 +915,10 @@ CreateUser creates a new user.
### /api/v2/webhooks/{id} ### /api/v2/webhooks/{id}
#### GET #### GET
##### Summary
GetWebhook returns a webhook by id.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -852,6 +933,10 @@ CreateUser creates a new user.
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
#### DELETE #### DELETE
##### Summary
DeleteWebhook deletes a webhook by id.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -868,6 +953,10 @@ CreateUser creates a new user.
### /api/v2/webhooks/{webhook.id} ### /api/v2/webhooks/{webhook.id}
#### PATCH #### PATCH
##### Summary
UpdateWebhook updates a webhook.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -888,6 +977,10 @@ CreateUser creates a new user.
### /api/v2/workspace/profile ### /api/v2/workspace/profile
#### GET #### GET
##### Summary
GetWorkspaceProfile returns the workspace profile.
##### Responses ##### Responses
| Code | Description | Schema | | Code | Description | Schema |
@@ -896,6 +989,10 @@ CreateUser creates a new user.
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
#### PATCH #### PATCH
##### Summary
UpdateWorkspaceProfile updates the workspace profile.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
@@ -915,6 +1012,10 @@ CreateUser creates a new user.
### /v2/activities ### /v2/activities
#### GET #### GET
##### Summary
GetActivity returns the activity with the given id.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |

View File

@@ -130,6 +130,7 @@ paths:
- AuthService - AuthService
/api/v2/inboxes: /api/v2/inboxes:
get: get:
summary: ListInboxes lists inboxes for a user.
operationId: InboxService_ListInboxes operationId: InboxService_ListInboxes
responses: responses:
"200": "200":
@@ -503,6 +504,7 @@ paths:
- MemoService - MemoService
/api/v2/resources: /api/v2/resources:
get: get:
summary: ListResources lists all resources.
operationId: ResourceService_ListResources operationId: ResourceService_ListResources
responses: responses:
"200": "200":
@@ -516,6 +518,7 @@ paths:
tags: tags:
- ResourceService - ResourceService
post: post:
summary: CreateResource creates a new resource.
operationId: ResourceService_CreateResource operationId: ResourceService_CreateResource
responses: responses:
"200": "200":
@@ -548,6 +551,7 @@ paths:
- ResourceService - ResourceService
/api/v2/resources/{id}: /api/v2/resources/{id}:
get: get:
summary: GetResource returns a resource by id.
operationId: ResourceService_GetResource operationId: ResourceService_GetResource
responses: responses:
"200": "200":
@@ -567,6 +571,7 @@ paths:
tags: tags:
- ResourceService - ResourceService
delete: delete:
summary: DeleteResource deletes a resource by id.
operationId: ResourceService_DeleteResource operationId: ResourceService_DeleteResource
responses: responses:
"200": "200":
@@ -587,6 +592,7 @@ paths:
- ResourceService - ResourceService
/api/v2/resources/{name}: /api/v2/resources/{name}:
get: get:
summary: GetResourceByName returns a resource by name.
operationId: ResourceService_GetResourceByName operationId: ResourceService_GetResourceByName
responses: responses:
"200": "200":
@@ -606,6 +612,7 @@ paths:
- ResourceService - ResourceService
/api/v2/resources/{resource.id}: /api/v2/resources/{resource.id}:
patch: patch:
summary: UpdateResource updates a resource.
operationId: ResourceService_UpdateResource operationId: ResourceService_UpdateResource
responses: responses:
"200": "200":
@@ -651,6 +658,7 @@ paths:
- ResourceService - ResourceService
/api/v2/tags: /api/v2/tags:
get: get:
summary: ListTags lists tags.
operationId: TagService_ListTags operationId: TagService_ListTags
responses: responses:
"200": "200":
@@ -672,6 +680,7 @@ paths:
tags: tags:
- TagService - TagService
delete: delete:
summary: DeleteTag deletes a tag.
operationId: TagService_DeleteTag operationId: TagService_DeleteTag
responses: responses:
"200": "200":
@@ -697,6 +706,7 @@ paths:
tags: tags:
- TagService - TagService
post: post:
summary: UpsertTag upserts a tag.
operationId: TagService_UpsertTag operationId: TagService_UpsertTag
responses: responses:
"200": "200":
@@ -716,6 +726,7 @@ paths:
- TagService - TagService
/api/v2/tags/suggestion: /api/v2/tags/suggestion:
get: get:
summary: GetTagSuggestions gets tag suggestions from the user's memos.
operationId: TagService_GetTagSuggestions operationId: TagService_GetTagSuggestions
responses: responses:
"200": "200":
@@ -738,6 +749,7 @@ paths:
- TagService - TagService
/api/v2/tags:batchUpsert: /api/v2/tags:batchUpsert:
post: post:
summary: BatchUpsertTag upserts multiple tags.
operationId: TagService_BatchUpsertTag operationId: TagService_BatchUpsertTag
responses: responses:
"200": "200":
@@ -752,6 +764,9 @@ paths:
- TagService - TagService
/api/v2/tags:rename: /api/v2/tags:rename:
patch: patch:
summary: |-
RenameTag renames a tag.
All related memos will be updated.
operationId: TagService_RenameTag operationId: TagService_RenameTag
responses: responses:
"200": "200":
@@ -797,6 +812,7 @@ paths:
- UserService - UserService
/api/v2/webhooks: /api/v2/webhooks:
get: get:
summary: ListWebhooks returns a list of webhooks.
operationId: WebhookService_ListWebhooks operationId: WebhookService_ListWebhooks
responses: responses:
"200": "200":
@@ -816,6 +832,7 @@ paths:
tags: tags:
- WebhookService - WebhookService
post: post:
summary: CreateWebhook creates a new webhook.
operationId: WebhookService_CreateWebhook operationId: WebhookService_CreateWebhook
responses: responses:
"200": "200":
@@ -836,6 +853,7 @@ paths:
- WebhookService - WebhookService
/api/v2/webhooks/{id}: /api/v2/webhooks/{id}:
get: get:
summary: GetWebhook returns a webhook by id.
operationId: WebhookService_GetWebhook operationId: WebhookService_GetWebhook
responses: responses:
"200": "200":
@@ -855,6 +873,7 @@ paths:
tags: tags:
- WebhookService - WebhookService
delete: delete:
summary: DeleteWebhook deletes a webhook by id.
operationId: WebhookService_DeleteWebhook operationId: WebhookService_DeleteWebhook
responses: responses:
"200": "200":
@@ -875,6 +894,7 @@ paths:
- WebhookService - WebhookService
/api/v2/webhooks/{webhook.id}: /api/v2/webhooks/{webhook.id}:
patch: patch:
summary: UpdateWebhook updates a webhook.
operationId: WebhookService_UpdateWebhook operationId: WebhookService_UpdateWebhook
responses: responses:
"200": "200":
@@ -900,6 +920,7 @@ paths:
- WebhookService - WebhookService
/api/v2/workspace/profile: /api/v2/workspace/profile:
get: get:
summary: GetWorkspaceProfile returns the workspace profile.
operationId: WorkspaceService_GetWorkspaceProfile operationId: WorkspaceService_GetWorkspaceProfile
responses: responses:
"200": "200":
@@ -913,6 +934,7 @@ paths:
tags: tags:
- WorkspaceService - WorkspaceService
patch: patch:
summary: UpdateWorkspaceProfile updates the workspace profile.
operationId: WorkspaceService_UpdateWorkspaceProfile operationId: WorkspaceService_UpdateWorkspaceProfile
responses: responses:
"200": "200":
@@ -1062,6 +1084,7 @@ paths:
- UserService - UserService
/api/v2/{name}/setting: /api/v2/{name}/setting:
get: get:
summary: GetUserSetting gets the setting of a user.
operationId: UserService_GetUserSetting operationId: UserService_GetUserSetting
responses: responses:
"200": "200":
@@ -1085,6 +1108,7 @@ paths:
- UserService - UserService
/api/v2/{setting.name}: /api/v2/{setting.name}:
patch: patch:
summary: UpdateUserSetting updates the setting of a user.
operationId: UserService_UpdateUserSetting operationId: UserService_UpdateUserSetting
responses: responses:
"200": "200":
@@ -1200,6 +1224,7 @@ paths:
- UserService - UserService
/v2/activities: /v2/activities:
get: get:
summary: GetActivity returns the activity with the given id.
operationId: ActivityService_GetActivity operationId: ActivityService_GetActivity
responses: responses:
"200": "200":
@@ -1220,6 +1245,7 @@ paths:
- ActivityService - ActivityService
/v2/inboxes: /v2/inboxes:
patch: patch:
summary: UpdateInbox updates an inbox.
operationId: InboxService_UpdateInbox operationId: InboxService_UpdateInbox
responses: responses:
"200": "200":
@@ -1240,6 +1266,7 @@ paths:
- InboxService - InboxService
/v2/{name}: /v2/{name}:
delete: delete:
summary: DeleteInbox deletes an inbox.
operationId: InboxService_DeleteInbox operationId: InboxService_DeleteInbox
responses: responses:
"200": "200":

View File

@@ -8,6 +8,7 @@ import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v2";
service ActivityService { service ActivityService {
// GetActivity returns the activity with the given id.
rpc GetActivity(GetActivityRequest) returns (GetActivityResponse) { rpc GetActivity(GetActivityRequest) returns (GetActivityResponse) {
option (google.api.http) = {get: "/v2/activities"}; option (google.api.http) = {get: "/v2/activities"};
} }

View File

@@ -10,10 +10,11 @@ import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v2";
service InboxService { service InboxService {
// ListInboxes lists inboxes for a user.
rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) { rpc ListInboxes(ListInboxesRequest) returns (ListInboxesResponse) {
option (google.api.http) = {get: "/api/v2/inboxes"}; option (google.api.http) = {get: "/api/v2/inboxes"};
} }
// UpdateInbox updates an inbox.
rpc UpdateInbox(UpdateInboxRequest) returns (UpdateInboxResponse) { rpc UpdateInbox(UpdateInboxRequest) returns (UpdateInboxResponse) {
option (google.api.http) = { option (google.api.http) = {
patch: "/v2/inboxes" patch: "/v2/inboxes"
@@ -21,7 +22,7 @@ service InboxService {
}; };
option (google.api.method_signature) = "inbox,update_mask"; option (google.api.method_signature) = "inbox,update_mask";
} }
// DeleteInbox deletes an inbox.
rpc DeleteInbox(DeleteInboxRequest) returns (DeleteInboxResponse) { rpc DeleteInbox(DeleteInboxRequest) returns (DeleteInboxResponse) {
option (google.api.http) = {delete: "/v2/{name=inboxes/*}"}; option (google.api.http) = {delete: "/v2/{name=inboxes/*}"};
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";

View File

@@ -10,20 +10,25 @@ import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v2";
service ResourceService { service ResourceService {
// CreateResource creates a new resource.
rpc CreateResource(CreateResourceRequest) returns (CreateResourceResponse) { rpc CreateResource(CreateResourceRequest) returns (CreateResourceResponse) {
option (google.api.http) = {post: "/api/v2/resources"}; option (google.api.http) = {post: "/api/v2/resources"};
} }
// ListResources lists all resources.
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) { rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {
option (google.api.http) = {get: "/api/v2/resources"}; option (google.api.http) = {get: "/api/v2/resources"};
} }
// GetResource returns a resource by id.
rpc GetResource(GetResourceRequest) returns (GetResourceResponse) { rpc GetResource(GetResourceRequest) returns (GetResourceResponse) {
option (google.api.http) = {get: "/api/v2/resources/{id}"}; option (google.api.http) = {get: "/api/v2/resources/{id}"};
option (google.api.method_signature) = "id"; option (google.api.method_signature) = "id";
} }
// GetResourceByName returns a resource by name.
rpc GetResourceByName(GetResourceByNameRequest) returns (GetResourceByNameResponse) { rpc GetResourceByName(GetResourceByNameRequest) returns (GetResourceByNameResponse) {
option (google.api.http) = {get: "/api/v2/resources/{name}"}; option (google.api.http) = {get: "/api/v2/resources/{name}"};
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// UpdateResource updates a resource.
rpc UpdateResource(UpdateResourceRequest) returns (UpdateResourceResponse) { rpc UpdateResource(UpdateResourceRequest) returns (UpdateResourceResponse) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/resources/{resource.id}", patch: "/api/v2/resources/{resource.id}",
@@ -31,6 +36,7 @@ service ResourceService {
}; };
option (google.api.method_signature) = "resource,update_mask"; option (google.api.method_signature) = "resource,update_mask";
} }
// DeleteResource deletes a resource by id.
rpc DeleteResource(DeleteResourceRequest) returns (DeleteResourceResponse) { rpc DeleteResource(DeleteResourceRequest) returns (DeleteResourceResponse) {
option (google.api.http) = {delete: "/api/v2/resources/{id}"}; option (google.api.http) = {delete: "/api/v2/resources/{id}"};
option (google.api.method_signature) = "id"; option (google.api.method_signature) = "id";

View File

@@ -7,21 +7,28 @@ import "google/api/annotations.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v2";
service TagService { service TagService {
// UpsertTag upserts a tag.
rpc UpsertTag(UpsertTagRequest) returns (UpsertTagResponse) { rpc UpsertTag(UpsertTagRequest) returns (UpsertTagResponse) {
option (google.api.http) = {post: "/api/v2/tags"}; option (google.api.http) = {post: "/api/v2/tags"};
} }
// BatchUpsertTag upserts multiple tags.
rpc BatchUpsertTag(BatchUpsertTagRequest) returns (BatchUpsertTagResponse) { rpc BatchUpsertTag(BatchUpsertTagRequest) returns (BatchUpsertTagResponse) {
option (google.api.http) = {post: "/api/v2/tags:batchUpsert"}; option (google.api.http) = {post: "/api/v2/tags:batchUpsert"};
} }
// ListTags lists tags.
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
option (google.api.http) = {get: "/api/v2/tags"}; option (google.api.http) = {get: "/api/v2/tags"};
} }
// RenameTag renames a tag.
// All related memos will be updated.
rpc RenameTag(RenameTagRequest) returns (RenameTagResponse) { rpc RenameTag(RenameTagRequest) returns (RenameTagResponse) {
option (google.api.http) = {patch: "/api/v2/tags:rename"}; option (google.api.http) = {patch: "/api/v2/tags:rename"};
} }
// DeleteTag deletes a tag.
rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) { rpc DeleteTag(DeleteTagRequest) returns (DeleteTagResponse) {
option (google.api.http) = {delete: "/api/v2/tags"}; option (google.api.http) = {delete: "/api/v2/tags"};
} }
// GetTagSuggestions gets tag suggestions from the user's memos.
rpc GetTagSuggestions(GetTagSuggestionsRequest) returns (GetTagSuggestionsResponse) { rpc GetTagSuggestions(GetTagSuggestionsRequest) returns (GetTagSuggestionsResponse) {
option (google.api.http) = {get: "/api/v2/tags/suggestion"}; option (google.api.http) = {get: "/api/v2/tags/suggestion"};
} }

View File

@@ -42,10 +42,12 @@ service UserService {
option (google.api.http) = {delete: "/api/v2/{name=users/*}"}; option (google.api.http) = {delete: "/api/v2/{name=users/*}"};
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// GetUserSetting gets the setting of a user.
rpc GetUserSetting(GetUserSettingRequest) returns (GetUserSettingResponse) { rpc GetUserSetting(GetUserSettingRequest) returns (GetUserSettingResponse) {
option (google.api.http) = {get: "/api/v2/{name=users/*}/setting"}; option (google.api.http) = {get: "/api/v2/{name=users/*}/setting"};
option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name";
} }
// UpdateUserSetting updates the setting of a user.
rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UpdateUserSettingResponse) { rpc UpdateUserSetting(UpdateUserSettingRequest) returns (UpdateUserSettingResponse) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/{setting.name=users/*/setting}" patch: "/api/v2/{setting.name=users/*/setting}"

View File

@@ -10,24 +10,29 @@ import "google/protobuf/timestamp.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v2";
service WebhookService { service WebhookService {
// CreateWebhook creates a new webhook.
rpc CreateWebhook(CreateWebhookRequest) returns (CreateWebhookResponse) { rpc CreateWebhook(CreateWebhookRequest) returns (CreateWebhookResponse) {
option (google.api.http) = { option (google.api.http) = {
post: "/api/v2/webhooks" post: "/api/v2/webhooks"
body: "*" body: "*"
}; };
} }
// GetWebhook returns a webhook by id.
rpc GetWebhook(GetWebhookRequest) returns (GetWebhookResponse) { rpc GetWebhook(GetWebhookRequest) returns (GetWebhookResponse) {
option (google.api.http) = {get: "/api/v2/webhooks/{id}"}; option (google.api.http) = {get: "/api/v2/webhooks/{id}"};
} }
// ListWebhooks returns a list of webhooks.
rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) { rpc ListWebhooks(ListWebhooksRequest) returns (ListWebhooksResponse) {
option (google.api.http) = {get: "/api/v2/webhooks"}; option (google.api.http) = {get: "/api/v2/webhooks"};
} }
// UpdateWebhook updates a webhook.
rpc UpdateWebhook(UpdateWebhookRequest) returns (UpdateWebhookResponse) { rpc UpdateWebhook(UpdateWebhookRequest) returns (UpdateWebhookResponse) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/webhooks/{webhook.id}" patch: "/api/v2/webhooks/{webhook.id}"
body: "*" body: "*"
}; };
} }
// DeleteWebhook deletes a webhook by id.
rpc DeleteWebhook(DeleteWebhookRequest) returns (DeleteWebhookResponse) { rpc DeleteWebhook(DeleteWebhookRequest) returns (DeleteWebhookResponse) {
option (google.api.http) = {delete: "/api/v2/webhooks/{id}"}; option (google.api.http) = {delete: "/api/v2/webhooks/{id}"};
} }

View File

@@ -9,9 +9,11 @@ import "google/protobuf/field_mask.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v2";
service WorkspaceService { service WorkspaceService {
// GetWorkspaceProfile returns the workspace profile.
rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (GetWorkspaceProfileResponse) { rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (GetWorkspaceProfileResponse) {
option (google.api.http) = {get: "/api/v2/workspace/profile"}; option (google.api.http) = {get: "/api/v2/workspace/profile"};
} }
// UpdateWorkspaceProfile updates the workspace profile.
rpc UpdateWorkspaceProfile(UpdateWorkspaceProfileRequest) returns (UpdateWorkspaceProfileResponse) { rpc UpdateWorkspaceProfile(UpdateWorkspaceProfileRequest) returns (UpdateWorkspaceProfileResponse) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/workspace/profile", patch: "/api/v2/workspace/profile",

View File

@@ -295,7 +295,7 @@
| Method Name | Request Type | Response Type | Description | | 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. | | 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. | | 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. | | 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) | | | 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 | [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. | | 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. | | 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. | | 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 | | Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------| | ----------- | ------------ | ------------- | ------------|
| ListInboxes | [ListInboxesRequest](#memos-api-v2-ListInboxesRequest) | [ListInboxesResponse](#memos-api-v2-ListInboxesResponse) | | | 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 | [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 | [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 | | Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------| | ----------- | ------------ | ------------- | ------------|
| CreateResource | [CreateResourceRequest](#memos-api-v2-CreateResourceRequest) | [CreateResourceResponse](#memos-api-v2-CreateResourceResponse) | | | 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 | [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 | [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 | [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 | [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 | [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 | | Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------| | ----------- | ------------ | ------------- | ------------|
| UpsertTag | [UpsertTagRequest](#memos-api-v2-UpsertTagRequest) | [UpsertTagResponse](#memos-api-v2-UpsertTagResponse) | | | 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 | [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 | [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 | [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 | [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 | [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 | | Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------| | ----------- | ------------ | ------------- | ------------|
| CreateWebhook | [CreateWebhookRequest](#memos-api-v2-CreateWebhookRequest) | [CreateWebhookResponse](#memos-api-v2-CreateWebhookResponse) | | | 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 | [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 | [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 | [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 | [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 | | Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------| | ----------- | ------------ | ------------- | ------------|
| GetWorkspaceProfile | [GetWorkspaceProfileRequest](#memos-api-v2-GetWorkspaceProfileRequest) | [GetWorkspaceProfileResponse](#memos-api-v2-GetWorkspaceProfileResponse) | | | 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 | [UpdateWorkspaceProfileRequest](#memos-api-v2-UpdateWorkspaceProfileRequest) | [UpdateWorkspaceProfileResponse](#memos-api-v2-UpdateWorkspaceProfileResponse) | UpdateWorkspaceProfile updates the workspace profile. |

View File

@@ -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. // 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 { type ActivityServiceClient interface {
// GetActivity returns the activity with the given id.
GetActivity(ctx context.Context, in *GetActivityRequest, opts ...grpc.CallOption) (*GetActivityResponse, error) 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 // All implementations must embed UnimplementedActivityServiceServer
// for forward compatibility // for forward compatibility
type ActivityServiceServer interface { type ActivityServiceServer interface {
// GetActivity returns the activity with the given id.
GetActivity(context.Context, *GetActivityRequest) (*GetActivityResponse, error) GetActivity(context.Context, *GetActivityRequest) (*GetActivityResponse, error)
mustEmbedUnimplementedActivityServiceServer() mustEmbedUnimplementedActivityServiceServer()
} }

View File

@@ -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. // 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 { type InboxServiceClient interface {
// ListInboxes lists inboxes for a user.
ListInboxes(ctx context.Context, in *ListInboxesRequest, opts ...grpc.CallOption) (*ListInboxesResponse, error) 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) 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) 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 // All implementations must embed UnimplementedInboxServiceServer
// for forward compatibility // for forward compatibility
type InboxServiceServer interface { type InboxServiceServer interface {
// ListInboxes lists inboxes for a user.
ListInboxes(context.Context, *ListInboxesRequest) (*ListInboxesResponse, error) ListInboxes(context.Context, *ListInboxesRequest) (*ListInboxesResponse, error)
// UpdateInbox updates an inbox.
UpdateInbox(context.Context, *UpdateInboxRequest) (*UpdateInboxResponse, error) UpdateInbox(context.Context, *UpdateInboxRequest) (*UpdateInboxResponse, error)
// DeleteInbox deletes an inbox.
DeleteInbox(context.Context, *DeleteInboxRequest) (*DeleteInboxResponse, error) DeleteInbox(context.Context, *DeleteInboxRequest) (*DeleteInboxResponse, error)
mustEmbedUnimplementedInboxServiceServer() mustEmbedUnimplementedInboxServiceServer()
} }

View File

@@ -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. // 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 { type ResourceServiceClient interface {
// CreateResource creates a new resource.
CreateResource(ctx context.Context, in *CreateResourceRequest, opts ...grpc.CallOption) (*CreateResourceResponse, error) 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) 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) 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) 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) 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) 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 // All implementations must embed UnimplementedResourceServiceServer
// for forward compatibility // for forward compatibility
type ResourceServiceServer interface { type ResourceServiceServer interface {
// CreateResource creates a new resource.
CreateResource(context.Context, *CreateResourceRequest) (*CreateResourceResponse, error) CreateResource(context.Context, *CreateResourceRequest) (*CreateResourceResponse, error)
// ListResources lists all resources.
ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error) ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
// GetResource returns a resource by id.
GetResource(context.Context, *GetResourceRequest) (*GetResourceResponse, error) GetResource(context.Context, *GetResourceRequest) (*GetResourceResponse, error)
// GetResourceByName returns a resource by name.
GetResourceByName(context.Context, *GetResourceByNameRequest) (*GetResourceByNameResponse, error) GetResourceByName(context.Context, *GetResourceByNameRequest) (*GetResourceByNameResponse, error)
// UpdateResource updates a resource.
UpdateResource(context.Context, *UpdateResourceRequest) (*UpdateResourceResponse, error) UpdateResource(context.Context, *UpdateResourceRequest) (*UpdateResourceResponse, error)
// DeleteResource deletes a resource by id.
DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error) DeleteResource(context.Context, *DeleteResourceRequest) (*DeleteResourceResponse, error)
mustEmbedUnimplementedResourceServiceServer() mustEmbedUnimplementedResourceServiceServer()
} }

View File

@@ -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. // 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 { type TagServiceClient interface {
// UpsertTag upserts a tag.
UpsertTag(ctx context.Context, in *UpsertTagRequest, opts ...grpc.CallOption) (*UpsertTagResponse, error) 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) 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) 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) 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) 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) 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 // All implementations must embed UnimplementedTagServiceServer
// for forward compatibility // for forward compatibility
type TagServiceServer interface { type TagServiceServer interface {
// UpsertTag upserts a tag.
UpsertTag(context.Context, *UpsertTagRequest) (*UpsertTagResponse, error) UpsertTag(context.Context, *UpsertTagRequest) (*UpsertTagResponse, error)
// BatchUpsertTag upserts multiple tags.
BatchUpsertTag(context.Context, *BatchUpsertTagRequest) (*BatchUpsertTagResponse, error) BatchUpsertTag(context.Context, *BatchUpsertTagRequest) (*BatchUpsertTagResponse, error)
// ListTags lists tags.
ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error) ListTags(context.Context, *ListTagsRequest) (*ListTagsResponse, error)
// RenameTag renames a tag.
// All related memos will be updated.
RenameTag(context.Context, *RenameTagRequest) (*RenameTagResponse, error) RenameTag(context.Context, *RenameTagRequest) (*RenameTagResponse, error)
// DeleteTag deletes a tag.
DeleteTag(context.Context, *DeleteTagRequest) (*DeleteTagResponse, error) DeleteTag(context.Context, *DeleteTagRequest) (*DeleteTagResponse, error)
// GetTagSuggestions gets tag suggestions from the user's memos.
GetTagSuggestions(context.Context, *GetTagSuggestionsRequest) (*GetTagSuggestionsResponse, error) GetTagSuggestions(context.Context, *GetTagSuggestionsRequest) (*GetTagSuggestionsResponse, error)
mustEmbedUnimplementedTagServiceServer() mustEmbedUnimplementedTagServiceServer()
} }

View File

@@ -45,7 +45,9 @@ type UserServiceClient interface {
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
// DeleteUser deletes a user. // DeleteUser deletes a user.
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error) 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) 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) UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UpdateUserSettingResponse, error)
// ListUserAccessTokens returns a list of access tokens for a user. // ListUserAccessTokens returns a list of access tokens for a user.
ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error) ListUserAccessTokens(ctx context.Context, in *ListUserAccessTokensRequest, opts ...grpc.CallOption) (*ListUserAccessTokensResponse, error)
@@ -167,7 +169,9 @@ type UserServiceServer interface {
UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
// DeleteUser deletes a user. // DeleteUser deletes a user.
DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
// GetUserSetting gets the setting of a user.
GetUserSetting(context.Context, *GetUserSettingRequest) (*GetUserSettingResponse, error) GetUserSetting(context.Context, *GetUserSettingRequest) (*GetUserSettingResponse, error)
// UpdateUserSetting updates the setting of a user.
UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UpdateUserSettingResponse, error) UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UpdateUserSettingResponse, error)
// ListUserAccessTokens returns a list of access tokens for a user. // ListUserAccessTokens returns a list of access tokens for a user.
ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error) ListUserAccessTokens(context.Context, *ListUserAccessTokensRequest) (*ListUserAccessTokensResponse, error)

View File

@@ -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. // 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 { type WebhookServiceClient interface {
// CreateWebhook creates a new webhook.
CreateWebhook(ctx context.Context, in *CreateWebhookRequest, opts ...grpc.CallOption) (*CreateWebhookResponse, error) 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) 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) 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) 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) 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 // All implementations must embed UnimplementedWebhookServiceServer
// for forward compatibility // for forward compatibility
type WebhookServiceServer interface { type WebhookServiceServer interface {
// CreateWebhook creates a new webhook.
CreateWebhook(context.Context, *CreateWebhookRequest) (*CreateWebhookResponse, error) CreateWebhook(context.Context, *CreateWebhookRequest) (*CreateWebhookResponse, error)
// GetWebhook returns a webhook by id.
GetWebhook(context.Context, *GetWebhookRequest) (*GetWebhookResponse, error) GetWebhook(context.Context, *GetWebhookRequest) (*GetWebhookResponse, error)
// ListWebhooks returns a list of webhooks.
ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error) ListWebhooks(context.Context, *ListWebhooksRequest) (*ListWebhooksResponse, error)
// UpdateWebhook updates a webhook.
UpdateWebhook(context.Context, *UpdateWebhookRequest) (*UpdateWebhookResponse, error) UpdateWebhook(context.Context, *UpdateWebhookRequest) (*UpdateWebhookResponse, error)
// DeleteWebhook deletes a webhook by id.
DeleteWebhook(context.Context, *DeleteWebhookRequest) (*DeleteWebhookResponse, error) DeleteWebhook(context.Context, *DeleteWebhookRequest) (*DeleteWebhookResponse, error)
mustEmbedUnimplementedWebhookServiceServer() mustEmbedUnimplementedWebhookServiceServer()
} }

View File

@@ -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. // 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 { type WorkspaceServiceClient interface {
// GetWorkspaceProfile returns the workspace profile.
GetWorkspaceProfile(ctx context.Context, in *GetWorkspaceProfileRequest, opts ...grpc.CallOption) (*GetWorkspaceProfileResponse, error) 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) 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 // All implementations must embed UnimplementedWorkspaceServiceServer
// for forward compatibility // for forward compatibility
type WorkspaceServiceServer interface { type WorkspaceServiceServer interface {
// GetWorkspaceProfile returns the workspace profile.
GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*GetWorkspaceProfileResponse, error) GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*GetWorkspaceProfileResponse, error)
// UpdateWorkspaceProfile updates the workspace profile.
UpdateWorkspaceProfile(context.Context, *UpdateWorkspaceProfileRequest) (*UpdateWorkspaceProfileResponse, error) UpdateWorkspaceProfile(context.Context, *UpdateWorkspaceProfileRequest) (*UpdateWorkspaceProfileResponse, error)
mustEmbedUnimplementedWorkspaceServiceServer() mustEmbedUnimplementedWorkspaceServiceServer()
} }