diff --git a/dictation_function/codegen.sh b/dictation_function/codegen.sh new file mode 100644 index 0000000..19b9e9a --- /dev/null +++ b/dictation_function/codegen.sh @@ -0,0 +1,2 @@ +npx openapi-generator-cli version-manager set 7.1.0 +npx openapi-generator-cli generate -g typescript-axios -i /app/dictation_function/src/api/odms/openapi.json -o /app/dictation_function/src/api/ diff --git a/dictation_function/openapitools.json b/dictation_function/openapitools.json new file mode 100644 index 0000000..15fef60 --- /dev/null +++ b/dictation_function/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.1.0" + } +} diff --git a/dictation_function/package-lock.json b/dictation_function/package-lock.json index 8ebaf00..499c39b 100644 --- a/dictation_function/package-lock.json +++ b/dictation_function/package-lock.json @@ -9,6 +9,7 @@ "dependencies": { "@azure/functions": "^4.0.0", "@azure/identity": "^3.1.3", + "@azure/storage-blob": "^12.17.0", "@microsoft/microsoft-graph-client": "^3.0.5", "@sendgrid/mail": "^7.7.0", "dotenv": "^16.0.3", @@ -17,11 +18,13 @@ "typeorm": "^0.3.10" }, "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.9.0", "@types/jest": "^27.5.0", "@types/node": "18.x", "@types/redis": "^2.8.13", "@types/redis-mock": "^0.17.3", "azure-functions-core-tools": "^4.x", + "base64url": "^3.0.1", "jest": "^28.0.3", "redis-mock": "^0.56.3", "rimraf": "^5.0.0", @@ -85,6 +88,103 @@ "node": ">=14.0.0" } }, + "node_modules/@azure/core-http": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.4.tgz", + "integrity": "sha512-Fok9VVhMdxAFOtqiiAtg74fL0UJkt0z3D+ouUUxcRLzZNBioPRAMJFVxiWoJljYpXsRi4GDQHzQHDc9AiYaIUQ==", + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/core-util": "^1.1.1", + "@azure/logger": "^1.0.0", + "@types/node-fetch": "^2.5.0", + "@types/tunnel": "^0.0.3", + "form-data": "^4.0.0", + "node-fetch": "^2.6.7", + "process": "^0.11.10", + "tslib": "^2.2.0", + "tunnel": "^0.0.6", + "uuid": "^8.3.0", + "xml2js": "^0.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@azure/core-http/node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dependencies": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@azure/core-http/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@azure/core-http/node_modules/xml2js": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "dependencies": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/@azure/core-lro": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.6.0.tgz", + "integrity": "sha512-PyRNcaIOfMgoUC01/24NoG+k8O81VrKxYARnDlo+Q2xji0/0/j2nIt8BwQh294pb1c5QnXTDPbNR4KzoDKXEoQ==", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "@azure/core-util": "^1.2.0", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-lro/node_modules/@azure/abort-controller": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.0.0.tgz", + "integrity": "sha512-RP/mR/WJchR+g+nQFJGOec+nzeN/VvjlwbinccoqfhTsTHbb8X5+mLDp48kHT0ueyum0BNSwGm0kX0UZuIqTGg==", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure/core-paging": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.5.0.tgz", + "integrity": "sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@azure/core-rest-pipeline": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.2.tgz", @@ -261,6 +361,36 @@ "node": ">=0.8.0" } }, + "node_modules/@azure/storage-blob": { + "version": "12.17.0", + "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.17.0.tgz", + "integrity": "sha512-sM4vpsCpcCApagRW5UIjQNlNylo02my2opgp0Emi8x888hZUvJ3dN69Oq20cEGXkMUWnoCrBaB0zyS3yeB87sQ==", + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-http": "^3.0.0", + "@azure/core-lro": "^2.2.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-tracing": "1.0.0-preview.13", + "@azure/logger": "^1.0.0", + "events": "^3.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@azure/storage-blob/node_modules/@azure/core-tracing": { + "version": "1.0.0-preview.13", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", + "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "dependencies": { + "@opentelemetry/api": "^1.0.1", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", @@ -1454,6 +1584,15 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@lukeed/csprng": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", + "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -1608,6 +1747,73 @@ } } }, + "node_modules/@nestjs/common": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-10.3.0.tgz", + "integrity": "sha512-DGv34UHsZBxCM3H5QGE2XE/+oLJzz5+714JQjBhjD9VccFlQs3LRxo/epso4l7nJIiNlZkPyIUC8WzfU/5RTsQ==", + "dev": true, + "dependencies": { + "iterare": "1.2.1", + "tslib": "2.6.2", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + } + }, + "node_modules/@nestjs/core": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-10.3.0.tgz", + "integrity": "sha512-N06P5ncknW/Pm8bj964WvLIZn2gNhHliCBoAO1LeBvNImYkecqKcrmLbY49Fa1rmMfEM3MuBHeDys3edeuYAOA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nuxtjs/opencollective": "0.3.2", + "fast-safe-stringify": "2.1.1", + "iterare": "1.2.1", + "path-to-regexp": "3.2.0", + "tslib": "2.6.2", + "uid": "2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nest" + }, + "peerDependencies": { + "@nestjs/common": "^10.0.0", + "@nestjs/microservices": "^10.0.0", + "@nestjs/platform-express": "^10.0.0", + "@nestjs/websockets": "^10.0.0", + "reflect-metadata": "^0.1.12", + "rxjs": "^7.1.0" + }, + "peerDependenciesMeta": { + "@nestjs/microservices": { + "optional": true + }, + "@nestjs/platform-express": { + "optional": true + }, + "@nestjs/websockets": { + "optional": true + } + } + }, "node_modules/@npmcli/fs": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", @@ -1724,6 +1930,147 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@nuxtjs/opencollective": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz", + "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "consola": "^2.15.0", + "node-fetch": "^2.6.1" + }, + "bin": { + "opencollective": "bin/opencollective.js" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-2.9.0.tgz", + "integrity": "sha512-KQpftKeiMoH5aEI/amOVLFGkGeT3DyA7Atj7v7l8xT3O9xnIUpoDmMg0WBTEh+NHxEwEAITQNDzr+JLjkXVaKw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@nestjs/axios": "3.0.1", + "@nestjs/common": "10.3.0", + "@nestjs/core": "10.3.0", + "@nuxtjs/opencollective": "0.3.2", + "axios": "1.6.5", + "chalk": "4.1.2", + "commander": "8.3.0", + "compare-versions": "4.1.4", + "concurrently": "6.5.1", + "console.table": "0.10.0", + "fs-extra": "10.1.0", + "glob": "7.2.3", + "inquirer": "8.2.6", + "lodash": "4.17.21", + "reflect-metadata": "0.1.13", + "rxjs": "7.8.1", + "tslib": "2.6.2" + }, + "bin": { + "openapi-generator-cli": "main.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/openapi_generator" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/axios": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@nestjs/axios/-/axios-3.0.1.tgz", + "integrity": "sha512-VlOZhAGDmOoFdsmewn8AyClAdGpKXQQaY1+3PGB+g6ceurGIdTxZgRX3VXc1T6Zs60PedWjg3A82TDOB05mrzQ==", + "dev": true, + "peerDependencies": { + "@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0", + "axios": "^1.3.1", + "reflect-metadata": "^0.1.12", + "rxjs": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/axios": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.4", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@openapitools/openapi-generator-cli/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@opentelemetry/api": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.7.0.tgz", + "integrity": "sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -1984,8 +2331,29 @@ "node_modules/@types/node": { "version": "18.18.6", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.6.tgz", - "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==", - "dev": true + "integrity": "sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==" + }, + "node_modules/@types/node-fetch": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, + "node_modules/@types/node-fetch/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } }, "node_modules/@types/prettier": { "version": "2.7.3", @@ -2017,6 +2385,14 @@ "integrity": "sha512-g7CK9nHdwjK2n0ymT2CW698FuWJRIx+RP6embAzZ2Qi8/ilIrA1Imt2LVSeHUzKvpoi7BhmmQcXz95eS0f2JXw==", "dev": true }, + "node_modules/@types/tunnel": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", + "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yargs": { "version": "17.0.29", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.29.tgz", @@ -2662,6 +3038,50 @@ } ] }, + "node_modules/base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -2977,6 +3397,12 @@ "node": ">=10" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "node_modules/chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", @@ -3017,6 +3443,18 @@ "node": ">=6" } }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/cli-highlight": { "version": "2.1.11", "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", @@ -3139,6 +3577,27 @@ "node": ">=10" } }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -3219,6 +3678,15 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/cluster-key-slot": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", @@ -3281,6 +3749,21 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/compare-versions": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-4.1.4.tgz", + "integrity": "sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==", + "dev": true + }, "node_modules/component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -3292,12 +3775,196 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/concurrently": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.5.1.tgz", + "integrity": "sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/concurrently/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/concurrently/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/concurrently/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/concurrently/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/concurrently/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "devOptional": true }, + "node_modules/console.table": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz", + "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==", + "dev": true, + "dependencies": { + "easy-table": "1.1.0" + }, + "engines": { + "node": "> 0.10" + } + }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -3369,6 +4036,18 @@ "node": ">=0.10.0" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", @@ -3454,6 +4133,15 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, + "node_modules/easy-table": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz", + "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==", + "dev": true, + "optionalDependencies": { + "wcwidth": ">=1.0.1" + } + }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -3490,7 +4178,6 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -3614,6 +4301,32 @@ "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" } }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3635,6 +4348,30 @@ "bser": "2.1.1" } }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3661,9 +4398,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -3719,6 +4456,20 @@ "url": "https://ko-fi.com/tunnckoCore/commissions" } }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -4166,6 +4917,102 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/inquirer/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/inquirer/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/ioredis": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ioredis/-/ioredis-5.3.2.tgz", @@ -4247,6 +5094,15 @@ "node": ">=6" } }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -4280,6 +5136,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -4363,6 +5231,15 @@ "node": ">=8" } }, + "node_modules/iterare": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", + "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/jackspeak": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", @@ -5093,6 +5970,18 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/jsonwebtoken": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", @@ -5213,6 +6102,12 @@ "node": ">=8" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "node_modules/lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", @@ -5268,6 +6163,22 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -5661,6 +6572,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, "node_modules/mysql2": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.3.tgz", @@ -5745,7 +6662,6 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "devOptional": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -6094,6 +7010,59 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -6245,6 +7214,12 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-to-regexp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz", + "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -6320,6 +7295,14 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -6354,6 +7337,12 @@ "node": ">= 6" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/qs": { "version": "6.11.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", @@ -6513,6 +7502,25 @@ "node": ">=10" } }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -6541,6 +7549,24 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6815,6 +7841,12 @@ "source-map": "^0.6.0" } }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg==", + "dev": true + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -7291,6 +8323,24 @@ "node": ">=0.8" } }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -7321,8 +8371,16 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "devOptional": true + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } }, "node_modules/ts-jest": { "version": "28.0.1", @@ -7408,6 +8466,14 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -7588,6 +8654,18 @@ "node": ">=4.2.0" } }, + "node_modules/uid": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", + "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", + "dev": true, + "dependencies": { + "@lukeed/csprng": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/undici": { "version": "5.26.4", "resolved": "https://registry.npmjs.org/undici/-/undici-5.26.4.tgz", @@ -7619,6 +8697,15 @@ "imurmurhash": "^0.1.4" } }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/update-browserslist-db": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", @@ -7692,17 +8779,24 @@ "makeerror": "1.0.12" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "devOptional": true + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "devOptional": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" diff --git a/dictation_function/package.json b/dictation_function/package.json index 33f2287..fce3022 100644 --- a/dictation_function/package.json +++ b/dictation_function/package.json @@ -9,11 +9,13 @@ "clean": "rimraf dist", "prestart": "npm run clean && npm run build", "start": "func start", - "test": "jest" + "test": "jest", + "codegen": "sh codegen.sh" }, "dependencies": { "@azure/functions": "^4.0.0", "@azure/identity": "^3.1.3", + "@azure/storage-blob": "^12.17.0", "@microsoft/microsoft-graph-client": "^3.0.5", "@sendgrid/mail": "^7.7.0", "dotenv": "^16.0.3", @@ -22,11 +24,13 @@ "typeorm": "^0.3.10" }, "devDependencies": { + "@openapitools/openapi-generator-cli": "^2.9.0", "@types/jest": "^27.5.0", "@types/node": "18.x", "@types/redis": "^2.8.13", "@types/redis-mock": "^0.17.3", "azure-functions-core-tools": "^4.x", + "base64url": "^3.0.1", "jest": "^28.0.3", "redis-mock": "^0.56.3", "rimraf": "^5.0.0", diff --git a/dictation_function/src/adb2c/types/types.ts b/dictation_function/src/adb2c/types/types.ts index a7261ef..1c5d0f8 100644 --- a/dictation_function/src/adb2c/types/types.ts +++ b/dictation_function/src/adb2c/types/types.ts @@ -1,5 +1,5 @@ export type AdB2cResponse = { - '@odata.context': string; + "@odata.context": string; value: AdB2cUser[]; }; export type AdB2cUser = { diff --git a/dictation_function/src/api/.gitignore b/dictation_function/src/api/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/dictation_function/src/api/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/dictation_function/src/api/.npmignore b/dictation_function/src/api/.npmignore new file mode 100644 index 0000000..999d88d --- /dev/null +++ b/dictation_function/src/api/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm \ No newline at end of file diff --git a/dictation_function/src/api/.openapi-generator-ignore b/dictation_function/src/api/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/dictation_function/src/api/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/dictation_function/src/api/.openapi-generator/FILES b/dictation_function/src/api/.openapi-generator/FILES new file mode 100644 index 0000000..a80cd4f --- /dev/null +++ b/dictation_function/src/api/.openapi-generator/FILES @@ -0,0 +1,8 @@ +.gitignore +.npmignore +api.ts +base.ts +common.ts +configuration.ts +git_push.sh +index.ts diff --git a/dictation_function/src/api/.openapi-generator/VERSION b/dictation_function/src/api/.openapi-generator/VERSION new file mode 100644 index 0000000..3769235 --- /dev/null +++ b/dictation_function/src/api/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.1.0 \ No newline at end of file diff --git a/dictation_function/src/api/api.ts b/dictation_function/src/api/api.ts new file mode 100644 index 0000000..b68f729 --- /dev/null +++ b/dictation_function/src/api/api.ts @@ -0,0 +1,8686 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * ODMSOpenAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +/** + * + * @export + * @interface AccessTokenResponse + */ +export interface AccessTokenResponse { + /** + * + * @type {string} + * @memberof AccessTokenResponse + */ + 'accessToken': string; +} +/** + * + * @export + * @interface Account + */ +export interface Account { + /** + * + * @type {number} + * @memberof Account + */ + 'accountId': number; + /** + * + * @type {string} + * @memberof Account + */ + 'companyName': string; + /** + * + * @type {number} + * @memberof Account + */ + 'tier': number; + /** + * + * @type {string} + * @memberof Account + */ + 'country': string; + /** + * + * @type {number} + * @memberof Account + */ + 'parentAccountId'?: number; + /** + * + * @type {boolean} + * @memberof Account + */ + 'delegationPermission': boolean; + /** + * + * @type {boolean} + * @memberof Account + */ + 'autoFileDelete': boolean; + /** + * + * @type {number} + * @memberof Account + */ + 'fileRetentionDays': number; + /** + * + * @type {number} + * @memberof Account + */ + 'primaryAdminUserId'?: number; + /** + * + * @type {number} + * @memberof Account + */ + 'secondryAdminUserId'?: number; + /** + * + * @type {string} + * @memberof Account + */ + 'parentAccountName'?: string; +} +/** + * + * @export + * @interface ActivateCardLicensesRequest + */ +export interface ActivateCardLicensesRequest { + /** + * + * @type {string} + * @memberof ActivateCardLicensesRequest + */ + 'cardLicenseKey': string; +} +/** + * + * @export + * @interface AllocatableLicenseInfo + */ +export interface AllocatableLicenseInfo { + /** + * + * @type {number} + * @memberof AllocatableLicenseInfo + */ + 'licenseId': number; + /** + * + * @type {string} + * @memberof AllocatableLicenseInfo + */ + 'expiryDate'?: string; +} +/** + * + * @export + * @interface AllocateLicenseRequest + */ +export interface AllocateLicenseRequest { + /** + * ユーザーID + * @type {number} + * @memberof AllocateLicenseRequest + */ + 'userId': number; + /** + * 割り当てるライセンスのID + * @type {number} + * @memberof AllocateLicenseRequest + */ + 'newLicenseId': number; +} +/** + * + * @export + * @interface Assignee + */ +export interface Assignee { + /** + * TypistID(TypistIDかTypistGroupIDのどちらかに値が入る) + * @type {number} + * @memberof Assignee + */ + 'typistUserId'?: number; + /** + * TypistGroupID(TypistGroupIDかTypistIDのどちらかに値が入る) + * @type {number} + * @memberof Assignee + */ + 'typistGroupId'?: number; + /** + * Typist名 / TypistGroup名 + * @type {string} + * @memberof Assignee + */ + 'typistName': string; +} +/** + * + * @export + * @interface AudioDownloadLocationResponse + */ +export interface AudioDownloadLocationResponse { + /** + * Blob StorageにアクセスするためのSASトークン入りのアクセスURL + * @type {string} + * @memberof AudioDownloadLocationResponse + */ + 'url': string; +} +/** + * + * @export + * @interface AudioNextResponse + */ +export interface AudioNextResponse { + /** + * ODMS Cloud上の次の音声ファイルID(存在しなければundefind) + * @type {number} + * @memberof AudioNextResponse + */ + 'nextFileId'?: number; +} +/** + * + * @export + * @interface AudioOptionItem + */ +export interface AudioOptionItem { + /** + * + * @type {string} + * @memberof AudioOptionItem + */ + 'optionItemLabel': string; + /** + * + * @type {string} + * @memberof AudioOptionItem + */ + 'optionItemValue': string; +} +/** + * + * @export + * @interface AudioUploadFinishedRequest + */ +export interface AudioUploadFinishedRequest { + /** + * アップロード先Blob Storage(ファイル名含む) + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'url': string; + /** + * 自分自身(ログイン認証)したAuthorID + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'authorId': string; + /** + * 音声ファイル名 + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'fileName': string; + /** + * 音声ファイルの録音時間(ミリ秒の整数値) + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'duration': string; + /** + * 音声ファイルの録音作成日時(開始日時)(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'createdDate': string; + /** + * 音声ファイルの録音作成終了日時(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'finishedDate': string; + /** + * 音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'uploadedDate': string; + /** + * 音声ファイルのファイルサイズ(Byte) + * @type {number} + * @memberof AudioUploadFinishedRequest + */ + 'fileSize': number; + /** + * 優先度 \"00\":Normal / \"01\":High + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'priority': string; + /** + * 録音形式: DSS/DS2(SP)/DS2(QP) + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'audioFormat': string; + /** + * + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'comment': string; + /** + * + * @type {string} + * @memberof AudioUploadFinishedRequest + */ + 'workType': string; + /** + * 音声ファイルに紐づくOption Itemの一覧(10個固定) + * @type {Array} + * @memberof AudioUploadFinishedRequest + */ + 'optionItemList': Array; + /** + * + * @type {boolean} + * @memberof AudioUploadFinishedRequest + */ + 'isEncrypted': boolean; +} +/** + * + * @export + * @interface AudioUploadFinishedResponse + */ +export interface AudioUploadFinishedResponse { + /** + * 8桁固定の数字 + * @type {string} + * @memberof AudioUploadFinishedResponse + */ + 'jobNumber': string; +} +/** + * + * @export + * @interface AudioUploadLocationResponse + */ +export interface AudioUploadLocationResponse { + /** + * Blob StorageにアクセスするためのSASトークン入りのアクセスURL + * @type {string} + * @memberof AudioUploadLocationResponse + */ + 'url': string; +} +/** + * + * @export + * @interface Author + */ +export interface Author { + /** + * Authorユーザーの内部ID + * @type {number} + * @memberof Author + */ + 'id': number; + /** + * AuthorID + * @type {string} + * @memberof Author + */ + 'authorId': string; +} +/** + * + * @export + * @interface CancelIssueRequest + */ +export interface CancelIssueRequest { + /** + * 注文元アカウントID + * @type {number} + * @memberof CancelIssueRequest + */ + 'orderedAccountId': number; + /** + * POナンバー + * @type {string} + * @memberof CancelIssueRequest + */ + 'poNumber': string; +} +/** + * + * @export + * @interface CancelOrderRequest + */ +export interface CancelOrderRequest { + /** + * + * @type {string} + * @memberof CancelOrderRequest + */ + 'poNumber': string; +} +/** + * + * @export + * @interface ConfirmRequest + */ +export interface ConfirmRequest { + /** + * + * @type {string} + * @memberof ConfirmRequest + */ + 'token': string; +} +/** + * + * @export + * @interface CreateAccountRequest + */ +export interface CreateAccountRequest { + /** + * + * @type {string} + * @memberof CreateAccountRequest + */ + 'companyName': string; + /** + * 国名(ISO 3166-1 alpha-2) + * @type {string} + * @memberof CreateAccountRequest + */ + 'country': string; + /** + * + * @type {number} + * @memberof CreateAccountRequest + */ + 'dealerAccountId'?: number; + /** + * + * @type {string} + * @memberof CreateAccountRequest + */ + 'adminName': string; + /** + * + * @type {string} + * @memberof CreateAccountRequest + */ + 'adminMail': string; + /** + * + * @type {string} + * @memberof CreateAccountRequest + */ + 'adminPassword': string; + /** + * 同意済み利用規約のバージョン(EULA) + * @type {string} + * @memberof CreateAccountRequest + */ + 'acceptedEulaVersion': string; + /** + * 同意済みプライバシーポリシーのバージョン + * @type {string} + * @memberof CreateAccountRequest + */ + 'acceptedPrivacyNoticeVersion': string; + /** + * 同意済み利用規約のバージョン(DPA) + * @type {string} + * @memberof CreateAccountRequest + */ + 'acceptedDpaVersion': string; + /** + * reCAPTCHA Token + * @type {string} + * @memberof CreateAccountRequest + */ + 'token': string; +} +/** + * + * @export + * @interface CreateOrdersRequest + */ +export interface CreateOrdersRequest { + /** + * + * @type {string} + * @memberof CreateOrdersRequest + */ + 'poNumber': string; + /** + * + * @type {number} + * @memberof CreateOrdersRequest + */ + 'orderCount': number; +} +/** + * + * @export + * @interface CreatePartnerAccountRequest + */ +export interface CreatePartnerAccountRequest { + /** + * + * @type {string} + * @memberof CreatePartnerAccountRequest + */ + 'companyName': string; + /** + * 国名(ISO 3166-1 alpha-2) + * @type {string} + * @memberof CreatePartnerAccountRequest + */ + 'country': string; + /** + * + * @type {string} + * @memberof CreatePartnerAccountRequest + */ + 'adminName': string; + /** + * + * @type {string} + * @memberof CreatePartnerAccountRequest + */ + 'email': string; +} +/** + * + * @export + * @interface CreateTypistGroupRequest + */ +export interface CreateTypistGroupRequest { + /** + * + * @type {string} + * @memberof CreateTypistGroupRequest + */ + 'typistGroupName': string; + /** + * + * @type {Array} + * @memberof CreateTypistGroupRequest + */ + 'typistIds': Array; +} +/** + * + * @export + * @interface CreateWorkflowsRequest + */ +export interface CreateWorkflowsRequest { + /** + * Authorの内部ID + * @type {number} + * @memberof CreateWorkflowsRequest + */ + 'authorId': number; + /** + * Worktypeの内部ID + * @type {number} + * @memberof CreateWorkflowsRequest + */ + 'worktypeId'?: number; + /** + * テンプレートの内部ID + * @type {number} + * @memberof CreateWorkflowsRequest + */ + 'templateId'?: number; + /** + * ルーティング候補のタイピストユーザー/タイピストグループ + * @type {Array} + * @memberof CreateWorkflowsRequest + */ + 'typists': Array; +} +/** + * + * @export + * @interface CreateWorktypesRequest + */ +export interface CreateWorktypesRequest { + /** + * WorktypeID + * @type {string} + * @memberof CreateWorktypesRequest + */ + 'worktypeId': string; + /** + * Worktypeの説明 + * @type {string} + * @memberof CreateWorktypesRequest + */ + 'description'?: string; +} +/** + * + * @export + * @interface Dealer + */ +export interface Dealer { + /** + * アカウントID + * @type {number} + * @memberof Dealer + */ + 'id': number; + /** + * 会社名 + * @type {string} + * @memberof Dealer + */ + 'name': string; + /** + * 国名(ISO 3166-1 alpha-2) + * @type {string} + * @memberof Dealer + */ + 'country': string; +} +/** + * + * @export + * @interface DeallocateLicenseRequest + */ +export interface DeallocateLicenseRequest { + /** + * ユーザーID + * @type {number} + * @memberof DeallocateLicenseRequest + */ + 'userId': number; +} +/** + * + * @export + * @interface DelegationAccessTokenResponse + */ +export interface DelegationAccessTokenResponse { + /** + * 代行操作用のアクセストークン + * @type {string} + * @memberof DelegationAccessTokenResponse + */ + 'accessToken': string; +} +/** + * + * @export + * @interface DelegationTokenRequest + */ +export interface DelegationTokenRequest { + /** + * 代行操作対象のアカウントID + * @type {number} + * @memberof DelegationTokenRequest + */ + 'delegatedAccountId': number; +} +/** + * + * @export + * @interface DelegationTokenResponse + */ +export interface DelegationTokenResponse { + /** + * 代行操作用のリフレッシュトークン + * @type {string} + * @memberof DelegationTokenResponse + */ + 'refreshToken': string; + /** + * 代行操作用のアクセストークン + * @type {string} + * @memberof DelegationTokenResponse + */ + 'accessToken': string; +} +/** + * + * @export + * @interface DeleteAccountRequest + */ +export interface DeleteAccountRequest { + /** + * アカウントID + * @type {number} + * @memberof DeleteAccountRequest + */ + 'accountId': number; +} +/** + * + * @export + * @interface ErrorResponse + */ +export interface ErrorResponse { + /** + * + * @type {string} + * @memberof ErrorResponse + */ + 'message': string; + /** + * + * @type {string} + * @memberof ErrorResponse + */ + 'code': string; +} +/** + * + * @export + * @interface GetAccountInfoMinimalAccessRequest + */ +export interface GetAccountInfoMinimalAccessRequest { + /** + * idトークン + * @type {string} + * @memberof GetAccountInfoMinimalAccessRequest + */ + 'idToken': string; +} +/** + * + * @export + * @interface GetAccountInfoMinimalAccessResponse + */ +export interface GetAccountInfoMinimalAccessResponse { + /** + * 階層 + * @type {number} + * @memberof GetAccountInfoMinimalAccessResponse + */ + 'tier': number; +} +/** + * + * @export + * @interface GetAllocatableLicensesResponse + */ +export interface GetAllocatableLicensesResponse { + /** + * + * @type {Array} + * @memberof GetAllocatableLicensesResponse + */ + 'allocatableLicenses': Array; +} +/** + * + * @export + * @interface GetAuthorsResponse + */ +export interface GetAuthorsResponse { + /** + * + * @type {Array} + * @memberof GetAuthorsResponse + */ + 'authors': Array; +} +/** + * + * @export + * @interface GetCompanyNameRequest + */ +export interface GetCompanyNameRequest { + /** + * + * @type {number} + * @memberof GetCompanyNameRequest + */ + 'accountId': number; +} +/** + * + * @export + * @interface GetCompanyNameResponse + */ +export interface GetCompanyNameResponse { + /** + * + * @type {string} + * @memberof GetCompanyNameResponse + */ + 'companyName': string; +} +/** + * + * @export + * @interface GetDealersResponse + */ +export interface GetDealersResponse { + /** + * + * @type {Array} + * @memberof GetDealersResponse + */ + 'dealers': Array; +} +/** + * + * @export + * @interface GetLicenseSummaryRequest + */ +export interface GetLicenseSummaryRequest { + /** + * + * @type {number} + * @memberof GetLicenseSummaryRequest + */ + 'accountId': number; +} +/** + * + * @export + * @interface GetLicenseSummaryResponse + */ +export interface GetLicenseSummaryResponse { + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'totalLicense': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'allocatedLicense': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'reusableLicense': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'freeLicense': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'expiringWithin14daysLicense': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'issueRequesting': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'numberOfRequesting': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'shortage': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'storageSize': number; + /** + * + * @type {number} + * @memberof GetLicenseSummaryResponse + */ + 'usedSize': number; + /** + * + * @type {boolean} + * @memberof GetLicenseSummaryResponse + */ + 'isStorageAvailable': boolean; +} +/** + * + * @export + * @interface GetMyAccountResponse + */ +export interface GetMyAccountResponse { + /** + * + * @type {Account} + * @memberof GetMyAccountResponse + */ + 'account': Account; +} +/** + * + * @export + * @interface GetMyUserResponse + */ +export interface GetMyUserResponse { + /** + * ユーザー名 + * @type {string} + * @memberof GetMyUserResponse + */ + 'userName': string; +} +/** + * + * @export + * @interface GetOptionItemsResponse + */ +export interface GetOptionItemsResponse { + /** + * + * @type {Array} + * @memberof GetOptionItemsResponse + */ + 'optionItems': Array; +} +/** + * + * @export + * @interface GetOrderHistoriesRequest + */ +export interface GetOrderHistoriesRequest { + /** + * 取得件数 + * @type {number} + * @memberof GetOrderHistoriesRequest + */ + 'limit': number; + /** + * 開始位置 + * @type {number} + * @memberof GetOrderHistoriesRequest + */ + 'offset': number; + /** + * アカウントID + * @type {number} + * @memberof GetOrderHistoriesRequest + */ + 'accountId': number; +} +/** + * + * @export + * @interface GetOrderHistoriesResponse + */ +export interface GetOrderHistoriesResponse { + /** + * 合計件数 + * @type {number} + * @memberof GetOrderHistoriesResponse + */ + 'total': number; + /** + * + * @type {Array} + * @memberof GetOrderHistoriesResponse + */ + 'orderHistories': Array; +} +/** + * + * @export + * @interface GetPartnerLicensesRequest + */ +export interface GetPartnerLicensesRequest { + /** + * + * @type {number} + * @memberof GetPartnerLicensesRequest + */ + 'limit': number; + /** + * + * @type {number} + * @memberof GetPartnerLicensesRequest + */ + 'offset': number; + /** + * + * @type {number} + * @memberof GetPartnerLicensesRequest + */ + 'accountId': number; +} +/** + * + * @export + * @interface GetPartnerLicensesResponse + */ +export interface GetPartnerLicensesResponse { + /** + * + * @type {number} + * @memberof GetPartnerLicensesResponse + */ + 'total': number; + /** + * + * @type {PartnerLicenseInfo} + * @memberof GetPartnerLicensesResponse + */ + 'ownPartnerLicense': PartnerLicenseInfo; + /** + * + * @type {Array} + * @memberof GetPartnerLicensesResponse + */ + 'childrenPartnerLicenses': Array; +} +/** + * + * @export + * @interface GetPartnersResponse + */ +export interface GetPartnersResponse { + /** + * 合計件数 + * @type {number} + * @memberof GetPartnersResponse + */ + 'total': number; + /** + * + * @type {Array} + * @memberof GetPartnersResponse + */ + 'partners': Array; +} +/** + * + * @export + * @interface GetRelationsResponse + */ +export interface GetRelationsResponse { + /** + * ログインしたユーザーのAuthorID(Authorでない場合はundefined) + * @type {string} + * @memberof GetRelationsResponse + */ + 'authorId'?: string; + /** + * 属しているアカウントのAuthorID List(全て) + * @type {Array} + * @memberof GetRelationsResponse + */ + 'authorIdList': Array; + /** + * アカウントに設定されているWorktypeIDのリスト(最大20個) + * @type {Array} + * @memberof GetRelationsResponse + */ + 'workTypeList': Array; + /** + * ユーザーが音声ファイルを暗号化するかどうか + * @type {boolean} + * @memberof GetRelationsResponse + */ + 'isEncrypted': boolean; + /** + * ユーザーが暗号化を掛ける場合のパスワード + * @type {string} + * @memberof GetRelationsResponse + */ + 'encryptionPassword'?: string; + /** + * アカウントがデフォルトで利用するWorkTypeID(アカウントに紐づくWorkTypeIDから一つ指定。activeWorktypeがなければ空文字を返却する) + * @type {string} + * @memberof GetRelationsResponse + */ + 'activeWorktype': string; + /** + * 録音形式: DSS/DS2(SP)/DS2(QP): DS2固定 + * @type {string} + * @memberof GetRelationsResponse + */ + 'audioFormat': string; + /** + * デバイス上で自動的にWorkTypeの選択画面を表示するかどうかのユーザーごとの設定(Authorでない場合はfalse) + * @type {boolean} + * @memberof GetRelationsResponse + */ + 'prompt': boolean; +} +/** + * + * @export + * @interface GetSortCriteriaResponse + */ +export interface GetSortCriteriaResponse { + /** + * ASC/DESC + * @type {string} + * @memberof GetSortCriteriaResponse + */ + 'direction': string; + /** + * JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE + * @type {string} + * @memberof GetSortCriteriaResponse + */ + 'paramName': string; +} +/** + * + * @export + * @interface GetTemplatesResponse + */ +export interface GetTemplatesResponse { + /** + * テンプレートファイルの一覧 + * @type {Array} + * @memberof GetTemplatesResponse + */ + 'templates': Array; +} +/** + * + * @export + * @interface GetTermsInfoResponse + */ +export interface GetTermsInfoResponse { + /** + * + * @type {Array} + * @memberof GetTermsInfoResponse + */ + 'termsInfo': Array; +} +/** + * + * @export + * @interface GetTypistGroupResponse + */ +export interface GetTypistGroupResponse { + /** + * + * @type {string} + * @memberof GetTypistGroupResponse + */ + 'typistGroupName': string; + /** + * + * @type {Array} + * @memberof GetTypistGroupResponse + */ + 'typistIds': Array; +} +/** + * + * @export + * @interface GetTypistGroupsResponse + */ +export interface GetTypistGroupsResponse { + /** + * + * @type {Array} + * @memberof GetTypistGroupsResponse + */ + 'typistGroups': Array; +} +/** + * + * @export + * @interface GetTypistsResponse + */ +export interface GetTypistsResponse { + /** + * + * @type {Array} + * @memberof GetTypistsResponse + */ + 'typists': Array; +} +/** + * + * @export + * @interface GetUsersResponse + */ +export interface GetUsersResponse { + /** + * + * @type {Array} + * @memberof GetUsersResponse + */ + 'users': Array; +} +/** + * + * @export + * @interface GetWorkflowsResponse + */ +export interface GetWorkflowsResponse { + /** + * ワークフローの一覧 + * @type {Array} + * @memberof GetWorkflowsResponse + */ + 'workflows': Array; +} +/** + * + * @export + * @interface GetWorktypeOptionItem + */ +export interface GetWorktypeOptionItem { + /** + * + * @type {string} + * @memberof GetWorktypeOptionItem + */ + 'itemLabel': string; + /** + * Default / Blank / LastInput + * @type {string} + * @memberof GetWorktypeOptionItem + */ + 'defaultValueType': string; + /** + * + * @type {string} + * @memberof GetWorktypeOptionItem + */ + 'initialValue': string; + /** + * + * @type {number} + * @memberof GetWorktypeOptionItem + */ + 'id': number; +} +/** + * + * @export + * @interface GetWorktypesResponse + */ +export interface GetWorktypesResponse { + /** + * + * @type {Array} + * @memberof GetWorktypesResponse + */ + 'worktypes': Array; + /** + * Active WorktypeIDに設定されているWorkTypeの内部ID + * @type {number} + * @memberof GetWorktypesResponse + */ + 'active'?: number; +} +/** + * + * @export + * @interface IssueCardLicensesRequest + */ +export interface IssueCardLicensesRequest { + /** + * + * @type {number} + * @memberof IssueCardLicensesRequest + */ + 'createCount': number; +} +/** + * + * @export + * @interface IssueCardLicensesResponse + */ +export interface IssueCardLicensesResponse { + /** + * + * @type {Array} + * @memberof IssueCardLicensesResponse + */ + 'cardLicenseKeys': Array; +} +/** + * + * @export + * @interface IssueLicenseRequest + */ +export interface IssueLicenseRequest { + /** + * 注文元アカウントID + * @type {number} + * @memberof IssueLicenseRequest + */ + 'orderedAccountId': number; + /** + * POナンバー + * @type {string} + * @memberof IssueLicenseRequest + */ + 'poNumber': string; +} +/** + * + * @export + * @interface LicenseOrder + */ +export interface LicenseOrder { + /** + * 注文日付 + * @type {string} + * @memberof LicenseOrder + */ + 'orderDate': string; + /** + * 発行日付 + * @type {string} + * @memberof LicenseOrder + */ + 'issueDate'?: string; + /** + * 注文数 + * @type {number} + * @memberof LicenseOrder + */ + 'numberOfOrder': number; + /** + * POナンバー + * @type {string} + * @memberof LicenseOrder + */ + 'poNumber': string; + /** + * 注文状態 + * @type {string} + * @memberof LicenseOrder + */ + 'status': string; +} +/** + * + * @export + * @interface MultipleImportErrors + */ +export interface MultipleImportErrors { + /** + * ユーザー名 + * @type {string} + * @memberof MultipleImportErrors + */ + 'name': string; + /** + * エラー発生行数 + * @type {number} + * @memberof MultipleImportErrors + */ + 'line': number; + /** + * エラーコード + * @type {string} + * @memberof MultipleImportErrors + */ + 'errorCode': string; +} +/** + * + * @export + * @interface MultipleImportUser + */ +export interface MultipleImportUser { + /** + * ユーザー名 + * @type {string} + * @memberof MultipleImportUser + */ + 'name': string; + /** + * メールアドレス + * @type {string} + * @memberof MultipleImportUser + */ + 'email': string; + /** + * 0(none)/1(author)/2(typist) + * @type {number} + * @memberof MultipleImportUser + */ + 'role': number; + /** + * + * @type {string} + * @memberof MultipleImportUser + */ + 'authorId'?: string; + /** + * 0(false)/1(true) + * @type {number} + * @memberof MultipleImportUser + */ + 'autoRenew': number; + /** + * 0(false)/1(true) + * @type {number} + * @memberof MultipleImportUser + */ + 'notification': number; + /** + * 0(false)/1(true) + * @type {number} + * @memberof MultipleImportUser + */ + 'encryption'?: number; + /** + * + * @type {string} + * @memberof MultipleImportUser + */ + 'encryptionPassword'?: string; + /** + * 0(false)/1(true) + * @type {number} + * @memberof MultipleImportUser + */ + 'prompt'?: number; +} +/** + * + * @export + * @interface OptionItem + */ +export interface OptionItem { + /** + * Option Itemのラベル + * @type {string} + * @memberof OptionItem + */ + 'label': string; + /** + * 項目タイプ 1:Blank/2:Default/3:前の値 + * @type {number} + * @memberof OptionItem + */ + 'initialValueType': number; + /** + * typeでDefaultを選択した場合のデフォルト値 + * @type {string} + * @memberof OptionItem + */ + 'defaultValue': string; +} +/** + * + * @export + * @interface OptionItemList + */ +export interface OptionItemList { + /** + * + * @type {string} + * @memberof OptionItemList + */ + 'workTypeId': string; + /** + * 1WorkTypeIDにつき、10個まで登録可能 + * @type {Array} + * @memberof OptionItemList + */ + 'optionItemList': Array; +} +/** + * + * @export + * @interface Partner + */ +export interface Partner { + /** + * 会社名 + * @type {string} + * @memberof Partner + */ + 'name': string; + /** + * 階層 + * @type {number} + * @memberof Partner + */ + 'tier': number; + /** + * アカウントID + * @type {number} + * @memberof Partner + */ + 'accountId': number; + /** + * 国 + * @type {string} + * @memberof Partner + */ + 'country': string; + /** + * プライマリ管理者 + * @type {string} + * @memberof Partner + */ + 'primaryAdmin': string; + /** + * プライマリ管理者メールアドレス + * @type {string} + * @memberof Partner + */ + 'email': string; + /** + * 代行操作許可 + * @type {boolean} + * @memberof Partner + */ + 'dealerManagement': boolean; +} +/** + * + * @export + * @interface PartnerLicenseInfo + */ +export interface PartnerLicenseInfo { + /** + * アカウントID + * @type {number} + * @memberof PartnerLicenseInfo + */ + 'accountId': number; + /** + * 階層 + * @type {number} + * @memberof PartnerLicenseInfo + */ + 'tier': number; + /** + * アカウント名 + * @type {string} + * @memberof PartnerLicenseInfo + */ + 'companyName': string; + /** + * 保有している有効期限が未設定あるいは有効期限内のライセンス数 + * @type {number} + * @memberof PartnerLicenseInfo + */ + 'stockLicense': number; + /** + * 子アカウントからの、未発行状態あるいは発行キャンセルされた注文の総ライセンス数 + * @type {number} + * @memberof PartnerLicenseInfo + */ + 'issuedRequested': number; + /** + * 不足数({Stock license} - {Issue Requested}) + * @type {number} + * @memberof PartnerLicenseInfo + */ + 'shortage': number; + /** + * 未発行状態あるいは発行キャンセルされた注文の総ライセンス数(=IssueRequestingのStatusの注文の総ライセンス数) + * @type {number} + * @memberof PartnerLicenseInfo + */ + 'issueRequesting': number; +} +/** + * + * @export + * @interface PostActiveWorktypeRequest + */ +export interface PostActiveWorktypeRequest { + /** + * Active WorkTypeIDにするWorktypeの内部ID + * @type {number} + * @memberof PostActiveWorktypeRequest + */ + 'id'?: number; +} +/** + * + * @export + * @interface PostCheckoutPermissionRequest + */ +export interface PostCheckoutPermissionRequest { + /** + * 文字起こしに着手可能(チェックアウト可能)にしたい、グループ個人の一覧 + * @type {Array} + * @memberof PostCheckoutPermissionRequest + */ + 'assignees': Array; +} +/** + * + * @export + * @interface PostDeleteUserRequest + */ +export interface PostDeleteUserRequest { + /** + * 削除対象のユーザーID + * @type {number} + * @memberof PostDeleteUserRequest + */ + 'userId': number; +} +/** + * + * @export + * @interface PostMultipleImportsCompleteRequest + */ +export interface PostMultipleImportsCompleteRequest { + /** + * アカウントID + * @type {number} + * @memberof PostMultipleImportsCompleteRequest + */ + 'accountId': number; + /** + * CSVファイル名 + * @type {string} + * @memberof PostMultipleImportsCompleteRequest + */ + 'filename': string; + /** + * 一括登録受付時刻(UNIXTIME/ミリ秒) + * @type {number} + * @memberof PostMultipleImportsCompleteRequest + */ + 'requestTime': number; + /** + * + * @type {Array} + * @memberof PostMultipleImportsCompleteRequest + */ + 'errors': Array; +} +/** + * + * @export + * @interface PostMultipleImportsRequest + */ +export interface PostMultipleImportsRequest { + /** + * CSVファイル名 + * @type {string} + * @memberof PostMultipleImportsRequest + */ + 'filename': string; + /** + * + * @type {Array} + * @memberof PostMultipleImportsRequest + */ + 'users': Array; +} +/** + * + * @export + * @interface PostSortCriteriaRequest + */ +export interface PostSortCriteriaRequest { + /** + * ASC/DESC + * @type {string} + * @memberof PostSortCriteriaRequest + */ + 'direction': string; + /** + * JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE + * @type {string} + * @memberof PostSortCriteriaRequest + */ + 'paramName': string; +} +/** + * + * @export + * @interface PostUpdateUserRequest + */ +export interface PostUpdateUserRequest { + /** + * + * @type {number} + * @memberof PostUpdateUserRequest + */ + 'id': number; + /** + * none/author/typist + * @type {string} + * @memberof PostUpdateUserRequest + */ + 'role': string; + /** + * + * @type {string} + * @memberof PostUpdateUserRequest + */ + 'authorId'?: string; + /** + * + * @type {boolean} + * @memberof PostUpdateUserRequest + */ + 'autoRenew': boolean; + /** + * + * @type {boolean} + * @memberof PostUpdateUserRequest + */ + 'notification': boolean; + /** + * + * @type {boolean} + * @memberof PostUpdateUserRequest + */ + 'encryption'?: boolean; + /** + * + * @type {string} + * @memberof PostUpdateUserRequest + */ + 'encryptionPassword'?: string; + /** + * + * @type {boolean} + * @memberof PostUpdateUserRequest + */ + 'prompt'?: boolean; +} +/** + * + * @export + * @interface PostWorktypeOptionItem + */ +export interface PostWorktypeOptionItem { + /** + * + * @type {string} + * @memberof PostWorktypeOptionItem + */ + 'itemLabel': string; + /** + * Default / Blank / LastInput + * @type {string} + * @memberof PostWorktypeOptionItem + */ + 'defaultValueType': string; + /** + * + * @type {string} + * @memberof PostWorktypeOptionItem + */ + 'initialValue': string; +} +/** + * + * @export + * @interface RegisterRequest + */ +export interface RegisterRequest { + /** + * wns or apns + * @type {string} + * @memberof RegisterRequest + */ + 'pns': string; + /** + * wnsのチャネルURI or apnsのデバイストークン + * @type {string} + * @memberof RegisterRequest + */ + 'handler': string; +} +/** + * + * @export + * @interface SignupRequest + */ +export interface SignupRequest { + /** + * + * @type {string} + * @memberof SignupRequest + */ + 'name': string; + /** + * none/author/typist + * @type {string} + * @memberof SignupRequest + */ + 'role': string; + /** + * + * @type {string} + * @memberof SignupRequest + */ + 'authorId'?: string; + /** + * + * @type {string} + * @memberof SignupRequest + */ + 'email': string; + /** + * + * @type {boolean} + * @memberof SignupRequest + */ + 'autoRenew': boolean; + /** + * + * @type {boolean} + * @memberof SignupRequest + */ + 'notification': boolean; + /** + * + * @type {boolean} + * @memberof SignupRequest + */ + 'encryption'?: boolean; + /** + * + * @type {string} + * @memberof SignupRequest + */ + 'encryptionPassword'?: string; + /** + * + * @type {boolean} + * @memberof SignupRequest + */ + 'prompt'?: boolean; +} +/** + * + * @export + * @interface Task + */ +export interface Task { + /** + * ODMS Cloud上の音声ファイルID + * @type {number} + * @memberof Task + */ + 'audioFileId': number; + /** + * AuthorID + * @type {string} + * @memberof Task + */ + 'authorId': string; + /** + * + * @type {string} + * @memberof Task + */ + 'workType': string; + /** + * 音声ファイルに紐づくOption Itemの一覧(10個固定) + * @type {Array} + * @memberof Task + */ + 'optionItemList': Array; + /** + * 音声ファイルのBlob Storage上での保存場所(ファイル名含む)のURL + * @type {string} + * @memberof Task + */ + 'url': string; + /** + * 音声ファイル名 + * @type {string} + * @memberof Task + */ + 'fileName': string; + /** + * 音声ファイルの録音時間(ミリ秒の整数値) + * @type {string} + * @memberof Task + */ + 'audioDuration': string; + /** + * 音声ファイルの録音開始日時(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof Task + */ + 'audioCreatedDate': string; + /** + * 音声ファイルの録音終了日時(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof Task + */ + 'audioFinishedDate': string; + /** + * 音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof Task + */ + 'audioUploadedDate': string; + /** + * 音声ファイルのファイルサイズ(Byte) + * @type {number} + * @memberof Task + */ + 'fileSize': number; + /** + * 音声ファイルの優先度 \"00\":Normal / \"01\":High + * @type {string} + * @memberof Task + */ + 'priority': string; + /** + * 録音形式: DSS/DS2(SP)/DS2(QP) + * @type {string} + * @memberof Task + */ + 'audioFormat': string; + /** + * コメント + * @type {string} + * @memberof Task + */ + 'comment': string; + /** + * + * @type {boolean} + * @memberof Task + */ + 'isEncrypted': boolean; + /** + * JOBナンバー + * @type {string} + * @memberof Task + */ + 'jobNumber': string; + /** + * + * @type {Typist} + * @memberof Task + */ + 'typist'?: Typist; + /** + * 文字起こしに着手できる(チェックアウト可能な)、タスクにアサインされているグループ/個人の一覧 + * @type {Array} + * @memberof Task + */ + 'assignees': Array; + /** + * 音声ファイルのファイルステータス Uploaded / Pending / InProgress / Finished / Backup + * @type {string} + * @memberof Task + */ + 'status': string; + /** + * 文字起こし開始日時(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof Task + */ + 'transcriptionStartedDate'?: string; + /** + * 文字起こし終了日時(yyyy-mm-ddThh:mm:ss.sss) + * @type {string} + * @memberof Task + */ + 'transcriptionFinishedDate'?: string; +} +/** + * + * @export + * @interface TasksResponse + */ +export interface TasksResponse { + /** + * タスクの取得件数(指定しない場合はデフォルト値) + * @type {number} + * @memberof TasksResponse + */ + 'limit': number; + /** + * オフセット(何件目から取得するか 設定しない場合はデフォルト値) + * @type {number} + * @memberof TasksResponse + */ + 'offset': number; + /** + * タスクの総件数 + * @type {number} + * @memberof TasksResponse + */ + 'total': number; + /** + * 音声ファイル/タスク一覧 + * @type {Array} + * @memberof TasksResponse + */ + 'tasks': Array; +} +/** + * + * @export + * @interface TemplateDownloadLocationResponse + */ +export interface TemplateDownloadLocationResponse { + /** + * + * @type {string} + * @memberof TemplateDownloadLocationResponse + */ + 'url': string; +} +/** + * + * @export + * @interface TemplateFile + */ +export interface TemplateFile { + /** + * テンプレートファイルのID + * @type {number} + * @memberof TemplateFile + */ + 'id': number; + /** + * テンプレートファイルのファイル名 + * @type {string} + * @memberof TemplateFile + */ + 'name': string; +} +/** + * + * @export + * @interface TemplateUploadFinishedRequest + */ +export interface TemplateUploadFinishedRequest { + /** + * テンプレートファイルのファイル名 + * @type {string} + * @memberof TemplateUploadFinishedRequest + */ + 'name': string; + /** + * テンプレートファイルのアップロード先URL + * @type {string} + * @memberof TemplateUploadFinishedRequest + */ + 'url': string; +} +/** + * + * @export + * @interface TemplateUploadLocationResponse + */ +export interface TemplateUploadLocationResponse { + /** + * + * @type {string} + * @memberof TemplateUploadLocationResponse + */ + 'url': string; +} +/** + * + * @export + * @interface TermInfo + */ +export interface TermInfo { + /** + * 利用規約種別 + * @type {string} + * @memberof TermInfo + */ + 'documentType': string; + /** + * バージョン + * @type {string} + * @memberof TermInfo + */ + 'version': string; +} +/** + * + * @export + * @interface TokenRequest + */ +export interface TokenRequest { + /** + * + * @type {string} + * @memberof TokenRequest + */ + 'idToken': string; + /** + * web or mobile or desktop + * @type {string} + * @memberof TokenRequest + */ + 'type': string; +} +/** + * + * @export + * @interface TokenResponse + */ +export interface TokenResponse { + /** + * + * @type {string} + * @memberof TokenResponse + */ + 'refreshToken': string; + /** + * + * @type {string} + * @memberof TokenResponse + */ + 'accessToken': string; +} +/** + * + * @export + * @interface Typist + */ +export interface Typist { + /** + * TypistのユーザーID + * @type {number} + * @memberof Typist + */ + 'id': number; + /** + * Typistのユーザー名 + * @type {string} + * @memberof Typist + */ + 'name': string; +} +/** + * + * @export + * @interface TypistGroup + */ +export interface TypistGroup { + /** + * TypistGroupのID + * @type {number} + * @memberof TypistGroup + */ + 'id': number; + /** + * TypistGroup名 + * @type {string} + * @memberof TypistGroup + */ + 'name': string; +} +/** + * + * @export + * @interface UpdateAcceptedVersionRequest + */ +export interface UpdateAcceptedVersionRequest { + /** + * IDトークン + * @type {string} + * @memberof UpdateAcceptedVersionRequest + */ + 'idToken': string; + /** + * 更新バージョン(EULA) + * @type {string} + * @memberof UpdateAcceptedVersionRequest + */ + 'acceptedEULAVersion': string; + /** + * 更新バージョン(PrivacyNotice) + * @type {string} + * @memberof UpdateAcceptedVersionRequest + */ + 'acceptedPrivacyNoticeVersion': string; + /** + * 更新バージョン(DPA) + * @type {string} + * @memberof UpdateAcceptedVersionRequest + */ + 'acceptedDPAVersion'?: string; +} +/** + * + * @export + * @interface UpdateAccountInfoRequest + */ +export interface UpdateAccountInfoRequest { + /** + * 親アカウントのID + * @type {number} + * @memberof UpdateAccountInfoRequest + */ + 'parentAccountId'?: number; + /** + * 代行操作許可 + * @type {boolean} + * @memberof UpdateAccountInfoRequest + */ + 'delegationPermission': boolean; + /** + * プライマリ管理者ID + * @type {number} + * @memberof UpdateAccountInfoRequest + */ + 'primaryAdminUserId': number; + /** + * セカンダリ管理者ID + * @type {number} + * @memberof UpdateAccountInfoRequest + */ + 'secondryAdminUserId'?: number; +} +/** + * + * @export + * @interface UpdateFileDeleteSettingRequest + */ +export interface UpdateFileDeleteSettingRequest { + /** + * 自動ファイル削除をするかどうか + * @type {boolean} + * @memberof UpdateFileDeleteSettingRequest + */ + 'autoFileDelete': boolean; + /** + * 文字起こし完了してから自動ファイル削除されるまでのファイルの保存期間 + * @type {number} + * @memberof UpdateFileDeleteSettingRequest + */ + 'retentionDays': number; +} +/** + * + * @export + * @interface UpdateOptionItemsRequest + */ +export interface UpdateOptionItemsRequest { + /** + * + * @type {Array} + * @memberof UpdateOptionItemsRequest + */ + 'optionItems': Array; +} +/** + * + * @export + * @interface UpdateRestrictionStatusRequest + */ +export interface UpdateRestrictionStatusRequest { + /** + * 操作対象の第五階層アカウントID + * @type {number} + * @memberof UpdateRestrictionStatusRequest + */ + 'accountId': number; + /** + * 制限をかけるかどうか(trur:制限をかける) + * @type {boolean} + * @memberof UpdateRestrictionStatusRequest + */ + 'restricted': boolean; +} +/** + * + * @export + * @interface UpdateTypistGroupRequest + */ +export interface UpdateTypistGroupRequest { + /** + * + * @type {string} + * @memberof UpdateTypistGroupRequest + */ + 'typistGroupName': string; + /** + * + * @type {Array} + * @memberof UpdateTypistGroupRequest + */ + 'typistIds': Array; +} +/** + * + * @export + * @interface UpdateWorkflowRequest + */ +export interface UpdateWorkflowRequest { + /** + * Authorの内部ID + * @type {number} + * @memberof UpdateWorkflowRequest + */ + 'authorId': number; + /** + * Worktypeの内部ID + * @type {number} + * @memberof UpdateWorkflowRequest + */ + 'worktypeId'?: number; + /** + * テンプレートの内部ID + * @type {number} + * @memberof UpdateWorkflowRequest + */ + 'templateId'?: number; + /** + * ルーティング候補のタイピストユーザー/タイピストグループ + * @type {Array} + * @memberof UpdateWorkflowRequest + */ + 'typists': Array; +} +/** + * + * @export + * @interface UpdateWorktypesRequest + */ +export interface UpdateWorktypesRequest { + /** + * WorktypeID + * @type {string} + * @memberof UpdateWorktypesRequest + */ + 'worktypeId': string; + /** + * Worktypeの説明 + * @type {string} + * @memberof UpdateWorktypesRequest + */ + 'description'?: string; +} +/** + * + * @export + * @interface User + */ +export interface User { + /** + * + * @type {number} + * @memberof User + */ + 'id': number; + /** + * + * @type {string} + * @memberof User + */ + 'name': string; + /** + * none/author/typist + * @type {string} + * @memberof User + */ + 'role': string; + /** + * + * @type {string} + * @memberof User + */ + 'authorId'?: string; + /** + * + * @type {Array} + * @memberof User + */ + 'typistGroupName': Array; + /** + * + * @type {string} + * @memberof User + */ + 'email': string; + /** + * + * @type {boolean} + * @memberof User + */ + 'emailVerified': boolean; + /** + * + * @type {boolean} + * @memberof User + */ + 'autoRenew': boolean; + /** + * + * @type {boolean} + * @memberof User + */ + 'notification': boolean; + /** + * + * @type {boolean} + * @memberof User + */ + 'encryption': boolean; + /** + * + * @type {boolean} + * @memberof User + */ + 'prompt': boolean; + /** + * + * @type {string} + * @memberof User + */ + 'expiration'?: string; + /** + * + * @type {number} + * @memberof User + */ + 'remaining'?: number; + /** + * Normal/NoLicense/Alert/Renew + * @type {string} + * @memberof User + */ + 'licenseStatus': string; +} +/** + * + * @export + * @interface Workflow + */ +export interface Workflow { + /** + * ワークフローの内部ID + * @type {number} + * @memberof Workflow + */ + 'id': number; + /** + * + * @type {Author} + * @memberof Workflow + */ + 'author': Author; + /** + * + * @type {WorkflowWorktype} + * @memberof Workflow + */ + 'worktype'?: WorkflowWorktype; + /** + * + * @type {WorkflowTemplate} + * @memberof Workflow + */ + 'template'?: WorkflowTemplate; + /** + * ルーティング候補のタイピストユーザー/タイピストグループ + * @type {Array} + * @memberof Workflow + */ + 'typists': Array; +} +/** + * + * @export + * @interface WorkflowTemplate + */ +export interface WorkflowTemplate { + /** + * テンプレートの内部ID + * @type {number} + * @memberof WorkflowTemplate + */ + 'id': number; + /** + * テンプレートのファイル名 + * @type {string} + * @memberof WorkflowTemplate + */ + 'fileName': string; +} +/** + * + * @export + * @interface WorkflowTypist + */ +export interface WorkflowTypist { + /** + * タイピストユーザーの内部ID + * @type {number} + * @memberof WorkflowTypist + */ + 'typistId'?: number; + /** + * タイピストグループの内部ID + * @type {number} + * @memberof WorkflowTypist + */ + 'typistGroupId'?: number; +} +/** + * + * @export + * @interface WorkflowWorktype + */ +export interface WorkflowWorktype { + /** + * Worktypeの内部ID + * @type {number} + * @memberof WorkflowWorktype + */ + 'id': number; + /** + * WorktypeID + * @type {string} + * @memberof WorkflowWorktype + */ + 'worktypeId': string; +} +/** + * + * @export + * @interface Worktype + */ +export interface Worktype { + /** + * WorktypeのID + * @type {number} + * @memberof Worktype + */ + 'id': number; + /** + * WorktypeID + * @type {string} + * @memberof Worktype + */ + 'worktypeId': string; + /** + * Worktypeの説明 + * @type {string} + * @memberof Worktype + */ + 'description'?: string; +} + +/** + * AccountsApi - axios parameter creator + * @export + */ +export const AccountsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary + * @param {PostActiveWorktypeRequest} postActiveWorktypeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activeWorktype: async (postActiveWorktypeRequest: PostActiveWorktypeRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'postActiveWorktypeRequest' is not null or undefined + assertParamExists('activeWorktype', 'postActiveWorktypeRequest', postActiveWorktypeRequest) + const localVarPath = `/accounts/active-worktype`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postActiveWorktypeRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ライセンス発行をキャンセルします + * @summary + * @param {CancelIssueRequest} cancelIssueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelIssue: async (cancelIssueRequest: CancelIssueRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'cancelIssueRequest' is not null or undefined + assertParamExists('cancelIssue', 'cancelIssueRequest', cancelIssueRequest) + const localVarPath = `/accounts/issue/cancel`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cancelIssueRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {CreateAccountRequest} createAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAccount: async (createAccountRequest: CreateAccountRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createAccountRequest' is not null or undefined + assertParamExists('createAccount', 'createAccountRequest', createAccountRequest) + const localVarPath = `/accounts`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createAccountRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {CreatePartnerAccountRequest} createPartnerAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPartnerAccount: async (createPartnerAccountRequest: CreatePartnerAccountRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createPartnerAccountRequest' is not null or undefined + assertParamExists('createPartnerAccount', 'createPartnerAccountRequest', createPartnerAccountRequest) + const localVarPath = `/accounts/partner`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createPartnerAccountRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント配下にタイピストグループを追加します + * @summary + * @param {CreateTypistGroupRequest} createTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTypistGroup: async (createTypistGroupRequest: CreateTypistGroupRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createTypistGroupRequest' is not null or undefined + assertParamExists('createTypistGroup', 'createTypistGroupRequest', createTypistGroupRequest) + const localVarPath = `/accounts/typist-groups`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createTypistGroupRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {CreateWorktypesRequest} createWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWorktype: async (createWorktypesRequest: CreateWorktypesRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createWorktypesRequest' is not null or undefined + assertParamExists('createWorktype', 'createWorktypesRequest', createWorktypesRequest) + const localVarPath = `/accounts/worktypes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createWorktypesRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {DeleteAccountRequest} deleteAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAccountAndData: async (deleteAccountRequest: DeleteAccountRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'deleteAccountRequest' is not null or undefined + assertParamExists('deleteAccountAndData', 'deleteAccountRequest', deleteAccountRequest) + const localVarPath = `/accounts/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deleteAccountRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを削除します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTypistGroup: async (typistGroupId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'typistGroupId' is not null or undefined + assertParamExists('deleteTypistGroup', 'typistGroupId', typistGroupId) + const localVarPath = `/accounts/typist-groups/{typistGroupId}/delete` + .replace(`{${"typistGroupId"}}`, encodeURIComponent(String(typistGroupId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteWorktype: async (id: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('deleteWorktype', 'id', id) + const localVarPath = `/accounts/worktypes/{id}/delete` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccountInfoMinimalAccess: async (getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getAccountInfoMinimalAccessRequest' is not null or undefined + assertParamExists('getAccountInfoMinimalAccess', 'getAccountInfoMinimalAccessRequest', getAccountInfoMinimalAccessRequest) + const localVarPath = `/accounts/minimal-access`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getAccountInfoMinimalAccessRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント配下のAuthor一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAuthors: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/accounts/authors`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定したアカウントの会社名を取得します + * @summary + * @param {GetCompanyNameRequest} getCompanyNameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCompanyName: async (getCompanyNameRequest: GetCompanyNameRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getCompanyNameRequest' is not null or undefined + assertParamExists('getCompanyName', 'getCompanyNameRequest', getCompanyNameRequest) + const localVarPath = `/accounts/company-name`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getCompanyNameRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDealers: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/accounts/dealers`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定したアカウントのライセンス集計情報を取得します + * @summary + * @param {GetLicenseSummaryRequest} getLicenseSummaryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLicenseSummary: async (getLicenseSummaryRequest: GetLicenseSummaryRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getLicenseSummaryRequest' is not null or undefined + assertParamExists('getLicenseSummary', 'getLicenseSummaryRequest', getLicenseSummaryRequest) + const localVarPath = `/accounts/licenses/summary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getLicenseSummaryRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyAccount: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/accounts/me`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOptionItems: async (id: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getOptionItems', 'id', id) + const localVarPath = `/accounts/worktypes/{id}/option-items` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {GetOrderHistoriesRequest} getOrderHistoriesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderHistories: async (getOrderHistoriesRequest: GetOrderHistoriesRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getOrderHistoriesRequest' is not null or undefined + assertParamExists('getOrderHistories', 'getOrderHistoriesRequest', getOrderHistoriesRequest) + const localVarPath = `/accounts/order-histories`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getOrderHistoriesRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {GetPartnerLicensesRequest} getPartnerLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPartnerLicenses: async (getPartnerLicensesRequest: GetPartnerLicensesRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'getPartnerLicensesRequest' is not null or undefined + assertParamExists('getPartnerLicenses', 'getPartnerLicensesRequest', getPartnerLicensesRequest) + const localVarPath = `/accounts/partner-licenses`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(getPartnerLicensesRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {number} limit 取得件数 + * @param {number} offset 開始位置 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPartners: async (limit: number, offset: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'limit' is not null or undefined + assertParamExists('getPartners', 'limit', limit) + // verify required parameter 'offset' is not null or undefined + assertParamExists('getPartners', 'offset', offset) + const localVarPath = `/accounts/partners`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを取得します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTypistGroup: async (typistGroupId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'typistGroupId' is not null or undefined + assertParamExists('getTypistGroup', 'typistGroupId', typistGroupId) + const localVarPath = `/accounts/typist-groups/{typistGroupId}` + .replace(`{${"typistGroupId"}}`, encodeURIComponent(String(typistGroupId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント配下のタイピストグループ一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTypistGroups: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/accounts/typist-groups`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント配下のタイピスト一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTypists: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/accounts/typists`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWorktypes: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/accounts/worktypes`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {IssueLicenseRequest} issueLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + issueLicense: async (issueLicenseRequest: IssueLicenseRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'issueLicenseRequest' is not null or undefined + assertParamExists('issueLicense', 'issueLicenseRequest', issueLicenseRequest) + const localVarPath = `/accounts/licenses/issue`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(issueLicenseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {UpdateAccountInfoRequest} updateAccountInfoRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateAccountInfo: async (updateAccountInfoRequest: UpdateAccountInfoRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'updateAccountInfoRequest' is not null or undefined + assertParamExists('updateAccountInfo', 'updateAccountInfoRequest', updateAccountInfoRequest) + const localVarPath = `/accounts/me`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateAccountInfoRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {UpdateFileDeleteSettingRequest} updateFileDeleteSettingRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateFileDeleteSetting: async (updateFileDeleteSettingRequest: UpdateFileDeleteSettingRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'updateFileDeleteSettingRequest' is not null or undefined + assertParamExists('updateFileDeleteSetting', 'updateFileDeleteSettingRequest', updateFileDeleteSettingRequest) + const localVarPath = `/accounts/me/file-delete-setting`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateFileDeleteSettingRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateOptionItemsRequest} updateOptionItemsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateOptionItems: async (id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateOptionItems', 'id', id) + // verify required parameter 'updateOptionItemsRequest' is not null or undefined + assertParamExists('updateOptionItems', 'updateOptionItemsRequest', updateOptionItemsRequest) + const localVarPath = `/accounts/worktypes/{id}/option-items` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateOptionItemsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {UpdateRestrictionStatusRequest} updateRestrictionStatusRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateRestrictionStatus: async (updateRestrictionStatusRequest: UpdateRestrictionStatusRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'updateRestrictionStatusRequest' is not null or undefined + assertParamExists('updateRestrictionStatus', 'updateRestrictionStatusRequest', updateRestrictionStatusRequest) + const localVarPath = `/accounts/restriction-status`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateRestrictionStatusRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します + * @summary + * @param {number} typistGroupId + * @param {UpdateTypistGroupRequest} updateTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTypistGroup: async (typistGroupId: number, updateTypistGroupRequest: UpdateTypistGroupRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'typistGroupId' is not null or undefined + assertParamExists('updateTypistGroup', 'typistGroupId', typistGroupId) + // verify required parameter 'updateTypistGroupRequest' is not null or undefined + assertParamExists('updateTypistGroup', 'updateTypistGroupRequest', updateTypistGroupRequest) + const localVarPath = `/accounts/typist-groups/{typistGroupId}` + .replace(`{${"typistGroupId"}}`, encodeURIComponent(String(typistGroupId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateTypistGroupRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateWorktypesRequest} updateWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWorktype: async (id: number, updateWorktypesRequest: UpdateWorktypesRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updateWorktype', 'id', id) + // verify required parameter 'updateWorktypesRequest' is not null or undefined + assertParamExists('updateWorktype', 'updateWorktypesRequest', updateWorktypesRequest) + const localVarPath = `/accounts/worktypes/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateWorktypesRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AccountsApi - functional programming interface + * @export + */ +export const AccountsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AccountsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary + * @param {PostActiveWorktypeRequest} postActiveWorktypeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async activeWorktype(postActiveWorktypeRequest: PostActiveWorktypeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.activeWorktype(postActiveWorktypeRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.activeWorktype']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ライセンス発行をキャンセルします + * @summary + * @param {CancelIssueRequest} cancelIssueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelIssue(cancelIssueRequest: CancelIssueRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelIssue(cancelIssueRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.cancelIssue']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {CreateAccountRequest} createAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createAccount(createAccountRequest: CreateAccountRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createAccount(createAccountRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.createAccount']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {CreatePartnerAccountRequest} createPartnerAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createPartnerAccount(createPartnerAccountRequest: CreatePartnerAccountRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createPartnerAccount(createPartnerAccountRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.createPartnerAccount']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント配下にタイピストグループを追加します + * @summary + * @param {CreateTypistGroupRequest} createTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createTypistGroup(createTypistGroupRequest: CreateTypistGroupRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createTypistGroup(createTypistGroupRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.createTypistGroup']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {CreateWorktypesRequest} createWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWorktype(createWorktypesRequest: CreateWorktypesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWorktype(createWorktypesRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.createWorktype']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {DeleteAccountRequest} deleteAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteAccountAndData(deleteAccountRequest: DeleteAccountRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteAccountAndData(deleteAccountRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.deleteAccountAndData']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを削除します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteTypistGroup(typistGroupId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTypistGroup(typistGroupId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.deleteTypistGroup']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteWorktype(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorktype(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.deleteWorktype']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getAccountInfoMinimalAccess']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント配下のAuthor一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAuthors(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAuthors(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getAuthors']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定したアカウントの会社名を取得します + * @summary + * @param {GetCompanyNameRequest} getCompanyNameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCompanyName(getCompanyNameRequest: GetCompanyNameRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCompanyName(getCompanyNameRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getCompanyName']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getDealers(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getDealers(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getDealers']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定したアカウントのライセンス集計情報を取得します + * @summary + * @param {GetLicenseSummaryRequest} getLicenseSummaryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLicenseSummary(getLicenseSummaryRequest: GetLicenseSummaryRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getLicenseSummary(getLicenseSummaryRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getLicenseSummary']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMyAccount(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMyAccount(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getMyAccount']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOptionItems(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionItems(id, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getOptionItems']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {GetOrderHistoriesRequest} getOrderHistoriesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getOrderHistories(getOrderHistoriesRequest: GetOrderHistoriesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderHistories(getOrderHistoriesRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getOrderHistories']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {GetPartnerLicensesRequest} getPartnerLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPartnerLicenses(getPartnerLicensesRequest: GetPartnerLicensesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPartnerLicenses(getPartnerLicensesRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getPartnerLicenses']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {number} limit 取得件数 + * @param {number} offset 開始位置 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getPartners(limit: number, offset: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getPartners(limit, offset, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getPartners']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを取得します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTypistGroup(typistGroupId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTypistGroup(typistGroupId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getTypistGroup']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント配下のタイピストグループ一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTypistGroups(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTypistGroups(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getTypistGroups']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント配下のタイピスト一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTypists(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTypists(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getTypists']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getWorktypes(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWorktypes(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.getWorktypes']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {IssueLicenseRequest} issueLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async issueLicense(issueLicenseRequest: IssueLicenseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.issueLicense(issueLicenseRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.issueLicense']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {UpdateAccountInfoRequest} updateAccountInfoRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateAccountInfo(updateAccountInfoRequest: UpdateAccountInfoRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateAccountInfo(updateAccountInfoRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.updateAccountInfo']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {UpdateFileDeleteSettingRequest} updateFileDeleteSettingRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateFileDeleteSetting(updateFileDeleteSettingRequest: UpdateFileDeleteSettingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateFileDeleteSetting(updateFileDeleteSettingRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.updateFileDeleteSetting']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateOptionItemsRequest} updateOptionItemsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateOptionItems(id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateOptionItems(id, updateOptionItemsRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.updateOptionItems']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {UpdateRestrictionStatusRequest} updateRestrictionStatusRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateRestrictionStatus(updateRestrictionStatusRequest: UpdateRestrictionStatusRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateRestrictionStatus(updateRestrictionStatusRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.updateRestrictionStatus']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します + * @summary + * @param {number} typistGroupId + * @param {UpdateTypistGroupRequest} updateTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateTypistGroup(typistGroupId: number, updateTypistGroupRequest: UpdateTypistGroupRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateTypistGroup(typistGroupId, updateTypistGroupRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.updateTypistGroup']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateWorktypesRequest} updateWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateWorktype(id: number, updateWorktypesRequest: UpdateWorktypesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateWorktype(id, updateWorktypesRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AccountsApi.updateWorktype']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * AccountsApi - factory interface + * @export + */ +export const AccountsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AccountsApiFp(configuration) + return { + /** + * + * @summary + * @param {PostActiveWorktypeRequest} postActiveWorktypeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activeWorktype(postActiveWorktypeRequest: PostActiveWorktypeRequest, options?: any): AxiosPromise { + return localVarFp.activeWorktype(postActiveWorktypeRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ライセンス発行をキャンセルします + * @summary + * @param {CancelIssueRequest} cancelIssueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelIssue(cancelIssueRequest: CancelIssueRequest, options?: any): AxiosPromise { + return localVarFp.cancelIssue(cancelIssueRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {CreateAccountRequest} createAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createAccount(createAccountRequest: CreateAccountRequest, options?: any): AxiosPromise { + return localVarFp.createAccount(createAccountRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {CreatePartnerAccountRequest} createPartnerAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createPartnerAccount(createPartnerAccountRequest: CreatePartnerAccountRequest, options?: any): AxiosPromise { + return localVarFp.createPartnerAccount(createPartnerAccountRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント配下にタイピストグループを追加します + * @summary + * @param {CreateTypistGroupRequest} createTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createTypistGroup(createTypistGroupRequest: CreateTypistGroupRequest, options?: any): AxiosPromise { + return localVarFp.createTypistGroup(createTypistGroupRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {CreateWorktypesRequest} createWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWorktype(createWorktypesRequest: CreateWorktypesRequest, options?: any): AxiosPromise { + return localVarFp.createWorktype(createWorktypesRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {DeleteAccountRequest} deleteAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteAccountAndData(deleteAccountRequest: DeleteAccountRequest, options?: any): AxiosPromise { + return localVarFp.deleteAccountAndData(deleteAccountRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを削除します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTypistGroup(typistGroupId: number, options?: any): AxiosPromise { + return localVarFp.deleteTypistGroup(typistGroupId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteWorktype(id: number, options?: any): AxiosPromise { + return localVarFp.deleteWorktype(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options?: any): AxiosPromise { + return localVarFp.getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント配下のAuthor一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAuthors(options?: any): AxiosPromise { + return localVarFp.getAuthors(options).then((request) => request(axios, basePath)); + }, + /** + * 指定したアカウントの会社名を取得します + * @summary + * @param {GetCompanyNameRequest} getCompanyNameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCompanyName(getCompanyNameRequest: GetCompanyNameRequest, options?: any): AxiosPromise { + return localVarFp.getCompanyName(getCompanyNameRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getDealers(options?: any): AxiosPromise { + return localVarFp.getDealers(options).then((request) => request(axios, basePath)); + }, + /** + * 指定したアカウントのライセンス集計情報を取得します + * @summary + * @param {GetLicenseSummaryRequest} getLicenseSummaryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLicenseSummary(getLicenseSummaryRequest: GetLicenseSummaryRequest, options?: any): AxiosPromise { + return localVarFp.getLicenseSummary(getLicenseSummaryRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyAccount(options?: any): AxiosPromise { + return localVarFp.getMyAccount(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOptionItems(id: number, options?: any): AxiosPromise { + return localVarFp.getOptionItems(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {GetOrderHistoriesRequest} getOrderHistoriesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getOrderHistories(getOrderHistoriesRequest: GetOrderHistoriesRequest, options?: any): AxiosPromise { + return localVarFp.getOrderHistories(getOrderHistoriesRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {GetPartnerLicensesRequest} getPartnerLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPartnerLicenses(getPartnerLicensesRequest: GetPartnerLicensesRequest, options?: any): AxiosPromise { + return localVarFp.getPartnerLicenses(getPartnerLicensesRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {number} limit 取得件数 + * @param {number} offset 開始位置 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getPartners(limit: number, offset: number, options?: any): AxiosPromise { + return localVarFp.getPartners(limit, offset, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを取得します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTypistGroup(typistGroupId: number, options?: any): AxiosPromise { + return localVarFp.getTypistGroup(typistGroupId, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント配下のタイピストグループ一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTypistGroups(options?: any): AxiosPromise { + return localVarFp.getTypistGroups(options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント配下のタイピスト一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTypists(options?: any): AxiosPromise { + return localVarFp.getTypists(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWorktypes(options?: any): AxiosPromise { + return localVarFp.getWorktypes(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {IssueLicenseRequest} issueLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + issueLicense(issueLicenseRequest: IssueLicenseRequest, options?: any): AxiosPromise { + return localVarFp.issueLicense(issueLicenseRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {UpdateAccountInfoRequest} updateAccountInfoRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateAccountInfo(updateAccountInfoRequest: UpdateAccountInfoRequest, options?: any): AxiosPromise { + return localVarFp.updateAccountInfo(updateAccountInfoRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {UpdateFileDeleteSettingRequest} updateFileDeleteSettingRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateFileDeleteSetting(updateFileDeleteSettingRequest: UpdateFileDeleteSettingRequest, options?: any): AxiosPromise { + return localVarFp.updateFileDeleteSetting(updateFileDeleteSettingRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateOptionItemsRequest} updateOptionItemsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateOptionItems(id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options?: any): AxiosPromise { + return localVarFp.updateOptionItems(id, updateOptionItemsRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {UpdateRestrictionStatusRequest} updateRestrictionStatusRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateRestrictionStatus(updateRestrictionStatusRequest: UpdateRestrictionStatusRequest, options?: any): AxiosPromise { + return localVarFp.updateRestrictionStatus(updateRestrictionStatusRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します + * @summary + * @param {number} typistGroupId + * @param {UpdateTypistGroupRequest} updateTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateTypistGroup(typistGroupId: number, updateTypistGroupRequest: UpdateTypistGroupRequest, options?: any): AxiosPromise { + return localVarFp.updateTypistGroup(typistGroupId, updateTypistGroupRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateWorktypesRequest} updateWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWorktype(id: number, updateWorktypesRequest: UpdateWorktypesRequest, options?: any): AxiosPromise { + return localVarFp.updateWorktype(id, updateWorktypesRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AccountsApi - object-oriented interface + * @export + * @class AccountsApi + * @extends {BaseAPI} + */ +export class AccountsApi extends BaseAPI { + /** + * + * @summary + * @param {PostActiveWorktypeRequest} postActiveWorktypeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public activeWorktype(postActiveWorktypeRequest: PostActiveWorktypeRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).activeWorktype(postActiveWorktypeRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ライセンス発行をキャンセルします + * @summary + * @param {CancelIssueRequest} cancelIssueRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public cancelIssue(cancelIssueRequest: CancelIssueRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).cancelIssue(cancelIssueRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {CreateAccountRequest} createAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public createAccount(createAccountRequest: CreateAccountRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).createAccount(createAccountRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {CreatePartnerAccountRequest} createPartnerAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public createPartnerAccount(createPartnerAccountRequest: CreatePartnerAccountRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).createPartnerAccount(createPartnerAccountRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント配下にタイピストグループを追加します + * @summary + * @param {CreateTypistGroupRequest} createTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public createTypistGroup(createTypistGroupRequest: CreateTypistGroupRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).createTypistGroup(createTypistGroupRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {CreateWorktypesRequest} createWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public createWorktype(createWorktypesRequest: CreateWorktypesRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).createWorktype(createWorktypesRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {DeleteAccountRequest} deleteAccountRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public deleteAccountAndData(deleteAccountRequest: DeleteAccountRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).deleteAccountAndData(deleteAccountRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを削除します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public deleteTypistGroup(typistGroupId: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).deleteTypistGroup(typistGroupId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public deleteWorktype(id: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).deleteWorktype(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {GetAccountInfoMinimalAccessRequest} getAccountInfoMinimalAccessRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest: GetAccountInfoMinimalAccessRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getAccountInfoMinimalAccess(getAccountInfoMinimalAccessRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント配下のAuthor一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getAuthors(options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getAuthors(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定したアカウントの会社名を取得します + * @summary + * @param {GetCompanyNameRequest} getCompanyNameRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getCompanyName(getCompanyNameRequest: GetCompanyNameRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getCompanyName(getCompanyNameRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getDealers(options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getDealers(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定したアカウントのライセンス集計情報を取得します + * @summary + * @param {GetLicenseSummaryRequest} getLicenseSummaryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getLicenseSummary(getLicenseSummaryRequest: GetLicenseSummaryRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getLicenseSummary(getLicenseSummaryRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getMyAccount(options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getMyAccount(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getOptionItems(id: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getOptionItems(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {GetOrderHistoriesRequest} getOrderHistoriesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getOrderHistories(getOrderHistoriesRequest: GetOrderHistoriesRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getOrderHistories(getOrderHistoriesRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {GetPartnerLicensesRequest} getPartnerLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getPartnerLicenses(getPartnerLicensesRequest: GetPartnerLicensesRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getPartnerLicenses(getPartnerLicensesRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {number} limit 取得件数 + * @param {number} offset 開始位置 + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getPartners(limit: number, offset: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getPartners(limit, offset, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを取得します + * @summary + * @param {number} typistGroupId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getTypistGroup(typistGroupId: number, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getTypistGroup(typistGroupId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント配下のタイピストグループ一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getTypistGroups(options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getTypistGroups(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント配下のタイピスト一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getTypists(options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getTypists(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public getWorktypes(options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).getWorktypes(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {IssueLicenseRequest} issueLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public issueLicense(issueLicenseRequest: IssueLicenseRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).issueLicense(issueLicenseRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {UpdateAccountInfoRequest} updateAccountInfoRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public updateAccountInfo(updateAccountInfoRequest: UpdateAccountInfoRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateAccountInfo(updateAccountInfoRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {UpdateFileDeleteSettingRequest} updateFileDeleteSettingRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public updateFileDeleteSetting(updateFileDeleteSettingRequest: UpdateFileDeleteSettingRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateFileDeleteSetting(updateFileDeleteSettingRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateOptionItemsRequest} updateOptionItemsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public updateOptionItems(id: number, updateOptionItemsRequest: UpdateOptionItemsRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateOptionItems(id, updateOptionItemsRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {UpdateRestrictionStatusRequest} updateRestrictionStatusRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public updateRestrictionStatus(updateRestrictionStatusRequest: UpdateRestrictionStatusRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateRestrictionStatus(updateRestrictionStatusRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します + * @summary + * @param {number} typistGroupId + * @param {UpdateTypistGroupRequest} updateTypistGroupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public updateTypistGroup(typistGroupId: number, updateTypistGroupRequest: UpdateTypistGroupRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateTypistGroup(typistGroupId, updateTypistGroupRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {number} id Worktypeの内部ID + * @param {UpdateWorktypesRequest} updateWorktypesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AccountsApi + */ + public updateWorktype(id: number, updateWorktypesRequest: UpdateWorktypesRequest, options?: AxiosRequestConfig) { + return AccountsApiFp(this.configuration).updateWorktype(id, updateWorktypesRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AuthApi - axios parameter creator + * @export + */ +export const AuthApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * リフレッシュトークンを元にアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + accessToken: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/auth/accessToken`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 代行操作用のアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + delegationAccessToken: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/auth/delegation/access-token`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 代行操作用のリフレッシュトークン・アクセストークンを生成します + * @summary + * @param {DelegationTokenRequest} delegationTokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + delegationToken: async (delegationTokenRequest: DelegationTokenRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'delegationTokenRequest' is not null or undefined + assertParamExists('delegationToken', 'delegationTokenRequest', delegationTokenRequest) + const localVarPath = `/auth/delegation/token`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(delegationTokenRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * AzureADB2Cでのサインイン後に払いだされるIDトークンを元に認証用のアクセストークンとリフレッシュトークンを生成します + * @summary + * @param {TokenRequest} tokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + token: async (tokenRequest: TokenRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'tokenRequest' is not null or undefined + assertParamExists('token', 'tokenRequest', tokenRequest) + const localVarPath = `/auth/token`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(tokenRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AuthApi - functional programming interface + * @export + */ +export const AuthApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration) + return { + /** + * リフレッシュトークンを元にアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async accessToken(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.accessToken(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AuthApi.accessToken']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 代行操作用のアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async delegationAccessToken(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.delegationAccessToken(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AuthApi.delegationAccessToken']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 代行操作用のリフレッシュトークン・アクセストークンを生成します + * @summary + * @param {DelegationTokenRequest} delegationTokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async delegationToken(delegationTokenRequest: DelegationTokenRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.delegationToken(delegationTokenRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AuthApi.delegationToken']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * AzureADB2Cでのサインイン後に払いだされるIDトークンを元に認証用のアクセストークンとリフレッシュトークンを生成します + * @summary + * @param {TokenRequest} tokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async token(tokenRequest: TokenRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.token(tokenRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['AuthApi.token']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * AuthApi - factory interface + * @export + */ +export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AuthApiFp(configuration) + return { + /** + * リフレッシュトークンを元にアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + accessToken(options?: any): AxiosPromise { + return localVarFp.accessToken(options).then((request) => request(axios, basePath)); + }, + /** + * 代行操作用のアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + delegationAccessToken(options?: any): AxiosPromise { + return localVarFp.delegationAccessToken(options).then((request) => request(axios, basePath)); + }, + /** + * 代行操作用のリフレッシュトークン・アクセストークンを生成します + * @summary + * @param {DelegationTokenRequest} delegationTokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + delegationToken(delegationTokenRequest: DelegationTokenRequest, options?: any): AxiosPromise { + return localVarFp.delegationToken(delegationTokenRequest, options).then((request) => request(axios, basePath)); + }, + /** + * AzureADB2Cでのサインイン後に払いだされるIDトークンを元に認証用のアクセストークンとリフレッシュトークンを生成します + * @summary + * @param {TokenRequest} tokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + token(tokenRequest: TokenRequest, options?: any): AxiosPromise { + return localVarFp.token(tokenRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AuthApi - object-oriented interface + * @export + * @class AuthApi + * @extends {BaseAPI} + */ +export class AuthApi extends BaseAPI { + /** + * リフレッシュトークンを元にアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthApi + */ + public accessToken(options?: AxiosRequestConfig) { + return AuthApiFp(this.configuration).accessToken(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 代行操作用のアクセストークンを再生成します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthApi + */ + public delegationAccessToken(options?: AxiosRequestConfig) { + return AuthApiFp(this.configuration).delegationAccessToken(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 代行操作用のリフレッシュトークン・アクセストークンを生成します + * @summary + * @param {DelegationTokenRequest} delegationTokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthApi + */ + public delegationToken(delegationTokenRequest: DelegationTokenRequest, options?: AxiosRequestConfig) { + return AuthApiFp(this.configuration).delegationToken(delegationTokenRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * AzureADB2Cでのサインイン後に払いだされるIDトークンを元に認証用のアクセストークンとリフレッシュトークンを生成します + * @summary + * @param {TokenRequest} tokenRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AuthApi + */ + public token(tokenRequest: TokenRequest, options?: AxiosRequestConfig) { + return AuthApiFp(this.configuration).token(tokenRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * DefaultApi - axios parameter creator + * @export + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkHealth: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/health`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + * @export + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async checkHealth(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkHealth(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['DefaultApi.checkHealth']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * DefaultApi - factory interface + * @export + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkHealth(options?: any): AxiosPromise { + return localVarFp.checkHealth(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + * @export + * @class DefaultApi + * @extends {BaseAPI} + */ +export class DefaultApi extends BaseAPI { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApi + */ + public checkHealth(options?: AxiosRequestConfig) { + return DefaultApiFp(this.configuration).checkHealth(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * FilesApi - axios parameter creator + * @export + */ +export const FilesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 指定した音声ファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId ODMSCloud上で管理する音声ファイルのID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + downloadLocation: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('downloadLocation', 'audioFileId', audioFileId) + const localVarPath = `/files/audio/download-location`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (audioFileId !== undefined) { + localVarQueryParameter['audioFileId'] = audioFileId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した音声ファイルに対応したテンプレートファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId 文字起こし対象の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + downloadTemplateLocation: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('downloadTemplateLocation', 'audioFileId', audioFileId) + const localVarPath = `/files/template/download-location`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (audioFileId !== undefined) { + localVarQueryParameter['audioFileId'] = audioFileId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * アップロードが完了した音声ファイルの情報を登録し、文字起こしタスクを生成します + * @summary + * @param {AudioUploadFinishedRequest} audioUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFinished: async (audioUploadFinishedRequest: AudioUploadFinishedRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioUploadFinishedRequest' is not null or undefined + assertParamExists('uploadFinished', 'audioUploadFinishedRequest', audioUploadFinishedRequest) + const localVarPath = `/files/audio/upload-finished`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(audioUploadFinishedRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログイン中ユーザー用のBlob Storage上の音声ファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadLocation: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/files/audio/upload-location`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * アップロードが完了したテンプレートファイルの情報を登録します + * @summary + * @param {TemplateUploadFinishedRequest} templateUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadTemplateFinished: async (templateUploadFinishedRequest: TemplateUploadFinishedRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'templateUploadFinishedRequest' is not null or undefined + assertParamExists('uploadTemplateFinished', 'templateUploadFinishedRequest', templateUploadFinishedRequest) + const localVarPath = `/files/template/upload-finished`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(templateUploadFinishedRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログイン中ユーザー用のBlob Storage上のテンプレートファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadTemplateLocation: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/files/template/upload-location`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * FilesApi - functional programming interface + * @export + */ +export const FilesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = FilesApiAxiosParamCreator(configuration) + return { + /** + * 指定した音声ファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId ODMSCloud上で管理する音声ファイルのID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async downloadLocation(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadLocation(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FilesApi.downloadLocation']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した音声ファイルに対応したテンプレートファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId 文字起こし対象の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async downloadTemplateLocation(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.downloadTemplateLocation(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FilesApi.downloadTemplateLocation']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * アップロードが完了した音声ファイルの情報を登録し、文字起こしタスクを生成します + * @summary + * @param {AudioUploadFinishedRequest} audioUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadFinished(audioUploadFinishedRequest: AudioUploadFinishedRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFinished(audioUploadFinishedRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FilesApi.uploadFinished']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログイン中ユーザー用のBlob Storage上の音声ファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadLocation(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadLocation(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FilesApi.uploadLocation']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * アップロードが完了したテンプレートファイルの情報を登録します + * @summary + * @param {TemplateUploadFinishedRequest} templateUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadTemplateFinished(templateUploadFinishedRequest: TemplateUploadFinishedRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadTemplateFinished(templateUploadFinishedRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FilesApi.uploadTemplateFinished']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログイン中ユーザー用のBlob Storage上のテンプレートファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async uploadTemplateLocation(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.uploadTemplateLocation(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['FilesApi.uploadTemplateLocation']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * FilesApi - factory interface + * @export + */ +export const FilesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = FilesApiFp(configuration) + return { + /** + * 指定した音声ファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId ODMSCloud上で管理する音声ファイルのID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + downloadLocation(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.downloadLocation(audioFileId, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した音声ファイルに対応したテンプレートファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId 文字起こし対象の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + downloadTemplateLocation(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.downloadTemplateLocation(audioFileId, options).then((request) => request(axios, basePath)); + }, + /** + * アップロードが完了した音声ファイルの情報を登録し、文字起こしタスクを生成します + * @summary + * @param {AudioUploadFinishedRequest} audioUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadFinished(audioUploadFinishedRequest: AudioUploadFinishedRequest, options?: any): AxiosPromise { + return localVarFp.uploadFinished(audioUploadFinishedRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログイン中ユーザー用のBlob Storage上の音声ファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadLocation(options?: any): AxiosPromise { + return localVarFp.uploadLocation(options).then((request) => request(axios, basePath)); + }, + /** + * アップロードが完了したテンプレートファイルの情報を登録します + * @summary + * @param {TemplateUploadFinishedRequest} templateUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadTemplateFinished(templateUploadFinishedRequest: TemplateUploadFinishedRequest, options?: any): AxiosPromise { + return localVarFp.uploadTemplateFinished(templateUploadFinishedRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログイン中ユーザー用のBlob Storage上のテンプレートファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + uploadTemplateLocation(options?: any): AxiosPromise { + return localVarFp.uploadTemplateLocation(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * FilesApi - object-oriented interface + * @export + * @class FilesApi + * @extends {BaseAPI} + */ +export class FilesApi extends BaseAPI { + /** + * 指定した音声ファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId ODMSCloud上で管理する音声ファイルのID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FilesApi + */ + public downloadLocation(audioFileId: number, options?: AxiosRequestConfig) { + return FilesApiFp(this.configuration).downloadLocation(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した音声ファイルに対応したテンプレートファイルのBlob Storage上のダウンロード先アクセスURLを取得します + * @summary + * @param {number} audioFileId 文字起こし対象の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FilesApi + */ + public downloadTemplateLocation(audioFileId: number, options?: AxiosRequestConfig) { + return FilesApiFp(this.configuration).downloadTemplateLocation(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * アップロードが完了した音声ファイルの情報を登録し、文字起こしタスクを生成します + * @summary + * @param {AudioUploadFinishedRequest} audioUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FilesApi + */ + public uploadFinished(audioUploadFinishedRequest: AudioUploadFinishedRequest, options?: AxiosRequestConfig) { + return FilesApiFp(this.configuration).uploadFinished(audioUploadFinishedRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログイン中ユーザー用のBlob Storage上の音声ファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FilesApi + */ + public uploadLocation(options?: AxiosRequestConfig) { + return FilesApiFp(this.configuration).uploadLocation(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * アップロードが完了したテンプレートファイルの情報を登録します + * @summary + * @param {TemplateUploadFinishedRequest} templateUploadFinishedRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FilesApi + */ + public uploadTemplateFinished(templateUploadFinishedRequest: TemplateUploadFinishedRequest, options?: AxiosRequestConfig) { + return FilesApiFp(this.configuration).uploadTemplateFinished(templateUploadFinishedRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログイン中ユーザー用のBlob Storage上のテンプレートファイルのアップロード先アクセスURLを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof FilesApi + */ + public uploadTemplateLocation(options?: AxiosRequestConfig) { + return FilesApiFp(this.configuration).uploadTemplateLocation(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * LicensesApi - axios parameter creator + * @export + */ +export const LicensesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary + * @param {ActivateCardLicensesRequest} activateCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activateCardLicenses: async (activateCardLicensesRequest: ActivateCardLicensesRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'activateCardLicensesRequest' is not null or undefined + assertParamExists('activateCardLicenses', 'activateCardLicensesRequest', activateCardLicensesRequest) + const localVarPath = `/licenses/cards/activate`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(activateCardLicensesRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ライセンス注文をキャンセルします + * @summary + * @param {CancelOrderRequest} cancelOrderRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelOrder: async (cancelOrderRequest: CancelOrderRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'cancelOrderRequest' is not null or undefined + assertParamExists('cancelOrder', 'cancelOrderRequest', cancelOrderRequest) + const localVarPath = `/licenses/orders/cancel`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cancelOrderRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {CreateOrdersRequest} createOrdersRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrders: async (createOrdersRequest: CreateOrdersRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createOrdersRequest' is not null or undefined + assertParamExists('createOrders', 'createOrdersRequest', createOrdersRequest) + const localVarPath = `/licenses/orders`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createOrdersRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 割り当て可能なライセンスを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAllocatableLicenses: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/licenses/allocatable`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {IssueCardLicensesRequest} issueCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + issueCardLicenses: async (issueCardLicensesRequest: IssueCardLicensesRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'issueCardLicensesRequest' is not null or undefined + assertParamExists('issueCardLicenses', 'issueCardLicensesRequest', issueCardLicensesRequest) + const localVarPath = `/licenses/cards`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(issueCardLicensesRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LicensesApi - functional programming interface + * @export + */ +export const LicensesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = LicensesApiAxiosParamCreator(configuration) + return { + /** + * + * @summary + * @param {ActivateCardLicensesRequest} activateCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async activateCardLicenses(activateCardLicensesRequest: ActivateCardLicensesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.activateCardLicenses(activateCardLicensesRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['LicensesApi.activateCardLicenses']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ライセンス注文をキャンセルします + * @summary + * @param {CancelOrderRequest} cancelOrderRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancelOrder(cancelOrderRequest: CancelOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrder(cancelOrderRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['LicensesApi.cancelOrder']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {CreateOrdersRequest} createOrdersRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createOrders(createOrdersRequest: CreateOrdersRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createOrders(createOrdersRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['LicensesApi.createOrders']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 割り当て可能なライセンスを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getAllocatableLicenses(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAllocatableLicenses(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['LicensesApi.getAllocatableLicenses']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {IssueCardLicensesRequest} issueCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async issueCardLicenses(issueCardLicensesRequest: IssueCardLicensesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.issueCardLicenses(issueCardLicensesRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['LicensesApi.issueCardLicenses']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * LicensesApi - factory interface + * @export + */ +export const LicensesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LicensesApiFp(configuration) + return { + /** + * + * @summary + * @param {ActivateCardLicensesRequest} activateCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + activateCardLicenses(activateCardLicensesRequest: ActivateCardLicensesRequest, options?: any): AxiosPromise { + return localVarFp.activateCardLicenses(activateCardLicensesRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ライセンス注文をキャンセルします + * @summary + * @param {CancelOrderRequest} cancelOrderRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancelOrder(cancelOrderRequest: CancelOrderRequest, options?: any): AxiosPromise { + return localVarFp.cancelOrder(cancelOrderRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {CreateOrdersRequest} createOrdersRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrders(createOrdersRequest: CreateOrdersRequest, options?: any): AxiosPromise { + return localVarFp.createOrders(createOrdersRequest, options).then((request) => request(axios, basePath)); + }, + /** + * 割り当て可能なライセンスを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAllocatableLicenses(options?: any): AxiosPromise { + return localVarFp.getAllocatableLicenses(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {IssueCardLicensesRequest} issueCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + issueCardLicenses(issueCardLicensesRequest: IssueCardLicensesRequest, options?: any): AxiosPromise { + return localVarFp.issueCardLicenses(issueCardLicensesRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * LicensesApi - object-oriented interface + * @export + * @class LicensesApi + * @extends {BaseAPI} + */ +export class LicensesApi extends BaseAPI { + /** + * + * @summary + * @param {ActivateCardLicensesRequest} activateCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LicensesApi + */ + public activateCardLicenses(activateCardLicensesRequest: ActivateCardLicensesRequest, options?: AxiosRequestConfig) { + return LicensesApiFp(this.configuration).activateCardLicenses(activateCardLicensesRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ライセンス注文をキャンセルします + * @summary + * @param {CancelOrderRequest} cancelOrderRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LicensesApi + */ + public cancelOrder(cancelOrderRequest: CancelOrderRequest, options?: AxiosRequestConfig) { + return LicensesApiFp(this.configuration).cancelOrder(cancelOrderRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {CreateOrdersRequest} createOrdersRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LicensesApi + */ + public createOrders(createOrdersRequest: CreateOrdersRequest, options?: AxiosRequestConfig) { + return LicensesApiFp(this.configuration).createOrders(createOrdersRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 割り当て可能なライセンスを取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LicensesApi + */ + public getAllocatableLicenses(options?: AxiosRequestConfig) { + return LicensesApiFp(this.configuration).getAllocatableLicenses(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {IssueCardLicensesRequest} issueCardLicensesRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LicensesApi + */ + public issueCardLicenses(issueCardLicensesRequest: IssueCardLicensesRequest, options?: AxiosRequestConfig) { + return LicensesApiFp(this.configuration).issueCardLicenses(issueCardLicensesRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * NotificationApi - axios parameter creator + * @export + */ +export const NotificationApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary + * @param {RegisterRequest} registerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + register: async (registerRequest: RegisterRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'registerRequest' is not null or undefined + assertParamExists('register', 'registerRequest', registerRequest) + const localVarPath = `/notification/register`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(registerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * NotificationApi - functional programming interface + * @export + */ +export const NotificationApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = NotificationApiAxiosParamCreator(configuration) + return { + /** + * + * @summary + * @param {RegisterRequest} registerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async register(registerRequest: RegisterRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.register(registerRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['NotificationApi.register']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * NotificationApi - factory interface + * @export + */ +export const NotificationApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = NotificationApiFp(configuration) + return { + /** + * + * @summary + * @param {RegisterRequest} registerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + register(registerRequest: RegisterRequest, options?: any): AxiosPromise { + return localVarFp.register(registerRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * NotificationApi - object-oriented interface + * @export + * @class NotificationApi + * @extends {BaseAPI} + */ +export class NotificationApi extends BaseAPI { + /** + * + * @summary + * @param {RegisterRequest} registerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof NotificationApi + */ + public register(registerRequest: RegisterRequest, options?: AxiosRequestConfig) { + return NotificationApiFp(this.configuration).register(registerRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TasksApi - axios parameter creator + * @export + */ +export const TasksApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 指定した文字起こしタスクをバックアップします(ステータスをBackupにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + backup: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('backup', 'audioFileId', audioFileId) + const localVarPath = `/tasks/{audioFileId}/backup` + .replace(`{${"audioFileId"}}`, encodeURIComponent(String(audioFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した文字起こしタスクをキャンセルします(ステータスをUploadedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('cancel', 'audioFileId', audioFileId) + const localVarPath = `/tasks/{audioFileId}/cancel` + .replace(`{${"audioFileId"}}`, encodeURIComponent(String(audioFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した文字起こしタスクのチェックアウト候補を変更します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {PostCheckoutPermissionRequest} postCheckoutPermissionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + changeCheckoutPermission: async (audioFileId: number, postCheckoutPermissionRequest: PostCheckoutPermissionRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('changeCheckoutPermission', 'audioFileId', audioFileId) + // verify required parameter 'postCheckoutPermissionRequest' is not null or undefined + assertParamExists('changeCheckoutPermission', 'postCheckoutPermissionRequest', postCheckoutPermissionRequest) + const localVarPath = `/tasks/{audioFileId}/checkout-permission` + .replace(`{${"audioFileId"}}`, encodeURIComponent(String(audioFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postCheckoutPermissionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した文字起こしタスクをチェックインします(ステータスをFinishedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkin: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('checkin', 'audioFileId', audioFileId) + const localVarPath = `/tasks/{audioFileId}/checkin` + .replace(`{${"audioFileId"}}`, encodeURIComponent(String(audioFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した文字起こしタスクをチェックアウトします(ステータスをInprogressにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkout: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('checkout', 'audioFileId', audioFileId) + const localVarPath = `/tasks/{audioFileId}/checkout` + .replace(`{${"audioFileId"}}`, encodeURIComponent(String(audioFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した文字起こしタスクを削除します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTask: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('deleteTask', 'audioFileId', audioFileId) + const localVarPath = `/tasks/{audioFileId}/delete` + .replace(`{${"audioFileId"}}`, encodeURIComponent(String(audioFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した文字起こしタスクの次のタスクに紐づく音声ファイルIDを取得します + * @summary + * @param {number} endedFileId 文字起こし完了したタスクの音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNextAudioFile: async (endedFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'endedFileId' is not null or undefined + assertParamExists('getNextAudioFile', 'endedFileId', endedFileId) + const localVarPath = `/tasks/next`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (endedFileId !== undefined) { + localVarQueryParameter['endedFileId'] = endedFileId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 音声ファイル・文字起こしタスク情報をページ指定して取得します + * @summary + * @param {number} [limit] タスクの取得件数(指定しない場合はデフォルト値) + * @param {number} [offset] オフセット(何件目から取得するか 設定しない場合はデフォルト値) + * @param {string} [status] 取得対象とするタスクのステータス。カンマ(,)区切りで複数指定可能。設定されない場合はすべてのステータスを取得対象とする。許容するステータスの値は次の通り: Uploaded / Pending / InProgress / Finished / Backup + * @param {string} [direction] ASC/DESC + * @param {string} [paramName] JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTasks: async (limit?: number, offset?: number, status?: string, direction?: string, paramName?: string, options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/tasks`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (direction !== undefined) { + localVarQueryParameter['direction'] = direction; + } + + if (paramName !== undefined) { + localVarQueryParameter['paramName'] = paramName; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 指定した文字起こしタスクを一時中断します(ステータスをPendingにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + suspend: async (audioFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'audioFileId' is not null or undefined + assertParamExists('suspend', 'audioFileId', audioFileId) + const localVarPath = `/tasks/{audioFileId}/suspend` + .replace(`{${"audioFileId"}}`, encodeURIComponent(String(audioFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TasksApi - functional programming interface + * @export + */ +export const TasksApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TasksApiAxiosParamCreator(configuration) + return { + /** + * 指定した文字起こしタスクをバックアップします(ステータスをBackupにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async backup(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.backup(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.backup']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した文字起こしタスクをキャンセルします(ステータスをUploadedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cancel(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cancel(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.cancel']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した文字起こしタスクのチェックアウト候補を変更します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {PostCheckoutPermissionRequest} postCheckoutPermissionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async changeCheckoutPermission(audioFileId: number, postCheckoutPermissionRequest: PostCheckoutPermissionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.changeCheckoutPermission(audioFileId, postCheckoutPermissionRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.changeCheckoutPermission']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した文字起こしタスクをチェックインします(ステータスをFinishedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async checkin(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkin(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.checkin']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した文字起こしタスクをチェックアウトします(ステータスをInprogressにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async checkout(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.checkout(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.checkout']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した文字起こしタスクを削除します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteTask(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTask(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.deleteTask']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した文字起こしタスクの次のタスクに紐づく音声ファイルIDを取得します + * @summary + * @param {number} endedFileId 文字起こし完了したタスクの音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getNextAudioFile(endedFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getNextAudioFile(endedFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.getNextAudioFile']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 音声ファイル・文字起こしタスク情報をページ指定して取得します + * @summary + * @param {number} [limit] タスクの取得件数(指定しない場合はデフォルト値) + * @param {number} [offset] オフセット(何件目から取得するか 設定しない場合はデフォルト値) + * @param {string} [status] 取得対象とするタスクのステータス。カンマ(,)区切りで複数指定可能。設定されない場合はすべてのステータスを取得対象とする。許容するステータスの値は次の通り: Uploaded / Pending / InProgress / Finished / Backup + * @param {string} [direction] ASC/DESC + * @param {string} [paramName] JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTasks(limit?: number, offset?: number, status?: string, direction?: string, paramName?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTasks(limit, offset, status, direction, paramName, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.getTasks']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 指定した文字起こしタスクを一時中断します(ステータスをPendingにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async suspend(audioFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.suspend(audioFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TasksApi.suspend']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * TasksApi - factory interface + * @export + */ +export const TasksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TasksApiFp(configuration) + return { + /** + * 指定した文字起こしタスクをバックアップします(ステータスをBackupにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + backup(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.backup(audioFileId, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した文字起こしタスクをキャンセルします(ステータスをUploadedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cancel(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.cancel(audioFileId, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した文字起こしタスクのチェックアウト候補を変更します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {PostCheckoutPermissionRequest} postCheckoutPermissionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + changeCheckoutPermission(audioFileId: number, postCheckoutPermissionRequest: PostCheckoutPermissionRequest, options?: any): AxiosPromise { + return localVarFp.changeCheckoutPermission(audioFileId, postCheckoutPermissionRequest, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した文字起こしタスクをチェックインします(ステータスをFinishedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkin(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.checkin(audioFileId, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した文字起こしタスクをチェックアウトします(ステータスをInprogressにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + checkout(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.checkout(audioFileId, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した文字起こしタスクを削除します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTask(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.deleteTask(audioFileId, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した文字起こしタスクの次のタスクに紐づく音声ファイルIDを取得します + * @summary + * @param {number} endedFileId 文字起こし完了したタスクの音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getNextAudioFile(endedFileId: number, options?: any): AxiosPromise { + return localVarFp.getNextAudioFile(endedFileId, options).then((request) => request(axios, basePath)); + }, + /** + * 音声ファイル・文字起こしタスク情報をページ指定して取得します + * @summary + * @param {number} [limit] タスクの取得件数(指定しない場合はデフォルト値) + * @param {number} [offset] オフセット(何件目から取得するか 設定しない場合はデフォルト値) + * @param {string} [status] 取得対象とするタスクのステータス。カンマ(,)区切りで複数指定可能。設定されない場合はすべてのステータスを取得対象とする。許容するステータスの値は次の通り: Uploaded / Pending / InProgress / Finished / Backup + * @param {string} [direction] ASC/DESC + * @param {string} [paramName] JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTasks(limit?: number, offset?: number, status?: string, direction?: string, paramName?: string, options?: any): AxiosPromise { + return localVarFp.getTasks(limit, offset, status, direction, paramName, options).then((request) => request(axios, basePath)); + }, + /** + * 指定した文字起こしタスクを一時中断します(ステータスをPendingにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + suspend(audioFileId: number, options?: any): AxiosPromise { + return localVarFp.suspend(audioFileId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TasksApi - object-oriented interface + * @export + * @class TasksApi + * @extends {BaseAPI} + */ +export class TasksApi extends BaseAPI { + /** + * 指定した文字起こしタスクをバックアップします(ステータスをBackupにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public backup(audioFileId: number, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).backup(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した文字起こしタスクをキャンセルします(ステータスをUploadedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public cancel(audioFileId: number, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).cancel(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した文字起こしタスクのチェックアウト候補を変更します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {PostCheckoutPermissionRequest} postCheckoutPermissionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public changeCheckoutPermission(audioFileId: number, postCheckoutPermissionRequest: PostCheckoutPermissionRequest, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).changeCheckoutPermission(audioFileId, postCheckoutPermissionRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した文字起こしタスクをチェックインします(ステータスをFinishedにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public checkin(audioFileId: number, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).checkin(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した文字起こしタスクをチェックアウトします(ステータスをInprogressにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public checkout(audioFileId: number, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).checkout(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した文字起こしタスクを削除します。 + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public deleteTask(audioFileId: number, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).deleteTask(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した文字起こしタスクの次のタスクに紐づく音声ファイルIDを取得します + * @summary + * @param {number} endedFileId 文字起こし完了したタスクの音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public getNextAudioFile(endedFileId: number, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).getNextAudioFile(endedFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 音声ファイル・文字起こしタスク情報をページ指定して取得します + * @summary + * @param {number} [limit] タスクの取得件数(指定しない場合はデフォルト値) + * @param {number} [offset] オフセット(何件目から取得するか 設定しない場合はデフォルト値) + * @param {string} [status] 取得対象とするタスクのステータス。カンマ(,)区切りで複数指定可能。設定されない場合はすべてのステータスを取得対象とする。許容するステータスの値は次の通り: Uploaded / Pending / InProgress / Finished / Backup + * @param {string} [direction] ASC/DESC + * @param {string} [paramName] JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public getTasks(limit?: number, offset?: number, status?: string, direction?: string, paramName?: string, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).getTasks(limit, offset, status, direction, paramName, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 指定した文字起こしタスクを一時中断します(ステータスをPendingにします) + * @summary + * @param {number} audioFileId ODMS Cloud上の音声ファイルID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TasksApi + */ + public suspend(audioFileId: number, options?: AxiosRequestConfig) { + return TasksApiFp(this.configuration).suspend(audioFileId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TemplatesApi - axios parameter creator + * @export + */ +export const TemplatesApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * ログインしているユーザーのアカウント配下でIDで指定されたテンプレートファイルを削除します + * @summary + * @param {number} templateFileId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTemplateFile: async (templateFileId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'templateFileId' is not null or undefined + assertParamExists('deleteTemplateFile', 'templateFileId', templateFileId) + const localVarPath = `/templates/{templateFileId}/delete` + .replace(`{${"templateFileId"}}`, encodeURIComponent(String(templateFileId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * アカウント内のテンプレートファイルの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTemplates: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/templates`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TemplatesApi - functional programming interface + * @export + */ +export const TemplatesApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TemplatesApiAxiosParamCreator(configuration) + return { + /** + * ログインしているユーザーのアカウント配下でIDで指定されたテンプレートファイルを削除します + * @summary + * @param {number} templateFileId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteTemplateFile(templateFileId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTemplateFile(templateFileId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TemplatesApi.deleteTemplateFile']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * アカウント内のテンプレートファイルの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTemplates(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTemplates(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TemplatesApi.getTemplates']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * TemplatesApi - factory interface + * @export + */ +export const TemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TemplatesApiFp(configuration) + return { + /** + * ログインしているユーザーのアカウント配下でIDで指定されたテンプレートファイルを削除します + * @summary + * @param {number} templateFileId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteTemplateFile(templateFileId: number, options?: any): AxiosPromise { + return localVarFp.deleteTemplateFile(templateFileId, options).then((request) => request(axios, basePath)); + }, + /** + * アカウント内のテンプレートファイルの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTemplates(options?: any): AxiosPromise { + return localVarFp.getTemplates(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TemplatesApi - object-oriented interface + * @export + * @class TemplatesApi + * @extends {BaseAPI} + */ +export class TemplatesApi extends BaseAPI { + /** + * ログインしているユーザーのアカウント配下でIDで指定されたテンプレートファイルを削除します + * @summary + * @param {number} templateFileId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TemplatesApi + */ + public deleteTemplateFile(templateFileId: number, options?: AxiosRequestConfig) { + return TemplatesApiFp(this.configuration).deleteTemplateFile(templateFileId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * アカウント内のテンプレートファイルの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TemplatesApi + */ + public getTemplates(options?: AxiosRequestConfig) { + return TemplatesApiFp(this.configuration).getTemplates(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * TermsApi - axios parameter creator + * @export + */ +export const TermsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTermsInfo: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/terms`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * TermsApi - functional programming interface + * @export + */ +export const TermsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = TermsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTermsInfo(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTermsInfo(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['TermsApi.getTermsInfo']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * TermsApi - factory interface + * @export + */ +export const TermsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = TermsApiFp(configuration) + return { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTermsInfo(options?: any): AxiosPromise { + return localVarFp.getTermsInfo(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * TermsApi - object-oriented interface + * @export + * @class TermsApi + * @extends {BaseAPI} + */ +export class TermsApi extends BaseAPI { + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof TermsApi + */ + public getTermsInfo(options?: AxiosRequestConfig) { + return TermsApiFp(this.configuration).getTermsInfo(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * UsersApi - axios parameter creator + * @export + */ +export const UsersApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * ライセンスを割り当てます + * @summary + * @param {AllocateLicenseRequest} allocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + allocateLicense: async (allocateLicenseRequest: AllocateLicenseRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'allocateLicenseRequest' is not null or undefined + assertParamExists('allocateLicense', 'allocateLicenseRequest', allocateLicenseRequest) + const localVarPath = `/users/license/allocate`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(allocateLicenseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmUser: async (confirmRequest: ConfirmRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'confirmRequest' is not null or undefined + assertParamExists('confirmUser', 'confirmRequest', confirmRequest) + const localVarPath = `/users/confirm`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(confirmRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmUserAndInitPassword: async (confirmRequest: ConfirmRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'confirmRequest' is not null or undefined + assertParamExists('confirmUserAndInitPassword', 'confirmRequest', confirmRequest) + const localVarPath = `/users/confirm/initpassword`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(confirmRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ライセンス割り当てを解除します + * @summary + * @param {DeallocateLicenseRequest} deallocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deallocateLicense: async (deallocateLicenseRequest: DeallocateLicenseRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'deallocateLicenseRequest' is not null or undefined + assertParamExists('deallocateLicense', 'deallocateLicenseRequest', deallocateLicenseRequest) + const localVarPath = `/users/license/deallocate`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(deallocateLicenseRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ユーザーを削除します + * @summary + * @param {PostDeleteUserRequest} postDeleteUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser: async (postDeleteUserRequest: PostDeleteUserRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'postDeleteUserRequest' is not null or undefined + assertParamExists('deleteUser', 'postDeleteUserRequest', postDeleteUserRequest) + const localVarPath = `/users/delete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postDeleteUserRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーの情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyUser: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/users/me`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーに関連する各種情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRelations: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/users/relations`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのタスクソート条件を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSortCriteria: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/users/sort-criteria`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUsers: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/users`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ユーザーを一括登録します + * @summary + * @param {PostMultipleImportsRequest} postMultipleImportsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + multipleImports: async (postMultipleImportsRequest: PostMultipleImportsRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'postMultipleImportsRequest' is not null or undefined + assertParamExists('multipleImports', 'postMultipleImportsRequest', postMultipleImportsRequest) + const localVarPath = `/users/multiple-imports`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postMultipleImportsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ユーザー一括登録の完了を通知します + * @summary + * @param {PostMultipleImportsCompleteRequest} postMultipleImportsCompleteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + multipleImportsComplate: async (postMultipleImportsCompleteRequest: PostMultipleImportsCompleteRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'postMultipleImportsCompleteRequest' is not null or undefined + assertParamExists('multipleImportsComplate', 'postMultipleImportsCompleteRequest', postMultipleImportsCompleteRequest) + const localVarPath = `/users/multiple-imports/complete`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postMultipleImportsCompleteRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary + * @param {SignupRequest} signupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + signup: async (signupRequest: SignupRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'signupRequest' is not null or undefined + assertParamExists('signup', 'signupRequest', signupRequest) + const localVarPath = `/users/signup`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(signupRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * 利用規約同意バージョンを更新 + * @summary + * @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateAcceptedVersion: async (updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'updateAcceptedVersionRequest' is not null or undefined + assertParamExists('updateAcceptedVersion', 'updateAcceptedVersionRequest', updateAcceptedVersionRequest) + const localVarPath = `/users/accepted-version`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateAcceptedVersionRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ログインしているユーザーのタスクソート条件を更新します + * @summary + * @param {PostSortCriteriaRequest} postSortCriteriaRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateSortCriteria: async (postSortCriteriaRequest: PostSortCriteriaRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'postSortCriteriaRequest' is not null or undefined + assertParamExists('updateSortCriteria', 'postSortCriteriaRequest', postSortCriteriaRequest) + const localVarPath = `/users/sort-criteria`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postSortCriteriaRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * ユーザーの情報を更新します + * @summary + * @param {PostUpdateUserRequest} postUpdateUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser: async (postUpdateUserRequest: PostUpdateUserRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'postUpdateUserRequest' is not null or undefined + assertParamExists('updateUser', 'postUpdateUserRequest', postUpdateUserRequest) + const localVarPath = `/users/update`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(postUpdateUserRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UsersApi - functional programming interface + * @export + */ +export const UsersApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration) + return { + /** + * ライセンスを割り当てます + * @summary + * @param {AllocateLicenseRequest} allocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async allocateLicense(allocateLicenseRequest: AllocateLicenseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.allocateLicense(allocateLicenseRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.allocateLicense']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async confirmUser(confirmRequest: ConfirmRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.confirmUser(confirmRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.confirmUser']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async confirmUserAndInitPassword(confirmRequest: ConfirmRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.confirmUserAndInitPassword(confirmRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.confirmUserAndInitPassword']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ライセンス割り当てを解除します + * @summary + * @param {DeallocateLicenseRequest} deallocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deallocateLicense(deallocateLicenseRequest: DeallocateLicenseRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deallocateLicense(deallocateLicenseRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.deallocateLicense']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ユーザーを削除します + * @summary + * @param {PostDeleteUserRequest} postDeleteUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteUser(postDeleteUserRequest: PostDeleteUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteUser(postDeleteUserRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.deleteUser']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーの情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getMyUser(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getMyUser(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.getMyUser']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーに関連する各種情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getRelations(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getRelations(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.getRelations']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのタスクソート条件を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSortCriteria(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSortCriteria(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.getSortCriteria']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUsers(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUsers(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.getUsers']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ユーザーを一括登録します + * @summary + * @param {PostMultipleImportsRequest} postMultipleImportsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async multipleImports(postMultipleImportsRequest: PostMultipleImportsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.multipleImports(postMultipleImportsRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.multipleImports']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ユーザー一括登録の完了を通知します + * @summary + * @param {PostMultipleImportsCompleteRequest} postMultipleImportsCompleteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async multipleImportsComplate(postMultipleImportsCompleteRequest: PostMultipleImportsCompleteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.multipleImportsComplate(postMultipleImportsCompleteRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.multipleImportsComplate']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * + * @summary + * @param {SignupRequest} signupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async signup(signupRequest: SignupRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.signup(signupRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.signup']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * 利用規約同意バージョンを更新 + * @summary + * @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateAcceptedVersion(updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateAcceptedVersion(updateAcceptedVersionRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.updateAcceptedVersion']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ログインしているユーザーのタスクソート条件を更新します + * @summary + * @param {PostSortCriteriaRequest} postSortCriteriaRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateSortCriteria(postSortCriteriaRequest: PostSortCriteriaRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateSortCriteria(postSortCriteriaRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.updateSortCriteria']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * ユーザーの情報を更新します + * @summary + * @param {PostUpdateUserRequest} postUpdateUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateUser(postUpdateUserRequest: PostUpdateUserRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateUser(postUpdateUserRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['UsersApi.updateUser']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * UsersApi - factory interface + * @export + */ +export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UsersApiFp(configuration) + return { + /** + * ライセンスを割り当てます + * @summary + * @param {AllocateLicenseRequest} allocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + allocateLicense(allocateLicenseRequest: AllocateLicenseRequest, options?: any): AxiosPromise { + return localVarFp.allocateLicense(allocateLicenseRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmUser(confirmRequest: ConfirmRequest, options?: any): AxiosPromise { + return localVarFp.confirmUser(confirmRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmUserAndInitPassword(confirmRequest: ConfirmRequest, options?: any): AxiosPromise { + return localVarFp.confirmUserAndInitPassword(confirmRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ライセンス割り当てを解除します + * @summary + * @param {DeallocateLicenseRequest} deallocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deallocateLicense(deallocateLicenseRequest: DeallocateLicenseRequest, options?: any): AxiosPromise { + return localVarFp.deallocateLicense(deallocateLicenseRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ユーザーを削除します + * @summary + * @param {PostDeleteUserRequest} postDeleteUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteUser(postDeleteUserRequest: PostDeleteUserRequest, options?: any): AxiosPromise { + return localVarFp.deleteUser(postDeleteUserRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーの情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getMyUser(options?: any): AxiosPromise { + return localVarFp.getMyUser(options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーに関連する各種情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getRelations(options?: any): AxiosPromise { + return localVarFp.getRelations(options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのタスクソート条件を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSortCriteria(options?: any): AxiosPromise { + return localVarFp.getSortCriteria(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUsers(options?: any): AxiosPromise { + return localVarFp.getUsers(options).then((request) => request(axios, basePath)); + }, + /** + * ユーザーを一括登録します + * @summary + * @param {PostMultipleImportsRequest} postMultipleImportsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + multipleImports(postMultipleImportsRequest: PostMultipleImportsRequest, options?: any): AxiosPromise { + return localVarFp.multipleImports(postMultipleImportsRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ユーザー一括登録の完了を通知します + * @summary + * @param {PostMultipleImportsCompleteRequest} postMultipleImportsCompleteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + multipleImportsComplate(postMultipleImportsCompleteRequest: PostMultipleImportsCompleteRequest, options?: any): AxiosPromise { + return localVarFp.multipleImportsComplate(postMultipleImportsCompleteRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary + * @param {SignupRequest} signupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + signup(signupRequest: SignupRequest, options?: any): AxiosPromise { + return localVarFp.signup(signupRequest, options).then((request) => request(axios, basePath)); + }, + /** + * 利用規約同意バージョンを更新 + * @summary + * @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateAcceptedVersion(updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options?: any): AxiosPromise { + return localVarFp.updateAcceptedVersion(updateAcceptedVersionRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ログインしているユーザーのタスクソート条件を更新します + * @summary + * @param {PostSortCriteriaRequest} postSortCriteriaRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateSortCriteria(postSortCriteriaRequest: PostSortCriteriaRequest, options?: any): AxiosPromise { + return localVarFp.updateSortCriteria(postSortCriteriaRequest, options).then((request) => request(axios, basePath)); + }, + /** + * ユーザーの情報を更新します + * @summary + * @param {PostUpdateUserRequest} postUpdateUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUser(postUpdateUserRequest: PostUpdateUserRequest, options?: any): AxiosPromise { + return localVarFp.updateUser(postUpdateUserRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UsersApi - object-oriented interface + * @export + * @class UsersApi + * @extends {BaseAPI} + */ +export class UsersApi extends BaseAPI { + /** + * ライセンスを割り当てます + * @summary + * @param {AllocateLicenseRequest} allocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public allocateLicense(allocateLicenseRequest: AllocateLicenseRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).allocateLicense(allocateLicenseRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public confirmUser(confirmRequest: ConfirmRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).confirmUser(confirmRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {ConfirmRequest} confirmRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public confirmUserAndInitPassword(confirmRequest: ConfirmRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).confirmUserAndInitPassword(confirmRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ライセンス割り当てを解除します + * @summary + * @param {DeallocateLicenseRequest} deallocateLicenseRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public deallocateLicense(deallocateLicenseRequest: DeallocateLicenseRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).deallocateLicense(deallocateLicenseRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ユーザーを削除します + * @summary + * @param {PostDeleteUserRequest} postDeleteUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public deleteUser(postDeleteUserRequest: PostDeleteUserRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).deleteUser(postDeleteUserRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーの情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public getMyUser(options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).getMyUser(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーに関連する各種情報を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public getRelations(options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).getRelations(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのタスクソート条件を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public getSortCriteria(options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).getSortCriteria(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public getUsers(options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).getUsers(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ユーザーを一括登録します + * @summary + * @param {PostMultipleImportsRequest} postMultipleImportsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public multipleImports(postMultipleImportsRequest: PostMultipleImportsRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).multipleImports(postMultipleImportsRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ユーザー一括登録の完了を通知します + * @summary + * @param {PostMultipleImportsCompleteRequest} postMultipleImportsCompleteRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public multipleImportsComplate(postMultipleImportsCompleteRequest: PostMultipleImportsCompleteRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).multipleImportsComplate(postMultipleImportsCompleteRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary + * @param {SignupRequest} signupRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public signup(signupRequest: SignupRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).signup(signupRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * 利用規約同意バージョンを更新 + * @summary + * @param {UpdateAcceptedVersionRequest} updateAcceptedVersionRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public updateAcceptedVersion(updateAcceptedVersionRequest: UpdateAcceptedVersionRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).updateAcceptedVersion(updateAcceptedVersionRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ログインしているユーザーのタスクソート条件を更新します + * @summary + * @param {PostSortCriteriaRequest} postSortCriteriaRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public updateSortCriteria(postSortCriteriaRequest: PostSortCriteriaRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).updateSortCriteria(postSortCriteriaRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * ユーザーの情報を更新します + * @summary + * @param {PostUpdateUserRequest} postUpdateUserRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof UsersApi + */ + public updateUser(postUpdateUserRequest: PostUpdateUserRequest, options?: AxiosRequestConfig) { + return UsersApiFp(this.configuration).updateUser(postUpdateUserRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * WorkflowsApi - axios parameter creator + * @export + */ +export const WorkflowsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * アカウント内にワークフローを新規作成します + * @summary + * @param {CreateWorkflowsRequest} createWorkflowsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWorkflows: async (createWorkflowsRequest: CreateWorkflowsRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'createWorkflowsRequest' is not null or undefined + assertParamExists('createWorkflows', 'createWorkflowsRequest', createWorkflowsRequest) + const localVarPath = `/workflows`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createWorkflowsRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * アカウント内のワークフローを削除します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteWorkflow: async (workflowId: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'workflowId' is not null or undefined + assertParamExists('deleteWorkflow', 'workflowId', workflowId) + const localVarPath = `/workflows/{workflowId}/delete` + .replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * アカウント内のワークフローの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWorkflows: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/workflows`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * アカウント内のワークフローを編集します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {UpdateWorkflowRequest} updateWorkflowRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWorkflow: async (workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'workflowId' is not null or undefined + assertParamExists('updateWorkflow', 'workflowId', workflowId) + // verify required parameter 'updateWorkflowRequest' is not null or undefined + assertParamExists('updateWorkflow', 'updateWorkflowRequest', updateWorkflowRequest) + const localVarPath = `/workflows/{workflowId}` + .replace(`{${"workflowId"}}`, encodeURIComponent(String(workflowId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(updateWorkflowRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WorkflowsApi - functional programming interface + * @export + */ +export const WorkflowsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WorkflowsApiAxiosParamCreator(configuration) + return { + /** + * アカウント内にワークフローを新規作成します + * @summary + * @param {CreateWorkflowsRequest} createWorkflowsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createWorkflows(createWorkflowsRequest: CreateWorkflowsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createWorkflows(createWorkflowsRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WorkflowsApi.createWorkflows']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * アカウント内のワークフローを削除します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteWorkflow(workflowId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteWorkflow(workflowId, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WorkflowsApi.deleteWorkflow']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * アカウント内のワークフローの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getWorkflows(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflows(options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WorkflowsApi.getWorkflows']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + /** + * アカウント内のワークフローを編集します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {UpdateWorkflowRequest} updateWorkflowRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updateWorkflow(workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.updateWorkflow(workflowId, updateWorkflowRequest, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['WorkflowsApi.updateWorkflow']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, + } +}; + +/** + * WorkflowsApi - factory interface + * @export + */ +export const WorkflowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WorkflowsApiFp(configuration) + return { + /** + * アカウント内にワークフローを新規作成します + * @summary + * @param {CreateWorkflowsRequest} createWorkflowsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createWorkflows(createWorkflowsRequest: CreateWorkflowsRequest, options?: any): AxiosPromise { + return localVarFp.createWorkflows(createWorkflowsRequest, options).then((request) => request(axios, basePath)); + }, + /** + * アカウント内のワークフローを削除します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteWorkflow(workflowId: number, options?: any): AxiosPromise { + return localVarFp.deleteWorkflow(workflowId, options).then((request) => request(axios, basePath)); + }, + /** + * アカウント内のワークフローの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getWorkflows(options?: any): AxiosPromise { + return localVarFp.getWorkflows(options).then((request) => request(axios, basePath)); + }, + /** + * アカウント内のワークフローを編集します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {UpdateWorkflowRequest} updateWorkflowRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateWorkflow(workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options?: any): AxiosPromise { + return localVarFp.updateWorkflow(workflowId, updateWorkflowRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WorkflowsApi - object-oriented interface + * @export + * @class WorkflowsApi + * @extends {BaseAPI} + */ +export class WorkflowsApi extends BaseAPI { + /** + * アカウント内にワークフローを新規作成します + * @summary + * @param {CreateWorkflowsRequest} createWorkflowsRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkflowsApi + */ + public createWorkflows(createWorkflowsRequest: CreateWorkflowsRequest, options?: AxiosRequestConfig) { + return WorkflowsApiFp(this.configuration).createWorkflows(createWorkflowsRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * アカウント内のワークフローを削除します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkflowsApi + */ + public deleteWorkflow(workflowId: number, options?: AxiosRequestConfig) { + return WorkflowsApiFp(this.configuration).deleteWorkflow(workflowId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * アカウント内のワークフローの一覧を取得します + * @summary + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkflowsApi + */ + public getWorkflows(options?: AxiosRequestConfig) { + return WorkflowsApiFp(this.configuration).getWorkflows(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * アカウント内のワークフローを編集します + * @summary + * @param {number} workflowId ワークフローの内部ID + * @param {UpdateWorkflowRequest} updateWorkflowRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WorkflowsApi + */ + public updateWorkflow(workflowId: number, updateWorkflowRequest: UpdateWorkflowRequest, options?: AxiosRequestConfig) { + return WorkflowsApiFp(this.configuration).updateWorkflow(workflowId, updateWorkflowRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/dictation_function/src/api/base.ts b/dictation_function/src/api/base.ts new file mode 100644 index 0000000..4e44af5 --- /dev/null +++ b/dictation_function/src/api/base.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * ODMSOpenAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); + +/** + * + * @export + */ +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +/** + * + * @export + * @interface RequestArgs + */ +export interface RequestArgs { + url: string; + options: AxiosRequestConfig; +} + +/** + * + * @export + * @class BaseAPI + */ +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +/** + * + * @export + * @class RequiredError + * @extends {Error} + */ +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +/** + * + * @export + */ +export const operationServerMap: ServerMap = { +} diff --git a/dictation_function/src/api/common.ts b/dictation_function/src/api/common.ts new file mode 100644 index 0000000..0e1c39c --- /dev/null +++ b/dictation_function/src/api/common.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * ODMSOpenAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +/** + * + * @export + */ +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + * @export + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +/** + * + * @export + */ +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +/** + * + * @export + */ +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +/** + * + * @export + */ +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +/** + * + * @export + */ +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter)) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +/** + * + * @export + */ +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * + * @export + */ +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}) + : (value || ""); +} + +/** + * + * @export + */ +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +/** + * + * @export + */ +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return >(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url}; + return axios.request(axiosRequestArgs); + }; +} diff --git a/dictation_function/src/api/configuration.ts b/dictation_function/src/api/configuration.ts new file mode 100644 index 0000000..9941122 --- /dev/null +++ b/dictation_function/src/api/configuration.ts @@ -0,0 +1,110 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * ODMSOpenAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ConfigurationParameters { + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + username?: string; + password?: string; + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + * @memberof Configuration + */ + apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + username?: string; + /** + * parameter for basic security + * + * @type {string} + * @memberof Configuration + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + * @memberof Configuration + */ + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise); + /** + * override base path + * + * @type {string} + * @memberof Configuration + */ + basePath?: string; + /** + * override server index + * + * @type {number} + * @memberof Configuration + */ + serverIndex?: number; + /** + * base options for axios calls + * + * @type {any} + * @memberof Configuration + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = param.baseOptions; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } +} diff --git a/dictation_function/src/api/git_push.sh b/dictation_function/src/api/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/dictation_function/src/api/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/dictation_function/src/api/index.ts b/dictation_function/src/api/index.ts new file mode 100644 index 0000000..c982723 --- /dev/null +++ b/dictation_function/src/api/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * ODMSOpenAPI + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/dictation_function/src/api/odms/openapi.json b/dictation_function/src/api/odms/openapi.json new file mode 100644 index 0000000..c279e1f --- /dev/null +++ b/dictation_function/src/api/odms/openapi.json @@ -0,0 +1,5357 @@ +{ + "openapi": "3.0.0", + "paths": { + "/health": { + "get": { + "operationId": "checkHealth", + "summary": "", + "parameters": [], + "responses": { "200": { "description": "" } } + } + }, + "/auth/token": { + "post": { + "operationId": "token", + "summary": "", + "description": "AzureADB2Cでのサインイン後に払いだされるIDトークンを元に認証用のアクセストークンとリフレッシュトークンを生成します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/TokenRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/TokenResponse" } + } + } + }, + "401": { + "description": "認証エラー/同意済み利用規約が最新でない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["auth"] + } + }, + "/auth/accessToken": { + "post": { + "operationId": "accessToken", + "summary": "", + "description": "リフレッシュトークンを元にアクセストークンを再生成します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AccessTokenResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["auth"], + "security": [{ "bearer": [] }] + } + }, + "/auth/delegation/token": { + "post": { + "operationId": "delegationToken", + "summary": "", + "description": "代行操作用のリフレッシュトークン・アクセストークンを生成します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DelegationTokenRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DelegationTokenResponse" + } + } + } + }, + "400": { + "description": "指定したアカウントが代行操作を許可していない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["auth"], + "security": [{ "bearer": [] }] + } + }, + "/auth/delegation/access-token": { + "post": { + "operationId": "delegationAccessToken", + "summary": "", + "description": "代行操作用のアクセストークンを再生成します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DelegationAccessTokenResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["auth"], + "security": [{ "bearer": [] }] + } + }, + "/accounts": { + "post": { + "operationId": "createAccount", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CreateAccountRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAccountResponse" + } + } + } + }, + "400": { + "description": "登録済みユーザーからの登録など", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"] + } + }, + "/accounts/licenses/summary": { + "post": { + "operationId": "getLicenseSummary", + "summary": "", + "description": "指定したアカウントのライセンス集計情報を取得します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLicenseSummaryRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLicenseSummaryResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/me": { + "get": { + "operationId": "getMyAccount", + "summary": "", + "description": "ログインしているユーザーのアカウント情報を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMyAccountResponse" + } + } + } + }, + "400": { + "description": "該当アカウントがDBに存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "updateAccountInfo", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAccountInfoRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAccountInfoResponse" + } + } + } + }, + "400": { + "description": "パラメータ不正/アカウント・ユーザー不在/管理者ユーザ不在", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/authors": { + "get": { + "operationId": "getAuthors", + "summary": "", + "description": "ログインしているユーザーのアカウント配下のAuthor一覧を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetAuthorsResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/typists": { + "get": { + "operationId": "getTypists", + "summary": "", + "description": "ログインしているユーザーのアカウント配下のタイピスト一覧を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetTypistsResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/typist-groups": { + "get": { + "operationId": "getTypistGroups", + "summary": "", + "description": "ログインしているユーザーのアカウント配下のタイピストグループ一覧を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTypistGroupsResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "createTypistGroup", + "summary": "", + "description": "ログインしているユーザーのアカウント配下にタイピストグループを追加します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTypistGroupRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTypistGroupResponse" + } + } + } + }, + "400": { + "description": "グループ名が空の場合/ユーザーが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/typist-groups/{typistGroupId}": { + "get": { + "operationId": "getTypistGroup", + "summary": "", + "description": "ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを取得します", + "parameters": [ + { + "name": "typistGroupId", + "required": true, + "in": "path", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTypistGroupResponse" + } + } + } + }, + "400": { + "description": "グループが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "updateTypistGroup", + "summary": "", + "description": "ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを更新します", + "parameters": [ + { + "name": "typistGroupId", + "required": true, + "in": "path", + "schema": { "type": "number" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTypistGroupRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTypistGroupResponse" + } + } + } + }, + "400": { + "description": "グループ名が空の場合/ユーザーが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/typist-groups/{typistGroupId}/delete": { + "post": { + "operationId": "deleteTypistGroup", + "summary": "", + "description": "ログインしているユーザーのアカウント配下でIDで指定されたタイピストグループを削除します", + "parameters": [ + { + "name": "typistGroupId", + "required": true, + "in": "path", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTypistGroupResponse" + } + } + } + }, + "400": { + "description": "ルーティングルールに設定されている / タスクの割り当て候補に設定されている / 削除済み", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/partner": { + "post": { + "operationId": "createPartnerAccount", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePartnerAccountRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePartnerAccountResponse" + } + } + } + }, + "400": { + "description": "登録済みユーザーからの登録など", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/partner-licenses": { + "post": { + "operationId": "getPartnerLicenses", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPartnerLicensesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetPartnerLicensesResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/order-histories": { + "post": { + "operationId": "getOrderHistories", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrderHistoriesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrderHistoriesResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/licenses/issue": { + "post": { + "operationId": "issueLicense", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/IssueLicenseRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueLicenseResponse" + } + } + } + }, + "400": { + "description": "自身のライセンス数が不足している場合/すでに対象注文が発行済の場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/dealers": { + "get": { + "operationId": "getDealers", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetDealersResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"] + } + }, + "/accounts/issue/cancel": { + "post": { + "operationId": "cancelIssue", + "summary": "", + "description": "ライセンス発行をキャンセルします", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CancelIssueRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CancelIssueResponse" } + } + } + }, + "400": { + "description": "対象注文のステータスが発行済以外/発行日から15日以降/ライセンスをユーザに割り当てている", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/worktypes": { + "get": { + "operationId": "getWorktypes", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetWorktypesResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "createWorktype", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorktypesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorktypeResponse" + } + } + } + }, + "400": { + "description": "WorktypeIDが重複 / WorktypeIDが空 / WorktypeIDが20件登録済み", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/worktypes/{id}": { + "post": { + "operationId": "updateWorktype", + "summary": "", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Worktypeの内部ID", + "schema": { "type": "number" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorktypesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorktypeResponse" + } + } + } + }, + "400": { + "description": "WorktypeIDが重複 / WorktypeIDが空", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/worktypes/{id}/delete": { + "post": { + "operationId": "deleteWorktype", + "summary": "", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Worktypeの内部ID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWorktypeResponse" + } + } + } + }, + "400": { + "description": "指定WorktypeIDが削除済み / 指定WorktypeIDがWorkflowで使用中", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/worktypes/{id}/option-items": { + "get": { + "operationId": "getOptionItems", + "summary": "", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Worktypeの内部ID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOptionItemsResponse" + } + } + } + }, + "400": { + "description": "WorktypeIDが不在", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "updateOptionItems", + "summary": "", + "parameters": [ + { + "name": "id", + "required": true, + "in": "path", + "description": "Worktypeの内部ID", + "schema": { "type": "number" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOptionItemsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOptionItemsResponse" + } + } + } + }, + "400": { + "description": "WorktypeIDが不在", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/active-worktype": { + "post": { + "operationId": "activeWorktype", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostActiveWorktypeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostActiveWorktypeResponse" + } + } + } + }, + "400": { + "description": "WorktypeIDが存在しない", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/partners": { + "get": { + "operationId": "getPartners", + "summary": "", + "parameters": [ + { + "name": "limit", + "required": true, + "in": "query", + "description": "取得件数", + "schema": { "type": "number" } + }, + { + "name": "offset", + "required": true, + "in": "query", + "description": "開始位置", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetPartnersResponse" } + } + } + }, + "400": { + "description": "パラメータ不正", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/me/file-delete-setting": { + "post": { + "operationId": "updateFileDeleteSetting", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFileDeleteSettingRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateFileDeleteSettingResponse" + } + } + } + }, + "400": { + "description": "パラメータ不正/アカウント・ユーザー不在", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/delete": { + "post": { + "operationId": "deleteAccountAndData", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/DeleteAccountRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAccountInfoResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "DBアクセスに失敗しログインできる状態で処理が終了した場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/minimal-access": { + "post": { + "operationId": "getAccountInfoMinimalAccess", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAccountInfoMinimalAccessRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAccountInfoMinimalAccessResponse" + } + } + } + }, + "400": { + "description": "対象のユーザーIDが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"] + } + }, + "/accounts/company-name": { + "post": { + "operationId": "getCompanyName", + "summary": "", + "description": "指定したアカウントの会社名を取得します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetCompanyNameRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCompanyNameResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/accounts/restriction-status": { + "post": { + "operationId": "updateRestrictionStatus", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRestrictionStatusRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRestrictionStatusResponse" + } + } + } + }, + "400": { + "description": "パラメータ不正", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["accounts"], + "security": [{ "bearer": [] }] + } + }, + "/users/confirm": { + "post": { + "operationId": "confirmUser", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ConfirmRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ConfirmResponse" } + } + } + }, + "400": { + "description": "不正なトークン", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"] + } + }, + "/users/confirm/initpassword": { + "post": { + "operationId": "confirmUserAndInitPassword", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ConfirmRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ConfirmResponse" } + } + } + }, + "400": { + "description": "不正なトークン", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"] + } + }, + "/users": { + "get": { + "operationId": "getUsers", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetUsersResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/signup": { + "post": { + "operationId": "signup", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SignupRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/SignupResponse" } + } + } + }, + "400": { + "description": "登録済みメールによる再登録、AuthorIDの重複など", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/relations": { + "get": { + "operationId": "getRelations", + "summary": "", + "description": "ログインしているユーザーに関連する各種情報を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRelationsResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/sort-criteria": { + "post": { + "operationId": "updateSortCriteria", + "summary": "", + "description": "ログインしているユーザーのタスクソート条件を更新します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSortCriteriaRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSortCriteriaResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + }, + "get": { + "operationId": "getSortCriteria", + "summary": "", + "description": "ログインしているユーザーのタスクソート条件を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSortCriteriaResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/update": { + "post": { + "operationId": "updateUser", + "summary": "", + "description": "ユーザーの情報を更新します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PostUpdateUserRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostUpdateUserResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/license/allocate": { + "post": { + "operationId": "allocateLicense", + "summary": "", + "description": "ライセンスを割り当てます", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllocateLicenseRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllocateLicenseResponse" + } + } + } + }, + "400": { + "description": "割り当て失敗時", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/license/deallocate": { + "post": { + "operationId": "deallocateLicense", + "summary": "", + "description": "ライセンス割り当てを解除します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeallocateLicenseRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeallocateLicenseResponse" + } + } + } + }, + "400": { + "description": "すでにライセンスが割り当て解除されている時", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/accepted-version": { + "post": { + "operationId": "updateAcceptedVersion", + "summary": "", + "description": "利用規約同意バージョンを更新", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAcceptedVersionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateAcceptedVersionResponse" + } + } + } + }, + "400": { + "description": "パラメータ不正/対象のユーザidが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"] + } + }, + "/users/me": { + "get": { + "operationId": "getMyUser", + "summary": "", + "description": "ログインしているユーザーの情報を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GetMyUserResponse" } + } + } + }, + "400": { + "description": "該当ユーザーがDBに存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/delete": { + "post": { + "operationId": "deleteUser", + "summary": "", + "description": "ユーザーを削除します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/PostDeleteUserRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostDeleteUserResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/multiple-imports": { + "post": { + "operationId": "multipleImports", + "summary": "", + "description": "ユーザーを一括登録します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/multiple-imports/complete": { + "post": { + "operationId": "multipleImportsComplate", + "summary": "", + "description": "ユーザー一括登録の完了を通知します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsCompleteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsCompleteResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/files/audio/upload-finished": { + "post": { + "operationId": "uploadFinished", + "summary": "", + "description": "アップロードが完了した音声ファイルの情報を登録し、文字起こしタスクを生成します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioUploadFinishedRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioUploadFinishedResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["files"], + "security": [{ "bearer": [] }] + } + }, + "/files/audio/upload-location": { + "get": { + "operationId": "uploadLocation", + "summary": "", + "description": "ログイン中ユーザー用のBlob Storage上の音声ファイルのアップロード先アクセスURLを取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioUploadLocationResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["files"], + "security": [{ "bearer": [] }] + } + }, + "/files/audio/download-location": { + "get": { + "operationId": "downloadLocation", + "summary": "", + "description": "指定した音声ファイルのBlob Storage上のダウンロード先アクセスURLを取得します", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "query", + "description": "ODMSCloud上で管理する音声ファイルのID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AudioDownloadLocationResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["files"], + "security": [{ "bearer": [] }] + } + }, + "/files/template/download-location": { + "get": { + "operationId": "downloadTemplateLocation", + "summary": "", + "description": "指定した音声ファイルに対応したテンプレートファイルのBlob Storage上のダウンロード先アクセスURLを取得します", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "query", + "description": "文字起こし対象の音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateDownloadLocationResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["files"], + "security": [{ "bearer": [] }] + } + }, + "/files/template/upload-location": { + "get": { + "operationId": "uploadTemplateLocation", + "summary": "", + "description": "ログイン中ユーザー用のBlob Storage上のテンプレートファイルのアップロード先アクセスURLを取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateUploadLocationResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["files"], + "security": [{ "bearer": [] }] + } + }, + "/files/template/upload-finished": { + "post": { + "operationId": "uploadTemplateFinished", + "summary": "", + "description": "アップロードが完了したテンプレートファイルの情報を登録します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateUploadFinishedRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TemplateUploadFinishedReqponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["files"], + "security": [{ "bearer": [] }] + } + }, + "/tasks": { + "get": { + "operationId": "getTasks", + "summary": "", + "description": "音声ファイル・文字起こしタスク情報をページ指定して取得します", + "parameters": [ + { + "name": "limit", + "required": false, + "in": "query", + "description": "タスクの取得件数(指定しない場合はデフォルト値)", + "schema": { "default": 200, "type": "number" } + }, + { + "name": "offset", + "required": false, + "in": "query", + "description": "オフセット(何件目から取得するか 設定しない場合はデフォルト値)", + "schema": { "default": 0, "type": "number" } + }, + { + "name": "status", + "required": false, + "in": "query", + "description": "取得対象とするタスクのステータス。カンマ(,)区切りで複数指定可能。設定されない場合はすべてのステータスを取得対象とする。許容するステータスの値は次の通り: Uploaded / Pending / InProgress / Finished / Backup", + "example": "Uploaded,Pending,InProgress", + "schema": { "type": "string" } + }, + { + "name": "direction", + "required": false, + "in": "query", + "description": "ASC/DESC", + "schema": { "type": "string" } + }, + { + "name": "paramName", + "required": false, + "in": "query", + "description": "JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/TasksResponse" } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/next": { + "get": { + "operationId": "getNextAudioFile", + "summary": "", + "description": "指定した文字起こしタスクの次のタスクに紐づく音声ファイルIDを取得します", + "parameters": [ + { + "name": "endedFileId", + "required": true, + "in": "query", + "description": "文字起こし完了したタスクの音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AudioNextResponse" } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/{audioFileId}/checkout": { + "post": { + "operationId": "checkout", + "summary": "", + "description": "指定した文字起こしタスクをチェックアウトします(ステータスをInprogressにします)", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "path", + "description": "ODMS Cloud上の音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeStatusResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "404": { + "description": "指定したIDの音声ファイルが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/{audioFileId}/checkin": { + "post": { + "operationId": "checkin", + "summary": "", + "description": "指定した文字起こしタスクをチェックインします(ステータスをFinishedにします)", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "path", + "description": "ODMS Cloud上の音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeStatusResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "404": { + "description": "指定したIDの音声ファイルが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/{audioFileId}/cancel": { + "post": { + "operationId": "cancel", + "summary": "", + "description": "指定した文字起こしタスクをキャンセルします(ステータスをUploadedにします)", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "path", + "description": "ODMS Cloud上の音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeStatusResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "404": { + "description": "指定したIDの音声ファイルが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/{audioFileId}/suspend": { + "post": { + "operationId": "suspend", + "summary": "", + "description": "指定した文字起こしタスクを一時中断します(ステータスをPendingにします)", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "path", + "description": "ODMS Cloud上の音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeStatusResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "404": { + "description": "指定したIDの音声ファイルが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/{audioFileId}/backup": { + "post": { + "operationId": "backup", + "summary": "", + "description": "指定した文字起こしタスクをバックアップします(ステータスをBackupにします)", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "path", + "description": "ODMS Cloud上の音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangeStatusResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "404": { + "description": "指定したIDの音声ファイルが存在しない場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/{audioFileId}/checkout-permission": { + "post": { + "operationId": "changeCheckoutPermission", + "summary": "", + "description": "指定した文字起こしタスクのチェックアウト候補を変更します。", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "path", + "description": "ODMS Cloud上の音声ファイルID", + "schema": { "type": "number" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostCheckoutPermissionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostCheckoutPermissionResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ(タスクのステータス不正、指定ユーザー不正など)", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "404": { + "description": "指定したIDの音声ファイルが存在しない", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/tasks/{audioFileId}/delete": { + "post": { + "operationId": "deleteTask", + "summary": "", + "description": "指定した文字起こしタスクを削除します。", + "parameters": [ + { + "name": "audioFileId", + "required": true, + "in": "path", + "description": "ODMS Cloud上の音声ファイルID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostDeleteTaskResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["tasks"], + "security": [{ "bearer": [] }] + } + }, + "/licenses/orders": { + "post": { + "operationId": "createOrders", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CreateOrdersRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrdersResponse" + } + } + } + }, + "400": { + "description": "同一PONumberの注文がすでに存在する場合など", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["licenses"], + "security": [{ "bearer": [] }] + } + }, + "/licenses/cards": { + "post": { + "operationId": "issueCardLicenses", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueCardLicensesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueCardLicensesResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["licenses"], + "security": [{ "bearer": [] }] + } + }, + "/licenses/cards/activate": { + "post": { + "operationId": "activateCardLicenses", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateCardLicensesRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateCardLicensesResponse" + } + } + } + }, + "400": { + "description": "パラメータのライセンスキーが不正な内容の場合/存在しない場合/登録済みの場合", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["licenses"], + "security": [{ "bearer": [] }] + } + }, + "/licenses/allocatable": { + "get": { + "operationId": "getAllocatableLicenses", + "summary": "", + "description": "割り当て可能なライセンスを取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllocatableLicensesResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["licenses"], + "security": [{ "bearer": [] }] + } + }, + "/licenses/orders/cancel": { + "post": { + "operationId": "cancelOrder", + "summary": "", + "description": "ライセンス注文をキャンセルします", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CancelOrderRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/CancelOrderResponse" } + } + } + }, + "400": { + "description": "対象注文のステータスが発行待ち状態でないとき", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["licenses"], + "security": [{ "bearer": [] }] + } + }, + "/templates": { + "get": { + "operationId": "getTemplates", + "summary": "", + "description": "アカウント内のテンプレートファイルの一覧を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTemplatesResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["templates"], + "security": [{ "bearer": [] }] + } + }, + "/templates/{templateFileId}/delete": { + "post": { + "operationId": "deleteTemplateFile", + "summary": "", + "description": "ログインしているユーザーのアカウント配下でIDで指定されたテンプレートファイルを削除します", + "parameters": [ + { + "name": "templateFileId", + "required": true, + "in": "path", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTemplateResponse" + } + } + } + }, + "400": { + "description": "ルーティングルールに設定されている / 未完了タスクに紐づいている / 削除済み", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["templates"], + "security": [{ "bearer": [] }] + } + }, + "/workflows": { + "get": { + "operationId": "getWorkflows", + "summary": "", + "description": "アカウント内のワークフローの一覧を取得します", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetWorkflowsResponse" + } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["workflows"], + "security": [{ "bearer": [] }] + }, + "post": { + "operationId": "createWorkflows", + "summary": "", + "description": "アカウント内にワークフローを新規作成します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkflowsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWorkflowsResponse" + } + } + } + }, + "400": { + "description": "パラメータ不正エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["workflows"], + "security": [{ "bearer": [] }] + } + }, + "/workflows/{workflowId}": { + "post": { + "operationId": "updateWorkflow", + "summary": "", + "description": "アカウント内のワークフローを編集します", + "parameters": [ + { + "name": "workflowId", + "required": true, + "in": "path", + "description": "ワークフローの内部ID", + "schema": { "type": "number" } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UpdateWorkflowRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWorkflowResponse" + } + } + } + }, + "400": { + "description": "パラメータ不正エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["workflows"], + "security": [{ "bearer": [] }] + } + }, + "/workflows/{workflowId}/delete": { + "post": { + "operationId": "deleteWorkflow", + "summary": "", + "description": "アカウント内のワークフローを削除します", + "parameters": [ + { + "name": "workflowId", + "required": true, + "in": "path", + "description": "ワークフローの内部ID", + "schema": { "type": "number" } + } + ], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteWorkflowResponse" + } + } + } + }, + "400": { + "description": "パラメータ不正エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["workflows"], + "security": [{ "bearer": [] }] + } + }, + "/notification/register": { + "post": { + "operationId": "register", + "summary": "", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RegisterRequest" } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RegisterResponse" } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["notification"], + "security": [{ "bearer": [] }] + } + }, + "/terms": { + "get": { + "operationId": "getTermsInfo", + "summary": "", + "parameters": [], + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTermsInfoResponse" + } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["terms"] + } + } + }, + "info": { + "title": "ODMSOpenAPI", + "description": "", + "version": "1.0.0", + "contact": {} + }, + "tags": [], + "servers": [], + "components": { + "securitySchemes": { + "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" } + }, + "schemas": { + "TokenRequest": { + "type": "object", + "properties": { + "idToken": { "type": "string" }, + "type": { + "type": "string", + "description": "web or mobile or desktop" + } + }, + "required": ["idToken", "type"] + }, + "TokenResponse": { + "type": "object", + "properties": { + "refreshToken": { "type": "string" }, + "accessToken": { "type": "string" } + }, + "required": ["refreshToken", "accessToken"] + }, + "ErrorResponse": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "code": { "type": "string" } + }, + "required": ["message", "code"] + }, + "AccessTokenResponse": { + "type": "object", + "properties": { "accessToken": { "type": "string" } }, + "required": ["accessToken"] + }, + "DelegationTokenRequest": { + "type": "object", + "properties": { + "delegatedAccountId": { + "type": "number", + "description": "代行操作対象のアカウントID" + } + }, + "required": ["delegatedAccountId"] + }, + "DelegationTokenResponse": { + "type": "object", + "properties": { + "refreshToken": { + "type": "string", + "description": "代行操作用のリフレッシュトークン" + }, + "accessToken": { + "type": "string", + "description": "代行操作用のアクセストークン" + } + }, + "required": ["refreshToken", "accessToken"] + }, + "DelegationAccessTokenResponse": { + "type": "object", + "properties": { + "accessToken": { + "type": "string", + "description": "代行操作用のアクセストークン" + } + }, + "required": ["accessToken"] + }, + "CreateAccountRequest": { + "type": "object", + "properties": { + "companyName": { "type": "string" }, + "country": { + "type": "string", + "description": "国名(ISO 3166-1 alpha-2)", + "minLength": 2, + "maxLength": 2 + }, + "dealerAccountId": { "type": "number" }, + "adminName": { "type": "string" }, + "adminMail": { "type": "string" }, + "adminPassword": { "type": "string" }, + "acceptedEulaVersion": { + "type": "string", + "description": "同意済み利用規約のバージョン(EULA)" + }, + "acceptedPrivacyNoticeVersion": { + "type": "string", + "description": "同意済みプライバシーポリシーのバージョン" + }, + "acceptedDpaVersion": { + "type": "string", + "description": "同意済み利用規約のバージョン(DPA)" + }, + "token": { "type": "string", "description": "reCAPTCHA Token" } + }, + "required": [ + "companyName", + "country", + "adminName", + "adminMail", + "adminPassword", + "acceptedEulaVersion", + "acceptedPrivacyNoticeVersion", + "acceptedDpaVersion", + "token" + ] + }, + "CreateAccountResponse": { "type": "object", "properties": {} }, + "GetLicenseSummaryRequest": { + "type": "object", + "properties": { "accountId": { "type": "number" } }, + "required": ["accountId"] + }, + "GetLicenseSummaryResponse": { + "type": "object", + "properties": { + "totalLicense": { "type": "number" }, + "allocatedLicense": { "type": "number" }, + "reusableLicense": { "type": "number" }, + "freeLicense": { "type": "number" }, + "expiringWithin14daysLicense": { "type": "number" }, + "issueRequesting": { "type": "number" }, + "numberOfRequesting": { "type": "number" }, + "shortage": { "type": "number" }, + "storageSize": { "type": "number" }, + "usedSize": { "type": "number" }, + "isStorageAvailable": { "type": "boolean" } + }, + "required": [ + "totalLicense", + "allocatedLicense", + "reusableLicense", + "freeLicense", + "expiringWithin14daysLicense", + "issueRequesting", + "numberOfRequesting", + "shortage", + "storageSize", + "usedSize", + "isStorageAvailable" + ] + }, + "Account": { + "type": "object", + "properties": { + "accountId": { "type": "number" }, + "companyName": { "type": "string" }, + "tier": { "type": "number" }, + "country": { "type": "string" }, + "parentAccountId": { "type": "number" }, + "delegationPermission": { "type": "boolean" }, + "autoFileDelete": { "type": "boolean" }, + "fileRetentionDays": { "type": "number" }, + "primaryAdminUserId": { "type": "number" }, + "secondryAdminUserId": { "type": "number" }, + "parentAccountName": { "type": "string" } + }, + "required": [ + "accountId", + "companyName", + "tier", + "country", + "delegationPermission", + "autoFileDelete", + "fileRetentionDays" + ] + }, + "GetMyAccountResponse": { + "type": "object", + "properties": { "account": { "$ref": "#/components/schemas/Account" } }, + "required": ["account"] + }, + "Author": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "Authorユーザーの内部ID" }, + "authorId": { "type": "string", "description": "AuthorID" } + }, + "required": ["id", "authorId"] + }, + "GetAuthorsResponse": { + "type": "object", + "properties": { + "authors": { + "type": "array", + "items": { "$ref": "#/components/schemas/Author" } + } + }, + "required": ["authors"] + }, + "Typist": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "TypistのユーザーID" }, + "name": { "type": "string", "description": "Typistのユーザー名" } + }, + "required": ["id", "name"] + }, + "GetTypistsResponse": { + "type": "object", + "properties": { + "typists": { + "type": "array", + "items": { "$ref": "#/components/schemas/Typist" } + } + }, + "required": ["typists"] + }, + "TypistGroup": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "TypistGroupのID" }, + "name": { "type": "string", "description": "TypistGroup名" } + }, + "required": ["id", "name"] + }, + "GetTypistGroupsResponse": { + "type": "object", + "properties": { + "typistGroups": { + "type": "array", + "items": { "$ref": "#/components/schemas/TypistGroup" } + } + }, + "required": ["typistGroups"] + }, + "GetTypistGroupResponse": { + "type": "object", + "properties": { + "typistGroupName": { "type": "string" }, + "typistIds": { "type": "array", "items": { "type": "integer" } } + }, + "required": ["typistGroupName", "typistIds"] + }, + "CreateTypistGroupRequest": { + "type": "object", + "properties": { + "typistGroupName": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "typistIds": { + "minItems": 1, + "type": "array", + "items": { "type": "integer" } + } + }, + "required": ["typistGroupName", "typistIds"] + }, + "CreateTypistGroupResponse": { "type": "object", "properties": {} }, + "UpdateTypistGroupRequest": { + "type": "object", + "properties": { + "typistGroupName": { + "type": "string", + "minLength": 1, + "maxLength": 50 + }, + "typistIds": { + "minItems": 1, + "type": "array", + "items": { "type": "integer" } + } + }, + "required": ["typistGroupName", "typistIds"] + }, + "DeleteTypistGroupResponse": { "type": "object", "properties": {} }, + "CreatePartnerAccountRequest": { + "type": "object", + "properties": { + "companyName": { "type": "string" }, + "country": { + "type": "string", + "description": "国名(ISO 3166-1 alpha-2)", + "minLength": 2, + "maxLength": 2 + }, + "adminName": { "type": "string" }, + "email": { "type": "string" } + }, + "required": ["companyName", "country", "adminName", "email"] + }, + "CreatePartnerAccountResponse": { "type": "object", "properties": {} }, + "GetPartnerLicensesRequest": { + "type": "object", + "properties": { + "limit": { "type": "number" }, + "offset": { "type": "number" }, + "accountId": { "type": "number" } + }, + "required": ["limit", "offset", "accountId"] + }, + "PartnerLicenseInfo": { + "type": "object", + "properties": { + "accountId": { "type": "number", "description": "アカウントID" }, + "tier": { "type": "number", "description": "階層" }, + "companyName": { "type": "string", "description": "アカウント名" }, + "stockLicense": { + "type": "number", + "description": "保有している有効期限が未設定あるいは有効期限内のライセンス数" + }, + "issuedRequested": { + "type": "number", + "description": "子アカウントからの、未発行状態あるいは発行キャンセルされた注文の総ライセンス数" + }, + "shortage": { + "type": "number", + "description": "不足数({Stock license} - {Issue Requested})" + }, + "issueRequesting": { + "type": "number", + "description": "未発行状態あるいは発行キャンセルされた注文の総ライセンス数(=IssueRequestingのStatusの注文の総ライセンス数)" + } + }, + "required": [ + "accountId", + "tier", + "companyName", + "stockLicense", + "issuedRequested", + "shortage", + "issueRequesting" + ] + }, + "GetPartnerLicensesResponse": { + "type": "object", + "properties": { + "total": { "type": "number" }, + "ownPartnerLicense": { + "$ref": "#/components/schemas/PartnerLicenseInfo" + }, + "childrenPartnerLicenses": { + "type": "array", + "items": { "$ref": "#/components/schemas/PartnerLicenseInfo" } + } + }, + "required": ["total", "ownPartnerLicense", "childrenPartnerLicenses"] + }, + "GetOrderHistoriesRequest": { + "type": "object", + "properties": { + "limit": { "type": "number", "description": "取得件数" }, + "offset": { "type": "number", "description": "開始位置" }, + "accountId": { "type": "number", "description": "アカウントID" } + }, + "required": ["limit", "offset", "accountId"] + }, + "LicenseOrder": { + "type": "object", + "properties": { + "orderDate": { "type": "string", "description": "注文日付" }, + "issueDate": { "type": "string", "description": "発行日付" }, + "numberOfOrder": { "type": "number", "description": "注文数" }, + "poNumber": { "type": "string", "description": "POナンバー" }, + "status": { "type": "string", "description": "注文状態" } + }, + "required": ["orderDate", "numberOfOrder", "poNumber", "status"] + }, + "GetOrderHistoriesResponse": { + "type": "object", + "properties": { + "total": { "type": "number", "description": "合計件数" }, + "orderHistories": { + "type": "array", + "items": { "$ref": "#/components/schemas/LicenseOrder" } + } + }, + "required": ["total", "orderHistories"] + }, + "IssueLicenseRequest": { + "type": "object", + "properties": { + "orderedAccountId": { + "type": "number", + "description": "注文元アカウントID" + }, + "poNumber": { "type": "string", "description": "POナンバー" } + }, + "required": ["orderedAccountId", "poNumber"] + }, + "IssueLicenseResponse": { "type": "object", "properties": {} }, + "Dealer": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "アカウントID" }, + "name": { "type": "string", "description": "会社名" }, + "country": { + "type": "string", + "description": "国名(ISO 3166-1 alpha-2)" + } + }, + "required": ["id", "name", "country"] + }, + "GetDealersResponse": { + "type": "object", + "properties": { + "dealers": { + "type": "array", + "items": { "$ref": "#/components/schemas/Dealer" } + } + }, + "required": ["dealers"] + }, + "CancelIssueRequest": { + "type": "object", + "properties": { + "orderedAccountId": { + "type": "number", + "description": "注文元アカウントID" + }, + "poNumber": { "type": "string", "description": "POナンバー" } + }, + "required": ["orderedAccountId", "poNumber"] + }, + "CancelIssueResponse": { "type": "object", "properties": {} }, + "Worktype": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "WorktypeのID" }, + "worktypeId": { "type": "string", "description": "WorktypeID" }, + "description": { "type": "string", "description": "Worktypeの説明" } + }, + "required": ["id", "worktypeId"] + }, + "GetWorktypesResponse": { + "type": "object", + "properties": { + "worktypes": { + "type": "array", + "items": { "$ref": "#/components/schemas/Worktype" } + }, + "active": { + "type": "number", + "description": "Active WorktypeIDに設定されているWorkTypeの内部ID" + } + }, + "required": ["worktypes"] + }, + "CreateWorktypesRequest": { + "type": "object", + "properties": { + "worktypeId": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "WorktypeID" + }, + "description": { "type": "string", "description": "Worktypeの説明" } + }, + "required": ["worktypeId"] + }, + "CreateWorktypeResponse": { "type": "object", "properties": {} }, + "UpdateWorktypesRequest": { + "type": "object", + "properties": { + "worktypeId": { + "type": "string", + "minLength": 1, + "description": "WorktypeID" + }, + "description": { "type": "string", "description": "Worktypeの説明" } + }, + "required": ["worktypeId"] + }, + "UpdateWorktypeResponse": { "type": "object", "properties": {} }, + "DeleteWorktypeResponse": { "type": "object", "properties": {} }, + "GetWorktypeOptionItem": { + "type": "object", + "properties": { + "itemLabel": { "type": "string", "maxLength": 16 }, + "defaultValueType": { + "type": "string", + "maxLength": 20, + "description": "Default / Blank / LastInput" + }, + "initialValue": { "type": "string", "maxLength": 20 }, + "id": { "type": "number" } + }, + "required": ["itemLabel", "defaultValueType", "initialValue", "id"] + }, + "GetOptionItemsResponse": { + "type": "object", + "properties": { + "optionItems": { + "maxItems": 10, + "minItems": 10, + "type": "array", + "items": { "$ref": "#/components/schemas/GetWorktypeOptionItem" } + } + }, + "required": ["optionItems"] + }, + "PostWorktypeOptionItem": { + "type": "object", + "properties": { + "itemLabel": { "type": "string", "maxLength": 16 }, + "defaultValueType": { + "type": "string", + "maxLength": 20, + "description": "Default / Blank / LastInput" + }, + "initialValue": { "type": "string", "maxLength": 20 } + }, + "required": ["itemLabel", "defaultValueType", "initialValue"] + }, + "UpdateOptionItemsRequest": { + "type": "object", + "properties": { + "optionItems": { + "maxItems": 10, + "minItems": 10, + "type": "array", + "items": { "$ref": "#/components/schemas/PostWorktypeOptionItem" } + } + }, + "required": ["optionItems"] + }, + "UpdateOptionItemsResponse": { "type": "object", "properties": {} }, + "PostActiveWorktypeRequest": { + "type": "object", + "properties": { + "id": { + "type": "number", + "description": "Active WorkTypeIDにするWorktypeの内部ID" + } + } + }, + "PostActiveWorktypeResponse": { "type": "object", "properties": {} }, + "Partner": { + "type": "object", + "properties": { + "name": { "type": "string", "description": "会社名" }, + "tier": { "type": "number", "description": "階層" }, + "accountId": { "type": "number", "description": "アカウントID" }, + "country": { "type": "string", "description": "国" }, + "primaryAdmin": { + "type": "string", + "description": "プライマリ管理者" + }, + "email": { + "type": "string", + "description": "プライマリ管理者メールアドレス" + }, + "dealerManagement": { + "type": "boolean", + "description": "代行操作許可" + } + }, + "required": [ + "name", + "tier", + "accountId", + "country", + "primaryAdmin", + "email", + "dealerManagement" + ] + }, + "GetPartnersResponse": { + "type": "object", + "properties": { + "total": { "type": "number", "description": "合計件数" }, + "partners": { + "type": "array", + "items": { "$ref": "#/components/schemas/Partner" } + } + }, + "required": ["total", "partners"] + }, + "UpdateAccountInfoRequest": { + "type": "object", + "properties": { + "parentAccountId": { + "type": "number", + "description": "親アカウントのID" + }, + "delegationPermission": { + "type": "boolean", + "description": "代行操作許可" + }, + "primaryAdminUserId": { + "type": "number", + "description": "プライマリ管理者ID" + }, + "secondryAdminUserId": { + "type": "number", + "description": "セカンダリ管理者ID" + } + }, + "required": ["delegationPermission", "primaryAdminUserId"] + }, + "UpdateAccountInfoResponse": { "type": "object", "properties": {} }, + "UpdateFileDeleteSettingRequest": { + "type": "object", + "properties": { + "autoFileDelete": { + "type": "boolean", + "description": "自動ファイル削除をするかどうか" + }, + "retentionDays": { + "type": "number", + "description": "文字起こし完了してから自動ファイル削除されるまでのファイルの保存期間" + } + }, + "required": ["autoFileDelete", "retentionDays"] + }, + "UpdateFileDeleteSettingResponse": { "type": "object", "properties": {} }, + "DeleteAccountRequest": { + "type": "object", + "properties": { + "accountId": { "type": "number", "description": "アカウントID" } + }, + "required": ["accountId"] + }, + "GetAccountInfoMinimalAccessRequest": { + "type": "object", + "properties": { + "idToken": { "type": "string", "description": "idトークン" } + }, + "required": ["idToken"] + }, + "GetAccountInfoMinimalAccessResponse": { + "type": "object", + "properties": { "tier": { "type": "number", "description": "階層" } }, + "required": ["tier"] + }, + "GetCompanyNameRequest": { + "type": "object", + "properties": { "accountId": { "type": "number" } }, + "required": ["accountId"] + }, + "GetCompanyNameResponse": { + "type": "object", + "properties": { "companyName": { "type": "string" } }, + "required": ["companyName"] + }, + "UpdateRestrictionStatusRequest": { + "type": "object", + "properties": { + "accountId": { + "type": "number", + "description": "操作対象の第五階層アカウントID" + }, + "restricted": { + "type": "boolean", + "description": "制限をかけるかどうか(trur:制限をかける)" + } + }, + "required": ["accountId", "restricted"] + }, + "UpdateRestrictionStatusResponse": { "type": "object", "properties": {} }, + "ConfirmRequest": { + "type": "object", + "properties": { "token": { "type": "string" } }, + "required": ["token"] + }, + "ConfirmResponse": { "type": "object", "properties": {} }, + "User": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "name": { "type": "string" }, + "role": { "type": "string", "description": "none/author/typist" }, + "authorId": { "type": "string" }, + "typistGroupName": { "type": "array", "items": { "type": "string" } }, + "email": { "type": "string" }, + "emailVerified": { "type": "boolean" }, + "autoRenew": { "type": "boolean" }, + "notification": { "type": "boolean" }, + "encryption": { "type": "boolean" }, + "prompt": { "type": "boolean" }, + "expiration": { "type": "string" }, + "remaining": { "type": "number" }, + "licenseStatus": { + "type": "string", + "description": "Normal/NoLicense/Alert/Renew" + } + }, + "required": [ + "id", + "name", + "role", + "typistGroupName", + "email", + "emailVerified", + "autoRenew", + "notification", + "encryption", + "prompt", + "licenseStatus" + ] + }, + "GetUsersResponse": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { "$ref": "#/components/schemas/User" } + } + }, + "required": ["users"] + }, + "SignupRequest": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "role": { "type": "string", "description": "none/author/typist" }, + "authorId": { "type": "string" }, + "email": { "type": "string" }, + "autoRenew": { "type": "boolean" }, + "notification": { "type": "boolean" }, + "encryption": { "type": "boolean" }, + "encryptionPassword": { "type": "string" }, + "prompt": { "type": "boolean" } + }, + "required": ["name", "role", "email", "autoRenew", "notification"] + }, + "SignupResponse": { "type": "object", "properties": {} }, + "OptionItem": { + "type": "object", + "properties": { + "label": { + "type": "string", + "minLength": 1, + "maxLength": 16, + "description": "Option Itemのラベル" + }, + "initialValueType": { + "type": "number", + "description": "項目タイプ 1:Blank/2:Default/3:前の値" + }, + "defaultValue": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "description": "typeでDefaultを選択した場合のデフォルト値" + } + }, + "required": ["label", "initialValueType", "defaultValue"] + }, + "OptionItemList": { + "type": "object", + "properties": { + "workTypeId": { "type": "string" }, + "optionItemList": { + "maxItems": 10, + "description": "1WorkTypeIDにつき、10個まで登録可能", + "type": "array", + "items": { "$ref": "#/components/schemas/OptionItem" } + } + }, + "required": ["workTypeId", "optionItemList"] + }, + "GetRelationsResponse": { + "type": "object", + "properties": { + "authorId": { + "type": "string", + "description": "ログインしたユーザーのAuthorID(Authorでない場合はundefined)" + }, + "authorIdList": { + "description": "属しているアカウントのAuthorID List(全て)", + "type": "array", + "items": { "type": "string" } + }, + "workTypeList": { + "maxItems": 20, + "description": "アカウントに設定されているWorktypeIDのリスト(最大20個)", + "type": "array", + "items": { "$ref": "#/components/schemas/OptionItemList" } + }, + "isEncrypted": { + "type": "boolean", + "description": "ユーザーが音声ファイルを暗号化するかどうか" + }, + "encryptionPassword": { + "type": "string", + "description": "ユーザーが暗号化を掛ける場合のパスワード" + }, + "activeWorktype": { + "type": "string", + "description": "アカウントがデフォルトで利用するWorkTypeID(アカウントに紐づくWorkTypeIDから一つ指定。activeWorktypeがなければ空文字を返却する)" + }, + "audioFormat": { + "type": "string", + "description": "録音形式: DSS/DS2(SP)/DS2(QP): DS2固定" + }, + "prompt": { + "type": "boolean", + "description": "デバイス上で自動的にWorkTypeの選択画面を表示するかどうかのユーザーごとの設定(Authorでない場合はfalse)" + } + }, + "required": [ + "authorIdList", + "workTypeList", + "isEncrypted", + "activeWorktype", + "audioFormat", + "prompt" + ] + }, + "PostSortCriteriaRequest": { + "type": "object", + "properties": { + "direction": { "type": "string", "description": "ASC/DESC" }, + "paramName": { + "type": "string", + "description": "JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE" + } + }, + "required": ["direction", "paramName"] + }, + "PostSortCriteriaResponse": { "type": "object", "properties": {} }, + "GetSortCriteriaResponse": { + "type": "object", + "properties": { + "direction": { "type": "string", "description": "ASC/DESC" }, + "paramName": { + "type": "string", + "description": "JOB_NUMBER/STATUS/ENCRYPTION/AUTHOR_ID/WORK_TYPE/FILE_NAME/FILE_LENGTH/FILE_SIZE/RECORDING_STARTED_DATE/RECORDING_FINISHED_DATE/UPLOAD_DATE/TRANSCRIPTION_STARTED_DATE/TRANSCRIPTION_FINISHED_DATE" + } + }, + "required": ["direction", "paramName"] + }, + "PostUpdateUserRequest": { + "type": "object", + "properties": { + "id": { "type": "number" }, + "role": { "type": "string", "description": "none/author/typist" }, + "authorId": { "type": "string" }, + "autoRenew": { "type": "boolean" }, + "notification": { "type": "boolean" }, + "encryption": { "type": "boolean" }, + "encryptionPassword": { "type": "string" }, + "prompt": { "type": "boolean" } + }, + "required": ["id", "role", "autoRenew", "notification"] + }, + "PostUpdateUserResponse": { "type": "object", "properties": {} }, + "AllocateLicenseRequest": { + "type": "object", + "properties": { + "userId": { "type": "number", "description": "ユーザーID" }, + "newLicenseId": { + "type": "number", + "description": "割り当てるライセンスのID" + } + }, + "required": ["userId", "newLicenseId"] + }, + "AllocateLicenseResponse": { "type": "object", "properties": {} }, + "DeallocateLicenseRequest": { + "type": "object", + "properties": { + "userId": { "type": "number", "description": "ユーザーID" } + }, + "required": ["userId"] + }, + "DeallocateLicenseResponse": { "type": "object", "properties": {} }, + "UpdateAcceptedVersionRequest": { + "type": "object", + "properties": { + "idToken": { "type": "string", "description": "IDトークン" }, + "acceptedEULAVersion": { + "type": "string", + "description": "更新バージョン(EULA)" + }, + "acceptedPrivacyNoticeVersion": { + "type": "string", + "description": "更新バージョン(PrivacyNotice)" + }, + "acceptedDPAVersion": { + "type": "string", + "description": "更新バージョン(DPA)" + } + }, + "required": [ + "idToken", + "acceptedEULAVersion", + "acceptedPrivacyNoticeVersion" + ] + }, + "UpdateAcceptedVersionResponse": { "type": "object", "properties": {} }, + "GetMyUserResponse": { + "type": "object", + "properties": { + "userName": { "type": "string", "description": "ユーザー名" } + }, + "required": ["userName"] + }, + "PostDeleteUserRequest": { + "type": "object", + "properties": { + "userId": { "type": "number", "description": "削除対象のユーザーID" } + }, + "required": ["userId"] + }, + "PostDeleteUserResponse": { "type": "object", "properties": {} }, + "MultipleImportUser": { + "type": "object", + "properties": { + "name": { "type": "string", "description": "ユーザー名" }, + "email": { "type": "string", "description": "メールアドレス" }, + "role": { + "type": "number", + "description": "0(none)/1(author)/2(typist)" + }, + "authorId": { "type": "string" }, + "autoRenew": { "type": "number", "description": "0(false)/1(true)" }, + "notification": { + "type": "number", + "description": "0(false)/1(true)" + }, + "encryption": { "type": "number", "description": "0(false)/1(true)" }, + "encryptionPassword": { "type": "string" }, + "prompt": { "type": "number", "description": "0(false)/1(true)" } + }, + "required": ["name", "email", "role", "autoRenew", "notification"] + }, + "PostMultipleImportsRequest": { + "type": "object", + "properties": { + "filename": { "type": "string", "description": "CSVファイル名" }, + "users": { + "type": "array", + "items": { "$ref": "#/components/schemas/MultipleImportUser" } + } + }, + "required": ["filename", "users"] + }, + "PostMultipleImportsResponse": { "type": "object", "properties": {} }, + "MultipleImportErrors": { + "type": "object", + "properties": { + "name": { "type": "string", "description": "ユーザー名" }, + "line": { "type": "number", "description": "エラー発生行数" }, + "errorCode": { "type": "string", "description": "エラーコード" } + }, + "required": ["name", "line", "errorCode"] + }, + "PostMultipleImportsCompleteRequest": { + "type": "object", + "properties": { + "accountId": { "type": "number", "description": "アカウントID" }, + "filename": { "type": "string", "description": "CSVファイル名" }, + "requestTime": { + "type": "number", + "description": "一括登録受付時刻(UNIXTIME/ミリ秒)" + }, + "errors": { + "type": "array", + "items": { "$ref": "#/components/schemas/MultipleImportErrors" } + } + }, + "required": ["accountId", "filename", "requestTime", "errors"] + }, + "PostMultipleImportsCompleteResponse": { + "type": "object", + "properties": {} + }, + "AudioOptionItem": { + "type": "object", + "properties": { + "optionItemLabel": { + "type": "string", + "minLength": 1, + "maxLength": 16 + }, + "optionItemValue": { + "type": "string", + "minLength": 1, + "maxLength": 20 + } + }, + "required": ["optionItemLabel", "optionItemValue"] + }, + "AudioUploadFinishedRequest": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "アップロード先Blob Storage(ファイル名含む)" + }, + "authorId": { + "type": "string", + "description": "自分自身(ログイン認証)したAuthorID" + }, + "fileName": { "type": "string", "description": "音声ファイル名" }, + "duration": { + "type": "string", + "description": "音声ファイルの録音時間(ミリ秒の整数値)" + }, + "createdDate": { + "type": "string", + "description": "音声ファイルの録音作成日時(開始日時)(yyyy-mm-ddThh:mm:ss.sss)" + }, + "finishedDate": { + "type": "string", + "description": "音声ファイルの録音作成終了日時(yyyy-mm-ddThh:mm:ss.sss)" + }, + "uploadedDate": { + "type": "string", + "description": "音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss)" + }, + "fileSize": { + "type": "number", + "description": "音声ファイルのファイルサイズ(Byte)" + }, + "priority": { + "type": "string", + "description": "優先度 \"00\":Normal / \"01\":High" + }, + "audioFormat": { + "type": "string", + "description": "録音形式: DSS/DS2(SP)/DS2(QP)" + }, + "comment": { "type": "string" }, + "workType": { "type": "string" }, + "optionItemList": { + "maxItems": 10, + "minItems": 10, + "description": "音声ファイルに紐づくOption Itemの一覧(10個固定)", + "type": "array", + "items": { "$ref": "#/components/schemas/AudioOptionItem" } + }, + "isEncrypted": { "type": "boolean" } + }, + "required": [ + "url", + "authorId", + "fileName", + "duration", + "createdDate", + "finishedDate", + "uploadedDate", + "fileSize", + "priority", + "audioFormat", + "comment", + "workType", + "optionItemList", + "isEncrypted" + ] + }, + "AudioUploadFinishedResponse": { + "type": "object", + "properties": { + "jobNumber": { "type": "string", "description": "8桁固定の数字" } + }, + "required": ["jobNumber"] + }, + "AudioUploadLocationResponse": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Blob StorageにアクセスするためのSASトークン入りのアクセスURL" + } + }, + "required": ["url"] + }, + "AudioDownloadLocationResponse": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Blob StorageにアクセスするためのSASトークン入りのアクセスURL" + } + }, + "required": ["url"] + }, + "TemplateDownloadLocationResponse": { + "type": "object", + "properties": { "url": { "type": "string" } }, + "required": ["url"] + }, + "TemplateUploadLocationResponse": { + "type": "object", + "properties": { "url": { "type": "string" } }, + "required": ["url"] + }, + "TemplateUploadFinishedRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "テンプレートファイルのファイル名" + }, + "url": { + "type": "string", + "description": "テンプレートファイルのアップロード先URL" + } + }, + "required": ["name", "url"] + }, + "TemplateUploadFinishedReqponse": { "type": "object", "properties": {} }, + "Assignee": { + "type": "object", + "properties": { + "typistUserId": { + "type": "number", + "description": "TypistID(TypistIDかTypistGroupIDのどちらかに値が入る)" + }, + "typistGroupId": { + "type": "number", + "description": "TypistGroupID(TypistGroupIDかTypistIDのどちらかに値が入る)" + }, + "typistName": { + "type": "string", + "description": "Typist名 / TypistGroup名" + } + }, + "required": ["typistName"] + }, + "Task": { + "type": "object", + "properties": { + "audioFileId": { + "type": "number", + "description": "ODMS Cloud上の音声ファイルID" + }, + "authorId": { "type": "string", "description": "AuthorID" }, + "workType": { "type": "string" }, + "optionItemList": { + "maxItems": 10, + "minItems": 10, + "description": "音声ファイルに紐づくOption Itemの一覧(10個固定)", + "type": "array", + "items": { "$ref": "#/components/schemas/AudioOptionItem" } + }, + "url": { + "type": "string", + "description": "音声ファイルのBlob Storage上での保存場所(ファイル名含む)のURL" + }, + "fileName": { "type": "string", "description": "音声ファイル名" }, + "audioDuration": { + "type": "string", + "description": "音声ファイルの録音時間(ミリ秒の整数値)" + }, + "audioCreatedDate": { + "type": "string", + "description": "音声ファイルの録音開始日時(yyyy-mm-ddThh:mm:ss.sss)" + }, + "audioFinishedDate": { + "type": "string", + "description": "音声ファイルの録音終了日時(yyyy-mm-ddThh:mm:ss.sss)" + }, + "audioUploadedDate": { + "type": "string", + "description": "音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss)" + }, + "fileSize": { + "type": "number", + "description": "音声ファイルのファイルサイズ(Byte)" + }, + "priority": { + "type": "string", + "description": "音声ファイルの優先度 \"00\":Normal / \"01\":High" + }, + "audioFormat": { + "type": "string", + "description": "録音形式: DSS/DS2(SP)/DS2(QP)" + }, + "comment": { "type": "string", "description": "コメント" }, + "isEncrypted": { "type": "boolean" }, + "jobNumber": { "type": "string", "description": "JOBナンバー" }, + "typist": { + "description": "割り当てられたユーザー", + "allOf": [{ "$ref": "#/components/schemas/Typist" }] + }, + "assignees": { + "description": "文字起こしに着手できる(チェックアウト可能な)、タスクにアサインされているグループ/個人の一覧", + "type": "array", + "items": { "$ref": "#/components/schemas/Assignee" } + }, + "status": { + "type": "string", + "description": "音声ファイルのファイルステータス Uploaded / Pending / InProgress / Finished / Backup" + }, + "transcriptionStartedDate": { + "type": "string", + "description": "文字起こし開始日時(yyyy-mm-ddThh:mm:ss.sss)" + }, + "transcriptionFinishedDate": { + "type": "string", + "description": "文字起こし終了日時(yyyy-mm-ddThh:mm:ss.sss)" + } + }, + "required": [ + "audioFileId", + "authorId", + "workType", + "optionItemList", + "url", + "fileName", + "audioDuration", + "audioCreatedDate", + "audioFinishedDate", + "audioUploadedDate", + "fileSize", + "priority", + "audioFormat", + "comment", + "isEncrypted", + "jobNumber", + "assignees", + "status" + ] + }, + "TasksResponse": { + "type": "object", + "properties": { + "limit": { + "type": "number", + "description": "タスクの取得件数(指定しない場合はデフォルト値)" + }, + "offset": { + "type": "number", + "description": "オフセット(何件目から取得するか 設定しない場合はデフォルト値)" + }, + "total": { "type": "number", "description": "タスクの総件数" }, + "tasks": { + "description": "音声ファイル/タスク一覧", + "type": "array", + "items": { "$ref": "#/components/schemas/Task" } + } + }, + "required": ["limit", "offset", "total", "tasks"] + }, + "AudioNextResponse": { + "type": "object", + "properties": { + "nextFileId": { + "type": "number", + "description": "ODMS Cloud上の次の音声ファイルID(存在しなければundefind)" + } + } + }, + "ChangeStatusResponse": { "type": "object", "properties": {} }, + "PostCheckoutPermissionRequest": { + "type": "object", + "properties": { + "assignees": { + "description": "文字起こしに着手可能(チェックアウト可能)にしたい、グループ個人の一覧", + "type": "array", + "items": { "$ref": "#/components/schemas/Assignee" } + } + }, + "required": ["assignees"] + }, + "PostCheckoutPermissionResponse": { "type": "object", "properties": {} }, + "PostDeleteTaskResponse": { "type": "object", "properties": {} }, + "CreateOrdersRequest": { + "type": "object", + "properties": { + "poNumber": { "type": "string" }, + "orderCount": { "type": "number" } + }, + "required": ["poNumber", "orderCount"] + }, + "CreateOrdersResponse": { "type": "object", "properties": {} }, + "IssueCardLicensesRequest": { + "type": "object", + "properties": { "createCount": { "type": "number" } }, + "required": ["createCount"] + }, + "IssueCardLicensesResponse": { + "type": "object", + "properties": { + "cardLicenseKeys": { "type": "array", "items": { "type": "string" } } + }, + "required": ["cardLicenseKeys"] + }, + "ActivateCardLicensesRequest": { + "type": "object", + "properties": { "cardLicenseKey": { "type": "string" } }, + "required": ["cardLicenseKey"] + }, + "ActivateCardLicensesResponse": { "type": "object", "properties": {} }, + "AllocatableLicenseInfo": { + "type": "object", + "properties": { + "licenseId": { "type": "number" }, + "expiryDate": { "format": "date-time", "type": "string" } + }, + "required": ["licenseId"] + }, + "GetAllocatableLicensesResponse": { + "type": "object", + "properties": { + "allocatableLicenses": { + "type": "array", + "items": { "$ref": "#/components/schemas/AllocatableLicenseInfo" } + } + }, + "required": ["allocatableLicenses"] + }, + "CancelOrderRequest": { + "type": "object", + "properties": { "poNumber": { "type": "string" } }, + "required": ["poNumber"] + }, + "CancelOrderResponse": { "type": "object", "properties": {} }, + "TemplateFile": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "テンプレートファイルのID" }, + "name": { + "type": "string", + "description": "テンプレートファイルのファイル名" + } + }, + "required": ["id", "name"] + }, + "GetTemplatesResponse": { + "type": "object", + "properties": { + "templates": { + "description": "テンプレートファイルの一覧", + "type": "array", + "items": { "$ref": "#/components/schemas/TemplateFile" } + } + }, + "required": ["templates"] + }, + "DeleteTemplateResponse": { "type": "object", "properties": {} }, + "WorkflowWorktype": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "Worktypeの内部ID" }, + "worktypeId": { "type": "string", "description": "WorktypeID" } + }, + "required": ["id", "worktypeId"] + }, + "WorkflowTemplate": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "テンプレートの内部ID" }, + "fileName": { + "type": "string", + "description": "テンプレートのファイル名" + } + }, + "required": ["id", "fileName"] + }, + "Workflow": { + "type": "object", + "properties": { + "id": { "type": "number", "description": "ワークフローの内部ID" }, + "author": { + "description": "Author情報", + "allOf": [{ "$ref": "#/components/schemas/Author" }] + }, + "worktype": { + "description": "Worktype情報", + "allOf": [{ "$ref": "#/components/schemas/WorkflowWorktype" }] + }, + "template": { + "description": "テンプレート情報", + "allOf": [{ "$ref": "#/components/schemas/WorkflowTemplate" }] + }, + "typists": { + "description": "ルーティング候補のタイピストユーザー/タイピストグループ", + "type": "array", + "items": { "$ref": "#/components/schemas/Assignee" } + } + }, + "required": ["id", "author", "typists"] + }, + "GetWorkflowsResponse": { + "type": "object", + "properties": { + "workflows": { + "description": "ワークフローの一覧", + "type": "array", + "items": { "$ref": "#/components/schemas/Workflow" } + } + }, + "required": ["workflows"] + }, + "WorkflowTypist": { + "type": "object", + "properties": { + "typistId": { + "type": "number", + "description": "タイピストユーザーの内部ID" + }, + "typistGroupId": { + "type": "number", + "description": "タイピストグループの内部ID" + } + } + }, + "CreateWorkflowsRequest": { + "type": "object", + "properties": { + "authorId": { "type": "number", "description": "Authorの内部ID" }, + "worktypeId": { "type": "number", "description": "Worktypeの内部ID" }, + "templateId": { + "type": "number", + "description": "テンプレートの内部ID" + }, + "typists": { + "description": "ルーティング候補のタイピストユーザー/タイピストグループ", + "minItems": 1, + "type": "array", + "items": { "$ref": "#/components/schemas/WorkflowTypist" } + } + }, + "required": ["authorId", "typists"] + }, + "CreateWorkflowsResponse": { "type": "object", "properties": {} }, + "UpdateWorkflowRequest": { + "type": "object", + "properties": { + "authorId": { "type": "number", "description": "Authorの内部ID" }, + "worktypeId": { "type": "number", "description": "Worktypeの内部ID" }, + "templateId": { + "type": "number", + "description": "テンプレートの内部ID" + }, + "typists": { + "description": "ルーティング候補のタイピストユーザー/タイピストグループ", + "minItems": 1, + "type": "array", + "items": { "$ref": "#/components/schemas/WorkflowTypist" } + } + }, + "required": ["authorId", "typists"] + }, + "UpdateWorkflowResponse": { "type": "object", "properties": {} }, + "DeleteWorkflowResponse": { "type": "object", "properties": {} }, + "RegisterRequest": { + "type": "object", + "properties": { + "pns": { "type": "string", "description": "wns or apns" }, + "handler": { + "type": "string", + "description": "wnsのチャネルURI or apnsのデバイストークン" + } + }, + "required": ["pns", "handler"] + }, + "RegisterResponse": { "type": "object", "properties": {} }, + "TermInfo": { + "type": "object", + "properties": { + "documentType": { "type": "string", "description": "利用規約種別" }, + "version": { "type": "string", "description": "バージョン" } + }, + "required": ["documentType", "version"] + }, + "GetTermsInfoResponse": { + "type": "object", + "properties": { + "termsInfo": { + "type": "array", + "items": { "$ref": "#/components/schemas/TermInfo" } + } + }, + "required": ["termsInfo"] + } + } + } +} diff --git a/dictation_function/src/blobstorage/blobstorage.service.ts b/dictation_function/src/blobstorage/blobstorage.service.ts new file mode 100644 index 0000000..d9b4472 --- /dev/null +++ b/dictation_function/src/blobstorage/blobstorage.service.ts @@ -0,0 +1,184 @@ +import { + BlobServiceClient, + StorageSharedKeyCredential, +} from "@azure/storage-blob"; +import { IMPORT_USERS_CONTAINER_NAME } from "../constants"; +import { InvocationContext } from "@azure/functions"; + +export class BlobstorageService { + private readonly blobServiceClient: BlobServiceClient; + private readonly sharedKeyCredential: StorageSharedKeyCredential; + constructor() { + if ( + !process.env.STORAGE_ACCOUNT_NAME_IMPORT || + !process.env.STORAGE_ACCOUNT_KEY_IMPORT || + !process.env.STORAGE_ACCOUNT_ENDPOINT_IMPORT + ) { + throw new Error("Storage account information is missing"); + } + + this.sharedKeyCredential = new StorageSharedKeyCredential( + process.env.STORAGE_ACCOUNT_NAME_IMPORT, + process.env.STORAGE_ACCOUNT_KEY_IMPORT + ); + this.blobServiceClient = new BlobServiceClient( + process.env.STORAGE_ACCOUNT_ENDPOINT_IMPORT, + this.sharedKeyCredential + ); + } + /** + * Lists blobs + * @returns blobs + */ + async listBlobs(context: InvocationContext): Promise { + context.log(`[IN] ${this.listBlobs.name}`); + try { + const containerClient = this.blobServiceClient.getContainerClient( + IMPORT_USERS_CONTAINER_NAME + ); + + const blobNames: string[] = []; + // stage.json以外のファイルを取得 + for await (const blob of containerClient.listBlobsFlat({ + prefix: "U_", + })) { + blobNames.push(blob.name); + } + + return blobNames; + } catch (error) { + context.error(error); + throw error; + } finally { + context.log(`[OUT] ${this.listBlobs.name}`); + } + } + + /** + * Downloads a blob + * @param context + * @param filename + * @returns file buffer + */ + public async downloadFileData( + context: InvocationContext, + filename: string + ): Promise { + context.log( + `[IN] ${this.downloadFileData.name} | params: { filename: ${filename} }` + ); + try { + const containerClient = this.blobServiceClient.getContainerClient( + IMPORT_USERS_CONTAINER_NAME + ); + const blobClient = containerClient.getBlobClient(filename); + try { + const downloadBlockBlobResponse = await blobClient.downloadToBuffer(); + return downloadBlockBlobResponse.toString(); + } catch (error) { + // ファイルが存在しない場合はundefinedを返す + if (error?.statusCode === 404) { + return undefined; + } + throw error; + } + } catch (error) { + context.error(error); + throw error; + } finally { + context.log(`[OUT] ${this.downloadFileData.name}`); + } + } + + /** + * Updates file + * @param context + * @param filename + * @param data + * @returns file + */ + public async updateFile( + context: InvocationContext, + filename: string, + data: string + ): Promise { + context.log( + `[IN] ${this.updateFile.name} | params: { filename: ${filename} }` + ); + try { + const containerClient = this.blobServiceClient.getContainerClient( + IMPORT_USERS_CONTAINER_NAME + ); + + const { response } = await containerClient.uploadBlockBlob( + filename, + data, + data.length + ); + if (response.errorCode) { + context.log(`update failed. response errorCode: ${response.errorCode}`); + return false; + } + return true; + } catch (error) { + context.error(error); + throw error; + } finally { + context.log(`[OUT] ${this.updateFile.name}`); + } + } + + /** + * Deletes file + * @param context + * @param filename + * @returns file + */ + public async deleteFile( + context: InvocationContext, + filename: string + ): Promise { + context.log( + `[IN] ${this.deleteFile.name} | params: { filename: ${filename} }` + ); + try { + const containerClient = this.blobServiceClient.getContainerClient( + IMPORT_USERS_CONTAINER_NAME + ); + const blobClient = containerClient.getBlobClient(filename); + await blobClient.deleteIfExists(); + } catch (error) { + context.error(error); + throw error; + } finally { + context.log(`[OUT] ${this.deleteFile.name}`); + } + } + + /** + * Determines whether file exists is + * @param context + * @param filename + * @returns file exists + */ + public async isFileExists( + context: InvocationContext, + filename: string + ): Promise { + context.log( + `[IN] ${this.isFileExists.name} | params: { filename: ${filename} }` + ); + try { + const containerClient = this.blobServiceClient.getContainerClient( + IMPORT_USERS_CONTAINER_NAME + ); + const blobClient = containerClient.getBlobClient(filename); + return await blobClient.exists(); + } catch (error) { + context.error(error); + throw error; + } finally { + context.log(`[OUT] ${this.isFileExists.name}`); + } + } +} diff --git a/dictation_function/src/blobstorage/types/guards.ts b/dictation_function/src/blobstorage/types/guards.ts new file mode 100644 index 0000000..b16a241 --- /dev/null +++ b/dictation_function/src/blobstorage/types/guards.ts @@ -0,0 +1,155 @@ +import { IMPORT_USERS_STAGES } from "../../constants"; +import { ErrorRow, ImportData, ImportJson, StageJson } from "./types"; + +const isErrorRow = (obj: any): obj is ErrorRow => { + if (typeof obj !== "object") return false; + const errorRow = obj as ErrorRow; + if (errorRow.name === undefined || typeof errorRow.name !== "string") { + return false; + } + if (errorRow.row === undefined || typeof errorRow.row !== "number") { + return false; + } + if (errorRow.error === undefined || typeof errorRow.error !== "string") { + return false; + } + return true; +}; + +export const isStageJson = (obj: any): obj is StageJson => { + if (typeof obj !== "object") return false; + const stageJson = obj as StageJson; + if ( + stageJson.filename !== undefined && + typeof stageJson.filename !== "string" + ) { + return false; + } + if (stageJson.update === undefined || typeof stageJson.update !== "number") { + return false; + } + if (stageJson.row !== undefined && typeof stageJson.row !== "number") { + return false; + } + + if ( + stageJson.errors !== undefined && + (!Array.isArray(stageJson.errors) || + !stageJson.errors.every((x) => isErrorRow(x))) + ) { + return false; + } + if ( + stageJson.state === undefined || + !Object.values(IMPORT_USERS_STAGES).includes(stageJson.state) + ) { + return false; + } + return true; +}; + +const isImportData = (obj: any): obj is ImportData => { + if (typeof obj !== "object") return false; + const importData = obj as ImportData; + if (importData.name === undefined || typeof importData.name !== "string") { + return false; + } + if (importData.email === undefined || typeof importData.email !== "string") { + return false; + } + if (importData.role === undefined || typeof importData.role !== "number") { + return false; + } + if ( + importData.author_id !== undefined && + typeof importData.author_id !== "string" + ) { + return false; + } + if ( + importData.auto_renew === undefined || + typeof importData.auto_renew !== "number" + ) { + return false; + } + if ( + importData.notification === undefined || + typeof importData.notification !== "number" + ) { + return false; + } + if ( + importData.encryption !== undefined && + typeof importData.encryption !== "number" + ) { + return false; + } + if ( + importData.encryption_password !== undefined && + typeof importData.encryption_password !== "string" + ) { + return false; + } + if ( + importData.prompt !== undefined && + typeof importData.prompt !== "number" + ) { + return false; + } + return true; +}; + +export const isImportJson = (obj: any): obj is ImportJson => { + if (typeof obj !== "object") return false; + const importJson = obj as ImportJson; + if ( + importJson.account_id === undefined || + typeof importJson.account_id !== "number" + ) { + return false; + } + if ( + importJson.user_id === undefined || + typeof importJson.user_id !== "number" + ) { + return false; + } + if ( + importJson.user_role === undefined || + typeof importJson.user_role !== "string" + ) { + return false; + } + if ( + importJson.external_id === undefined || + typeof importJson.external_id !== "string" + ) { + return false; + } + if ( + importJson.delegation_account_id !== undefined && + typeof importJson.delegation_account_id !== "number" + ) { + return false; + } + if ( + importJson.delegation_user_id !== undefined && + typeof importJson.delegation_user_id !== "number" + ) { + return false; + } + if ( + importJson.file_name === undefined || + typeof importJson.file_name !== "string" + ) { + return false; + } + if ( + importJson.data === undefined || + !Array.isArray(importJson.data) || + !importJson.data.every((x) => isImportData(x)) + ) { + return false; + } + return true; +}; diff --git a/dictation_function/src/blobstorage/types/types.ts b/dictation_function/src/blobstorage/types/types.ts new file mode 100644 index 0000000..fec4ed4 --- /dev/null +++ b/dictation_function/src/blobstorage/types/types.ts @@ -0,0 +1,56 @@ +import { IMPORT_USERS_STAGES, USER_ROLES } from "../../constants"; + +export type StageType = + (typeof IMPORT_USERS_STAGES)[keyof typeof IMPORT_USERS_STAGES]; + +export type StageJson = { + filename?: string | undefined; + update: number; + row?: number | undefined; + errors?: ErrorRow[] | undefined; + state: StageType; +}; + +export type ErrorRow = { + name: string; + row: number; + error: string; +}; + +export type ImportJson = { + account_id: number; + user_id: number; + user_role: RoleType; + external_id: string; + delegation_account_id?: number | undefined; + delegation_user_id?: number | undefined; + file_name: string; + date: number; + data: ImportData[]; +}; + +export type ImportData = { + name: string; + email: string; + role: number; + author_id?: string | undefined; + auto_renew: number; + notification: number; + encryption?: number | undefined; + encryption_password?: string | undefined; + prompt?: number | undefined; +}; + +export type RoleType = (typeof USER_ROLES)[keyof typeof USER_ROLES]; + +export type User = { + name: string; + role: RoleType; + email: string; + autoRenew: boolean; + notification: boolean; + authorId?: string | undefined; + encryption?: boolean | undefined; + encryptionPassword?: string | undefined; + prompt?: boolean | undefined; +}; diff --git a/dictation_function/src/common/errors/code.ts b/dictation_function/src/common/errors/code.ts new file mode 100644 index 0000000..25366a9 --- /dev/null +++ b/dictation_function/src/common/errors/code.ts @@ -0,0 +1,79 @@ +/* +エラーコード作成方針 +E+6桁(数字)で構成する。 +- 1~2桁目の値は種類(業務エラー、システムエラー...) +- 3~4桁目の値は原因箇所(トークン、DB、...) +- 5~6桁目の値は任意の重複しない値 +ex) +E00XXXX : システムエラー(通信エラーやDB接続失敗など) +E01XXXX : 業務エラー +EXX00XX : 内部エラー(内部プログラムのエラー) +EXX01XX : トークンエラー(トークン認証関連) +EXX02XX : DBエラー(DB関連) +EXX03XX : ADB2Cエラー(DB関連) +*/ +export const errorCodes = [ + "E009999", // 汎用エラー + "E000101", // トークン形式不正エラー + "E000102", // トークン有効期限切れエラー + "E000103", // トークン非アクティブエラー + "E000104", // トークン署名エラー + "E000105", // トークン発行元エラー + "E000106", // トークンアルゴリズムエラー + "E000107", // トークン不足エラー + "E000108", // トークン権限エラー + "E000301", // ADB2Cへのリクエスト上限超過エラー + "E010001", // パラメータ形式不正エラー + "E010201", // 未認証ユーザエラー + "E010202", // 認証済ユーザエラー + "E010203", // 管理ユーザ権限エラー + "E010204", // ユーザ不在エラー + "E010205", // DBのRoleが想定外の値エラー + "E010206", // DBのTierが想定外の値エラー + "E010207", // ユーザーのRole変更不可エラー + "E010208", // ユーザーの暗号化パスワード不足エラー + "E010209", // ユーザーの同意済み利用規約バージョンが最新でないエラー + "E010301", // メールアドレス登録済みエラー + "E010302", // authorId重複エラー + "E010401", // PONumber重複エラー + "E010501", // アカウント不在エラー + "E010502", // アカウント情報変更不可エラー + "E010503", // 代行操作不許可エラー + "E010601", // タスク変更不可エラー(タスクが変更できる状態でない、またはタスクが存在しない) + "E010602", // タスク変更権限不足エラー + "E010603", // タスク不在エラー + "E010701", // Blobファイル不在エラー + "E010801", // ライセンス不在エラー + "E010802", // ライセンス取り込み済みエラー + "E010803", // ライセンス発行済みエラー + "E010804", // ライセンス数不足エラー + "E010805", // ライセンス有効期限切れエラー + "E010806", // ライセンス割り当て不可エラー + "E010807", // ライセンス割り当て解除不可エラー + "E010808", // ライセンス注文キャンセル不可エラー + "E010809", // ライセンス発行キャンセル不可エラー(ステータスが変えられている場合) + "E010810", // ライセンス発行キャンセル不可エラー(発行から一定期間経過した場合) + "E010811", // ライセンス発行キャンセル不可エラー(発行したライセンスが割り当てされている場合) + "E010908", // タイピストグループ不在エラー + "E010909", // タイピストグループ名重複エラー + "E011001", // ワークタイプ重複エラー + "E011002", // ワークタイプ登録上限超過エラー + "E011003", // ワークタイプ不在エラー + "E011004", // ワークタイプ使用中エラー + "E013001", // ワークフローのAuthorIDとWorktypeIDのペア重複エラー + "E013002", // ワークフロー不在エラー + "E014001", // ユーザー削除エラー(削除しようとしたユーザーがすでに削除済みだった) + "E014002", // ユーザー削除エラー(削除しようとしたユーザーが管理者だった) + "E014003", // ユーザー削除エラー(削除しようとしたAuthorのAuthorIDがWorkflowに指定されていた) + "E014004", // ユーザー削除エラー(削除しようとしたTypistがWorkflowのTypist候補として指定されていた) + "E014005", // ユーザー削除エラー(削除しようとしたTypistがUserGroupに所属していた) + "E014006", // ユーザー削除エラー(削除しようとしたユーザが所有者の未完了のタスクが残っている) + "E014007", // ユーザー削除エラー(削除しようとしたユーザーが有効なライセンスを持っていた) + "E014009", // ユーザー削除エラー(削除しようとしたTypistが未完了のタスクのルーティングに設定されている) + "E015001", // タイピストグループ削除済みエラー + "E015002", // タイピストグループがワークフローに紐づいているエラー + "E015003", // タイピストグループがルーティングされているエラー + "E016001", // テンプレートファイル削除エラー(削除しようとしたテンプレートファイルがすでに削除済みだった) + "E016002", // テンプレートファイル削除エラー(削除しようとしたテンプレートファイルがWorkflowに指定されていた) + "E016003", // テンプレートファイル削除エラー(削除しようとしたテンプレートファイルが未完了のタスクに紐づいていた) +] as const; diff --git a/dictation_function/src/common/errors/index.ts b/dictation_function/src/common/errors/index.ts new file mode 100644 index 0000000..1543e4c --- /dev/null +++ b/dictation_function/src/common/errors/index.ts @@ -0,0 +1,3 @@ +export * from "./code"; +export * from "./types"; +export * from "./utils"; diff --git a/dictation_function/src/common/errors/types.ts b/dictation_function/src/common/errors/types.ts new file mode 100644 index 0000000..8cc801e --- /dev/null +++ b/dictation_function/src/common/errors/types.ts @@ -0,0 +1,9 @@ +import { errorCodes } from "./code"; + +export type ErrorObject = { + message: string; + code: ErrorCodeType; + statusCode?: number; +}; + +export type ErrorCodeType = typeof errorCodes[number]; diff --git a/dictation_function/src/common/errors/utils.ts b/dictation_function/src/common/errors/utils.ts new file mode 100644 index 0000000..3dd2410 --- /dev/null +++ b/dictation_function/src/common/errors/utils.ts @@ -0,0 +1,101 @@ +import { AxiosError } from "axios"; +import { isError } from "lodash"; +import { ErrorResponse } from "../../api"; +import { errorCodes } from "./code"; +import { ErrorCodeType, ErrorObject } from "./types"; + +export const createErrorObject = (error: unknown): ErrorObject => { + // 最低限通常のエラーかを判定 + // Error以外のものがthrowされた場合 + // 基本的にないはずだがプログラム上あるので拾う + if (!isError(error)) { + return { + message: "not error type.", + code: "E009999", + }; + } + + // Axiosエラー 通信してのエラーであるかを判定 + if (!isAxiosError(error)) { + return { + message: "not axios error.", + code: "E009999", + }; + } + + const errorResponse = error.response; + if (!errorResponse) { + return { + message: error.message, + code: "E009999", + statusCode: errorResponse, + }; + } + + const { data } = errorResponse; + + // 想定しているエラーレスポンスの型か判定 + if (!isErrorResponse(data)) { + return { + message: error.message, + code: "E009999", + statusCode: errorResponse.status, + }; + } + + const { message, code } = data; + + // 想定しているエラーコードかを判定 + if (!isErrorCode(code)) { + return { + message, + code: "E009999", + statusCode: errorResponse.status, + }; + } + + return { + message, + code, + statusCode: errorResponse.status, + }; +}; + +const isAxiosError = (e: unknown): e is AxiosError => { + const error = e as AxiosError; + return error?.isAxiosError ?? false; +}; + +const isErrorResponse = (error: unknown): error is ErrorResponse => { + const errorResponse = error as ErrorResponse; + if ( + errorResponse === undefined || + errorResponse.message === undefined || + errorResponse.code === undefined + ) { + return false; + } + + return true; +}; + +const isErrorCode = (errorCode: string): errorCode is ErrorCodeType => + errorCodes.includes(errorCode as ErrorCodeType); + +export const isErrorObject = ( + data: unknown +): data is { error: ErrorObject } => { + if ( + data && + typeof data === "object" && + "error" in data && + typeof (data as { error: ErrorObject }).error === "object" && + typeof (data as { error: ErrorObject }).error.message === "string" && + typeof (data as { error: ErrorObject }).error.code === "string" && + (typeof (data as { error: ErrorObject }).error.statusCode === "number" || + (data as { error: ErrorObject }).error.statusCode === undefined) + ) { + return true; + } + return false; +}; diff --git a/dictation_function/src/common/jwt/index.ts b/dictation_function/src/common/jwt/index.ts new file mode 100644 index 0000000..60cc8f7 --- /dev/null +++ b/dictation_function/src/common/jwt/index.ts @@ -0,0 +1,3 @@ +import { isVerifyError, sign, verify, decode, getJwtKey } from "./jwt"; + +export { isVerifyError, sign, verify, decode, getJwtKey }; diff --git a/dictation_function/src/common/jwt/jwt.spec.ts b/dictation_function/src/common/jwt/jwt.spec.ts new file mode 100644 index 0000000..b58d91c --- /dev/null +++ b/dictation_function/src/common/jwt/jwt.spec.ts @@ -0,0 +1,250 @@ +import { sign, verify, isVerifyError } from "./jwt"; +import base64url from "base64url"; + +test("success sign and verify", () => { + const token = sign({ value: "testvalue" }, 5 * 60, privateKey); + const payload = verify<{ value: "testvalue" }>(token, publicKey); + if (isVerifyError(payload)) { + throw new Error(`${payload.reason} | ${payload.message}`); + } + + expect(payload.value).toBe("testvalue"); +}); + +test("failed sign and verify (jwt expired)", () => { + // 有効期限を0秒にすることで、検証を行った時点で有効期限切れにする + const token = sign({ value: "testvalue" }, 0, privateKey); + const payload = verify<{ value: "testvalue" }>(token, publicKey); + if (!isVerifyError(payload)) { + throw new Error(JSON.stringify(payload)); + } + expect(payload.reason).toBe("ExpiredError"); +}); + +test("failed sign and verify (invalid key pair)", () => { + const token = sign({ value: "testvalue" }, 5 * 60, privateKey); + // 秘密鍵と対ではない公開鍵を使用して検証する + const payload = verify<{ value: "testvalue" }>(token, anotherPublicKey); + if (!isVerifyError(payload)) { + throw new Error(JSON.stringify(payload)); + } + expect(payload.reason).toBe("InvalidToken"); + expect(payload.message).toBe("invalid signature"); +}); + +test("failed sign and verify (invalid public key)", () => { + const token = sign({ value: "testvalue" }, 5 * 60, privateKey); + // 公開鍵の形式になっていない文字列を使用して検証する + const payload = verify<{ value: "testvalue" }>(token, fakePublicKey); + if (!isVerifyError(payload)) { + throw new Error(JSON.stringify(payload)); + } + expect(payload.reason).toBe("InvalidToken"); + expect(payload.message).toBe( + "secretOrPublicKey must be an asymmetric key when using RS256" + ); +}); + +test("failed sign (invalid private key)", () => { + expect(() => { + // 不正な秘密鍵で署名しようとする場合はエラーがthrowされる + sign({ value: "testvalue" }, 5 * 60, fakePrivateKey); + }).toThrowError(); +}); + +test("success rewrite-token verify (as is)", () => { + const token = sign({ value: "testvalue" }, 5 * 60, privateKey); + const { header, payload, verifySignature } = splitToken(token); + + { + // 何も操作せずに構築しなおした場合、成功する + const validToken = rebuildToken(header, payload, verifySignature); + + const value = verify<{ value: string }>(validToken, publicKey); + if (isVerifyError(value)) { + throw new Error(`${value.reason} | ${value.message}`); + } + + expect(value.value).toBe("testvalue"); + } +}); + +test("failed rewrite-token verify (override algorithm)", () => { + const token = sign({ value: "testvalue" }, 5 * 60, privateKey); + const { payload, verifySignature } = splitToken(token); + + { + // 検証アルゴリズムを「検証なし」に書き換える + const headerObject = { alg: "none" }; + const payloadObject = JSON.parse(payload) as { + value: string; + iat: number; + exp: number; + }; + + // 内容を操作して構築しなおした場合、失敗する + const customToken = rebuildToken( + JSON.stringify(headerObject), + JSON.stringify(payloadObject), + verifySignature + ); + + const value = verify<{ value: string }>(customToken, publicKey); + if (!isVerifyError(value)) { + throw new Error(JSON.stringify(payload)); + } + expect(value.reason).toBe("InvalidToken"); + expect(value.message).toBe("invalid algorithm"); + } +}); + +test("failed rewrite-token verify (override expire)", () => { + const token = sign({ value: "testvalue" }, 5 * 60, privateKey); + const { header, payload, verifySignature } = splitToken(token); + + { + // expの値を操作する + const payloadObject = JSON.parse(payload) as { + value: string; + iat: number; + exp: number; + }; + payloadObject.exp = payloadObject.exp + 100000; + + // 内容を操作して構築しなおした場合、失敗する + const customToken = rebuildToken( + header, + JSON.stringify(payloadObject), + verifySignature + ); + + const value = verify<{ value: string }>(customToken, publicKey); + if (!isVerifyError(value)) { + throw new Error(JSON.stringify(payload)); + } + expect(value.reason).toBe("InvalidToken"); + expect(value.message).toBe("invalid signature"); + } +}); + +// JWT改竄テスト用ユーティリティ +const splitToken = ( + token: string +): { header: string; payload: string; verifySignature: string } => { + const splited = token.split("."); + + const header = base64url.decode(splited[0]); + const payload = base64url.decode(splited[1]); + const verifySignature = splited[2]; + return { header, payload, verifySignature }; +}; + +// JWT改竄テスト用ユーティリティ +const rebuildToken = ( + header: string, + payload: string, + verifySignature: string +): string => { + const rebuild_header = base64url.encode(header); + const rebuild_payload = base64url.encode(payload); + return `${rebuild_header}.${rebuild_payload}.${verifySignature}`; +}; + +// テスト用に生成した秘密鍵 +const privateKey = [ + "-----BEGIN RSA PRIVATE KEY-----", + "MIIEpAIBAAKCAQEAsTVLNpW0/FzVCU7qo1DDjOkYWx6s/jE56YOOc3UzaaG/zb1F", + "GyfRoUUgS4DnQxPNz9oM63RpQlhvG6UCwx23tL7p3PS0ZCsLeggcyLctbJAzLy/a", + "fF9ABoreorqp/AaEs+Vdwbykb+M+nB2Sxsc57Tli2x8NiOZr5dafs3vMuIIKNsBa", + "FAugFrd2ApxXR04jBRAorZRRFPtECE7D+hxDalw5DCd0mmdY0vrbRsgkbej0Zzzq", + "zukJVXTMjy1YScqi3I9gLx2hLVmpK76Gtxn21AIcn8P3rKZmDyPH+9KNfWC8+ubF", + "+VuY6nItlCgiSyTKErAp6M9pyRHKbPpdUM3aIQIDAQABAoIBAQCk7fkmwIdGKhCN", + "LUns3opiZ8AnbpGLs702vR6kDvze35BoqDPdZl4RPwkjvMGBCLmRLly/+ATPnwcq", + "L5Y2iz4jl1yKLaaHZBi2Zz6DARnh5QP+cwdiojQw4qb7xcfXrSltVZjBbBWPnWz0", + "WAH3yAz94V9Emc47EFpz/CF/J0YOokxY8GlR4cwfK6NE0goAjzmatwV3IVFeR/eE", + "x6JZAmd/0HMfOn3k/NumAMCJXKnZMQBAMQ3AduTO2lbZm+29yBqymtzTGFjrj0gm", + "+E/ibD8vVzh0toPvUfPIqetdRT8vkUJ5UHhAkz9Vzvqhr6BhYhc2ft0x/z7HpaiX", + "cDqnaRLBAoGBAODdPEktK1VOVXhOuikZBUHXU25iQdQRbM4kCtWiE8lBZ/f+6OPc", + "BN+OedYMDhpFe/oFqGU4t610SPO1CdVRPnWHhMSabjh9G3gqOZjSW5tEAgT2wi+H", + "IOVXnsos1qCMFdXWgVZw6F8wNcui9VabGic/EOqMRihEeSOjcradTSQFAoGBAMm+", + "y2wZ8usanIDzADgTJnA4kBZzhIxK6qcPf3tPVXKuFUOFWwzGiDXeXTwM0sWN7kGb", + "iymqhTWlYETQ3C6jPXTJiyOSco1rw45wO+xSHeQvUzXpk+9whbVAlhTcoVGiKz+9", + "BS7+3+lKtBzXDNADxQfSGjiGb+ceilBGLV+WurRtAoGAPxn2a/aP/X1hAMTe+t95", + "mTNqx0Qtguxs4yA8Jh04fjarjW1sP10jxPR/fjCd2IN9OflSey1CZhuGyVUZcFI/", + "O84O1PkdSx7YkY0P4rHNYTHhezEf5yR9d75x4fxZMm59RifO3coLe4LU5dNSE76s", + "xSyue5NnsK8ea4DXlSVpW10CgYAfHz3GWWJt/lbyVYpNHDcrzK39qKhj9BKq3ust", + "nJlz7YL+PY5ENERC+yCq6NeC/lgo6tPXA6U1F2P4ebfdwfTzFTxPqoHdayhpysqT", + "tD9EOkC96mCV6WfXBDWi1j5Ul43QcVphW5QzKwEKCerCFDLK+BBvc93Da6SuqYTK", + "YDhBKQKBgQDKtNe8CjHRvkWoyKErMMpv5D0ce/yWq+oAaoqW1QKwngPyaiDeDwqM", + "iOJzQxtvK4YqMYQdkgj5VLfWzeazd28RLODZua6phe776zuUv93LHTvYq/8RZfhk", + "JIQJ7GETBnHmoTemwmJiSdVDsjJdtsyR4XRjIDNR5bGe7NNbZJpCUw==", + "-----END RSA PRIVATE KEY-----", +].join("\n"); + +// テスト用に生成した公開鍵 +const publicKey = [ + "-----BEGIN PUBLIC KEY-----", + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsTVLNpW0/FzVCU7qo1DD", + "jOkYWx6s/jE56YOOc3UzaaG/zb1FGyfRoUUgS4DnQxPNz9oM63RpQlhvG6UCwx23", + "tL7p3PS0ZCsLeggcyLctbJAzLy/afF9ABoreorqp/AaEs+Vdwbykb+M+nB2Sxsc5", + "7Tli2x8NiOZr5dafs3vMuIIKNsBaFAugFrd2ApxXR04jBRAorZRRFPtECE7D+hxD", + "alw5DCd0mmdY0vrbRsgkbej0ZzzqzukJVXTMjy1YScqi3I9gLx2hLVmpK76Gtxn2", + "1AIcn8P3rKZmDyPH+9KNfWC8+ubF+VuY6nItlCgiSyTKErAp6M9pyRHKbPpdUM3a", + "IQIDAQAB", + "-----END PUBLIC KEY-----", +].join("\n"); + +// テスト用に作成した、違う秘密鍵から生成した公開鍵 +const anotherPublicKey = [ + "-----BEGIN PUBLIC KEY-----", + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt1WsgrjpjsEfRa7vqlR3", + "2mGxErXpvC+uRQnFtSXdP4tEYicPb1cNFUcu5xW6attTyzKHKMzwJrvmKEKVYGig", + "n43rM+UyW79DNOQWQQblCHAc3hMolLWC+Tkw7xL4JhzZLH0rm5DF52YNYSicV1S9", + "RpxYEeyHUa+ExV82lT47ySWAwg+yPwtDeDPMbOxHXqyw1wdqR2WVuxsQBaIRQgMk", + "EL/qObQjA4e5jOOwERRvVLxzjhnldUZcG0cYGDfjPTewRYfCeXzMx2YM4Uo0vx0x", + "2ZIY+im061GvfugX4/31xB5YEi+62qIwuSL5UpKjMv5yx1cvIqO76Ro3XNwsR+81", + "KQIDAQAB", + "-----END PUBLIC KEY-----", +].join("\n"); + +// 秘密鍵のように見えるが想定する形式と違う +const fakePrivateKey = [ + "-----BAGIN RSA PRIVATE KEY-----", + "MIIEpAIBAAKCAQEAsTVLNpW0/FzVCU7qo1DDjOkYWx6s/jE56YOOc3UzaaG/zb1F", + "GyfRoUUgS4DnQxPNz9oM63RpQlhvG6UCwx23tL7p3PS0ZCsLeggcyLctbJAzLy/a", + "fF9ABoreorqp/AaEs+Vdwbykb+M+nB2Sxsc57Tli2x8NiOZr5dafs3vMuIIKNsBa", + "FAugFrd2ApxXR04jBRAorZRRFPtECE7D+hxDalw5DCd0mmdY0vrbRsgkbej0Zzzq", + "zukJVXTMjy1YScqi3I9gLx2hLVmpK76Gtxn21AIcn8P3rKZmDyPH+9KNfWC8+ubF", + "+VuY6nItlCgiSyTKErAp6M9pyRHKbPpdUM3aIQIDAQABAoIBAQCk7fkmwIdGKhCN", + "LUns3opiZ8AnbpGLs702vR6kDvze35BoqDPdZl4RPwkjvMGBCLmRLly/+ATPnwcq", + "L5Y2iz4jl1yKLaaHZBi2Zz6DARnh5QP+cwdiojQw4qb7xcfXrSltVZjBbBWPnWz0", + "WAH3yAz94V9Emc47EFpz/CF/J0YOokxY8GlR4cwfK6NE0goAjzmatwV3IVFeR/eE", + "x6JZAmd/0HMfOn3k/NumAMCJXKnZMQBAMQ3AduTO2lbZm+29yBqymtzTGFjrj0gm", + "+E/ibD8vVzh0toPvUfPIqetdRT8vkUJ5UHhAkz9Vzvqhr6BhYhc2ft0x/z7HpaiX", + "cDqnaRLBAoGBAODdPEktK1VOVXhOuikZBUHXU25iQdQRbM4kCtWiE8lBZ/f+6OPc", + "BN+OedYMDhpFe/oFqGU4t610SPO1CdVRPnWHhMSabjh9G3gqOZjSW5tEAgT2wi+H", + "IOVXnsos1qCMFdXWgVZw6F8wNcui9VabGic/EOqMRihEeSOjcradTSQFAoGBAMm+", + "y2wZ8usanIDzADgTJnA4kBZzhIxK6qcPf3tPVXKuFUOFWwzGiDXeXTwM0sWN7kGb", + "iymqhTWlYETQ3C6jPXTJiyOSco1rw45wO+xSHeQvUzXpk+9whbVAlhTcoVGiKz+9", + "BS7+3+lKtBzXDNADxQfSGjiGb+ceilBGLV+WurRtAoGAPxn2a/aP/X1hAMTe+t95", + "mTNqx0Qtguxs4yA8Jh04fjarjW1sP10jxPR/fjCd2IN9OflSey1CZhuGyVUZcFI/", + "O84O1PkdSx7YkY0P4rHNYTHhezEf5yR9d75x4fxZMm59RifO3coLe4LU5dNSE76s", + "xSyue5NnsK8ea4DXlSVpW10CgYAfHz3GWWJt/lbyVYpNHDcrzK39qKhj9BKq3ust", + "nJlz7YL+PY5ENERC+yCq6NeC/lgo6tPXA6U1F2P4ebfdwfTzFTxPqoHdayhpysqT", + "tD9EOkC96mCV6WfXBDWi1j5Ul43QcVphW5QzKwEKCerCFDLK+BBvc93Da6SuqYTK", + "YDhBKQKBgQDKtNe8CjHRvkWoyKErMMpv5D0ce/yWq+oAaoqW1QKwngPyaiDeDwqM", + "iOJzQxtvK4YqMYQdkgj5VLfWzeazd28RLODZua6phe776zuUv93LHTvYq/8RZfhk", + "JIQJ7GETBnHmoTemwmJiSdVDsjJdtsyR4XRjIDNR5bGe7NNbZJpCUw==", + "-----END RSA PRIVATE KEY-----", +].join("\n"); + +// 公開鍵のように見えるが想定する形式と違う +const fakePublicKey = [ + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt1WsgrjpjsEfRa7vqlR3", + "2mGxErXpvC+uRQnFtSXdP4tEYicPb1cNFUcu5xW6attTyzKHKMzwJrvmKEKVYGig", + "n43rM+UyW79DNOQWQQblCHAc3hMolLWC+Tkw7xL4JhzZLH0rm5DF52YNYSicV1S9", + "RpxYEeyHUa+ExV82lT47ySWAwg+yPwtDeDPMbOxHXqyw1wdqR2WVuxsQBaIRQgMk", + "EL/qObQjA4e5jOOwERRvVLxzjhnldUZcG0cYGDfjPTewRYfCeXzMx2YM4Uo0vx0x", + "2ZIY+im061GvfugX4/31xB5YEi+62qIwuSL5UpKjMv5yx1cvIqO76Ro3XNwsR+81", + "KQIDAQAB", +].join("\n"); diff --git a/dictation_function/src/common/jwt/jwt.ts b/dictation_function/src/common/jwt/jwt.ts new file mode 100644 index 0000000..faf9f85 --- /dev/null +++ b/dictation_function/src/common/jwt/jwt.ts @@ -0,0 +1,130 @@ +import * as jwt from "jsonwebtoken"; +// XXX: decodeがうまく使えないことがあるので応急対応 バージョン9以降だとなる? +import { decode as jwtDecode } from "jsonwebtoken"; + +export type VerifyError = { + reason: "ExpiredError" | "InvalidToken" | "InvalidTimeStamp" | "Unknown"; + message: string; +}; + +export const isVerifyError = (arg: unknown): arg is VerifyError => { + const value = arg as VerifyError; + if (value.message === undefined) { + return false; + } + + if (value.reason === undefined) { + return false; + } + switch (value.reason) { + case "ExpiredError": + case "InvalidTimeStamp": + case "InvalidToken": + case "Unknown": + return true; + default: + return false; + } +}; + +/** + * Payloadと秘密鍵を使用して署名されたJWTを生成します + * @param {T} payload payloadの型 + * @param {number} expirationSeconds トークンの有効期限(秒) + * @param {string} privateKey 署名に使用する秘密鍵 + * @return {string} 署名済みトークン + * @throws {Error} 秘密鍵の形式が間違っている等の理由が格納されたErrorオブジェクト + */ +export const sign = ( + payload: T, + expirationSeconds: number, + privateKey: string +): string => { + try { + const token = jwt.sign(payload, privateKey, { + expiresIn: expirationSeconds, + algorithm: "RS256", + }); + return token; + } catch (e) { + throw e; + } +}; + +/** + * tokenと公開鍵を使用して検証済みJWTのpayloadを取得します + * @param {string} token JWT + * @param {string} publicKey 検証に使用する公開鍵 + * @return {T | VerifyError} Payload または 検証エラーの内容を表すオブジェクト + */ +export const verify = ( + token: string, + publicKey: string +): T | VerifyError => { + try { + const payload = jwt.verify(token, publicKey, { + algorithms: ["RS256"], + }) as T; + return payload; + } catch (e) { + if (e instanceof jwt.TokenExpiredError) { + return { + reason: "ExpiredError", + message: e.message, + }; + } else if (e instanceof jwt.NotBeforeError) { + return { + reason: "InvalidTimeStamp", + message: e.message, + }; + } else if (e instanceof jwt.JsonWebTokenError) { + return { + reason: "InvalidToken", + message: e.message, + }; + } else { + return { + reason: "Unknown", + message: e.message, + }; + } + } +}; + +/** + * tokenから未検証のJWTのpayloadを取得します + * @param {string} token JWT + * @return {T | VerifyError} Payload または デコードエラーの内容を表すオブジェクト + */ +export const decode = (token: string): T | VerifyError => { + try { + const payload = jwtDecode(token, { + json: true, + }) as T; + return payload; + } catch (e) { + if (e instanceof jwt.TokenExpiredError) { + return { + reason: "ExpiredError", + message: e.message, + }; + } else if (e instanceof jwt.NotBeforeError) { + return { + reason: "InvalidTimeStamp", + message: e.message, + }; + } else if (e instanceof jwt.JsonWebTokenError) { + return { + reason: "InvalidToken", + message: e.message, + }; + } else { + return { + reason: "Unknown", + message: e.message, + }; + } + } +}; + +export const getJwtKey = (key: string): string => key.replace(/\\n/g, "\n"); diff --git a/dictation_function/src/common/jwt/types.ts b/dictation_function/src/common/jwt/types.ts new file mode 100644 index 0000000..7ae28d2 --- /dev/null +++ b/dictation_function/src/common/jwt/types.ts @@ -0,0 +1,32 @@ +export type AccessToken = { + /** + * 外部認証サービスの識別子(代行者) + */ + delegateUserId?: string | undefined; + /** + * 外部認証サービスの識別子 + */ + userId: string; + /** + * 半角スペース区切りのRoleを表現する文字列(ex. "author admin") + */ + role: string; + /** + * アカウントの階層情報(1~5までの半角数字) + */ + tier: number; +}; + +// システムの内部で発行し、外部に公開しないトークン +// システム間通信用(例: Azure Functions→AppService)に使用する +export type SystemAccessToken = { + /** + * トークンの発行者名(ログ記録用) + */ + systemName: string; + + /** + * 付加情報を 文字情報として格納できる + */ + context?: string; +}; diff --git a/dictation_function/src/constants/index.ts b/dictation_function/src/constants/index.ts index f1e0b64..88e3e3b 100644 --- a/dictation_function/src/constants/index.ts +++ b/dictation_function/src/constants/index.ts @@ -293,3 +293,45 @@ export const HTTP_STATUS_CODES = { BAD_REQUEST: 400, INTERNAL_SERVER_ERROR: 500, }; + +/** + * ユーザー一括登録用のBlobコンテナ名 + * @const {string} + */ +export const IMPORT_USERS_CONTAINER_NAME = "import-users"; + +/** + * ユーザー一括登録の最大処理時間(分) + * @const {number} + */ +export const IMPORT_USERS_MAX_DURATION_MINUTES = 30; + +/** + * ユーザー一括登録のステージ管理ファイル名 + * @const {string} + */ +export const IMPORT_USERS_STAGE_FILE_NAME = "stage.json"; + +/** + * ユーザー一括登録のステージ管理のステージ + * @const {string} + */ +export const IMPORT_USERS_STAGES = { + CREATED: "created", + PRAPARE: "prepare", + START: "start", + COMPLETE: "complete", + DONE: "done", +} as const; + +/** + * ユーザーのロールと数値のマッピング + * @const {string} + */ +export const RoleNumberMap: Record = { + 1: USER_ROLES.NONE, + 2: USER_ROLES.AUTHOR, + 3: USER_ROLES.TYPIST, +} as const; + +export const SYSTEM_IMPORT_USERS = "import-users"; diff --git a/dictation_function/src/functions/importUsers.ts b/dictation_function/src/functions/importUsers.ts new file mode 100644 index 0000000..6294c8b --- /dev/null +++ b/dictation_function/src/functions/importUsers.ts @@ -0,0 +1,510 @@ +import { app, InvocationContext, Timer } from "@azure/functions"; +import * as dotenv from "dotenv"; +import { BlobstorageService } from "../blobstorage/blobstorage.service"; +import { + ADMIN_ROLES, + IMPORT_USERS_MAX_DURATION_MINUTES, + IMPORT_USERS_STAGE_FILE_NAME, + IMPORT_USERS_STAGES, + RoleNumberMap, + SYSTEM_IMPORT_USERS, + TIERS, +} from "../constants"; +import { ErrorRow, ImportData } from "../blobstorage/types/types"; +import { Configuration, UsersApi } from "../api"; +import { createErrorObject } from "../common/errors/utils"; +import { sign, getJwtKey } from "../common/jwt"; +import { AccessToken, SystemAccessToken } from "../common/jwt/types"; +import { isImportJson, isStageJson } from "../blobstorage/types/guards"; + +export async function importUsersProcessing( + context: InvocationContext, + blobstorageService: BlobstorageService, + userApi: UsersApi +): Promise { + context.log(`[IN] importUsersProcessing`); + try { + dotenv.config({ path: ".env" }); + dotenv.config({ path: ".env.local", override: true }); + + const startUnixTime = getCurrentUnixTime(); + context.log(`importUsersProcessing start: ${startUnixTime}`); + + // ファイルが存在する間ループ + while (true) { + // Blobストレージからファイル名の一覧を取得(stage.json以外) + const bloblist = await blobstorageService.listBlobs(context); + context.log(bloblist); + + // stage.json以外のファイルが存在しない場合は処理中断 + if (bloblist.length === 0) { + break; + } + + // ファイルのうち、日付が最も古いファイルを取得 + let targetFileName = bloblist.sort().at(0); + if (targetFileName === undefined) { + throw new Error("targetFileName is undefined"); + } + let row = 1; + + // stage.jsonを取得(ダウンロード)して読み込む + let stageData = await blobstorageService.downloadFileData( + context, + IMPORT_USERS_STAGE_FILE_NAME + ); + + // stage.jsonが存在しない場合は、新規作成する + if (stageData === undefined) { + stageData = JSON.stringify({ + update: getCurrentUnixTime(), + state: IMPORT_USERS_STAGES.CREATED, + }); + const updateSuccess = await blobstorageService.updateFile( + context, + IMPORT_USERS_STAGE_FILE_NAME, + stageData + ); + if (!updateSuccess) { + throw new Error( + `update stage.json failed. state: ${IMPORT_USERS_STAGES.CREATED} filename: ${targetFileName}` + ); + } + } + + const stage = JSON.parse(stageData); + + if (!isStageJson(stage)) { + throw new Error("stage.json is invalid"); + } + + // 作業中のstage.jsonが存在する場合は、処理を再開する + if ( + stage.state !== IMPORT_USERS_STAGES.CREATED && + stage.state !== IMPORT_USERS_STAGES.DONE + ) { + // stage.jsonが存在し、内部状態が処理中で、最終更新日時が10分以上前だった場合は処理中断とみなして途中から再開 + const nowUnixTime = getCurrentUnixTime(); + if (nowUnixTime - stage.update > 10 * 60) { + // stage.jsonの内容から処理対象のfilepathを特定する + context.log(stage.filename); + if (stage.filename === undefined) { + context.log("stage.filename is undefined"); + break; + } + targetFileName = stage.filename; + // 処理開始行をstage.jsonを元に復元する + row = stage.row ?? 1; + } else { + // 内部状態が処理中であれば処理中断(処理が終わる前にTimerから再度起動されてしまったケース) + context.log("stage is processing"); + break; + } + } + + { + const updateSuccess = await blobstorageService.updateFile( + context, + IMPORT_USERS_STAGE_FILE_NAME, + JSON.stringify({ + update: getCurrentUnixTime(), + state: IMPORT_USERS_STAGES.PRAPARE, + filename: targetFileName, + }) + ); + if (!updateSuccess) { + throw new Error( + `update stage.json failed. state: ${IMPORT_USERS_STAGES.PRAPARE} filename: ${targetFileName}` + ); + } + } + + // 対象ファイルをダウンロードして読み込む + const importsData = await blobstorageService.downloadFileData( + context, + targetFileName + ); + + // 一括登録ユーザー一覧をメモリ上に展開 + const imports = + importsData === undefined ? undefined : JSON.parse(importsData); + if (!isImportJson(imports)) { + throw new Error(`json: ${targetFileName} is invalid`); + } + + if (imports === undefined) { + break; + } + + // 代行操作トークンを発行する + const accsessToken = await generateDelegationAccessToken( + context, + imports.external_id, + imports.user_role + ); + + // 一括登録ユーザー一覧をループして、一括登録ユーザーを一括登録する + const errors: ErrorRow[] = []; + for (const user of imports.data) { + { + // stage.jsonを更新(ユーザー追加開始) + const updateSuccess = await blobstorageService.updateFile( + context, + IMPORT_USERS_STAGE_FILE_NAME, + JSON.stringify({ + update: getCurrentUnixTime(), + state: IMPORT_USERS_STAGES.START, + filename: targetFileName, + row: row, + }) + ); + if (!updateSuccess) { + throw new Error( + `update stage.json failed. state: ${IMPORT_USERS_STAGES.START} filename: ${targetFileName} row: ${row}` + ); + } + } + + try { + if (!checkUser(context, user, targetFileName, row)) { + throw new Error( + `Invalid user data. filename: ${targetFileName} row: ${row}` + ); + } + + // ユーザーを追加する + await addUser(context, userApi, user, accsessToken); + } catch (e) { + const error = createErrorObject(e); + context.log(error); + // エラーが発生したらエラーコードを控えておく + errors.push({ row: row, error: error.code, name: user.name }); + } + + { + // stage.jsonを更新(ユーザー追加完了) + const updateSuccess = await blobstorageService.updateFile( + context, + IMPORT_USERS_STAGE_FILE_NAME, + JSON.stringify({ + update: getCurrentUnixTime(), + state: IMPORT_USERS_STAGES.COMPLETE, + filename: targetFileName, + row: row, + errors: errors, + }) + ); + if (!updateSuccess) { + throw new Error( + `update stage.json failed. state: ${IMPORT_USERS_STAGES.COMPLETE} filename: ${targetFileName} row: ${row}` + ); + } + } + row++; + + // 500ms待機 + await new Promise((resolve) => setTimeout(resolve, 500)); + } + + // 処理対象のユーザー一覧ファイルを削除する + await blobstorageService.deleteFile(context, targetFileName); + + // システムトークンを発行 + const systemToken = await generateSystemToken(context); + + // 一括登録完了メールを送信する(ODMS Cloudの一括追加完了APIを呼び出す) + await userApi.multipleImportsComplate( + { + accountId: imports.account_id, + filename: imports.file_name, + requestTime: getCurrentUnixTime(), + errors: errors.map((error) => { + return { + name: error.name, + line: error.row, + errorCode: error.error, + }; + }), + }, + { + headers: { authorization: `Bearer ${systemToken}` }, + } + ); + + { + // stage.jsonを更新(処理完了) + const updateSuccess = await blobstorageService.updateFile( + context, + IMPORT_USERS_STAGE_FILE_NAME, + JSON.stringify({ + update: getCurrentUnixTime(), + state: IMPORT_USERS_STAGES.DONE, + }) + ); + if (!updateSuccess) { + throw new Error( + `update stage.json failed. state: ${IMPORT_USERS_STAGES.DONE} filename: ${targetFileName}` + ); + } + } + + // 経過時間を確認して、30分以上経過していたら処理を中断する + { + const currentUnixTime = getCurrentUnixTime(); + // 時間の差分を計算(秒) + const elapsedSec = currentUnixTime - startUnixTime; + + // 30分以上経過していたら処理を中断する + if (elapsedSec > IMPORT_USERS_MAX_DURATION_MINUTES * 60) { + context.log("timeout"); + break; + } + } + } + } catch (e) { + context.log("importUsers failed."); + context.error(e); + throw e; + } finally { + context.log(`[OUT] importUsersProcessing`); + } +} + +export async function importUsers( + myTimer: Timer, + context: InvocationContext +): Promise { + context.log(`[IN] importUsers`); + try { + dotenv.config({ path: ".env" }); + dotenv.config({ path: ".env.local", override: true }); + + const blobstorageService = new BlobstorageService(); + const userApi = new UsersApi( + new Configuration({ + basePath: process.env.BASE_PATH, + }) + ); + + await importUsersProcessing(context, blobstorageService, userApi); + } catch (e) { + context.log("importUsers failed."); + context.error(e); + throw e; + } finally { + context.log(`[OUT] importUsers`); + } +} + +/** + * ODMS CloudのAPIを呼び出してユーザーを追加する + * @param context + * @param user + * @returns user + */ +export async function addUser( + context: InvocationContext, + userApi: UsersApi, + user: ImportData, + token: string +): Promise { + context.log(`[IN] addUser`); + try { + await userApi.signup( + { + email: user.email, + name: user.name, + role: RoleNumberMap[user.role], + autoRenew: user.auto_renew === 1, + notification: user.notification === 1, + authorId: user.author_id, + encryption: user.encryption === 1, + encryptionPassword: user.encryption_password, + prompt: user.prompt === 1, + }, + { + headers: { authorization: `Bearer ${token}` }, + } + ); + } catch (e) { + context.error(e); + throw e; + } finally { + context.log(`[OUT] addUser`); + } +} +/** + * ユーザーのデータが正しいかどうかをチェック + * @param context + * @param user + * @param fileName + * @param row + * @returns true if user + */ +function checkUser( + context: InvocationContext, + user: ImportData, + fileName: string, + row: number +): boolean { + context.log( + `[IN] checkUser | params: { fileName: ${fileName}, row: ${row} }` + ); + try { + // 名前が255文字以内であること + if (user.name.length > 255) { + context.log(`name is too long. fileName: ${fileName}, row: ${row}`); + return false; + } + const emailPattern = + /^[a-zA-Z0-9!#$%&'_`/=~+\-?^{|}.]+@[a-zA-Z0-9!#$%&'_`/=~+\-?^{|}.]*\.[a-zA-Z0-9!#$%&'_`/=~+\-?^{|}.]*[a-zA-Z]$/; + // メールアドレスが255文字以内であること + if (user.email.length > 255) { + context.log(`email is too long. fileName: ${fileName}, row: ${row}`); + return false; + } + if (!emailPattern.test(user.email)) { + context.log(`Invalid email. fileName: ${fileName}, row: ${row}`); + return false; + } + // ロールが(0/1/2)のいずれかであること + if (![0, 1, 2].includes(user.role)) { + context.log(`Invalid role number. fileName: ${fileName}, row: ${row}`); + return false; + } + // ロールがAuthorの場合 + if (user.role === 1) { + // author_idが必須 + if (user.author_id === undefined) { + context.log( + `author_id is required. fileName: ${fileName}, row: ${row}` + ); + return false; + } + // author_idが16文字以内であること + if (user.author_id.length > 16) { + context.log( + `author_id is too long. fileName: ${fileName}, row: ${row}` + ); + return false; + } + // author_idが半角大文字英数字とハイフンであること + if (!/^[A-Z0-9_]*$/.test(user.author_id)) { + context.log(`author_id is invalid. fileName: ${fileName}, row: ${row}`); + return false; + } + // encryptionが必須 + if (user.encryption === undefined) { + context.log( + `encryption is required. fileName: ${fileName}, row: ${row}` + ); + return false; + } + // encryptionが1の場合 + if (user.encryption === 1) { + // encryption_passwordが必須 + if (user.encryption_password === undefined) { + context.log( + `encryption_password is required. fileName: ${fileName}, row: ${row}` + ); + return false; + } + // 4~16文字の半角英数字と記号のみであること + if (!/^[!-~]{4,16}$/.test(user.encryption_password)) { + context.log( + `encryption_password is invalid. fileName: ${fileName}, row: ${row}` + ); + return false; + } + if (user.prompt === undefined) { + context.log(`prompt is required. fileName: ${fileName}, row: ${row}`); + return false; + } + } + } + + return true; + } catch (e) { + context.error(e); + throw e; + } finally { + context.log(`[OUT] checkUser`); + } +} + +/** + * 代行操作用のアクセストークンを生成します + * @param context + * @param externalId + * @returns delegation token + */ +async function generateDelegationAccessToken( + context: InvocationContext, + externalId: string, + role: string +): Promise { + context.log( + `[IN] generateDelegationAccessToken | params: { externalId: ${externalId} }` + ); + try { + // 要求されたトークンの寿命を決定 + const tokenLifetime = Number(process.env.ACCESS_TOKEN_LIFETIME_WEB); + const privateKey = getJwtKey(process.env.JWT_PRIVATE_KEY ?? ""); + + const token = sign( + { + role: `${role} ${ADMIN_ROLES.ADMIN}`, + tier: TIERS.TIER5, + userId: externalId, + delegateUserId: SYSTEM_IMPORT_USERS, + }, + tokenLifetime, + privateKey + ); + + return token; + } catch (e) { + context.error(e); + throw e; + } finally { + context.log(`[OUT] generateDelegationAccessToken`); + } +} +/** + * System用のアクセストークンを生成します + * @param context + * @returns system token + */ +async function generateSystemToken( + context: InvocationContext +): Promise { + context.log(`[IN] generateSystemToken`); + try { + // 要求されたトークンの寿命を決定 + const tokenLifetime = Number(process.env.ACCESS_TOKEN_LIFETIME_WEB); + const privateKey = getJwtKey(process.env.JWT_PRIVATE_KEY ?? ""); + + const token = sign( + { + systemName: SYSTEM_IMPORT_USERS, + }, + tokenLifetime, + privateKey + ); + + return token; + } catch (e) { + context.error(e); + throw e; + } finally { + context.log(`[OUT] generateSystemToken`); + } +} + +const getCurrentUnixTime = () => Math.floor(new Date().getTime() / 1000); + +// 5分毎に実行 +app.timer("importUsers", { + schedule: "0 */5 * * * *", + handler: importUsers, +}); diff --git a/dictation_function/src/test/importUsers.spec.ts b/dictation_function/src/test/importUsers.spec.ts new file mode 100644 index 0000000..9c07fb7 --- /dev/null +++ b/dictation_function/src/test/importUsers.spec.ts @@ -0,0 +1,90 @@ +import * as dotenv from "dotenv"; +import { InvocationContext } from "@azure/functions"; +import { BlobstorageService } from "../blobstorage/blobstorage.service"; +import { importUsersProcessing } from "../functions/importUsers"; +import { + PostMultipleImportsCompleteRequest, + SignupRequest, + UsersApi, +} from "../api/api"; +import { AxiosRequestConfig, AxiosResponse } from "axios"; + +describe("importUsersProcessing", () => { + dotenv.config({ path: ".env" }); + dotenv.config({ path: ".env.local", override: true }); + + it("stage.jsonがない状態でユーザー追加できること", async () => { + const context = new InvocationContext(); + + const userApiMock = new UsersApiMock() as UsersApi; + + // // 呼び出し回数でテスト成否を判定 + const spySignup = jest.spyOn(userApiMock, "signup"); + + const blobService = new BlobstorageService(); + + const mockListBlobs = jest + .fn() + .mockReturnValueOnce(["U_20210101_000000.json"]) + .mockReturnValue([]); + const mockDownloadFileData = jest + .fn() + .mockReturnValueOnce(undefined) + .mockReturnValue( + `{"account_id": 1, "user_id": 1, "external_id": "hoge", "user_role": "none", "file_name": "U_20240216_143802_8001_12211.csv", "date": 1111111, "data": [{"name": "name1","email": "email1@example.com","role": 1,"author_id": "AUTHOR_ID1","auto_renew": 1,"notification": 1,"encryption": 1,"encryption_password": "password","prompt": 1},{"name": "name2","email": "email2@example.com","role": 1,"author_id": "AUTHOR_ID2","auto_renew": 1,"notification": 1,"encryption": 1,"encryption_password": "password","prompt": 1}]}` + ); + const mockUpdateFile = jest.fn().mockReturnValue(true); + const mockDeleteFile = jest.fn().mockReturnValue(undefined); + const mockIsFileExists = jest.fn().mockReturnValueOnce(false); + + blobService.listBlobs = mockListBlobs; + blobService.downloadFileData = mockDownloadFileData; + blobService.updateFile = mockUpdateFile; + blobService.deleteFile = mockDeleteFile; + blobService.isFileExists = mockIsFileExists; + + await importUsersProcessing(context, blobService, userApiMock); + expect(spySignup.mock.calls).toHaveLength(2); + }, 30000); + + it("ファイルがない場合はそのまま終了すること", async () => { + const context = new InvocationContext(); + + const userApiMock = new UsersApiMock() as UsersApi; + + // // 呼び出し回数でテスト成否を判定 + const spySignup = jest.spyOn(userApiMock, "signup"); + + const blobService = new BlobstorageService(); + + const mockListBlobs = jest.fn().mockReturnValue([]); + const mockDownloadFileData = jest.fn().mockReturnValue(""); + const mockUpdateFile = jest.fn().mockReturnValue(undefined); + const mockDeleteFile = jest.fn().mockReturnValue(undefined); + const mockIsFileExists = jest.fn().mockReturnValueOnce(false); + + blobService.listBlobs = mockListBlobs; + blobService.downloadFileData = mockDownloadFileData; + blobService.updateFile = mockUpdateFile; + blobService.deleteFile = mockDeleteFile; + blobService.isFileExists = mockIsFileExists; + + await importUsersProcessing(context, blobService, userApiMock); + expect(spySignup.mock.calls).toHaveLength(0); + }, 30000); +}); + +export class UsersApiMock extends UsersApi { + async signup( + ignupRequest: SignupRequest, + options?: AxiosRequestConfig + ): Promise> { + return { data: {}, status: 200, statusText: "", headers: {}, config: {} }; + } + async multipleImportsComplate( + postMultipleImportsCompleteRequest: PostMultipleImportsCompleteRequest, + options?: AxiosRequestConfig + ): Promise> { + return { data: {}, status: 200, statusText: "", headers: {}, config: {} }; + } +} diff --git a/dictation_server/src/api/odms/openapi.json b/dictation_server/src/api/odms/openapi.json index 38b804a..c279e1f 100644 --- a/dictation_server/src/api/odms/openapi.json +++ b/dictation_server/src/api/odms/openapi.json @@ -1636,7 +1636,7 @@ } }, "400": { - "description": "パラメータ不正/アカウント不在", + "description": "パラメータ不正", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -2267,6 +2267,118 @@ "security": [{ "bearer": [] }] } }, + "/users/multiple-imports": { + "post": { + "operationId": "multipleImports", + "summary": "", + "description": "ユーザーを一括登録します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, + "/users/multiple-imports/complete": { + "post": { + "operationId": "multipleImportsComplate", + "summary": "", + "description": "ユーザー一括登録の完了を通知します", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsCompleteRequest" + } + } + } + }, + "responses": { + "200": { + "description": "成功時のレスポンス", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostMultipleImportsCompleteResponse" + } + } + } + }, + "400": { + "description": "不正なパラメータ", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "401": { + "description": "認証エラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + }, + "500": { + "description": "想定外のサーバーエラー", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ErrorResponse" } + } + } + } + }, + "tags": ["users"], + "security": [{ "bearer": [] }] + } + }, "/files/audio/upload-finished": { "post": { "operationId": "uploadFinished", @@ -4676,6 +4788,68 @@ "required": ["userId"] }, "PostDeleteUserResponse": { "type": "object", "properties": {} }, + "MultipleImportUser": { + "type": "object", + "properties": { + "name": { "type": "string", "description": "ユーザー名" }, + "email": { "type": "string", "description": "メールアドレス" }, + "role": { + "type": "number", + "description": "0(none)/1(author)/2(typist)" + }, + "authorId": { "type": "string" }, + "autoRenew": { "type": "number", "description": "0(false)/1(true)" }, + "notification": { + "type": "number", + "description": "0(false)/1(true)" + }, + "encryption": { "type": "number", "description": "0(false)/1(true)" }, + "encryptionPassword": { "type": "string" }, + "prompt": { "type": "number", "description": "0(false)/1(true)" } + }, + "required": ["name", "email", "role", "autoRenew", "notification"] + }, + "PostMultipleImportsRequest": { + "type": "object", + "properties": { + "filename": { "type": "string", "description": "CSVファイル名" }, + "users": { + "type": "array", + "items": { "$ref": "#/components/schemas/MultipleImportUser" } + } + }, + "required": ["filename", "users"] + }, + "PostMultipleImportsResponse": { "type": "object", "properties": {} }, + "MultipleImportErrors": { + "type": "object", + "properties": { + "name": { "type": "string", "description": "ユーザー名" }, + "line": { "type": "number", "description": "エラー発生行数" }, + "errorCode": { "type": "string", "description": "エラーコード" } + }, + "required": ["name", "line", "errorCode"] + }, + "PostMultipleImportsCompleteRequest": { + "type": "object", + "properties": { + "accountId": { "type": "number", "description": "アカウントID" }, + "filename": { "type": "string", "description": "CSVファイル名" }, + "requestTime": { + "type": "number", + "description": "一括登録受付時刻(UNIXTIME/ミリ秒)" + }, + "errors": { + "type": "array", + "items": { "$ref": "#/components/schemas/MultipleImportErrors" } + } + }, + "required": ["accountId", "filename", "requestTime", "errors"] + }, + "PostMultipleImportsCompleteResponse": { + "type": "object", + "properties": {} + }, "AudioOptionItem": { "type": "object", "properties": {