diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index d81873b..df98339 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -46,3 +46,6 @@ plugins: out: gen opt: - markdown,README.md,source_relative + - plugin: buf.build/grpc-ecosystem/openapiv2:v2.19.0 + out: gen + opt: output_format=yaml,allow_merge=true diff --git a/proto/gen/apidocs.swagger.md b/proto/gen/apidocs.swagger.md new file mode 100644 index 0000000..4f28a60 --- /dev/null +++ b/proto/gen/apidocs.swagger.md @@ -0,0 +1,902 @@ +# api/v1/common.proto +## Version: version not set + +--- +## AuthService + +### /api/v1/auth/signin + +#### POST +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| email | query | | No | string | +| password | query | | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1SignInResponse](#v1signinresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/auth/signout + +#### POST +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1SignOutResponse](#v1signoutresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/auth/signup + +#### POST +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| email | query | | No | string | +| nickname | query | | No | string | +| password | query | | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1SignUpResponse](#v1signupresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/auth/status + +#### POST +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetAuthStatusResponse](#v1getauthstatusresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +--- +## CollectionService + +### /api/v1/collections + +#### GET +##### Summary + +ListCollections returns a list of collections. + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1ListCollectionsResponse](#v1listcollectionsresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### POST +##### Summary + +CreateCollection creates a collection. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| collection | body | | Yes | [apiv1Collection](#apiv1collection) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1CreateCollectionResponse](#v1createcollectionresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/collections/{collection.id} + +#### PUT +##### Summary + +UpdateCollection updates a collection. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| collection.id | path | | Yes | integer | +| collection | body | | Yes | { **"creatorId"**: integer, **"createdTime"**: dateTime, **"updatedTime"**: dateTime, **"name"**: string, **"title"**: string, **"description"**: string, **"shortcutIds"**: [ integer ], **"visibility"**: [apiv1Visibility](#apiv1visibility) } | +| updateMask | query | | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1UpdateCollectionResponse](#v1updatecollectionresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/collections/{id} + +#### GET +##### Summary + +GetCollection returns a collection by id. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetCollectionResponse](#v1getcollectionresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### DELETE +##### Summary + +DeleteCollection deletes a collection by id. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1DeleteCollectionResponse](#v1deletecollectionresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +--- +## ShortcutService + +### /api/v1/shortcuts + +#### GET +##### Summary + +ListShortcuts returns a list of shortcuts. + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1ListShortcutsResponse](#v1listshortcutsresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### POST +##### Summary + +CreateShortcut creates a shortcut. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| shortcut | body | | Yes | [apiv1Shortcut](#apiv1shortcut) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1CreateShortcutResponse](#v1createshortcutresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/shortcuts/{id} + +#### GET +##### Summary + +GetShortcut returns a shortcut by id. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetShortcutResponse](#v1getshortcutresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### DELETE +##### Summary + +DeleteShortcut deletes a shortcut by name. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1DeleteShortcutResponse](#v1deleteshortcutresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/shortcuts/{id}/analytics + +#### GET +##### Summary + +GetShortcutAnalytics returns the analytics for a shortcut. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetShortcutAnalyticsResponse](#v1getshortcutanalyticsresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/shortcuts/{shortcut.id} + +#### PUT +##### Summary + +UpdateShortcut updates a shortcut. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| shortcut.id | path | | Yes | integer | +| shortcut | body | | Yes | { **"creatorId"**: integer, **"createdTime"**: dateTime, **"updatedTime"**: dateTime, **"rowStatus"**: [apiv1RowStatus](#apiv1rowstatus), **"name"**: string, **"link"**: string, **"title"**: string, **"tags"**: [ string ], **"description"**: string, **"visibility"**: [apiv1Visibility](#apiv1visibility), **"viewCount"**: integer, **"ogMetadata"**: [apiv1OpenGraphMetadata](#apiv1opengraphmetadata) } | +| updateMask | query | | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1UpdateShortcutResponse](#v1updateshortcutresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +--- +## UserService + +### /api/v1/users + +#### GET +##### Summary + +ListUsers returns a list of users. + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1ListUsersResponse](#v1listusersresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### POST +##### Summary + +CreateUser creates a new user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user | body | | Yes | [v1User](#v1user) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1CreateUserResponse](#v1createuserresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/users/{id} + +#### GET +##### Summary + +GetUser returns a user by id. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetUserResponse](#v1getuserresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### DELETE +##### Summary + +DeleteUser deletes a user by id. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1DeleteUserResponse](#v1deleteuserresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/users/{id}/access_tokens + +#### GET +##### Summary + +ListUserAccessTokens returns a list of access tokens for a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | id is the user id. | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1ListUserAccessTokensResponse](#v1listuseraccesstokensresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### POST +##### Summary + +CreateUserAccessToken creates a new access token for a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | id is the user id. | Yes | integer | +| body | body | | Yes | [UserServiceCreateUserAccessTokenBody](#userservicecreateuseraccesstokenbody) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1CreateUserAccessTokenResponse](#v1createuseraccesstokenresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/users/{id}/access_tokens/{accessToken} + +#### DELETE +##### Summary + +DeleteUserAccessToken deletes an access token for a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | id is the user id. | Yes | integer | +| accessToken | path | access_token is the access token to delete. | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1DeleteUserAccessTokenResponse](#v1deleteuseraccesstokenresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/users/{user.id} + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user.id | path | | Yes | integer | +| user | body | | Yes | { **"rowStatus"**: [apiv1RowStatus](#apiv1rowstatus), **"createdTime"**: dateTime, **"updatedTime"**: dateTime, **"role"**: [v1Role](#v1role), **"email"**: string, **"nickname"**: string, **"password"**: string } | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1UpdateUserResponse](#v1updateuserresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +--- +## UserSettingService + +### /api/v1/users/{id}/settings + +#### GET +##### Summary + +GetUserSetting returns the user setting. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | id is the user id. | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetUserSettingResponse](#v1getusersettingresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### PATCH +##### Summary + +UpdateUserSetting updates the user setting. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | id is the user id. | Yes | integer | +| userSetting | body | user_setting is the user setting to update. | Yes | [apiv1UserSetting](#apiv1usersetting) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1UpdateUserSettingResponse](#v1updateusersettingresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +--- +## WorkspaceService + +### /api/v1/workspace/profile + +#### GET +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetWorkspaceProfileResponse](#v1getworkspaceprofileresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +### /api/v1/workspace/setting + +#### GET +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetWorkspaceSettingResponse](#v1getworkspacesettingresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| setting | body | The user setting. | Yes | [apiv1WorkspaceSetting](#apiv1workspacesetting) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1UpdateWorkspaceSettingResponse](#v1updateworkspacesettingresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +--- +## SubscriptionService + +### /v1/subscription + +#### GET +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1GetSubscriptionResponse](#v1getsubscriptionresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | | Yes | [v1UpdateSubscriptionRequest](#v1updatesubscriptionrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v1UpdateSubscriptionResponse](#v1updatesubscriptionresponse) | +| default | An unexpected error response. | [rpcStatus](#rpcstatus) | + +--- +### Models + +#### GetShortcutAnalyticsResponseAnalyticsItem + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | +| count | integer | | No | + +#### UserServiceCreateUserAccessTokenBody + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | description is the description of the access token. | No | +| expiresAt | dateTime | expires_at is the expiration time of the access token. If expires_at is not set, the access token will never expire. | No | + +#### UserSettingColorTheme + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| UserSettingColorTheme | string | | | + +#### UserSettingLocale + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| UserSettingLocale | string | | | + +#### apiv1AutoBackupWorkspaceSetting + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| enabled | boolean | Whether auto backup is enabled. | No | +| cronExpression | string | The cron expression for auto backup. For example, "0 0 0 ** *" means backup at 00:00:00 every day. See https://en.wikipedia.org/wiki/Cron for more details. | No | +| maxKeep | integer | The maximum number of backups to keep. | No | + +#### apiv1Collection + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| creatorId | integer | | No | +| createdTime | dateTime | | No | +| updatedTime | dateTime | | No | +| name | string | | No | +| title | string | | No | +| description | string | | No | +| shortcutIds | [ integer ] | | No | +| visibility | [apiv1Visibility](#apiv1visibility) | | No | + +#### apiv1OpenGraphMetadata + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| title | string | | No | +| description | string | | No | +| image | string | | No | + +#### apiv1RowStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| apiv1RowStatus | string | | | + +#### apiv1Shortcut + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| creatorId | integer | | No | +| createdTime | dateTime | | No | +| updatedTime | dateTime | | No | +| rowStatus | [apiv1RowStatus](#apiv1rowstatus) | | No | +| name | string | | No | +| link | string | | No | +| title | string | | No | +| tags | [ string ] | | No | +| description | string | | No | +| visibility | [apiv1Visibility](#apiv1visibility) | | No | +| viewCount | integer | | No | +| ogMetadata | [apiv1OpenGraphMetadata](#apiv1opengraphmetadata) | | No | + +#### apiv1UserSetting + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | id is the user id. | No | +| locale | [UserSettingLocale](#usersettinglocale) | locale is the user locale. | No | +| colorTheme | [UserSettingColorTheme](#usersettingcolortheme) | color_theme is the user color theme. | No | + +#### apiv1Visibility + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| apiv1Visibility | string | | | + +#### apiv1WorkspaceSetting + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| licenseKey | string | | No | +| enableSignup | boolean | Whether to enable other users to sign up. | No | +| instanceUrl | string | The instance URL. | No | +| customStyle | string | The custom style. | No | +| customScript | string | The custom script. | No | +| autoBackup | [apiv1AutoBackupWorkspaceSetting](#apiv1autobackupworkspacesetting) | | No | +| defaultVisibility | [apiv1Visibility](#apiv1visibility) | The default visibility of shortcuts and collections. | No | + +#### protobufAny + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| @type | string | | No | + +#### rpcStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| code | integer | | No | +| message | string | | No | +| details | [ [protobufAny](#protobufany) ] | | No | + +#### v1CreateCollectionResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| collection | [apiv1Collection](#apiv1collection) | | No | + +#### v1CreateShortcutResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| shortcut | [apiv1Shortcut](#apiv1shortcut) | | No | + +#### v1CreateUserAccessTokenResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessToken | [v1UserAccessToken](#v1useraccesstoken) | | No | + +#### v1CreateUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v1User](#v1user) | | No | + +#### v1DeleteCollectionResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v1DeleteCollectionResponse | object | | | + +#### v1DeleteShortcutResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v1DeleteShortcutResponse | object | | | + +#### v1DeleteUserAccessTokenResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v1DeleteUserAccessTokenResponse | object | | | + +#### v1DeleteUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v1DeleteUserResponse | object | | | + +#### v1GetAuthStatusResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v1User](#v1user) | | No | + +#### v1GetCollectionByNameResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| collection | [apiv1Collection](#apiv1collection) | | No | + +#### v1GetCollectionResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| collection | [apiv1Collection](#apiv1collection) | | No | + +#### v1GetShortcutAnalyticsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| references | [ [GetShortcutAnalyticsResponseAnalyticsItem](#getshortcutanalyticsresponseanalyticsitem) ] | | No | +| devices | [ [GetShortcutAnalyticsResponseAnalyticsItem](#getshortcutanalyticsresponseanalyticsitem) ] | | No | +| browsers | [ [GetShortcutAnalyticsResponseAnalyticsItem](#getshortcutanalyticsresponseanalyticsitem) ] | | No | + +#### v1GetShortcutByNameResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| shortcut | [apiv1Shortcut](#apiv1shortcut) | | No | + +#### v1GetShortcutResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| shortcut | [apiv1Shortcut](#apiv1shortcut) | | No | + +#### v1GetSubscriptionResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| subscription | [v1Subscription](#v1subscription) | | No | + +#### v1GetUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v1User](#v1user) | | No | + +#### v1GetUserSettingResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| userSetting | [apiv1UserSetting](#apiv1usersetting) | | No | + +#### v1GetWorkspaceProfileResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| profile | [v1WorkspaceProfile](#v1workspaceprofile) | The workspace profile. | No | + +#### v1GetWorkspaceSettingResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| setting | [apiv1WorkspaceSetting](#apiv1workspacesetting) | The user setting. | No | + +#### v1ListCollectionsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| collections | [ [apiv1Collection](#apiv1collection) ] | | No | + +#### v1ListShortcutsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| shortcuts | [ [apiv1Shortcut](#apiv1shortcut) ] | | No | + +#### v1ListUserAccessTokensResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessTokens | [ [v1UserAccessToken](#v1useraccesstoken) ] | | No | + +#### v1ListUsersResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| users | [ [v1User](#v1user) ] | | No | + +#### v1PlanType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v1PlanType | string | | | + +#### v1Role + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v1Role | string | | | + +#### v1SignInResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v1User](#v1user) | | No | + +#### v1SignOutResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v1SignOutResponse | object | | | + +#### v1SignUpResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v1User](#v1user) | | No | + +#### v1Subscription + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| plan | [v1PlanType](#v1plantype) | | No | +| startedTime | dateTime | | No | +| expiresTime | dateTime | | No | + +#### v1UpdateCollectionResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| collection | [apiv1Collection](#apiv1collection) | | No | + +#### v1UpdateShortcutResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| shortcut | [apiv1Shortcut](#apiv1shortcut) | | No | + +#### v1UpdateSubscriptionRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| licenseKey | string | | Yes | + +#### v1UpdateSubscriptionResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| subscription | [v1Subscription](#v1subscription) | | No | + +#### v1UpdateUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v1User](#v1user) | | No | + +#### v1UpdateUserSettingResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| userSetting | [apiv1UserSetting](#apiv1usersetting) | | No | + +#### v1UpdateWorkspaceSettingResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| setting | [apiv1WorkspaceSetting](#apiv1workspacesetting) | The user setting. | No | + +#### v1User + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| rowStatus | [apiv1RowStatus](#apiv1rowstatus) | | No | +| createdTime | dateTime | | No | +| updatedTime | dateTime | | No | +| role | [v1Role](#v1role) | | No | +| email | string | | No | +| nickname | string | | No | +| password | string | | No | + +#### v1UserAccessToken + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessToken | string | | No | +| description | string | | No | +| issuedAt | dateTime | | No | +| expiresAt | dateTime | | No | + +#### v1WorkspaceProfile + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| mode | string | Current workspace mode: dev, prod. | No | +| version | string | Current workspace version. | No | +| plan | [v1PlanType](#v1plantype) | The workspace plan. | No | +| enableSignup | boolean | Whether to enable other users to sign up. | No | +| customStyle | string | The custom style. | No | +| customScript | string | The custom script. | No | diff --git a/proto/gen/apidocs.swagger.yaml b/proto/gen/apidocs.swagger.yaml new file mode 100644 index 0000000..89df169 --- /dev/null +++ b/proto/gen/apidocs.swagger.yaml @@ -0,0 +1,1164 @@ +swagger: "2.0" +info: + title: api/v1/common.proto + version: version not set +tags: + - name: UserService + - name: AuthService + - name: CollectionService + - name: ShortcutService + - name: SubscriptionService + - name: UserSettingService + - name: WorkspaceService +consumes: + - application/json +produces: + - application/json +paths: + /api/v1/auth/signin: + post: + operationId: AuthService_SignIn + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1SignInResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: email + in: query + required: false + type: string + - name: password + in: query + required: false + type: string + tags: + - AuthService + /api/v1/auth/signout: + post: + operationId: AuthService_SignOut + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1SignOutResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - AuthService + /api/v1/auth/signup: + post: + operationId: AuthService_SignUp + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1SignUpResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: email + in: query + required: false + type: string + - name: nickname + in: query + required: false + type: string + - name: password + in: query + required: false + type: string + tags: + - AuthService + /api/v1/auth/status: + post: + operationId: AuthService_GetAuthStatus + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetAuthStatusResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - AuthService + /api/v1/collections: + get: + summary: ListCollections returns a list of collections. + operationId: CollectionService_ListCollections + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1ListCollectionsResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - CollectionService + post: + summary: CreateCollection creates a collection. + operationId: CollectionService_CreateCollection + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1CreateCollectionResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: collection + in: body + required: true + schema: + $ref: '#/definitions/apiv1Collection' + tags: + - CollectionService + /api/v1/collections/{collection.id}: + put: + summary: UpdateCollection updates a collection. + operationId: CollectionService_UpdateCollection + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1UpdateCollectionResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: collection.id + in: path + required: true + type: integer + format: int32 + - name: collection + in: body + required: true + schema: + type: object + properties: + creatorId: + type: integer + format: int32 + createdTime: + type: string + format: date-time + updatedTime: + type: string + format: date-time + name: + type: string + title: + type: string + description: + type: string + shortcutIds: + type: array + items: + type: integer + format: int32 + visibility: + $ref: '#/definitions/apiv1Visibility' + - name: updateMask + in: query + required: false + type: string + tags: + - CollectionService + /api/v1/collections/{id}: + get: + summary: GetCollection returns a collection by id. + operationId: CollectionService_GetCollection + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetCollectionResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + in: path + required: true + type: integer + format: int32 + tags: + - CollectionService + delete: + summary: DeleteCollection deletes a collection by id. + operationId: CollectionService_DeleteCollection + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1DeleteCollectionResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + in: path + required: true + type: integer + format: int32 + tags: + - CollectionService + /api/v1/shortcuts: + get: + summary: ListShortcuts returns a list of shortcuts. + operationId: ShortcutService_ListShortcuts + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1ListShortcutsResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - ShortcutService + post: + summary: CreateShortcut creates a shortcut. + operationId: ShortcutService_CreateShortcut + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1CreateShortcutResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: shortcut + in: body + required: true + schema: + $ref: '#/definitions/apiv1Shortcut' + tags: + - ShortcutService + /api/v1/shortcuts/{id}: + get: + summary: GetShortcut returns a shortcut by id. + operationId: ShortcutService_GetShortcut + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetShortcutResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + in: path + required: true + type: integer + format: int32 + tags: + - ShortcutService + delete: + summary: DeleteShortcut deletes a shortcut by name. + operationId: ShortcutService_DeleteShortcut + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1DeleteShortcutResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + in: path + required: true + type: integer + format: int32 + tags: + - ShortcutService + /api/v1/shortcuts/{id}/analytics: + get: + summary: GetShortcutAnalytics returns the analytics for a shortcut. + operationId: ShortcutService_GetShortcutAnalytics + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetShortcutAnalyticsResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + in: path + required: true + type: integer + format: int32 + tags: + - ShortcutService + /api/v1/shortcuts/{shortcut.id}: + put: + summary: UpdateShortcut updates a shortcut. + operationId: ShortcutService_UpdateShortcut + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1UpdateShortcutResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: shortcut.id + in: path + required: true + type: integer + format: int32 + - name: shortcut + in: body + required: true + schema: + type: object + properties: + creatorId: + type: integer + format: int32 + createdTime: + type: string + format: date-time + updatedTime: + type: string + format: date-time + rowStatus: + $ref: '#/definitions/apiv1RowStatus' + name: + type: string + link: + type: string + title: + type: string + tags: + type: array + items: + type: string + description: + type: string + visibility: + $ref: '#/definitions/apiv1Visibility' + viewCount: + type: integer + format: int32 + ogMetadata: + $ref: '#/definitions/apiv1OpenGraphMetadata' + - name: updateMask + in: query + required: false + type: string + tags: + - ShortcutService + /api/v1/users: + get: + summary: ListUsers returns a list of users. + operationId: UserService_ListUsers + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1ListUsersResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - UserService + post: + summary: CreateUser creates a new user. + operationId: UserService_CreateUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1CreateUserResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: user + in: body + required: true + schema: + $ref: '#/definitions/v1User' + tags: + - UserService + /api/v1/users/{id}: + get: + summary: GetUser returns a user by id. + operationId: UserService_GetUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetUserResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + in: path + required: true + type: integer + format: int32 + tags: + - UserService + delete: + summary: DeleteUser deletes a user by id. + operationId: UserService_DeleteUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1DeleteUserResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + in: path + required: true + type: integer + format: int32 + tags: + - UserService + /api/v1/users/{id}/access_tokens: + get: + summary: ListUserAccessTokens returns a list of access tokens for a user. + operationId: UserService_ListUserAccessTokens + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1ListUserAccessTokensResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + description: id is the user id. + in: path + required: true + type: integer + format: int32 + tags: + - UserService + post: + summary: CreateUserAccessToken creates a new access token for a user. + operationId: UserService_CreateUserAccessToken + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1CreateUserAccessTokenResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + description: id is the user id. + in: path + required: true + type: integer + format: int32 + - name: body + in: body + required: true + schema: + $ref: '#/definitions/UserServiceCreateUserAccessTokenBody' + tags: + - UserService + /api/v1/users/{id}/access_tokens/{accessToken}: + delete: + summary: DeleteUserAccessToken deletes an access token for a user. + operationId: UserService_DeleteUserAccessToken + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1DeleteUserAccessTokenResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + description: id is the user id. + in: path + required: true + type: integer + format: int32 + - name: accessToken + description: access_token is the access token to delete. + in: path + required: true + type: string + tags: + - UserService + /api/v1/users/{id}/settings: + get: + summary: GetUserSetting returns the user setting. + operationId: UserSettingService_GetUserSetting + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetUserSettingResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + description: id is the user id. + in: path + required: true + type: integer + format: int32 + tags: + - UserSettingService + patch: + summary: UpdateUserSetting updates the user setting. + operationId: UserSettingService_UpdateUserSetting + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1UpdateUserSettingResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: id + description: id is the user id. + in: path + required: true + type: integer + format: int32 + - name: userSetting + description: user_setting is the user setting to update. + in: body + required: true + schema: + $ref: '#/definitions/apiv1UserSetting' + tags: + - UserSettingService + /api/v1/users/{user.id}: + patch: + operationId: UserService_UpdateUser + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1UpdateUserResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: user.id + in: path + required: true + type: integer + format: int32 + - name: user + in: body + required: true + schema: + type: object + properties: + rowStatus: + $ref: '#/definitions/apiv1RowStatus' + createdTime: + type: string + format: date-time + updatedTime: + type: string + format: date-time + role: + $ref: '#/definitions/v1Role' + email: + type: string + nickname: + type: string + password: + type: string + tags: + - UserService + /api/v1/workspace/profile: + get: + operationId: WorkspaceService_GetWorkspaceProfile + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetWorkspaceProfileResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - WorkspaceService + /api/v1/workspace/setting: + get: + operationId: WorkspaceService_GetWorkspaceSetting + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetWorkspaceSettingResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - WorkspaceService + patch: + operationId: WorkspaceService_UpdateWorkspaceSetting + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1UpdateWorkspaceSettingResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: setting + description: The user setting. + in: body + required: true + schema: + $ref: '#/definitions/apiv1WorkspaceSetting' + tags: + - WorkspaceService + /v1/subscription: + get: + operationId: SubscriptionService_GetSubscription + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1GetSubscriptionResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + tags: + - SubscriptionService + patch: + operationId: SubscriptionService_UpdateSubscription + responses: + "200": + description: A successful response. + schema: + $ref: '#/definitions/v1UpdateSubscriptionResponse' + default: + description: An unexpected error response. + schema: + $ref: '#/definitions/rpcStatus' + parameters: + - name: body + in: body + required: true + schema: + $ref: '#/definitions/v1UpdateSubscriptionRequest' + tags: + - SubscriptionService +definitions: + GetShortcutAnalyticsResponseAnalyticsItem: + type: object + properties: + name: + type: string + count: + type: integer + format: int32 + UserServiceCreateUserAccessTokenBody: + type: object + properties: + description: + type: string + description: description is the description of the access token. + expiresAt: + type: string + format: date-time + description: |- + expires_at is the expiration time of the access token. + If expires_at is not set, the access token will never expire. + UserSettingColorTheme: + type: string + enum: + - COLOR_THEME_UNSPECIFIED + - COLOR_THEME_SYSTEM + - COLOR_THEME_LIGHT + - COLOR_THEME_DARK + default: COLOR_THEME_UNSPECIFIED + UserSettingLocale: + type: string + enum: + - LOCALE_UNSPECIFIED + - LOCALE_EN + - LOCALE_ZH + default: LOCALE_UNSPECIFIED + apiv1AutoBackupWorkspaceSetting: + type: object + properties: + enabled: + type: boolean + description: Whether auto backup is enabled. + cronExpression: + type: string + description: |- + The cron expression for auto backup. + For example, "0 0 0 * * *" means backup at 00:00:00 every day. + See https://en.wikipedia.org/wiki/Cron for more details. + maxKeep: + type: integer + format: int32 + description: The maximum number of backups to keep. + apiv1Collection: + type: object + properties: + id: + type: integer + format: int32 + creatorId: + type: integer + format: int32 + createdTime: + type: string + format: date-time + updatedTime: + type: string + format: date-time + name: + type: string + title: + type: string + description: + type: string + shortcutIds: + type: array + items: + type: integer + format: int32 + visibility: + $ref: '#/definitions/apiv1Visibility' + apiv1OpenGraphMetadata: + type: object + properties: + title: + type: string + description: + type: string + image: + type: string + apiv1RowStatus: + type: string + enum: + - ROW_STATUS_UNSPECIFIED + - NORMAL + - ARCHIVED + default: ROW_STATUS_UNSPECIFIED + apiv1Shortcut: + type: object + properties: + id: + type: integer + format: int32 + creatorId: + type: integer + format: int32 + createdTime: + type: string + format: date-time + updatedTime: + type: string + format: date-time + rowStatus: + $ref: '#/definitions/apiv1RowStatus' + name: + type: string + link: + type: string + title: + type: string + tags: + type: array + items: + type: string + description: + type: string + visibility: + $ref: '#/definitions/apiv1Visibility' + viewCount: + type: integer + format: int32 + ogMetadata: + $ref: '#/definitions/apiv1OpenGraphMetadata' + apiv1UserSetting: + type: object + properties: + id: + type: integer + format: int32 + description: id is the user id. + locale: + $ref: '#/definitions/UserSettingLocale' + description: locale is the user locale. + colorTheme: + $ref: '#/definitions/UserSettingColorTheme' + description: color_theme is the user color theme. + apiv1Visibility: + type: string + enum: + - VISIBILITY_UNSPECIFIED + - PRIVATE + - WORKSPACE + - PUBLIC + default: VISIBILITY_UNSPECIFIED + apiv1WorkspaceSetting: + type: object + properties: + licenseKey: + type: string + enableSignup: + type: boolean + description: Whether to enable other users to sign up. + instanceUrl: + type: string + description: The instance URL. + customStyle: + type: string + description: The custom style. + customScript: + type: string + description: The custom script. + autoBackup: + $ref: '#/definitions/apiv1AutoBackupWorkspaceSetting' + title: The auto backup setting. (Unimplemented) + defaultVisibility: + $ref: '#/definitions/apiv1Visibility' + description: The default visibility of shortcuts and collections. + protobufAny: + type: object + properties: + '@type': + type: string + additionalProperties: {} + rpcStatus: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + $ref: '#/definitions/protobufAny' + v1CreateCollectionResponse: + type: object + properties: + collection: + $ref: '#/definitions/apiv1Collection' + v1CreateShortcutResponse: + type: object + properties: + shortcut: + $ref: '#/definitions/apiv1Shortcut' + v1CreateUserAccessTokenResponse: + type: object + properties: + accessToken: + $ref: '#/definitions/v1UserAccessToken' + v1CreateUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1User' + v1DeleteCollectionResponse: + type: object + v1DeleteShortcutResponse: + type: object + v1DeleteUserAccessTokenResponse: + type: object + v1DeleteUserResponse: + type: object + v1GetAuthStatusResponse: + type: object + properties: + user: + $ref: '#/definitions/v1User' + v1GetCollectionByNameResponse: + type: object + properties: + collection: + $ref: '#/definitions/apiv1Collection' + v1GetCollectionResponse: + type: object + properties: + collection: + $ref: '#/definitions/apiv1Collection' + v1GetShortcutAnalyticsResponse: + type: object + properties: + references: + type: array + items: + type: object + $ref: '#/definitions/GetShortcutAnalyticsResponseAnalyticsItem' + devices: + type: array + items: + type: object + $ref: '#/definitions/GetShortcutAnalyticsResponseAnalyticsItem' + browsers: + type: array + items: + type: object + $ref: '#/definitions/GetShortcutAnalyticsResponseAnalyticsItem' + v1GetShortcutByNameResponse: + type: object + properties: + shortcut: + $ref: '#/definitions/apiv1Shortcut' + v1GetShortcutResponse: + type: object + properties: + shortcut: + $ref: '#/definitions/apiv1Shortcut' + v1GetSubscriptionResponse: + type: object + properties: + subscription: + $ref: '#/definitions/v1Subscription' + v1GetUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1User' + v1GetUserSettingResponse: + type: object + properties: + userSetting: + $ref: '#/definitions/apiv1UserSetting' + v1GetWorkspaceProfileResponse: + type: object + properties: + profile: + $ref: '#/definitions/v1WorkspaceProfile' + description: The workspace profile. + v1GetWorkspaceSettingResponse: + type: object + properties: + setting: + $ref: '#/definitions/apiv1WorkspaceSetting' + description: The user setting. + v1ListCollectionsResponse: + type: object + properties: + collections: + type: array + items: + type: object + $ref: '#/definitions/apiv1Collection' + v1ListShortcutsResponse: + type: object + properties: + shortcuts: + type: array + items: + type: object + $ref: '#/definitions/apiv1Shortcut' + v1ListUserAccessTokensResponse: + type: object + properties: + accessTokens: + type: array + items: + type: object + $ref: '#/definitions/v1UserAccessToken' + v1ListUsersResponse: + type: object + properties: + users: + type: array + items: + type: object + $ref: '#/definitions/v1User' + v1PlanType: + type: string + enum: + - PLAN_TYPE_UNSPECIFIED + - FREE + - PRO + default: PLAN_TYPE_UNSPECIFIED + v1Role: + type: string + enum: + - ROLE_UNSPECIFIED + - ADMIN + - USER + default: ROLE_UNSPECIFIED + v1SignInResponse: + type: object + properties: + user: + $ref: '#/definitions/v1User' + v1SignOutResponse: + type: object + v1SignUpResponse: + type: object + properties: + user: + $ref: '#/definitions/v1User' + v1Subscription: + type: object + properties: + plan: + $ref: '#/definitions/v1PlanType' + readOnly: true + startedTime: + type: string + format: date-time + readOnly: true + expiresTime: + type: string + format: date-time + readOnly: true + v1UpdateCollectionResponse: + type: object + properties: + collection: + $ref: '#/definitions/apiv1Collection' + v1UpdateShortcutResponse: + type: object + properties: + shortcut: + $ref: '#/definitions/apiv1Shortcut' + v1UpdateSubscriptionRequest: + type: object + properties: + licenseKey: + type: string + required: + - licenseKey + v1UpdateSubscriptionResponse: + type: object + properties: + subscription: + $ref: '#/definitions/v1Subscription' + v1UpdateUserResponse: + type: object + properties: + user: + $ref: '#/definitions/v1User' + v1UpdateUserSettingResponse: + type: object + properties: + userSetting: + $ref: '#/definitions/apiv1UserSetting' + v1UpdateWorkspaceSettingResponse: + type: object + properties: + setting: + $ref: '#/definitions/apiv1WorkspaceSetting' + description: The user setting. + v1User: + type: object + properties: + id: + type: integer + format: int32 + rowStatus: + $ref: '#/definitions/apiv1RowStatus' + createdTime: + type: string + format: date-time + updatedTime: + type: string + format: date-time + role: + $ref: '#/definitions/v1Role' + email: + type: string + nickname: + type: string + password: + type: string + v1UserAccessToken: + type: object + properties: + accessToken: + type: string + description: + type: string + issuedAt: + type: string + format: date-time + expiresAt: + type: string + format: date-time + v1WorkspaceProfile: + type: object + properties: + mode: + type: string + description: 'Current workspace mode: dev, prod.' + version: + type: string + description: Current workspace version. + plan: + $ref: '#/definitions/v1PlanType' + description: The workspace plan. + enableSignup: + type: boolean + description: Whether to enable other users to sign up. + customStyle: + type: string + description: The custom style. + customScript: + type: string + description: The custom script.