diff --git a/api/v1/docs.go b/api/v1/docs.go index 300abeb4..b9da4740 100644 --- a/api/v1/docs.go +++ b/api/v1/docs.go @@ -42,7 +42,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.SignIn" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.SignIn" } } ], @@ -87,7 +87,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.SSOSignIn" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.SSOSignIn" } } ], @@ -154,7 +154,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.SignUp" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.SignUp" } } ], @@ -199,7 +199,7 @@ const docTemplate = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/v1.IdentityProvider" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProvider" } } }, @@ -226,7 +226,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.CreateIdentityProviderRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateIdentityProviderRequest" } } ], @@ -354,7 +354,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpdateIdentityProviderRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest" } } ], @@ -477,7 +477,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.CreateMemoRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateMemoRequest" } } ], @@ -695,7 +695,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.PatchMemoRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.PatchMemoRequest" } } ], @@ -747,7 +747,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpsertMemoOrganizerRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest" } } ], @@ -838,7 +838,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpsertMemoRelationRequest" + "$ref": "#/definitions/api_v1.UpsertMemoRelationRequest" } } ], @@ -889,7 +889,7 @@ const docTemplate = `{ { "enum": [ "REFERENCE", - "ADDITIONAL" + "COMMENT" ], "type": "string", "description": "Type of relation to remove", @@ -992,7 +992,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.CreateResourceRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest" } } ], @@ -1116,7 +1116,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpdateResourceRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest" } } ], @@ -1155,7 +1155,7 @@ const docTemplate = `{ "200": { "description": "System GetSystemStatus", "schema": { - "$ref": "#/definitions/v1.SystemStatus" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.SystemStatus" } }, "401": { @@ -1212,7 +1212,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.CreateStorageRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateStorageRequest" } } ], @@ -1293,7 +1293,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpdateStorageRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateStorageRequest" } } ], @@ -1331,7 +1331,7 @@ const docTemplate = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/v1.SystemSetting" + "$ref": "#/definitions/api_v1.SystemSetting" } } }, @@ -1361,7 +1361,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpsertSystemSettingRequest" + "$ref": "#/definitions/api_v1.UpsertSystemSettingRequest" } } ], @@ -1457,7 +1457,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpsertTagRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpsertTagRequest" } } ], @@ -1499,7 +1499,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.DeleteTagRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.DeleteTagRequest" } } ], @@ -1592,7 +1592,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.CreateUserRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateUserRequest" } } ], @@ -1677,48 +1677,6 @@ const docTemplate = `{ } } }, - "/api/v1/user/setting": { - "post": { - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "user-setting" - ], - "summary": "Upsert user setting", - "parameters": [ - { - "description": "Request object.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1.UpsertUserSettingRequest" - } - } - ], - "responses": { - "200": { - "description": "Created user setting", - "schema": { - "$ref": "#/definitions/github_com_usememos_memos_store.UserSetting" - } - }, - "400": { - "description": "Malformatted post user setting upsert request | Invalid user setting format" - }, - "401": { - "description": "Missing auth session" - }, - "500": { - "description": "Failed to upsert user setting" - } - } - } - }, "/api/v1/user/{id}": { "get": { "produces": [ @@ -1815,7 +1773,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.UpdateUserRequest" + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateUserRequest" } } ], @@ -1866,7 +1824,7 @@ const docTemplate = `{ "GetImage/*" ], "tags": [ - "get" + "image-url" ], "summary": "Get GetImage from URL", "parameters": [ @@ -1891,50 +1849,6 @@ const docTemplate = `{ } } }, - "/o/r/{resourceId}": { - "get": { - "description": "*Swagger UI may have problems displaying other file types than images", - "produces": [ - "application/octet-stream" - ], - "tags": [ - "resource" - ], - "summary": "Stream a resource", - "parameters": [ - { - "type": "integer", - "description": "Resource ID", - "name": "resourceId", - "in": "path", - "required": true - }, - { - "type": "integer", - "description": "Thumbnail", - "name": "thumbnail", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Requested resource" - }, - "400": { - "description": "ID is not a number: %s | Failed to get resource visibility" - }, - "401": { - "description": "Resource visibility not match" - }, - "404": { - "description": "Resource not found: %d" - }, - "500": { - "description": "Failed to find resource by ID: %v | Failed to open the local resource: %s | Failed to read the local resource: %s" - } - } - } - }, "/u/{id}/rss.xml": { "get": { "produces": [ @@ -1968,31 +1882,1271 @@ const docTemplate = `{ } }, "definitions": { - "github_com_usememos_memos_store.UserSetting": { + "api_v1.CreateIdentityProviderRequest": { "type": "object", "properties": { - "key": { + "config": { + "$ref": "#/definitions/api_v1.IdentityProviderConfig" + }, + "identifierFilter": { "type": "string" }, - "userID": { + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/api_v1.IdentityProviderType" + } + } + }, + "api_v1.CreateMemoRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "createdTs": { "type": "integer" }, + "relationList": { + "type": "array", + "items": { + "$ref": "#/definitions/api_v1.UpsertMemoRelationRequest" + } + }, + "resourceIdList": { + "description": "Related fields", + "type": "array", + "items": { + "type": "integer" + } + }, + "visibility": { + "description": "Domain specific fields", + "allOf": [ + { + "$ref": "#/definitions/api_v1.Visibility" + } + ] + } + } + }, + "api_v1.CreateResourceRequest": { + "type": "object", + "properties": { + "externalLink": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "api_v1.CreateStorageRequest": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/api_v1.StorageConfig" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/api_v1.StorageType" + } + } + }, + "api_v1.CreateUserRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "password": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/api_v1.Role" + }, + "username": { + "type": "string" + } + } + }, + "api_v1.CustomizedProfile": { + "type": "object", + "properties": { + "appearance": { + "description": "Appearance is the server default appearance.", + "type": "string" + }, + "description": { + "description": "Description is the server description.", + "type": "string" + }, + "externalUrl": { + "description": "ExternalURL is the external url of server. e.g. https://usermemos.com", + "type": "string" + }, + "locale": { + "description": "Locale is the server default locale.", + "type": "string" + }, + "logoUrl": { + "description": "LogoURL is the url of logo image.", + "type": "string" + }, + "name": { + "description": "Name is the server name, default is ` + "`" + `memos` + "`" + `", + "type": "string" + } + } + }, + "api_v1.DeleteTagRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "api_v1.FieldMapping": { + "type": "object", + "properties": { + "displayName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identifier": { + "type": "string" + } + } + }, + "api_v1.IdentityProvider": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/api_v1.IdentityProviderConfig" + }, + "id": { + "type": "integer" + }, + "identifierFilter": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/api_v1.IdentityProviderType" + } + } + }, + "api_v1.IdentityProviderConfig": { + "type": "object", + "properties": { + "oauth2Config": { + "$ref": "#/definitions/api_v1.IdentityProviderOAuth2Config" + } + } + }, + "api_v1.IdentityProviderOAuth2Config": { + "type": "object", + "properties": { + "authUrl": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "fieldMapping": { + "$ref": "#/definitions/api_v1.FieldMapping" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "tokenUrl": { + "type": "string" + }, + "userInfoUrl": { + "type": "string" + } + } + }, + "api_v1.IdentityProviderType": { + "type": "string", + "enum": [ + "OAUTH2" + ], + "x-enum-varnames": [ + "IdentityProviderOAuth2Type" + ] + }, + "api_v1.MemoRelationType": { + "type": "string", + "enum": [ + "REFERENCE", + "COMMENT" + ], + "x-enum-varnames": [ + "MemoRelationReference", + "MemoRelationComment" + ] + }, + "api_v1.PatchMemoRequest": { + "type": "object", + "properties": { + "content": { + "description": "Domain specific fields", + "type": "string" + }, + "createdTs": { + "description": "Standard fields", + "type": "integer" + }, + "relationList": { + "type": "array", + "items": { + "$ref": "#/definitions/api_v1.UpsertMemoRelationRequest" + } + }, + "resourceIdList": { + "description": "Related fields", + "type": "array", + "items": { + "type": "integer" + } + }, + "rowStatus": { + "$ref": "#/definitions/api_v1.RowStatus" + }, + "updatedTs": { + "type": "integer" + }, + "visibility": { + "$ref": "#/definitions/api_v1.Visibility" + } + } + }, + "api_v1.Role": { + "type": "string", + "enum": [ + "HOST", + "ADMIN", + "USER" + ], + "x-enum-varnames": [ + "RoleHost", + "RoleAdmin", + "RoleUser" + ] + }, + "api_v1.RowStatus": { + "type": "string", + "enum": [ + "NORMAL", + "ARCHIVED" + ], + "x-enum-varnames": [ + "Normal", + "Archived" + ] + }, + "api_v1.SSOSignIn": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "identityProviderId": { + "type": "integer" + }, + "redirectUri": { + "type": "string" + } + } + }, + "api_v1.SignIn": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "remember": { + "type": "boolean" + }, + "username": { + "type": "string" + } + } + }, + "api_v1.SignUp": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "api_v1.StorageConfig": { + "type": "object", + "properties": { + "s3Config": { + "$ref": "#/definitions/api_v1.StorageS3Config" + } + } + }, + "api_v1.StorageS3Config": { + "type": "object", + "properties": { + "accessKey": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "endPoint": { + "type": "string" + }, + "path": { + "type": "string" + }, + "region": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "urlPrefix": { + "type": "string" + }, + "urlSuffix": { + "type": "string" + } + } + }, + "api_v1.StorageType": { + "type": "string", + "enum": [ + "S3" + ], + "x-enum-varnames": [ + "StorageS3" + ] + }, + "api_v1.SystemSetting": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/api_v1.SystemSettingName" + }, + "value": { + "description": "Value is a JSON string with basic value.", + "type": "string" + } + } + }, + "api_v1.SystemSettingName": { + "type": "string", + "enum": [ + "server-id", + "secret-session", + "allow-signup", + "disable-password-login", + "disable-public-memos", + "max-upload-size-mib", + "additional-style", + "additional-script", + "customized-profile", + "storage-service-id", + "local-storage-path", + "telegram-bot-token", + "memo-display-with-updated-ts", + "instance-url" + ], + "x-enum-varnames": [ + "SystemSettingServerIDName", + "SystemSettingSecretSessionName", + "SystemSettingAllowSignUpName", + "SystemSettingDisablePasswordLoginName", + "SystemSettingDisablePublicMemosName", + "SystemSettingMaxUploadSizeMiBName", + "SystemSettingAdditionalStyleName", + "SystemSettingAdditionalScriptName", + "SystemSettingCustomizedProfileName", + "SystemSettingStorageServiceIDName", + "SystemSettingLocalStoragePathName", + "SystemSettingTelegramBotTokenName", + "SystemSettingMemoDisplayWithUpdatedTsName", + "SystemSettingInstanceURLName" + ] + }, + "api_v1.SystemStatus": { + "type": "object", + "properties": { + "additionalScript": { + "description": "Additional script.", + "type": "string" + }, + "additionalStyle": { + "description": "Additional style.", + "type": "string" + }, + "allowSignUp": { + "description": "System settings\nAllow sign up.", + "type": "boolean" + }, + "customizedProfile": { + "description": "Customized server profile, including server name and external url.", + "allOf": [ + { + "$ref": "#/definitions/api_v1.CustomizedProfile" + } + ] + }, + "dbSize": { + "type": "integer" + }, + "disablePasswordLogin": { + "description": "Disable password login.", + "type": "boolean" + }, + "disablePublicMemos": { + "description": "Disable public memos.", + "type": "boolean" + }, + "host": { + "$ref": "#/definitions/api_v1.User" + }, + "localStoragePath": { + "description": "Local storage path.", + "type": "string" + }, + "maxUploadSizeMiB": { + "description": "Max upload size.", + "type": "integer" + }, + "memoDisplayWithUpdatedTs": { + "description": "Memo display with updated timestamp.", + "type": "boolean" + }, + "profile": { + "$ref": "#/definitions/profile.Profile" + }, + "storageServiceId": { + "description": "Storage service ID.", + "type": "integer" + } + } + }, + "api_v1.UpdateIdentityProviderRequest": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/api_v1.IdentityProviderConfig" + }, + "identifierFilter": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/api_v1.IdentityProviderType" + } + } + }, + "api_v1.UpdateResourceRequest": { + "type": "object", + "properties": { + "filename": { + "type": "string" + } + } + }, + "api_v1.UpdateStorageRequest": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/api_v1.StorageConfig" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/api_v1.StorageType" + } + } + }, + "api_v1.UpdateUserRequest": { + "type": "object", + "properties": { + "avatarUrl": { + "type": "string" + }, + "email": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "password": { + "type": "string" + }, + "rowStatus": { + "$ref": "#/definitions/api_v1.RowStatus" + }, + "username": { + "type": "string" + } + } + }, + "api_v1.UpsertMemoOrganizerRequest": { + "type": "object", + "properties": { + "pinned": { + "type": "boolean" + } + } + }, + "api_v1.UpsertMemoRelationRequest": { + "type": "object", + "properties": { + "relatedMemoId": { + "type": "integer" + }, + "type": { + "$ref": "#/definitions/api_v1.MemoRelationType" + } + } + }, + "api_v1.UpsertSystemSettingRequest": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/api_v1.SystemSettingName" + }, "value": { "type": "string" } } }, + "api_v1.UpsertTagRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "api_v1.User": { + "type": "object", + "properties": { + "avatarUrl": { + "type": "string" + }, + "createdTs": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/api_v1.Role" + }, + "rowStatus": { + "description": "Standard fields", + "allOf": [ + { + "$ref": "#/definitions/api_v1.RowStatus" + } + ] + }, + "updatedTs": { + "type": "integer" + }, + "username": { + "description": "Domain specific fields", + "type": "string" + } + } + }, + "api_v1.Visibility": { + "type": "string", + "enum": [ + "PUBLIC", + "PROTECTED", + "PRIVATE" + ], + "x-enum-varnames": [ + "Public", + "Protected", + "Private" + ] + }, + "github_com_usememos_memos_api_v1.CreateIdentityProviderRequest": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProviderConfig" + }, + "identifierFilter": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProviderType" + } + } + }, + "github_com_usememos_memos_api_v1.CreateMemoRequest": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "createdTs": { + "type": "integer" + }, + "relationList": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest" + } + }, + "resourceIdList": { + "description": "Related fields", + "type": "array", + "items": { + "type": "integer" + } + }, + "visibility": { + "description": "Domain specific fields", + "allOf": [ + { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.Visibility" + } + ] + } + } + }, + "github_com_usememos_memos_api_v1.CreateResourceRequest": { + "type": "object", + "properties": { + "externalLink": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.CreateStorageRequest": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.StorageConfig" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.StorageType" + } + } + }, + "github_com_usememos_memos_api_v1.CreateUserRequest": { + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "password": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.Role" + }, + "username": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.CustomizedProfile": { + "type": "object", + "properties": { + "appearance": { + "description": "Appearance is the server default appearance.", + "type": "string" + }, + "description": { + "description": "Description is the server description.", + "type": "string" + }, + "externalUrl": { + "description": "ExternalURL is the external url of server. e.g. https://usermemos.com", + "type": "string" + }, + "locale": { + "description": "Locale is the server default locale.", + "type": "string" + }, + "logoUrl": { + "description": "LogoURL is the url of logo image.", + "type": "string" + }, + "name": { + "description": "Name is the server name, default is ` + "`" + `memos` + "`" + `", + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.DeleteTagRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.FieldMapping": { + "type": "object", + "properties": { + "displayName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "identifier": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.IdentityProvider": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProviderConfig" + }, + "id": { + "type": "integer" + }, + "identifierFilter": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProviderType" + } + } + }, + "github_com_usememos_memos_api_v1.IdentityProviderConfig": { + "type": "object", + "properties": { + "oauth2Config": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config" + } + } + }, + "github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config": { + "type": "object", + "properties": { + "authUrl": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "fieldMapping": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.FieldMapping" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "tokenUrl": { + "type": "string" + }, + "userInfoUrl": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.IdentityProviderType": { + "type": "string", + "enum": [ + "OAUTH2" + ], + "x-enum-varnames": [ + "IdentityProviderOAuth2Type" + ] + }, + "github_com_usememos_memos_api_v1.MemoRelationType": { + "type": "string", + "enum": [ + "REFERENCE", + "COMMENT" + ], + "x-enum-varnames": [ + "MemoRelationReference", + "MemoRelationComment" + ] + }, + "github_com_usememos_memos_api_v1.PatchMemoRequest": { + "type": "object", + "properties": { + "content": { + "description": "Domain specific fields", + "type": "string" + }, + "createdTs": { + "description": "Standard fields", + "type": "integer" + }, + "relationList": { + "type": "array", + "items": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest" + } + }, + "resourceIdList": { + "description": "Related fields", + "type": "array", + "items": { + "type": "integer" + } + }, + "rowStatus": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.RowStatus" + }, + "updatedTs": { + "type": "integer" + }, + "visibility": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.Visibility" + } + } + }, + "github_com_usememos_memos_api_v1.Role": { + "type": "string", + "enum": [ + "HOST", + "ADMIN", + "USER" + ], + "x-enum-varnames": [ + "RoleHost", + "RoleAdmin", + "RoleUser" + ] + }, + "github_com_usememos_memos_api_v1.RowStatus": { + "type": "string", + "enum": [ + "NORMAL", + "ARCHIVED" + ], + "x-enum-varnames": [ + "Normal", + "Archived" + ] + }, + "github_com_usememos_memos_api_v1.SSOSignIn": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "identityProviderId": { + "type": "integer" + }, + "redirectUri": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.SignIn": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "remember": { + "type": "boolean" + }, + "username": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.SignUp": { + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.StorageConfig": { + "type": "object", + "properties": { + "s3Config": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.StorageS3Config" + } + } + }, + "github_com_usememos_memos_api_v1.StorageS3Config": { + "type": "object", + "properties": { + "accessKey": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "endPoint": { + "type": "string" + }, + "path": { + "type": "string" + }, + "region": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "urlPrefix": { + "type": "string" + }, + "urlSuffix": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.StorageType": { + "type": "string", + "enum": [ + "S3" + ], + "x-enum-varnames": [ + "StorageS3" + ] + }, + "github_com_usememos_memos_api_v1.SystemSetting": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.SystemSettingName" + }, + "value": { + "description": "Value is a JSON string with basic value.", + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.SystemSettingName": { + "type": "string", + "enum": [ + "server-id", + "secret-session", + "allow-signup", + "disable-password-login", + "disable-public-memos", + "max-upload-size-mib", + "additional-style", + "additional-script", + "customized-profile", + "storage-service-id", + "local-storage-path", + "telegram-bot-token", + "memo-display-with-updated-ts", + "instance-url" + ], + "x-enum-varnames": [ + "SystemSettingServerIDName", + "SystemSettingSecretSessionName", + "SystemSettingAllowSignUpName", + "SystemSettingDisablePasswordLoginName", + "SystemSettingDisablePublicMemosName", + "SystemSettingMaxUploadSizeMiBName", + "SystemSettingAdditionalStyleName", + "SystemSettingAdditionalScriptName", + "SystemSettingCustomizedProfileName", + "SystemSettingStorageServiceIDName", + "SystemSettingLocalStoragePathName", + "SystemSettingTelegramBotTokenName", + "SystemSettingMemoDisplayWithUpdatedTsName", + "SystemSettingInstanceURLName" + ] + }, + "github_com_usememos_memos_api_v1.SystemStatus": { + "type": "object", + "properties": { + "additionalScript": { + "description": "Additional script.", + "type": "string" + }, + "additionalStyle": { + "description": "Additional style.", + "type": "string" + }, + "allowSignUp": { + "description": "System settings\nAllow sign up.", + "type": "boolean" + }, + "customizedProfile": { + "description": "Customized server profile, including server name and external url.", + "allOf": [ + { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.CustomizedProfile" + } + ] + }, + "dbSize": { + "type": "integer" + }, + "disablePasswordLogin": { + "description": "Disable password login.", + "type": "boolean" + }, + "disablePublicMemos": { + "description": "Disable public memos.", + "type": "boolean" + }, + "host": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.User" + }, + "localStoragePath": { + "description": "Local storage path.", + "type": "string" + }, + "maxUploadSizeMiB": { + "description": "Max upload size.", + "type": "integer" + }, + "memoDisplayWithUpdatedTs": { + "description": "Memo display with updated timestamp.", + "type": "boolean" + }, + "profile": { + "$ref": "#/definitions/profile.Profile" + }, + "storageServiceId": { + "description": "Storage service ID.", + "type": "integer" + } + } + }, + "github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProviderConfig" + }, + "identifierFilter": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.IdentityProviderType" + } + } + }, + "github_com_usememos_memos_api_v1.UpdateResourceRequest": { + "type": "object", + "properties": { + "filename": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.UpdateStorageRequest": { + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.StorageConfig" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.StorageType" + } + } + }, + "github_com_usememos_memos_api_v1.UpdateUserRequest": { + "type": "object", + "properties": { + "avatarUrl": { + "type": "string" + }, + "email": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "password": { + "type": "string" + }, + "rowStatus": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.RowStatus" + }, + "username": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest": { + "type": "object", + "properties": { + "pinned": { + "type": "boolean" + } + } + }, + "github_com_usememos_memos_api_v1.UpsertMemoRelationRequest": { + "type": "object", + "properties": { + "relatedMemoId": { + "type": "integer" + }, + "type": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.MemoRelationType" + } + } + }, + "github_com_usememos_memos_api_v1.UpsertSystemSettingRequest": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.SystemSettingName" + }, + "value": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.UpsertTagRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.User": { + "type": "object", + "properties": { + "avatarUrl": { + "type": "string" + }, + "createdTs": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "nickname": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.Role" + }, + "rowStatus": { + "description": "Standard fields", + "allOf": [ + { + "$ref": "#/definitions/github_com_usememos_memos_api_v1.RowStatus" + } + ] + }, + "updatedTs": { + "type": "integer" + }, + "username": { + "description": "Domain specific fields", + "type": "string" + } + } + }, + "github_com_usememos_memos_api_v1.Visibility": { + "type": "string", + "enum": [ + "PUBLIC", + "PROTECTED", + "PRIVATE" + ], + "x-enum-varnames": [ + "Public", + "Protected", + "Private" + ] + }, "profile.Profile": { "type": "object", "properties": { - "driver": { - "description": "Driver is the database driver\nsqlite, mysql", - "type": "string" - }, - "dsn": { - "description": "DSN points to where Memos stores its own data", - "type": "string" - }, "mode": { "description": "Mode can be \"prod\" or \"dev\" or \"demo\"", "type": "string" @@ -2099,25 +3253,10 @@ const docTemplate = `{ "id": { "type": "integer" }, - "parentID": { - "description": "Composed fields\nFor those comment memos, the parent ID is the memo ID of the memo being commented.\nIf the parent ID is nil, then this memo is not a comment.", - "type": "integer" - }, "pinned": { + "description": "Composed fields", "type": "boolean" }, - "relationList": { - "type": "array", - "items": { - "$ref": "#/definitions/store.MemoRelation" - } - }, - "resourceIDList": { - "type": "array", - "items": { - "type": "integer" - } - }, "rowStatus": { "description": "Standard fields", "allOf": [ @@ -2310,684 +3449,6 @@ const docTemplate = `{ "Protected", "Private" ] - }, - "v1.CreateIdentityProviderRequest": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/v1.IdentityProviderConfig" - }, - "identifierFilter": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/v1.IdentityProviderType" - } - } - }, - "v1.CreateMemoRequest": { - "type": "object", - "properties": { - "content": { - "type": "string" - }, - "createdTs": { - "type": "integer" - }, - "relationList": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.UpsertMemoRelationRequest" - } - }, - "resourceIdList": { - "description": "Related fields", - "type": "array", - "items": { - "type": "integer" - } - }, - "visibility": { - "description": "Domain specific fields", - "allOf": [ - { - "$ref": "#/definitions/v1.Visibility" - } - ] - } - } - }, - "v1.CreateResourceRequest": { - "type": "object", - "properties": { - "externalLink": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "v1.CreateStorageRequest": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/v1.StorageConfig" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/v1.StorageType" - } - } - }, - "v1.CreateUserRequest": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "nickname": { - "type": "string" - }, - "password": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/v1.Role" - }, - "username": { - "type": "string" - } - } - }, - "v1.CustomizedProfile": { - "type": "object", - "properties": { - "appearance": { - "description": "Appearance is the server default appearance.", - "type": "string" - }, - "description": { - "description": "Description is the server description.", - "type": "string" - }, - "externalUrl": { - "description": "ExternalURL is the external url of server. e.g. https://usermemos.com", - "type": "string" - }, - "locale": { - "description": "Locale is the server default locale.", - "type": "string" - }, - "logoUrl": { - "description": "LogoURL is the url of logo image.", - "type": "string" - }, - "name": { - "description": "Name is the server name, default is ` + "`" + `memos` + "`" + `", - "type": "string" - } - } - }, - "v1.DeleteTagRequest": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "v1.FieldMapping": { - "type": "object", - "properties": { - "displayName": { - "type": "string" - }, - "email": { - "type": "string" - }, - "identifier": { - "type": "string" - } - } - }, - "v1.IdentityProvider": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/v1.IdentityProviderConfig" - }, - "id": { - "type": "integer" - }, - "identifierFilter": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/v1.IdentityProviderType" - } - } - }, - "v1.IdentityProviderConfig": { - "type": "object", - "properties": { - "oauth2Config": { - "$ref": "#/definitions/v1.IdentityProviderOAuth2Config" - } - } - }, - "v1.IdentityProviderOAuth2Config": { - "type": "object", - "properties": { - "authUrl": { - "type": "string" - }, - "clientId": { - "type": "string" - }, - "clientSecret": { - "type": "string" - }, - "fieldMapping": { - "$ref": "#/definitions/v1.FieldMapping" - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - } - }, - "tokenUrl": { - "type": "string" - }, - "userInfoUrl": { - "type": "string" - } - } - }, - "v1.IdentityProviderType": { - "type": "string", - "enum": [ - "OAUTH2" - ], - "x-enum-varnames": [ - "IdentityProviderOAuth2Type" - ] - }, - "v1.MemoRelationType": { - "type": "string", - "enum": [ - "REFERENCE", - "ADDITIONAL" - ], - "x-enum-varnames": [ - "MemoRelationReference", - "MemoRelationAdditional" - ] - }, - "v1.PatchMemoRequest": { - "type": "object", - "properties": { - "content": { - "description": "Domain specific fields", - "type": "string" - }, - "createdTs": { - "description": "Standard fields", - "type": "integer" - }, - "relationList": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.UpsertMemoRelationRequest" - } - }, - "resourceIdList": { - "description": "Related fields", - "type": "array", - "items": { - "type": "integer" - } - }, - "rowStatus": { - "$ref": "#/definitions/v1.RowStatus" - }, - "updatedTs": { - "type": "integer" - }, - "visibility": { - "$ref": "#/definitions/v1.Visibility" - } - } - }, - "v1.Role": { - "type": "string", - "enum": [ - "HOST", - "ADMIN", - "USER" - ], - "x-enum-varnames": [ - "RoleHost", - "RoleAdmin", - "RoleUser" - ] - }, - "v1.RowStatus": { - "type": "string", - "enum": [ - "NORMAL", - "ARCHIVED" - ], - "x-enum-varnames": [ - "Normal", - "Archived" - ] - }, - "v1.SSOSignIn": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "identityProviderId": { - "type": "integer" - }, - "redirectUri": { - "type": "string" - } - } - }, - "v1.SignIn": { - "type": "object", - "properties": { - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "v1.SignUp": { - "type": "object", - "properties": { - "password": { - "type": "string" - }, - "username": { - "type": "string" - } - } - }, - "v1.StorageConfig": { - "type": "object", - "properties": { - "s3Config": { - "$ref": "#/definitions/v1.StorageS3Config" - } - } - }, - "v1.StorageS3Config": { - "type": "object", - "properties": { - "accessKey": { - "type": "string" - }, - "bucket": { - "type": "string" - }, - "endPoint": { - "type": "string" - }, - "path": { - "type": "string" - }, - "region": { - "type": "string" - }, - "secretKey": { - "type": "string" - }, - "urlPrefix": { - "type": "string" - }, - "urlSuffix": { - "type": "string" - } - } - }, - "v1.StorageType": { - "type": "string", - "enum": [ - "S3" - ], - "x-enum-varnames": [ - "StorageS3" - ] - }, - "v1.SystemSetting": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/v1.SystemSettingName" - }, - "value": { - "description": "Value is a JSON string with basic value.", - "type": "string" - } - } - }, - "v1.SystemSettingName": { - "type": "string", - "enum": [ - "server-id", - "secret-session", - "allow-signup", - "disable-password-login", - "disable-public-memos", - "max-upload-size-mib", - "additional-style", - "additional-script", - "customized-profile", - "storage-service-id", - "local-storage-path", - "telegram-bot-token", - "memo-display-with-updated-ts", - "auto-backup-interval" - ], - "x-enum-varnames": [ - "SystemSettingServerIDName", - "SystemSettingSecretSessionName", - "SystemSettingAllowSignUpName", - "SystemSettingDisablePasswordLoginName", - "SystemSettingDisablePublicMemosName", - "SystemSettingMaxUploadSizeMiBName", - "SystemSettingAdditionalStyleName", - "SystemSettingAdditionalScriptName", - "SystemSettingCustomizedProfileName", - "SystemSettingStorageServiceIDName", - "SystemSettingLocalStoragePathName", - "SystemSettingTelegramBotTokenName", - "SystemSettingMemoDisplayWithUpdatedTsName", - "SystemSettingAutoBackupIntervalName" - ] - }, - "v1.SystemStatus": { - "type": "object", - "properties": { - "additionalScript": { - "description": "Additional script.", - "type": "string" - }, - "additionalStyle": { - "description": "Additional style.", - "type": "string" - }, - "allowSignUp": { - "description": "System settings\nAllow sign up.", - "type": "boolean" - }, - "autoBackupInterval": { - "description": "Auto Backup Interval.", - "type": "integer" - }, - "customizedProfile": { - "description": "Customized server profile, including server name and external url.", - "allOf": [ - { - "$ref": "#/definitions/v1.CustomizedProfile" - } - ] - }, - "dbSize": { - "type": "integer" - }, - "disablePasswordLogin": { - "description": "Disable password login.", - "type": "boolean" - }, - "disablePublicMemos": { - "description": "Disable public memos.", - "type": "boolean" - }, - "host": { - "$ref": "#/definitions/v1.User" - }, - "localStoragePath": { - "description": "Local storage path.", - "type": "string" - }, - "maxUploadSizeMiB": { - "description": "Max upload size.", - "type": "integer" - }, - "memoDisplayWithUpdatedTs": { - "description": "Memo display with updated timestamp.", - "type": "boolean" - }, - "profile": { - "$ref": "#/definitions/profile.Profile" - }, - "storageServiceId": { - "description": "Storage service ID.", - "type": "integer" - } - } - }, - "v1.UpdateIdentityProviderRequest": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/v1.IdentityProviderConfig" - }, - "identifierFilter": { - "type": "string" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/v1.IdentityProviderType" - } - } - }, - "v1.UpdateResourceRequest": { - "type": "object", - "properties": { - "filename": { - "type": "string" - } - } - }, - "v1.UpdateStorageRequest": { - "type": "object", - "properties": { - "config": { - "$ref": "#/definitions/v1.StorageConfig" - }, - "name": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/v1.StorageType" - } - } - }, - "v1.UpdateUserRequest": { - "type": "object", - "properties": { - "avatarUrl": { - "type": "string" - }, - "email": { - "type": "string" - }, - "nickname": { - "type": "string" - }, - "password": { - "type": "string" - }, - "rowStatus": { - "$ref": "#/definitions/v1.RowStatus" - }, - "username": { - "type": "string" - } - } - }, - "v1.UpsertMemoOrganizerRequest": { - "type": "object", - "properties": { - "pinned": { - "type": "boolean" - } - } - }, - "v1.UpsertMemoRelationRequest": { - "type": "object", - "properties": { - "relatedMemoId": { - "type": "integer" - }, - "type": { - "$ref": "#/definitions/v1.MemoRelationType" - } - } - }, - "v1.UpsertSystemSettingRequest": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "$ref": "#/definitions/v1.SystemSettingName" - }, - "value": { - "type": "string" - } - } - }, - "v1.UpsertTagRequest": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "v1.UpsertUserSettingRequest": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/v1.UserSettingKey" - }, - "value": { - "type": "string" - } - } - }, - "v1.User": { - "type": "object", - "properties": { - "avatarUrl": { - "type": "string" - }, - "createdTs": { - "type": "integer" - }, - "email": { - "type": "string" - }, - "id": { - "type": "integer" - }, - "nickname": { - "type": "string" - }, - "role": { - "$ref": "#/definitions/v1.Role" - }, - "rowStatus": { - "description": "Standard fields", - "allOf": [ - { - "$ref": "#/definitions/v1.RowStatus" - } - ] - }, - "updatedTs": { - "type": "integer" - }, - "userSettingList": { - "type": "array", - "items": { - "$ref": "#/definitions/v1.UserSetting" - } - }, - "username": { - "description": "Domain specific fields", - "type": "string" - } - } - }, - "v1.UserSetting": { - "type": "object", - "properties": { - "key": { - "$ref": "#/definitions/v1.UserSettingKey" - }, - "userId": { - "type": "integer" - }, - "value": { - "type": "string" - } - } - }, - "v1.UserSettingKey": { - "type": "string", - "enum": [ - "locale", - "appearance", - "memo-visibility", - "telegram-user-id" - ], - "x-enum-varnames": [ - "UserSettingLocaleKey", - "UserSettingAppearanceKey", - "UserSettingMemoVisibilityKey", - "UserSettingTelegramUserIDKey" - ] - }, - "v1.Visibility": { - "type": "string", - "enum": [ - "PUBLIC", - "PROTECTED", - "PRIVATE" - ], - "x-enum-varnames": [ - "Public", - "Protected", - "Private" - ] } }, "externalDocs": { diff --git a/api/v1/swagger.yaml b/api/v1/swagger.yaml index c00bb950..e3576e23 100644 --- a/api/v1/swagger.yaml +++ b/api/v1/swagger.yaml @@ -1,24 +1,867 @@ basePath: / definitions: - github_com_usememos_memos_store.UserSetting: + api_v1.CreateIdentityProviderRequest: properties: - key: + config: + $ref: '#/definitions/api_v1.IdentityProviderConfig' + identifierFilter: type: string - userID: + name: + type: string + type: + $ref: '#/definitions/api_v1.IdentityProviderType' + type: object + api_v1.CreateMemoRequest: + properties: + content: + type: string + createdTs: type: integer + relationList: + items: + $ref: '#/definitions/api_v1.UpsertMemoRelationRequest' + type: array + resourceIdList: + description: Related fields + items: + type: integer + type: array + visibility: + allOf: + - $ref: '#/definitions/api_v1.Visibility' + description: Domain specific fields + type: object + api_v1.CreateResourceRequest: + properties: + externalLink: + type: string + filename: + type: string + type: + type: string + type: object + api_v1.CreateStorageRequest: + properties: + config: + $ref: '#/definitions/api_v1.StorageConfig' + name: + type: string + type: + $ref: '#/definitions/api_v1.StorageType' + type: object + api_v1.CreateUserRequest: + properties: + email: + type: string + nickname: + type: string + password: + type: string + role: + $ref: '#/definitions/api_v1.Role' + username: + type: string + type: object + api_v1.CustomizedProfile: + properties: + appearance: + description: Appearance is the server default appearance. + type: string + description: + description: Description is the server description. + type: string + externalUrl: + description: ExternalURL is the external url of server. e.g. https://usermemos.com + type: string + locale: + description: Locale is the server default locale. + type: string + logoUrl: + description: LogoURL is the url of logo image. + type: string + name: + description: Name is the server name, default is `memos` + type: string + type: object + api_v1.DeleteTagRequest: + properties: + name: + type: string + type: object + api_v1.FieldMapping: + properties: + displayName: + type: string + email: + type: string + identifier: + type: string + type: object + api_v1.IdentityProvider: + properties: + config: + $ref: '#/definitions/api_v1.IdentityProviderConfig' + id: + type: integer + identifierFilter: + type: string + name: + type: string + type: + $ref: '#/definitions/api_v1.IdentityProviderType' + type: object + api_v1.IdentityProviderConfig: + properties: + oauth2Config: + $ref: '#/definitions/api_v1.IdentityProviderOAuth2Config' + type: object + api_v1.IdentityProviderOAuth2Config: + properties: + authUrl: + type: string + clientId: + type: string + clientSecret: + type: string + fieldMapping: + $ref: '#/definitions/api_v1.FieldMapping' + scopes: + items: + type: string + type: array + tokenUrl: + type: string + userInfoUrl: + type: string + type: object + api_v1.IdentityProviderType: + enum: + - OAUTH2 + type: string + x-enum-varnames: + - IdentityProviderOAuth2Type + api_v1.MemoRelationType: + enum: + - REFERENCE + - COMMENT + type: string + x-enum-varnames: + - MemoRelationReference + - MemoRelationComment + api_v1.PatchMemoRequest: + properties: + content: + description: Domain specific fields + type: string + createdTs: + description: Standard fields + type: integer + relationList: + items: + $ref: '#/definitions/api_v1.UpsertMemoRelationRequest' + type: array + resourceIdList: + description: Related fields + items: + type: integer + type: array + rowStatus: + $ref: '#/definitions/api_v1.RowStatus' + updatedTs: + type: integer + visibility: + $ref: '#/definitions/api_v1.Visibility' + type: object + api_v1.Role: + enum: + - HOST + - ADMIN + - USER + type: string + x-enum-varnames: + - RoleHost + - RoleAdmin + - RoleUser + api_v1.RowStatus: + enum: + - NORMAL + - ARCHIVED + type: string + x-enum-varnames: + - Normal + - Archived + api_v1.SSOSignIn: + properties: + code: + type: string + identityProviderId: + type: integer + redirectUri: + type: string + type: object + api_v1.SignIn: + properties: + password: + type: string + remember: + type: boolean + username: + type: string + type: object + api_v1.SignUp: + properties: + password: + type: string + username: + type: string + type: object + api_v1.StorageConfig: + properties: + s3Config: + $ref: '#/definitions/api_v1.StorageS3Config' + type: object + api_v1.StorageS3Config: + properties: + accessKey: + type: string + bucket: + type: string + endPoint: + type: string + path: + type: string + region: + type: string + secretKey: + type: string + urlPrefix: + type: string + urlSuffix: + type: string + type: object + api_v1.StorageType: + enum: + - S3 + type: string + x-enum-varnames: + - StorageS3 + api_v1.SystemSetting: + properties: + description: + type: string + name: + $ref: '#/definitions/api_v1.SystemSettingName' + value: + description: Value is a JSON string with basic value. + type: string + type: object + api_v1.SystemSettingName: + enum: + - server-id + - secret-session + - allow-signup + - disable-password-login + - disable-public-memos + - max-upload-size-mib + - additional-style + - additional-script + - customized-profile + - storage-service-id + - local-storage-path + - telegram-bot-token + - memo-display-with-updated-ts + - instance-url + type: string + x-enum-varnames: + - SystemSettingServerIDName + - SystemSettingSecretSessionName + - SystemSettingAllowSignUpName + - SystemSettingDisablePasswordLoginName + - SystemSettingDisablePublicMemosName + - SystemSettingMaxUploadSizeMiBName + - SystemSettingAdditionalStyleName + - SystemSettingAdditionalScriptName + - SystemSettingCustomizedProfileName + - SystemSettingStorageServiceIDName + - SystemSettingLocalStoragePathName + - SystemSettingTelegramBotTokenName + - SystemSettingMemoDisplayWithUpdatedTsName + - SystemSettingInstanceURLName + api_v1.SystemStatus: + properties: + additionalScript: + description: Additional script. + type: string + additionalStyle: + description: Additional style. + type: string + allowSignUp: + description: |- + System settings + Allow sign up. + type: boolean + customizedProfile: + allOf: + - $ref: '#/definitions/api_v1.CustomizedProfile' + description: Customized server profile, including server name and external + url. + dbSize: + type: integer + disablePasswordLogin: + description: Disable password login. + type: boolean + disablePublicMemos: + description: Disable public memos. + type: boolean + host: + $ref: '#/definitions/api_v1.User' + localStoragePath: + description: Local storage path. + type: string + maxUploadSizeMiB: + description: Max upload size. + type: integer + memoDisplayWithUpdatedTs: + description: Memo display with updated timestamp. + type: boolean + profile: + $ref: '#/definitions/profile.Profile' + storageServiceId: + description: Storage service ID. + type: integer + type: object + api_v1.UpdateIdentityProviderRequest: + properties: + config: + $ref: '#/definitions/api_v1.IdentityProviderConfig' + identifierFilter: + type: string + name: + type: string + type: + $ref: '#/definitions/api_v1.IdentityProviderType' + type: object + api_v1.UpdateResourceRequest: + properties: + filename: + type: string + type: object + api_v1.UpdateStorageRequest: + properties: + config: + $ref: '#/definitions/api_v1.StorageConfig' + name: + type: string + type: + $ref: '#/definitions/api_v1.StorageType' + type: object + api_v1.UpdateUserRequest: + properties: + avatarUrl: + type: string + email: + type: string + nickname: + type: string + password: + type: string + rowStatus: + $ref: '#/definitions/api_v1.RowStatus' + username: + type: string + type: object + api_v1.UpsertMemoOrganizerRequest: + properties: + pinned: + type: boolean + type: object + api_v1.UpsertMemoRelationRequest: + properties: + relatedMemoId: + type: integer + type: + $ref: '#/definitions/api_v1.MemoRelationType' + type: object + api_v1.UpsertSystemSettingRequest: + properties: + description: + type: string + name: + $ref: '#/definitions/api_v1.SystemSettingName' value: type: string type: object + api_v1.UpsertTagRequest: + properties: + name: + type: string + type: object + api_v1.User: + properties: + avatarUrl: + type: string + createdTs: + type: integer + email: + type: string + id: + type: integer + nickname: + type: string + role: + $ref: '#/definitions/api_v1.Role' + rowStatus: + allOf: + - $ref: '#/definitions/api_v1.RowStatus' + description: Standard fields + updatedTs: + type: integer + username: + description: Domain specific fields + type: string + type: object + api_v1.Visibility: + enum: + - PUBLIC + - PROTECTED + - PRIVATE + type: string + x-enum-varnames: + - Public + - Protected + - Private + github_com_usememos_memos_api_v1.CreateIdentityProviderRequest: + properties: + config: + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProviderConfig' + identifierFilter: + type: string + name: + type: string + type: + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProviderType' + type: object + github_com_usememos_memos_api_v1.CreateMemoRequest: + properties: + content: + type: string + createdTs: + type: integer + relationList: + items: + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest' + type: array + resourceIdList: + description: Related fields + items: + type: integer + type: array + visibility: + allOf: + - $ref: '#/definitions/github_com_usememos_memos_api_v1.Visibility' + description: Domain specific fields + type: object + github_com_usememos_memos_api_v1.CreateResourceRequest: + properties: + externalLink: + type: string + filename: + type: string + type: + type: string + type: object + github_com_usememos_memos_api_v1.CreateStorageRequest: + properties: + config: + $ref: '#/definitions/github_com_usememos_memos_api_v1.StorageConfig' + name: + type: string + type: + $ref: '#/definitions/github_com_usememos_memos_api_v1.StorageType' + type: object + github_com_usememos_memos_api_v1.CreateUserRequest: + properties: + email: + type: string + nickname: + type: string + password: + type: string + role: + $ref: '#/definitions/github_com_usememos_memos_api_v1.Role' + username: + type: string + type: object + github_com_usememos_memos_api_v1.CustomizedProfile: + properties: + appearance: + description: Appearance is the server default appearance. + type: string + description: + description: Description is the server description. + type: string + externalUrl: + description: ExternalURL is the external url of server. e.g. https://usermemos.com + type: string + locale: + description: Locale is the server default locale. + type: string + logoUrl: + description: LogoURL is the url of logo image. + type: string + name: + description: Name is the server name, default is `memos` + type: string + type: object + github_com_usememos_memos_api_v1.DeleteTagRequest: + properties: + name: + type: string + type: object + github_com_usememos_memos_api_v1.FieldMapping: + properties: + displayName: + type: string + email: + type: string + identifier: + type: string + type: object + github_com_usememos_memos_api_v1.IdentityProvider: + properties: + config: + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProviderConfig' + id: + type: integer + identifierFilter: + type: string + name: + type: string + type: + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProviderType' + type: object + github_com_usememos_memos_api_v1.IdentityProviderConfig: + properties: + oauth2Config: + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config' + type: object + github_com_usememos_memos_api_v1.IdentityProviderOAuth2Config: + properties: + authUrl: + type: string + clientId: + type: string + clientSecret: + type: string + fieldMapping: + $ref: '#/definitions/github_com_usememos_memos_api_v1.FieldMapping' + scopes: + items: + type: string + type: array + tokenUrl: + type: string + userInfoUrl: + type: string + type: object + github_com_usememos_memos_api_v1.IdentityProviderType: + enum: + - OAUTH2 + type: string + x-enum-varnames: + - IdentityProviderOAuth2Type + github_com_usememos_memos_api_v1.MemoRelationType: + enum: + - REFERENCE + - COMMENT + type: string + x-enum-varnames: + - MemoRelationReference + - MemoRelationComment + github_com_usememos_memos_api_v1.PatchMemoRequest: + properties: + content: + description: Domain specific fields + type: string + createdTs: + description: Standard fields + type: integer + relationList: + items: + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest' + type: array + resourceIdList: + description: Related fields + items: + type: integer + type: array + rowStatus: + $ref: '#/definitions/github_com_usememos_memos_api_v1.RowStatus' + updatedTs: + type: integer + visibility: + $ref: '#/definitions/github_com_usememos_memos_api_v1.Visibility' + type: object + github_com_usememos_memos_api_v1.Role: + enum: + - HOST + - ADMIN + - USER + type: string + x-enum-varnames: + - RoleHost + - RoleAdmin + - RoleUser + github_com_usememos_memos_api_v1.RowStatus: + enum: + - NORMAL + - ARCHIVED + type: string + x-enum-varnames: + - Normal + - Archived + github_com_usememos_memos_api_v1.SSOSignIn: + properties: + code: + type: string + identityProviderId: + type: integer + redirectUri: + type: string + type: object + github_com_usememos_memos_api_v1.SignIn: + properties: + password: + type: string + remember: + type: boolean + username: + type: string + type: object + github_com_usememos_memos_api_v1.SignUp: + properties: + password: + type: string + username: + type: string + type: object + github_com_usememos_memos_api_v1.StorageConfig: + properties: + s3Config: + $ref: '#/definitions/github_com_usememos_memos_api_v1.StorageS3Config' + type: object + github_com_usememos_memos_api_v1.StorageS3Config: + properties: + accessKey: + type: string + bucket: + type: string + endPoint: + type: string + path: + type: string + region: + type: string + secretKey: + type: string + urlPrefix: + type: string + urlSuffix: + type: string + type: object + github_com_usememos_memos_api_v1.StorageType: + enum: + - S3 + type: string + x-enum-varnames: + - StorageS3 + github_com_usememos_memos_api_v1.SystemSetting: + properties: + description: + type: string + name: + $ref: '#/definitions/github_com_usememos_memos_api_v1.SystemSettingName' + value: + description: Value is a JSON string with basic value. + type: string + type: object + github_com_usememos_memos_api_v1.SystemSettingName: + enum: + - server-id + - secret-session + - allow-signup + - disable-password-login + - disable-public-memos + - max-upload-size-mib + - additional-style + - additional-script + - customized-profile + - storage-service-id + - local-storage-path + - telegram-bot-token + - memo-display-with-updated-ts + - instance-url + type: string + x-enum-varnames: + - SystemSettingServerIDName + - SystemSettingSecretSessionName + - SystemSettingAllowSignUpName + - SystemSettingDisablePasswordLoginName + - SystemSettingDisablePublicMemosName + - SystemSettingMaxUploadSizeMiBName + - SystemSettingAdditionalStyleName + - SystemSettingAdditionalScriptName + - SystemSettingCustomizedProfileName + - SystemSettingStorageServiceIDName + - SystemSettingLocalStoragePathName + - SystemSettingTelegramBotTokenName + - SystemSettingMemoDisplayWithUpdatedTsName + - SystemSettingInstanceURLName + github_com_usememos_memos_api_v1.SystemStatus: + properties: + additionalScript: + description: Additional script. + type: string + additionalStyle: + description: Additional style. + type: string + allowSignUp: + description: |- + System settings + Allow sign up. + type: boolean + customizedProfile: + allOf: + - $ref: '#/definitions/github_com_usememos_memos_api_v1.CustomizedProfile' + description: Customized server profile, including server name and external + url. + dbSize: + type: integer + disablePasswordLogin: + description: Disable password login. + type: boolean + disablePublicMemos: + description: Disable public memos. + type: boolean + host: + $ref: '#/definitions/github_com_usememos_memos_api_v1.User' + localStoragePath: + description: Local storage path. + type: string + maxUploadSizeMiB: + description: Max upload size. + type: integer + memoDisplayWithUpdatedTs: + description: Memo display with updated timestamp. + type: boolean + profile: + $ref: '#/definitions/profile.Profile' + storageServiceId: + description: Storage service ID. + type: integer + type: object + github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest: + properties: + config: + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProviderConfig' + identifierFilter: + type: string + name: + type: string + type: + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProviderType' + type: object + github_com_usememos_memos_api_v1.UpdateResourceRequest: + properties: + filename: + type: string + type: object + github_com_usememos_memos_api_v1.UpdateStorageRequest: + properties: + config: + $ref: '#/definitions/github_com_usememos_memos_api_v1.StorageConfig' + name: + type: string + type: + $ref: '#/definitions/github_com_usememos_memos_api_v1.StorageType' + type: object + github_com_usememos_memos_api_v1.UpdateUserRequest: + properties: + avatarUrl: + type: string + email: + type: string + nickname: + type: string + password: + type: string + rowStatus: + $ref: '#/definitions/github_com_usememos_memos_api_v1.RowStatus' + username: + type: string + type: object + github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest: + properties: + pinned: + type: boolean + type: object + github_com_usememos_memos_api_v1.UpsertMemoRelationRequest: + properties: + relatedMemoId: + type: integer + type: + $ref: '#/definitions/github_com_usememos_memos_api_v1.MemoRelationType' + type: object + github_com_usememos_memos_api_v1.UpsertSystemSettingRequest: + properties: + description: + type: string + name: + $ref: '#/definitions/github_com_usememos_memos_api_v1.SystemSettingName' + value: + type: string + type: object + github_com_usememos_memos_api_v1.UpsertTagRequest: + properties: + name: + type: string + type: object + github_com_usememos_memos_api_v1.User: + properties: + avatarUrl: + type: string + createdTs: + type: integer + email: + type: string + id: + type: integer + nickname: + type: string + role: + $ref: '#/definitions/github_com_usememos_memos_api_v1.Role' + rowStatus: + allOf: + - $ref: '#/definitions/github_com_usememos_memos_api_v1.RowStatus' + description: Standard fields + updatedTs: + type: integer + username: + description: Domain specific fields + type: string + type: object + github_com_usememos_memos_api_v1.Visibility: + enum: + - PUBLIC + - PROTECTED + - PRIVATE + type: string + x-enum-varnames: + - Public + - Protected + - Private profile.Profile: properties: - driver: - description: |- - Driver is the database driver - sqlite, mysql - type: string - dsn: - description: DSN points to where Memos stores its own data - type: string mode: description: Mode can be "prod" or "dev" or "demo" type: string @@ -89,22 +932,9 @@ definitions: type: integer id: type: integer - parentID: - description: |- - Composed fields - For those comment memos, the parent ID is the memo ID of the memo being commented. - If the parent ID is nil, then this memo is not a comment. - type: integer pinned: + description: Composed fields type: boolean - relationList: - items: - $ref: '#/definitions/store.MemoRelation' - type: array - resourceIDList: - items: - type: integer - type: array rowStatus: allOf: - $ref: '#/definitions/store.RowStatus' @@ -234,469 +1064,6 @@ definitions: - Public - Protected - Private - v1.CreateIdentityProviderRequest: - properties: - config: - $ref: '#/definitions/v1.IdentityProviderConfig' - identifierFilter: - type: string - name: - type: string - type: - $ref: '#/definitions/v1.IdentityProviderType' - type: object - v1.CreateMemoRequest: - properties: - content: - type: string - createdTs: - type: integer - relationList: - items: - $ref: '#/definitions/v1.UpsertMemoRelationRequest' - type: array - resourceIdList: - description: Related fields - items: - type: integer - type: array - visibility: - allOf: - - $ref: '#/definitions/v1.Visibility' - description: Domain specific fields - type: object - v1.CreateResourceRequest: - properties: - externalLink: - type: string - filename: - type: string - type: - type: string - type: object - v1.CreateStorageRequest: - properties: - config: - $ref: '#/definitions/v1.StorageConfig' - name: - type: string - type: - $ref: '#/definitions/v1.StorageType' - type: object - v1.CreateUserRequest: - properties: - email: - type: string - nickname: - type: string - password: - type: string - role: - $ref: '#/definitions/v1.Role' - username: - type: string - type: object - v1.CustomizedProfile: - properties: - appearance: - description: Appearance is the server default appearance. - type: string - description: - description: Description is the server description. - type: string - externalUrl: - description: ExternalURL is the external url of server. e.g. https://usermemos.com - type: string - locale: - description: Locale is the server default locale. - type: string - logoUrl: - description: LogoURL is the url of logo image. - type: string - name: - description: Name is the server name, default is `memos` - type: string - type: object - v1.DeleteTagRequest: - properties: - name: - type: string - type: object - v1.FieldMapping: - properties: - displayName: - type: string - email: - type: string - identifier: - type: string - type: object - v1.IdentityProvider: - properties: - config: - $ref: '#/definitions/v1.IdentityProviderConfig' - id: - type: integer - identifierFilter: - type: string - name: - type: string - type: - $ref: '#/definitions/v1.IdentityProviderType' - type: object - v1.IdentityProviderConfig: - properties: - oauth2Config: - $ref: '#/definitions/v1.IdentityProviderOAuth2Config' - type: object - v1.IdentityProviderOAuth2Config: - properties: - authUrl: - type: string - clientId: - type: string - clientSecret: - type: string - fieldMapping: - $ref: '#/definitions/v1.FieldMapping' - scopes: - items: - type: string - type: array - tokenUrl: - type: string - userInfoUrl: - type: string - type: object - v1.IdentityProviderType: - enum: - - OAUTH2 - type: string - x-enum-varnames: - - IdentityProviderOAuth2Type - v1.MemoRelationType: - enum: - - REFERENCE - - ADDITIONAL - type: string - x-enum-varnames: - - MemoRelationReference - - MemoRelationAdditional - v1.PatchMemoRequest: - properties: - content: - description: Domain specific fields - type: string - createdTs: - description: Standard fields - type: integer - relationList: - items: - $ref: '#/definitions/v1.UpsertMemoRelationRequest' - type: array - resourceIdList: - description: Related fields - items: - type: integer - type: array - rowStatus: - $ref: '#/definitions/v1.RowStatus' - updatedTs: - type: integer - visibility: - $ref: '#/definitions/v1.Visibility' - type: object - v1.Role: - enum: - - HOST - - ADMIN - - USER - type: string - x-enum-varnames: - - RoleHost - - RoleAdmin - - RoleUser - v1.RowStatus: - enum: - - NORMAL - - ARCHIVED - type: string - x-enum-varnames: - - Normal - - Archived - v1.SSOSignIn: - properties: - code: - type: string - identityProviderId: - type: integer - redirectUri: - type: string - type: object - v1.SignIn: - properties: - password: - type: string - username: - type: string - type: object - v1.SignUp: - properties: - password: - type: string - username: - type: string - type: object - v1.StorageConfig: - properties: - s3Config: - $ref: '#/definitions/v1.StorageS3Config' - type: object - v1.StorageS3Config: - properties: - accessKey: - type: string - bucket: - type: string - endPoint: - type: string - path: - type: string - region: - type: string - secretKey: - type: string - urlPrefix: - type: string - urlSuffix: - type: string - type: object - v1.StorageType: - enum: - - S3 - type: string - x-enum-varnames: - - StorageS3 - v1.SystemSetting: - properties: - description: - type: string - name: - $ref: '#/definitions/v1.SystemSettingName' - value: - description: Value is a JSON string with basic value. - type: string - type: object - v1.SystemSettingName: - enum: - - server-id - - secret-session - - allow-signup - - disable-password-login - - disable-public-memos - - max-upload-size-mib - - additional-style - - additional-script - - customized-profile - - storage-service-id - - local-storage-path - - telegram-bot-token - - memo-display-with-updated-ts - - auto-backup-interval - type: string - x-enum-varnames: - - SystemSettingServerIDName - - SystemSettingSecretSessionName - - SystemSettingAllowSignUpName - - SystemSettingDisablePasswordLoginName - - SystemSettingDisablePublicMemosName - - SystemSettingMaxUploadSizeMiBName - - SystemSettingAdditionalStyleName - - SystemSettingAdditionalScriptName - - SystemSettingCustomizedProfileName - - SystemSettingStorageServiceIDName - - SystemSettingLocalStoragePathName - - SystemSettingTelegramBotTokenName - - SystemSettingMemoDisplayWithUpdatedTsName - - SystemSettingAutoBackupIntervalName - v1.SystemStatus: - properties: - additionalScript: - description: Additional script. - type: string - additionalStyle: - description: Additional style. - type: string - allowSignUp: - description: |- - System settings - Allow sign up. - type: boolean - autoBackupInterval: - description: Auto Backup Interval. - type: integer - customizedProfile: - allOf: - - $ref: '#/definitions/v1.CustomizedProfile' - description: Customized server profile, including server name and external - url. - dbSize: - type: integer - disablePasswordLogin: - description: Disable password login. - type: boolean - disablePublicMemos: - description: Disable public memos. - type: boolean - host: - $ref: '#/definitions/v1.User' - localStoragePath: - description: Local storage path. - type: string - maxUploadSizeMiB: - description: Max upload size. - type: integer - memoDisplayWithUpdatedTs: - description: Memo display with updated timestamp. - type: boolean - profile: - $ref: '#/definitions/profile.Profile' - storageServiceId: - description: Storage service ID. - type: integer - type: object - v1.UpdateIdentityProviderRequest: - properties: - config: - $ref: '#/definitions/v1.IdentityProviderConfig' - identifierFilter: - type: string - name: - type: string - type: - $ref: '#/definitions/v1.IdentityProviderType' - type: object - v1.UpdateResourceRequest: - properties: - filename: - type: string - type: object - v1.UpdateStorageRequest: - properties: - config: - $ref: '#/definitions/v1.StorageConfig' - name: - type: string - type: - $ref: '#/definitions/v1.StorageType' - type: object - v1.UpdateUserRequest: - properties: - avatarUrl: - type: string - email: - type: string - nickname: - type: string - password: - type: string - rowStatus: - $ref: '#/definitions/v1.RowStatus' - username: - type: string - type: object - v1.UpsertMemoOrganizerRequest: - properties: - pinned: - type: boolean - type: object - v1.UpsertMemoRelationRequest: - properties: - relatedMemoId: - type: integer - type: - $ref: '#/definitions/v1.MemoRelationType' - type: object - v1.UpsertSystemSettingRequest: - properties: - description: - type: string - name: - $ref: '#/definitions/v1.SystemSettingName' - value: - type: string - type: object - v1.UpsertTagRequest: - properties: - name: - type: string - type: object - v1.UpsertUserSettingRequest: - properties: - key: - $ref: '#/definitions/v1.UserSettingKey' - value: - type: string - type: object - v1.User: - properties: - avatarUrl: - type: string - createdTs: - type: integer - email: - type: string - id: - type: integer - nickname: - type: string - role: - $ref: '#/definitions/v1.Role' - rowStatus: - allOf: - - $ref: '#/definitions/v1.RowStatus' - description: Standard fields - updatedTs: - type: integer - userSettingList: - items: - $ref: '#/definitions/v1.UserSetting' - type: array - username: - description: Domain specific fields - type: string - type: object - v1.UserSetting: - properties: - key: - $ref: '#/definitions/v1.UserSettingKey' - userId: - type: integer - value: - type: string - type: object - v1.UserSettingKey: - enum: - - locale - - appearance - - memo-visibility - - telegram-user-id - type: string - x-enum-varnames: - - UserSettingLocaleKey - - UserSettingAppearanceKey - - UserSettingMemoVisibilityKey - - UserSettingTelegramUserIDKey - v1.Visibility: - enum: - - PUBLIC - - PROTECTED - - PRIVATE - type: string - x-enum-varnames: - - Public - - Protected - - Private externalDocs: description: Find out more about Memos. url: https://usememos.com/ @@ -721,7 +1088,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.SignIn' + $ref: '#/definitions/github_com_usememos_memos_api_v1.SignIn' produces: - application/json responses: @@ -753,7 +1120,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.SSOSignIn' + $ref: '#/definitions/github_com_usememos_memos_api_v1.SSOSignIn' produces: - application/json responses: @@ -801,7 +1168,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.SignUp' + $ref: '#/definitions/github_com_usememos_memos_api_v1.SignUp' produces: - application/json responses: @@ -834,7 +1201,7 @@ paths: description: List of available identity providers schema: items: - $ref: '#/definitions/v1.IdentityProvider' + $ref: '#/definitions/github_com_usememos_memos_api_v1.IdentityProvider' type: array "500": description: Failed to find identity provider list | Failed to find user @@ -850,7 +1217,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.CreateIdentityProviderRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateIdentityProviderRequest' produces: - application/json responses: @@ -935,7 +1302,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.UpdateIdentityProviderRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateIdentityProviderRequest' produces: - application/json responses: @@ -1020,7 +1387,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.CreateMemoRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateMemoRequest' produces: - application/json responses: @@ -1117,7 +1484,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.PatchMemoRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.PatchMemoRequest' produces: - application/json responses: @@ -1154,7 +1521,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.UpsertMemoOrganizerRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpsertMemoOrganizerRequest' produces: - application/json responses: @@ -1216,7 +1583,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.UpsertMemoRelationRequest' + $ref: '#/definitions/api_v1.UpsertMemoRelationRequest' produces: - application/json responses: @@ -1250,7 +1617,7 @@ paths: - description: Type of relation to remove enum: - REFERENCE - - ADDITIONAL + - COMMENT in: path name: relationType required: true @@ -1376,7 +1743,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.CreateResourceRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest' produces: - application/json responses: @@ -1434,7 +1801,7 @@ paths: name: patch required: true schema: - $ref: '#/definitions/v1.UpdateResourceRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest' produces: - application/json responses: @@ -1489,7 +1856,7 @@ paths: "200": description: System GetSystemStatus schema: - $ref: '#/definitions/v1.SystemStatus' + $ref: '#/definitions/github_com_usememos_memos_api_v1.SystemStatus' "401": description: Missing user in session | Unauthorized "500": @@ -1525,7 +1892,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.CreateStorageRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateStorageRequest' produces: - application/json responses: @@ -1580,7 +1947,7 @@ paths: name: patch required: true schema: - $ref: '#/definitions/v1.UpdateStorageRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateStorageRequest' produces: - application/json responses: @@ -1608,7 +1975,7 @@ paths: description: System setting list schema: items: - $ref: '#/definitions/v1.SystemSetting' + $ref: '#/definitions/api_v1.SystemSetting' type: array "401": description: Missing user in session | Unauthorized @@ -1626,7 +1993,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.UpsertSystemSettingRequest' + $ref: '#/definitions/api_v1.UpsertSystemSettingRequest' produces: - application/json responses: @@ -1688,7 +2055,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.UpsertTagRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpsertTagRequest' produces: - application/json responses: @@ -1715,7 +2082,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.DeleteTagRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.DeleteTagRequest' produces: - application/json responses: @@ -1775,7 +2142,7 @@ paths: name: body required: true schema: - $ref: '#/definitions/v1.CreateUserRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateUserRequest' produces: - application/json responses: @@ -1857,7 +2224,7 @@ paths: name: patch required: true schema: - $ref: '#/definitions/v1.UpdateUserRequest' + $ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateUserRequest' produces: - application/json responses: @@ -1916,34 +2283,6 @@ paths: summary: Get user by username tags: - user - /api/v1/user/setting: - post: - consumes: - - application/json - parameters: - - description: Request object. - in: body - name: body - required: true - schema: - $ref: '#/definitions/v1.UpsertUserSettingRequest' - produces: - - application/json - responses: - "200": - description: Created user setting - schema: - $ref: '#/definitions/github_com_usememos_memos_store.UserSetting' - "400": - description: Malformatted post user setting upsert request | Invalid user - setting format - "401": - description: Missing auth session - "500": - description: Failed to upsert user setting - summary: Upsert user setting - tags: - - user-setting /explore/rss.xml: get: produces: @@ -1977,38 +2316,7 @@ paths: description: Failed to write GetImage blob summary: Get GetImage from URL tags: - - get - /o/r/{resourceId}: - get: - description: '*Swagger UI may have problems displaying other file types than - images' - parameters: - - description: Resource ID - in: path - name: resourceId - required: true - type: integer - - description: Thumbnail - in: query - name: thumbnail - type: integer - produces: - - application/octet-stream - responses: - "200": - description: Requested resource - "400": - description: 'ID is not a number: %s | Failed to get resource visibility' - "401": - description: Resource visibility not match - "404": - description: 'Resource not found: %d' - "500": - description: 'Failed to find resource by ID: %v | Failed to open the local - resource: %s | Failed to read the local resource: %s' - summary: Stream a resource - tags: - - resource + - image-url /u/{id}/rss.xml: get: parameters: diff --git a/docs/api/v1.md b/docs/api/v1.md index 0514b975..48b7704f 100644 --- a/docs/api/v1.md +++ b/docs/api/v1.md @@ -6,7 +6,7 @@ A privacy-first, lightweight note-taking service. **Contact information:** API Support - +https://github.com/orgs/usememos/discussions **License:** [MIT License](https://github.com/usememos/memos/blob/main/LICENSE) @@ -24,9 +24,9 @@ Sign-in to memos. ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | -------------- | -------- | ---------------------- | -| body | body | Sign-in object | Yes | [v1.SignIn](#v1signin) | +| 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 @@ -48,9 +48,9 @@ Sign-in to memos using SSO. ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ------------------ | -------- | ---------------------------- | -| body | body | SSO sign-in object | Yes | [v1.SSOSignIn](#v1ssosignin) | +| 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 @@ -87,9 +87,9 @@ Sign-up to memos. ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | -------------- | -------- | ---------------------- | -| body | body | Sign-up object | Yes | [v1.SignUp](#v1signup) | +| 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 @@ -118,10 +118,10 @@ Get a list of identity providers ##### Responses -| Code | Description | Schema | -| ---- | ------------------------------------------------------------ | ---------------------------------------------- | -| 200 | List of available identity providers | [ [v1.IdentityProvider](#v1identityprovider) ] | -| 500 | Failed to find identity provider list \| Failed to find user | | +| 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 @@ -131,9 +131,9 @@ Create Identity Provider ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------------------------- | -------- | -------------------------------------------------------------------- | -| body | body | Identity provider information | Yes | [v1.CreateIdentityProviderRequest](#v1createidentityproviderrequest) | +| 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 @@ -197,10 +197,10 @@ 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 | [v1.UpdateIdentityProviderRequest](#v1updateidentityproviderrequest) | +| 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 @@ -255,9 +255,9 @@ Visibility can be PUBLIC, PROTECTED or PRIVATE ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | -------------------------------------------- | -| body | body | Request object. | Yes | [v1.CreateMemoRequest](#v1creatememorequest) | +| 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 @@ -329,10 +329,10 @@ Visibility can be PUBLIC, PROTECTED or PRIVATE ##### Parameters -| Name | Located in | Description | Required | Schema | -| ------ | ---------- | -------------------- | -------- | ------------------------------------------ | -| memoId | path | ID of memo to update | Yes | integer | -| body | body | Patched object. | Yes | [v1.PatchMemoRequest](#v1patchmemorequest) | +| 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 @@ -410,10 +410,10 @@ 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 | [v1.UpsertMemoOrganizerRequest](#v1upsertmemoorganizerrequest) | +| 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 @@ -461,10 +461,10 @@ 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 | [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) | +| 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 @@ -528,11 +528,11 @@ Get system GetSystemStatus ##### Responses -| Code | Description | Schema | -| ---- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -| 200 | System GetSystemStatus | [v1.SystemStatus](#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 | | +| 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 @@ -583,9 +583,9 @@ Create resource ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ---------------------------------------------------- | -| body | body | Request object. | Yes | [v1.CreateResourceRequest](#v1createresourcerequest) | +| 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 @@ -628,10 +628,10 @@ Update a resource ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---------- | ---------- | ---------------------- | -------- | ---------------------------------------------------- | -| resourceId | path | Resource ID | Yes | integer | -| patch | body | Patch resource request | Yes | [v1.UpdateResourceRequest](#v1updateresourcerequest) | +| 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 @@ -666,35 +666,6 @@ Upload resource | 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 | | -### /o/r/{resourceId} - -#### GET - -##### Summary - -Stream a resource - -##### Description - -\*Swagger UI may have problems displaying other file types than images - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---------- | ---------- | ----------- | -------- | ------- | -| resourceId | path | Resource ID | Yes | integer | -| thumbnail | query | Thumbnail | No | integer | - -##### Responses - -| Code | Description | -| ---- | ------------------------------------------------------------------------------------------------------------------- | -| 200 | Requested resource | -| 400 | ID is not a number: %s \| Failed to get resource visibility | -| 401 | Resource visibility not match | -| 404 | Resource not found: %d | -| 500 | Failed to find resource by ID: %v \| Failed to open the local resource: %s \| Failed to read the local resource: %s | - --- ### /api/v1/storage @@ -721,9 +692,9 @@ Create storage ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | -------------------------------------------------- | -| body | body | Request object. | Yes | [v1.CreateStorageRequest](#v1createstoragerequest) | +| 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 @@ -765,10 +736,10 @@ Update a storage ##### Parameters -| Name | Located in | Description | Required | Schema | -| --------- | ---------- | ------------- | -------- | -------------------------------------------------- | -| storageId | path | Storage ID | Yes | integer | -| patch | body | Patch request | Yes | [v1.UpdateStorageRequest](#v1updatestoragerequest) | +| 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 @@ -791,11 +762,11 @@ Get a list of system settings ##### Responses -| Code | Description | Schema | -| ---- | --------------------------------------------------------- | ---------------------------------------- | -| 200 | System setting list | [ [v1.SystemSetting](#v1systemsetting) ] | -| 401 | Missing user in session \| Unauthorized | | -| 500 | Failed to find user \| Failed to find system setting list | | +| 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 @@ -805,9 +776,9 @@ Create system setting ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | -------------------------------------------------------------- | -| body | body | Request object. | Yes | [v1.UpsertSystemSettingRequest](#v1upsertsystemsettingrequest) | +| Name | Located in | Description | Required | Schema | +| ---- | ---------- | --------------- | -------- | ---------------------------------------------------------------------- | +| body | body | Request object. | Yes | [api_v1.UpsertSystemSettingRequest](#api_v1upsertsystemsettingrequest) | ##### Responses @@ -845,9 +816,9 @@ Create a tag ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ------------------------------------------ | -| body | body | Request object. | Yes | [v1.UpsertTagRequest](#v1upserttagrequest) | +| 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 @@ -868,9 +839,9 @@ Delete a tag ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ------------------------------------------ | -| body | body | Request object. | Yes | [v1.DeleteTagRequest](#v1deletetagrequest) | +| 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 @@ -922,9 +893,9 @@ Create a user ##### Parameters -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | -------------- | -------- | -------------------------------------------- | -| body | body | Request object | Yes | [v1.CreateUserRequest](#v1createuserrequest) | +| 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 @@ -989,10 +960,10 @@ Update a user ##### Parameters -| Name | Located in | Description | Required | Schema | -| ----- | ---------- | ------------- | -------- | -------------------------------------------- | -| id | path | User ID | Yes | string | -| patch | body | Patch request | Yes | [v1.UpdateUserRequest](#v1updateuserrequest) | +| 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 @@ -1044,31 +1015,6 @@ Get user by username --- -### /api/v1/user/setting - -#### POST - -##### Summary - -Upsert user setting - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | --------------- | -------- | ---------------------------------------------------------- | -| body | body | Request object. | Yes | [v1.UpsertUserSettingRequest](#v1upsertusersettingrequest) | - -##### Responses - -| Code | Description | Schema | -| ---- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| 200 | Created user setting | [github_com_usememos_memos_store.UserSetting](#github_com_usememos_memos_storeusersetting) | -| 400 | Malformatted post user setting upsert request \| Invalid user setting format | | -| 401 | Missing auth session | | -| 500 | Failed to upsert user setting | | - ---- - ### /explore/rss.xml #### GET @@ -1134,22 +1080,602 @@ Get GetImage from URL ### Models -#### github_com_usememos_memos_store.UserSetting +#### 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 | + +#### 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 | | ------ | ------- | ----------- | -------- | -| key | string | | No | -| userID | integer | | No | -| value | string | | No | +| 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 | + +#### 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 | -| ------- | ------ | --------------------------------------------- | -------- | -| driver | string | Driver is the database driver sqlite, mysql | No | -| dsn | string | DSN points to where Memos stores its own data | No | -| mode | string | Mode can be "prod" or "dev" or "demo" | No | -| version | string | Version is the current version of server | No | +| 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 @@ -1195,19 +1721,16 @@ Get GetImage from URL #### store.Memo -| Name | Type | Description | Required | -| -------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | -| content | string | Domain specific fields | No | -| createdTs | integer | | No | -| creatorID | integer | | No | -| id | integer | | No | -| parentID | integer | Composed fields For those comment memos, the parent ID is the memo ID of the memo being commented. If the parent ID is nil, then this memo is not a comment. | No | -| pinned | boolean | | No | -| relationList | [ [store.MemoRelation](#storememorelation) ] | | No | -| resourceIDList | [ integer ] | | No | -| rowStatus | [store.RowStatus](#storerowstatus) | Standard fields | No | -| updatedTs | integer | | No | -| visibility | [store.Visibility](#storevisibility) | | No | +| 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 @@ -1288,320 +1811,3 @@ Get GetImage from URL | Name | Type | Description | Required | | ---------------- | ------ | ----------- | -------- | | store.Visibility | string | | | - -#### v1.CreateIdentityProviderRequest - -| Name | Type | Description | Required | -| ---------------- | ------------------------------------------------------ | ----------- | -------- | -| config | [v1.IdentityProviderConfig](#v1identityproviderconfig) | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [v1.IdentityProviderType](#v1identityprovidertype) | | No | - -#### v1.CreateMemoRequest - -| Name | Type | Description | Required | -| -------------- | ---------------------------------------------------------------- | ---------------------- | -------- | -| content | string | | No | -| createdTs | integer | | No | -| relationList | [ [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) ] | | No | -| resourceIdList | [ integer ] | Related fields | No | -| visibility | [v1.Visibility](#v1visibility) | Domain specific fields | No | - -#### v1.CreateResourceRequest - -| Name | Type | Description | Required | -| ------------ | ------ | ----------- | -------- | -| externalLink | string | | No | -| filename | string | | No | -| type | string | | No | - -#### v1.CreateStorageRequest - -| Name | Type | Description | Required | -| ------ | ------------------------------------ | ----------- | -------- | -| config | [v1.StorageConfig](#v1storageconfig) | | No | -| name | string | | No | -| type | [v1.StorageType](#v1storagetype) | | No | - -#### v1.CreateUserRequest - -| Name | Type | Description | Required | -| -------- | ------------------ | ----------- | -------- | -| email | string | | No | -| nickname | string | | No | -| password | string | | No | -| role | [v1.Role](#v1role) | | No | -| username | string | | No | - -#### 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. | 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 | - -#### v1.DeleteTagRequest - -| Name | Type | Description | Required | -| ---- | ------ | ----------- | -------- | -| name | string | | No | - -#### v1.FieldMapping - -| Name | Type | Description | Required | -| ----------- | ------ | ----------- | -------- | -| displayName | string | | No | -| email | string | | No | -| identifier | string | | No | - -#### v1.IdentityProvider - -| Name | Type | Description | Required | -| ---------------- | ------------------------------------------------------ | ----------- | -------- | -| config | [v1.IdentityProviderConfig](#v1identityproviderconfig) | | No | -| id | integer | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [v1.IdentityProviderType](#v1identityprovidertype) | | No | - -#### v1.IdentityProviderConfig - -| Name | Type | Description | Required | -| ------------ | ------------------------------------------------------------------ | ----------- | -------- | -| oauth2Config | [v1.IdentityProviderOAuth2Config](#v1identityprovideroauth2config) | | No | - -#### v1.IdentityProviderOAuth2Config - -| Name | Type | Description | Required | -| ------------ | ---------------------------------- | ----------- | -------- | -| authUrl | string | | No | -| clientId | string | | No | -| clientSecret | string | | No | -| fieldMapping | [v1.FieldMapping](#v1fieldmapping) | | No | -| scopes | [ string ] | | No | -| tokenUrl | string | | No | -| userInfoUrl | string | | No | - -#### v1.IdentityProviderType - -| Name | Type | Description | Required | -| ----------------------- | ------ | ----------- | -------- | -| v1.IdentityProviderType | string | | | - -#### v1.MemoRelationType - -| Name | Type | Description | Required | -| ------------------- | ------ | ----------- | -------- | -| v1.MemoRelationType | string | | | - -#### v1.PatchMemoRequest - -| Name | Type | Description | Required | -| -------------- | ---------------------------------------------------------------- | ---------------------- | -------- | -| content | string | Domain specific fields | No | -| createdTs | integer | Standard fields | No | -| relationList | [ [v1.UpsertMemoRelationRequest](#v1upsertmemorelationrequest) ] | | No | -| resourceIdList | [ integer ] | Related fields | No | -| rowStatus | [v1.RowStatus](#v1rowstatus) | | No | -| updatedTs | integer | | No | -| visibility | [v1.Visibility](#v1visibility) | | No | - -#### v1.Role - -| Name | Type | Description | Required | -| ------- | ------ | ----------- | -------- | -| v1.Role | string | | | - -#### v1.RowStatus - -| Name | Type | Description | Required | -| ------------ | ------ | ----------- | -------- | -| v1.RowStatus | string | | | - -#### v1.SSOSignIn - -| Name | Type | Description | Required | -| ------------------ | ------- | ----------- | -------- | -| code | string | | No | -| identityProviderId | integer | | No | -| redirectUri | string | | No | - -#### v1.SignIn - -| Name | Type | Description | Required | -| -------- | ------ | ----------- | -------- | -| password | string | | No | -| username | string | | No | - -#### v1.SignUp - -| Name | Type | Description | Required | -| -------- | ------ | ----------- | -------- | -| password | string | | No | -| username | string | | No | - -#### v1.StorageConfig - -| Name | Type | Description | Required | -| -------- | ---------------------------------------- | ----------- | -------- | -| s3Config | [v1.StorageS3Config](#v1storages3config) | | No | - -#### 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 | - -#### v1.StorageType - -| Name | Type | Description | Required | -| -------------- | ------ | ----------- | -------- | -| v1.StorageType | string | | | - -#### v1.SystemSetting - -| Name | Type | Description | Required | -| ----------- | -------------------------------------------- | ---------------------------------------- | -------- | -| description | string | | No | -| name | [v1.SystemSettingName](#v1systemsettingname) | | No | -| value | string | Value is a JSON string with basic value. | No | - -#### v1.SystemSettingName - -| Name | Type | Description | Required | -| -------------------- | ------ | ----------- | -------- | -| v1.SystemSettingName | string | | | - -#### v1.SystemStatus - -| Name | Type | Description | Required | -| ------------------------ | -------------------------------------------- | ------------------------------------------------------------------ | -------- | -| additionalScript | string | Additional script. | No | -| additionalStyle | string | Additional style. | No | -| allowSignUp | boolean | System settings Allow sign up. | No | -| autoBackupInterval | integer | Auto Backup Interval. | No | -| customizedProfile | [v1.CustomizedProfile](#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 | [v1.User](#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 | - -#### v1.UpdateIdentityProviderRequest - -| Name | Type | Description | Required | -| ---------------- | ------------------------------------------------------ | ----------- | -------- | -| config | [v1.IdentityProviderConfig](#v1identityproviderconfig) | | No | -| identifierFilter | string | | No | -| name | string | | No | -| type | [v1.IdentityProviderType](#v1identityprovidertype) | | No | - -#### v1.UpdateResourceRequest - -| Name | Type | Description | Required | -| -------- | ------ | ----------- | -------- | -| filename | string | | No | - -#### v1.UpdateStorageRequest - -| Name | Type | Description | Required | -| ------ | ------------------------------------ | ----------- | -------- | -| config | [v1.StorageConfig](#v1storageconfig) | | No | -| name | string | | No | -| type | [v1.StorageType](#v1storagetype) | | No | - -#### v1.UpdateUserRequest - -| Name | Type | Description | Required | -| --------- | ---------------------------- | ----------- | -------- | -| avatarUrl | string | | No | -| email | string | | No | -| nickname | string | | No | -| password | string | | No | -| rowStatus | [v1.RowStatus](#v1rowstatus) | | No | -| username | string | | No | - -#### v1.UpsertMemoOrganizerRequest - -| Name | Type | Description | Required | -| ------ | ------- | ----------- | -------- | -| pinned | boolean | | No | - -#### v1.UpsertMemoRelationRequest - -| Name | Type | Description | Required | -| ------------- | ------------------------------------------ | ----------- | -------- | -| relatedMemoId | integer | | No | -| type | [v1.MemoRelationType](#v1memorelationtype) | | No | - -#### v1.UpsertSystemSettingRequest - -| Name | Type | Description | Required | -| ----------- | -------------------------------------------- | ----------- | -------- | -| description | string | | No | -| name | [v1.SystemSettingName](#v1systemsettingname) | | No | -| value | string | | No | - -#### v1.UpsertTagRequest - -| Name | Type | Description | Required | -| ---- | ------ | ----------- | -------- | -| name | string | | No | - -#### v1.UpsertUserSettingRequest - -| Name | Type | Description | Required | -| ----- | -------------------------------------- | ----------- | -------- | -| key | [v1.UserSettingKey](#v1usersettingkey) | | No | -| value | string | | No | - -#### v1.User - -| Name | Type | Description | Required | -| --------------- | ------------------------------------ | ---------------------- | -------- | -| avatarUrl | string | | No | -| createdTs | integer | | No | -| email | string | | No | -| id | integer | | No | -| nickname | string | | No | -| role | [v1.Role](#v1role) | | No | -| rowStatus | [v1.RowStatus](#v1rowstatus) | Standard fields | No | -| updatedTs | integer | | No | -| userSettingList | [ [v1.UserSetting](#v1usersetting) ] | | No | -| username | string | Domain specific fields | No | - -#### v1.UserSetting - -| Name | Type | Description | Required | -| ------ | -------------------------------------- | ----------- | -------- | -| key | [v1.UserSettingKey](#v1usersettingkey) | | No | -| userId | integer | | No | -| value | string | | No | - -#### v1.UserSettingKey - -| Name | Type | Description | Required | -| ----------------- | ------ | ----------- | -------- | -| v1.UserSettingKey | string | | | - -#### v1.Visibility - -| Name | Type | Description | Required | -| ------------- | ------ | ----------- | -------- | -| v1.Visibility | string | | |