diff --git a/src/server/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts index ba366cdeb888a7dfd5416e04fea25d27a1e1de59..9db60d2661ab04c5bf4633fc0be26846c0f5fa0f 100644 --- a/src/server/api/endpoints/app/create.ts +++ b/src/server/api/endpoints/app/create.ts @@ -9,25 +9,69 @@ export const meta = { tags: ['app'], requireCredential: false, + + desc: { + 'ja-JP': 'アプリを作æˆã—ã¾ã™ã€‚', + 'en-US': 'Create a application.' + }, params: { name: { - validator: $.str + validator: $.str, + desc: { + 'ja-JP': 'アプリã®åå‰', + 'en-US': 'Name of application' + } }, description: { - validator: $.str + validator: $.str, + desc: { + 'ja-JP': 'アプリã®èª¬æ˜Ž', + 'en-US': 'Description of application' + } }, permission: { - validator: $.arr($.str).unique() + validator: $.arr($.str).unique(), + desc: { + 'ja-JP': 'ã“ã®ã‚¢ãƒ—リã«å‰²ã‚Šå½“ã¦ã‚‹æ¨©é™ï¼ˆæ¨©é™ã«ã¤ã„ã¦ã¯"Permissions"ã‚’å‚照)', + 'en-US': 'Permissions assigned to this app (see "Permissions" for the permissions)' + } }, // TODO: Check it is valid url callbackUrl: { validator: $.optional.nullable.str, - default: null as any + default: null as any, + desc: { + 'ja-JP': 'アプリèªè¨¼æ™‚ã«ã‚³ãƒ¼ãƒ«ãƒãƒƒã‚¯ã™ã‚‹URL', + 'en-US': 'URL to call back at app authentication' + } }, + }, + + res: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'アプリケーションã®ID' + }, + name: { + type: 'string', + description: 'アプリケーションã®åå‰' + }, + callbackUrl: { + type: 'string', + nullable: true, + description: 'コールãƒãƒƒã‚¯ã™ã‚‹URL' + }, + secret: { + type: 'string', + description: 'アプリケーションã®ã‚·ãƒ¼ã‚¯ãƒ¬ãƒƒãƒˆã‚ー' + } + } } }; diff --git a/src/server/api/endpoints/auth/session/generate.ts b/src/server/api/endpoints/auth/session/generate.ts index 5a9bfe6451cdfe278f9a754daa4b278a087bc77f..bca8d33483686927a3f29664a0c2f19686abe569 100644 --- a/src/server/api/endpoints/auth/session/generate.ts +++ b/src/server/api/endpoints/auth/session/generate.ts @@ -10,6 +10,11 @@ export const meta = { tags: ['auth'], requireCredential: false, + + desc: { + 'ja-JP': 'アプリをèªè¨¼ã™ã‚‹ãŸã‚ã®ãƒˆãƒ¼ã‚¯ãƒ³ã‚’作æˆã—ã¾ã™ã€‚', + 'en-US': 'Generate a token for authorize application.' + }, params: { appSecret: {