From dd9ee44a1ff77995855a6790aafe8dfff25f7e4e Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 29 Jan 2024 22:05:33 +0800 Subject: [PATCH] docs: regenerate swagger --- api/v1/docs.go | 77 +- api/v1/swagger.md | 1719 ++++++++++++++++ api/v1/swagger.yaml | 60 +- api/v2/apidocs.swagger.md | 1606 +++++++++++++++ .../{v2.swagger.yaml => apidocs.swagger.yaml} | 0 docs/api/v1.md | 1816 ----------------- proto/buf.gen.yaml | 2 +- 7 files changed, 3363 insertions(+), 1917 deletions(-) create mode 100644 api/v1/swagger.md create mode 100644 api/v2/apidocs.swagger.md rename api/v2/{v2.swagger.yaml => apidocs.swagger.yaml} (100%) delete mode 100644 docs/api/v1.md diff --git a/api/v1/docs.go b/api/v1/docs.go index b9da4740..1588278e 100644 --- a/api/v1/docs.go +++ b/api/v1/docs.go @@ -838,7 +838,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/api_v1.UpsertMemoRelationRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest" } } ], @@ -992,7 +992,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest" + "$ref": "#/definitions/api_v1.CreateResourceRequest" } } ], @@ -1116,7 +1116,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest" + "$ref": "#/definitions/api_v1.UpdateResourceRequest" } } ], @@ -1155,7 +1155,7 @@ const docTemplate = `{ "200": { "description": "System GetSystemStatus", "schema": { - "$ref": "#/definitions/github_com_usememos_memos_api_v1.SystemStatus" + "$ref": "#/definitions/api_v1.SystemStatus" } }, "401": { @@ -1212,7 +1212,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateStorageRequest" + "$ref": "#/definitions/api_v1.CreateStorageRequest" } } ], @@ -1293,7 +1293,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateStorageRequest" + "$ref": "#/definitions/api_v1.UpdateStorageRequest" } } ], @@ -1799,25 +1799,6 @@ const docTemplate = `{ } } }, - "/explore/rss.xml": { - "get": { - "produces": [ - "text/xml" - ], - "tags": [ - "rss" - ], - "summary": "Get RSS", - "responses": { - "200": { - "description": "RSS" - }, - "500": { - "description": "Failed to get system customized profile | Failed to find memo list | Failed to generate rss" - } - } - } - }, "/o/get/GetImage": { "get": { "produces": [ @@ -1848,37 +1829,6 @@ const docTemplate = `{ } } } - }, - "/u/{id}/rss.xml": { - "get": { - "produces": [ - "text/xml" - ], - "tags": [ - "rss" - ], - "summary": "Get RSS for a user", - "parameters": [ - { - "type": "integer", - "description": "User ID", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "RSS" - }, - "400": { - "description": "User id is not a number" - }, - "500": { - "description": "Failed to get system customized profile | Failed to find memo list | Failed to generate rss" - } - } - } } }, "definitions": { @@ -2228,6 +2178,9 @@ const docTemplate = `{ "path": { "type": "string" }, + "presign": { + "type": "boolean" + }, "region": { "type": "string" }, @@ -2859,6 +2812,9 @@ const docTemplate = `{ "path": { "type": "string" }, + "presign": { + "type": "boolean" + }, "region": { "type": "string" }, @@ -3253,10 +3209,16 @@ const docTemplate = `{ "id": { "type": "integer" }, + "parentID": { + "type": "integer" + }, "pinned": { "description": "Composed fields", "type": "boolean" }, + "resourceName": { + "type": "string" + }, "rowStatus": { "description": "Standard fields", "allOf": [ @@ -3330,6 +3292,9 @@ const docTemplate = `{ "memoID": { "type": "integer" }, + "resourceName": { + "type": "string" + }, "size": { "type": "integer" }, diff --git a/api/v1/swagger.md b/api/v1/swagger.md new file mode 100644 index 00000000..caf612cf --- /dev/null +++ b/api/v1/swagger.md @@ -0,0 +1,1719 @@ +# memos API +A privacy-first, lightweight note-taking service. + +## Version: 1.0 + +**Contact information:** +API Support +https://github.com/orgs/usememos/discussions + +**License:** [MIT License](https://github.com/usememos/memos/blob/main/LICENSE) + +[Find out more about Memos.](https://usememos.com/) + +--- +### /api/v1/auth/signin + +#### POST +##### Summary + +Sign-in to memos. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Sign-in object | Yes | [github_com_usememos_memos_api_v1.SignIn](#github_com_usememos_memos_api_v1signin) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | User information | [store.User](#storeuser) | +| 400 | Malformatted signin request | | +| 401 | Password login is deactivated \| Incorrect login credentials, please try again | | +| 403 | User has been archived with username %s | | +| 500 | Failed to find system setting \| Failed to unmarshal system setting \| Incorrect login credentials, please try again \| Failed to generate tokens \| Failed to create activity | | + +### /api/v1/auth/signin/sso + +#### POST +##### Summary + +Sign-in to memos using SSO. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | SSO sign-in object | Yes | [github_com_usememos_memos_api_v1.SSOSignIn](#github_com_usememos_memos_api_v1ssosignin) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | User information | [store.User](#storeuser) | +| 400 | Malformatted signin request | | +| 401 | Access denied, identifier does not match the filter. | | +| 403 | User has been archived with username {username} | | +| 404 | Identity provider not found | | +| 500 | Failed to find identity provider \| Failed to create identity provider instance \| Failed to exchange token \| Failed to get user info \| Failed to compile identifier filter \| Incorrect login credentials, please try again \| Failed to generate random password \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity | | + +### /api/v1/auth/signout + +#### POST +##### Summary + +Sign-out from memos. + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Sign-out success | boolean | + +### /api/v1/auth/signup + +#### POST +##### Summary + +Sign-up to memos. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Sign-up object | Yes | [github_com_usememos_memos_api_v1.SignUp](#github_com_usememos_memos_api_v1signup) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | User information | [store.User](#storeuser) | +| 400 | Malformatted signup request \| Failed to find users | | +| 401 | signup is disabled | | +| 403 | Forbidden | | +| 404 | Not found | | +| 500 | Failed to find system setting \| Failed to unmarshal system setting allow signup \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity | | + +--- +### /api/v1/idp + +#### GET +##### Summary + +Get a list of identity providers + +##### Description + +*clientSecret is only available for host user + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | List of available identity providers | [ [github_com_usememos_memos_api_v1.IdentityProvider](#github_com_usememos_memos_api_v1identityprovider) ] | +| 500 | Failed to find identity provider list \| Failed to find user | | + +#### POST +##### Summary + +Create Identity Provider + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Identity provider information | Yes | [github_com_usememos_memos_api_v1.CreateIdentityProviderRequest](#github_com_usememos_memos_api_v1createidentityproviderrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Identity provider information | [store.IdentityProvider](#storeidentityprovider) | +| 400 | Malformatted post identity provider request | | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to create identity provider | | + +### /api/v1/idp/{idpId} + +#### DELETE +##### Summary + +Delete an identity provider by ID + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| idpId | path | Identity Provider ID | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Identity Provider deleted | boolean | +| 400 | ID is not a number: %s \| Malformatted patch identity provider request | | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to patch identity provider | | + +#### GET +##### Summary + +Get an identity provider by ID + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| idpId | path | Identity provider ID | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Requested identity provider | [store.IdentityProvider](#storeidentityprovider) | +| 400 | ID is not a number: %s | | +| 401 | Missing user in session \| Unauthorized | | +| 404 | Identity provider not found | | +| 500 | Failed to find identity provider list \| Failed to find user | | + +#### PATCH +##### Summary + +Update an identity provider by ID + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| idpId | path | Identity Provider ID | Yes | integer | +| body | body | Patched identity provider information | Yes | [github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest](#github_com_usememos_memos_api_v1updateidentityproviderrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Patched identity provider | [store.IdentityProvider](#storeidentityprovider) | +| 400 | ID is not a number: %s \| Malformatted patch identity provider request | | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to patch identity provider | | + +--- +### /api/v1/memo + +#### GET +##### Summary + +Get a list of memos matching optional filters + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| creatorId | query | Creator ID | No | integer | +| creatorUsername | query | Creator username | No | string | +| rowStatus | query | Row status | No | string | +| pinned | query | Pinned | No | boolean | +| tag | query | Search for tag. Do not append # | No | string | +| content | query | Search for content | No | string | +| limit | query | Limit | No | integer | +| offset | query | Offset | No | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo list | [ [store.Memo](#storememo) ] | +| 400 | Missing user to find memo | | +| 500 | Failed to get memo display with updated ts setting value \| Failed to fetch memo list \| Failed to compose memo response | | + +#### POST +##### Summary + +Create a memo + +##### Description + +Visibility can be PUBLIC, PROTECTED or PRIVATE +*You should omit fields to use their default values + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.CreateMemoRequest](#github_com_usememos_memos_api_v1creatememorequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Stored memo | [store.Memo](#storememo) | +| 400 | Malformatted post memo request \| Content size overflow, up to 1MB | | +| 401 | Missing user in session | | +| 404 | User not found \| Memo not found: %d | | +| 500 | Failed to find user setting \| Failed to unmarshal user setting value \| Failed to find system setting \| Failed to unmarshal system setting \| Failed to find user \| Failed to create memo \| Failed to create activity \| Failed to upsert memo resource \| Failed to upsert memo relation \| Failed to compose memo \| Failed to compose memo response | | + +### /api/v1/memo/{memoId} + +#### DELETE +##### Summary + +Delete memo by ID + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| memoId | path | Memo ID to delete | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo deleted | boolean | +| 400 | ID is not a number: %s | | +| 401 | Missing user in session \| Unauthorized | | +| 404 | Memo not found: %d | | +| 500 | Failed to find memo \| Failed to delete memo ID: %v | | + +#### GET +##### Summary + +Get memo by ID + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| memoId | path | Memo ID | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo list | [ [store.Memo](#storememo) ] | +| 400 | ID is not a number: %s | | +| 401 | Missing user in session | | +| 403 | this memo is private only \| this memo is protected, missing user in session | | +| 404 | Memo not found: %d | | +| 500 | Failed to find memo by ID: %v \| Failed to compose memo response | | + +#### PATCH +##### Summary + +Update a memo + +##### Description + +Visibility can be PUBLIC, PROTECTED or PRIVATE +*You should omit fields to use their default values + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| memoId | path | ID of memo to update | Yes | integer | +| body | body | Patched object. | Yes | [github_com_usememos_memos_api_v1.PatchMemoRequest](#github_com_usememos_memos_api_v1patchmemorequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Stored memo | [store.Memo](#storememo) | +| 400 | ID is not a number: %s \| Malformatted patch memo request \| Content size overflow, up to 1MB | | +| 401 | Missing user in session \| Unauthorized | | +| 404 | Memo not found: %d | | +| 500 | Failed to find memo \| Failed to patch memo \| Failed to upsert memo resource \| Failed to delete memo resource \| Failed to compose memo response | | + +### /api/v1/memo/all + +#### GET +##### Summary + +Get a list of public memos matching optional filters + +##### Description + +This should also list protected memos if the user is logged in +Authentication is optional + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| limit | query | Limit | No | integer | +| offset | query | Offset | No | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo list | [ [store.Memo](#storememo) ] | +| 500 | Failed to get memo display with updated ts setting value \| Failed to fetch all memo list \| Failed to compose memo response | | + +### /api/v1/memo/stats + +#### GET +##### Summary + +Get memo stats by creator ID or username + +##### Description + +Used to generate the heatmap + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| creatorId | query | Creator ID | No | integer | +| creatorUsername | query | Creator username | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo createdTs list | [ integer ] | +| 400 | Missing user id to find memo | | +| 500 | Failed to get memo display with updated ts setting value \| Failed to find memo list \| Failed to compose memo response | | + +--- +### /api/v1/memo/{memoId}/organizer + +#### POST +##### Summary + +Organize memo (pin/unpin) + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| memoId | path | ID of memo to organize | Yes | integer | +| body | body | Memo organizer object | Yes | [github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest](#github_com_usememos_memos_api_v1upsertmemoorganizerrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo information | [store.Memo](#storememo) | +| 400 | ID is not a number: %s \| Malformatted post memo organizer request | | +| 401 | Missing user in session \| Unauthorized | | +| 404 | Memo not found: %v | | +| 500 | Failed to find memo \| Failed to upsert memo organizer \| Failed to find memo by ID: %v \| Failed to compose memo response | | + +--- +### /api/v1/memo/{memoId}/relation + +#### GET +##### Summary + +Get a list of Memo Relations + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| memoId | path | ID of memo to find relations | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo relation information list | [ [store.MemoRelation](#storememorelation) ] | +| 400 | ID is not a number: %s | | +| 500 | Failed to list memo relations | | + +#### POST +##### Summary + +Create Memo Relation + +##### Description + +Create a relation between two memos + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| memoId | path | ID of memo to relate | Yes | integer | +| body | body | Memo relation object | Yes | [github_com_usememos_memos_api_v1.UpsertMemoRelationRequest](#github_com_usememos_memos_api_v1upsertmemorelationrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo relation information | [store.MemoRelation](#storememorelation) | +| 400 | ID is not a number: %s \| Malformatted post memo relation request | | +| 500 | Failed to upsert memo relation | | + +### /api/v1/memo/{memoId}/relation/{relatedMemoId}/type/{relationType} + +#### DELETE +##### Summary + +Delete a Memo Relation + +##### Description + +Removes a relation between two memos + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| memoId | path | ID of memo to find relations | Yes | integer | +| relatedMemoId | path | ID of memo to remove relation to | Yes | integer | +| relationType | path | Type of relation to remove | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Memo relation deleted | boolean | +| 400 | Memo ID is not a number: %s \| Related memo ID is not a number: %s | | +| 500 | Failed to delete memo relation | | + +--- +### /api/v1/ping + +#### GET +##### Summary + +Ping the system + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | If succeed to ping the system | boolean | + +### /api/v1/status + +#### GET +##### Summary + +Get system GetSystemStatus + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | System GetSystemStatus | [api_v1.SystemStatus](#api_v1systemstatus) | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find host user \| Failed to find system setting list \| Failed to unmarshal system setting customized profile value | | + +### /api/v1/system/vacuum + +#### POST +##### Summary + +Vacuum the database + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Database vacuumed | boolean | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to ExecVacuum database | | + +--- +### /api/v1/resource + +#### GET +##### Summary + +Get a list of resources + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| limit | query | Limit | No | integer | +| offset | query | Offset | No | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Resource list | [ [store.Resource](#storeresource) ] | +| 401 | Missing user in session | | +| 500 | Failed to fetch resource list | | + +#### POST +##### Summary + +Create resource + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Request object. | Yes | [api_v1.CreateResourceRequest](#api_v1createresourcerequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Created resource | [store.Resource](#storeresource) | +| 400 | Malformatted post resource request \| Invalid external link \| Invalid external link scheme \| Failed to request %s \| Failed to read %s \| Failed to read mime from %s | | +| 401 | Missing user in session | | +| 500 | Failed to save resource \| Failed to create resource \| Failed to create activity | | + +### /api/v1/resource/{resourceId} + +#### DELETE +##### Summary + +Delete a resource + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| resourceId | path | Resource ID | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Resource deleted | boolean | +| 400 | ID is not a number: %s | | +| 401 | Missing user in session | | +| 404 | Resource not found: %d | | +| 500 | Failed to find resource \| Failed to delete resource | | + +#### PATCH +##### Summary + +Update a resource + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| resourceId | path | Resource ID | Yes | integer | +| patch | body | Patch resource request | Yes | [api_v1.UpdateResourceRequest](#api_v1updateresourcerequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Updated resource | [store.Resource](#storeresource) | +| 400 | ID is not a number: %s \| Malformatted patch resource request | | +| 401 | Missing user in session \| Unauthorized | | +| 404 | Resource not found: %d | | +| 500 | Failed to find resource \| Failed to patch resource | | + +### /api/v1/resource/blob + +#### POST +##### Summary + +Upload resource + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| file | formData | File to upload | Yes | file | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Created resource | [store.Resource](#storeresource) | +| 400 | Upload file not found \| File size exceeds allowed limit of %d MiB \| Failed to parse upload data | | +| 401 | Missing user in session | | +| 500 | Failed to get uploading file \| Failed to open file \| Failed to save resource \| Failed to create resource \| Failed to create activity | | + +--- +### /api/v1/storage + +#### GET +##### Summary + +Get a list of storages + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | List of storages | [ [store.Storage](#storestorage) ] | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to convert storage | | + +#### POST +##### Summary + +Create storage + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Request object. | Yes | [api_v1.CreateStorageRequest](#api_v1createstoragerequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Created storage | [store.Storage](#storestorage) | +| 400 | Malformatted post storage request | | +| 401 | Missing user in session | | +| 500 | Failed to find user \| Failed to create storage \| Failed to convert storage | | + +### /api/v1/storage/{storageId} + +#### DELETE +##### Summary + +Delete a storage + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| storageId | path | Storage ID | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Storage deleted | boolean | +| 400 | ID is not a number: %s \| Storage service %d is using | | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to find storage \| Failed to unmarshal storage service id \| Failed to delete storage | | + +#### PATCH +##### Summary + +Update a storage + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| storageId | path | Storage ID | Yes | integer | +| patch | body | Patch request | Yes | [api_v1.UpdateStorageRequest](#api_v1updatestoragerequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Updated resource | [store.Storage](#storestorage) | +| 400 | ID is not a number: %s \| Malformatted patch storage request \| Malformatted post storage request | | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to patch storage \| Failed to convert storage | | + +--- +### /api/v1/system/setting + +#### GET +##### Summary + +Get a list of system settings + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | System setting list | [ [api_v1.SystemSetting](#api_v1systemsetting) ] | +| 401 | Missing user in session \| Unauthorized | | +| 500 | Failed to find user \| Failed to find system setting list | | + +#### POST +##### Summary + +Create system setting + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Request object. | Yes | [api_v1.UpsertSystemSettingRequest](#api_v1upsertsystemsettingrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Created system setting | [store.SystemSetting](#storesystemsetting) | +| 400 | Malformatted post system setting request \| invalid system setting | | +| 401 | Missing user in session \| Unauthorized | | +| 403 | Cannot disable passwords if no SSO identity provider is configured. | | +| 500 | Failed to find user \| Failed to upsert system setting | | + +--- +### /api/v1/tag + +#### GET +##### Summary + +Get a list of tags + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Tag list | [ string ] | +| 400 | Missing user id to find tag | | +| 500 | Failed to find tag list | | + +#### POST +##### Summary + +Create a tag + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.UpsertTagRequest](#github_com_usememos_memos_api_v1upserttagrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Created tag name | string | +| 400 | Malformatted post tag request \| Tag name shouldn't be empty | | +| 401 | Missing user in session | | +| 500 | Failed to upsert tag \| Failed to create activity | | + +### /api/v1/tag/delete + +#### POST +##### Summary + +Delete a tag + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.DeleteTagRequest](#github_com_usememos_memos_api_v1deletetagrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Tag deleted | boolean | +| 400 | Malformatted post tag request \| Tag name shouldn't be empty | | +| 401 | Missing user in session | | +| 500 | Failed to delete tag name: %v | | + +### /api/v1/tag/suggestion + +#### GET +##### Summary + +Get a list of tags suggested from other memos contents + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Tag list | [ string ] | +| 400 | Missing user session | | +| 500 | Failed to find memo list \| Failed to find tag list | | + +--- +### /api/v1/user + +#### GET +##### Summary + +Get a list of users + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | User list | [ [store.User](#storeuser) ] | +| 500 | Failed to fetch user list | | + +#### POST +##### Summary + +Create a user + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | Request object | Yes | [github_com_usememos_memos_api_v1.CreateUserRequest](#github_com_usememos_memos_api_v1createuserrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Created user | [store.User](#storeuser) | +| 400 | Malformatted post user request \| Invalid user create format | | +| 401 | Missing auth session \| Unauthorized to create user | | +| 403 | Could not create host user | | +| 500 | Failed to find user by id \| Failed to generate password hash \| Failed to create user \| Failed to create activity | | + +### /api/v1/user/{id} + +#### DELETE +##### Summary + +Delete a user + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | User ID | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | User deleted | boolean | +| 400 | ID is not a number: %s \| Current session user not found with ID: %d | | +| 401 | Missing user in session | | +| 403 | Unauthorized to delete user | | +| 500 | Failed to find user \| Failed to delete user | | + +#### GET +##### Summary + +Get user by id + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | User ID | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Requested user | [store.User](#storeuser) | +| 400 | Malformatted user id | | +| 404 | User not found | | +| 500 | Failed to find user | | + +#### PATCH +##### Summary + +Update a user + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | User ID | Yes | string | +| patch | body | Patch request | Yes | [github_com_usememos_memos_api_v1.UpdateUserRequest](#github_com_usememos_memos_api_v1updateuserrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Updated user | [store.User](#storeuser) | +| 400 | ID is not a number: %s \| Current session user not found with ID: %d \| Malformatted patch user request \| Invalid update user request | | +| 401 | Missing user in session | | +| 403 | Unauthorized to update user | | +| 500 | Failed to find user \| Failed to generate password hash \| Failed to patch user \| Failed to find userSettingList | | + +### /api/v1/user/me + +#### GET +##### Summary + +Get current user + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Current user | [store.User](#storeuser) | +| 401 | Missing auth session | | +| 500 | Failed to find user \| Failed to find userSettingList | | + +### /api/v1/user/name/{username} + +#### GET +##### Summary + +Get user by username + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| username | path | Username | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | Requested user | [store.User](#storeuser) | +| 404 | User not found | | +| 500 | Failed to find user | | + +--- +### /o/get/GetImage + +#### GET +##### Summary + +Get GetImage from URL + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| url | query | Image url | Yes | string | + +##### Responses + +| Code | Description | +| ---- | ----------- | +| 200 | Image | +| 400 | Missing GetImage url \| Wrong url \| Failed to get GetImage url: %s | +| 500 | Failed to write GetImage blob | + +--- +### Models + +#### api_v1.CreateIdentityProviderRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [api_v1.IdentityProviderConfig](#api_v1identityproviderconfig) | | No | +| identifierFilter | string | | No | +| name | string | | No | +| type | [api_v1.IdentityProviderType](#api_v1identityprovidertype) | | No | + +#### api_v1.CreateMemoRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | +| createdTs | integer | | No | +| relationList | [ [api_v1.UpsertMemoRelationRequest](#api_v1upsertmemorelationrequest) ] | | No | +| resourceIdList | [ integer ] | Related fields | No | +| visibility | [api_v1.Visibility](#api_v1visibility) | Domain specific fields | No | + +#### api_v1.CreateResourceRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| externalLink | string | | No | +| filename | string | | No | +| type | string | | No | + +#### api_v1.CreateStorageRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [api_v1.StorageConfig](#api_v1storageconfig) | | No | +| name | string | | No | +| type | [api_v1.StorageType](#api_v1storagetype) | | No | + +#### api_v1.CreateUserRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| email | string | | No | +| nickname | string | | No | +| password | string | | No | +| role | [api_v1.Role](#api_v1role) | | No | +| username | string | | No | + +#### api_v1.CustomizedProfile + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| appearance | string | Appearance is the server default appearance. | No | +| description | string | Description is the server description. | No | +| externalUrl | string | ExternalURL is the external url of server. e.g. https://usermemos.com | No | +| locale | string | Locale is the server default locale. | No | +| logoUrl | string | LogoURL is the url of logo image. | No | +| name | string | Name is the server name, default is `memos` | No | + +#### api_v1.DeleteTagRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | + +#### api_v1.FieldMapping + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| displayName | string | | No | +| email | string | | No | +| identifier | string | | No | + +#### api_v1.IdentityProvider + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [api_v1.IdentityProviderConfig](#api_v1identityproviderconfig) | | No | +| id | integer | | No | +| identifierFilter | string | | No | +| name | string | | No | +| type | [api_v1.IdentityProviderType](#api_v1identityprovidertype) | | No | + +#### api_v1.IdentityProviderConfig + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| oauth2Config | [api_v1.IdentityProviderOAuth2Config](#api_v1identityprovideroauth2config) | | No | + +#### api_v1.IdentityProviderOAuth2Config + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| authUrl | string | | No | +| clientId | string | | No | +| clientSecret | string | | No | +| fieldMapping | [api_v1.FieldMapping](#api_v1fieldmapping) | | No | +| scopes | [ string ] | | No | +| tokenUrl | string | | No | +| userInfoUrl | string | | No | + +#### api_v1.IdentityProviderType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| api_v1.IdentityProviderType | string | | | + +#### api_v1.MemoRelationType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| api_v1.MemoRelationType | string | | | + +#### api_v1.PatchMemoRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | Domain specific fields | No | +| createdTs | integer | Standard fields | No | +| relationList | [ [api_v1.UpsertMemoRelationRequest](#api_v1upsertmemorelationrequest) ] | | No | +| resourceIdList | [ integer ] | Related fields | No | +| rowStatus | [api_v1.RowStatus](#api_v1rowstatus) | | No | +| updatedTs | integer | | No | +| visibility | [api_v1.Visibility](#api_v1visibility) | | No | + +#### api_v1.Role + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| api_v1.Role | string | | | + +#### api_v1.RowStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| api_v1.RowStatus | string | | | + +#### api_v1.SSOSignIn + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| code | string | | No | +| identityProviderId | integer | | No | +| redirectUri | string | | No | + +#### api_v1.SignIn + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| password | string | | No | +| remember | boolean | | No | +| username | string | | No | + +#### api_v1.SignUp + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| password | string | | No | +| username | string | | No | + +#### api_v1.StorageConfig + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| s3Config | [api_v1.StorageS3Config](#api_v1storages3config) | | No | + +#### api_v1.StorageS3Config + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessKey | string | | No | +| bucket | string | | No | +| endPoint | string | | No | +| path | string | | No | +| presign | boolean | | No | +| region | string | | No | +| secretKey | string | | No | +| urlPrefix | string | | No | +| urlSuffix | string | | No | + +#### api_v1.StorageType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| api_v1.StorageType | string | | | + +#### api_v1.SystemSetting + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| name | [api_v1.SystemSettingName](#api_v1systemsettingname) | | No | +| value | string | Value is a JSON string with basic value. | No | + +#### api_v1.SystemSettingName + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| api_v1.SystemSettingName | string | | | + +#### api_v1.SystemStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| additionalScript | string | Additional script. | No | +| additionalStyle | string | Additional style. | No | +| allowSignUp | boolean | System settings Allow sign up. | No | +| customizedProfile | [api_v1.CustomizedProfile](#api_v1customizedprofile) | Customized server profile, including server name and external url. | No | +| dbSize | integer | | No | +| disablePasswordLogin | boolean | Disable password login. | No | +| disablePublicMemos | boolean | Disable public memos. | No | +| host | [api_v1.User](#api_v1user) | | No | +| localStoragePath | string | Local storage path. | No | +| maxUploadSizeMiB | integer | Max upload size. | No | +| memoDisplayWithUpdatedTs | boolean | Memo display with updated timestamp. | No | +| profile | [profile.Profile](#profileprofile) | | No | +| storageServiceId | integer | Storage service ID. | No | + +#### api_v1.UpdateIdentityProviderRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [api_v1.IdentityProviderConfig](#api_v1identityproviderconfig) | | No | +| identifierFilter | string | | No | +| name | string | | No | +| type | [api_v1.IdentityProviderType](#api_v1identityprovidertype) | | No | + +#### api_v1.UpdateResourceRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| filename | string | | No | + +#### api_v1.UpdateStorageRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [api_v1.StorageConfig](#api_v1storageconfig) | | No | +| name | string | | No | +| type | [api_v1.StorageType](#api_v1storagetype) | | No | + +#### api_v1.UpdateUserRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| avatarUrl | string | | No | +| email | string | | No | +| nickname | string | | No | +| password | string | | No | +| rowStatus | [api_v1.RowStatus](#api_v1rowstatus) | | No | +| username | string | | No | + +#### api_v1.UpsertMemoOrganizerRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| pinned | boolean | | No | + +#### api_v1.UpsertMemoRelationRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| relatedMemoId | integer | | No | +| type | [api_v1.MemoRelationType](#api_v1memorelationtype) | | No | + +#### api_v1.UpsertSystemSettingRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| name | [api_v1.SystemSettingName](#api_v1systemsettingname) | | No | +| value | string | | No | + +#### api_v1.UpsertTagRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | + +#### api_v1.User + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| avatarUrl | string | | No | +| createdTs | integer | | No | +| email | string | | No | +| id | integer | | No | +| nickname | string | | No | +| role | [api_v1.Role](#api_v1role) | | No | +| rowStatus | [api_v1.RowStatus](#api_v1rowstatus) | Standard fields | No | +| updatedTs | integer | | No | +| username | string | Domain specific fields | No | + +#### api_v1.Visibility + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| api_v1.Visibility | string | | | + +#### github_com_usememos_memos_api_v1.CreateIdentityProviderRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [github_com_usememos_memos_api_v1.IdentityProviderConfig](#github_com_usememos_memos_api_v1identityproviderconfig) | | No | +| identifierFilter | string | | No | +| name | string | | No | +| type | [github_com_usememos_memos_api_v1.IdentityProviderType](#github_com_usememos_memos_api_v1identityprovidertype) | | No | + +#### github_com_usememos_memos_api_v1.CreateMemoRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | +| createdTs | integer | | No | +| relationList | [ [github_com_usememos_memos_api_v1.UpsertMemoRelationRequest](#github_com_usememos_memos_api_v1upsertmemorelationrequest) ] | | No | +| resourceIdList | [ integer ] | Related fields | No | +| visibility | [github_com_usememos_memos_api_v1.Visibility](#github_com_usememos_memos_api_v1visibility) | Domain specific fields | No | + +#### github_com_usememos_memos_api_v1.CreateResourceRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| externalLink | string | | No | +| filename | string | | No | +| type | string | | No | + +#### github_com_usememos_memos_api_v1.CreateStorageRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [github_com_usememos_memos_api_v1.StorageConfig](#github_com_usememos_memos_api_v1storageconfig) | | No | +| name | string | | No | +| type | [github_com_usememos_memos_api_v1.StorageType](#github_com_usememos_memos_api_v1storagetype) | | No | + +#### github_com_usememos_memos_api_v1.CreateUserRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| email | string | | No | +| nickname | string | | No | +| password | string | | No | +| role | [github_com_usememos_memos_api_v1.Role](#github_com_usememos_memos_api_v1role) | | No | +| username | string | | No | + +#### github_com_usememos_memos_api_v1.CustomizedProfile + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| appearance | string | Appearance is the server default appearance. | No | +| description | string | Description is the server description. | No | +| externalUrl | string | ExternalURL is the external url of server. e.g. https://usermemos.com | No | +| locale | string | Locale is the server default locale. | No | +| logoUrl | string | LogoURL is the url of logo image. | No | +| name | string | Name is the server name, default is `memos` | No | + +#### github_com_usememos_memos_api_v1.DeleteTagRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | + +#### github_com_usememos_memos_api_v1.FieldMapping + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| displayName | string | | No | +| email | string | | No | +| identifier | string | | No | + +#### github_com_usememos_memos_api_v1.IdentityProvider + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [github_com_usememos_memos_api_v1.IdentityProviderConfig](#github_com_usememos_memos_api_v1identityproviderconfig) | | No | +| id | integer | | No | +| identifierFilter | string | | No | +| name | string | | No | +| type | [github_com_usememos_memos_api_v1.IdentityProviderType](#github_com_usememos_memos_api_v1identityprovidertype) | | No | + +#### github_com_usememos_memos_api_v1.IdentityProviderConfig + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| oauth2Config | [github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config](#github_com_usememos_memos_api_v1identityprovideroauth2config) | | No | + +#### github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| authUrl | string | | No | +| clientId | string | | No | +| clientSecret | string | | No | +| fieldMapping | [github_com_usememos_memos_api_v1.FieldMapping](#github_com_usememos_memos_api_v1fieldmapping) | | No | +| scopes | [ string ] | | No | +| tokenUrl | string | | No | +| userInfoUrl | string | | No | + +#### github_com_usememos_memos_api_v1.IdentityProviderType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| github_com_usememos_memos_api_v1.IdentityProviderType | string | | | + +#### github_com_usememos_memos_api_v1.MemoRelationType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| github_com_usememos_memos_api_v1.MemoRelationType | string | | | + +#### github_com_usememos_memos_api_v1.PatchMemoRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | Domain specific fields | No | +| createdTs | integer | Standard fields | No | +| relationList | [ [github_com_usememos_memos_api_v1.UpsertMemoRelationRequest](#github_com_usememos_memos_api_v1upsertmemorelationrequest) ] | | No | +| resourceIdList | [ integer ] | Related fields | No | +| rowStatus | [github_com_usememos_memos_api_v1.RowStatus](#github_com_usememos_memos_api_v1rowstatus) | | No | +| updatedTs | integer | | No | +| visibility | [github_com_usememos_memos_api_v1.Visibility](#github_com_usememos_memos_api_v1visibility) | | No | + +#### github_com_usememos_memos_api_v1.Role + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| github_com_usememos_memos_api_v1.Role | string | | | + +#### github_com_usememos_memos_api_v1.RowStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| github_com_usememos_memos_api_v1.RowStatus | string | | | + +#### github_com_usememos_memos_api_v1.SSOSignIn + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| code | string | | No | +| identityProviderId | integer | | No | +| redirectUri | string | | No | + +#### github_com_usememos_memos_api_v1.SignIn + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| password | string | | No | +| remember | boolean | | No | +| username | string | | No | + +#### github_com_usememos_memos_api_v1.SignUp + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| password | string | | No | +| username | string | | No | + +#### github_com_usememos_memos_api_v1.StorageConfig + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| s3Config | [github_com_usememos_memos_api_v1.StorageS3Config](#github_com_usememos_memos_api_v1storages3config) | | No | + +#### github_com_usememos_memos_api_v1.StorageS3Config + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessKey | string | | No | +| bucket | string | | No | +| endPoint | string | | No | +| path | string | | No | +| presign | boolean | | No | +| region | string | | No | +| secretKey | string | | No | +| urlPrefix | string | | No | +| urlSuffix | string | | No | + +#### github_com_usememos_memos_api_v1.StorageType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| github_com_usememos_memos_api_v1.StorageType | string | | | + +#### github_com_usememos_memos_api_v1.SystemSetting + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| name | [github_com_usememos_memos_api_v1.SystemSettingName](#github_com_usememos_memos_api_v1systemsettingname) | | No | +| value | string | Value is a JSON string with basic value. | No | + +#### github_com_usememos_memos_api_v1.SystemSettingName + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| github_com_usememos_memos_api_v1.SystemSettingName | string | | | + +#### github_com_usememos_memos_api_v1.SystemStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| additionalScript | string | Additional script. | No | +| additionalStyle | string | Additional style. | No | +| allowSignUp | boolean | System settings Allow sign up. | No | +| customizedProfile | [github_com_usememos_memos_api_v1.CustomizedProfile](#github_com_usememos_memos_api_v1customizedprofile) | Customized server profile, including server name and external url. | No | +| dbSize | integer | | No | +| disablePasswordLogin | boolean | Disable password login. | No | +| disablePublicMemos | boolean | Disable public memos. | No | +| host | [github_com_usememos_memos_api_v1.User](#github_com_usememos_memos_api_v1user) | | No | +| localStoragePath | string | Local storage path. | No | +| maxUploadSizeMiB | integer | Max upload size. | No | +| memoDisplayWithUpdatedTs | boolean | Memo display with updated timestamp. | No | +| profile | [profile.Profile](#profileprofile) | | No | +| storageServiceId | integer | Storage service ID. | No | + +#### github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [github_com_usememos_memos_api_v1.IdentityProviderConfig](#github_com_usememos_memos_api_v1identityproviderconfig) | | No | +| identifierFilter | string | | No | +| name | string | | No | +| type | [github_com_usememos_memos_api_v1.IdentityProviderType](#github_com_usememos_memos_api_v1identityprovidertype) | | No | + +#### github_com_usememos_memos_api_v1.UpdateResourceRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| filename | string | | No | + +#### github_com_usememos_memos_api_v1.UpdateStorageRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [github_com_usememos_memos_api_v1.StorageConfig](#github_com_usememos_memos_api_v1storageconfig) | | No | +| name | string | | No | +| type | [github_com_usememos_memos_api_v1.StorageType](#github_com_usememos_memos_api_v1storagetype) | | No | + +#### github_com_usememos_memos_api_v1.UpdateUserRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| avatarUrl | string | | No | +| email | string | | No | +| nickname | string | | No | +| password | string | | No | +| rowStatus | [github_com_usememos_memos_api_v1.RowStatus](#github_com_usememos_memos_api_v1rowstatus) | | No | +| username | string | | No | + +#### github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| pinned | boolean | | No | + +#### github_com_usememos_memos_api_v1.UpsertMemoRelationRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| relatedMemoId | integer | | No | +| type | [github_com_usememos_memos_api_v1.MemoRelationType](#github_com_usememos_memos_api_v1memorelationtype) | | No | + +#### github_com_usememos_memos_api_v1.UpsertSystemSettingRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| name | [github_com_usememos_memos_api_v1.SystemSettingName](#github_com_usememos_memos_api_v1systemsettingname) | | No | +| value | string | | No | + +#### github_com_usememos_memos_api_v1.UpsertTagRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | + +#### github_com_usememos_memos_api_v1.User + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| avatarUrl | string | | No | +| createdTs | integer | | No | +| email | string | | No | +| id | integer | | No | +| nickname | string | | No | +| role | [github_com_usememos_memos_api_v1.Role](#github_com_usememos_memos_api_v1role) | | No | +| rowStatus | [github_com_usememos_memos_api_v1.RowStatus](#github_com_usememos_memos_api_v1rowstatus) | Standard fields | No | +| updatedTs | integer | | No | +| username | string | Domain specific fields | No | + +#### github_com_usememos_memos_api_v1.Visibility + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| github_com_usememos_memos_api_v1.Visibility | string | | | + +#### profile.Profile + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| mode | string | Mode can be "prod" or "dev" or "demo" | No | +| version | string | Version is the current version of server | No | + +#### store.FieldMapping + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| displayName | string | | No | +| email | string | | No | +| identifier | string | | No | + +#### store.IdentityProvider + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | [store.IdentityProviderConfig](#storeidentityproviderconfig) | | No | +| id | integer | | No | +| identifierFilter | string | | No | +| name | string | | No | +| type | [store.IdentityProviderType](#storeidentityprovidertype) | | No | + +#### store.IdentityProviderConfig + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| oauth2Config | [store.IdentityProviderOAuth2Config](#storeidentityprovideroauth2config) | | No | + +#### store.IdentityProviderOAuth2Config + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| authUrl | string | | No | +| clientId | string | | No | +| clientSecret | string | | No | +| fieldMapping | [store.FieldMapping](#storefieldmapping) | | No | +| scopes | [ string ] | | No | +| tokenUrl | string | | No | +| userInfoUrl | string | | No | + +#### store.IdentityProviderType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| store.IdentityProviderType | string | | | + +#### store.Memo + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | Domain specific fields | No | +| createdTs | integer | | No | +| creatorID | integer | | No | +| id | integer | | No | +| parentID | integer | | No | +| pinned | boolean | Composed fields | No | +| resourceName | string | | No | +| rowStatus | [store.RowStatus](#storerowstatus) | Standard fields | No | +| updatedTs | integer | | No | +| visibility | [store.Visibility](#storevisibility) | | No | + +#### store.MemoRelation + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memoID | integer | | No | +| relatedMemoID | integer | | No | +| type | [store.MemoRelationType](#storememorelationtype) | | No | + +#### store.MemoRelationType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| store.MemoRelationType | string | | | + +#### store.Resource + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| blob | [ integer ] | | No | +| createdTs | integer | | No | +| creatorID | integer | Standard fields | No | +| externalLink | string | | No | +| filename | string | Domain specific fields | No | +| id | integer | | No | +| internalPath | string | | No | +| memoID | integer | | No | +| resourceName | string | | No | +| size | integer | | No | +| type | string | | No | +| updatedTs | integer | | No | + +#### store.Role + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| store.Role | string | | | + +#### store.RowStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| store.RowStatus | string | | | + +#### store.Storage + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| config | string | | No | +| id | integer | | No | +| name | string | | No | +| type | string | | No | + +#### store.SystemSetting + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| name | string | | No | +| value | string | | No | + +#### store.User + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| avatarURL | string | | No | +| createdTs | integer | | No | +| email | string | | No | +| id | integer | | No | +| nickname | string | | No | +| passwordHash | string | | No | +| role | [store.Role](#storerole) | | No | +| rowStatus | [store.RowStatus](#storerowstatus) | Standard fields | No | +| updatedTs | integer | | No | +| username | string | Domain specific fields | No | + +#### store.Visibility + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| store.Visibility | string | | | diff --git a/api/v1/swagger.yaml b/api/v1/swagger.yaml index ad1cf0ec..a9a58dd7 100644 --- a/api/v1/swagger.yaml +++ b/api/v1/swagger.yaml @@ -230,6 +230,8 @@ definitions: type: string path: type: string + presign: + type: boolean region: type: string secretKey: @@ -238,8 +240,6 @@ definitions: type: string urlSuffix: type: string - presign: - type: boolean type: object api_v1.StorageType: enum: @@ -662,6 +662,8 @@ definitions: type: string path: type: string + presign: + type: boolean region: type: string secretKey: @@ -670,8 +672,6 @@ definitions: type: string urlSuffix: type: string - presign: - type: boolean type: object github_com_usememos_memos_api_v1.StorageType: enum: @@ -936,9 +936,13 @@ definitions: type: integer id: type: integer + parentID: + type: integer pinned: description: Composed fields type: boolean + resourceName: + type: string rowStatus: allOf: - $ref: '#/definitions/store.RowStatus' @@ -987,6 +991,8 @@ definitions: type: string memoID: type: integer + resourceName: + type: string size: type: integer type: @@ -1587,7 +1593,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/api_v1.UpsertMemoRelationRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest' produces: - application/json responses: @@ -1747,7 +1753,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest' + $ref: '#/definitions/api_v1.CreateResourceRequest' produces: - application/json responses: @@ -1805,7 +1811,7 @@ paths: name: patch required: true schema: - $ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest' + $ref: '#/definitions/api_v1.UpdateResourceRequest' produces: - application/json responses: @@ -1860,7 +1866,7 @@ paths: "200": description: System GetSystemStatus schema: - $ref: '#/definitions/github_com_usememos_memos_api_v1.SystemStatus' + $ref: '#/definitions/api_v1.SystemStatus' "401": description: Missing user in session | Unauthorized "500": @@ -1896,7 +1902,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateStorageRequest' + $ref: '#/definitions/api_v1.CreateStorageRequest' produces: - application/json responses: @@ -1951,7 +1957,7 @@ paths: name: patch required: true schema: - $ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateStorageRequest' + $ref: '#/definitions/api_v1.UpdateStorageRequest' produces: - application/json responses: @@ -2287,19 +2293,6 @@ paths: summary: Get user by username tags: - user - /explore/rss.xml: - get: - produces: - - text/xml - responses: - "200": - description: RSS - "500": - description: Failed to get system customized profile | Failed to find memo - list | Failed to generate rss - summary: Get RSS - tags: - - rss /o/get/GetImage: get: parameters: @@ -2321,25 +2314,4 @@ paths: summary: Get GetImage from URL tags: - image-url - /u/{id}/rss.xml: - get: - parameters: - - description: User ID - in: path - name: id - required: true - type: integer - produces: - - text/xml - responses: - "200": - description: RSS - "400": - description: User id is not a number - "500": - description: Failed to get system customized profile | Failed to find memo - list | Failed to generate rss - summary: Get RSS for a user - tags: - - rss swagger: "2.0" diff --git a/api/v2/apidocs.swagger.md b/api/v2/apidocs.swagger.md new file mode 100644 index 00000000..cac7f852 --- /dev/null +++ b/api/v2/apidocs.swagger.md @@ -0,0 +1,1606 @@ +# api/v2/activity_service.proto +## Version: version not set + +--- +## AuthService + +### /api/v2/auth/status + +#### POST +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetAuthStatusResponse](#v2getauthstatusresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## InboxService + +### /api/v2/inboxes + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user | query | Format: users/{username} | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListInboxesResponse](#v2listinboxesresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /v2/inboxes + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| inbox | body | | Yes | [v2Inbox](#v2inbox) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpdateInboxResponse](#v2updateinboxresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /v2/{name} + +#### DELETE +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | The name of the inbox to delete. Format: inboxes/{inbox} | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2DeleteInboxResponse](#v2deleteinboxresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## MarkdownService + +### /api/v2/markdown + +#### POST +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | | Yes | [v2ParseMarkdownRequest](#v2parsemarkdownrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ParseMarkdownResponse](#v2parsemarkdownresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## MemoService + +### /api/v2/memos + +#### GET +##### Summary + +ListMemos lists memos with pagination and filter. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| pageSize | query | The maximum number of memos to return. | No | integer | +| pageToken | query | A page token, received from a previous `ListMemos` call. Provide this to retrieve the subsequent page. | No | string | +| filter | query | Filter is used to filter memos returned in the list. Format: "creator == users/{username} && visibilities == ['PUBLIC', 'PROTECTED']" | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListMemosResponse](#v2listmemosresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Summary + +CreateMemo creates a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | | Yes | [v2CreateMemoRequest](#v2creatememorequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2CreateMemoResponse](#v2creatememoresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/memos/stats + +#### GET +##### Summary + +GetUserMemosStats gets stats of memos for a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | query | name is the name of the user to get stats for. Format: users/{username} | No | string | +| timezone | query | timezone location Format: uses tz identifier https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | No | string | +| filter | query | Same as ListMemosRequest.filter | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetUserMemosStatsResponse](#v2getusermemosstatsresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/memos/{id} + +#### GET +##### Summary + +GetMemo gets a memo by id. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetMemoResponse](#v2getmemoresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### DELETE +##### Summary + +DeleteMemo deletes a memo by id. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2DeleteMemoResponse](#v2deletememoresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### PATCH +##### Summary + +UpdateMemo updates a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | +| body | body | | Yes | [MemoServiceUpdateMemoBody](#memoserviceupdatememobody) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpdateMemoResponse](#v2updatememoresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/memos/{id}/comments + +#### GET +##### Summary + +ListMemoComments lists comments for a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListMemoCommentsResponse](#v2listmemocommentsresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Summary + +CreateMemoComment creates a comment for a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | id is the memo id to create comment for. | Yes | integer | +| create.content | query | | No | string | +| create.visibility | query | | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2CreateMemoCommentResponse](#v2creatememocommentresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/memos/{id}/relations + +#### GET +##### Summary + +ListMemoRelations lists relations for a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListMemoRelationsResponse](#v2listmemorelationsresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Summary + +SetMemoRelations sets relations for a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | +| body | body | | Yes | [MemoServiceSetMemoRelationsBody](#memoservicesetmemorelationsbody) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2SetMemoRelationsResponse](#v2setmemorelationsresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/memos/{id}/resources + +#### GET +##### Summary + +ListMemoResources lists resources for a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListMemoResourcesResponse](#v2listmemoresourcesresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Summary + +SetMemoResources sets resources for a memo. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | +| body | body | | Yes | [MemoServiceSetMemoResourcesBody](#memoservicesetmemoresourcesbody) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2SetMemoResourcesResponse](#v2setmemoresourcesresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/memos/{name} + +#### GET +##### Summary + +GetMemoByName gets a memo by name. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetMemoByNameResponse](#v2getmemobynameresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## ResourceService + +### /api/v2/resources + +#### GET +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListResourcesResponse](#v2listresourcesresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| filename | query | | No | string | +| externalLink | query | | No | string | +| type | query | | No | string | +| memoId | query | | No | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2CreateResourceResponse](#v2createresourceresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/resources/{id} + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetResourceResponse](#v2getresourceresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### DELETE +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2DeleteResourceResponse](#v2deleteresourceresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/resources/{name} + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetResourceByNameResponse](#v2getresourcebynameresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/resources/{resource.id} + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| resource.id | path | id is the system generated unique identifier. | Yes | integer | +| resource | body | | Yes | { **"name"**: string, **"createTime"**: dateTime, **"filename"**: string, **"externalLink"**: string, **"type"**: string, **"size"**: string (int64), **"memoId"**: integer } | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpdateResourceResponse](#v2updateresourceresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## TagService + +### /api/v2/tags + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user | query | The creator of tags. Format: users/{username} | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListTagsResponse](#v2listtagsresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### DELETE +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| tag.name | query | | No | string | +| tag.creator | query | The creator of tags. Format: users/{username} | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2DeleteTagResponse](#v2deletetagresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | query | | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpsertTagResponse](#v2upserttagresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/tags/suggestion + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user | query | The creator of tags. Format: users/{username} | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetTagSuggestionsResponse](#v2gettagsuggestionsresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/tags:rename + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user | query | The creator of tags. Format: users/{username} | No | string | +| oldName | query | | No | string | +| newName | query | | No | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2RenameTagResponse](#v2renametagresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## UserService + +### /api/v2/users + +#### GET +##### Summary + +ListUsers returns a list of users. + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListUsersResponse](#v2listusersresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/{name} + +#### GET +##### Summary + +GetUser gets a user by name. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | The name of the user. Format: users/{username} | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetUserResponse](#v2getuserresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### DELETE +##### Summary + +DeleteUser deletes a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | The name of the user. Format: users/{username} | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2DeleteUserResponse](#v2deleteuserresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/{name}/access_tokens + +#### GET +##### Summary + +ListUserAccessTokens returns a list of access tokens for a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | The name of the user. Format: users/{username} | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListUserAccessTokensResponse](#v2listuseraccesstokensresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Summary + +CreateUserAccessToken creates a new access token for a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | The name of the user. Format: users/{username} | Yes | string | +| body | body | | Yes | [UserServiceCreateUserAccessTokenBody](#userservicecreateuseraccesstokenbody) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2CreateUserAccessTokenResponse](#v2createuseraccesstokenresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/{name}/access_tokens/{accessToken} + +#### DELETE +##### Summary + +DeleteUserAccessToken deletes an access token for a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | The name of the user. Format: users/{username} | Yes | string | +| accessToken | path | access_token is the access token to delete. | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2DeleteUserAccessTokenResponse](#v2deleteuseraccesstokenresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/{name}/setting + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| name | path | The name of the user. Format: users/{username} | Yes | string | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetUserSettingResponse](#v2getusersettingresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/{setting.name} + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| setting.name | path | The name of the user. Format: users/{username} | Yes | string | +| setting | body | | Yes | { **"locale"**: string, **"appearance"**: string, **"memoVisibility"**: string, **"telegramUserId"**: string } | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpdateUserSettingResponse](#v2updateusersettingresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/{user.name} + +#### PATCH +##### Summary + +UpdateUser updates a user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user.name | path | The name of the user. Format: users/{username} | Yes | string | +| user | body | | Yes | { **"id"**: integer, **"role"**: [UserRole](#userrole), **"username"**: string, **"email"**: string, **"nickname"**: string, **"avatarUrl"**: string, **"password"**: string, **"rowStatus"**: [apiv2RowStatus](#apiv2rowstatus), **"createTime"**: dateTime, **"updateTime"**: dateTime } | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpdateUserResponse](#v2updateuserresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /v1/users + +#### POST +##### Summary + +CreateUser creates a new user. + +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| user | body | | Yes | [v2User](#v2user) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2CreateUserResponse](#v2createuserresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## WebhookService + +### /api/v2/webhooks + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| creatorId | query | | No | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2ListWebhooksResponse](#v2listwebhooksresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### POST +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| body | body | | Yes | [v2CreateWebhookRequest](#v2createwebhookrequest) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2CreateWebhookResponse](#v2createwebhookresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/webhooks/{id} + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetWebhookResponse](#v2getwebhookresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### DELETE +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | path | | Yes | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2DeleteWebhookResponse](#v2deletewebhookresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +### /api/v2/webhooks/{webhook.id} + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| webhook.id | path | | Yes | integer | +| body | body | | Yes | [WebhookServiceUpdateWebhookBody](#webhookserviceupdatewebhookbody) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpdateWebhookResponse](#v2updatewebhookresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## WorkspaceService + +### /api/v2/workspace/profile + +#### GET +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetWorkspaceProfileResponse](#v2getworkspaceprofileresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +#### PATCH +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| workspaceProfile | body | System info is the updated data. | Yes | [v2WorkspaceProfile](#v2workspaceprofile) | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2UpdateWorkspaceProfileResponse](#v2updateworkspaceprofileresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +## ActivityService + +### /v2/activities + +#### GET +##### Parameters + +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | ----------- | -------- | ------ | +| id | query | | No | integer | + +##### Responses + +| Code | Description | Schema | +| ---- | ----------- | ------ | +| 200 | A successful response. | [v2GetActivityResponse](#v2getactivityresponse) | +| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | + +--- +### Models + +#### MemoServiceSetMemoRelationsBody + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| relations | [ [v2MemoRelation](#v2memorelation) ] | | No | + +#### MemoServiceSetMemoResourcesBody + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resources | [ [v2Resource](#v2resource) ] | | No | + +#### MemoServiceUpdateMemoBody + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memo | [v2Memo](#v2memo) | | No | +| updateMask | string | | No | + +#### TableNodeRow + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| cells | [ string ] | | No | + +#### UserRole + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| UserRole | string | | | + +#### UserServiceCreateUserAccessTokenBody + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| description | string | | No | +| expiresAt | dateTime | | No | + +#### WebhookServiceUpdateWebhookBody + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| webhook | { **"creatorId"**: integer, **"createdTime"**: dateTime, **"updatedTime"**: dateTime, **"rowStatus"**: [apiv2RowStatus](#apiv2rowstatus), **"name"**: string, **"url"**: string } | | No | +| updateMask | string | | No | + +#### apiv2ActivityMemoCommentPayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memoId | integer | | No | +| relatedMemoId | integer | | No | + +#### apiv2ActivityPayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memoComment | [apiv2ActivityMemoCommentPayload](#apiv2activitymemocommentpayload) | | No | +| versionUpdate | [apiv2ActivityVersionUpdatePayload](#apiv2activityversionupdatepayload) | | No | + +#### apiv2ActivityVersionUpdatePayload + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| version | string | | No | + +#### apiv2RowStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| apiv2RowStatus | string | | | + +#### apiv2UserSetting + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | +| locale | string | The preferred locale of the user. | No | +| appearance | string | The preferred appearance of the user. | No | +| memoVisibility | string | The default visibility of the memo. | No | +| telegramUserId | string | The telegram user id of the user. | No | + +#### apiv2Webhook + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| creatorId | integer | | No | +| createdTime | dateTime | | No | +| updatedTime | dateTime | | No | +| rowStatus | [apiv2RowStatus](#apiv2rowstatus) | | No | +| name | string | | No | +| url | string | | No | + +#### googlerpcStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| code | integer | | No | +| message | string | | No | +| details | [ [protobufAny](#protobufany) ] | | No | + +#### protobufAny + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| @type | string | | No | + +#### v2Activity + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | | No | +| creatorId | integer | | No | +| type | string | | No | +| level | string | | No | +| createTime | dateTime | | No | +| payload | [apiv2ActivityPayload](#apiv2activitypayload) | | No | + +#### v2AutoLinkNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| url | string | | No | +| isRawText | boolean | | No | + +#### v2BlockquoteNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| children | [ [v2Node](#v2node) ] | | No | + +#### v2BoldItalicNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| symbol | string | | No | +| content | string | | No | + +#### v2BoldNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| symbol | string | | No | +| children | [ [v2Node](#v2node) ] | | No | + +#### v2CodeBlockNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| language | string | | No | +| content | string | | No | + +#### v2CodeNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2CreateMemoCommentResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memo | [v2Memo](#v2memo) | | No | + +#### v2CreateMemoRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | +| visibility | [v2Visibility](#v2visibility) | | No | + +#### v2CreateMemoResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memo | [v2Memo](#v2memo) | | No | + +#### v2CreateResourceResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resource | [v2Resource](#v2resource) | | No | + +#### v2CreateUserAccessTokenResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessToken | [v2UserAccessToken](#v2useraccesstoken) | | No | + +#### v2CreateUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v2User](#v2user) | | No | + +#### v2CreateWebhookRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | +| url | string | | No | + +#### v2CreateWebhookResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| webhook | [apiv2Webhook](#apiv2webhook) | | No | + +#### v2DeleteInboxResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2DeleteInboxResponse | object | | | + +#### v2DeleteMemoResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2DeleteMemoResponse | object | | | + +#### v2DeleteResourceResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2DeleteResourceResponse | object | | | + +#### v2DeleteTagResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2DeleteTagResponse | object | | | + +#### v2DeleteUserAccessTokenResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2DeleteUserAccessTokenResponse | object | | | + +#### v2DeleteUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2DeleteUserResponse | object | | | + +#### v2DeleteWebhookResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2DeleteWebhookResponse | object | | | + +#### v2EmbeddedContentNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resourceName | string | | No | +| params | string | | No | + +#### v2EscapingCharacterNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| symbol | string | | No | + +#### v2GetActivityResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| activity | [v2Activity](#v2activity) | | No | + +#### v2GetAuthStatusResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v2User](#v2user) | | No | + +#### v2GetMemoByNameResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memo | [v2Memo](#v2memo) | | No | + +#### v2GetMemoResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memo | [v2Memo](#v2memo) | | No | + +#### v2GetResourceByNameResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resource | [v2Resource](#v2resource) | | No | + +#### v2GetResourceResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resource | [v2Resource](#v2resource) | | No | + +#### v2GetTagSuggestionsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| tags | [ string ] | | No | + +#### v2GetUserMemosStatsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| stats | object | stats is the stats of memo creating/updating activities. key is the year-month-day string. e.g. "2020-01-01". | No | + +#### v2GetUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v2User](#v2user) | | No | + +#### v2GetUserSettingResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| setting | [apiv2UserSetting](#apiv2usersetting) | | No | + +#### v2GetWebhookResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| webhook | [apiv2Webhook](#apiv2webhook) | | No | + +#### v2GetWorkspaceProfileResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| workspaceProfile | [v2WorkspaceProfile](#v2workspaceprofile) | | No | + +#### v2HeadingNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| level | integer | | No | +| children | [ [v2Node](#v2node) ] | | No | + +#### v2HighlightNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2HorizontalRuleNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| symbol | string | | No | + +#### v2ImageNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| altText | string | | No | +| url | string | | No | + +#### v2Inbox + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | +| sender | string | | No | +| receiver | string | | No | +| status | [v2InboxStatus](#v2inboxstatus) | | No | +| createTime | dateTime | | No | +| type | [v2InboxType](#v2inboxtype) | | No | +| activityId | integer | | No | + +#### v2InboxStatus + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2InboxStatus | string | | | + +#### v2InboxType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2InboxType | string | | | + +#### v2ItalicNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| symbol | string | | No | +| content | string | | No | + +#### v2LineBreakNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2LineBreakNode | object | | | + +#### v2LinkNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| text | string | | No | +| url | string | | No | + +#### v2ListInboxesResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| inboxes | [ [v2Inbox](#v2inbox) ] | | No | + +#### v2ListMemoCommentsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memos | [ [v2Memo](#v2memo) ] | | No | + +#### v2ListMemoRelationsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| relations | [ [v2MemoRelation](#v2memorelation) ] | | No | + +#### v2ListMemoResourcesResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resources | [ [v2Resource](#v2resource) ] | | No | + +#### v2ListMemosResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memos | [ [v2Memo](#v2memo) ] | | No | +| nextPageToken | string | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. | No | + +#### v2ListResourcesResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resources | [ [v2Resource](#v2resource) ] | | No | + +#### v2ListTagsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| tags | [ [v2Tag](#v2tag) ] | | No | + +#### v2ListUserAccessTokensResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessTokens | [ [v2UserAccessToken](#v2useraccesstoken) ] | | No | + +#### v2ListUsersResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| users | [ [v2User](#v2user) ] | | No | + +#### v2ListWebhooksResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| webhooks | [ [apiv2Webhook](#apiv2webhook) ] | | No | + +#### v2MathBlockNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2MathNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2Memo + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | id is the system generated unique identifier. | No | +| name | string | name is the user provided name. | No | +| rowStatus | [apiv2RowStatus](#apiv2rowstatus) | | No | +| creator | string | | No | +| creatorId | integer | | No | +| createTime | dateTime | | No | +| updateTime | dateTime | | No | +| displayTime | dateTime | | No | +| content | string | | No | +| nodes | [ [v2Node](#v2node) ] | | No | +| visibility | [v2Visibility](#v2visibility) | | No | +| pinned | boolean | | No | +| parentId | integer | | No | +| resources | [ [v2Resource](#v2resource) ] | | No | +| relations | [ [v2MemoRelation](#v2memorelation) ] | | No | + +#### v2MemoRelation + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memoId | integer | | No | +| relatedMemoId | integer | | No | +| type | [v2MemoRelationType](#v2memorelationtype) | | No | + +#### v2MemoRelationType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2MemoRelationType | string | | | + +#### v2Node + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| type | [v2NodeType](#v2nodetype) | | No | +| lineBreakNode | [v2LineBreakNode](#v2linebreaknode) | | No | +| paragraphNode | [v2ParagraphNode](#v2paragraphnode) | | No | +| codeBlockNode | [v2CodeBlockNode](#v2codeblocknode) | | No | +| headingNode | [v2HeadingNode](#v2headingnode) | | No | +| horizontalRuleNode | [v2HorizontalRuleNode](#v2horizontalrulenode) | | No | +| blockquoteNode | [v2BlockquoteNode](#v2blockquotenode) | | No | +| orderedListNode | [v2OrderedListNode](#v2orderedlistnode) | | No | +| unorderedListNode | [v2UnorderedListNode](#v2unorderedlistnode) | | No | +| taskListNode | [v2TaskListNode](#v2tasklistnode) | | No | +| mathBlockNode | [v2MathBlockNode](#v2mathblocknode) | | No | +| tableNode | [v2TableNode](#v2tablenode) | | No | +| embeddedContentNode | [v2EmbeddedContentNode](#v2embeddedcontentnode) | | No | +| textNode | [v2TextNode](#v2textnode) | | No | +| boldNode | [v2BoldNode](#v2boldnode) | | No | +| italicNode | [v2ItalicNode](#v2italicnode) | | No | +| boldItalicNode | [v2BoldItalicNode](#v2bolditalicnode) | | No | +| codeNode | [v2CodeNode](#v2codenode) | | No | +| imageNode | [v2ImageNode](#v2imagenode) | | No | +| linkNode | [v2LinkNode](#v2linknode) | | No | +| autoLinkNode | [v2AutoLinkNode](#v2autolinknode) | | No | +| tagNode | [v2TagNode](#v2tagnode) | | No | +| strikethroughNode | [v2StrikethroughNode](#v2strikethroughnode) | | No | +| escapingCharacterNode | [v2EscapingCharacterNode](#v2escapingcharacternode) | | No | +| mathNode | [v2MathNode](#v2mathnode) | | No | +| highlightNode | [v2HighlightNode](#v2highlightnode) | | No | +| subscriptNode | [v2SubscriptNode](#v2subscriptnode) | | No | +| superscriptNode | [v2SuperscriptNode](#v2superscriptnode) | | No | +| referencedContentNode | [v2ReferencedContentNode](#v2referencedcontentnode) | | No | + +#### v2NodeType + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2NodeType | string | | | + +#### v2OrderedListNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| number | string | | No | +| indent | integer | | No | +| children | [ [v2Node](#v2node) ] | | No | + +#### v2ParagraphNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| children | [ [v2Node](#v2node) ] | | No | + +#### v2ParseMarkdownRequest + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| markdown | string | | No | + +#### v2ParseMarkdownResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| nodes | [ [v2Node](#v2node) ] | | No | + +#### v2ReferencedContentNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resourceName | string | | No | +| params | string | | No | + +#### v2RenameTagResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| tag | [v2Tag](#v2tag) | | No | + +#### v2Resource + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| id | integer | id is the system generated unique identifier. | No | +| name | string | name is the user provided name. | No | +| createTime | dateTime | | No | +| filename | string | | No | +| externalLink | string | | No | +| type | string | | No | +| size | string (int64) | | No | +| memoId | integer | | No | + +#### v2SetMemoRelationsResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2SetMemoRelationsResponse | object | | | + +#### v2SetMemoResourcesResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2SetMemoResourcesResponse | object | | | + +#### v2StrikethroughNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2SubscriptNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2SuperscriptNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2TableNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| header | [ string ] | | No | +| delimiter | [ string ] | | No | +| rows | [ [TableNodeRow](#tablenoderow) ] | | No | + +#### v2Tag + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | +| creator | string | | No | + +#### v2TagNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2TaskListNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| symbol | string | | No | +| indent | integer | | No | +| complete | boolean | | No | +| children | [ [v2Node](#v2node) ] | | No | + +#### v2TextNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| content | string | | No | + +#### v2UnorderedListNode + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| symbol | string | | No | +| indent | integer | | No | +| children | [ [v2Node](#v2node) ] | | No | + +#### v2UpdateInboxResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| inbox | [v2Inbox](#v2inbox) | | No | + +#### v2UpdateMemoResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| memo | [v2Memo](#v2memo) | | No | + +#### v2UpdateResourceResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| resource | [v2Resource](#v2resource) | | No | + +#### v2UpdateUserResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| user | [v2User](#v2user) | | No | + +#### v2UpdateUserSettingResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| setting | [apiv2UserSetting](#apiv2usersetting) | | No | + +#### v2UpdateWebhookResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| webhook | [apiv2Webhook](#apiv2webhook) | | No | + +#### v2UpdateWorkspaceProfileResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| workspaceProfile | [v2WorkspaceProfile](#v2workspaceprofile) | | No | + +#### v2UpsertTagResponse + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| tag | [v2Tag](#v2tag) | | No | + +#### v2User + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| name | string | | No | +| id | integer | | No | +| role | [UserRole](#userrole) | | No | +| username | string | | No | +| email | string | | No | +| nickname | string | | No | +| avatarUrl | string | | No | +| password | string | | No | +| rowStatus | [apiv2RowStatus](#apiv2rowstatus) | | No | +| createTime | dateTime | | No | +| updateTime | dateTime | | No | + +#### v2UserAccessToken + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| accessToken | string | | No | +| description | string | | No | +| issuedAt | dateTime | | No | +| expiresAt | dateTime | | No | + +#### v2Visibility + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| v2Visibility | string | | | + +#### v2WorkspaceProfile + +| Name | Type | Description | Required | +| ---- | ---- | ----------- | -------- | +| version | string | | No | +| mode | string | | No | +| allowRegistration | boolean | | No | +| disablePasswordLogin | boolean | | No | +| additionalScript | string | | No | +| additionalStyle | string | | No | diff --git a/api/v2/v2.swagger.yaml b/api/v2/apidocs.swagger.yaml similarity index 100% rename from api/v2/v2.swagger.yaml rename to api/v2/apidocs.swagger.yaml diff --git a/docs/api/v1.md b/docs/api/v1.md deleted file mode 100644 index a8426ee7..00000000 --- a/docs/api/v1.md +++ /dev/null @@ -1,1816 +0,0 @@ -# memos API - -A privacy-first, lightweight note-taking service. - -## Version: 1.0 - -**Contact information:** -API Support -https://github.com/orgs/usememos/discussions - -**License:** [MIT License](https://github.com/usememos/memos/blob/main/LICENSE) - -[Find out more about Memos.](https://usememos.com/) - ---- - -### /api/v1/auth/signin - -#### POST - -##### Summary - -Sign-in to memos. - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | -------------- | -------- | ---------------------------------------------------------------------------------- | -| body | body | Sign-in object | Yes | [github_com_usememos_memos_api_v1.SignIn](#github_com_usememos_memos_api_v1signin) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ | -| 200 | User information | [store.User](#storeuser) | -| 400 | Malformatted signin request | | -| 401 | Password login is deactivated \| Incorrect login credentials, please try again | | -| 403 | User has been archived with username %s | | -| 500 | Failed to find system setting \| Failed to unmarshal system setting \| Incorrect login credentials, please try again \| Failed to generate tokens \| Failed to create activity | | - -### /api/v1/auth/signin/sso - -#### POST - -##### Summary - -Sign-in to memos using SSO. - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ------------------ | -------- | ---------------------------------------------------------------------------------------- | -| body | body | SSO sign-in object | Yes | [github_com_usememos_memos_api_v1.SSOSignIn](#github_com_usememos_memos_api_v1ssosignin) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| 200 | User information | [store.User](#storeuser) | -| 400 | Malformatted signin request | | -| 401 | Access denied, identifier does not match the filter. | | -| 403 | User has been archived with username {username} | | -| 404 | Identity provider not found | | -| 500 | Failed to find identity provider \| Failed to create identity provider instance \| Failed to exchange token \| Failed to get user info \| Failed to compile identifier filter \| Incorrect login credentials, please try again \| Failed to generate random password \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity | | - -### /api/v1/auth/signout - -#### POST - -##### Summary - -Sign-out from memos. - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------- | ------- | -| 200 | Sign-out success | boolean | - -### /api/v1/auth/signup - -#### POST - -##### Summary - -Sign-up to memos. - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | -------------- | -------- | ---------------------------------------------------------------------------------- | -| body | body | Sign-up object | Yes | [github_com_usememos_memos_api_v1.SignUp](#github_com_usememos_memos_api_v1signup) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| 200 | User information | [store.User](#storeuser) | -| 400 | Malformatted signup request \| Failed to find users | | -| 401 | signup is disabled | | -| 403 | Forbidden | | -| 404 | Not found | | -| 500 | Failed to find system setting \| Failed to unmarshal system setting allow signup \| Failed to generate password hash \| Failed to create user \| Failed to generate tokens \| Failed to create activity | | - ---- - -### /api/v1/idp - -#### GET - -##### Summary - -Get a list of identity providers - -##### Description - -\*clientSecret is only available for host user - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | -| 200 | List of available identity providers | [ [github_com_usememos_memos_api_v1.IdentityProvider](#github_com_usememos_memos_api_v1identityprovider) ] | -| 500 | Failed to find identity provider list \| Failed to find user | | - -#### POST - -##### Summary - -Create Identity Provider - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | -| body | body | Identity provider information | Yes | [github_com_usememos_memos_api_v1.CreateIdentityProviderRequest](#github_com_usememos_memos_api_v1createidentityproviderrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | --------------------------------------------------------- | ------------------------------------------------ | -| 200 | Identity provider information | [store.IdentityProvider](#storeidentityprovider) | -| 400 | Malformatted post identity provider request | | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to create identity provider | | - -### /api/v1/idp/{idpId} - -#### DELETE - -##### Summary - -Delete an identity provider by ID - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----- | ---------- | -------------------- | -------- | ------- | -| idpId | path | Identity Provider ID | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------- | ------- | -| 200 | Identity Provider deleted | boolean | -| 400 | ID is not a number: %s \| Malformatted patch identity provider request | | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to patch identity provider | | - -#### GET - -##### Summary - -Get an identity provider by ID - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----- | ---------- | -------------------- | -------- | ------- | -| idpId | path | Identity provider ID | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------ | ------------------------------------------------ | -| 200 | Requested identity provider | [store.IdentityProvider](#storeidentityprovider) | -| 400 | ID is not a number: %s | | -| 401 | Missing user in session \| Unauthorized | | -| 404 | Identity provider not found | | -| 500 | Failed to find identity provider list \| Failed to find user | | - -#### PATCH - -##### Summary - -Update an identity provider by ID - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----- | ---------- | ------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | -| idpId | path | Identity Provider ID | Yes | integer | -| body | body | Patched identity provider information | Yes | [github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest](#github_com_usememos_memos_api_v1updateidentityproviderrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------- | ------------------------------------------------ | -| 200 | Patched identity provider | [store.IdentityProvider](#storeidentityprovider) | -| 400 | ID is not a number: %s \| Malformatted patch identity provider request | | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to patch identity provider | | - ---- - -### /api/v1/memo - -#### GET - -##### Summary - -Get a list of memos matching optional filters - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| --------------- | ---------- | ------------------------------- | -------- | ------- | -| creatorId | query | Creator ID | No | integer | -| creatorUsername | query | Creator username | No | string | -| rowStatus | query | Row status | No | string | -| pinned | query | Pinned | No | boolean | -| tag | query | Search for tag. Do not append # | No | string | -| content | query | Search for content | No | string | -| limit | query | Limit | No | integer | -| offset | query | Offset | No | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------- | -| 200 | Memo list | [ [store.Memo](#storememo) ] | -| 400 | Missing user to find memo | | -| 500 | Failed to get memo display with updated ts setting value \| Failed to fetch memo list \| Failed to compose memo response | | - -#### POST - -##### Summary - -Create a memo - -##### Description - -Visibility can be PUBLIC, PROTECTED or PRIVATE -\*You should omit fields to use their default values - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------- | -| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.CreateMemoRequest](#github_com_usememos_memos_api_v1creatememorequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| 200 | Stored memo | [store.Memo](#storememo) | -| 400 | Malformatted post memo request \| Content size overflow, up to 1MB | | -| 401 | Missing user in session | | -| 404 | User not found \| Memo not found: %d | | -| 500 | Failed to find user setting \| Failed to unmarshal user setting value \| Failed to find system setting \| Failed to unmarshal system setting \| Failed to find user \| Failed to create memo \| Failed to create activity \| Failed to upsert memo resource \| Failed to upsert memo relation \| Failed to compose memo \| Failed to compose memo response | | - -### /api/v1/memo/{memoId} - -#### DELETE - -##### Summary - -Delete memo by ID - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | ----------------- | -------- | ------- | -| memoId | path | Memo ID to delete | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | --------------------------------------------------- | ------- | -| 200 | Memo deleted | boolean | -| 400 | ID is not a number: %s | | -| 401 | Missing user in session \| Unauthorized | | -| 404 | Memo not found: %d | | -| 500 | Failed to find memo \| Failed to delete memo ID: %v | | - -#### GET - -##### Summary - -Get memo by ID - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | ----------- | -------- | ------- | -| memoId | path | Memo ID | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------------- | ---------------------------- | -| 200 | Memo list | [ [store.Memo](#storememo) ] | -| 400 | ID is not a number: %s | | -| 401 | Missing user in session | | -| 403 | this memo is private only \| this memo is protected, missing user in session | | -| 404 | Memo not found: %d | | -| 500 | Failed to find memo by ID: %v \| Failed to compose memo response | | - -#### PATCH - -##### Summary - -Update a memo - -##### Description - -Visibility can be PUBLIC, PROTECTED or PRIVATE -\*You should omit fields to use their default values - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | -------------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| memoId | path | ID of memo to update | Yes | integer | -| body | body | Patched object. | Yes | [github_com_usememos_memos_api_v1.PatchMemoRequest](#github_com_usememos_memos_api_v1patchmemorequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| 200 | Stored memo | [store.Memo](#storememo) | -| 400 | ID is not a number: %s \| Malformatted patch memo request \| Content size overflow, up to 1MB | | -| 401 | Missing user in session \| Unauthorized | | -| 404 | Memo not found: %d | | -| 500 | Failed to find memo \| Failed to patch memo \| Failed to upsert memo resource \| Failed to delete memo resource \| Failed to compose memo response | | - -### /api/v1/memo/all - -#### GET - -##### Summary - -Get a list of public memos matching optional filters - -##### Description - -This should also list protected memos if the user is logged in -Authentication is optional - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | ----------- | -------- | ------- | -| limit | query | Limit | No | integer | -| offset | query | Offset | No | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------- | -| 200 | Memo list | [ [store.Memo](#storememo) ] | -| 500 | Failed to get memo display with updated ts setting value \| Failed to fetch all memo list \| Failed to compose memo response | | - -### /api/v1/memo/stats - -#### GET - -##### Summary - -Get memo stats by creator ID or username - -##### Description - -Used to generate the heatmap - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| --------------- | ---------- | ---------------- | -------- | ------- | -| creatorId | query | Creator ID | No | integer | -| creatorUsername | query | Creator username | No | string | - -##### Responses - -| Code | Description | Schema | -| ---- | ----------------------------------------------------------------------------------------------------------------------- | ----------- | -| 200 | Memo createdTs list | [ integer ] | -| 400 | Missing user id to find memo | | -| 500 | Failed to get memo display with updated ts setting value \| Failed to find memo list \| Failed to compose memo response | | - ---- - -### /api/v1/memo/{memoId}/organizer - -#### POST - -##### Summary - -Organize memo (pin/unpin) - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- | -| memoId | path | ID of memo to organize | Yes | integer | -| body | body | Memo organizer object | Yes | [github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest](#github_com_usememos_memos_api_v1upsertmemoorganizerrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| 200 | Memo information | [store.Memo](#storememo) | -| 400 | ID is not a number: %s \| Malformatted post memo organizer request | | -| 401 | Missing user in session \| Unauthorized | | -| 404 | Memo not found: %v | | -| 500 | Failed to find memo \| Failed to upsert memo organizer \| Failed to find memo by ID: %v \| Failed to compose memo response | | - ---- - -### /api/v1/memo/{memoId}/relation - -#### GET - -##### Summary - -Get a list of Memo Relations - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | ---------------------------- | -------- | ------- | -| memoId | path | ID of memo to find relations | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------ | -------------------------------------------- | -| 200 | Memo relation information list | [ [store.MemoRelation](#storememorelation) ] | -| 400 | ID is not a number: %s | | -| 500 | Failed to list memo relations | | - -#### POST - -##### Summary - -Create Memo Relation - -##### Description - -Create a relation between two memos - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | -------------------- | -------- | -------------------------------------------------------------------- | -| memoId | path | ID of memo to relate | Yes | integer | -| body | body | Memo relation object | Yes | [api_v1.UpsertMemoRelationRequest](#api_v1upsertmemorelationrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ----------------------------------------------------------------- | ---------------------------------------- | -| 200 | Memo relation information | [store.MemoRelation](#storememorelation) | -| 400 | ID is not a number: %s \| Malformatted post memo relation request | | -| 500 | Failed to upsert memo relation | | - -### /api/v1/memo/{memoId}/relation/{relatedMemoId}/type/{relationType} - -#### DELETE - -##### Summary - -Delete a Memo Relation - -##### Description - -Removes a relation between two memos - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------------- | ---------- | -------------------------------- | -------- | ------- | -| memoId | path | ID of memo to find relations | Yes | integer | -| relatedMemoId | path | ID of memo to remove relation to | Yes | integer | -| relationType | path | Type of relation to remove | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------ | ------- | -| 200 | Memo relation deleted | boolean | -| 400 | Memo ID is not a number: %s \| Related memo ID is not a number: %s | | -| 500 | Failed to delete memo relation | | - ---- - -### /api/v1/ping - -#### GET - -##### Summary - -Ping the system - -##### Responses - -| Code | Description | Schema | -| ---- | ----------------------------- | ------- | -| 200 | If succeed to ping the system | boolean | - -### /api/v1/status - -#### GET - -##### Summary - -Get system GetSystemStatus - -##### Responses - -| Code | Description | Schema | -| ---- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| 200 | System GetSystemStatus | [github_com_usememos_memos_api_v1.SystemStatus](#github_com_usememos_memos_api_v1systemstatus) | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find host user \| Failed to find system setting list \| Failed to unmarshal system setting customized profile value | | - -### /api/v1/system/vacuum - -#### POST - -##### Summary - -Vacuum the database - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------- | ------- | -| 200 | Database vacuumed | boolean | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to ExecVacuum database | | - ---- - -### /api/v1/resource - -#### GET - -##### Summary - -Get a list of resources - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | ----------- | -------- | ------- | -| limit | query | Limit | No | integer | -| offset | query | Offset | No | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ----------------------------- | ------------------------------------ | -| 200 | Resource list | [ [store.Resource](#storeresource) ] | -| 401 | Missing user in session | | -| 500 | Failed to fetch resource list | | - -#### POST - -##### Summary - -Create resource - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------- | -| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.CreateResourceRequest](#github_com_usememos_memos_api_v1createresourcerequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| 200 | Created resource | [store.Resource](#storeresource) | -| 400 | Malformatted post resource request \| Invalid external link \| Invalid external link scheme \| Failed to request %s \| Failed to read %s \| Failed to read mime from %s | | -| 401 | Missing user in session | | -| 500 | Failed to save resource \| Failed to create resource \| Failed to create activity | | - -### /api/v1/resource/{resourceId} - -#### DELETE - -##### Summary - -Delete a resource - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---------- | ---------- | ----------- | -------- | ------- | -| resourceId | path | Resource ID | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------- | ------- | -| 200 | Resource deleted | boolean | -| 400 | ID is not a number: %s | | -| 401 | Missing user in session | | -| 404 | Resource not found: %d | | -| 500 | Failed to find resource \| Failed to delete resource | | - -#### PATCH - -##### Summary - -Update a resource - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---------- | ---------- | ---------------------- | -------- | ---------------------------------------------------------------------------------------------------------------- | -| resourceId | path | Resource ID | Yes | integer | -| patch | body | Patch resource request | Yes | [github_com_usememos_memos_api_v1.UpdateResourceRequest](#github_com_usememos_memos_api_v1updateresourcerequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------- | -------------------------------- | -| 200 | Updated resource | [store.Resource](#storeresource) | -| 400 | ID is not a number: %s \| Malformatted patch resource request | | -| 401 | Missing user in session \| Unauthorized | | -| 404 | Resource not found: %d | | -| 500 | Failed to find resource \| Failed to patch resource | | - -### /api/v1/resource/blob - -#### POST - -##### Summary - -Upload resource - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | -------------- | -------- | ------ | -| file | formData | File to upload | Yes | file | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| 200 | Created resource | [store.Resource](#storeresource) | -| 400 | Upload file not found \| File size exceeds allowed limit of %d MiB \| Failed to parse upload data | | -| 401 | Missing user in session | | -| 500 | Failed to get uploading file \| Failed to open file \| Failed to save resource \| Failed to create resource \| Failed to create activity | | - ---- - -### /api/v1/storage - -#### GET - -##### Summary - -Get a list of storages - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------ | ---------------------------------- | -| 200 | List of storages | [ [store.Storage](#storestorage) ] | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to convert storage | | - -#### POST - -##### Summary - -Create storage - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------- | -| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.CreateStorageRequest](#github_com_usememos_memos_api_v1createstoragerequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------------- | ------------------------------ | -| 200 | Created storage | [store.Storage](#storestorage) | -| 400 | Malformatted post storage request | | -| 401 | Missing user in session | | -| 500 | Failed to find user \| Failed to create storage \| Failed to convert storage | | - -### /api/v1/storage/{storageId} - -#### DELETE - -##### Summary - -Delete a storage - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| --------- | ---------- | ----------- | -------- | ------- | -| storageId | path | Storage ID | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------------------------------------------------------- | ------- | -| 200 | Storage deleted | boolean | -| 400 | ID is not a number: %s \| Storage service %d is using | | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to find storage \| Failed to unmarshal storage service id \| Failed to delete storage | | - -#### PATCH - -##### Summary - -Update a storage - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| --------- | ---------- | ------------- | -------- | -------------------------------------------------------------------------------------------------------------- | -| storageId | path | Storage ID | Yes | integer | -| patch | body | Patch request | Yes | [github_com_usememos_memos_api_v1.UpdateStorageRequest](#github_com_usememos_memos_api_v1updatestoragerequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------------------------------------- | ------------------------------ | -| 200 | Updated resource | [store.Storage](#storestorage) | -| 400 | ID is not a number: %s \| Malformatted patch storage request \| Malformatted post storage request | | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to patch storage \| Failed to convert storage | | - ---- - -### /api/v1/system/setting - -#### GET - -##### Summary - -Get a list of system settings - -##### Responses - -| Code | Description | Schema | -| ---- | --------------------------------------------------------- | ------------------------------------------------ | -| 200 | System setting list | [ [api_v1.SystemSetting](#api_v1systemsetting) ] | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to find system setting list | | - -#### POST - -##### Summary - -Create system setting - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ---------------------------------------------------------------------- | -| body | body | Request object. | Yes | [api_v1.UpsertSystemSettingRequest](#api_v1upsertsystemsettingrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------- | ------------------------------------------ | -| 200 | Created system setting | [store.SystemSetting](#storesystemsetting) | -| 400 | Malformatted post system setting request \| invalid system setting | | -| 401 | Missing user in session \| Unauthorized | | -| 403 | Cannot disable passwords if no SSO identity provider is configured. | | -| 500 | Failed to find user \| Failed to upsert system setting | | - ---- - -### /api/v1/tag - -#### GET - -##### Summary - -Get a list of tags - -##### Responses - -| Code | Description | Schema | -| ---- | --------------------------- | ---------- | -| 200 | Tag list | [ string ] | -| 400 | Missing user id to find tag | | -| 500 | Failed to find tag list | | - -#### POST - -##### Summary - -Create a tag - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.UpsertTagRequest](#github_com_usememos_memos_api_v1upserttagrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------ | ------ | -| 200 | Created tag name | string | -| 400 | Malformatted post tag request \| Tag name shouldn't be empty | | -| 401 | Missing user in session | | -| 500 | Failed to upsert tag \| Failed to create activity | | - -### /api/v1/tag/delete - -#### POST - -##### Summary - -Delete a tag - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------ | -| body | body | Request object. | Yes | [github_com_usememos_memos_api_v1.DeleteTagRequest](#github_com_usememos_memos_api_v1deletetagrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------ | ------- | -| 200 | Tag deleted | boolean | -| 400 | Malformatted post tag request \| Tag name shouldn't be empty | | -| 401 | Missing user in session | | -| 500 | Failed to delete tag name: %v | | - -### /api/v1/tag/suggestion - -#### GET - -##### Summary - -Get a list of tags suggested from other memos contents - -##### Responses - -| Code | Description | Schema | -| ---- | --------------------------------------------------- | ---------- | -| 200 | Tag list | [ string ] | -| 400 | Missing user session | | -| 500 | Failed to find memo list \| Failed to find tag list | | - ---- - -### /api/v1/user - -#### GET - -##### Summary - -Get a list of users - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------- | ---------------------------- | -| 200 | User list | [ [store.User](#storeuser) ] | -| 500 | Failed to fetch user list | | - -#### POST - -##### Summary - -Create a user - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------- | -| body | body | Request object | Yes | [github_com_usememos_memos_api_v1.CreateUserRequest](#github_com_usememos_memos_api_v1createuserrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| 200 | Created user | [store.User](#storeuser) | -| 400 | Malformatted post user request \| Invalid user create format | | -| 401 | Missing auth session \| Unauthorized to create user | | -| 403 | Could not create host user | | -| 500 | Failed to find user by id \| Failed to generate password hash \| Failed to create user \| Failed to create activity | | - -### /api/v1/user/{id} - -#### DELETE - -##### Summary - -Delete a user - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------ | -| id | path | User ID | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ---- | -------------------------------------------------------------------- | ------- | -| 200 | User deleted | boolean | -| 400 | ID is not a number: %s \| Current session user not found with ID: %d | | -| 401 | Missing user in session | | -| 403 | Unauthorized to delete user | | -| 500 | Failed to find user \| Failed to delete user | | - -#### GET - -##### Summary - -Get user by id - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------- | -| id | path | User ID | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ---- | -------------------- | ------------------------ | -| 200 | Requested user | [store.User](#storeuser) | -| 400 | Malformatted user id | | -| 404 | User not found | | -| 500 | Failed to find user | | - -#### PATCH - -##### Summary - -Update a user - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----- | ---------- | ------------- | -------- | -------------------------------------------------------------------------------------------------------- | -| id | path | User ID | Yes | string | -| patch | body | Patch request | Yes | [github_com_usememos_memos_api_v1.UpdateUserRequest](#github_com_usememos_memos_api_v1updateuserrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | -| 200 | Updated user | [store.User](#storeuser) | -| 400 | ID is not a number: %s \| Current session user not found with ID: %d \| Malformatted patch user request \| Invalid update user request | | -| 401 | Missing user in session | | -| 403 | Unauthorized to update user | | -| 500 | Failed to find user \| Failed to generate password hash \| Failed to patch user \| Failed to find userSettingList | | - -### /api/v1/user/me - -#### GET - -##### Summary - -Get current user - -##### Responses - -| Code | Description | Schema | -| ---- | ----------------------------------------------------- | ------------------------ | -| 200 | Current user | [store.User](#storeuser) | -| 401 | Missing auth session | | -| 500 | Failed to find user \| Failed to find userSettingList | | - -### /api/v1/user/name/{username} - -#### GET - -##### Summary - -Get user by username - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| -------- | ---------- | ----------- | -------- | ------ | -| username | path | Username | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ---- | ------------------- | ------------------------ | -| 200 | Requested user | [store.User](#storeuser) | -| 404 | User not found | | -| 500 | Failed to find user | | - ---- - -### /explore/rss.xml - -#### GET - -##### Summary - -Get RSS - -##### Responses - -| Code | Description | -| ---- | --------------------------------------------------------------------------------------------- | -| 200 | RSS | -| 500 | Failed to get system customized profile \| Failed to find memo list \| Failed to generate rss | - -### /u/{id}/rss.xml - -#### GET - -##### Summary - -Get RSS for a user - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------- | -| id | path | User ID | Yes | integer | - -##### Responses - -| Code | Description | -| ---- | --------------------------------------------------------------------------------------------- | -| 200 | RSS | -| 400 | User id is not a number | -| 500 | Failed to get system customized profile \| Failed to find memo list \| Failed to generate rss | - ---- - -### /o/get/GetImage - -#### GET - -##### Summary - -Get GetImage from URL - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------ | -| url | query | Image url | Yes | string | - -##### Responses - -| Code | Description | -| ---- | ------------------------------------------------------------------- | -| 200 | Image | -| 400 | Missing GetImage url \| Wrong url \| Failed to get GetImage url: %s | -| 500 | Failed to write GetImage blob | - ---- - -### Models - -#### api_v1.CreateIdentityProviderRequest - -| Name | Type | Description | Required | -| ---------------- | -------------------------------------------------------------- | ----------- | -------- | -| config | [api_v1.IdentityProviderConfig](#api_v1identityproviderconfig) | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [api_v1.IdentityProviderType](#api_v1identityprovidertype) | | No | - -#### api_v1.CreateMemoRequest - -| Name | Type | Description | Required | -| -------------- | ------------------------------------------------------------------------ | ---------------------- | -------- | -| content | string | | No | -| createdTs | integer | | No | -| relationList | [ [api_v1.UpsertMemoRelationRequest](#api_v1upsertmemorelationrequest) ] | | No | -| resourceIdList | [ integer ] | Related fields | No | -| visibility | [api_v1.Visibility](#api_v1visibility) | Domain specific fields | No | - -#### api_v1.CreateResourceRequest - -| Name | Type | Description | Required | -| ------------ | ------ | ----------- | -------- | -| externalLink | string | | No | -| filename | string | | No | -| type | string | | No | - -#### api_v1.CreateStorageRequest - -| Name | Type | Description | Required | -| ------ | -------------------------------------------- | ----------- | -------- | -| config | [api_v1.StorageConfig](#api_v1storageconfig) | | No | -| name | string | | No | -| type | [api_v1.StorageType](#api_v1storagetype) | | No | - -#### api_v1.CreateUserRequest - -| Name | Type | Description | Required | -| -------- | -------------------------- | ----------- | -------- | -| email | string | | No | -| nickname | string | | No | -| password | string | | No | -| role | [api_v1.Role](#api_v1role) | | No | -| username | string | | No | - -#### api_v1.CustomizedProfile - -| Name | Type | Description | Required | -| ----------- | ------ | --------------------------------------------------------------------- | -------- | -| appearance | string | Appearance is the server default appearance. | No | -| description | string | Description is the server description. | No | -| externalUrl | string | ExternalURL is the external url of server. e.g. https://usermemos.com | No | -| locale | string | Locale is the server default locale. | No | -| logoUrl | string | LogoURL is the url of logo image. | No | -| name | string | Name is the server name, default is `memos` | No | - -#### api_v1.DeleteTagRequest - -| Name | Type | Description | Required | -| ---- | ------ | ----------- | -------- | -| name | string | | No | - -#### api_v1.FieldMapping - -| Name | Type | Description | Required | -| ----------- | ------ | ----------- | -------- | -| displayName | string | | No | -| email | string | | No | -| identifier | string | | No | - -#### api_v1.IdentityProvider - -| Name | Type | Description | Required | -| ---------------- | -------------------------------------------------------------- | ----------- | -------- | -| config | [api_v1.IdentityProviderConfig](#api_v1identityproviderconfig) | | No | -| id | integer | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [api_v1.IdentityProviderType](#api_v1identityprovidertype) | | No | - -#### api_v1.IdentityProviderConfig - -| Name | Type | Description | Required | -| ------------ | -------------------------------------------------------------------------- | ----------- | -------- | -| oauth2Config | [api_v1.IdentityProviderOAuth2Config](#api_v1identityprovideroauth2config) | | No | - -#### api_v1.IdentityProviderOAuth2Config - -| Name | Type | Description | Required | -| ------------ | ------------------------------------------ | ----------- | -------- | -| authUrl | string | | No | -| clientId | string | | No | -| clientSecret | string | | No | -| fieldMapping | [api_v1.FieldMapping](#api_v1fieldmapping) | | No | -| scopes | [ string ] | | No | -| tokenUrl | string | | No | -| userInfoUrl | string | | No | - -#### api_v1.IdentityProviderType - -| Name | Type | Description | Required | -| --------------------------- | ------ | ----------- | -------- | -| api_v1.IdentityProviderType | string | | | - -#### api_v1.MemoRelationType - -| Name | Type | Description | Required | -| ----------------------- | ------ | ----------- | -------- | -| api_v1.MemoRelationType | string | | | - -#### api_v1.PatchMemoRequest - -| Name | Type | Description | Required | -| -------------- | ------------------------------------------------------------------------ | ---------------------- | -------- | -| content | string | Domain specific fields | No | -| createdTs | integer | Standard fields | No | -| relationList | [ [api_v1.UpsertMemoRelationRequest](#api_v1upsertmemorelationrequest) ] | | No | -| resourceIdList | [ integer ] | Related fields | No | -| rowStatus | [api_v1.RowStatus](#api_v1rowstatus) | | No | -| updatedTs | integer | | No | -| visibility | [api_v1.Visibility](#api_v1visibility) | | No | - -#### api_v1.Role - -| Name | Type | Description | Required | -| ----------- | ------ | ----------- | -------- | -| api_v1.Role | string | | | - -#### api_v1.RowStatus - -| Name | Type | Description | Required | -| ---------------- | ------ | ----------- | -------- | -| api_v1.RowStatus | string | | | - -#### api_v1.SSOSignIn - -| Name | Type | Description | Required | -| ------------------ | ------- | ----------- | -------- | -| code | string | | No | -| identityProviderId | integer | | No | -| redirectUri | string | | No | - -#### api_v1.SignIn - -| Name | Type | Description | Required | -| -------- | ------- | ----------- | -------- | -| password | string | | No | -| remember | boolean | | No | -| username | string | | No | - -#### api_v1.SignUp - -| Name | Type | Description | Required | -| -------- | ------ | ----------- | -------- | -| password | string | | No | -| username | string | | No | - -#### api_v1.StorageConfig - -| Name | Type | Description | Required | -| -------- | ------------------------------------------------ | ----------- | -------- | -| s3Config | [api_v1.StorageS3Config](#api_v1storages3config) | | No | - -#### api_v1.StorageS3Config - -| Name | Type | Description | Required | -| --------- | ------ | ----------- | -------- | -| accessKey | string | | No | -| bucket | string | | No | -| endPoint | string | | No | -| path | string | | No | -| region | string | | No | -| secretKey | string | | No | -| urlPrefix | string | | No | -| urlSuffix | string | | No | -| presign | boolean | | No | - -#### api_v1.StorageType - -| Name | Type | Description | Required | -| ------------------ | ------ | ----------- | -------- | -| api_v1.StorageType | string | | | - -#### api_v1.SystemSetting - -| Name | Type | Description | Required | -| ----------- | ---------------------------------------------------- | ---------------------------------------- | -------- | -| description | string | | No | -| name | [api_v1.SystemSettingName](#api_v1systemsettingname) | | No | -| value | string | Value is a JSON string with basic value. | No | - -#### api_v1.SystemSettingName - -| Name | Type | Description | Required | -| ------------------------ | ------ | ----------- | -------- | -| api_v1.SystemSettingName | string | | | - -#### api_v1.SystemStatus - -| Name | Type | Description | Required | -| ------------------------ | ---------------------------------------------------- | ------------------------------------------------------------------ | -------- | -| additionalScript | string | Additional script. | No | -| additionalStyle | string | Additional style. | No | -| allowSignUp | boolean | System settings Allow sign up. | No | -| customizedProfile | [api_v1.CustomizedProfile](#api_v1customizedprofile) | Customized server profile, including server name and external url. | No | -| dbSize | integer | | No | -| disablePasswordLogin | boolean | Disable password login. | No | -| disablePublicMemos | boolean | Disable public memos. | No | -| host | [api_v1.User](#api_v1user) | | No | -| localStoragePath | string | Local storage path. | No | -| maxUploadSizeMiB | integer | Max upload size. | No | -| memoDisplayWithUpdatedTs | boolean | Memo display with updated timestamp. | No | -| profile | [profile.Profile](#profileprofile) | | No | -| storageServiceId | integer | Storage service ID. | No | - -#### api_v1.UpdateIdentityProviderRequest - -| Name | Type | Description | Required | -| ---------------- | -------------------------------------------------------------- | ----------- | -------- | -| config | [api_v1.IdentityProviderConfig](#api_v1identityproviderconfig) | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [api_v1.IdentityProviderType](#api_v1identityprovidertype) | | No | - -#### api_v1.UpdateResourceRequest - -| Name | Type | Description | Required | -| -------- | ------ | ----------- | -------- | -| filename | string | | No | - -#### api_v1.UpdateStorageRequest - -| Name | Type | Description | Required | -| ------ | -------------------------------------------- | ----------- | -------- | -| config | [api_v1.StorageConfig](#api_v1storageconfig) | | No | -| name | string | | No | -| type | [api_v1.StorageType](#api_v1storagetype) | | No | - -#### api_v1.UpdateUserRequest - -| Name | Type | Description | Required | -| --------- | ------------------------------------ | ----------- | -------- | -| avatarUrl | string | | No | -| email | string | | No | -| nickname | string | | No | -| password | string | | No | -| rowStatus | [api_v1.RowStatus](#api_v1rowstatus) | | No | -| username | string | | No | - -#### api_v1.UpsertMemoOrganizerRequest - -| Name | Type | Description | Required | -| ------ | ------- | ----------- | -------- | -| pinned | boolean | | No | - -#### api_v1.UpsertMemoRelationRequest - -| Name | Type | Description | Required | -| ------------- | -------------------------------------------------- | ----------- | -------- | -| relatedMemoId | integer | | No | -| type | [api_v1.MemoRelationType](#api_v1memorelationtype) | | No | - -#### api_v1.UpsertSystemSettingRequest - -| Name | Type | Description | Required | -| ----------- | ---------------------------------------------------- | ----------- | -------- | -| description | string | | No | -| name | [api_v1.SystemSettingName](#api_v1systemsettingname) | | No | -| value | string | | No | - -#### api_v1.UpsertTagRequest - -| Name | Type | Description | Required | -| ---- | ------ | ----------- | -------- | -| name | string | | No | - -#### api_v1.User - -| Name | Type | Description | Required | -| --------- | ------------------------------------ | ---------------------- | -------- | -| avatarUrl | string | | No | -| createdTs | integer | | No | -| email | string | | No | -| id | integer | | No | -| nickname | string | | No | -| role | [api_v1.Role](#api_v1role) | | No | -| rowStatus | [api_v1.RowStatus](#api_v1rowstatus) | Standard fields | No | -| updatedTs | integer | | No | -| username | string | Domain specific fields | No | - -#### api_v1.Visibility - -| Name | Type | Description | Required | -| ----------------- | ------ | ----------- | -------- | -| api_v1.Visibility | string | | | - -#### github_com_usememos_memos_api_v1.CreateIdentityProviderRequest - -| Name | Type | Description | Required | -| ---------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- | -------- | -| config | [github_com_usememos_memos_api_v1.IdentityProviderConfig](#github_com_usememos_memos_api_v1identityproviderconfig) | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [github_com_usememos_memos_api_v1.IdentityProviderType](#github_com_usememos_memos_api_v1identityprovidertype) | | No | - -#### github_com_usememos_memos_api_v1.CreateMemoRequest - -| Name | Type | Description | Required | -| -------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -------- | -| content | string | | No | -| createdTs | integer | | No | -| relationList | [ [github_com_usememos_memos_api_v1.UpsertMemoRelationRequest](#github_com_usememos_memos_api_v1upsertmemorelationrequest) ] | | No | -| resourceIdList | [ integer ] | Related fields | No | -| visibility | [github_com_usememos_memos_api_v1.Visibility](#github_com_usememos_memos_api_v1visibility) | Domain specific fields | No | - -#### github_com_usememos_memos_api_v1.CreateResourceRequest - -| Name | Type | Description | Required | -| ------------ | ------ | ----------- | -------- | -| externalLink | string | | No | -| filename | string | | No | -| type | string | | No | - -#### github_com_usememos_memos_api_v1.CreateStorageRequest - -| Name | Type | Description | Required | -| ------ | ------------------------------------------------------------------------------------------------ | ----------- | -------- | -| config | [github_com_usememos_memos_api_v1.StorageConfig](#github_com_usememos_memos_api_v1storageconfig) | | No | -| name | string | | No | -| type | [github_com_usememos_memos_api_v1.StorageType](#github_com_usememos_memos_api_v1storagetype) | | No | - -#### github_com_usememos_memos_api_v1.CreateUserRequest - -| Name | Type | Description | Required | -| -------- | ------------------------------------------------------------------------------ | ----------- | -------- | -| email | string | | No | -| nickname | string | | No | -| password | string | | No | -| role | [github_com_usememos_memos_api_v1.Role](#github_com_usememos_memos_api_v1role) | | No | -| username | string | | No | - -#### github_com_usememos_memos_api_v1.CustomizedProfile - -| Name | Type | Description | Required | -| ----------- | ------ | --------------------------------------------------------------------- | -------- | -| appearance | string | Appearance is the server default appearance. | No | -| description | string | Description is the server description. | No | -| externalUrl | string | ExternalURL is the external url of server. e.g. https://usermemos.com | No | -| locale | string | Locale is the server default locale. | No | -| logoUrl | string | LogoURL is the url of logo image. | No | -| name | string | Name is the server name, default is `memos` | No | - -#### github_com_usememos_memos_api_v1.DeleteTagRequest - -| Name | Type | Description | Required | -| ---- | ------ | ----------- | -------- | -| name | string | | No | - -#### github_com_usememos_memos_api_v1.FieldMapping - -| Name | Type | Description | Required | -| ----------- | ------ | ----------- | -------- | -| displayName | string | | No | -| email | string | | No | -| identifier | string | | No | - -#### github_com_usememos_memos_api_v1.IdentityProvider - -| Name | Type | Description | Required | -| ---------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- | -------- | -| config | [github_com_usememos_memos_api_v1.IdentityProviderConfig](#github_com_usememos_memos_api_v1identityproviderconfig) | | No | -| id | integer | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [github_com_usememos_memos_api_v1.IdentityProviderType](#github_com_usememos_memos_api_v1identityprovidertype) | | No | - -#### github_com_usememos_memos_api_v1.IdentityProviderConfig - -| Name | Type | Description | Required | -| ------------ | ------------------------------------------------------------------------------------------------------------------------------ | ----------- | -------- | -| oauth2Config | [github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config](#github_com_usememos_memos_api_v1identityprovideroauth2config) | | No | - -#### github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config - -| Name | Type | Description | Required | -| ------------ | ---------------------------------------------------------------------------------------------- | ----------- | -------- | -| authUrl | string | | No | -| clientId | string | | No | -| clientSecret | string | | No | -| fieldMapping | [github_com_usememos_memos_api_v1.FieldMapping](#github_com_usememos_memos_api_v1fieldmapping) | | No | -| scopes | [ string ] | | No | -| tokenUrl | string | | No | -| userInfoUrl | string | | No | - -#### github_com_usememos_memos_api_v1.IdentityProviderType - -| Name | Type | Description | Required | -| ----------------------------------------------------- | ------ | ----------- | -------- | -| github_com_usememos_memos_api_v1.IdentityProviderType | string | | | - -#### github_com_usememos_memos_api_v1.MemoRelationType - -| Name | Type | Description | Required | -| ------------------------------------------------- | ------ | ----------- | -------- | -| github_com_usememos_memos_api_v1.MemoRelationType | string | | | - -#### github_com_usememos_memos_api_v1.PatchMemoRequest - -| Name | Type | Description | Required | -| -------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -------- | -| content | string | Domain specific fields | No | -| createdTs | integer | Standard fields | No | -| relationList | [ [github_com_usememos_memos_api_v1.UpsertMemoRelationRequest](#github_com_usememos_memos_api_v1upsertmemorelationrequest) ] | | No | -| resourceIdList | [ integer ] | Related fields | No | -| rowStatus | [github_com_usememos_memos_api_v1.RowStatus](#github_com_usememos_memos_api_v1rowstatus) | | No | -| updatedTs | integer | | No | -| visibility | [github_com_usememos_memos_api_v1.Visibility](#github_com_usememos_memos_api_v1visibility) | | No | - -#### github_com_usememos_memos_api_v1.Role - -| Name | Type | Description | Required | -| ------------------------------------- | ------ | ----------- | -------- | -| github_com_usememos_memos_api_v1.Role | string | | | - -#### github_com_usememos_memos_api_v1.RowStatus - -| Name | Type | Description | Required | -| ------------------------------------------ | ------ | ----------- | -------- | -| github_com_usememos_memos_api_v1.RowStatus | string | | | - -#### github_com_usememos_memos_api_v1.SSOSignIn - -| Name | Type | Description | Required | -| ------------------ | ------- | ----------- | -------- | -| code | string | | No | -| identityProviderId | integer | | No | -| redirectUri | string | | No | - -#### github_com_usememos_memos_api_v1.SignIn - -| Name | Type | Description | Required | -| -------- | ------- | ----------- | -------- | -| password | string | | No | -| remember | boolean | | No | -| username | string | | No | - -#### github_com_usememos_memos_api_v1.SignUp - -| Name | Type | Description | Required | -| -------- | ------ | ----------- | -------- | -| password | string | | No | -| username | string | | No | - -#### github_com_usememos_memos_api_v1.StorageConfig - -| Name | Type | Description | Required | -| -------- | ---------------------------------------------------------------------------------------------------- | ----------- | -------- | -| s3Config | [github_com_usememos_memos_api_v1.StorageS3Config](#github_com_usememos_memos_api_v1storages3config) | | No | - -#### github_com_usememos_memos_api_v1.StorageS3Config - -| Name | Type | Description | Required | -|-----------|---------| ----------- | -------- | -| accessKey | string | | No | -| bucket | string | | No | -| endPoint | string | | No | -| path | string | | No | -| region | string | | No | -| secretKey | string | | No | -| urlPrefix | string | | No | -| urlSuffix | string | | No | -| presign | boolean | | No | - - -#### github_com_usememos_memos_api_v1.StorageType - -| Name | Type | Description | Required | -| -------------------------------------------- | ------ | ----------- | -------- | -| github_com_usememos_memos_api_v1.StorageType | string | | | - -#### github_com_usememos_memos_api_v1.SystemSetting - -| Name | Type | Description | Required | -| ----------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -------- | -| description | string | | No | -| name | [github_com_usememos_memos_api_v1.SystemSettingName](#github_com_usememos_memos_api_v1systemsettingname) | | No | -| value | string | Value is a JSON string with basic value. | No | - -#### github_com_usememos_memos_api_v1.SystemSettingName - -| Name | Type | Description | Required | -| -------------------------------------------------- | ------ | ----------- | -------- | -| github_com_usememos_memos_api_v1.SystemSettingName | string | | | - -#### github_com_usememos_memos_api_v1.SystemStatus - -| Name | Type | Description | Required | -| ------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | -------- | -| additionalScript | string | Additional script. | No | -| additionalStyle | string | Additional style. | No | -| allowSignUp | boolean | System settings Allow sign up. | No | -| customizedProfile | [github_com_usememos_memos_api_v1.CustomizedProfile](#github_com_usememos_memos_api_v1customizedprofile) | Customized server profile, including server name and external url. | No | -| dbSize | integer | | No | -| disablePasswordLogin | boolean | Disable password login. | No | -| disablePublicMemos | boolean | Disable public memos. | No | -| host | [github_com_usememos_memos_api_v1.User](#github_com_usememos_memos_api_v1user) | | No | -| localStoragePath | string | Local storage path. | No | -| maxUploadSizeMiB | integer | Max upload size. | No | -| memoDisplayWithUpdatedTs | boolean | Memo display with updated timestamp. | No | -| profile | [profile.Profile](#profileprofile) | | No | -| storageServiceId | integer | Storage service ID. | No | - -#### github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest - -| Name | Type | Description | Required | -| ---------------- | ------------------------------------------------------------------------------------------------------------------ | ----------- | -------- | -| config | [github_com_usememos_memos_api_v1.IdentityProviderConfig](#github_com_usememos_memos_api_v1identityproviderconfig) | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [github_com_usememos_memos_api_v1.IdentityProviderType](#github_com_usememos_memos_api_v1identityprovidertype) | | No | - -#### github_com_usememos_memos_api_v1.UpdateResourceRequest - -| Name | Type | Description | Required | -| -------- | ------ | ----------- | -------- | -| filename | string | | No | - -#### github_com_usememos_memos_api_v1.UpdateStorageRequest - -| Name | Type | Description | Required | -| ------ | ------------------------------------------------------------------------------------------------ | ----------- | -------- | -| config | [github_com_usememos_memos_api_v1.StorageConfig](#github_com_usememos_memos_api_v1storageconfig) | | No | -| name | string | | No | -| type | [github_com_usememos_memos_api_v1.StorageType](#github_com_usememos_memos_api_v1storagetype) | | No | - -#### github_com_usememos_memos_api_v1.UpdateUserRequest - -| Name | Type | Description | Required | -| --------- | ---------------------------------------------------------------------------------------- | ----------- | -------- | -| avatarUrl | string | | No | -| email | string | | No | -| nickname | string | | No | -| password | string | | No | -| rowStatus | [github_com_usememos_memos_api_v1.RowStatus](#github_com_usememos_memos_api_v1rowstatus) | | No | -| username | string | | No | - -#### github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest - -| Name | Type | Description | Required | -| ------ | ------- | ----------- | -------- | -| pinned | boolean | | No | - -#### github_com_usememos_memos_api_v1.UpsertMemoRelationRequest - -| Name | Type | Description | Required | -| ------------- | ------------------------------------------------------------------------------------------------------ | ----------- | -------- | -| relatedMemoId | integer | | No | -| type | [github_com_usememos_memos_api_v1.MemoRelationType](#github_com_usememos_memos_api_v1memorelationtype) | | No | - -#### github_com_usememos_memos_api_v1.UpsertSystemSettingRequest - -| Name | Type | Description | Required | -| ----------- | -------------------------------------------------------------------------------------------------------- | ----------- | -------- | -| description | string | | No | -| name | [github_com_usememos_memos_api_v1.SystemSettingName](#github_com_usememos_memos_api_v1systemsettingname) | | No | -| value | string | | No | - -#### github_com_usememos_memos_api_v1.UpsertTagRequest - -| Name | Type | Description | Required | -| ---- | ------ | ----------- | -------- | -| name | string | | No | - -#### github_com_usememos_memos_api_v1.User - -| Name | Type | Description | Required | -| --------- | ---------------------------------------------------------------------------------------- | ---------------------- | -------- | -| avatarUrl | string | | No | -| createdTs | integer | | No | -| email | string | | No | -| id | integer | | No | -| nickname | string | | No | -| role | [github_com_usememos_memos_api_v1.Role](#github_com_usememos_memos_api_v1role) | | No | -| rowStatus | [github_com_usememos_memos_api_v1.RowStatus](#github_com_usememos_memos_api_v1rowstatus) | Standard fields | No | -| updatedTs | integer | | No | -| username | string | Domain specific fields | No | - -#### github_com_usememos_memos_api_v1.Visibility - -| Name | Type | Description | Required | -| ------------------------------------------- | ------ | ----------- | -------- | -| github_com_usememos_memos_api_v1.Visibility | string | | | - -#### profile.Profile - -| Name | Type | Description | Required | -| ------- | ------ | ---------------------------------------- | -------- | -| mode | string | Mode can be "prod" or "dev" or "demo" | No | -| version | string | Version is the current version of server | No | - -#### store.FieldMapping - -| Name | Type | Description | Required | -| ----------- | ------ | ----------- | -------- | -| displayName | string | | No | -| email | string | | No | -| identifier | string | | No | - -#### store.IdentityProvider - -| Name | Type | Description | Required | -| ---------------- | ------------------------------------------------------------ | ----------- | -------- | -| config | [store.IdentityProviderConfig](#storeidentityproviderconfig) | | No | -| id | integer | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [store.IdentityProviderType](#storeidentityprovidertype) | | No | - -#### store.IdentityProviderConfig - -| Name | Type | Description | Required | -| ------------ | ------------------------------------------------------------------------ | ----------- | -------- | -| oauth2Config | [store.IdentityProviderOAuth2Config](#storeidentityprovideroauth2config) | | No | - -#### store.IdentityProviderOAuth2Config - -| Name | Type | Description | Required | -| ------------ | ---------------------------------------- | ----------- | -------- | -| authUrl | string | | No | -| clientId | string | | No | -| clientSecret | string | | No | -| fieldMapping | [store.FieldMapping](#storefieldmapping) | | No | -| scopes | [ string ] | | No | -| tokenUrl | string | | No | -| userInfoUrl | string | | No | - -#### store.IdentityProviderType - -| Name | Type | Description | Required | -| -------------------------- | ------ | ----------- | -------- | -| store.IdentityProviderType | string | | | - -#### store.Memo - -| Name | Type | Description | Required | -| ---------- | ------------------------------------ | ---------------------- | -------- | -| content | string | Domain specific fields | No | -| createdTs | integer | | No | -| creatorID | integer | | No | -| id | integer | | No | -| pinned | boolean | Composed fields | No | -| rowStatus | [store.RowStatus](#storerowstatus) | Standard fields | No | -| updatedTs | integer | | No | -| visibility | [store.Visibility](#storevisibility) | | No | - -#### store.MemoRelation - -| Name | Type | Description | Required | -| ------------- | ------------------------------------------------ | ----------- | -------- | -| memoID | integer | | No | -| relatedMemoID | integer | | No | -| type | [store.MemoRelationType](#storememorelationtype) | | No | - -#### store.MemoRelationType - -| Name | Type | Description | Required | -| ---------------------- | ------ | ----------- | -------- | -| store.MemoRelationType | string | | | - -#### store.Resource - -| Name | Type | Description | Required | -| ------------ | ----------- | ---------------------- | -------- | -| blob | [ integer ] | | No | -| createdTs | integer | | No | -| creatorID | integer | Standard fields | No | -| externalLink | string | | No | -| filename | string | Domain specific fields | No | -| id | integer | | No | -| internalPath | string | | No | -| memoID | integer | | No | -| size | integer | | No | -| type | string | | No | -| updatedTs | integer | | No | - -#### store.Role - -| Name | Type | Description | Required | -| ---------- | ------ | ----------- | -------- | -| store.Role | string | | | - -#### store.RowStatus - -| Name | Type | Description | Required | -| --------------- | ------ | ----------- | -------- | -| store.RowStatus | string | | | - -#### store.Storage - -| Name | Type | Description | Required | -| ------ | ------- | ----------- | -------- | -| config | string | | No | -| id | integer | | No | -| name | string | | No | -| type | string | | No | - -#### store.SystemSetting - -| Name | Type | Description | Required | -| ----------- | ------ | ----------- | -------- | -| description | string | | No | -| name | string | | No | -| value | string | | No | - -#### store.User - -| Name | Type | Description | Required | -| ------------ | ---------------------------------- | ---------------------- | -------- | -| avatarURL | string | | No | -| createdTs | integer | | No | -| email | string | | No | -| id | integer | | No | -| nickname | string | | No | -| passwordHash | string | | No | -| role | [store.Role](#storerole) | | No | -| rowStatus | [store.RowStatus](#storerowstatus) | Standard fields | No | -| updatedTs | integer | | No | -| username | string | Domain specific fields | No | - -#### store.Visibility - -| Name | Type | Description | Required | -| ---------------- | ------ | ----------- | -------- | -| store.Visibility | string | | | diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index 66977044..4ef25d4c 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -20,7 +20,7 @@ plugins: - paths=source_relative - plugin: buf.build/grpc-ecosystem/openapiv2:v2.19.0 out: ../api/v2/ - opt: output_format=yaml,allow_merge=true,merge_file_name=v2 + opt: output_format=yaml,allow_merge=true # Build the TypeScript definitions for the web. - plugin: buf.build/community/stephenh-ts-proto:v1.152.1 out: ../web/src/types/proto