diff --git a/.eslintrc.cjs b/.eslintrc.cjs index cae810fc8c004ce63c2aea8d802de6ba007a5408..e82f792e89638d0a37d47d094e261ef1af6ee4a6 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -3,7 +3,7 @@ require("@rushstack/eslint-patch/modern-module-resolution"); module.exports = { root: true, - ignorePatterns: ["src/util/filesaver.js", "src/util/nql/*", "src/views/ParseView.vue"], + ignorePatterns: ["src/util/filesaver.js", "src/util/nql/*", "src/views/ParseView.vue", "*.gen.ts"], extends: [ "plugin:vue/vue3-essential", "@vue/eslint-config-typescript/recommended", @@ -35,16 +35,18 @@ module.exports = { // }, // allowChildren: false, // }], - "object-curly-newline": [ - "error", - { - ObjectPattern: "never", - }, - ], + "object-curly-newline": "off", + // "object-curly-newline": [ + // "error", + // { + // ObjectPattern: "never", + // }, + // ], "class-methods-use-this": "off", "prefer-promise-reject-errors": "off", "vuejs-accessibility/click-events-have-key-events": "off", "vue/no-mutating-props": "off", + "@typescript-eslint/no-explicit-any": "off", "operator-linebreak": [ "error", "after", // this is horrible, but prettier is refused to do before diff --git a/README.md b/README.md index 06336ae8518bda56d058557b23356f889fed9d75..d599dc28e1339272a09a703fd3ecdf12758cdd59 100644 --- a/README.md +++ b/README.md @@ -17,19 +17,10 @@ npm install ### Update API clients When changes were made to the API(s), the respective client(s) need to be adapted via ``` -# update code in src/plugins/api/api-core for NACSOS Core FastAPI endpoint -npm run api-core -# update code in src/plugins/api/api-pipe for NACSOS Pipelines FastAPI endpoint -npm run api-pipe +# update code in src/plugins/api/spec for NACSOS backend +npm run api ``` -This operation assumes that you have [*openapi-typescript-codegen*](https://www.npmjs.com/package/openapi-typescript-codegen) installed. -Note, that the "official" version is does not expose a way to set `AxiosRequestConfig` by the caller. -Hence, we need an adapted version of the project, which is hosted [in our GitLab](https://gitlab.pik-potsdam.de/mcc-apsis/nacsos/openapi-typescript-codegen). -The most recent build should be committed to this repository in `tools/openapi-gen/`. - -We should probably clean up this change and submit a PR to the original maintainer. - ### Update NQL Grammar The grammar should be kept up-to-date with that used in the backend. Unfortunately, there are slight differences in the grammar for the grammar, so this has to be done manually. diff --git a/package-lock.json b/package-lock.json index 1be1e3b63acc9e449d1ddf0d058fd701682aaab1..a5e1ed58cb246f5d2faffa94321b60a81fe7e441 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,68 +1,73 @@ { "name": "nacsos-web", - "version": "0.11.2", + "version": "0.15.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nacsos-web", - "version": "0.11.2", + "version": "0.15.0", "dependencies": { - "@fortawesome/fontawesome-svg-core": "^6.5.1", - "@fortawesome/free-brands-svg-icons": "^6.5.1", - "@fortawesome/free-regular-svg-icons": "^6.5.1", - "@fortawesome/free-solid-svg-icons": "^6.5.1", + "@fortawesome/fontawesome-svg-core": "^6.5.2", + "@fortawesome/free-brands-svg-icons": "^6.5.2", + "@fortawesome/free-regular-svg-icons": "^6.5.2", + "@fortawesome/free-solid-svg-icons": "^6.5.2", "@fortawesome/vue-fontawesome": "^3.0.6", - "@vueform/multiselect": "^2.6.6", + "@vueform/multiselect": "^2.6.7", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", - "@vueuse/core": "^10.8.0", - "axios": "^1.6.7", + "@vueuse/core": "^10.9.0", + "axios": "^1.6.8", "bootstrap": "^5.3.3", - "bootstrap-vue-next": "^0.16.1", - "chart.js": "^4.4.1", - "core-js": "^3.36.0", + "bootstrap-vue-next": "^0.17.1", + "chart.js": "^4.4.2", + "core-js": "^3.37.0", "form-data": "^4.0.0", - "marked": "^9.1.0", + "marked": "^12.0.2", "nearley": "^2.20.1", "pinia": "^2.1.7", - "sass": "^1.70.0", - "vega": "^5.27.0", - "vega-embed": "^6.24.0", - "vue": "^3.4.19", - "vue-chartjs": "^5.3.0", - "vue-router": "^4.3.0" + "sass": "^1.75.0", + "vega": "^5.28.0", + "vega-embed": "^6.25.0", + "vue": "^3.4.23", + "vue-chartjs": "^5.3.1", + "vue-router": "^4.3.2" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.7.2", + "@apidevtools/json-schema-ref-parser": "11.5.5", + "@rushstack/eslint-patch": "^1.10.2", + "@types/cross-spawn": "^6.0.6", "@types/jsdom": "^21.1.6", "@types/nearley": "^2.11.5", - "@types/node": "^20.11.16", + "@types/node": "^20.12.7", "@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue-jsx": "^3.1.0", "@vue/eslint-config-airbnb-with-typescript": "^8.0.0", "@vue/eslint-config-prettier": "^9.0.0", - "@vue/eslint-config-typescript": "^12.0.0", - "@vue/test-utils": "^2.4.4", + "@vue/eslint-config-typescript": "^13.0.0", + "@vue/test-utils": "^2.4.5", "@vue/tsconfig": "^0.5.1", - "camelcase": "^6.3.0", - "commander": "^11.0.0", + "c12": "1.10.0", + "camelcase": "^8.0.0", + "commander": "^12.0.0", + "cross-spawn": "7.0.3", "eslint": "^8.56.0", "eslint-import-resolver-node": "^0.3.9", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-vue": "^9.22.0", - "eslint-plugin-vuejs-accessibility": "^2.2.1", + "eslint-plugin-vue": "^9.25.0", + "eslint-plugin-vuejs-accessibility": "^2.3.0", "fs-extra": "^11.2.0", "handlebars": "^4.7.8", "jsdom": "^24.0.0", "json-schema-ref-parser": "^9.0.9", - "npm-check-updates": "16.14.14", + "npm-check-updates": "16.14.18", "npm-run-all": "^4.1.5", "prettier": "^3.2.5", - "typescript": "^5.3.3", - "vite": "^5.1.4", - "vitest": "^1.3.1", - "vue-tsc": "^1.8.27" + "tsx": "^4.7.2", + "typescript": "^5.4.5", + "vite": "^5.2.9", + "vitest": "^1.5.0", + "vue-tsc": "^2.0.13" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -88,15 +93,20 @@ } }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", - "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "version": "11.5.5", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.5.5.tgz", + "integrity": "sha512-hv/aXDILyroHioVW27etFMV+IX6FyNn41YwbeGIAt5h/7fUTQvHI5w3ols8qYAT8aQt3kzexq5ZwxFDxNHIhdQ==", "dev": true, "dependencies": { "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", + "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" } }, "node_modules/@babel/code-frame": { @@ -451,9 +461,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", - "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "version": "7.24.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz", + "integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==", "bin": { "parser": "bin/babel-parser.js" }, @@ -580,10 +590,26 @@ "node": ">=0.1.90" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", + "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/android-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.8.tgz", - "integrity": "sha512-31E2lxlGM1KEfivQl8Yf5aYU/mflz9g06H6S15ITUFQueMFtFjESRMoDSkvMo8thYvLBax+VKTPlpnx+sPicOA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz", + "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", "cpu": [ "arm" ], @@ -597,9 +623,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.8.tgz", - "integrity": "sha512-B8JbS61bEunhfx8kasogFENgQfr/dIp+ggYXwTqdbMAgGDhRa3AaPpQMuQU0rNxDLECj6FhDzk1cF9WHMVwrtA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", + "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", "cpu": [ "arm64" ], @@ -613,9 +639,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.8.tgz", - "integrity": "sha512-rdqqYfRIn4jWOp+lzQttYMa2Xar3OK9Yt2fhOhzFXqg0rVWEfSclJvZq5fZslnz6ypHvVf3CT7qyf0A5pM682A==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz", + "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", "cpu": [ "x64" ], @@ -629,9 +655,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.8.tgz", - "integrity": "sha512-RQw9DemMbIq35Bprbboyf8SmOr4UXsRVxJ97LgB55VKKeJOOdvsIPy0nFyF2l8U+h4PtBx/1kRf0BelOYCiQcw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", + "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", "cpu": [ "arm64" ], @@ -645,9 +671,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.8.tgz", - "integrity": "sha512-3sur80OT9YdeZwIVgERAysAbwncom7b4bCI2XKLjMfPymTud7e/oY4y+ci1XVp5TfQp/bppn7xLw1n/oSQY3/Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", + "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", "cpu": [ "x64" ], @@ -661,9 +687,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.8.tgz", - "integrity": "sha512-WAnPJSDattvS/XtPCTj1tPoTxERjcTpH6HsMr6ujTT+X6rylVe8ggxk8pVxzf5U1wh5sPODpawNicF5ta/9Tmw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", + "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", "cpu": [ "arm64" ], @@ -677,9 +703,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.8.tgz", - "integrity": "sha512-ICvZyOplIjmmhjd6mxi+zxSdpPTKFfyPPQMQTK/w+8eNK6WV01AjIztJALDtwNNfFhfZLux0tZLC+U9nSyA5Zg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", + "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", "cpu": [ "x64" ], @@ -693,9 +719,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.8.tgz", - "integrity": "sha512-H4vmI5PYqSvosPaTJuEppU9oz1dq2A7Mr2vyg5TF9Ga+3+MGgBdGzcyBP7qK9MrwFQZlvNyJrvz6GuCaj3OukQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", + "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", "cpu": [ "arm" ], @@ -709,9 +735,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.8.tgz", - "integrity": "sha512-z1zMZivxDLHWnyGOctT9JP70h0beY54xDDDJt4VpTX+iwA77IFsE1vCXWmprajJGa+ZYSqkSbRQ4eyLCpCmiCQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", + "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", "cpu": [ "arm64" ], @@ -725,9 +751,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.8.tgz", - "integrity": "sha512-1a8suQiFJmZz1khm/rDglOc8lavtzEMRo0v6WhPgxkrjcU0LkHj+TwBrALwoz/OtMExvsqbbMI0ChyelKabSvQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", + "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", "cpu": [ "ia32" ], @@ -741,9 +767,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.8.tgz", - "integrity": "sha512-fHZWS2JJxnXt1uYJsDv9+b60WCc2RlvVAy1F76qOLtXRO+H4mjt3Tr6MJ5l7Q78X8KgCFudnTuiQRBhULUyBKQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", + "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", "cpu": [ "loong64" ], @@ -757,9 +783,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.8.tgz", - "integrity": "sha512-Wy/z0EL5qZYLX66dVnEg9riiwls5IYnziwuju2oUiuxVc+/edvqXa04qNtbrs0Ukatg5HEzqT94Zs7J207dN5Q==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", + "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", "cpu": [ "mips64el" ], @@ -773,9 +799,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.8.tgz", - "integrity": "sha512-ETaW6245wK23YIEufhMQ3HSeHO7NgsLx8gygBVldRHKhOlD1oNeNy/P67mIh1zPn2Hr2HLieQrt6tWrVwuqrxg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", + "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", "cpu": [ "ppc64" ], @@ -789,9 +815,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.8.tgz", - "integrity": "sha512-T2DRQk55SgoleTP+DtPlMrxi/5r9AeFgkhkZ/B0ap99zmxtxdOixOMI570VjdRCs9pE4Wdkz7JYrsPvsl7eESg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", + "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", "cpu": [ "riscv64" ], @@ -805,9 +831,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.8.tgz", - "integrity": "sha512-NPxbdmmo3Bk7mbNeHmcCd7R7fptJaczPYBaELk6NcXxy7HLNyWwCyDJ/Xx+/YcNH7Im5dHdx9gZ5xIwyliQCbg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", + "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", "cpu": [ "s390x" ], @@ -821,9 +847,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.8.tgz", - "integrity": "sha512-lytMAVOM3b1gPypL2TRmZ5rnXl7+6IIk8uB3eLsV1JwcizuolblXRrc5ShPrO9ls/b+RTp+E6gbsuLWHWi2zGg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", + "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", "cpu": [ "x64" ], @@ -837,9 +863,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.8.tgz", - "integrity": "sha512-hvWVo2VsXz/8NVt1UhLzxwAfo5sioj92uo0bCfLibB0xlOmimU/DeAEsQILlBQvkhrGjamP0/el5HU76HAitGw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", + "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", "cpu": [ "x64" ], @@ -853,9 +879,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.8.tgz", - "integrity": "sha512-/7Y7u77rdvmGTxR83PgaSvSBJCC2L3Kb1M/+dmSIvRvQPXXCuC97QAwMugBNG0yGcbEGfFBH7ojPzAOxfGNkwQ==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", + "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", "cpu": [ "x64" ], @@ -869,9 +895,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.8.tgz", - "integrity": "sha512-9Lc4s7Oi98GqFA4HzA/W2JHIYfnXbUYgekUP/Sm4BG9sfLjyv6GKKHKKVs83SMicBF2JwAX6A1PuOLMqpD001w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", + "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", "cpu": [ "x64" ], @@ -885,9 +911,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.8.tgz", - "integrity": "sha512-rq6WzBGjSzihI9deW3fC2Gqiak68+b7qo5/3kmB6Gvbh/NYPA0sJhrnp7wgV4bNwjqM+R2AApXGxMO7ZoGhIJg==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", + "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", "cpu": [ "arm64" ], @@ -901,9 +927,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.8.tgz", - "integrity": "sha512-AIAbverbg5jMvJznYiGhrd3sumfwWs8572mIJL5NQjJa06P8KfCPWZQ0NwZbPQnbQi9OWSZhFVSUWjjIrn4hSw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", + "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", "cpu": [ "ia32" ], @@ -917,9 +943,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.8.tgz", - "integrity": "sha512-bfZ0cQ1uZs2PqpulNL5j/3w+GDhP36k1K5c38QdQg+Swy51jFZWWeIkteNsufkQxp986wnqRRsb/bHbY1WQ7TA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", + "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", "cpu": [ "x64" ], @@ -948,9 +974,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.2.tgz", - "integrity": "sha512-0MGxAVt1m/ZK+LTJp/j0qF7Hz97D9O/FH9Ms3ltnyIdDD57cbb1ACIQTkbHvNXtWDv5TPq7w5Kq56+cNukbo7g==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -1073,57 +1099,57 @@ } }, "node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.5.1.tgz", - "integrity": "sha512-GkWzv+L6d2bI5f/Vk6ikJ9xtl7dfXtoRu3YGE6nq0p/FFqA1ebMOAWg3XgRyb0I6LYyYkiAo+3/KrwuBp8xG7A==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.5.2.tgz", + "integrity": "sha512-gBxPg3aVO6J0kpfHNILc+NMhXnqHumFxOmjYCFfOiLZfwhnnfhtsdA2hfJlDnj+8PjAs6kKQPenOTKj3Rf7zHw==", "hasInstallScript": true, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.5.1.tgz", - "integrity": "sha512-MfRCYlQPXoLlpem+egxjfkEuP9UQswTrlCOsknus/NcMoblTH2g0jPrapbcIb04KGA7E2GZxbAccGZfWoYgsrQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.5.2.tgz", + "integrity": "sha512-5CdaCBGl8Rh9ohNdxeeTMxIj8oc3KNBgIeLMvJosBMdslK/UnEB8rzyDRrbKdL1kDweqBPo4GT9wvnakHWucZw==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "6.5.1" + "@fortawesome/fontawesome-common-types": "6.5.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-brands-svg-icons": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.5.1.tgz", - "integrity": "sha512-093l7DAkx0aEtBq66Sf19MgoZewv1zeY9/4C7vSKPO4qMwEsW/2VYTUTpBtLwfb9T2R73tXaRDPmE4UqLCYHfg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.5.2.tgz", + "integrity": "sha512-zi5FNYdmKLnEc0jc0uuHH17kz/hfYTg4Uei0wMGzcoCL/4d3WM3u1VMc0iGGa31HuhV5i7ZK8ZlTCQrHqRHSGQ==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "6.5.1" + "@fortawesome/fontawesome-common-types": "6.5.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-regular-svg-icons": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.5.1.tgz", - "integrity": "sha512-m6ShXn+wvqEU69wSP84coxLbNl7sGVZb+Ca+XZq6k30SzuP3X4TfPqtycgUh9ASwlNh5OfQCd8pDIWxl+O+LlQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-6.5.2.tgz", + "integrity": "sha512-iabw/f5f8Uy2nTRtJ13XZTS1O5+t+anvlamJ3zJGLEVE2pKsAWhPv2lq01uQlfgCX7VaveT3EVs515cCN9jRbw==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "6.5.1" + "@fortawesome/fontawesome-common-types": "6.5.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.5.1.tgz", - "integrity": "sha512-S1PPfU3mIJa59biTtXJz1oI0+KAXW6bkAb31XKhxdxtuXDiUIFsih4JR1v5BbxY7hVHsD1RKq+jRkVRaf773NQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.5.2.tgz", + "integrity": "sha512-QWFZYXFE7O1Gr1dTIp+D6UcFUF0qElOnZptpi7PBUMylJh+vFmIedVe1Ir6RM1t2tEQLLSV1k7bR4o92M+uqlw==", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-common-types": "6.5.1" + "@fortawesome/fontawesome-common-types": "6.5.2" }, "engines": { "node": ">=6" @@ -1569,9 +1595,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.6.1.tgz", - "integrity": "sha512-0WQ0ouLejaUCRsL93GD4uft3rOmB8qoQMU05Kb8CmMtMBe7XUDLAltxVZI1q6byNqEtU7N1ZX1Vw5lIpgulLQA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.3.tgz", + "integrity": "sha512-X9alQ3XM6I9IlSlmC8ddAvMSyG1WuHk5oUnXGw+yUBs3BFoTizmG1La/Gr8fVJvDWAq+zlYTZ9DBgrlKRVY06g==", "cpu": [ "arm" ], @@ -1582,9 +1608,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.6.1.tgz", - "integrity": "sha512-1TKm25Rn20vr5aTGGZqo6E4mzPicCUD79k17EgTLAsXc1zysyi4xXKACfUbwyANEPAEIxkzwue6JZ+stYzWUTA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.3.tgz", + "integrity": "sha512-eQK5JIi+POhFpzk+LnjKIy4Ks+pwJ+NXmPxOCSvOKSNRPONzKuUvWE+P9JxGZVxrtzm6BAYMaL50FFuPe0oWMQ==", "cpu": [ "arm64" ], @@ -1595,9 +1621,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.6.1.tgz", - "integrity": "sha512-cEXJQY/ZqMACb+nxzDeX9IPLAg7S94xouJJCNVE5BJM8JUEP4HeTF+ti3cmxWeSJo+5D+o8Tc0UAWUkfENdeyw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.3.tgz", + "integrity": "sha512-Od4vE6f6CTT53yM1jgcLqNfItTsLt5zE46fdPaEmeFHvPs5SjZYlLpHrSiHEKR1+HdRfxuzXHjDOIxQyC3ptBA==", "cpu": [ "arm64" ], @@ -1608,9 +1634,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.6.1.tgz", - "integrity": "sha512-LoSU9Xu56isrkV2jLldcKspJ7sSXmZWkAxg7sW/RfF7GS4F5/v4EiqKSMCFbZtDu2Nc1gxxFdQdKwkKS4rwxNg==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.3.tgz", + "integrity": "sha512-0IMAO21axJeNIrvS9lSe/PGthc8ZUS+zC53O0VhF5gMxfmcKAP4ESkKOCwEi6u2asUrt4mQv2rjY8QseIEb1aw==", "cpu": [ "x64" ], @@ -1621,9 +1647,22 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.6.1.tgz", - "integrity": "sha512-EfI3hzYAy5vFNDqpXsNxXcgRDcFHUWSx5nnRSCKwXuQlI5J9dD84g2Usw81n3FLBNsGCegKGwwTVsSKK9cooSQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.3.tgz", + "integrity": "sha512-ge2DC7tHRHa3caVEoSbPRJpq7azhG+xYsd6u2MEnJ6XzPSzQsTKyXvh6iWjXRf7Rt9ykIUWHtl0Uz3T6yXPpKw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.14.3.tgz", + "integrity": "sha512-ljcuiDI4V3ySuc7eSk4lQ9wU8J8r8KrOUvB2U+TtK0TiW6OFDmJ+DdIjjwZHIw9CNxzbmXY39wwpzYuFDwNXuw==", "cpu": [ "arm" ], @@ -1634,9 +1673,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.6.1.tgz", - "integrity": "sha512-9lhc4UZstsegbNLhH0Zu6TqvDfmhGzuCWtcTFXY10VjLLUe4Mr0Ye2L3rrtHaDd/J5+tFMEuo5LTCSCMXWfUKw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.3.tgz", + "integrity": "sha512-Eci2us9VTHm1eSyn5/eEpaC7eP/mp5n46gTRB3Aar3BgSvDQGJZuicyq6TsH4HngNBgVqC5sDYxOzTExSU+NjA==", "cpu": [ "arm64" ], @@ -1647,9 +1686,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.6.1.tgz", - "integrity": "sha512-FfoOK1yP5ksX3wwZ4Zk1NgyGHZyuRhf99j64I5oEmirV8EFT7+OhUZEnP+x17lcP/QHJNWGsoJwrz4PJ9fBEXw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.3.tgz", + "integrity": "sha512-UrBoMLCq4E92/LCqlh+blpqMz5h1tJttPIniwUgOFJyjWI1qrtrDhhpHPuFxULlUmjFHfloWdixtDhSxJt5iKw==", "cpu": [ "arm64" ], @@ -1659,10 +1698,49 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.3.tgz", + "integrity": "sha512-5aRjvsS8q1nWN8AoRfrq5+9IflC3P1leMoy4r2WjXyFqf3qcqsxRCfxtZIV58tCxd+Yv7WELPcO9mY9aeQyAmw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.3.tgz", + "integrity": "sha512-sk/Qh1j2/RJSX7FhEpJn8n0ndxy/uf0kI/9Zc4b1ELhqULVdTfN6HL31CDaTChiBAOgLcsJ1sgVZjWv8XNEsAQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.3.tgz", + "integrity": "sha512-jOO/PEaDitOmY9TgkxF/TQIjXySQe5KVYB57H/8LRP/ux0ZoO8cSHCX17asMSv3ruwslXW/TLBcxyaUzGRHcqg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.6.1.tgz", - "integrity": "sha512-DNGZvZDO5YF7jN5fX8ZqmGLjZEXIJRdJEdTFMhiyXqyXubBa0WVLDWSNlQ5JR2PNgDbEV1VQowhVRUh+74D+RA==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.3.tgz", + "integrity": "sha512-8ybV4Xjy59xLMyWo3GCfEGqtKV5M5gCSrZlxkPGvEPCGDLNla7v48S662HSGwRd6/2cSneMQWiv+QzcttLrrOA==", "cpu": [ "x64" ], @@ -1673,9 +1751,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.6.1.tgz", - "integrity": "sha512-RkJVNVRM+piYy87HrKmhbexCHg3A6Z6MU0W9GHnJwBQNBeyhCJG9KDce4SAMdicQnpURggSvtbGo9xAWOfSvIQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.3.tgz", + "integrity": "sha512-s+xf1I46trOY10OqAtZ5Rm6lzHre/UiLA1J2uOhCFXWkbZrJRkYBPO6FhvGfHmdtQ3Bx793MNa7LvoWFAm93bg==", "cpu": [ "x64" ], @@ -1686,9 +1764,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.6.1.tgz", - "integrity": "sha512-v2FVT6xfnnmTe3W9bJXl6r5KwJglMK/iRlkKiIFfO6ysKs0rDgz7Cwwf3tjldxQUrHL9INT/1r4VA0n9L/F1vQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.3.tgz", + "integrity": "sha512-+4h2WrGOYsOumDQ5S2sYNyhVfrue+9tc9XcLWLh+Kw3UOxAvrfOrSMFon60KspcDdytkNDh7K2Vs6eMaYImAZg==", "cpu": [ "arm64" ], @@ -1699,9 +1777,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.6.1.tgz", - "integrity": "sha512-YEeOjxRyEjqcWphH9dyLbzgkF8wZSKAKUkldRY6dgNR5oKs2LZazqGB41cWJ4Iqqcy9/zqYgmzBkRoVz3Q9MLw==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.3.tgz", + "integrity": "sha512-T1l7y/bCeL/kUwh9OD4PQT4aM7Bq43vX05htPJJ46RTI4r5KNt6qJRzAfNfM+OYMNEVBWQzR2Gyk+FXLZfogGw==", "cpu": [ "ia32" ], @@ -1712,9 +1790,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.6.1.tgz", - "integrity": "sha512-0zfTlFAIhgz8V2G8STq8toAjsYYA6eci1hnXuyOTUFnymrtJwnS6uGKiv3v5UrPZkBlamLvrLV2iiaeqCKzb0A==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.3.tgz", + "integrity": "sha512-/BypzV0H1y1HzgYpxqRaXGBRqfodgoBBCcsrujT6QRcakDQdfU+Lq9PENPh5jB4I44YWq+0C2eHsHya+nZY1sA==", "cpu": [ "x64" ], @@ -1725,9 +1803,9 @@ ] }, "node_modules/@rushstack/eslint-patch": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.7.2.tgz", - "integrity": "sha512-RbhOOTCNoCrbfkRyoXODZp75MlpiHMgbE5MEBZAnnnLyQNgrigEj4p0lzsMDyc1zVsJDLrivB58tgg3emX0eEA==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.10.2.tgz", + "integrity": "sha512-hw437iINopmQuxWPSUEvqE56NCPsiU8N4AYtfHmJFckclktzK9YQJieD3XkDCDH4OjL+C7zgPUh73R/nrcHrqw==", "dev": true }, "node_modules/@sigstore/bundle": { @@ -1863,10 +1941,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/@types/cross-spawn": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/@types/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/estree": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", - "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, "node_modules/@types/geojson": { "version": "7946.0.4", @@ -1891,9 +1978,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", - "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/json5": { @@ -1909,18 +1996,24 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", - "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", + "version": "20.12.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", + "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "node_modules/@types/semver-utils": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/semver-utils/-/semver-utils-1.1.3.tgz", + "integrity": "sha512-T+YwkslhsM+CeuhYUxyAjWm7mJ5am/K10UX40RuA6k6Lc7eGtq8iY2xOzy7Vq0GOqhl/xZl5l2FwURZMTPTUww==", "dev": true }, "node_modules/@types/tough-cookie": { @@ -2186,13 +2279,13 @@ } }, "node_modules/@vitest/expect": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.3.1.tgz", - "integrity": "sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.5.0.tgz", + "integrity": "sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==", "dev": true, "dependencies": { - "@vitest/spy": "1.3.1", - "@vitest/utils": "1.3.1", + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", "chai": "^4.3.10" }, "funding": { @@ -2200,12 +2293,12 @@ } }, "node_modules/@vitest/runner": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.3.1.tgz", - "integrity": "sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-1.5.0.tgz", + "integrity": "sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==", "dev": true, "dependencies": { - "@vitest/utils": "1.3.1", + "@vitest/utils": "1.5.0", "p-limit": "^5.0.0", "pathe": "^1.1.1" }, @@ -2241,9 +2334,9 @@ } }, "node_modules/@vitest/snapshot": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.3.1.tgz", - "integrity": "sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.5.0.tgz", + "integrity": "sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==", "dev": true, "dependencies": { "magic-string": "^0.30.5", @@ -2255,9 +2348,9 @@ } }, "node_modules/@vitest/spy": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.3.1.tgz", - "integrity": "sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-1.5.0.tgz", + "integrity": "sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==", "dev": true, "dependencies": { "tinyspy": "^2.2.0" @@ -2267,9 +2360,9 @@ } }, "node_modules/@vitest/utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.3.1.tgz", - "integrity": "sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-1.5.0.tgz", + "integrity": "sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==", "dev": true, "dependencies": { "diff-sequences": "^29.6.3", @@ -2291,30 +2384,30 @@ } }, "node_modules/@volar/language-core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.11.1.tgz", - "integrity": "sha512-dOcNn3i9GgZAcJt43wuaEykSluAuOkQgzni1cuxLxTV0nJKanQztp7FxyswdRILaKH+P2XZMPRp2S4MV/pElCw==", + "version": "2.2.0-alpha.8", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.2.0-alpha.8.tgz", + "integrity": "sha512-Ew1Iw7/RIRNuDLn60fWJdOLApAlfTVPxbPiSLzc434PReC9kleYtaa//Wo2WlN1oiRqneW0pWQQV0CwYqaimLQ==", "dev": true, "dependencies": { - "@volar/source-map": "1.11.1" + "@volar/source-map": "2.2.0-alpha.8" } }, "node_modules/@volar/source-map": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-1.11.1.tgz", - "integrity": "sha512-hJnOnwZ4+WT5iupLRnuzbULZ42L7BWWPMmruzwtLhJfpDVoZLjNBxHDi2sY2bgZXCKlpU5XcsMFoYrsQmPhfZg==", + "version": "2.2.0-alpha.8", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.2.0-alpha.8.tgz", + "integrity": "sha512-E1ZVmXFJ5DU4fWDcWHzi8OLqqReqIDwhXvIMhVdk6+VipfMVv4SkryXu7/rs4GA/GsebcRyJdaSkKBB3OAkIcA==", "dev": true, "dependencies": { - "muggle-string": "^0.3.1" + "muggle-string": "^0.4.0" } }, "node_modules/@volar/typescript": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-1.11.1.tgz", - "integrity": "sha512-iU+t2mas/4lYierSnoFOeRFQUhAEMgsFuQxoxvwn5EdQopw43j+J27a4lt9LMInx1gLJBC6qL14WYGlgymaSMQ==", + "version": "2.2.0-alpha.8", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.2.0-alpha.8.tgz", + "integrity": "sha512-RLbRDI+17CiayHZs9HhSzlH0FhLl/+XK6o2qoiw2o2GGKcyD1aDoY6AcMd44acYncTOrqoTNoY6LuCiRyiJiGg==", "dev": true, "dependencies": { - "@volar/language-core": "1.11.1", + "@volar/language-core": "2.2.0-alpha.8", "path-browserify": "^1.0.1" } }, @@ -2344,50 +2437,62 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@vue/babel-plugin-jsx/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@vue/compiler-core": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.19.tgz", - "integrity": "sha512-gj81785z0JNzRcU0Mq98E56e4ltO1yf8k5PQ+tV/7YHnbZkrM0fyFyuttnN8ngJZjbpofWE/m4qjKBiLl8Ju4w==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.23.tgz", + "integrity": "sha512-HAFmuVEwNqNdmk+w4VCQ2pkLk1Vw4XYiiyxEp3z/xvl14aLTUBw2OfVH3vBcx+FtGsynQLkkhK410Nah1N2yyQ==", "dependencies": { - "@babel/parser": "^7.23.9", - "@vue/shared": "3.4.19", + "@babel/parser": "^7.24.1", + "@vue/shared": "3.4.23", "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.19.tgz", - "integrity": "sha512-vm6+cogWrshjqEHTzIDCp72DKtea8Ry/QVpQRYoyTIg9k7QZDX6D8+HGURjtmatfgM8xgCFtJJaOlCaRYRK3QA==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.23.tgz", + "integrity": "sha512-t0b9WSTnCRrzsBGrDd1LNR5HGzYTr7LX3z6nNBG+KGvZLqrT0mY6NsMzOqlVMBKKXKVuusbbB5aOOFgTY+senw==", "dependencies": { - "@vue/compiler-core": "3.4.19", - "@vue/shared": "3.4.19" + "@vue/compiler-core": "3.4.23", + "@vue/shared": "3.4.23" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.19.tgz", - "integrity": "sha512-LQ3U4SN0DlvV0xhr1lUsgLCYlwQfUfetyPxkKYu7dkfvx7g3ojrGAkw0AERLOKYXuAGnqFsEuytkdcComei3Yg==", - "dependencies": { - "@babel/parser": "^7.23.9", - "@vue/compiler-core": "3.4.19", - "@vue/compiler-dom": "3.4.19", - "@vue/compiler-ssr": "3.4.19", - "@vue/shared": "3.4.19", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.23.tgz", + "integrity": "sha512-fSDTKTfzaRX1kNAUiaj8JB4AokikzStWgHooMhaxyjZerw624L+IAP/fvI4ZwMpwIh8f08PVzEnu4rg8/Npssw==", + "dependencies": { + "@babel/parser": "^7.24.1", + "@vue/compiler-core": "3.4.23", + "@vue/compiler-dom": "3.4.23", + "@vue/compiler-ssr": "3.4.23", + "@vue/shared": "3.4.23", "estree-walker": "^2.0.2", - "magic-string": "^0.30.6", - "postcss": "^8.4.33", - "source-map-js": "^1.0.2" + "magic-string": "^0.30.8", + "postcss": "^8.4.38", + "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.19.tgz", - "integrity": "sha512-P0PLKC4+u4OMJ8sinba/5Z/iDT84uMRRlrWzadgLA69opCpI1gG4N55qDSC+dedwq2fJtzmGald05LWR5TFfLw==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.23.tgz", + "integrity": "sha512-hb6Uj2cYs+tfqz71Wj6h3E5t6OKvb4MVcM2Nl5i/z1nv1gjEhw+zYaNOV+Xwn+SSN/VZM0DgANw5TuJfxfezPg==", "dependencies": { - "@vue/compiler-dom": "3.4.19", - "@vue/shared": "3.4.19" + "@vue/compiler-dom": "3.4.23", + "@vue/shared": "3.4.23" } }, "node_modules/@vue/devtools-api": { @@ -2454,22 +2559,170 @@ } }, "node_modules/@vue/eslint-config-typescript": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/@vue/eslint-config-typescript/-/eslint-config-typescript-12.0.0.tgz", - "integrity": "sha512-StxLFet2Qe97T8+7L8pGlhYBBr8Eg05LPuTDVopQV6il+SK6qqom59BA/rcFipUef2jD8P2X44Vd8tMFytfvlg==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/@vue/eslint-config-typescript/-/eslint-config-typescript-13.0.0.tgz", + "integrity": "sha512-MHh9SncG/sfqjVqjcuFLOLD6Ed4dRAis4HNt0dXASeAuLqIAx4YMB1/m2o4pUKK1vCt8fUvYG8KKX2Ot3BVZTg==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "^6.7.0", - "@typescript-eslint/parser": "^6.7.0", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", "vue-eslint-parser": "^9.3.1" }, "engines": { - "node": "^14.17.0 || >=16.0.0" + "node": "^18.18.0 || >=20.0.0" }, "peerDependencies": { - "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0", + "eslint": "^8.56.0", "eslint-plugin-vue": "^9.0.0", - "typescript": "*" + "typescript": ">=4.7.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.7.0.tgz", + "integrity": "sha512-GJWR0YnfrKnsRoluVO3PRb9r5aMZriiMMM/RHj5nnTrBy1/wIgk76XCtCKcnXGjpZQJQRFtGV9/0JJ6n30uwpQ==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.7.0", + "@typescript-eslint/type-utils": "7.7.0", + "@typescript-eslint/utils": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/parser": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.7.0.tgz", + "integrity": "sha512-fNcDm3wSwVM8QYL4HKVBggdIPAy9Q41vcvC/GtDobw3c4ndVT3K6cqudUmjHPw8EAp4ufax0o58/xvWaP2FmTg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.7.0", + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/typescript-estree": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/scope-manager": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.7.0.tgz", + "integrity": "sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/type-utils": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.7.0.tgz", + "integrity": "sha512-bOp3ejoRYrhAlnT/bozNQi3nio9tIgv3U5C0mVDdZC7cpcQEDZXvq8inrHYghLVwuNABRqrMW5tzAv88Vy77Sg==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "7.7.0", + "@typescript-eslint/utils": "7.7.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/types": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.7.0.tgz", + "integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.7.0.tgz", + "integrity": "sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/visitor-keys": "7.7.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependenciesMeta": { "typescript": { @@ -2477,19 +2730,83 @@ } } }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/utils": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.7.0.tgz", + "integrity": "sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.15", + "@types/semver": "^7.5.8", + "@typescript-eslint/scope-manager": "7.7.0", + "@typescript-eslint/types": "7.7.0", + "@typescript-eslint/typescript-estree": "7.7.0", + "semver": "^7.6.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.7.0.tgz", + "integrity": "sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.7.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@vue/eslint-config-typescript/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@vue/language-core": { - "version": "1.8.27", - "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-1.8.27.tgz", - "integrity": "sha512-L8Kc27VdQserNaCUNiSFdDl9LWT24ly8Hpwf1ECy3aFb9m6bDhBGQYOujDm21N7EW3moKIOKEanQwe1q5BK+mA==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.0.13.tgz", + "integrity": "sha512-oQgM+BM66SU5GKtUMLQSQN0bxHFkFpLSSAiY87wVziPaiNQZuKVDt/3yA7GB9PiQw0y/bTNL0bOc0jM/siYjKg==", "dev": true, "dependencies": { - "@volar/language-core": "~1.11.1", - "@volar/source-map": "~1.11.1", - "@vue/compiler-dom": "^3.3.0", - "@vue/shared": "^3.3.0", + "@volar/language-core": "2.2.0-alpha.8", + "@vue/compiler-dom": "^3.4.0", + "@vue/shared": "^3.4.0", "computeds": "^0.0.1", "minimatch": "^9.0.3", - "muggle-string": "^0.3.1", "path-browserify": "^1.0.1", "vue-template-compiler": "^2.7.14" }, @@ -2512,9 +2829,9 @@ } }, "node_modules/@vue/language-core/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2527,66 +2844,57 @@ } }, "node_modules/@vue/reactivity": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.19.tgz", - "integrity": "sha512-+VcwrQvLZgEclGZRHx4O2XhyEEcKaBi50WbxdVItEezUf4fqRh838Ix6amWTdX0CNb/b6t3Gkz3eOebfcSt+UA==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.23.tgz", + "integrity": "sha512-GlXR9PL+23fQ3IqnbSQ8OQKLodjqCyoCrmdLKZk3BP7jN6prWheAfU7a3mrltewTkoBm+N7qMEb372VHIkQRMQ==", "dependencies": { - "@vue/shared": "3.4.19" + "@vue/shared": "3.4.23" } }, "node_modules/@vue/runtime-core": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.19.tgz", - "integrity": "sha512-/Z3tFwOrerJB/oyutmJGoYbuoadphDcJAd5jOuJE86THNZji9pYjZroQ2NFsZkTxOq0GJbb+s2kxTYToDiyZzw==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.23.tgz", + "integrity": "sha512-FeQ9MZEXoFzFkFiw9MQQ/FWs3srvrP+SjDKSeRIiQHIhtkzoj0X4rWQlRNHbGuSwLra6pMyjAttwixNMjc/xLw==", "dependencies": { - "@vue/reactivity": "3.4.19", - "@vue/shared": "3.4.19" + "@vue/reactivity": "3.4.23", + "@vue/shared": "3.4.23" } }, "node_modules/@vue/runtime-dom": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.19.tgz", - "integrity": "sha512-IyZzIDqfNCF0OyZOauL+F4yzjMPN2rPd8nhqPP2N1lBn3kYqJpPHHru+83Rkvo2lHz5mW+rEeIMEF9qY3PB94g==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.23.tgz", + "integrity": "sha512-RXJFwwykZWBkMiTPSLEWU3kgVLNAfActBfWFlZd0y79FTUxexogd0PLG4HH2LfOktjRxV47Nulygh0JFXe5f9A==", "dependencies": { - "@vue/runtime-core": "3.4.19", - "@vue/shared": "3.4.19", + "@vue/runtime-core": "3.4.23", + "@vue/shared": "3.4.23", "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.19.tgz", - "integrity": "sha512-eAj2p0c429RZyyhtMRnttjcSToch+kTWxFPHlzGMkR28ZbF1PDlTcmGmlDxccBuqNd9iOQ7xPRPAGgPVj+YpQw==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.23.tgz", + "integrity": "sha512-LDwGHtnIzvKFNS8dPJ1SSU5Gvm36p2ck8wCZc52fc3k/IfjKcwCyrWEf0Yag/2wTFUBXrqizfhK9c/mC367dXQ==", "dependencies": { - "@vue/compiler-ssr": "3.4.19", - "@vue/shared": "3.4.19" + "@vue/compiler-ssr": "3.4.23", + "@vue/shared": "3.4.23" }, "peerDependencies": { - "vue": "3.4.19" + "vue": "3.4.23" } }, "node_modules/@vue/shared": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.19.tgz", - "integrity": "sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==" + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.23.tgz", + "integrity": "sha512-wBQ0gvf+SMwsCQOyusNw/GoXPV47WGd1xB5A1Pgzy0sQ3Bi5r5xm3n+92y3gCnB3MWqnRDdvfkRGxhKtbBRNgg==" }, "node_modules/@vue/test-utils": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.4.4.tgz", - "integrity": "sha512-8jkRxz8pNhClAf4Co4ZrpAoFISdvT3nuSkUlY6Ys6rmTpw3DMWG/X3mw3gQ7QJzgCZO9f+zuE2kW57fi09MW7Q==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.4.5.tgz", + "integrity": "sha512-oo2u7vktOyKUked36R93NB7mg2B+N7Plr8lxp2JBGwr18ch6EggFjixSCdIVVLkT6Qr0z359Xvnafc9dcKyDUg==", "dev": true, "dependencies": { "js-beautify": "^1.14.9", - "vue-component-type-helpers": "^1.8.21" - }, - "peerDependencies": { - "@vue/server-renderer": "^3.0.1", - "vue": "^3.0.1" - }, - "peerDependenciesMeta": { - "@vue/server-renderer": { - "optional": true - } + "vue-component-type-helpers": "^2.0.0" } }, "node_modules/@vue/tsconfig": { @@ -2596,9 +2904,9 @@ "dev": true }, "node_modules/@vueform/multiselect": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/@vueform/multiselect/-/multiselect-2.6.6.tgz", - "integrity": "sha512-JDWesVRmyGz9HmHp2Ooy1cb8XgKohiztwMDtjm8c0/Th+7wEZENZuYa0iY5CTvaJNANl3LVqh9BNnCc/YlM/Bg==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/@vueform/multiselect/-/multiselect-2.6.7.tgz", + "integrity": "sha512-d0iwfzsj+N27o/JPE1KXbf0rVtwIe33dqlkQcOPxOP0RS6mW9umQG1hcuFEpdqNajuryHB9N4zo0rEcGmN20xQ==" }, "node_modules/@vuelidate/core": { "version": "2.0.3", @@ -2685,13 +2993,13 @@ } }, "node_modules/@vueuse/core": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.8.0.tgz", - "integrity": "sha512-G9Ok9fjx10TkNIPn8V1dJmK1NcdJCtYmDRyYiTMUyJ1p0Tywc1zmOoCQ2xhHYyz8ULBU4KjIJQ9n+Lrty74iVw==", + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.9.0.tgz", + "integrity": "sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==", "dependencies": { "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.8.0", - "@vueuse/shared": "10.8.0", + "@vueuse/metadata": "10.9.0", + "@vueuse/shared": "10.9.0", "vue-demi": ">=0.14.7" }, "funding": { @@ -2724,17 +3032,17 @@ } }, "node_modules/@vueuse/metadata": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.8.0.tgz", - "integrity": "sha512-Nim/Vle5OgXcXhAvGOgkJQXB1Yb+Kq/fMbLuv3YYDYbiQrwr39ljuD4k9fPeq4yUyokYRo2RaNQmbbIMWB/9+w==", + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.9.0.tgz", + "integrity": "sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==", "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/@vueuse/shared": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.8.0.tgz", - "integrity": "sha512-dUdy6zwHhULGxmr9YUg8e+EnB39gcM4Fe2oKBSrh3cOsV30JcMPtsyuspgFCUo5xxFNaeMf/W2yyKfST7Bg8oQ==", + "version": "10.9.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.9.0.tgz", + "integrity": "sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==", "dependencies": { "vue-demi": ">=0.14.7" }, @@ -2774,9 +3082,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -3112,11 +3420,11 @@ } }, "node_modules/axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -3178,19 +3486,19 @@ } }, "node_modules/bootstrap-vue-next": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.16.1.tgz", - "integrity": "sha512-xoZx+j8I+81DdeggJy3GjitGP4eLSk3zSyQDoA0AaM6rP5NLNEKABarCQOa4gePSRK/jJrrinGuQt/bVXCq95A==", + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/bootstrap-vue-next/-/bootstrap-vue-next-0.17.1.tgz", + "integrity": "sha512-mOWkNeIJtURQq6N3LSZNfu+9iRe0/Zy/qch6gW+tUmmNyHruEzfnIXI+K9jC1XJrLpC8TzGYOW5KHR3bePOCEw==", "dependencies": { - "@floating-ui/vue": "^1.0.4", - "@vueuse/core": "^10.7.2" + "@floating-ui/vue": "^1.0.6", + "@vueuse/core": "^10.9.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/bootstrap-vue-next" }, "peerDependencies": { - "vue": "^3.4.14" + "vue": "^3.4.21" } }, "node_modules/boxen": { @@ -3390,6 +3698,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/c12": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-1.10.0.tgz", + "integrity": "sha512-0SsG7UDhoRWcuSvKWHaXmu5uNjDCDN3nkQLRL4Q42IlFy+ze58FcCoI3uPwINXinkz7ZinbhEgyzYFw9u9ZV8g==", + "dev": true, + "dependencies": { + "chokidar": "^3.6.0", + "confbox": "^0.1.3", + "defu": "^6.1.4", + "dotenv": "^16.4.5", + "giget": "^1.2.1", + "jiti": "^1.21.0", + "mlly": "^1.6.1", + "ohash": "^1.1.3", + "pathe": "^1.1.2", + "perfect-debounce": "^1.0.0", + "pkg-types": "^1.0.3", + "rc9": "^2.1.1" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -3547,12 +3875,12 @@ } }, "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-8.0.0.tgz", + "integrity": "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3611,14 +3939,14 @@ } }, "node_modules/chart.js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.1.tgz", - "integrity": "sha512-C74QN1bxwV1v2PEujhmKjOZ7iUM4w6BWs23Md/6aOZZSlwMzeCIDGuZay++rBgChYru7/+QFeoQW0fQoP534Dg==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.2.tgz", + "integrity": "sha512-6GD7iKwFpP5kbSD4MeRRRlTnQvxfQREy36uEtm1hzHzcOqwWx0YEHuspuoNlslu+nciLIB7fjjsHkUv/FzFcOg==", "dependencies": { "@kurkle/color": "^0.3.0" }, "engines": { - "pnpm": ">=7" + "pnpm": ">=8" } }, "node_modules/check-error": { @@ -3634,15 +3962,9 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -3655,6 +3977,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -3694,6 +4019,15 @@ "node": ">=8" } }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "dev": true, + "dependencies": { + "consola": "^3.2.3" + } + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -3830,12 +4164,12 @@ } }, "node_modules/commander": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", - "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", "dev": true, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/computeds": { @@ -3850,6 +4184,12 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/confbox": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz", + "integrity": "sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==", + "dev": true + }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", @@ -3885,6 +4225,15 @@ "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", "dev": true }, + "node_modules/consola": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", + "integrity": "sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==", + "dev": true, + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", @@ -3898,9 +4247,9 @@ "dev": true }, "node_modules/core-js": { - "version": "3.36.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.36.0.tgz", - "integrity": "sha512-mt7+TUBbTFg5+GngsAxeKBTl5/VS0guFeJacYge9OmHb+m058UwwIm41SE9T4Den7ClatV57B6TYTuJ0CX1MAw==", + "version": "3.37.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.0.tgz", + "integrity": "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -4387,6 +4736,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "dev": true + }, "node_modules/delaunator": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.0.tgz", @@ -4418,6 +4773,12 @@ "node": ">=6" } }, + "node_modules/destr": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz", + "integrity": "sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==", + "dev": true + }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -4471,6 +4832,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -4722,9 +5095,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.8.tgz", - "integrity": "sha512-l7iffQpT2OrZfH2rXIp7/FkmaeZM0vxbxN9KfiCwGYuZqzMg/JdvX26R31Zxn/Pxvsrg3Y9N6XTcnknqDyyv4w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz", + "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", "dev": true, "hasInstallScript": true, "bin": { @@ -4734,28 +5107,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.8", - "@esbuild/android-arm64": "0.19.8", - "@esbuild/android-x64": "0.19.8", - "@esbuild/darwin-arm64": "0.19.8", - "@esbuild/darwin-x64": "0.19.8", - "@esbuild/freebsd-arm64": "0.19.8", - "@esbuild/freebsd-x64": "0.19.8", - "@esbuild/linux-arm": "0.19.8", - "@esbuild/linux-arm64": "0.19.8", - "@esbuild/linux-ia32": "0.19.8", - "@esbuild/linux-loong64": "0.19.8", - "@esbuild/linux-mips64el": "0.19.8", - "@esbuild/linux-ppc64": "0.19.8", - "@esbuild/linux-riscv64": "0.19.8", - "@esbuild/linux-s390x": "0.19.8", - "@esbuild/linux-x64": "0.19.8", - "@esbuild/netbsd-x64": "0.19.8", - "@esbuild/openbsd-x64": "0.19.8", - "@esbuild/sunos-x64": "0.19.8", - "@esbuild/win32-arm64": "0.19.8", - "@esbuild/win32-ia32": "0.19.8", - "@esbuild/win32-x64": "0.19.8" + "@esbuild/aix-ppc64": "0.20.2", + "@esbuild/android-arm": "0.20.2", + "@esbuild/android-arm64": "0.20.2", + "@esbuild/android-x64": "0.20.2", + "@esbuild/darwin-arm64": "0.20.2", + "@esbuild/darwin-x64": "0.20.2", + "@esbuild/freebsd-arm64": "0.20.2", + "@esbuild/freebsd-x64": "0.20.2", + "@esbuild/linux-arm": "0.20.2", + "@esbuild/linux-arm64": "0.20.2", + "@esbuild/linux-ia32": "0.20.2", + "@esbuild/linux-loong64": "0.20.2", + "@esbuild/linux-mips64el": "0.20.2", + "@esbuild/linux-ppc64": "0.20.2", + "@esbuild/linux-riscv64": "0.20.2", + "@esbuild/linux-s390x": "0.20.2", + "@esbuild/linux-x64": "0.20.2", + "@esbuild/netbsd-x64": "0.20.2", + "@esbuild/openbsd-x64": "0.20.2", + "@esbuild/sunos-x64": "0.20.2", + "@esbuild/win32-arm64": "0.20.2", + "@esbuild/win32-ia32": "0.20.2", + "@esbuild/win32-x64": "0.20.2" } }, "node_modules/escalade": { @@ -5191,12 +5565,13 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.22.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.22.0.tgz", - "integrity": "sha512-7wCXv5zuVnBtZE/74z4yZ0CM8AjH6bk4MQGm7hZjUC2DBppKU5ioeOk5LGSg/s9a1ZJnIsdPLJpXnu1Rc+cVHg==", + "version": "9.25.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.25.0.tgz", + "integrity": "sha512-tDWlx14bVe6Bs+Nnh3IGrD+hb11kf2nukfm6jLsmJIhmiRQ1SUaksvwY9U5MvPB0pcrg0QK0xapQkfITs3RKOA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", + "globals": "^13.24.0", "natural-compare": "^1.4.0", "nth-check": "^2.1.1", "postcss-selector-parser": "^6.0.15", @@ -5208,13 +5583,28 @@ "node": "^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0" + "eslint": "^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-vue/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint-plugin-vuejs-accessibility": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-vuejs-accessibility/-/eslint-plugin-vuejs-accessibility-2.2.1.tgz", - "integrity": "sha512-+QpTYEb4UcVD5+RIfKs3YVPoH1mfUj3nadTixmpPw9+kYp6AFAiZ3CQ/HMiexAAgFGBgL3Np5/nwbqcfQomdEQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vuejs-accessibility/-/eslint-plugin-vuejs-accessibility-2.3.0.tgz", + "integrity": "sha512-zQ6IzK+3obZzPsjeVUeL3xAUlMHXZgRZ8vgXvQAmoZVbsp1xZe6UwXIKUFIim5h3tq/7bOLgei09GoBjJQs+Cw==", "dev": true, "dependencies": { "aria-query": "^5.3.0", @@ -5225,7 +5615,7 @@ "node": ">=16.0.0" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-plugin-vuejs-accessibility/node_modules/emoji-regex": { @@ -5584,9 +5974,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -5877,6 +6267,25 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/giget": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/giget/-/giget-1.2.3.tgz", + "integrity": "sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==", + "dev": true, + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.3", + "nypm": "^0.3.8", + "ohash": "^1.1.3", + "pathe": "^1.1.2", + "tar": "^6.2.0" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, "node_modules/glob": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", @@ -6293,9 +6702,9 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -6962,6 +7371,15 @@ "@pkgjs/parseargs": "^0.11.0" } }, + "node_modules/jiti": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", + "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", + "dev": true, + "bin": { + "jiti": "bin/jiti.js" + } + }, "node_modules/jju": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", @@ -7148,6 +7566,18 @@ "node": ">=10" } }, + "node_modules/json-schema-ref-parser/node_modules/@apidevtools/json-schema-ref-parser": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", + "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "dev": true, + "dependencies": { + "@jsdevtools/ono": "^7.1.3", + "@types/json-schema": "^7.0.6", + "call-me-maybe": "^1.0.1", + "js-yaml": "^4.1.0" + } + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -7390,14 +7820,11 @@ } }, "node_modules/magic-string": { - "version": "0.30.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz", - "integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==", + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" } }, "node_modules/make-fetch-happen": { @@ -7436,14 +7863,14 @@ } }, "node_modules/marked": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-9.1.0.tgz", - "integrity": "sha512-VZjm0PM5DMv7WodqOUps3g6Q7dmxs9YGiFUZ7a2majzQTTCgX+6S6NAJHPvOhgFBzYz8s4QZKWWMfZKFmsfOgA==", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-12.0.2.tgz", + "integrity": "sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==", "bin": { "marked": "bin/marked.js" }, "engines": { - "node": ">= 16" + "node": ">= 18" } }, "node_modules/memorystream": { @@ -7774,15 +8201,15 @@ } }, "node_modules/mlly": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz", - "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.6.1.tgz", + "integrity": "sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==", "dev": true, "dependencies": { - "acorn": "^8.10.0", - "pathe": "^1.1.1", + "acorn": "^8.11.3", + "pathe": "^1.1.2", "pkg-types": "^1.0.3", - "ufo": "^1.3.0" + "ufo": "^1.3.2" } }, "node_modules/moo": { @@ -7797,9 +8224,9 @@ "dev": true }, "node_modules/muggle-string": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.3.1.tgz", - "integrity": "sha512-ckmWDJjphvd/FvZawgygcUeQCxzvohjFO5RxTjj4eq8kw359gFF3E1brjfI+viLMxss5JrHTDRHZvu2/tuy0Qg==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz", + "integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==", "dev": true }, "node_modules/nanoid": { @@ -7891,6 +8318,12 @@ } } }, + "node_modules/node-fetch-native": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz", + "integrity": "sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==", + "dev": true + }, "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -8030,11 +8463,12 @@ } }, "node_modules/npm-check-updates": { - "version": "16.14.14", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.14.tgz", - "integrity": "sha512-Y3ajS/Ep40jM489rLBdz9jehn/BMil5s9fA4PSr2ZJxxSmtLWCSmRqsI2IEZ9Nb3MTMu8a3s7kBs0l+JbjdkTA==", + "version": "16.14.18", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.18.tgz", + "integrity": "sha512-9iaRe9ohx9ykdbLjPRIYcq1A0RkrPYUx9HmQK1JIXhfxtJCNE/+497H9Z4PGH6GWRALbz5KF+1iZoySK2uSEpQ==", "dev": true, "dependencies": { + "@types/semver-utils": "^1.1.1", "chalk": "^5.3.0", "cli-table3": "^0.6.3", "commander": "^10.0.1", @@ -8484,6 +8918,81 @@ "integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==", "dev": true }, + "node_modules/nypm": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.3.8.tgz", + "integrity": "sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og==", + "dev": true, + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.2.3", + "execa": "^8.0.1", + "pathe": "^1.1.2", + "ufo": "^1.4.0" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": "^14.16.0 || >=16.10.0" + } + }, + "node_modules/nypm/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/nypm/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nypm/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/nypm/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -8602,6 +9111,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/ohash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-1.1.3.tgz", + "integrity": "sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==", + "dev": true + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -8888,9 +9403,9 @@ } }, "node_modules/pathe": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz", - "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", "dev": true }, "node_modules/pathval": { @@ -8902,6 +9417,12 @@ "node": "*" } }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -9001,9 +9522,9 @@ } }, "node_modules/postcss": { - "version": "8.4.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz", - "integrity": "sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "funding": [ { "type": "opencollective", @@ -9021,7 +9542,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -9301,6 +9822,16 @@ "node": ">=0.10.0" } }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "dev": true, + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -9696,10 +10227,13 @@ "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==" }, "node_modules/rollup": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.6.1.tgz", - "integrity": "sha512-jZHaZotEHQaHLgKr8JnQiDT1rmatjgKlMekyksz+yk9jt/8z9quNjnKNRoaM0wd9DC2QKXjmWWuDYtM3jfF8pQ==", + "version": "4.14.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.14.3.tgz", + "integrity": "sha512-ag5tTQKYsj1bhrFC9+OEWqb5O6VYgtQDO9hPDBMmIbePwhfSr+ExlcU741t8Dhw5DkPCQf6noz0jb36D6W9/hw==", "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -9708,18 +10242,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.6.1", - "@rollup/rollup-android-arm64": "4.6.1", - "@rollup/rollup-darwin-arm64": "4.6.1", - "@rollup/rollup-darwin-x64": "4.6.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.6.1", - "@rollup/rollup-linux-arm64-gnu": "4.6.1", - "@rollup/rollup-linux-arm64-musl": "4.6.1", - "@rollup/rollup-linux-x64-gnu": "4.6.1", - "@rollup/rollup-linux-x64-musl": "4.6.1", - "@rollup/rollup-win32-arm64-msvc": "4.6.1", - "@rollup/rollup-win32-ia32-msvc": "4.6.1", - "@rollup/rollup-win32-x64-msvc": "4.6.1", + "@rollup/rollup-android-arm-eabi": "4.14.3", + "@rollup/rollup-android-arm64": "4.14.3", + "@rollup/rollup-darwin-arm64": "4.14.3", + "@rollup/rollup-darwin-x64": "4.14.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.14.3", + "@rollup/rollup-linux-arm-musleabihf": "4.14.3", + "@rollup/rollup-linux-arm64-gnu": "4.14.3", + "@rollup/rollup-linux-arm64-musl": "4.14.3", + "@rollup/rollup-linux-powerpc64le-gnu": "4.14.3", + "@rollup/rollup-linux-riscv64-gnu": "4.14.3", + "@rollup/rollup-linux-s390x-gnu": "4.14.3", + "@rollup/rollup-linux-x64-gnu": "4.14.3", + "@rollup/rollup-linux-x64-musl": "4.14.3", + "@rollup/rollup-win32-arm64-msvc": "4.14.3", + "@rollup/rollup-win32-ia32-msvc": "4.14.3", + "@rollup/rollup-win32-x64-msvc": "4.14.3", "fsevents": "~2.3.2" } }, @@ -9919,9 +10457,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.70.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.70.0.tgz", - "integrity": "sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ==", + "version": "1.75.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.75.0.tgz", + "integrity": "sha512-ShMYi3WkrDWxExyxSZPst4/okE9ts46xZmJDSawJQrnte7M1V9fScVB+uNXOVKRBt0PggHOwoZcn8mYX4trnBw==", "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -10172,9 +10710,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "engines": { "node": ">=0.10.0" } @@ -10598,9 +11136,9 @@ "dev": true }, "node_modules/tinypool": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.2.tgz", - "integrity": "sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz", + "integrity": "sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==", "dev": true, "engines": { "node": ">=14.0.0" @@ -10702,12 +11240,12 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -10737,6 +11275,431 @@ "json5": "lib/cli.js" } }, + "node_modules/tsx": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.7.2.tgz", + "integrity": "sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==", + "dev": true, + "dependencies": { + "esbuild": "~0.19.10", + "get-tsconfig": "^4.7.2" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" + } + }, "node_modules/tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", @@ -10859,9 +11822,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "devOptional": true, "bin": { "tsc": "bin/tsc", @@ -10872,9 +11835,9 @@ } }, "node_modules/ufo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz", - "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.3.tgz", + "integrity": "sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==", "dev": true }, "node_modules/uglify-js": { @@ -11086,9 +12049,9 @@ } }, "node_modules/vega": { - "version": "5.27.0", - "resolved": "https://registry.npmjs.org/vega/-/vega-5.27.0.tgz", - "integrity": "sha512-iYMQZYb2nlJBLCsUZ88pvun2sTcFcLE7GKJWisndLo+KYNMQIRePQ7X2FRuy8yvRRNxfO8XhjImh4OwxZvyYVA==", + "version": "5.28.0", + "resolved": "https://registry.npmjs.org/vega/-/vega-5.28.0.tgz", + "integrity": "sha512-5EDVhjBUgcVdrA6LZDBLah/nuk4FRUwZqTgP/Yi32qeRCoiN0xkptQ5Sbmj6XfH7wu1SdbAbsCm1Zls+9NC/8Q==", "dependencies": { "vega-crossfilter": "~4.1.1", "vega-dataflow": "~5.7.5", @@ -11102,7 +12065,7 @@ "vega-hierarchy": "~4.1.1", "vega-label": "~1.2.1", "vega-loader": "~4.5.1", - "vega-parser": "~6.2.1", + "vega-parser": "~6.3.0", "vega-projection": "~1.6.0", "vega-regression": "~1.2.0", "vega-runtime": "~6.1.4", @@ -11145,22 +12108,18 @@ } }, "node_modules/vega-embed": { - "version": "6.24.0", - "resolved": "https://registry.npmjs.org/vega-embed/-/vega-embed-6.24.0.tgz", - "integrity": "sha512-ANCksO3lXhdLzQn7Mfistm1dsRwQhxTYICVpru7TMc+Ywe7C4vOLWuaVv9Qvem2IgQyuVCal0EoTMKvIVYykFg==", - "bundleDependencies": [ - "yallist" - ], + "version": "6.25.0", + "resolved": "https://registry.npmjs.org/vega-embed/-/vega-embed-6.25.0.tgz", + "integrity": "sha512-pK99jEhZPNYgx4daiYDyNZ7f1h2ep5PyzMYN/qKzJNxzcaNf8wgmUjHrWeJSeMh8RNyw89VRphIleeg7LNLhDA==", "dependencies": { "fast-json-patch": "^3.1.1", "json-stringify-pretty-compact": "^3.0.0", - "semver": "^7.5.4", + "semver": "^7.6.0", "tslib": "^2.6.2", "vega-interpreter": "^1.0.5", "vega-schema-url-parser": "^2.2.0", "vega-themes": "^2.14.0", - "vega-tooltip": "^0.34.0", - "yallist": "*" + "vega-tooltip": "^0.34.0" }, "peerDependencies": { "vega": "^5.21.0", @@ -11324,9 +12283,9 @@ } }, "node_modules/vega-parser": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/vega-parser/-/vega-parser-6.2.1.tgz", - "integrity": "sha512-F79bQXt6fMkACR+TfFl7ueehKO26yCR/3iRZxhU7/pgHerx/d8K8pf2onMguu3NAN4eitT+PPuTgkDZtcqo9Qg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/vega-parser/-/vega-parser-6.3.0.tgz", + "integrity": "sha512-swS5RuP2imRarMpGWaAZusoKkXc4Z5WxWx349pkqxIAf4F7H8Ya9nThEkSWsFozd75O9nWh0QLifds8Xb7KjUg==", "dependencies": { "vega-dataflow": "^5.7.5", "vega-event-selector": "^3.0.1", @@ -11516,14 +12475,14 @@ } }, "node_modules/vite": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.4.tgz", - "integrity": "sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.9.tgz", + "integrity": "sha512-uOQWfuZBlc6Y3W/DTuQ1Sr+oIXWvqljLvS881SVmAj00d5RdgShLcuXWxseWPd4HXwiYBFW/vXHfKFeqj9uQnw==", "dev": true, "dependencies": { - "esbuild": "^0.19.3", - "postcss": "^8.4.35", - "rollup": "^4.2.0" + "esbuild": "^0.20.1", + "postcss": "^8.4.38", + "rollup": "^4.13.0" }, "bin": { "vite": "bin/vite.js" @@ -11571,9 +12530,9 @@ } }, "node_modules/vite-node": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.3.1.tgz", - "integrity": "sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-1.5.0.tgz", + "integrity": "sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==", "dev": true, "dependencies": { "cac": "^6.7.14", @@ -11593,16 +12552,16 @@ } }, "node_modules/vitest": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.3.1.tgz", - "integrity": "sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-1.5.0.tgz", + "integrity": "sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==", "dev": true, "dependencies": { - "@vitest/expect": "1.3.1", - "@vitest/runner": "1.3.1", - "@vitest/snapshot": "1.3.1", - "@vitest/spy": "1.3.1", - "@vitest/utils": "1.3.1", + "@vitest/expect": "1.5.0", + "@vitest/runner": "1.5.0", + "@vitest/snapshot": "1.5.0", + "@vitest/spy": "1.5.0", + "@vitest/utils": "1.5.0", "acorn-walk": "^8.3.2", "chai": "^4.3.10", "debug": "^4.3.4", @@ -11614,9 +12573,9 @@ "std-env": "^3.5.0", "strip-literal": "^2.0.0", "tinybench": "^2.5.1", - "tinypool": "^0.8.2", + "tinypool": "^0.8.3", "vite": "^5.0.0", - "vite-node": "1.3.1", + "vite-node": "1.5.0", "why-is-node-running": "^2.2.2" }, "bin": { @@ -11631,8 +12590,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "1.3.1", - "@vitest/ui": "1.3.1", + "@vitest/browser": "1.5.0", + "@vitest/ui": "1.5.0", "happy-dom": "*", "jsdom": "*" }, @@ -11714,15 +12673,15 @@ } }, "node_modules/vue": { - "version": "3.4.19", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.19.tgz", - "integrity": "sha512-W/7Fc9KUkajFU8dBeDluM4sRGc/aa4YJnOYck8dkjgZoXtVsn3OeTGni66FV1l3+nvPA7VBFYtPioaGKUmEADw==", + "version": "3.4.23", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.23.tgz", + "integrity": "sha512-X1y6yyGJ28LMUBJ0k/qIeKHstGd+BlWQEOT40x3auJFTmpIhpbKLgN7EFsqalnJXq1Km5ybDEsp6BhuWKciUDg==", "dependencies": { - "@vue/compiler-dom": "3.4.19", - "@vue/compiler-sfc": "3.4.19", - "@vue/runtime-dom": "3.4.19", - "@vue/server-renderer": "3.4.19", - "@vue/shared": "3.4.19" + "@vue/compiler-dom": "3.4.23", + "@vue/compiler-sfc": "3.4.23", + "@vue/runtime-dom": "3.4.23", + "@vue/server-renderer": "3.4.23", + "@vue/shared": "3.4.23" }, "peerDependencies": { "typescript": "*" @@ -11734,18 +12693,18 @@ } }, "node_modules/vue-chartjs": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.3.0.tgz", - "integrity": "sha512-8XqX0JU8vFZ+WA2/knz4z3ThClduni2Nm0BMe2u0mXgTfd9pXrmJ07QBI+WAij5P/aPmPMX54HCE1seWL37ZdQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.3.1.tgz", + "integrity": "sha512-rZjqcHBxKiHrBl0CIvcOlVEBwRhpWAVf6rDU3vUfa7HuSRmGtCslc0Oc8m16oAVuk0erzc1FCtH1VCriHsrz+A==", "peerDependencies": { "chart.js": "^4.1.1", "vue": "^3.0.0-0 || ^2.7.0" } }, "node_modules/vue-component-type-helpers": { - "version": "1.8.27", - "resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-1.8.27.tgz", - "integrity": "sha512-0vOfAtI67UjeO1G6UiX5Kd76CqaQ67wrRZiOe7UAb9Jm6GzlUr/fC7CV90XfwapJRjpCMaZFhv1V0ajWRmE9Dg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-2.0.13.tgz", + "integrity": "sha512-xNO5B7DstNWETnoYflLkVgh8dK8h2ZDgxY1M2O0zrqGeBNq5yAZ8a10yCS9+HnixouNGYNX+ggU9MQQq86HTpg==", "dev": true }, "node_modules/vue-eslint-parser": { @@ -11789,9 +12748,9 @@ } }, "node_modules/vue-router": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.3.0.tgz", - "integrity": "sha512-dqUcs8tUeG+ssgWhcPbjHvazML16Oga5w34uCUmsk7i0BcnskoLGwjpa15fqMr2Fa5JgVBrdL2MEgqz6XZ/6IQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.3.2.tgz", + "integrity": "sha512-hKQJ1vDAZ5LVkKEnHhmm1f9pMiWIBNGF5AwU67PdH7TyXCj/a4hTccuUuYCAMgJK6rO/NVYtQIEN3yL8CECa7Q==", "dependencies": { "@vue/devtools-api": "^6.5.1" }, @@ -11813,13 +12772,13 @@ } }, "node_modules/vue-tsc": { - "version": "1.8.27", - "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-1.8.27.tgz", - "integrity": "sha512-WesKCAZCRAbmmhuGl3+VrdWItEvfoFIPXOvUJkjULi+x+6G/Dy69yO3TBRJDr9eUlmsNAwVmxsNZxvHKzbkKdg==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.0.13.tgz", + "integrity": "sha512-a3nL3FvguCWVJUQW/jFrUxdeUtiEkbZoQjidqvMeBK//tuE2w6NWQAbdrEpY2+6nSa4kZoKZp8TZUMtHpjt4mQ==", "dev": true, "dependencies": { - "@volar/typescript": "~1.11.1", - "@vue/language-core": "1.8.27", + "@volar/typescript": "2.2.0-alpha.8", + "@vue/language-core": "2.0.13", "semver": "^7.5.4" }, "bin": { @@ -12276,7 +13235,8 @@ "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true }, "node_modules/yargs": { "version": "17.7.2", diff --git a/package.json b/package.json index 19803b30470d51cd42a7930b60c9b29ff16221c3..59a7c1aa3d8a4ae3e8f9151c8742aa93eac98080 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nacsos-web", - "version": "0.11.2", + "version": "0.15.0", "private": true, "config": { "nacsos_core": "http://127.0.0.1:8081", @@ -13,67 +13,71 @@ "build-only": "vite build --outDir dist", "build": "run-p type-check build-only", "type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false", - "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore --ignore-pattern tools/*", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore", "test:unit": "vitest --environment jsdom --root src/", - "api-core": "node ./tools/openapi-gen/bin/index.js --input $npm_package_config_nacsos_core/openapi.json --output src/plugins/api/api-core --name CoreClient --client axios --indent 2 --useOptions --exportModels true --exportServices true --exportSchemas true --exportCore false --corePathTop @/plugins/api/core --corePathDeep @/plugins/api/core", - "api-pipe": "node ./tools/openapi-gen/bin/index.js --input $npm_package_config_nacsos_pipe/openapi.json --output src/plugins/api/api-pipe --name PipelinesClient --client axios --indent 2 --useOptions --exportModels true --exportServices true --exportSchemas true --exportCore false --corePathTop @/plugins/api/core --corePathDeep @/plugins/api/core", - "nql": "nearleyc src/util/nql/grammar.ne --out src/util/nql/grammar.ts" + "nql": "nearleyc src/util/nql/grammar.ne --out src/util/nql/grammar.ts", + "api": "npx tsx tools/openapi-ts/generate.ts" }, "dependencies": { - "@fortawesome/fontawesome-svg-core": "^6.5.1", - "@fortawesome/free-brands-svg-icons": "^6.5.1", - "@fortawesome/free-regular-svg-icons": "^6.5.1", - "@fortawesome/free-solid-svg-icons": "^6.5.1", + "@fortawesome/fontawesome-svg-core": "^6.5.2", + "@fortawesome/free-brands-svg-icons": "^6.5.2", + "@fortawesome/free-regular-svg-icons": "^6.5.2", + "@fortawesome/free-solid-svg-icons": "^6.5.2", "@fortawesome/vue-fontawesome": "^3.0.6", - "@vueform/multiselect": "^2.6.6", + "@vueform/multiselect": "^2.6.7", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", - "@vueuse/core": "^10.8.0", - "axios": "^1.6.7", + "@vueuse/core": "^10.9.0", + "axios": "^1.6.8", "bootstrap": "^5.3.3", - "bootstrap-vue-next": "^0.16.1", - "chart.js": "^4.4.1", - "core-js": "^3.36.0", + "bootstrap-vue-next": "^0.17.1", + "chart.js": "^4.4.2", + "core-js": "^3.37.0", "form-data": "^4.0.0", - "marked": "^9.1.0", + "marked": "^12.0.2", "nearley": "^2.20.1", "pinia": "^2.1.7", - "sass": "^1.70.0", - "vega": "^5.27.0", - "vega-embed": "^6.24.0", - "vue": "^3.4.20", - "vue-chartjs": "^5.3.0", - "vue-router": "^4.3.0" + "sass": "^1.75.0", + "vega": "^5.28.0", + "vega-embed": "^6.25.0", + "vue": "^3.4.23", + "vue-chartjs": "^5.3.1", + "vue-router": "^4.3.2" }, "devDependencies": { - "@rushstack/eslint-patch": "^1.7.2", + "@apidevtools/json-schema-ref-parser": "11.5.5", + "@rushstack/eslint-patch": "^1.10.2", + "@types/cross-spawn": "^6.0.6", "@types/jsdom": "^21.1.6", "@types/nearley": "^2.11.5", - "@types/node": "^20.11.16", + "@types/node": "^20.12.7", "@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue-jsx": "^3.1.0", "@vue/eslint-config-airbnb-with-typescript": "^8.0.0", "@vue/eslint-config-prettier": "^9.0.0", - "@vue/eslint-config-typescript": "^12.0.0", - "@vue/test-utils": "^2.4.4", + "@vue/eslint-config-typescript": "^13.0.0", + "@vue/test-utils": "^2.4.5", "@vue/tsconfig": "^0.5.1", - "camelcase": "^6.3.0", - "commander": "^11.0.0", + "c12": "1.10.0", + "camelcase": "^8.0.0", + "commander": "^12.0.0", + "cross-spawn": "7.0.3", "eslint": "^8.56.0", "eslint-import-resolver-node": "^0.3.9", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-vue": "^9.22.0", - "eslint-plugin-vuejs-accessibility": "^2.2.1", + "eslint-plugin-vue": "^9.25.0", + "eslint-plugin-vuejs-accessibility": "^2.3.0", "fs-extra": "^11.2.0", "handlebars": "^4.7.8", "jsdom": "^24.0.0", "json-schema-ref-parser": "^9.0.9", - "npm-check-updates": "16.14.14", + "npm-check-updates": "16.14.18", "npm-run-all": "^4.1.5", "prettier": "^3.2.5", - "typescript": "^5.3.3", - "vite": "^5.1.4", - "vitest": "^1.3.1", - "vue-tsc": "^1.8.27" + "tsx": "^4.7.2", + "typescript": "^5.4.5", + "vite": "^5.2.9", + "vitest": "^1.5.0", + "vue-tsc": "^2.0.13" } } diff --git a/src/components/FilesUploader.vue b/src/components/FilesUploader.vue index 57c1db8789f70ffcd86279b4b813525a5cd005a0..82c430daa02ba3d04c571136ff8d55fb4e58972c 100644 --- a/src/components/FilesUploader.vue +++ b/src/components/FilesUploader.vue @@ -104,18 +104,16 @@ export default defineComponent({ } return new Promise((resolve, reject) => { - API.pipe.artefacts - .uploadFileApiArtefactsFilesUploadPost( + API.pipes + .uploadFileApiPipesArtefactsFilesUploadPost( { xProjectId: currentProjectStore.projectId as string, folder, formData: { file: uploadFile.file }, }, { - customRequestConfig: { - onUploadProgress: (event: { loaded: number; total?: number }) => { - uploadFile.percentage = Math.round(100 * (event.loaded / (event.total || 1))); - }, + onUploadProgress: (event: { loaded: number; total?: number }) => { + uploadFile.percentage = Math.round(100 * (event.loaded / (event.total || 1))); }, }, ) diff --git a/src/components/SideBar.vue b/src/components/SideBar.vue index 8a7597c9bbdd5951ab1f32431d5c758a118cb2db..9d4fc32532d2e826712fe9aa584e2bf2af1c9212 100644 --- a/src/components/SideBar.vue +++ b/src/components/SideBar.vue @@ -75,7 +75,7 @@ import { defineComponent } from "vue"; import type { RouteLocationMatched } from "vue-router"; import { currentProjectStore } from "@/stores"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectPermissionsModel } from "@/plugins/api/types"; interface MenuEntry { name: string; @@ -213,20 +213,6 @@ export default defineComponent({ permission: perm.artefacts_read || perm.pipelines_read, routes: ["project-artefacts", "project-artefacts-list", "project-artefacts-details"], }, - { - name: "Task Configuration", - icon: "wrench", - target: "/project/pipelines/setup", - permission: perm.pipelines_read, - routes: ["project-pipelines-setup"], - }, - { - name: "Presets", - icon: "timeline", - target: "/project/pipelines/presets", - permission: perm.pipelines_read, - routes: ["project-pipelines-presets"], - }, { name: "Bot Annotations", icon: "robot", diff --git a/src/components/ToastsViewer.vue b/src/components/ToastsViewer.vue index d44de2009c155171333ed0210f1a7d03141fb0e4..92724b9baabf022618d6e9c2af0dd2d8f7c58e37 100644 --- a/src/components/ToastsViewer.vue +++ b/src/components/ToastsViewer.vue @@ -30,10 +30,10 @@ </template> <script lang="ts"> -import { marked } from "marked"; import { defineComponent } from "vue"; import { ToastEvent } from "@/plugins/events/events/toast"; import type { ToastType } from "@/plugins/events/events/toast"; +import { md2html } from "@/util"; interface Toast { key: number; @@ -64,7 +64,7 @@ export default defineComponent({ key: this.runningCount, level: event.level, message: event.message, - htmlMessage: marked(event.message), + htmlMessage: md2html(event.message), bg: backgroundClass[event.level], col: textColorClass[event.level], }; diff --git a/src/components/TopBar.vue b/src/components/TopBar.vue index 2e2f7ff35621b105f2b65ef2c9eca1377a5d5862..7808943eef29807fa408168d62d3d7fd47934a0f 100644 --- a/src/components/TopBar.vue +++ b/src/components/TopBar.vue @@ -38,15 +38,21 @@ </h6> </li> <li> - <router-link to="/admin/projects" class="dropdown-item"> Manage projects</router-link> + <router-link to="/admin/projects" class="dropdown-item">Manage projects</router-link> </li> <li> - <router-link to="/admin/users" class="dropdown-item"> Manage users</router-link> + <router-link to="/admin/users" class="dropdown-item">Manage users</router-link> + </li> + <li> + <router-link to="/admin/celery" class="dropdown-item">Celery</router-link> </li> <li> <hr class="dropdown-divider" /> </li> </template> + <li> + <router-link to="/nql" class="dropdown-item">NQL toolkit</router-link> + </li> <li> <router-link to="/user/profile" class="dropdown-item"> <font-awesome-icon :icon="['fas', 'user-pen']" class="me-2" /> diff --git a/src/components/annotations/AnnotationLabels.vue b/src/components/annotations/AnnotationLabels.vue index eee6fef7d4f9aeff96c3b589e59a51e50720e869..0bd252fabd1d884387b3756b2425af3dbee92087 100644 --- a/src/components/annotations/AnnotationLabels.vue +++ b/src/components/annotations/AnnotationLabels.vue @@ -212,8 +212,13 @@ import { defineComponent } from "vue"; import type { PropType } from "vue"; import InlineToolTip from "@/components/InlineToolTip.vue"; import SearchableSelect from "@/components/SearchableSelect.vue"; -import type { AssignmentModel, AnnotationModel, AnnotationSchemeLabelChoice } from "@/plugins/api/api-core"; -import { AnnotationSchemeLabel } from "@/plugins/api/api-core"; +import type { + AssignmentModel, + AnnotationModel, + AnnotationSchemeLabelChoice, + AnnotationSchemeLabel, +} from "@/plugins/api/types"; +import { KindEnum } from "@/plugins/api/types"; import ClosablePill from "@/components/ClosablePill.vue"; import { is } from "@/util"; @@ -411,10 +416,7 @@ const AnnotationLabels = defineComponent({ }, clearAnnotation(label: AnnotationSchemeLabel) { // recurse clearance to children (if present) - if ( - (label.kind === AnnotationSchemeLabel.kind.SINGLE || label.kind === AnnotationSchemeLabel.kind.MULTI) && - label.choices - ) { + if ((label.kind === KindEnum.SINGLE || label.kind === KindEnum.MULTI) && label.choices) { label.choices.forEach((choice: AnnotationSchemeLabelChoice) => { choice.children?.forEach((childLabel: AnnotationSchemeLabel) => { this.clearAnnotation(childLabel); diff --git a/src/components/annotations/AnnotationSchemeLabelsEditor.vue b/src/components/annotations/AnnotationSchemeLabelsEditor.vue index b62758105fab055e16066b9086ed6fa3b4738c21..8e149afa625922522a2d536ab1e56b15ecc154de 100644 --- a/src/components/annotations/AnnotationSchemeLabelsEditor.vue +++ b/src/components/annotations/AnnotationSchemeLabelsEditor.vue @@ -215,7 +215,7 @@ import { defineComponent } from "vue"; import type { PropType } from "vue"; import ToolTip from "@/components/ToolTip.vue"; -import { AnnotationSchemeLabel } from "@/plugins/api/api-core"; +import { type AnnotationSchemeLabel, AnnotationSchemeLabelKindEnum } from "@/plugins/api/types"; type KeyedAnnotationSchemeLabel = AnnotationSchemeLabel & { tmpKey?: string }; @@ -234,7 +234,7 @@ export default defineComponent({ }, data() { return { - annotationSchemeLabelKinds: AnnotationSchemeLabel.kind, + annotationSchemeLabelKinds: AnnotationSchemeLabelKindEnum, schemeLabels: this.labels, }; }, diff --git a/src/components/annotations/LabelPathPills.vue b/src/components/annotations/LabelPathPills.vue index ff3c0b87c92230c640108249423a458031fa3006..41dc8b7c39b87f3156daeec07970181cb02b1503 100644 --- a/src/components/annotations/LabelPathPills.vue +++ b/src/components/annotations/LabelPathPills.vue @@ -34,8 +34,8 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { FlatLabelChoice, Label } from "@/plugins/api/api-core"; -import { FlatLabel, FlattenedAnnotationSchemeLabel } from "@/plugins/api/api-core"; +import type { FlatLabelChoice, Label } from "@/plugins/api/types"; +import { FlatLabel, FlattenedAnnotationSchemeLabel } from "@/plugins/api/types"; export default defineComponent({ name: "LabelPathPills", diff --git a/src/components/annotations/ScopeQuality.vue b/src/components/annotations/ScopeQuality.vue index b6c15e0990ee1a8019815d3ca909cf2c8f7f368c..6ca7bd1e1a9e138c7047864407ef2f8149921654 100644 --- a/src/components/annotations/ScopeQuality.vue +++ b/src/components/annotations/ScopeQuality.vue @@ -127,10 +127,10 @@ import type { AssignmentCounts, AssignmentScopeEntry, BotAnnotationMetaDataBaseModel, -} from "@/plugins/api/api-core"; +} from "@/plugins/api/types"; import { currentProjectStore, interfaceSettingsStore } from "@/stores"; import { API, ignore, toastReject } from "@/plugins/api"; -import type { AssignmentScopeModel } from "@/plugins/api/api-core"; +import type { AssignmentScopeModel } from "@/plugins/api/types"; import AssignmentsVisualiser from "@/components/annotations/assignments/AssignmentsVisualiser.vue"; import { isArray, isNone } from "@/util"; import ScopeQualityEntry from "@/components/annotations/ScopeQualityEntry.vue"; @@ -167,7 +167,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.annotations + API.annotations .getNumAssignmentsForScopeApiAnnotationsAnnotateScopeCountsAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: this.scope.assignment_scope_id as string, @@ -206,7 +206,7 @@ export default defineComponent({ this.loadMetric(); } if (this.resolutions.length === 0) { - API.core.evaluation + API.evaluation .getResolutionsForScopeApiEvalResolutionsGet({ assignmentScopeId: this.scope.assignment_scope_id as string, xProjectId: currentProjectStore.projectId as string, @@ -220,7 +220,7 @@ export default defineComponent({ this.inFocus = !this.inFocus; }, loadMetric() { - API.core.evaluation + API.evaluation .getIrrApiEvalQualityLoadAssignmentScopeIdGet({ assignmentScopeId: this.scope.assignment_scope_id as string, xProjectId: currentProjectStore.projectId as string, @@ -236,7 +236,7 @@ export default defineComponent({ .catch(toastReject); }, recomputeMetric() { - API.core.evaluation + API.evaluation .recomputeIrrApiEvalQualityComputeGet({ assignmentScopeId: this.scope.assignment_scope_id as string, botAnnotationMetadataId: this.selected_resolution, @@ -250,7 +250,7 @@ export default defineComponent({ toggleAssignments() { this.assignmentsVisible = !this.assignmentsVisible; if (!this.assignments) { - API.core.annotations + API.annotations .getAssignmentIndicatorsForScopeApiAnnotationsAnnotateAssignmentProgressAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: this.scope.assignment_scope_id as string, diff --git a/src/components/annotations/ScopeQualityEntry.vue b/src/components/annotations/ScopeQualityEntry.vue index e8c454679c6ced14a88683ff4d17d91893f15b9b..9f3665cac65467c4c638c3e18e416cc5e95ab5ba 100644 --- a/src/components/annotations/ScopeQualityEntry.vue +++ b/src/components/annotations/ScopeQualityEntry.vue @@ -1,7 +1,4 @@ <template> - <!-- <ScopeQualityRow quality="" label="" />--> - <!-- <ScopeQualityRow v-for="userQuality in userQualities" :key="userQuality.annotation_quality_id" quality="" label="" />--> - <ScopeQualityRow :quality="quality" :col-class="[bgClass]" :first-col-class="[bgClass]"> <template v-if="isChoice"> <font-awesome-icon icon="angle-right" class="text-muted ms-1 me-1" /> @@ -59,7 +56,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { AnnotationQualityModel } from "@/plugins/api/api-core"; +import type { AnnotationQualityModel } from "@/plugins/api/types"; import { interfaceSettingsStore } from "@/stores"; import { isArray, isNone } from "@/util"; import ScopeQualityRow from "@/components/annotations/ScopeQualityRow.vue"; diff --git a/src/components/annotations/ScopeQualityRow.vue b/src/components/annotations/ScopeQualityRow.vue index e6e03b3ade19338303148a23c9b941009fea5f14..87f7e355cbcf72b75c60a877479a27acd521b696 100644 --- a/src/components/annotations/ScopeQualityRow.vue +++ b/src/components/annotations/ScopeQualityRow.vue @@ -75,7 +75,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { AnnotationQualityModel } from "@/plugins/api/api-core"; +import type { AnnotationQualityModel } from "@/plugins/api/types"; import { interfaceSettingsStore } from "@/stores"; import { isArray, isNone } from "@/util"; diff --git a/src/components/annotations/assignments/AssignmentsVisualiser.vue b/src/components/annotations/assignments/AssignmentsVisualiser.vue index 0eb7e973bd7d1c6c7022aaab9c4ea607803356f0..d5502313bd17d1cd082ea0735de03e574f6bbeb4 100644 --- a/src/components/annotations/assignments/AssignmentsVisualiser.vue +++ b/src/components/annotations/assignments/AssignmentsVisualiser.vue @@ -18,7 +18,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { AssignmentInfo, AssignmentScopeEntry } from "@/plugins/api/api-core"; +import type { AssignmentInfo, AssignmentScopeEntry } from "@/plugins/api/types"; type User = { user_id: string; username: string }; export default defineComponent({ diff --git a/src/components/annotations/assignments/RandomAssignmentConfig.vue b/src/components/annotations/assignments/RandomAssignmentConfig.vue index 715e4d035505c35e61620bc55c6ecf06d093e7d9..efcfec029504815dfcd0743705a92f5a04b309b2 100644 --- a/src/components/annotations/assignments/RandomAssignmentConfig.vue +++ b/src/components/annotations/assignments/RandomAssignmentConfig.vue @@ -69,7 +69,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { AssignmentScopeRandomConfig } from "@/plugins/api/api-core"; +import { AssignmentScopeBaseConfigTypesEnum, AssignmentScopeRandomConfig } from "@/plugins/api/types"; export default defineComponent({ name: "RandomAssignmentConfig", @@ -88,7 +88,7 @@ export default defineComponent({ const config: AssignmentScopeRandomConfig = this.existingConfig ? this.existingConfig : ({ - config_type: "random", + config_type: AssignmentScopeBaseConfigTypesEnum.RANDOM, num_items: 12, num_multi_coded_items: 8, min_assignments_per_item: 2, diff --git a/src/components/annotations/assignments/RandomAssignmentWithExclusionConfig.vue b/src/components/annotations/assignments/RandomAssignmentWithExclusionConfig.vue index c733d8eef5c677746dcbbda032ef605871f2b3fd..35bfacc60136326d975261b451442c18427d15e7 100644 --- a/src/components/annotations/assignments/RandomAssignmentWithExclusionConfig.vue +++ b/src/components/annotations/assignments/RandomAssignmentWithExclusionConfig.vue @@ -90,7 +90,11 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { AssignmentScopeModel, AssignmentScopeRandomWithExclusionConfig } from "@/plugins/api/api-core"; +import { + AssignmentScopeBaseConfigTypesEnum, + AssignmentScopeModel, + AssignmentScopeRandomWithExclusionConfig, +} from "@/plugins/api/types"; import { API } from "@/plugins/api"; import { currentProjectStore } from "@/stores"; @@ -111,7 +115,7 @@ export default defineComponent({ const config: AssignmentScopeRandomWithExclusionConfig = this.existingConfig ? this.existingConfig : ({ - config_type: "random_exclusion", + config_type: AssignmentScopeBaseConfigTypesEnum.RANDOM_EXCLUSION, num_items: 12, num_multi_coded_items: 8, min_assignments_per_item: 2, @@ -128,7 +132,7 @@ export default defineComponent({ }; }, mounted() { - API.core.annotations + API.annotations .getAssignmentScopesForProjectApiAnnotationsAnnotateScopesGet({ xProjectId: currentProjectStore.projectId as string, }) diff --git a/src/components/annotations/assignments/RandomAssignmentWithNQL.vue b/src/components/annotations/assignments/RandomAssignmentWithNQL.vue index 928920385e6d4d7727e0812adc77645454f4660c..e239baad67be528188167327348286018d28a927 100644 --- a/src/components/annotations/assignments/RandomAssignmentWithNQL.vue +++ b/src/components/annotations/assignments/RandomAssignmentWithNQL.vue @@ -93,7 +93,11 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { AssignmentScopeModel, AssignmentScopeRandomWithNQLConfig } from "@/plugins/api/api-core"; +import { + AssignmentScopeBaseConfigTypesEnum, + AssignmentScopeModel, + AssignmentScopeRandomWithNQLConfig, +} from "@/plugins/api/types"; import { API } from "@/plugins/api"; import { currentProjectStore } from "@/stores"; import NQLBox from "@/components/NQLBox.vue"; @@ -118,7 +122,7 @@ export default defineComponent({ const config: AssignmentScopeRandomWithNQLConfig = this.existingConfig ? this.existingConfig : ({ - config_type: "random_nql", + config_type: AssignmentScopeBaseConfigTypesEnum.RANDOM_NQL, num_items: 50, num_multi_coded_items: 50, min_assignments_per_item: 2, @@ -140,7 +144,7 @@ export default defineComponent({ methods: { getCount() { if (this.config.query_parsed) - API.core.search + API.search .nqlQueryCountApiSearchNqlCountPost({ xProjectId: currentProjectStore.projectId as string, requestBody: this.config.query_parsed, @@ -159,7 +163,7 @@ export default defineComponent({ }, }, mounted() { - API.core.annotations + API.annotations .getAssignmentScopesForProjectApiAnnotationsAnnotateScopesGet({ xProjectId: currentProjectStore.projectId as string, }) diff --git a/src/components/annotations/resolve/BoolLabel.vue b/src/components/annotations/resolve/BoolLabel.vue index ad9664a74edb693d5b61a79ae09372fa13d11659..5c8694776e3b98e70887ed66b3471675e41c90ca 100644 --- a/src/components/annotations/resolve/BoolLabel.vue +++ b/src/components/annotations/resolve/BoolLabel.vue @@ -36,8 +36,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import "core-js/modules/es.array.to-sorted"; -import type { BotAnnotationModel, FlatLabel, ResolutionCell, UserModel } from "@/plugins/api/api-core"; +import type { BotAnnotationModel, FlatLabel, ResolutionCell, UserModel } from "@/plugins/api/types"; import InlineToolTip from "@/components/InlineToolTip.vue"; import { is, isNone } from "@/util"; diff --git a/src/components/annotations/resolve/ChoiceLabel.vue b/src/components/annotations/resolve/ChoiceLabel.vue index ec2255675beb2c6fb359f786d4f321cc1b8e74d0..43ec3fe804d99014d0496d633fffcb120194875f 100644 --- a/src/components/annotations/resolve/ChoiceLabel.vue +++ b/src/components/annotations/resolve/ChoiceLabel.vue @@ -74,7 +74,7 @@ import type { ResolutionUserEntry, UserModel, FlatLabelChoice, -} from "@/plugins/api/api-core"; +} from "@/plugins/api/types"; import InlineToolTip from "@/components/InlineToolTip.vue"; import { cmap } from "@/types/colours"; import { is, isNone } from "@/util"; diff --git a/src/components/annotations/resolve/MultiLabel.vue b/src/components/annotations/resolve/MultiLabel.vue index 57f2b4ce03e216f1cb89d20045caa255533b938b..b710bed58a4f6fa5a3fe2b9e98774e66cb8d9ab5 100644 --- a/src/components/annotations/resolve/MultiLabel.vue +++ b/src/components/annotations/resolve/MultiLabel.vue @@ -56,7 +56,7 @@ import type { ResolutionCell, ResolutionUserEntry, FlatLabelChoice, -} from "@/plugins/api/api-core"; +} from "@/plugins/api/types"; import ClosablePill from "@/components/ClosablePill.vue"; import InlineToolTip from "@/components/InlineToolTip.vue"; import { is, isNone, notNone } from "@/util"; diff --git a/src/components/annotations/resolve/ResolverRow.vue b/src/components/annotations/resolve/ResolverRow.vue index 8384a35c7c95205a862d7db4bb1ce05bef7c0e73..b0018c2800c49e5bda590829ddaf84003141d591 100644 --- a/src/components/annotations/resolve/ResolverRow.vue +++ b/src/components/annotations/resolve/ResolverRow.vue @@ -87,7 +87,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { UserModel, ResolutionCell, FlatLabel, ResolutionOrdering } from "@/plugins/api/api-core"; +import type { UserModel, ResolutionCell, FlatLabel, ResolutionOrdering } from "@/plugins/api/types"; import BoolLabel from "@/components/annotations/resolve/BoolLabel.vue"; import ChoiceLabel from "@/components/annotations/resolve/ChoiceLabel.vue"; import MultiLabel from "@/components/annotations/resolve/MultiLabel.vue"; @@ -197,7 +197,7 @@ export default defineComponent({ }, showItem(newValue: boolean) { if (newValue && !this.item) { - API.core.project + API.project .getDetailForItemApiProjectItemsDetailItemIdGet({ xProjectId: currentProjectStore.projectId as string, itemId: this.ordering.item_id, diff --git a/src/components/annotations/resolve/StringLabel.vue b/src/components/annotations/resolve/StringLabel.vue index 3a75b67b45bb5627c437d60fd17cb600ff1bfbf1..3f6a70544eacc07291bc7f49a4089a77bb4ac5bf 100644 --- a/src/components/annotations/resolve/StringLabel.vue +++ b/src/components/annotations/resolve/StringLabel.vue @@ -15,7 +15,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { FlatLabel, ResolutionCell, BotAnnotationModel } from "@/plugins/api/api-core"; +import type { FlatLabel, ResolutionCell, BotAnnotationModel } from "@/plugins/api/types"; import { is, isNone, notNone } from "@/util"; export default defineComponent({ diff --git a/src/components/imports/ConfigJSONLAcademicItem.vue b/src/components/imports/ConfigJSONLAcademicItem.vue index a6b7aa6a9bd8d6a1c13d49a84e86b0481ab8a4ec..dd4a86c5a67bc474870fd47d5d2197998fb64f5e 100644 --- a/src/components/imports/ConfigJSONLAcademicItem.vue +++ b/src/components/imports/ConfigJSONLAcademicItem.vue @@ -43,10 +43,9 @@ import { defineComponent } from "vue"; import useVuelidate from "@vuelidate/core"; import { required } from "@vuelidate/validators"; import type { BaseValidation, ValidationRule } from "@vuelidate/core"; -import type { AcademicItemImport } from "@/plugins/api/api-core"; +import { AcademicItemImport, ImportConfigEnum } from "@/plugins/api/types"; import FilesUploader from "@/components/FilesUploader.vue"; import type { UploadFile } from "@/components/FilesUploader.vue"; -import { currentProjectStore } from "@/stores"; const areFilesUploaded: ValidationRule = { $validator(value?: UploadFile[]) { @@ -90,27 +89,17 @@ export default defineComponent({ }; }, data() { - const config: AcademicItemImport = this.existingConfig ? this.existingConfig : this.emptyConfig(); - - if (!config.import_id && !!this.importId) { - config.import_id = this.importId; - } - return { files: [] as UploadFile[], - config, + config: this.existingConfig + ? this.existingConfig + : ({ + kind: ImportConfigEnum.ACADEMIC, + sources: [] as string[], + } as AcademicItemImport), }; }, methods: { - emptyConfig(): Partial<AcademicItemImport> | undefined { - return { - func_name: "nacsos_lib.academic.import.import_academic_db", - encoding: "db-academic-item", - filenames: [], - import_id: this.importId, - project_id: currentProjectStore.projectId, - }; - }, errorsToString(field: BaseValidation): string { return field.$errors.map((error) => error.$message).join("; "); }, diff --git a/src/components/imports/ConfigJSONLOpenAlexWorks.vue b/src/components/imports/ConfigJSONLOpenAlexWorks.vue index 92a9754778d9813c8808cb731dff66f4afe20940..f4c70716fbdd905aef47c6f9f6f4fbe165a5c80b 100644 --- a/src/components/imports/ConfigJSONLOpenAlexWorks.vue +++ b/src/components/imports/ConfigJSONLOpenAlexWorks.vue @@ -43,10 +43,9 @@ import { defineComponent } from "vue"; import useVuelidate from "@vuelidate/core"; import { required } from "@vuelidate/validators"; import type { BaseValidation, ValidationRule } from "@vuelidate/core"; -import type { OpenAlexItemImport } from "@/plugins/api/api-core"; +import { ImportConfigEnum, OpenAlexFileImport } from "@/plugins/api/types"; import FilesUploader from "@/components/FilesUploader.vue"; import type { UploadFile } from "@/components/FilesUploader.vue"; -import { currentProjectStore } from "@/stores"; const areFilesUploaded: ValidationRule = { $validator(value?: UploadFile[]) { @@ -65,7 +64,7 @@ export default defineComponent({ emits: ["configChanged"], props: { existingConfig: { - type: Object as PropType<OpenAlexItemImport>, + type: Object as PropType<OpenAlexFileImport>, required: false, default: null, }, @@ -90,27 +89,17 @@ export default defineComponent({ }; }, data() { - const config: OpenAlexItemImport = this.existingConfig ? this.existingConfig : this.emptyConfig(); - - if (!config.import_id && !!this.importId) { - config.import_id = this.importId; - } - return { files: [] as UploadFile[], - config, + config: this.existingConfig + ? this.existingConfig + : ({ + kind: ImportConfigEnum.OA_FILE, + sources: [] as string[], + } as OpenAlexFileImport), }; }, methods: { - emptyConfig(): Partial<OpenAlexItemImport> | undefined { - return { - func_name: "nacsos_lib.academic.import.import_openalex_file", - encoding: "openalex-work", - filenames: [], - import_id: this.importId, - project_id: currentProjectStore.projectId, - }; - }, errorsToString(field: BaseValidation): string { return field.$errors.map((error) => error.$message).join("; "); }, @@ -131,13 +120,13 @@ export default defineComponent({ }, watch: { config: { - handler(newValue: OpenAlexItemImport) { + handler(newValue: OpenAlexFileImport) { this.$emit("configChanged", newValue); }, deep: true, }, existingConfig: { - handler(newValue: OpenAlexItemImport) { + handler(newValue: OpenAlexFileImport) { this.config = newValue; }, deep: true, diff --git a/src/components/imports/ConfigJSONLTwitterAPI.vue b/src/components/imports/ConfigJSONLTwitterAPI.vue deleted file mode 100644 index f54dacc1f0c8f1551cd52a17489c21a3379c7c1e..0000000000000000000000000000000000000000 --- a/src/components/imports/ConfigJSONLTwitterAPI.vue +++ /dev/null @@ -1,158 +0,0 @@ -<template> - <div class="m-2"> - <div class="row"> - <div class="col-xxl-7"> - <h4>Twitter JSONL import</h4> - <p class="text-muted"> - Import a file, where each line is a single Twitter v2 API response. Given that things changed a lot lately, - the format we assume might be outdated. - </p> - </div> - </div> - <div class="row"> - <div class="col" v-if="!!config"> - <template v-if="uploadsEnabled"> - <FilesUploader - :class="{ - 'is-valid': !v$.files.$error, - 'is-invalid': v$.files.$error, - }" - @filesUpdated="onFilesChange($event)" - /> - <div class="invalid-feedback" v-if="v$.files.$error"> - {{ errorsToString(v$.files) }} - </div> - </template> - <template v-else> - <h4>Uploaded files</h4> - <ul> - <li v-for="file in config.filenames" :key="file"> - {{ file }} - </li> - </ul> - </template> - </div> - </div> - </div> -</template> - -<script lang="ts"> -import type { PropType } from "vue"; -import { defineComponent } from "vue"; -import useVuelidate from "@vuelidate/core"; -import { required } from "@vuelidate/validators"; -import type { BaseValidation, ValidationRule } from "@vuelidate/core"; -import type { TwitterAPIFileImport } from "@/plugins/api/api-core"; -import FilesUploader from "@/components/FilesUploader.vue"; -import type { UploadFile } from "@/components/FilesUploader.vue"; -import { currentProjectStore } from "@/stores"; - -const areFilesUploaded: ValidationRule = { - $validator(value?: UploadFile[]) { - return ( - value !== undefined && - value.length > 0 && - value.every((file) => file.status === "SUCCESS" && file.serverPath !== undefined) - ); - }, - $message: "Files not uploaded yet.", -}; - -export default defineComponent({ - name: "ConfigJSONLTwitterAPI", - components: { FilesUploader }, - emits: ["configChanged"], - props: { - existingConfig: { - type: Object as PropType<TwitterAPIFileImport>, - required: false, - default: null, - }, - projectId: { - type: String, - required: false, - default: null, - }, - importId: { - type: String, - required: false, - default: null, - }, - editable: { - type: Boolean, - default: true, - }, - }, - setup() { - return { - v$: useVuelidate(), - }; - }, - data() { - const config: TwitterAPIFileImport = this.existingConfig ? this.existingConfig : this.emptyConfig(); - - if (!config.import_id && !!this.importId) { - config.import_id = this.importId; - } - - return { - files: [] as UploadFile[], - config, - }; - }, - methods: { - emptyConfig(): Partial<TwitterAPIFileImport> | undefined { - return { - func_name: "nacsos_lib.twitter.import.import_twitter_api", - encoding: "twitter-api-page", - filenames: [], - import_id: this.importId, - project_id: currentProjectStore.projectId, - }; - }, - errorsToString(field: BaseValidation): string { - return field.$errors.map((error) => error.$message).join("; "); - }, - onFilesChange(files: UploadFile[]) { - this.files = files; - const filenames = files.map((file) => file.serverPath).filter((filename) => !!filename); - this.config.filenames = filenames.length === 0 ? undefined : filenames; - }, - }, - computed: { - uploadsEnabled(): boolean { - return ( - this.editable && - this.config && - (this.config.filenames === undefined || this.config.filenames === null || this.config.filenames.length === 0) - ); - }, - }, - watch: { - config: { - handler(newValue: TwitterAPIFileImport) { - this.$emit("configChanged", newValue); - }, - deep: true, - }, - existingConfig: { - handler(newValue: TwitterAPIFileImport) { - this.config = newValue; - }, - deep: true, - }, - importId: { - handler(newValue: string) { - this.config.import_id = newValue; - }, - }, - }, - validations() { - return { - files: { required, areFilesUploaded, $autoDirty: true }, - }; - }, -}); -</script> - -<style scoped></style> diff --git a/src/components/imports/ConfigJSONLTwitterDb.vue b/src/components/imports/ConfigJSONLTwitterDb.vue deleted file mode 100644 index bcd020201f1dde7a2351d2fa0d2947f30e6116d7..0000000000000000000000000000000000000000 --- a/src/components/imports/ConfigJSONLTwitterDb.vue +++ /dev/null @@ -1,159 +0,0 @@ -<template> - <div class="m-2"> - <div class="row"> - <div class="col-xxl-7"> - <h4>TwitterItem file import</h4> - <p class="text-muted"> - Upload a file, where each line has the exact same encoding used by our database. In other words, each line in - this file is produced by - <code>nacsos_data.models.items.twitter.TwitterItemModel.dump_model_json()</code>. - </p> - </div> - </div> - <div class="row"> - <div class="col" v-if="!!config"> - <template v-if="uploadsEnabled"> - <FilesUploader - :class="{ - 'is-valid': !v$.files.$error, - 'is-invalid': v$.files.$error, - }" - @filesUpdated="onFilesChange($event)" - /> - <div class="invalid-feedback" v-if="v$.files.$error"> - {{ errorsToString(v$.files) }} - </div> - </template> - <template v-else> - <h4>Uploaded files</h4> - <ul> - <li v-for="file in config.filenames" :key="file"> - {{ file }} - </li> - </ul> - </template> - </div> - </div> - </div> -</template> - -<script lang="ts"> -import type { PropType } from "vue"; -import { defineComponent } from "vue"; -import useVuelidate from "@vuelidate/core"; -import { required } from "@vuelidate/validators"; -import type { BaseValidation, ValidationRule } from "@vuelidate/core"; -import type { TwitterDBFileImport } from "@/plugins/api/api-core"; -import FilesUploader from "@/components/FilesUploader.vue"; -import type { UploadFile } from "@/components/FilesUploader.vue"; -import { currentProjectStore } from "@/stores"; - -const areFilesUploaded: ValidationRule = { - $validator(value?: UploadFile[]) { - return ( - value !== undefined && - value.length > 0 && - value.every((file) => file.status === "SUCCESS" && file.serverPath !== undefined) - ); - }, - $message: "Files not uploaded yet.", -}; - -export default defineComponent({ - name: "ConfigJSONLTwitterDb", - components: { FilesUploader }, - emits: ["configChanged"], - props: { - existingConfig: { - type: Object as PropType<TwitterDBFileImport>, - required: false, - default: null, - }, - projectId: { - type: String, - required: false, - default: null, - }, - importId: { - type: String, - required: false, - default: null, - }, - editable: { - type: Boolean, - default: true, - }, - }, - setup() { - return { - v$: useVuelidate(), - }; - }, - data() { - const config: TwitterDBFileImport = this.existingConfig ? this.existingConfig : this.emptyConfig(); - - if (!config.import_id && !!this.importId) { - config.import_id = this.importId; - } - - return { - files: [] as UploadFile[], - config, - }; - }, - methods: { - emptyConfig(): Partial<TwitterDBFileImport> | undefined { - return { - func_name: "nacsos_lib.twitter.import.import_twitter_db", - encoding: "db-twitter-item", - filenames: [], - import_id: this.importId, - project_id: currentProjectStore.projectId, - }; - }, - errorsToString(field: BaseValidation): string { - return field.$errors.map((error) => error.$message).join("; "); - }, - onFilesChange(files: UploadFile[]) { - this.files = files; - const filenames = files.map((file) => file.serverPath).filter((filename) => !!filename); - this.config.filenames = filenames.length === 0 ? undefined : filenames; - }, - }, - computed: { - uploadsEnabled(): boolean { - return ( - this.editable && - this.config && - (this.config.filenames === undefined || this.config.filenames === null || this.config.filenames.length === 0) - ); - }, - }, - watch: { - config: { - handler(newValue: TwitterDBFileImport) { - this.$emit("configChanged", newValue); - }, - deep: true, - }, - existingConfig: { - handler(newValue: TwitterDBFileImport) { - this.config = newValue; - }, - deep: true, - }, - importId: { - handler(newValue: string) { - this.config.import_id = newValue; - }, - }, - }, - validations() { - return { - files: { required, areFilesUploaded, $autoDirty: true }, - }; - }, -}); -</script> - -<style scoped></style> diff --git a/src/components/imports/ConfigOpenAlex.vue b/src/components/imports/ConfigOpenAlex.vue index be40c30f0013da0dc0a828b97bf27b5376159509..46c2cddfc8596e901bc76ff2190b56f4b9cfdd59 100644 --- a/src/components/imports/ConfigOpenAlex.vue +++ b/src/components/imports/ConfigOpenAlex.vue @@ -42,14 +42,14 @@ <script lang="ts"> import type { PropType } from "vue"; import { defineComponent } from "vue"; -import { OpenAlexImport } from "@/plugins/api/api-core"; +import { type OpenAlexSolrImport, DefTypeEnum, OpEnum, SearchFieldEnum } from "@/plugins/api/types"; export default defineComponent({ name: "ConfigOpenAlex", emits: ["configChanged"], props: { existingConfig: { - type: Object as PropType<OpenAlexImport>, + type: Object as PropType<OpenAlexSolrImport>, required: false, default: null, }, @@ -69,36 +69,30 @@ export default defineComponent({ }, }, data() { - const config: OpenAlexImport = this.existingConfig + const config: OpenAlexSolrImport = this.existingConfig ? this.existingConfig : { - func_name: "nacsos_lib.academic.import.import_openalex", query: "", - def_type: OpenAlexImport.def_type.LUCENE, - field: OpenAlexImport.field.TITLE_ABSTRACT, - op: OpenAlexImport.op.AND, - project_id: this.projectId, - import_id: this.importId, + def_type: DefTypeEnum.LUCENE, + field: SearchFieldEnum.TITLE_ABSTRACT, + op: OpEnum.AND, }; if (!this.existingConfig) { this.$emit("configChanged", config); } - if (!config.import_id && !!this.importId) { - config.import_id = this.importId; - } return { config, }; }, watch: { config: { - handler(newValue: OpenAlexImport) { + handler(newValue: OpenAlexSolrImport) { this.$emit("configChanged", newValue); }, deep: true, }, existingConfig: { - handler(newValue: OpenAlexImport) { + handler(newValue: OpenAlexSolrImport) { this.config = newValue; }, deep: true, diff --git a/src/components/imports/ConfigScopus.vue b/src/components/imports/ConfigScopus.vue index c9e64b72f80d4293837317da0266c27be50b5346..9f339eebf12fd3d6c7b7696c2a5a83ee155379c5 100644 --- a/src/components/imports/ConfigScopus.vue +++ b/src/components/imports/ConfigScopus.vue @@ -29,7 +29,7 @@ <template v-else> <h4>Uploaded files</h4> <ul> - <li v-for="file in config.filenames" :key="file"> + <li v-for="file in config.sources" :key="file"> {{ file }} </li> </ul> @@ -45,10 +45,10 @@ import { defineComponent } from "vue"; import useVuelidate from "@vuelidate/core"; import { required } from "@vuelidate/validators"; import type { BaseValidation, ValidationRule } from "@vuelidate/core"; -import type { ScopusCSVImport } from "@/plugins/api/api-core"; +import { ImportConfigEnum, type ScopusImport } from "@/plugins/api/types"; import FilesUploader from "@/components/FilesUploader.vue"; import type { UploadFile } from "@/components/FilesUploader.vue"; -import { currentProjectStore } from "@/stores"; +import { isEmpty } from "@/util"; const areFilesUploaded: ValidationRule = { $validator(value?: UploadFile[]) { @@ -67,7 +67,7 @@ export default defineComponent({ emits: ["configChanged"], props: { existingConfig: { - type: Object as PropType<ScopusCSVImport>, + type: Object as PropType<ScopusImport>, required: false, default: null, }, @@ -92,53 +92,40 @@ export default defineComponent({ }; }, data() { - const config: ScopusCSVImport = this.existingConfig ? this.existingConfig : this.emptyConfig(); - - if (!config.import_id && !!this.importId) { - config.import_id = this.importId; - } - return { files: [] as UploadFile[], - config, + config: this.existingConfig + ? this.existingConfig + : ({ + kind: ImportConfigEnum.SCOPUS, + sources: [] as string[], + } as ScopusImport), }; }, methods: { - emptyConfig(): Partial<ScopusCSVImport> | undefined { - return { - func_name: "nacsos_lib.academic.import.import_scopus_csv_file", - filenames: [], - import_id: this.importId, - project_id: currentProjectStore.projectId, - }; - }, errorsToString(field: BaseValidation): string { return field.$errors.map((error) => error.$message).join("; "); }, onFilesChange(files: UploadFile[]) { this.files = files; - const filenames = files.map((file) => file.serverPath).filter((filename) => !!filename); - this.config.filenames = filenames.length === 0 ? undefined : filenames; + const sources = files.map((file) => file.serverPath).filter((source) => !!source); + this.config.sources = sources.length === 0 ? undefined : sources; }, }, computed: { uploadsEnabled(): boolean { - return ( - this.editable && - this.config && - (this.config.filenames === undefined || this.config.filenames === null || this.config.filenames.length === 0) - ); + return this.editable && this.config && isEmpty(this.config.sources); }, }, watch: { config: { - handler(newValue: ScopusCSVImport) { + handler(newValue: ScopusImport) { this.$emit("configChanged", newValue); }, deep: true, }, existingConfig: { - handler(newValue: ScopusCSVImport) { + handler(newValue: ScopusImport) { this.config = newValue; }, deep: true, diff --git a/src/components/imports/ConfigTwitter.vue b/src/components/imports/ConfigTwitter.vue deleted file mode 100644 index a6214592863718db1baabb79930b142134e378af..0000000000000000000000000000000000000000 --- a/src/components/imports/ConfigTwitter.vue +++ /dev/null @@ -1,330 +0,0 @@ -<template> - <div class="text-start"> - <h4> - <font-awesome-icon :icon="['fa-brands', 'twitter']" /> - Twitter Query Setup - </h4> - - <form class="row g-3"> - <div class="col-md-10"> - <label for="twitterQuery" class="form-label" - ><code>query</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/counts/integrate/build-a-query" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <input - type="text" - id="twitterQuery" - class="form-control" - :class="{ 'is-valid': !v$.config.query.$error, 'is-invalid': v$.config.query.$error }" - v-model="config.query" - :disabled="!editable" - required - /> - <div class="invalid-feedback" v-if="v$.config.query.$error"> - {{ errorsToString(v$.config.query) }} - </div> - </div> - - <div class="col-md-3"> - <label for="twitterMaxResults" class="form-label" - ><code>max_results</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <input - type="text" - id="twitterMaxResults" - class="form-control" - :class="{ 'is-valid': !v$.config.max_results.$error, 'is-invalid': v$.config.max_results.$error }" - v-model="config.max_results" - :disabled="!editable" - /> - <div class="invalid-feedback" v-if="v$.config.max_results.$error"> - {{ errorsToString(v$.config.max_results) }} - </div> - </div> - - <div class="col-md-6 col-lg-4"> - <label for="twitterNextToken" class="form-label" - ><code>next_token</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/search/integrate/paginate" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <input - type="text" - id="twitterNextToken" - class="form-control" - :class="{ 'is-valid': !v$.config.next_token.$error, 'is-invalid': v$.config.next_token.$error }" - v-model="config.next_token" - :disabled="!editable" - /> - <div class="invalid-feedback" v-if="v$.config.next_token.$error"> - {{ errorsToString(v$.config.next_token) }} - </div> - </div> - - <div class="col-md-6 col-lg-4"> - <label for="twitterSinceId" class="form-label" - ><code>since_id</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <input - type="text" - id="twitterSinceId" - class="form-control" - :class="{ 'is-valid': !v$.config.since_id.$error, 'is-invalid': v$.config.since_id.$error }" - v-model="config.since_id" - placeholder="Tweet ID" - :disabled="!editable" - /> - <div class="invalid-feedback" v-if="v$.config.since_id.$error"> - {{ errorsToString(v$.config.since_id) }} - </div> - </div> - - <div class="col-md-6 col-lg-4"> - <label for="twitterUntilId" class="form-label" - ><code>until_id</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <input - type="text" - id="twitterUntilId" - class="form-control" - :class="{ 'is-valid': !v$.config.until_id.$error, 'is-invalid': v$.config.until_id.$error }" - placeholder="Tweet ID" - v-model="config.until_id" - :disabled="!editable" - /> - <div class="invalid-feedback" v-if="v$.config.until_id.$error"> - {{ errorsToString(v$.config.until_id) }} - </div> - </div> - - <div class="col-md-6 col-lg-4"> - <label for="twitterStartTime" class="form-label" - ><code>start_time</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <input - type="text" - id="twitterStartTime" - class="form-control" - :class="{ 'is-valid': !v$.config.start_time.$error, 'is-invalid': v$.config.start_time.$error }" - placeholder="YYYY-MM-DDTHH:mm:ssZ" - v-model="config.start_time" - :disabled="!editable" - /> - <div class="invalid-feedback" v-if="v$.config.start_time.$error"> - {{ errorsToString(v$.config.start_time) }} - </div> - </div> - - <div class="col-md-6 col-lg-4"> - <label for="twitterEndTime" class="form-label" - ><code>end_time</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <input - type="text" - id="twitterEndTime" - class="form-control" - v-model="config.end_time" - :disabled="!editable" - placeholder="YYYY-MM-DDTHH:mm:ssZ" - :class="{ 'is-valid': !v$.config.end_time.$error, 'is-invalid': v$.config.end_time.$error }" - /> - <div class="invalid-feedback" v-if="v$.config.end_time.$error"> - {{ errorsToString(v$.config.end_time) }} - </div> - </div> - - <div class="col-md-4"> - <label for="twitterSortOrder" class="form-label" - ><code>sort_order</code> - <a - href="https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" - target="_blank" - rel="noopener noreferrer" - aria-label="Help" - > - <font-awesome-icon :icon="['fas', 'circle-question']" class="text-muted" /> - </a> - </label> - <select - class="form-select" - id="twitterSortOrder" - aria-describedby="twitterSortOrder" - v-model="config.sort_order" - :disabled="!editable" - > - <option value="relevancy">Relevance</option> - <option value="recency">Recency</option> - </select> - </div> - </form> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import type { PropType } from "vue"; -import useVuelidate from "@vuelidate/core"; -import type { BaseValidation, ValidationRule } from "@vuelidate/core"; -import { required, between, alphaNum, integer } from "@vuelidate/validators"; -import type { ImportConfigTwitter } from "@/plugins/api/api-core"; - -const isValidISO8601: ValidationRule = { - $validator(value: string): boolean { - // first, check whether value is set - if (!value) { - return false; - } - - // see if value matches regex - const iso8601 = /^(2\d{3})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/m; // YYYY-MM-DDTHH:mm:ssZ - const matches = iso8601.exec(value); - if (!matches || matches.length !== 7) { - return false; - } - - // convert match groups to date and check if converting it back results in the same value - const date = new Date( - Date.UTC( - parseInt(matches[1], 10), // year - parseInt(matches[2], 10) - 1, // month - parseInt(matches[3], 10), // date - parseInt(matches[4], 10), // hours - parseInt(matches[5], 10), // minutes - parseInt(matches[6], 10), // seconds - ), - ); - return `${date.toISOString().slice(0, 19)}Z` === value; - }, - $message: "Wrong data format. Needs YYYY-MM-DDTHH:mm:ssZ", -}; - -const isValidSortOrder: ValidationRule = { - $validator(value?: ImportConfigTwitter.sort_order) { - return value !== undefined; - }, - $message: "Not a valid sort order", -}; - -export default defineComponent({ - name: "ConfigTwitter", - emits: ["configChanged"], - props: { - existingConfig: { - type: Object as PropType<ImportConfigTwitter>, - required: true, - default: null, - }, - editable: { - type: Boolean, - default: true, - }, - }, - setup() { - return { - v$: useVuelidate(), - }; - }, - data() { - const config: ImportConfigTwitter = this.existingConfig - ? this.existingConfig - : ({ - query: "", - max_results: undefined, - next_token: undefined, - since_id: undefined, - until_id: undefined, - sort_order: "recency", - start_time: undefined, - end_time: undefined, - } as ImportConfigTwitter); - if (!this.existingConfig) { - this.$emit("configChanged", config); - } - return { - config, - }; - }, - validations() { - return { - config: { - query: { required, $autoDirty: true }, - max_results: { integer, between: between(10, 500), $autoDirty: true }, - next_token: { alphaNum, $autoDirty: true }, - since_id: { integer, $autoDirty: true }, - until_id: { integer, $autoDirty: true }, - sort_order: { isValidSortOrder, $autoDirty: true }, - start_time: { isValidISO8601, $autoDirty: true }, - end_time: { isValidISO8601, $autoDirty: true }, - }, - }; - }, - methods: { - errorsToString(field: BaseValidation) { - return field.$errors.map((error) => error.$message).join("; "); - }, - }, - watch: { - config: { - handler(newValue: ImportConfigTwitter) { - this.$emit("configChanged", newValue); - }, - deep: true, - }, - }, -}); -</script> - -<style scoped></style> diff --git a/src/components/imports/ConfigWoS.vue b/src/components/imports/ConfigWoS.vue index b578227642a5f843563e11306ef72472b938688e..315cf541f4b81121c3f0379ef727f97d20e62dbf 100644 --- a/src/components/imports/ConfigWoS.vue +++ b/src/components/imports/ConfigWoS.vue @@ -46,10 +46,9 @@ import { defineComponent } from "vue"; import useVuelidate from "@vuelidate/core"; import { required } from "@vuelidate/validators"; import type { BaseValidation, ValidationRule } from "@vuelidate/core"; -import type { WOSImport } from "@/plugins/api/api-core"; +import { ImportConfigEnum, type WoSImport } from "@/plugins/api/types"; import FilesUploader from "@/components/FilesUploader.vue"; import type { UploadFile } from "@/components/FilesUploader.vue"; -import { currentProjectStore } from "@/stores"; const areFilesUploaded: ValidationRule = { $validator(value?: UploadFile[]) { @@ -68,7 +67,7 @@ export default defineComponent({ emits: ["configChanged"], props: { existingConfig: { - type: Object as PropType<WOSImport>, + type: Object as PropType<WoSImport>, required: false, default: null, }, @@ -93,26 +92,17 @@ export default defineComponent({ }; }, data() { - const config: WOSImport = this.existingConfig ? this.existingConfig : this.emptyConfig(); - - if (!config.import_id && !!this.importId) { - config.import_id = this.importId; - } - return { files: [] as UploadFile[], - config, + config: this.existingConfig + ? this.existingConfig + : ({ + kind: ImportConfigEnum.WOS, + sources: [] as string[], + } as WoSImport), }; }, methods: { - emptyConfig(): Partial<WOSImport> | undefined { - return { - func_name: "nacsos_lib.academic.import.import_wos_file", - filenames: [], - import_id: this.importId, - project_id: currentProjectStore.projectId, - }; - }, errorsToString(field: BaseValidation): string { return field.$errors.map((error) => error.$message).join("; "); }, @@ -133,13 +123,13 @@ export default defineComponent({ }, watch: { config: { - handler(newValue: WOSImport) { + handler(newValue: WoSImport) { this.$emit("configChanged", newValue); }, deep: true, }, existingConfig: { - handler(newValue: WOSImport) { + handler(newValue: WoSImport) { this.config = newValue; }, deep: true, diff --git a/src/components/items/AcademicItem.vue b/src/components/items/AcademicItem.vue index 15e2d538e69266d07e663c45e4b9ca6465545b73..fae260558409637386df36afcf383a034f7818e1 100644 --- a/src/components/items/AcademicItem.vue +++ b/src/components/items/AcademicItem.vue @@ -68,12 +68,7 @@ import { defineComponent } from "vue"; import type { PropType } from "vue"; import InlineToolTip from "@/components/InlineToolTip.vue"; -import type { - AcademicAuthorModel, - AcademicItemModel, - AffiliationModel, - HighlighterModel, -} from "@/plugins/api/api-core"; +import type { AcademicAuthorModel, AcademicItemModel, AffiliationModel, HighlighterModel } from "@/plugins/api/types"; import { interfaceSettingsStore } from "@/stores"; import TextComponent from "@/components/items/TextComponent.vue"; diff --git a/src/components/items/AnyItem.vue b/src/components/items/AnyItem.vue index 58868d9ca87d69e1885568226c364e1091def908..a6202d74b6ff443118c7fd54ecb8a35c8a873146 100644 --- a/src/components/items/AnyItem.vue +++ b/src/components/items/AnyItem.vue @@ -7,7 +7,7 @@ import { defineAsyncComponent, defineComponent, markRaw } from "vue"; import type { PropType, Component } from "vue"; import type { AnyItem } from "@/types/items.d"; import { useCurrentProjectStore } from "@/stores/CurrentProjectStore"; -import type { HighlighterModel, ItemType, ProjectModel } from "@/plugins/api/api-core"; +import type { HighlighterModel, ItemType, ProjectModel } from "@/plugins/api/types"; type TypeMapType = { [key in ItemType]: Component }; diff --git a/src/components/items/GenericItem.vue b/src/components/items/GenericItem.vue index a7ff3dc49936f93bbf25cb4ca3d741df0958246d..aed5153facb2acfb3957adc61f6bcc01010ecb78 100644 --- a/src/components/items/GenericItem.vue +++ b/src/components/items/GenericItem.vue @@ -34,7 +34,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { HighlighterModel } from "@/plugins/api/api-core"; +import type { HighlighterModel } from "@/plugins/api/types"; import type { BaseItem as BaseItemModel } from "@/types/items.d"; import TextComponent from "@/components/items/TextComponent.vue"; diff --git a/src/components/items/ItemModal.vue b/src/components/items/ItemModal.vue index 4c50eb5f9d375082169f782cd181840abd16b693..7c9a5729be578f3b2e2af2da63af9269c99a0ff1 100644 --- a/src/components/items/ItemModal.vue +++ b/src/components/items/ItemModal.vue @@ -45,7 +45,7 @@ import { defineComponent } from "vue"; import type { AnyItem } from "@/types/items"; import { API } from "@/plugins/api"; import { currentProjectStore } from "@/stores"; -import type { CancelablePromise } from "@/plugins/api/core/CancelablePromise"; +import type { CancelablePromise } from "@/plugins/api/spec/core/CancelablePromise"; import AnyItemComponent from "@/components/items/AnyItem.vue"; type ItemModalData = { @@ -75,7 +75,7 @@ export default defineComponent({ methods: { getItemInfo(itemId: string) { this.itemInfo = null; - this.requestPromise = API.core.project + this.requestPromise = API.project .getDetailForItemApiProjectItemsDetailItemIdGet({ itemId, xProjectId: currentProjectStore.projectId as string, diff --git a/src/components/items/LexisNexisItem.vue b/src/components/items/LexisNexisItem.vue index 21c5ad0f18f308fcaa3b1f49921b29ee4cf08605..325afe3e81ab270a56feade1e604a8f73e19ecd5 100644 --- a/src/components/items/LexisNexisItem.vue +++ b/src/components/items/LexisNexisItem.vue @@ -65,7 +65,7 @@ import { defineComponent } from "vue"; import type { PropType } from "vue"; import InlineToolTip from "@/components/InlineToolTip.vue"; -import type { FullLexisNexisItemModel, HighlighterModel } from "@/plugins/api/api-core"; +import type { FullLexisNexisItemModel, HighlighterModel } from "@/plugins/api/types"; import { interfaceSettingsStore } from "@/stores"; import TextComponent from "@/components/items/TextComponent.vue"; diff --git a/src/components/items/TextComponent.vue b/src/components/items/TextComponent.vue index 737da57a64d1253319526008eb2a41eeb1d28f74..52269249921ca9477aa8c6ff60a3ae60e3aa30d5 100644 --- a/src/components/items/TextComponent.vue +++ b/src/components/items/TextComponent.vue @@ -15,7 +15,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { HighlighterModel } from "@/plugins/api/api-core"; +import type { HighlighterModel } from "@/plugins/api/types"; import { interfaceSettingsStore } from "@/stores"; import { marked } from "marked"; diff --git a/src/components/items/TwitterItem.vue b/src/components/items/TwitterItem.vue index 0b8f55556cc6dea27ff83ce792bd798b86347675..67852572cf6de6b871f003530205592313238bd0 100644 --- a/src/components/items/TwitterItem.vue +++ b/src/components/items/TwitterItem.vue @@ -40,7 +40,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import type { PropType } from "vue"; -import type { HighlighterModel, TwitterItemModel, Hashtag, Mention, URL } from "@/plugins/api/api-core"; +import type { HighlighterModel, TwitterItemModel, Hashtag, Mention, URL } from "@/plugins/api/types"; import TextComponent from "@/components/items/TextComponent.vue"; interface Replacement { diff --git a/src/components/pipelines/NestedExpandableComponent.vue b/src/components/pipelines/NestedExpandableComponent.vue deleted file mode 100644 index f9eef766d5cd67fdd4b9b1b1ff3e5ff89f995ca8..0000000000000000000000000000000000000000 --- a/src/components/pipelines/NestedExpandableComponent.vue +++ /dev/null @@ -1,70 +0,0 @@ -<template> - <div class="border-start ps-3"> - <ul class="list-unstyled"> - <li v-for="(subtree, key) in tree" :key="key"> - <template v-if="$util.isFunctionInfo(subtree)"> - <code>{{ subtree.function }}(⋅)</code><br /> - <span>{{ subtree.name }}</span> - <font-awesome-icon - role="button" - class="ms-1 text-muted" - :icon="['fas', 'circle-info']" - @click="$emit('showInfo', subtree)" - /> - <font-awesome-icon - role="button" - class="text-muted ms-1" - :icon="['fas', 'wrench']" - @click="$emit('useFunc', subtree)" - /> - </template> - <template v-else-if="typeof subtree === 'object'"> - <span @click="opened[key] = !opened[key]" role="button" tabindex="-1"> - <font-awesome-icon - class="text-muted" - style="margin-left: -0.3em" - :icon="['fas', opened[key] ? 'caret-down' : 'caret-right']" - /> - {{ key }} - </span> - <div v-show="opened[key]"> - <NestedExpandableComponent - :tree="subtree" - @showInfo="$emit('showInfo', $event)" - @useFunc="$emit('useFunc', $event)" - /> - </div> - </template> - </li> - </ul> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import type { PropType } from "vue"; -import type { NestedLibrary } from "@/types/pipelines.d"; -import type { FunctionInfo } from "@/plugins/api/api-pipe"; - -export default defineComponent({ - name: "NestedExpandableComponent", - emits: { - showInfo: (info: FunctionInfo) => info, - useFunc: (info: FunctionInfo) => info, - }, - props: { - tree: { - type: Object as PropType<NestedLibrary>, - optional: false, - default: null, - }, - }, - data() { - return { - opened: Object.fromEntries(Object.keys(this.tree).map((key: string) => [key, true])), - }; - }, -}); -</script> - -<style scoped></style> diff --git a/src/components/pipelines/TaskConfig.vue b/src/components/pipelines/TaskConfig.vue deleted file mode 100644 index 360c9d52a5163d2a2ad905c0ee00e4f173651a88..0000000000000000000000000000000000000000 --- a/src/components/pipelines/TaskConfig.vue +++ /dev/null @@ -1,253 +0,0 @@ -<template> - <div class="card"> - <div class="card-header small d-flex" tabindex="0" role="button" @click="expanded = !expanded"> - <strong class="small">{{ config.task.task_id.slice(0, 6) }}..</strong> - <code - >{{ config.info.module }}.<strong>{{ config.info.function }}(⋅)</strong></code - > - <font-awesome-icon - role="button" - class="ms-1 text-muted" - :icon="['fas', 'circle-info']" - @click.stop="$emit('showInfo', config.info)" - /> - <!-- TODO set force_run --> - <font-awesome-icon class="text-muted ms-2 text-warning" :icon="['fas', 'toggle-off']" /> - <font-awesome-icon class="text-muted ms-auto" :icon="['fas', expanded ? 'minus' : 'plus']" /> - </div> - - <div class="card-body" v-if="expanded"> - <div class="row g-2 row-cols-auto"> - <div class="col" v-for="(dtype, key) in config.info.kwargs" :key="key"> - <template v-if="isPrimitiveType(dtype)"> - <label :for="`tk-${key}`" class="border ps-1 w-100 border-bottom-0"> - <code - ><strong>{{ key }}:</strong><span v-if="!dtype.optional">*</span><br /> - {{ $util.type2str(dtype) }}</code - > - <InlineToolTip v-if="dtype.dtype[0] === 'str'" info="Paste project ID"> - <font-awesome-icon - role="button" - class="text-muted ms-2 text-warning" - :icon="['fas', 'hands-holding-circle']" - @click="taskParams[key] = currentProjectId" - /> - </InlineToolTip> - <InlineToolTip v-if="dtype.dtype[0] === 'str'" info="Paste user ID"> - <font-awesome-icon - role="button" - class="text-muted ms-2 text-warning" - :icon="['fas', 'hands-holding-child']" - @click="taskParams[key] = currentUserId" - /> - </InlineToolTip> - </label> - <input - :type="dtype2input(dtype)" - :id="`tk-${key}`" - class="form-control" - :aria-label="key" - :class="dtype2input(dtype) === 'checkbox' ? 'form-check-input' : 'form-control'" - v-model="taskParams[key]" - /> - <span v-if="dtype2input(dtype) === 'checkbox'"> - {{ taskParams[key] === undefined ? "None" : taskParams[key] }} - </span> - </template> - - <template v-else-if="dtype.artefact"> - <div class="border ps-1 w-100 border-bottom-0"> - <code> - <strong>{{ key }}:</strong><span v-if="!dtype.optional">*</span><br />{{ $util.type2str(dtype) }} - </code> - </div> - <div class="d-flex flex-row align-items-center border ps-1 border-top-0" style="gap: 1em"> - <font-awesome-icon - role="button" - class="btn btn-outline-secondary m-1 btn-sm" - :icon="['fas', 'crosshairs']" - @click="pickReference(key, dtype.artefact)" - /> - <ul class="list-unstyled small text-muted m-0"> - <li><strong>Task:</strong> {{ taskParams[key]?.task_id || "[REF?]" }}</li> - <li><strong>Artefact:</strong> {{ taskParams[key]?.artefact || "[REF?]" }}</li> - </ul> - </div> - </template> - - <template v-else-if="isList(dtype)"> - <label :for="`tk-${key}`" class="border ps-1 w-100 border-bottom-0"> - <code - ><strong>{{ key }}:</strong><span v-if="!dtype.optional">*</span><br /> - {{ $util.type2str(dtype) }}</code - > - </label> - <ul v-if="!$util.isEmpty(taskParams[key])"> - <li v-for="(val, it) in taskParams[key]" :key="`${it}-${val}`">{{ val }}</li> - </ul> - <div class="d-flex flex-row align-items-center"> - <input - :type="getListInputType(dtype)" - :id="`tk-${key}`" - :aria-label="key" - :class="getListInputType(dtype) === 'checkbox' ? 'form-check-input' : 'form-control'" - v-model="taskParams[`__${key}-value`]" - /> - <font-awesome-icon - role="button" - class="btn btn-sm m-1 text-muted" - :icon="['far', 'square-plus']" - @click="addListEntry(key)" - :class="{ disabled: taskParams[`__${key}-value`] === undefined }" - /> - </div> - </template> - - <template v-else-if="isLiteral(dtype)"> - <label :for="`tk-${key}`" class="border ps-1 w-100 border-bottom-0"> - <code - ><strong>{{ key }}:</strong><span v-if="!dtype.optional">*</span><br /> - {{ $util.type2str(dtype) }}</code - > - </label> - <select :id="`tk-${key}`" class="form-select" v-model="taskParams[key]"> - <option v-for="opt in getLiteralOptions(dtype)" :key="opt" :value="opt">{{ opt }}</option> - </select> - </template> - - <template v-else> - <!-- v-else-if="isComplex(dtype)" --> - <div class="border ps-1 w-100 border-bottom-0"> - <code> - <strong>{{ key }}:</strong><span v-if="!dtype.optional">*</span><br />{{ $util.type2str(dtype) }} - </code> - </div> - <span class="text-warning">Complex parameters not implemented yet.</span> - </template> - </div> - </div> - </div> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import type { PropType } from "vue"; -import type { ArtefactCallback, TaskConfig as TaskConfigInterface } from "@/types/pipelines.d"; -import { isArtefactOrSerializedArtefact, isFunctionInfo } from "@/util/typeChecks"; -import { currentProjectStore, currentUserStore } from "@/stores"; -import InlineToolTip from "@/components/InlineToolTip.vue"; -import type { FunctionInfo, SerializedArtefact, KWARG } from "@/plugins/api/api-pipe"; - -export default defineComponent({ - name: "TaskConfig", - components: { InlineToolTip }, - emits: { - showInfo: (info: FunctionInfo) => isFunctionInfo(info), - pickArtefactReference: (artefact: SerializedArtefact, cb: ArtefactCallback) => - isArtefactOrSerializedArtefact(artefact) && !!cb, - // TODO remove config from list again - }, - props: { - config: { - type: Object as PropType<TaskConfigInterface>, - default: null, - }, - }, - data() { - return { - currentProjectId: currentProjectStore.projectId, - currentUserId: currentUserStore.user?.user_id, - expanded: true, - taskParams: Object.fromEntries( - Object.entries(this.config.info.kwargs) - .map((entry) => { - const [key, dtype] = entry as [string, KWARG]; - if (this.isPrimitiveType(dtype)) { - return [[key, this.getTypedPrimitive(dtype.dtype[0], dtype.default)]]; - } - if (this.isLiteral(dtype)) { - return [[key, this.getTypedPrimitive("str", dtype.default)]]; - } - if (this.isList(dtype)) { - return [ - [key, undefined], - [`__${key}-value`, this.getTypedPrimitive(this.getListType(dtype), dtype.default)], - ]; - } - return []; - }) - .flat(1), - ), - }; - }, - methods: { - getTaskParams() { - return JSON.parse( - JSON.stringify( - Object.fromEntries( - Object.entries(this.taskParams).filter((entry) => { - const [key, value] = entry; - return !key.startsWith("__") && !key.endsWith("-value") && value !== undefined; - }), - ), - ), - ); - }, - getTypedPrimitive(dt: string, defaultValue: unknown): string | boolean | number { - if (dt === "int" || dt === "float") return defaultValue as number; - if (dt === "bool") return !!defaultValue as boolean; - // if (dt === 'str') - return defaultValue as string; - }, - isPrimitiveType(dtype: KWARG): boolean { - return ( - dtype.dtype.length === 1 && - (dtype.dtype[0] === "int" || - dtype.dtype[0] === "float" || - dtype.dtype[0] === "str" || - dtype.dtype[0] === "bool") - ); - }, - dtype2input(dtype: KWARG): string { - if (dtype.dtype[0] === "int" || dtype.dtype[0] === "float") return "number"; - if (dtype.dtype[0] === "bool") return "checkbox"; - return "text"; - }, - isLiteral(dtype: KWARG): boolean { - return !!dtype.options; - }, - isList(dtype: KWARG): boolean { - return dtype.dtype[0] === "list"; - }, - getListType(dtype: KWARG): string { - if (!dtype.generics) return "str"; - return dtype.generics[0]; - }, - getListInputType(dtype: KWARG): string { - return this.dtype2input({ dtype: [this.getListType(dtype)] }); - }, - getLiteralOptions(dtype: KWARG): string[] { - if (dtype.options) { - return dtype.options; - } - return []; - }, - addListEntry(key: string) { - if (this.taskParams[key] === undefined) this.taskParams[key] = []; - this.taskParams[key].push(this.taskParams[`__${key}-value`]); - this.taskParams[`__${key}-value`] = undefined; - }, - pickReference(key: string, artefact: SerializedArtefact) { - this.$emit("pickArtefactReference", [ - artefact, - (artefactRef: SerializedArtefact) => { - this.taskParams[key] = artefactRef; - }, - ]); - }, - }, -}); -</script> - -<style scoped></style> diff --git a/src/components/users/PermissionSettingsCard.vue b/src/components/users/PermissionSettingsCard.vue index 34804e94d82628f70d9aaf18f033df823691cb10..df3eecebe338398c657dd19edbcefa2b8dd1c3c1 100644 --- a/src/components/users/PermissionSettingsCard.vue +++ b/src/components/users/PermissionSettingsCard.vue @@ -92,14 +92,14 @@ import { defineComponent } from "vue"; import type { PropType } from "vue"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; -import type { UserPermission } from "@/plugins/api/api-core"; import ExpandableBox from "@/components/ExpandableBox.vue"; import { ProjectPermissionHints, PermissionPresets } from "@/types/permissions"; import type { Permissions, PermissionKeys } from "@/types/permissions"; -import { EventBus } from "@/plugins/events"; -import { ToastEvent } from "@/plugins/events/events/toast"; import { currentProjectStore } from "@/stores"; import { API } from "@/plugins/api"; +import type { UserPermission } from "@/plugins/api/types"; +import { EventBus } from "@/plugins/events"; +import { ToastEvent } from "@/plugins/events/events/toast"; import { ConfirmationRequestEvent } from "@/plugins/events/events/confirmation"; type PermissionSettingsData = { @@ -133,7 +133,7 @@ export default defineComponent({ }); }, saveUser() { - API.core.project + API.project .saveProjectPermissionApiProjectPermissionsPermissionPut({ requestBody: this.permission, xProjectId: currentProjectStore.projectId as string, @@ -152,7 +152,7 @@ export default defineComponent({ "Do you really want to remove access for this user?", (confirmationResponse) => { if (confirmationResponse === "ACCEPT") { - API.core.project + API.project .removeProjectPermissionApiProjectPermissionsPermissionDelete({ projectPermissionId: this.permission.project_permission_id as string, xProjectId: currentProjectStore.projectId as string, diff --git a/src/components/users/PermissionSettingsCardReadOnly.vue b/src/components/users/PermissionSettingsCardReadOnly.vue index 84ec13df1504c6a0ccbf1927ceb35635882378ef..461288b42c0521f0bd0f286fffcec20fe28354cd 100644 --- a/src/components/users/PermissionSettingsCardReadOnly.vue +++ b/src/components/users/PermissionSettingsCardReadOnly.vue @@ -20,7 +20,7 @@ <script lang="ts"> import type { PropType } from "vue"; import { defineComponent } from "vue"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectPermissionsModel } from "@/plugins/api/types"; import type { PermissionKeys } from "@/types/permissions"; import { ProjectPermissionHints } from "@/types/permissions"; diff --git a/src/components/users/UserSearchBox.vue b/src/components/users/UserSearchBox.vue index bc9376fc367853e000a78dcf1f63c926b97411f4..c533ca446bbf7c269e67bda42719aea852bb1222 100644 --- a/src/components/users/UserSearchBox.vue +++ b/src/components/users/UserSearchBox.vue @@ -34,7 +34,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; -import type { UserBaseModel } from "@/plugins/api/api-core"; +import type { UserBaseModel } from "@/plugins/api/types"; import { currentProjectStore } from "@/stores"; import { API } from "@/plugins/api"; import { EventBus } from "@/plugins/events"; @@ -66,7 +66,7 @@ export default defineComponent({ }, mounted() { if (this.projectId) { - API.core.users + API.users .getProjectUsersApiUsersListProjectProjectIdGet({ xProjectId: currentProjectStore.projectId as string, projectId: currentProjectStore.projectId as string, @@ -78,7 +78,7 @@ export default defineComponent({ EventBus.emit(new ToastEvent("WARN", "Failed to load list of users.")); }); } else { - API.core.users + API.users .getAllUsersApiUsersListAllGet() .then((response) => { this.users = response.data; diff --git a/src/main.ts b/src/main.ts index 052338cdb9c9253a59b80554771c048a980b59f5..556076b2203ba6922aa11084c76faa1c4413eb25 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,7 +13,6 @@ import router from "@/router"; import util from "@/util"; import EventBusPlugin from "@/plugins/events"; import initEventHandlers from "@/plugins/events/EventHandlers"; -import RequestGatewayPlugin from "@/plugins/api"; import App from "./App.vue"; // set up font awesome @@ -28,7 +27,6 @@ initEventHandlers(); const app = createApp(App) .use(util) .use(pinia) - .use(RequestGatewayPlugin) .use(EventBusPlugin) .use(router) .component("font-awesome-icon", FontAwesomeIcon) diff --git a/src/plugins/api/api-core/CoreClient.ts b/src/plugins/api/api-core/CoreClient.ts deleted file mode 100644 index 830afcb81c183a1327fcc8b3ba8226898c77acb9..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/CoreClient.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; -import type { OpenAPIConfig } from '@/plugins/api/core/OpenAPI'; -import { AxiosHttpRequest } from '@/plugins/api/core/AxiosHttpRequest'; - -import { AnnotationsService } from './services/AnnotationsService'; -import { DefaultService } from './services/DefaultService'; -import { EvaluationService } from './services/EvaluationService'; -import { EventsService } from './services/EventsService'; -import { ExportService } from './services/ExportService'; -import { HighlightersService } from './services/HighlightersService'; -import { ImportsService } from './services/ImportsService'; -import { MailingService } from './services/MailingService'; -import { OauthService } from './services/OauthService'; -import { ProjectService } from './services/ProjectService'; -import { ProjectsService } from './services/ProjectsService'; -import { SearchService } from './services/SearchService'; -import { StatsService } from './services/StatsService'; -import { UsersService } from './services/UsersService'; - -type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; - -export class CoreClient { - - public readonly annotations: AnnotationsService; - public readonly default: DefaultService; - public readonly evaluation: EvaluationService; - public readonly events: EventsService; - public readonly export: ExportService; - public readonly highlighters: HighlightersService; - public readonly imports: ImportsService; - public readonly mailing: MailingService; - public readonly oauth: OauthService; - public readonly project: ProjectService; - public readonly projects: ProjectsService; - public readonly search: SearchService; - public readonly stats: StatsService; - public readonly users: UsersService; - - public readonly request: BaseHttpRequest; - - constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = AxiosHttpRequest) { - this.request = new HttpRequest({ - BASE: config?.BASE ?? '/nacsos-core', - VERSION: config?.VERSION ?? '0.1.0', - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, - CREDENTIALS: config?.CREDENTIALS ?? 'include', - TOKEN: config?.TOKEN, - USERNAME: config?.USERNAME, - PASSWORD: config?.PASSWORD, - HEADERS: config?.HEADERS, - ENCODE_PATH: config?.ENCODE_PATH, - }); - - this.annotations = new AnnotationsService(this.request); - this.default = new DefaultService(this.request); - this.evaluation = new EvaluationService(this.request); - this.events = new EventsService(this.request); - this.export = new ExportService(this.request); - this.highlighters = new HighlightersService(this.request); - this.imports = new ImportsService(this.request); - this.mailing = new MailingService(this.request); - this.oauth = new OauthService(this.request); - this.project = new ProjectService(this.request); - this.projects = new ProjectsService(this.request); - this.search = new SearchService(this.request); - this.stats = new StatsService(this.request); - this.users = new UsersService(this.request); - } -} - diff --git a/src/plugins/api/api-core/index.ts b/src/plugins/api/api-core/index.ts deleted file mode 100644 index 94437dd8ccf29ba459e6ccd2e438443c92ebd6ec..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/index.ts +++ /dev/null @@ -1,252 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export { CoreClient } from './CoreClient'; - - -export type { AcademicAuthorModel } from './models/AcademicAuthorModel'; -export type { AcademicItemImport } from './models/AcademicItemImport'; -export type { AcademicItemModel } from './models/AcademicItemModel'; -export type { AffiliationModel } from './models/AffiliationModel'; -export type { AnnotatedItem } from './models/AnnotatedItem'; -export type { AnnotationFilter } from './models/AnnotationFilter'; -export type { AnnotationItem } from './models/AnnotationItem'; -export type { AnnotationModel } from './models/AnnotationModel'; -export type { AnnotationQualityModel } from './models/AnnotationQualityModel'; -export type { AnnotationSchemeInfo } from './models/AnnotationSchemeInfo'; -export { AnnotationSchemeLabel } from './models/AnnotationSchemeLabel'; -export type { AnnotationSchemeLabelChoice } from './models/AnnotationSchemeLabelChoice'; -export type { AnnotationSchemeLabelChoiceFlat } from './models/AnnotationSchemeLabelChoiceFlat'; -export type { AnnotationSchemeModel } from './models/AnnotationSchemeModel'; -export type { AnnotationSchemeModelFlat } from './models/AnnotationSchemeModelFlat'; -export type { AnnotationTrackerModel } from './models/AnnotationTrackerModel'; -export type { AnnotationValue } from './models/AnnotationValue'; -export type { AssignmentCounts } from './models/AssignmentCounts'; -export type { AssignmentFilter } from './models/AssignmentFilter'; -export type { AssignmentInfo } from './models/AssignmentInfo'; -export type { AssignmentInfoLabel } from './models/AssignmentInfoLabel'; -export type { AssignmentModel } from './models/AssignmentModel'; -export type { AssignmentScopeEntry } from './models/AssignmentScopeEntry'; -export type { AssignmentScopeModel } from './models/AssignmentScopeModel'; -export type { AssignmentScopeRandomConfig } from './models/AssignmentScopeRandomConfig'; -export type { AssignmentScopeRandomWithExclusionConfig } from './models/AssignmentScopeRandomWithExclusionConfig'; -export type { AssignmentScopeRandomWithNQLConfig } from './models/AssignmentScopeRandomWithNQLConfig'; -export { AssignmentStatus } from './models/AssignmentStatus'; -export type { AuthTokenModel } from './models/AuthTokenModel'; -export type { BasicProjectStats } from './models/BasicProjectStats'; -export type { Body_login_for_access_token_api_login_token_post } from './models/Body_login_for_access_token_api_login_token_post'; -export type { Body_save_resolved_annotations_api_annotations_config_resolve__put } from './models/Body_save_resolved_annotations_api_annotations_config_resolve__put'; -export type { BotAnnotationMetaDataBaseModel } from './models/BotAnnotationMetaDataBaseModel'; -export type { BotAnnotationModel } from './models/BotAnnotationModel'; -export type { BotAnnotationResolution } from './models/BotAnnotationResolution'; -export { BotKind } from './models/BotKind'; -export type { BotMetaInfo } from './models/BotMetaInfo'; -export { BotMetaResolve } from './models/BotMetaResolve'; -export { BotMetaResolveBase } from './models/BotMetaResolveBase'; -export type { Cashtag } from './models/Cashtag'; -export type { ContextAnnotation } from './models/ContextAnnotation'; -export type { DehydratedAnnotationTracker } from './models/DehydratedAnnotationTracker'; -export type { DehydratedAssignment } from './models/DehydratedAssignment'; -export type { DehydratedUser } from './models/DehydratedUser'; -export { Event } from './models/Event'; -export type { ExampleEvent } from './models/ExampleEvent'; -export type { ExampleSubEvent } from './models/ExampleSubEvent'; -export type { ExportRequest } from './models/ExportRequest'; -export { FieldFilter } from './models/FieldFilter'; -export { FieldFilters } from './models/FieldFilters'; -export { FlatLabel } from './models/FlatLabel'; -export type { FlatLabelChoice } from './models/FlatLabelChoice'; -export { FlattenedAnnotationSchemeLabel } from './models/FlattenedAnnotationSchemeLabel'; -export type { FullLexisNexisItemModel } from './models/FullLexisNexisItemModel'; -export type { GenericItemModel } from './models/GenericItemModel'; -export type { Hashtag } from './models/Hashtag'; -export type { HighlighterModel } from './models/HighlighterModel'; -export type { HistogramEntry } from './models/HistogramEntry'; -export type { HTTPValidationError } from './models/HTTPValidationError'; -export type { IEUUID } from './models/IEUUID'; -export { ImportConfigTwitter } from './models/ImportConfigTwitter'; -export type { ImportFilter } from './models/ImportFilter'; -export type { ImportModel } from './models/ImportModel'; -export type { ItemAnnotation } from './models/ItemAnnotation'; -export { ItemType } from './models/ItemType'; -export type { ItemWithCount } from './models/ItemWithCount'; -export type { Label } from './models/Label'; -export { LabelFilterBool } from './models/LabelFilterBool'; -export { LabelFilterInt } from './models/LabelFilterInt'; -export { LabelFilterMulti } from './models/LabelFilterMulti'; -export type { LabelOptions } from './models/LabelOptions'; -export { LabelScope } from './models/LabelScope'; -export type { LexisNexisItemModel } from './models/LexisNexisItemModel'; -export type { LexisNexisItemSourceModel } from './models/LexisNexisItemSourceModel'; -export type { MakeAssignmentsRequestModel } from './models/MakeAssignmentsRequestModel'; -export type { Mention } from './models/Mention'; -export type { MetaFilterBool } from './models/MetaFilterBool'; -export type { MetaFilterInt } from './models/MetaFilterInt'; -export type { MetaFilterStr } from './models/MetaFilterStr'; -export { OpenAlexImport } from './models/OpenAlexImport'; -export type { OpenAlexItemImport } from './models/OpenAlexItemImport'; -export type { ProjectBaseInfo } from './models/ProjectBaseInfo'; -export type { ProjectBaseInfoEntry } from './models/ProjectBaseInfoEntry'; -export type { ProjectBaseInfoScopeEntry } from './models/ProjectBaseInfoScopeEntry'; -export type { ProjectInfo } from './models/ProjectInfo'; -export type { ProjectModel } from './models/ProjectModel'; -export type { ProjectPermissionsModel } from './models/ProjectPermissionsModel'; -export type { QueryResult } from './models/QueryResult'; -export type { RankEntry } from './models/RankEntry'; -export { ReferencedTweet } from './models/ReferencedTweet'; -export type { ResolutionCell } from './models/ResolutionCell'; -export type { ResolutionOrdering } from './models/ResolutionOrdering'; -export type { ResolutionProposal } from './models/ResolutionProposal'; -export type { ResolutionSnapshotEntry } from './models/ResolutionSnapshotEntry'; -export { ResolutionStatus } from './models/ResolutionStatus'; -export type { ResolutionUserEntry } from './models/ResolutionUserEntry'; -export type { SavedResolution } from './models/SavedResolution'; -export type { ScopusCSVImport } from './models/ScopusCSVImport'; -export type { SearchResult } from './models/SearchResult'; -export type { SnapshotEntry } from './models/SnapshotEntry'; -export type { SubQuery } from './models/SubQuery'; -export type { TermStats } from './models/TermStats'; -export type { TwitterAPIFileImport } from './models/TwitterAPIFileImport'; -export type { TwitterDBFileImport } from './models/TwitterDBFileImport'; -export type { TwitterItemModel } from './models/TwitterItemModel'; -export type { TwitterUserModel } from './models/TwitterUserModel'; -export type { URL } from './models/URL'; -export type { UserBaseModel } from './models/UserBaseModel'; -export type { UserInDBModel } from './models/UserInDBModel'; -export type { UserModel } from './models/UserModel'; -export type { UserPermission } from './models/UserPermission'; -export type { UserProjectAssignmentScope } from './models/UserProjectAssignmentScope'; -export { UsersFilter } from './models/UsersFilter'; -export type { ValidationError } from './models/ValidationError'; -export type { WOSImport } from './models/WOSImport'; - -export { $AcademicAuthorModel } from './schemas/$AcademicAuthorModel'; -export { $AcademicItemImport } from './schemas/$AcademicItemImport'; -export { $AcademicItemModel } from './schemas/$AcademicItemModel'; -export { $AffiliationModel } from './schemas/$AffiliationModel'; -export { $AnnotatedItem } from './schemas/$AnnotatedItem'; -export { $AnnotationFilter } from './schemas/$AnnotationFilter'; -export { $AnnotationItem } from './schemas/$AnnotationItem'; -export { $AnnotationModel } from './schemas/$AnnotationModel'; -export { $AnnotationQualityModel } from './schemas/$AnnotationQualityModel'; -export { $AnnotationSchemeInfo } from './schemas/$AnnotationSchemeInfo'; -export { $AnnotationSchemeLabel } from './schemas/$AnnotationSchemeLabel'; -export { $AnnotationSchemeLabelChoice } from './schemas/$AnnotationSchemeLabelChoice'; -export { $AnnotationSchemeLabelChoiceFlat } from './schemas/$AnnotationSchemeLabelChoiceFlat'; -export { $AnnotationSchemeModel } from './schemas/$AnnotationSchemeModel'; -export { $AnnotationSchemeModelFlat } from './schemas/$AnnotationSchemeModelFlat'; -export { $AnnotationTrackerModel } from './schemas/$AnnotationTrackerModel'; -export { $AnnotationValue } from './schemas/$AnnotationValue'; -export { $AssignmentCounts } from './schemas/$AssignmentCounts'; -export { $AssignmentFilter } from './schemas/$AssignmentFilter'; -export { $AssignmentInfo } from './schemas/$AssignmentInfo'; -export { $AssignmentInfoLabel } from './schemas/$AssignmentInfoLabel'; -export { $AssignmentModel } from './schemas/$AssignmentModel'; -export { $AssignmentScopeEntry } from './schemas/$AssignmentScopeEntry'; -export { $AssignmentScopeModel } from './schemas/$AssignmentScopeModel'; -export { $AssignmentScopeRandomConfig } from './schemas/$AssignmentScopeRandomConfig'; -export { $AssignmentScopeRandomWithExclusionConfig } from './schemas/$AssignmentScopeRandomWithExclusionConfig'; -export { $AssignmentScopeRandomWithNQLConfig } from './schemas/$AssignmentScopeRandomWithNQLConfig'; -export { $AssignmentStatus } from './schemas/$AssignmentStatus'; -export { $AuthTokenModel } from './schemas/$AuthTokenModel'; -export { $BasicProjectStats } from './schemas/$BasicProjectStats'; -export { $Body_login_for_access_token_api_login_token_post } from './schemas/$Body_login_for_access_token_api_login_token_post'; -export { $Body_save_resolved_annotations_api_annotations_config_resolve__put } from './schemas/$Body_save_resolved_annotations_api_annotations_config_resolve__put'; -export { $BotAnnotationMetaDataBaseModel } from './schemas/$BotAnnotationMetaDataBaseModel'; -export { $BotAnnotationModel } from './schemas/$BotAnnotationModel'; -export { $BotAnnotationResolution } from './schemas/$BotAnnotationResolution'; -export { $BotKind } from './schemas/$BotKind'; -export { $BotMetaInfo } from './schemas/$BotMetaInfo'; -export { $BotMetaResolve } from './schemas/$BotMetaResolve'; -export { $BotMetaResolveBase } from './schemas/$BotMetaResolveBase'; -export { $Cashtag } from './schemas/$Cashtag'; -export { $ContextAnnotation } from './schemas/$ContextAnnotation'; -export { $DehydratedAnnotationTracker } from './schemas/$DehydratedAnnotationTracker'; -export { $DehydratedAssignment } from './schemas/$DehydratedAssignment'; -export { $DehydratedUser } from './schemas/$DehydratedUser'; -export { $Event } from './schemas/$Event'; -export { $ExampleEvent } from './schemas/$ExampleEvent'; -export { $ExampleSubEvent } from './schemas/$ExampleSubEvent'; -export { $ExportRequest } from './schemas/$ExportRequest'; -export { $FieldFilter } from './schemas/$FieldFilter'; -export { $FieldFilters } from './schemas/$FieldFilters'; -export { $FlatLabel } from './schemas/$FlatLabel'; -export { $FlatLabelChoice } from './schemas/$FlatLabelChoice'; -export { $FlattenedAnnotationSchemeLabel } from './schemas/$FlattenedAnnotationSchemeLabel'; -export { $FullLexisNexisItemModel } from './schemas/$FullLexisNexisItemModel'; -export { $GenericItemModel } from './schemas/$GenericItemModel'; -export { $Hashtag } from './schemas/$Hashtag'; -export { $HighlighterModel } from './schemas/$HighlighterModel'; -export { $HistogramEntry } from './schemas/$HistogramEntry'; -export { $HTTPValidationError } from './schemas/$HTTPValidationError'; -export { $IEUUID } from './schemas/$IEUUID'; -export { $ImportConfigTwitter } from './schemas/$ImportConfigTwitter'; -export { $ImportFilter } from './schemas/$ImportFilter'; -export { $ImportModel } from './schemas/$ImportModel'; -export { $ItemAnnotation } from './schemas/$ItemAnnotation'; -export { $ItemType } from './schemas/$ItemType'; -export { $ItemWithCount } from './schemas/$ItemWithCount'; -export { $Label } from './schemas/$Label'; -export { $LabelFilterBool } from './schemas/$LabelFilterBool'; -export { $LabelFilterInt } from './schemas/$LabelFilterInt'; -export { $LabelFilterMulti } from './schemas/$LabelFilterMulti'; -export { $LabelOptions } from './schemas/$LabelOptions'; -export { $LabelScope } from './schemas/$LabelScope'; -export { $LexisNexisItemModel } from './schemas/$LexisNexisItemModel'; -export { $LexisNexisItemSourceModel } from './schemas/$LexisNexisItemSourceModel'; -export { $MakeAssignmentsRequestModel } from './schemas/$MakeAssignmentsRequestModel'; -export { $Mention } from './schemas/$Mention'; -export { $MetaFilterBool } from './schemas/$MetaFilterBool'; -export { $MetaFilterInt } from './schemas/$MetaFilterInt'; -export { $MetaFilterStr } from './schemas/$MetaFilterStr'; -export { $OpenAlexImport } from './schemas/$OpenAlexImport'; -export { $OpenAlexItemImport } from './schemas/$OpenAlexItemImport'; -export { $ProjectBaseInfo } from './schemas/$ProjectBaseInfo'; -export { $ProjectBaseInfoEntry } from './schemas/$ProjectBaseInfoEntry'; -export { $ProjectBaseInfoScopeEntry } from './schemas/$ProjectBaseInfoScopeEntry'; -export { $ProjectInfo } from './schemas/$ProjectInfo'; -export { $ProjectModel } from './schemas/$ProjectModel'; -export { $ProjectPermissionsModel } from './schemas/$ProjectPermissionsModel'; -export { $QueryResult } from './schemas/$QueryResult'; -export { $RankEntry } from './schemas/$RankEntry'; -export { $ReferencedTweet } from './schemas/$ReferencedTweet'; -export { $ResolutionCell } from './schemas/$ResolutionCell'; -export { $ResolutionOrdering } from './schemas/$ResolutionOrdering'; -export { $ResolutionProposal } from './schemas/$ResolutionProposal'; -export { $ResolutionSnapshotEntry } from './schemas/$ResolutionSnapshotEntry'; -export { $ResolutionStatus } from './schemas/$ResolutionStatus'; -export { $ResolutionUserEntry } from './schemas/$ResolutionUserEntry'; -export { $SavedResolution } from './schemas/$SavedResolution'; -export { $ScopusCSVImport } from './schemas/$ScopusCSVImport'; -export { $SearchResult } from './schemas/$SearchResult'; -export { $SnapshotEntry } from './schemas/$SnapshotEntry'; -export { $SubQuery } from './schemas/$SubQuery'; -export { $TermStats } from './schemas/$TermStats'; -export { $TwitterAPIFileImport } from './schemas/$TwitterAPIFileImport'; -export { $TwitterDBFileImport } from './schemas/$TwitterDBFileImport'; -export { $TwitterItemModel } from './schemas/$TwitterItemModel'; -export { $TwitterUserModel } from './schemas/$TwitterUserModel'; -export { $URL } from './schemas/$URL'; -export { $UserBaseModel } from './schemas/$UserBaseModel'; -export { $UserInDBModel } from './schemas/$UserInDBModel'; -export { $UserModel } from './schemas/$UserModel'; -export { $UserPermission } from './schemas/$UserPermission'; -export { $UserProjectAssignmentScope } from './schemas/$UserProjectAssignmentScope'; -export { $UsersFilter } from './schemas/$UsersFilter'; -export { $ValidationError } from './schemas/$ValidationError'; -export { $WOSImport } from './schemas/$WOSImport'; - -export { AnnotationsService } from './services/AnnotationsService'; -export { DefaultService } from './services/DefaultService'; -export { EvaluationService } from './services/EvaluationService'; -export { EventsService } from './services/EventsService'; -export { ExportService } from './services/ExportService'; -export { HighlightersService } from './services/HighlightersService'; -export { ImportsService } from './services/ImportsService'; -export { MailingService } from './services/MailingService'; -export { OauthService } from './services/OauthService'; -export { ProjectService } from './services/ProjectService'; -export { ProjectsService } from './services/ProjectsService'; -export { SearchService } from './services/SearchService'; -export { StatsService } from './services/StatsService'; -export { UsersService } from './services/UsersService'; diff --git a/src/plugins/api/api-core/models/AcademicAuthorModel.ts b/src/plugins/api/api-core/models/AcademicAuthorModel.ts deleted file mode 100644 index 515836fe6192223df0866341d4e49eeffe68ea72..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AcademicAuthorModel.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AffiliationModel } from './AffiliationModel'; - -export type AcademicAuthorModel = { - name: string; - surname_initials?: (string | null); - email?: (string | null); - orcid?: (string | null); - scopus_id?: (string | null); - openalex_id?: (string | null); - s2_id?: (string | null); - affiliations?: (Array<AffiliationModel> | null); -}; - diff --git a/src/plugins/api/api-core/models/AcademicItemImport.ts b/src/plugins/api/api-core/models/AcademicItemImport.ts deleted file mode 100644 index 08466f9918df58314a88d6d45d2ece396be3abc6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AcademicItemImport.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AcademicItemImport = { - func_name: any; - encoding?: any; - project_id?: (string | null); - import_id?: (string | null); - filenames: Array<string>; -}; - diff --git a/src/plugins/api/api-core/models/AcademicItemModel.ts b/src/plugins/api/api-core/models/AcademicItemModel.ts deleted file mode 100644 index b396ae81867a8cda4ec44eb1f91dffc36c102b5f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AcademicItemModel.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AcademicAuthorModel } from './AcademicAuthorModel'; -import type { ItemType } from './ItemType'; - -/** - * Corresponds to db.schema.items.academic.AcademicItem - */ -export type AcademicItemModel = { - item_id?: (string | null); - project_id?: (string | null); - type?: ItemType; - text?: (string | null); - doi?: (string | null); - wos_id?: (string | null); - scopus_id?: (string | null); - openalex_id?: (string | null); - s2_id?: (string | null); - pubmed_id?: (string | null); - dimensions_id?: (string | null); - title?: (string | null); - title_slug?: (string | null); - publication_year?: (number | null); - source?: (string | null); - keywords?: (Array<string> | null); - authors?: (Array<AcademicAuthorModel> | null); - meta?: null; -}; - diff --git a/src/plugins/api/api-core/models/AffiliationModel.ts b/src/plugins/api/api-core/models/AffiliationModel.ts deleted file mode 100644 index e41b5a7e27512218c73d02224a80a15a70ef4025..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AffiliationModel.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AffiliationModel = { - name: string; - country?: (string | null); - openalex_id?: (string | null); - s2_id?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/AnnotatedItem.ts b/src/plugins/api/api-core/models/AnnotatedItem.ts deleted file mode 100644 index af8c589336974a530fc09be40fb3bb159ce07373..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotatedItem.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationSchemeModel } from './AnnotationSchemeModel'; -import type { AssignmentModel } from './AssignmentModel'; - -export type AnnotatedItem = { - scheme: AnnotationSchemeModel; - assignment: AssignmentModel; -}; - diff --git a/src/plugins/api/api-core/models/AnnotationFilter.ts b/src/plugins/api/api-core/models/AnnotationFilter.ts deleted file mode 100644 index 397d4f48daa05fb6a3182d7ffe34f0663a54d42f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationFilter.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AnnotationFilter = { - filter?: any; - incl: boolean; - scopes?: (Array<string> | null); - scheme?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/AnnotationItem.ts b/src/plugins/api/api-core/models/AnnotationItem.ts deleted file mode 100644 index 807100201e1035b361a58637e002aee6a71770a0..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationItem.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AcademicItemModel } from './AcademicItemModel'; -import type { AnnotationSchemeModel } from './AnnotationSchemeModel'; -import type { AssignmentModel } from './AssignmentModel'; -import type { AssignmentScopeModel } from './AssignmentScopeModel'; -import type { FullLexisNexisItemModel } from './FullLexisNexisItemModel'; -import type { GenericItemModel } from './GenericItemModel'; -import type { LexisNexisItemModel } from './LexisNexisItemModel'; -import type { TwitterItemModel } from './TwitterItemModel'; - -export type AnnotationItem = { - scheme: AnnotationSchemeModel; - assignment: AssignmentModel; - scope: AssignmentScopeModel; - item: (TwitterItemModel | AcademicItemModel | LexisNexisItemModel | FullLexisNexisItemModel | GenericItemModel); -}; - diff --git a/src/plugins/api/api-core/models/AnnotationModel.ts b/src/plugins/api/api-core/models/AnnotationModel.ts deleted file mode 100644 index 64e7cbd2820270aa3d50801d55f8cb142bb63065..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationModel.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * Corresponds to db.models.annotations.Annotation - * - * Annotation holds the judgement of a User for a specific Item in the context of an AnnotationScheme - * as a response to an Assignment. - * Once an Annotation exists, the Assignment should be considered (partially) resolved. - * - * Note, that AnnotationScheme, User, and Item would be implicit by the Assignment. - * However, for ease of use and in favour of fewer joins, this information is replicated here. - * - * The Annotation refers to an AnnotationSchemeLabel defined in an AnnotationScheme, which is referred to by its `key`. - * If the scheme allows the user to make repeated annotations for the same Label (`key`), - * an offset is defined in `repeat` (e.g. for primary technology is "natural tech", secondary is "forests"). - * - * Note, that there is no database constraints on the completeness of an Assignment/AnnotationScheme. - * The interface/backend code should be used to make sure, to either not allow partial fulfillment of an - * AnnotationScheme or not display an Assignment as complete. - */ -export type AnnotationModel = { - value_bool?: (boolean | null); - value_int?: (number | null); - value_float?: (number | null); - value_str?: (string | null); - multi_int?: (Array<number> | null); - annotation_id?: (string | null); - time_created?: (string | null); - time_updated?: (string | null); - assignment_id: string; - user_id: string; - item_id: string; - annotation_scheme_id: string; - snippet_id?: (string | null); - key: string; - repeat?: number; - parent?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/AnnotationQualityModel.ts b/src/plugins/api/api-core/models/AnnotationQualityModel.ts deleted file mode 100644 index 37b908cd68fd4993f2aef24580a90a610bd1078a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationQualityModel.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * Annotation Quality Trackers - * Computing annotator agreements is a little too expensive to do on the fly. Hence, we capture different - * quality metrics in this table; one row per assignment scope and label. - */ -export type AnnotationQualityModel = { - annotation_quality_id?: (string | null); - project_id?: (string | null); - assignment_scope_id?: (string | null); - bot_annotation_metadata_id?: (string | null); - user_base?: (string | null); - annotations_base?: null; - user_target?: (string | null); - annotations_target?: null; - label_key?: (string | null); - label_value?: (number | null); - cohen?: (number | null); - fleiss?: (number | null); - randolph?: (number | null); - krippendorff?: (number | null); - pearson?: (number | null); - pearson_p?: (number | null); - kendall?: (number | null); - kendall_p?: (number | null); - spearman?: (number | null); - spearman_p?: (number | null); - precision?: (number | null); - recall?: (number | null); - f1?: (number | null); - multi_overlap_mean?: (number | null); - multi_overlap_median?: (number | null); - multi_overlap_std?: (number | null); - num_items?: (number | null); - num_overlap?: (number | null); - num_agree?: (number | null); - num_disagree?: (number | null); - perc_agree?: (number | null); - time_created?: (string | null); - time_updated?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/AnnotationSchemeInfo.ts b/src/plugins/api/api-core/models/AnnotationSchemeInfo.ts deleted file mode 100644 index b97121c114f3d250946cc077614991c322bc8316..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationSchemeInfo.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AnnotationSchemeInfo = { - annotation_scheme_id?: (string | null); - project_id?: (string | null); - name: string; - description?: (string | null); - inclusion_rule?: (string | null); - time_created?: (string | null); - time_updated?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/AnnotationSchemeLabel.ts b/src/plugins/api/api-core/models/AnnotationSchemeLabel.ts deleted file mode 100644 index e79540dea3f0c4471301c2216caabca875495cc6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationSchemeLabel.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationModel } from './AnnotationModel'; -import type { AnnotationSchemeLabelChoice } from './AnnotationSchemeLabelChoice'; - -export type AnnotationSchemeLabel = { - name: string; - key: string; - hint?: (string | null); - max_repeat?: number; - required?: boolean; - dropdown?: boolean; - kind?: AnnotationSchemeLabel.kind; - choices?: (Array<AnnotationSchemeLabelChoice> | null); - annotation?: (AnnotationModel | null); -}; - -export namespace AnnotationSchemeLabel { - - export enum kind { - BOOL = 'bool', - STR = 'str', - FLOAT = 'float', - INT = 'int', - SINGLE = 'single', - MULTI = 'multi', - INTEXT = 'intext', - } - - -} - diff --git a/src/plugins/api/api-core/models/AnnotationSchemeLabelChoice.ts b/src/plugins/api/api-core/models/AnnotationSchemeLabelChoice.ts deleted file mode 100644 index b55f48cb8309bdf5a19cc418c8aded051b1e6721..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationSchemeLabelChoice.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationSchemeLabel } from './AnnotationSchemeLabel'; - -export type AnnotationSchemeLabelChoice = { - name: string; - hint?: (string | null); - value: number; - children?: (Array<AnnotationSchemeLabel> | null); -}; - diff --git a/src/plugins/api/api-core/models/AnnotationSchemeLabelChoiceFlat.ts b/src/plugins/api/api-core/models/AnnotationSchemeLabelChoiceFlat.ts deleted file mode 100644 index a683f2f75c8daa3fb55b4ff0eb64820f51bdbcca..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationSchemeLabelChoiceFlat.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AnnotationSchemeLabelChoiceFlat = { - name: string; - hint?: (string | null); - value: number; -}; - diff --git a/src/plugins/api/api-core/models/AnnotationSchemeModel.ts b/src/plugins/api/api-core/models/AnnotationSchemeModel.ts deleted file mode 100644 index 6eeb5e4cce2e4861ec0c55817ac67ceb516ed818..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationSchemeModel.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationSchemeLabel } from './AnnotationSchemeLabel'; - -/** - * Corresponds to db.models.annotations.AnnotationScheme - * - * AnnotationScheme defines the annotation scheme for a particular project. - * Each project may have multiple AnnotationSchemes, - * but projects cannot share the same scheme. In case they are technically the same, - * the user would have to create a new copy of that scheme for a different project. - * - * The actual annotation scheme is defined as a list of labels (see schemas.annotations.AnnotationSchemeLabel). - * The other fields pose as meta-data. - */ -export type AnnotationSchemeModel = { - annotation_scheme_id?: (string | null); - project_id?: (string | null); - name: string; - description?: (string | null); - inclusion_rule?: (string | null); - time_created?: (string | null); - time_updated?: (string | null); - labels: Array<AnnotationSchemeLabel>; -}; - diff --git a/src/plugins/api/api-core/models/AnnotationSchemeModelFlat.ts b/src/plugins/api/api-core/models/AnnotationSchemeModelFlat.ts deleted file mode 100644 index 731a8d926e7b8e8e298a0e5b6333a0a12d2c8ad5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationSchemeModelFlat.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { FlattenedAnnotationSchemeLabel } from './FlattenedAnnotationSchemeLabel'; - -/** - * Same as AnnotationSchemeModel but with flattened structure. - */ -export type AnnotationSchemeModelFlat = { - annotation_scheme_id?: (string | null); - project_id?: (string | null); - name: string; - description?: (string | null); - inclusion_rule?: (string | null); - time_created?: (string | null); - time_updated?: (string | null); - labels: Array<FlattenedAnnotationSchemeLabel>; -}; - diff --git a/src/plugins/api/api-core/models/AnnotationTrackerModel.ts b/src/plugins/api/api-core/models/AnnotationTrackerModel.ts deleted file mode 100644 index 7843d39bec58030f1a74a2acaeb0f048f619286a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationTrackerModel.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * Tracker for annotation statistics. - * This includes the latest stopping criterion (buscar) metrics and more. - * - * You may have more than one tracker per project, for example for keeping track of different progresses. - */ -export type AnnotationTrackerModel = { - annotation_tracking_id?: (string | null); - name: string; - project_id: string; - inclusion_rule: string; - majority: boolean; - n_items_total: number; - recall_target: number; - source_ids?: (Array<string> | null); - labels?: (Array<Array<number>> | null); - recall?: null; - buscar?: (Array<any[]> | null); - time_created?: (string | null); - time_updated?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/AnnotationValue.ts b/src/plugins/api/api-core/models/AnnotationValue.ts deleted file mode 100644 index 422cf21145b73ae121d87a66e1b561fb466e6b26..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AnnotationValue.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AnnotationValue = { - value_bool?: (boolean | null); - value_int?: (number | null); - value_float?: (number | null); - value_str?: (string | null); - multi_int?: (Array<number> | null); -}; - diff --git a/src/plugins/api/api-core/models/AssignmentCounts.ts b/src/plugins/api/api-core/models/AssignmentCounts.ts deleted file mode 100644 index 33d8337ba57112c7fb420dab82a7cc3825884c63..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentCounts.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AssignmentCounts = { - num_total: number; - num_open: number; - num_partial: number; - num_full: number; -}; - diff --git a/src/plugins/api/api-core/models/AssignmentFilter.ts b/src/plugins/api/api-core/models/AssignmentFilter.ts deleted file mode 100644 index 4201a2d9b4c0bd5ae2d48394c4dc3a6fa25d6549..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentFilter.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AssignmentFilter = { - filter?: any; - mode: number; - scopes?: (Array<string> | null); - scheme?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/AssignmentInfo.ts b/src/plugins/api/api-core/models/AssignmentInfo.ts deleted file mode 100644 index 61c5708f863e7f22a2db8c60568de038de2b58c8..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentInfo.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AssignmentInfoLabel } from './AssignmentInfoLabel'; -import type { AssignmentStatus } from './AssignmentStatus'; - -export type AssignmentInfo = { - user_id: string; - username: string; - order: number; - assignment_id: string; - status: AssignmentStatus; - labels?: (Record<string, Array<AssignmentInfoLabel>> | null); -}; - diff --git a/src/plugins/api/api-core/models/AssignmentInfoLabel.ts b/src/plugins/api/api-core/models/AssignmentInfoLabel.ts deleted file mode 100644 index 48ff9acb4bf842e87a184b1fdceb4c5783d9c356..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentInfoLabel.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AssignmentInfoLabel = { - repeat: number; - value_int?: (number | null); - value_bool?: (boolean | null); - multi_ind?: (Array<number> | null); -}; - diff --git a/src/plugins/api/api-core/models/AssignmentModel.ts b/src/plugins/api/api-core/models/AssignmentModel.ts deleted file mode 100644 index 421d0c90e4ef1c536cbd8f009051659d381c9c74..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentModel.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AssignmentStatus } from './AssignmentStatus'; - -/** - * Corresponds to db.models.annotations.Assignment - * - * Assignment is used to request a user/annotator (User) to annotate a particular item (BaseItem) in the database - * following a pre-defined annotation scheme (AnnotationScheme). - * - * Each AnnotationScheme will have several Assignments. - * Each User will "receive" several Assignments. - * Each Item may have several Assignments (either in relation to different AnnotationSchemes or double-coding). - * The Project is implicit by the AnnotationScheme. - * - * The most common use-cases are: - * * Creating assignments in bulk at random (e.g. 3 users should annotate 50 documents each) - * * Creating assignments one at a time based on a set of rules (e.g. for double-coding, defined order, bias, ...) - * * Creating assignments in small batches or one-by-one in prioritised annotation settings - */ -export type AssignmentModel = { - assignment_id?: (string | null); - assignment_scope_id: string; - user_id: string; - item_id: string; - annotation_scheme_id: string; - status: AssignmentStatus; - order?: (number | null); -}; - diff --git a/src/plugins/api/api-core/models/AssignmentScopeEntry.ts b/src/plugins/api/api-core/models/AssignmentScopeEntry.ts deleted file mode 100644 index ff82ca66f539a7016322fbc507a069e2bac97ced..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentScopeEntry.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AssignmentInfo } from './AssignmentInfo'; - -export type AssignmentScopeEntry = { - item_id: string; - first_occurrence: number; - identifier: number; - assignments: Array<AssignmentInfo>; -}; - diff --git a/src/plugins/api/api-core/models/AssignmentScopeModel.ts b/src/plugins/api/api-core/models/AssignmentScopeModel.ts deleted file mode 100644 index 5fbb0596d7c6f735c465aaba7fa8f716033ac152..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentScopeModel.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AssignmentScopeRandomConfig } from './AssignmentScopeRandomConfig'; -import type { AssignmentScopeRandomWithExclusionConfig } from './AssignmentScopeRandomWithExclusionConfig'; -import type { AssignmentScopeRandomWithNQLConfig } from './AssignmentScopeRandomWithNQLConfig'; - -/** - * AssignmentScope can be used to logically group a set of Assignments. - * For example, one may wish to re-use the same AnnotationScheme several times within a project - * without copying it each time. It may also be used to logically group different scopes of - * the annotation process, for example to make it clear that different subsets of a dataset - * are to be annotated. - * Logically, this should be viewed as a hierarchical organisation - * AnnotationScheme -> [AssignmentScope] -> Assignment -> Annotation - */ -export type AssignmentScopeModel = { - assignment_scope_id?: (string | null); - annotation_scheme_id: string; - time_created?: (string | null); - name: string; - description?: (string | null); - config?: ((AssignmentScopeRandomWithExclusionConfig | AssignmentScopeRandomWithNQLConfig | AssignmentScopeRandomConfig) | null); - highlighter_ids?: (Array<string> | null); -}; - diff --git a/src/plugins/api/api-core/models/AssignmentScopeRandomConfig.ts b/src/plugins/api/api-core/models/AssignmentScopeRandomConfig.ts deleted file mode 100644 index 7407abbed613c1c29f5cb47f75dc8efc77aa5842..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentScopeRandomConfig.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AssignmentScopeRandomConfig = { - config_type?: any; - users?: (Array<string> | null); - num_items: number; - min_assignments_per_item: number; - max_assignments_per_item: number; - num_multi_coded_items: number; - random_seed: number; -}; - diff --git a/src/plugins/api/api-core/models/AssignmentScopeRandomWithExclusionConfig.ts b/src/plugins/api/api-core/models/AssignmentScopeRandomWithExclusionConfig.ts deleted file mode 100644 index b7f3ce5ae067df22d95d2429d9afc2e98da2bec6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentScopeRandomWithExclusionConfig.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AssignmentScopeRandomWithExclusionConfig = { - config_type?: any; - users?: (Array<string> | null); - num_items: number; - min_assignments_per_item: number; - max_assignments_per_item: number; - num_multi_coded_items: number; - random_seed: number; - excluded_scopes: Array<string>; -}; - diff --git a/src/plugins/api/api-core/models/AssignmentScopeRandomWithNQLConfig.ts b/src/plugins/api/api-core/models/AssignmentScopeRandomWithNQLConfig.ts deleted file mode 100644 index a9697f342eb150ed45d703fd1c1fedd919ec3463..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentScopeRandomWithNQLConfig.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationFilter } from './AnnotationFilter'; -import type { AssignmentFilter } from './AssignmentFilter'; -import type { FieldFilter } from './FieldFilter'; -import type { FieldFilters } from './FieldFilters'; -import type { ImportFilter } from './ImportFilter'; -import type { LabelFilterBool } from './LabelFilterBool'; -import type { LabelFilterInt } from './LabelFilterInt'; -import type { LabelFilterMulti } from './LabelFilterMulti'; -import type { MetaFilterBool } from './MetaFilterBool'; -import type { MetaFilterInt } from './MetaFilterInt'; -import type { MetaFilterStr } from './MetaFilterStr'; -import type { SubQuery } from './SubQuery'; - -export type AssignmentScopeRandomWithNQLConfig = { - config_type?: any; - users?: (Array<string> | null); - num_items: number; - min_assignments_per_item: number; - max_assignments_per_item: number; - num_multi_coded_items: number; - random_seed: number; - query_parsed: (FieldFilter | FieldFilters | LabelFilterMulti | LabelFilterBool | LabelFilterInt | AssignmentFilter | AnnotationFilter | ImportFilter | MetaFilterBool | MetaFilterInt | MetaFilterStr | SubQuery); - query_str: string; -}; - diff --git a/src/plugins/api/api-core/models/AssignmentStatus.ts b/src/plugins/api/api-core/models/AssignmentStatus.ts deleted file mode 100644 index 082a3a4a38026b0fa92c457462fa0983e0a73fa9..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AssignmentStatus.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum AssignmentStatus { - FULL = 'FULL', - PARTIAL = 'PARTIAL', - OPEN = 'OPEN', - INVALID = 'INVALID', -} diff --git a/src/plugins/api/api-core/models/AuthTokenModel.ts b/src/plugins/api/api-core/models/AuthTokenModel.ts deleted file mode 100644 index dfdb168e34b6b12f772180fad145ae6f04282a76..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/AuthTokenModel.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type AuthTokenModel = { - token_id: string; - username: string; - time_created?: (string | null); - time_updated?: (string | null); - valid_till?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/BasicProjectStats.ts b/src/plugins/api/api-core/models/BasicProjectStats.ts deleted file mode 100644 index 502019a4c2b481620bdacccb3656490869e92ca2..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BasicProjectStats.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type BasicProjectStats = { - num_items: number; - num_imports: number; - num_schemes: number; - num_scopes: number; - num_labels: number; - num_labeled_items: number; -}; - diff --git a/src/plugins/api/api-core/models/Body_login_for_access_token_api_login_token_post.ts b/src/plugins/api/api-core/models/Body_login_for_access_token_api_login_token_post.ts deleted file mode 100644 index c1c0810c67a9b06f96b0257a412e36f40c9b62e4..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/Body_login_for_access_token_api_login_token_post.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type Body_login_for_access_token_api_login_token_post = { - grant_type?: (string | null); - username: string; - password: string; - scope?: string; - client_id?: (string | null); - client_secret?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/Body_save_resolved_annotations_api_annotations_config_resolve__put.ts b/src/plugins/api/api-core/models/Body_save_resolved_annotations_api_annotations_config_resolve__put.ts deleted file mode 100644 index 79b9933e23be2e45be8ea491c652e611b1e61084..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/Body_save_resolved_annotations_api_annotations_config_resolve__put.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { BotMetaResolveBase } from './BotMetaResolveBase'; -import type { ResolutionCell } from './ResolutionCell'; - -export type Body_save_resolved_annotations_api_annotations_config_resolve__put = { - settings: BotMetaResolveBase; - matrix: Record<string, Record<string, ResolutionCell>>; -}; - diff --git a/src/plugins/api/api-core/models/BotAnnotationMetaDataBaseModel.ts b/src/plugins/api/api-core/models/BotAnnotationMetaDataBaseModel.ts deleted file mode 100644 index 8523c0a47d33b433ea84458a2b6eab64fda36aae..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BotAnnotationMetaDataBaseModel.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { BotKind } from './BotKind'; - -export type BotAnnotationMetaDataBaseModel = { - bot_annotation_metadata_id?: (string | null); - name: string; - kind: BotKind; - project_id: string; - time_created?: (string | null); - time_updated?: (string | null); - assignment_scope_id?: (string | null); - annotation_scheme_id?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/BotAnnotationModel.ts b/src/plugins/api/api-core/models/BotAnnotationModel.ts deleted file mode 100644 index d7465c93b82cae00f302947813442d05217a2db7..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BotAnnotationModel.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type BotAnnotationModel = { - value_bool?: (boolean | null); - value_int?: (number | null); - value_float?: (number | null); - value_str?: (string | null); - multi_int?: (Array<number> | null); - bot_annotation_id?: (string | null); - bot_annotation_metadata_id?: (string | null); - time_created?: (string | null); - time_updated?: (string | null); - item_id: string; - parent?: (string | null); - key?: (string | null); - repeat?: number; - order?: (number | null); - confidence?: (number | null); -}; - diff --git a/src/plugins/api/api-core/models/BotAnnotationResolution.ts b/src/plugins/api/api-core/models/BotAnnotationResolution.ts deleted file mode 100644 index a654b6c5d1965224be4c88e4a722a19cfc5e70d3..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BotAnnotationResolution.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { BotKind } from './BotKind'; -import type { BotMetaResolve } from './BotMetaResolve'; - -export type BotAnnotationResolution = { - bot_annotation_metadata_id?: (string | null); - name: string; - kind: BotKind; - project_id: string; - time_created?: (string | null); - time_updated?: (string | null); - assignment_scope_id: string; - annotation_scheme_id: string; - meta: BotMetaResolve; -}; - diff --git a/src/plugins/api/api-core/models/BotKind.ts b/src/plugins/api/api-core/models/BotKind.ts deleted file mode 100644 index ac878042c67ec4f16f47e11fbcfd5ad1013dfe16..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BotKind.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum BotKind { - CLASSIFICATION = 'CLASSIFICATION', - RULES = 'RULES', - TOPICS = 'TOPICS', - RESOLVE = 'RESOLVE', - SCRIPT = 'SCRIPT', -} diff --git a/src/plugins/api/api-core/models/BotMetaInfo.ts b/src/plugins/api/api-core/models/BotMetaInfo.ts deleted file mode 100644 index 3f2e8bcc41d7276573dee4b0723f557eae2dac2d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BotMetaInfo.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { BotKind } from './BotKind'; - -export type BotMetaInfo = { - bot_annotation_metadata_id?: (string | null); - name: string; - kind: BotKind; - project_id: string; - time_created?: (string | null); - time_updated?: (string | null); - assignment_scope_id?: (string | null); - annotation_scheme_id?: (string | null); - num_annotations: number; - num_annotated_items: number; -}; - diff --git a/src/plugins/api/api-core/models/BotMetaResolve.ts b/src/plugins/api/api-core/models/BotMetaResolve.ts deleted file mode 100644 index dddb36ed9e62a587c20105072779aad9a1426c6a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BotMetaResolve.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ResolutionSnapshotEntry } from './ResolutionSnapshotEntry'; -import type { SnapshotEntry } from './SnapshotEntry'; - -export type BotMetaResolve = { - algorithm: BotMetaResolve.algorithm; - ignore_hierarchy: boolean; - ignore_repeat: boolean; - snapshot: Array<SnapshotEntry>; - resolutions: Array<ResolutionSnapshotEntry>; -}; - -export namespace BotMetaResolve { - - export enum algorithm { - MAJORITY = 'majority', - FIRST = 'first', - LAST = 'last', - TRUST = 'trust', - } - - -} - diff --git a/src/plugins/api/api-core/models/BotMetaResolveBase.ts b/src/plugins/api/api-core/models/BotMetaResolveBase.ts deleted file mode 100644 index f31e816f5e08b8fed3ca91bdb0f416938c7ffd49..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/BotMetaResolveBase.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type BotMetaResolveBase = { - algorithm: BotMetaResolveBase.algorithm; - ignore_hierarchy: boolean; - ignore_repeat: boolean; -}; - -export namespace BotMetaResolveBase { - - export enum algorithm { - MAJORITY = 'majority', - FIRST = 'first', - LAST = 'last', - TRUST = 'trust', - } - - -} - diff --git a/src/plugins/api/api-core/models/Cashtag.ts b/src/plugins/api/api-core/models/Cashtag.ts deleted file mode 100644 index e222ac476fd2d8441ee083ca9dbd4329f33d555a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/Cashtag.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type Cashtag = { - start: number; - end: number; - tag: string; -}; - diff --git a/src/plugins/api/api-core/models/ContextAnnotation.ts b/src/plugins/api/api-core/models/ContextAnnotation.ts deleted file mode 100644 index 2446930605662a506f5077e3e04b2278e2a42b53..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ContextAnnotation.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * Flattened and reduced version of the context_annotation object - * https://developer.twitter.com/en/docs/twitter-api/annotations/overview - * - * NOTE: Under the assumption that we could always recover the `description` - * of the domain and entity, this information is not stored to save space. - */ -export type ContextAnnotation = { - domain_id: string; - domain_name: string; - entity_id: string; - entity_name: string; -}; - diff --git a/src/plugins/api/api-core/models/DehydratedAnnotationTracker.ts b/src/plugins/api/api-core/models/DehydratedAnnotationTracker.ts deleted file mode 100644 index 185cd5ecb77b4173ce7c72ff7ed94c55f3121acd..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/DehydratedAnnotationTracker.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type DehydratedAnnotationTracker = { - annotation_tracking_id?: (string | null); - name: string; -}; - diff --git a/src/plugins/api/api-core/models/DehydratedAssignment.ts b/src/plugins/api/api-core/models/DehydratedAssignment.ts deleted file mode 100644 index 053cbcc940f5bb5e335c09d6f6a2b13b13141741..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/DehydratedAssignment.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AssignmentStatus } from './AssignmentStatus'; - -export type DehydratedAssignment = { - assignment_id: string; - user_id: string; - item_id: string; - username: string; - status: AssignmentStatus; - order: number; -}; - diff --git a/src/plugins/api/api-core/models/DehydratedUser.ts b/src/plugins/api/api-core/models/DehydratedUser.ts deleted file mode 100644 index 6e9b64e5c9798982aa81d3aa517c9f0f2666cb60..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/DehydratedUser.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type DehydratedUser = { - user_id?: (string | null); - username?: (string | null); - full_name?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/Event.ts b/src/plugins/api/api-core/models/Event.ts deleted file mode 100644 index 966a97e19adc09bd0cb4b49d3c64329a0e822fcd..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/Event.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ExampleEvent } from './ExampleEvent'; -import type { ExampleSubEvent } from './ExampleSubEvent'; - -export type Event = { - event: Event.event; - payload: (ExampleEvent | ExampleSubEvent); -}; - -export namespace Event { - - export enum event { - EXAMPLE_EVENT = 'ExampleEvent', - EXAMPLE_SUB_EVENT = 'ExampleSubEvent', - } - - -} - diff --git a/src/plugins/api/api-core/models/ExampleEvent.ts b/src/plugins/api/api-core/models/ExampleEvent.ts deleted file mode 100644 index c49ba04445c968aff3b5cf77420d2e0a1c661b99..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ExampleEvent.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ExampleEvent = { - payload_a: string; -}; - diff --git a/src/plugins/api/api-core/models/ExampleSubEvent.ts b/src/plugins/api/api-core/models/ExampleSubEvent.ts deleted file mode 100644 index 0e493dcd8c64430bf39e134ab0ba574975159089..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ExampleSubEvent.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ExampleSubEvent = { - payload_a: string; -}; - diff --git a/src/plugins/api/api-core/models/ExportRequest.ts b/src/plugins/api/api-core/models/ExportRequest.ts deleted file mode 100644 index ea260d6563964e97007b71369d2a7b17d3a16eae..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ExportRequest.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationFilter } from './AnnotationFilter'; -import type { AssignmentFilter } from './AssignmentFilter'; -import type { FieldFilter } from './FieldFilter'; -import type { FieldFilters } from './FieldFilters'; -import type { ImportFilter } from './ImportFilter'; -import type { LabelFilterBool } from './LabelFilterBool'; -import type { LabelFilterInt } from './LabelFilterInt'; -import type { LabelFilterMulti } from './LabelFilterMulti'; -import type { LabelOptions } from './LabelOptions'; -import type { MetaFilterBool } from './MetaFilterBool'; -import type { MetaFilterInt } from './MetaFilterInt'; -import type { MetaFilterStr } from './MetaFilterStr'; -import type { SubQuery } from './SubQuery'; - -export type ExportRequest = { - labels: Array<LabelOptions>; - nql_filter?: ((FieldFilter | FieldFilters | LabelFilterMulti | LabelFilterBool | LabelFilterInt | AssignmentFilter | AnnotationFilter | ImportFilter | MetaFilterBool | MetaFilterInt | MetaFilterStr | SubQuery) | null); - bot_annotation_metadata_ids?: (Array<string> | null); - assignment_scope_ids?: (Array<string> | null); - user_ids?: (Array<string> | null); - ignore_hierarchy?: boolean; - ignore_repeat?: boolean; -}; - diff --git a/src/plugins/api/api-core/models/FieldFilter.ts b/src/plugins/api/api-core/models/FieldFilter.ts deleted file mode 100644 index 5e379379e79e872ab218e25252631e1bea23becd..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/FieldFilter.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type FieldFilter = { - filter?: any; - field: FieldFilter.field; - value: (string | number); - comp?: (string | null); -}; - -export namespace FieldFilter { - - export enum field { - TITLE = 'title', - ABSTRACT = 'abstract', - PUB_YEAR = 'pub_year', - DATE = 'date', - SOURCE = 'source', - } - - -} - diff --git a/src/plugins/api/api-core/models/FieldFilters.ts b/src/plugins/api/api-core/models/FieldFilters.ts deleted file mode 100644 index 654eddb47dd3c3b1de392d1842a5c6d4c00dab44..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/FieldFilters.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type FieldFilters = { - filter?: any; - field: FieldFilters.field; - values: Array<string>; -}; - -export namespace FieldFilters { - - export enum field { - DOI = 'doi', - ITEM_ID = 'item_id', - OPENALEX_ID = 'openalex_id', - } - - -} - diff --git a/src/plugins/api/api-core/models/FlatLabel.ts b/src/plugins/api/api-core/models/FlatLabel.ts deleted file mode 100644 index e0194e215fc69ab56f80a0a8478c7c671b865cff..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/FlatLabel.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { FlatLabelChoice } from './FlatLabelChoice'; -import type { Label } from './Label'; - -export type FlatLabel = { - path: Array<Label>; - repeat: number; - path_key: string; - parent_int?: (number | null); - parent_key?: (string | null); - parent_value?: (number | null); - name: string; - hint?: (string | null); - key: string; - required: boolean; - max_repeat: number; - kind: FlatLabel.kind; - choices?: (Array<FlatLabelChoice> | null); -}; - -export namespace FlatLabel { - - export enum kind { - BOOL = 'bool', - STR = 'str', - FLOAT = 'float', - INT = 'int', - SINGLE = 'single', - MULTI = 'multi', - INTEXT = 'intext', - } - - -} - diff --git a/src/plugins/api/api-core/models/FlatLabelChoice.ts b/src/plugins/api/api-core/models/FlatLabelChoice.ts deleted file mode 100644 index 62fb4ebbd89bd5f81544ab6e23dd21205bffaa2a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/FlatLabelChoice.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type FlatLabelChoice = { - name: string; - hint?: (string | null); - value: number; -}; - diff --git a/src/plugins/api/api-core/models/FlattenedAnnotationSchemeLabel.ts b/src/plugins/api/api-core/models/FlattenedAnnotationSchemeLabel.ts deleted file mode 100644 index ac6d9660143722ffea08a4e644f7c5d3049551c5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/FlattenedAnnotationSchemeLabel.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationSchemeLabelChoiceFlat } from './AnnotationSchemeLabelChoiceFlat'; - -export type FlattenedAnnotationSchemeLabel = { - name: string; - hint?: (string | null); - key: string; - required: boolean; - max_repeat: number; - implicit_max_repeat: number; - kind: FlattenedAnnotationSchemeLabel.kind; - choices?: (Array<AnnotationSchemeLabelChoiceFlat> | null); - parent_label?: (string | null); - parent_choice?: (number | null); -}; - -export namespace FlattenedAnnotationSchemeLabel { - - export enum kind { - BOOL = 'bool', - STR = 'str', - FLOAT = 'float', - INT = 'int', - SINGLE = 'single', - MULTI = 'multi', - INTEXT = 'intext', - } - - -} - diff --git a/src/plugins/api/api-core/models/FullLexisNexisItemModel.ts b/src/plugins/api/api-core/models/FullLexisNexisItemModel.ts deleted file mode 100644 index 2860a0ff8df0c3e86602b3bba9d117848590ff80..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/FullLexisNexisItemModel.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ItemType } from './ItemType'; -import type { LexisNexisItemSourceModel } from './LexisNexisItemSourceModel'; - -export type FullLexisNexisItemModel = { - item_id?: (string | null); - project_id?: (string | null); - type?: ItemType; - text?: (string | null); - teaser?: (string | null); - authors?: (Array<string> | null); - sources?: (Array<LexisNexisItemSourceModel> | null); -}; - diff --git a/src/plugins/api/api-core/models/GenericItemModel.ts b/src/plugins/api/api-core/models/GenericItemModel.ts deleted file mode 100644 index a4693048f015fd3a6d6eb4105c2863f92213ab62..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/GenericItemModel.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ItemType } from './ItemType'; - -/** - * Corresponds to db.models.items.generic.GenericItem - */ -export type GenericItemModel = { - item_id?: (string | null); - project_id?: (string | null); - type?: ItemType; - text?: (string | null); - meta: any; -}; - diff --git a/src/plugins/api/api-core/models/HTTPValidationError.ts b/src/plugins/api/api-core/models/HTTPValidationError.ts deleted file mode 100644 index 5e13adc4e54b08988e273a49fe36fb5feca731b6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/HTTPValidationError.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ValidationError } from './ValidationError'; - -export type HTTPValidationError = { - detail?: Array<ValidationError>; -}; - diff --git a/src/plugins/api/api-core/models/Hashtag.ts b/src/plugins/api/api-core/models/Hashtag.ts deleted file mode 100644 index 5191c86b5316d553e7acfbc695921e2d2b6bbf85..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/Hashtag.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type Hashtag = { - start: number; - end: number; - tag: string; -}; - diff --git a/src/plugins/api/api-core/models/HighlighterModel.ts b/src/plugins/api/api-core/models/HighlighterModel.ts deleted file mode 100644 index 886c7ad13937fef1e607d543d6844b6737b99827..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/HighlighterModel.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * A highlighter can be used in a project to highlight tokens in text to make - * it easier for users to annotate documents when certain keywords are highlighted. - * - * It is assumed, that a highlighter roughly corresponds to query terms. - * Furthermore, keywords in a highlighter will typically be joined into - * a regular expression group (e.g. "(keyword1|double keyword|wildcar.*)"). - * - * Each matching group will be wrapped in a highlight span in the frontend. - */ -export type HighlighterModel = { - highlighter_id: string; - project_id: string; - name: string; - keywords: Array<string>; - style?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/HistogramEntry.ts b/src/plugins/api/api-core/models/HistogramEntry.ts deleted file mode 100644 index 7f2224338d0b17da647ba2d0a7fc186ee89da0c3..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/HistogramEntry.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type HistogramEntry = { - bucket: string; - num_items: number; -}; - diff --git a/src/plugins/api/api-core/models/IEUUID.ts b/src/plugins/api/api-core/models/IEUUID.ts deleted file mode 100644 index bce90b8e171aaf65193b33abbedfc59b062eb86b..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/IEUUID.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type IEUUID = { - incl: boolean; - uuid: string; -}; - diff --git a/src/plugins/api/api-core/models/ImportConfigTwitter.ts b/src/plugins/api/api-core/models/ImportConfigTwitter.ts deleted file mode 100644 index e0cd1aa12b44e21570707ed431ec58aad5dca14f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ImportConfigTwitter.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ImportConfigTwitter = { - func_name: any; - query: string; - max_results?: (number | null); - next_token?: (string | null); - since_id?: (string | null); - until_id?: (string | null); - sort_order?: ImportConfigTwitter.sort_order; - start_time?: (string | null); - end_time?: (string | null); - bearer_token: string; - results_per_response?: number; - max_requests?: number; - max_tweets?: number; -}; - -export namespace ImportConfigTwitter { - - export enum sort_order { - RECENCY = 'recency', - RELEVANCY = 'relevancy', - } - - -} - diff --git a/src/plugins/api/api-core/models/ImportFilter.ts b/src/plugins/api/api-core/models/ImportFilter.ts deleted file mode 100644 index 906a215459ef82040af8edb9b61bf3a3e8165134..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ImportFilter.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { IEUUID } from './IEUUID'; - -export type ImportFilter = { - filter?: any; - import_ids: Array<IEUUID>; -}; - diff --git a/src/plugins/api/api-core/models/ImportModel.ts b/src/plugins/api/api-core/models/ImportModel.ts deleted file mode 100644 index ceb351813ea416971ed9725ca2a9cd8dfa3b800d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ImportModel.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AcademicItemImport } from './AcademicItemImport'; -import type { ImportConfigTwitter } from './ImportConfigTwitter'; -import type { OpenAlexImport } from './OpenAlexImport'; -import type { OpenAlexItemImport } from './OpenAlexItemImport'; -import type { ScopusCSVImport } from './ScopusCSVImport'; -import type { TwitterAPIFileImport } from './TwitterAPIFileImport'; -import type { TwitterDBFileImport } from './TwitterDBFileImport'; -import type { WOSImport } from './WOSImport'; - -export type ImportModel = { - import_id?: (string | null); - user_id?: (string | null); - project_id: string; - pipeline_task_id?: (string | null); - name: string; - description: string; - type: string; - time_created?: (string | null); - time_started?: (string | null); - time_finished?: (string | null); - config?: ((TwitterDBFileImport | TwitterAPIFileImport | ImportConfigTwitter | OpenAlexImport | WOSImport | OpenAlexItemImport | AcademicItemImport | ScopusCSVImport) | null); -}; - diff --git a/src/plugins/api/api-core/models/ItemAnnotation.ts b/src/plugins/api/api-core/models/ItemAnnotation.ts deleted file mode 100644 index af94922c8015e5b603732ae55c695c37736236fa..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ItemAnnotation.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationValue } from './AnnotationValue'; -import type { Label } from './Label'; - -export type ItemAnnotation = { - value_bool?: (boolean | null); - value_int?: (number | null); - value_float?: (number | null); - value_str?: (string | null); - multi_int?: (Array<number> | null); - annotation_id?: (string | null); - time_created?: (string | null); - time_updated?: (string | null); - assignment_id: string; - user_id: string; - item_id: string; - annotation_scheme_id: string; - snippet_id?: (string | null); - key: string; - repeat?: number; - parent?: (string | null); - path: Array<Label>; - old?: (AnnotationValue | null); -}; - diff --git a/src/plugins/api/api-core/models/ItemType.ts b/src/plugins/api/api-core/models/ItemType.ts deleted file mode 100644 index b12af78603d018e77a3639a53c10366690e305d6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ItemType.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum ItemType { - GENERIC = 'generic', - TWITTER = 'twitter', - ACADEMIC = 'academic', - PATENTS = 'patents', - LEXIS = 'lexis', -} diff --git a/src/plugins/api/api-core/models/ItemWithCount.ts b/src/plugins/api/api-core/models/ItemWithCount.ts deleted file mode 100644 index 472deca867f106f54cda281d66b3bf5bd761b6ff..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ItemWithCount.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ItemWithCount = { - item_id: string; - num_total: number; - num_open: number; - num_partial: number; - num_full: number; -}; - diff --git a/src/plugins/api/api-core/models/Label.ts b/src/plugins/api/api-core/models/Label.ts deleted file mode 100644 index c454b337922c57d41bfc2474a8afa15b981faf70..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/Label.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * Convenience type (corresponding to internal type in db annotation_label). - * For Annotation or BotAnnotation, this is the combination of their respective key, repeat value. - * - * Mainly used during resolving annotations. - */ -export type Label = { - key: string; - repeat: number; - value?: (number | null); -}; - diff --git a/src/plugins/api/api-core/models/LabelFilterBool.ts b/src/plugins/api/api-core/models/LabelFilterBool.ts deleted file mode 100644 index 2c6949df7918fb9157f9785c5d840e8fb4f29a6a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/LabelFilterBool.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UsersFilter } from './UsersFilter'; - -export type LabelFilterBool = { - scopes?: (Array<string> | null); - scheme?: (string | null); - users?: (UsersFilter | null); - repeats?: (Array<number> | null); - key: string; - type: LabelFilterBool.type; - filter?: any; - value_type?: any; - comp?: any; - value_bool?: (boolean | null); -}; - -export namespace LabelFilterBool { - - export enum type { - USER = 'user', - BOT = 'bot', - RESOLVED = 'resolved', - } - - -} - diff --git a/src/plugins/api/api-core/models/LabelFilterInt.ts b/src/plugins/api/api-core/models/LabelFilterInt.ts deleted file mode 100644 index 72716725cad6bc9a550475cad17966ddd14c6f34..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/LabelFilterInt.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UsersFilter } from './UsersFilter'; - -export type LabelFilterInt = { - scopes?: (Array<string> | null); - scheme?: (string | null); - users?: (UsersFilter | null); - repeats?: (Array<number> | null); - key: string; - type: LabelFilterInt.type; - filter?: any; - value_type?: any; - value_int?: (number | null); - comp: string; -}; - -export namespace LabelFilterInt { - - export enum type { - USER = 'user', - BOT = 'bot', - RESOLVED = 'resolved', - } - - -} - diff --git a/src/plugins/api/api-core/models/LabelFilterMulti.ts b/src/plugins/api/api-core/models/LabelFilterMulti.ts deleted file mode 100644 index 252f0679bbc350e2cce207c9a1ec545eaaa5599b..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/LabelFilterMulti.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UsersFilter } from './UsersFilter'; - -export type LabelFilterMulti = { - scopes?: (Array<string> | null); - scheme?: (string | null); - users?: (UsersFilter | null); - repeats?: (Array<number> | null); - key: string; - type: LabelFilterMulti.type; - filter?: any; - value_type?: any; - multi_int?: (Array<number> | null); - comp: string; -}; - -export namespace LabelFilterMulti { - - export enum type { - USER = 'user', - BOT = 'bot', - RESOLVED = 'resolved', - } - - -} - diff --git a/src/plugins/api/api-core/models/LabelOptions.ts b/src/plugins/api/api-core/models/LabelOptions.ts deleted file mode 100644 index 03f44ddc8f08ef0154881d4524ba8bda7d44ee53..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/LabelOptions.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type LabelOptions = { - key: string; - options_int?: (Array<number> | null); - options_bool?: (Array<boolean> | null); - options_multi?: (Array<number> | null); - strings?: (boolean | null); -}; - diff --git a/src/plugins/api/api-core/models/LabelScope.ts b/src/plugins/api/api-core/models/LabelScope.ts deleted file mode 100644 index 8161067c92003337eab427905ed41c71e9374566..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/LabelScope.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type LabelScope = { - scope_id: string; - name: string; - scope_type: LabelScope.scope_type; -}; - -export namespace LabelScope { - - export enum scope_type { - H = 'H', - R = 'R', - } - - -} - diff --git a/src/plugins/api/api-core/models/LexisNexisItemModel.ts b/src/plugins/api/api-core/models/LexisNexisItemModel.ts deleted file mode 100644 index fe8bec05667bdd3da92a75f4504ccea0c1e493b4..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/LexisNexisItemModel.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ItemType } from './ItemType'; - -export type LexisNexisItemModel = { - item_id?: (string | null); - project_id?: (string | null); - type?: ItemType; - text?: (string | null); - teaser?: (string | null); - authors?: (Array<string> | null); -}; - diff --git a/src/plugins/api/api-core/models/LexisNexisItemSourceModel.ts b/src/plugins/api/api-core/models/LexisNexisItemSourceModel.ts deleted file mode 100644 index 901f928cf8f36e865e5e73a75b0f12683e86ebbb..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/LexisNexisItemSourceModel.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type LexisNexisItemSourceModel = { - item_source_id?: (string | null); - item_id?: (string | null); - lexis_id: string; - name?: (string | null); - title?: (string | null); - section?: (string | null); - jurisdiction?: (string | null); - location?: (string | null); - content_type?: (string | null); - published_at?: (string | null); - updated_at?: (string | null); - meta?: null; -}; - diff --git a/src/plugins/api/api-core/models/MakeAssignmentsRequestModel.ts b/src/plugins/api/api-core/models/MakeAssignmentsRequestModel.ts deleted file mode 100644 index 4ff33c2865ac8d335c515549df9a2cd42d9b1f1a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/MakeAssignmentsRequestModel.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AssignmentScopeRandomConfig } from './AssignmentScopeRandomConfig'; -import type { AssignmentScopeRandomWithExclusionConfig } from './AssignmentScopeRandomWithExclusionConfig'; -import type { AssignmentScopeRandomWithNQLConfig } from './AssignmentScopeRandomWithNQLConfig'; - -export type MakeAssignmentsRequestModel = { - annotation_scheme_id: string; - scope_id: string; - config: (AssignmentScopeRandomWithExclusionConfig | AssignmentScopeRandomWithNQLConfig | AssignmentScopeRandomConfig); - save?: boolean; -}; - diff --git a/src/plugins/api/api-core/models/Mention.ts b/src/plugins/api/api-core/models/Mention.ts deleted file mode 100644 index f6b3fba659c460c2c6575e354b18a4a56c6c7f00..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/Mention.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type Mention = { - start: number; - end: number; - username: string; - user_id: (string | number); -}; - diff --git a/src/plugins/api/api-core/models/MetaFilterBool.ts b/src/plugins/api/api-core/models/MetaFilterBool.ts deleted file mode 100644 index 862cc7b2966d0832b33f5efc6d0c507f00f26744..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/MetaFilterBool.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type MetaFilterBool = { - field: string; - filter?: any; - value_type?: any; - comp?: any; - value: boolean; -}; - diff --git a/src/plugins/api/api-core/models/MetaFilterInt.ts b/src/plugins/api/api-core/models/MetaFilterInt.ts deleted file mode 100644 index 819bfdb7fc02b22c7e55d1a9d8a7e82b0d7f6484..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/MetaFilterInt.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type MetaFilterInt = { - field: string; - filter?: any; - value_type?: any; - comp: string; - value: number; -}; - diff --git a/src/plugins/api/api-core/models/MetaFilterStr.ts b/src/plugins/api/api-core/models/MetaFilterStr.ts deleted file mode 100644 index 1e9d82f9f66167159a7f8c7bee963d98780ef04c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/MetaFilterStr.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type MetaFilterStr = { - field: string; - filter?: any; - value_type?: any; - comp?: any; - value: string; -}; - diff --git a/src/plugins/api/api-core/models/OpenAlexImport.ts b/src/plugins/api/api-core/models/OpenAlexImport.ts deleted file mode 100644 index 198f76733285cca278a512e7b8c50beb71a1f7c7..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/OpenAlexImport.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type OpenAlexImport = { - func_name: any; - query: string; - def_type?: OpenAlexImport.def_type; - field?: OpenAlexImport.field; - op?: OpenAlexImport.op; - project_id?: (string | null); - import_id?: (string | null); -}; - -export namespace OpenAlexImport { - - export enum def_type { - EDISMAX = 'edismax', - LUCENE = 'lucene', - DISMAX = 'dismax', - } - - export enum field { - TITLE = 'title', - ABSTRACT = 'abstract', - TITLE_ABSTRACT = 'title_abstract', - } - - export enum op { - OR = 'OR', - AND = 'AND', - } - - -} - diff --git a/src/plugins/api/api-core/models/OpenAlexItemImport.ts b/src/plugins/api/api-core/models/OpenAlexItemImport.ts deleted file mode 100644 index 3787e0ca00875be5e541a4f217337d805a071871..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/OpenAlexItemImport.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type OpenAlexItemImport = { - func_name: any; - encoding?: any; - project_id?: (string | null); - import_id?: (string | null); - filenames: Array<string>; -}; - diff --git a/src/plugins/api/api-core/models/ProjectBaseInfo.ts b/src/plugins/api/api-core/models/ProjectBaseInfo.ts deleted file mode 100644 index 491f4a82663023766b2c749ec5239827c653c7cb..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ProjectBaseInfo.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { LabelOptions } from './LabelOptions'; -import type { ProjectBaseInfoEntry } from './ProjectBaseInfoEntry'; -import type { ProjectBaseInfoScopeEntry } from './ProjectBaseInfoScopeEntry'; - -export type ProjectBaseInfo = { - users: Array<ProjectBaseInfoEntry>; - scopes: Array<ProjectBaseInfoScopeEntry>; - bot_scopes: Array<ProjectBaseInfoEntry>; - labels: Record<string, LabelOptions>; -}; - diff --git a/src/plugins/api/api-core/models/ProjectBaseInfoEntry.ts b/src/plugins/api/api-core/models/ProjectBaseInfoEntry.ts deleted file mode 100644 index 952f7cc33b8fa845cc1d79a7fced3251d027fb2f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ProjectBaseInfoEntry.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ProjectBaseInfoEntry = { - id: string; - name: string; -}; - diff --git a/src/plugins/api/api-core/models/ProjectBaseInfoScopeEntry.ts b/src/plugins/api/api-core/models/ProjectBaseInfoScopeEntry.ts deleted file mode 100644 index 6983b1cf3d3a171a4ad709e84c63831cd624bf6c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ProjectBaseInfoScopeEntry.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ProjectBaseInfoScopeEntry = { - id: string; - name: string; - scheme_id: string; - scheme_name: string; -}; - diff --git a/src/plugins/api/api-core/models/ProjectInfo.ts b/src/plugins/api/api-core/models/ProjectInfo.ts deleted file mode 100644 index 7428d149c86850b62dedbd247f201bcab9c9d92a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ProjectInfo.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ItemType } from './ItemType'; -import type { UserBaseModel } from './UserBaseModel'; - -export type ProjectInfo = { - project_id?: (string | null); - name: string; - description?: (string | null); - time_created?: (string | null); - type: ('generic' | 'twitter' | 'academic' | 'patents' | 'lexis' | ItemType); - setting_motivational_quotes?: boolean; - owners: Array<UserBaseModel>; -}; - diff --git a/src/plugins/api/api-core/models/ProjectModel.ts b/src/plugins/api/api-core/models/ProjectModel.ts deleted file mode 100644 index ad751c471c507e87d4749aa7315d11bbd2a31970..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ProjectModel.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ItemType } from './ItemType'; - -/** - * Project is the basic structural and conceptual place around which all functionality evolves. - * It is essentially a container for a logically connected set of analyses, e.g. all work for a paper. - * - * Although Items (and subsequently their type-specific extensions) live outside the scope of a project, - * they way they are augmented by annotations and analysis outcomes is always constrained to the scope - * of a Project. - */ -export type ProjectModel = { - project_id?: (string | null); - name: string; - description?: (string | null); - time_created?: (string | null); - type: ('generic' | 'twitter' | 'academic' | 'patents' | 'lexis' | ItemType); - setting_motivational_quotes?: boolean; -}; - diff --git a/src/plugins/api/api-core/models/ProjectPermissionsModel.ts b/src/plugins/api/api-core/models/ProjectPermissionsModel.ts deleted file mode 100644 index b9b7bd84abc271832c763f9713e6da0243896959..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ProjectPermissionsModel.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * ProjectPermissions allows to define fine-grained project-level permission management. - * Once such an entry exists, the user is assumed to have very basic access to the respective project. - * A user may become "owner" of a project, which will allow them to do everything and effectively ignoring the - * other more fine-grained permission settings. - * - * It is assumed, that a user can always see and edit their own contributions (e.g. annotations) but - * by giving them permission to view annotations, they can also see other users' annotations. - */ -export type ProjectPermissionsModel = { - project_permission_id?: (string | null); - project_id: string; - user_id: string; - owner?: boolean; - dataset_read?: boolean; - dataset_edit?: boolean; - imports_read?: boolean; - imports_edit?: boolean; - annotations_read?: boolean; - annotations_edit?: boolean; - pipelines_read?: boolean; - pipelines_edit?: boolean; - artefacts_read?: boolean; - artefacts_edit?: boolean; - search_dimensions?: boolean; - search_oa?: boolean; - import_limit_oa?: number; -}; - diff --git a/src/plugins/api/api-core/models/QueryResult.ts b/src/plugins/api/api-core/models/QueryResult.ts deleted file mode 100644 index e8fc3f2df3f36261ac2aca7d8cba78393d549f03..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/QueryResult.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AcademicItemModel } from './AcademicItemModel'; -import type { FullLexisNexisItemModel } from './FullLexisNexisItemModel'; -import type { GenericItemModel } from './GenericItemModel'; - -export type QueryResult = { - n_docs: number; - docs: (Array<AcademicItemModel> | Array<FullLexisNexisItemModel> | Array<GenericItemModel>); -}; - diff --git a/src/plugins/api/api-core/models/RankEntry.ts b/src/plugins/api/api-core/models/RankEntry.ts deleted file mode 100644 index 08f17353443bcec17a5a592c9c180f930f135fc4..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/RankEntry.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type RankEntry = { - user_id: string; - username: string; - full_name: string; - email: string; - affiliation: string; - num_labels: number; - num_labeled_items: number; -}; - diff --git a/src/plugins/api/api-core/models/ReferencedTweet.ts b/src/plugins/api/api-core/models/ReferencedTweet.ts deleted file mode 100644 index 33b624446cba921295ec8a41240a92909acb3725..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ReferencedTweet.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ReferencedTweet = { - id: (string | number); - type: ReferencedTweet.type; -}; - -export namespace ReferencedTweet { - - export enum type { - RETWEETED = 'retweeted', - QUOTED = 'quoted', - REPLIED_TO = 'replied_to', - } - - -} - diff --git a/src/plugins/api/api-core/models/ResolutionCell.ts b/src/plugins/api/api-core/models/ResolutionCell.ts deleted file mode 100644 index 0335ed04caf08d2d89b68fda6bbbafae5304718a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ResolutionCell.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { BotAnnotationModel } from './BotAnnotationModel'; -import type { ResolutionStatus } from './ResolutionStatus'; -import type { ResolutionUserEntry } from './ResolutionUserEntry'; - -export type ResolutionCell = { - labels: Record<string, Array<ResolutionUserEntry>>; - resolution: BotAnnotationModel; - status?: ResolutionStatus; -}; - diff --git a/src/plugins/api/api-core/models/ResolutionOrdering.ts b/src/plugins/api/api-core/models/ResolutionOrdering.ts deleted file mode 100644 index 508d2dec0d98bc4d06000872af6716c8fc027270..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ResolutionOrdering.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ResolutionOrdering = { - identifier: number; - first_occurrence: number; - item_id: string; -}; - diff --git a/src/plugins/api/api-core/models/ResolutionProposal.ts b/src/plugins/api/api-core/models/ResolutionProposal.ts deleted file mode 100644 index 1eb1573afd211d64015199ff47a46f158549c188..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ResolutionProposal.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationSchemeInfo } from './AnnotationSchemeInfo'; -import type { FlatLabel } from './FlatLabel'; -import type { ResolutionCell } from './ResolutionCell'; -import type { ResolutionOrdering } from './ResolutionOrdering'; -import type { UserModel } from './UserModel'; - -export type ResolutionProposal = { - scheme_info: AnnotationSchemeInfo; - labels: Array<FlatLabel>; - annotators: Array<UserModel>; - ordering: Array<ResolutionOrdering>; - matrix: Record<string, Record<string, ResolutionCell>>; -}; - diff --git a/src/plugins/api/api-core/models/ResolutionSnapshotEntry.ts b/src/plugins/api/api-core/models/ResolutionSnapshotEntry.ts deleted file mode 100644 index a8cde1d84ec8a1513ddee136232845be81ac2132..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ResolutionSnapshotEntry.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ResolutionSnapshotEntry = { - order_key: string; - path_key: string; - ba_id: string; -}; - diff --git a/src/plugins/api/api-core/models/ResolutionStatus.ts b/src/plugins/api/api-core/models/ResolutionStatus.ts deleted file mode 100644 index f51f62b5973fdd86457390e22dfea75bd040e59a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ResolutionStatus.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum ResolutionStatus { - NEW = 'NEW', - CHANGED = 'CHANGED', - UNCHANGED = 'UNCHANGED', -} diff --git a/src/plugins/api/api-core/models/ResolutionUserEntry.ts b/src/plugins/api/api-core/models/ResolutionUserEntry.ts deleted file mode 100644 index 2fba94bd150178e426c2419bfe1a0047293616da..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ResolutionUserEntry.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { DehydratedAssignment } from './DehydratedAssignment'; -import type { ItemAnnotation } from './ItemAnnotation'; -import type { ResolutionStatus } from './ResolutionStatus'; - -export type ResolutionUserEntry = { - assignment?: (DehydratedAssignment | null); - annotation?: (ItemAnnotation | null); - status?: ResolutionStatus; -}; - diff --git a/src/plugins/api/api-core/models/SavedResolution.ts b/src/plugins/api/api-core/models/SavedResolution.ts deleted file mode 100644 index b41f061eb0b86ba38f17c268490a1840b72d255c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/SavedResolution.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { BotAnnotationResolution } from './BotAnnotationResolution'; -import type { ResolutionProposal } from './ResolutionProposal'; - -export type SavedResolution = { - meta: BotAnnotationResolution; - proposal: ResolutionProposal; -}; - diff --git a/src/plugins/api/api-core/models/ScopusCSVImport.ts b/src/plugins/api/api-core/models/ScopusCSVImport.ts deleted file mode 100644 index 3b99e8272a5abf43f2d804ea9d978c873206b3cb..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ScopusCSVImport.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ScopusCSVImport = { - func_name: any; - project_id?: (string | null); - import_id?: (string | null); - filenames: Array<string>; -}; - diff --git a/src/plugins/api/api-core/models/SearchResult.ts b/src/plugins/api/api-core/models/SearchResult.ts deleted file mode 100644 index 3418edcfcd30c462cab2e75f2547739e0848ca05..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/SearchResult.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AcademicItemModel } from './AcademicItemModel'; - -export type SearchResult = { - query_time: number; - num_found: number; - docs: Array<AcademicItemModel>; - histogram?: (Record<string, number> | null); -}; - diff --git a/src/plugins/api/api-core/models/SnapshotEntry.ts b/src/plugins/api/api-core/models/SnapshotEntry.ts deleted file mode 100644 index cb223a1ef0588013d770449a950e5a34eea59a06..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/SnapshotEntry.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type SnapshotEntry = { - value_bool?: (boolean | null); - value_int?: (number | null); - value_float?: (number | null); - value_str?: (string | null); - multi_int?: (Array<number> | null); - order_key: string; - path_key: string; - item_id: string; - anno_id: string; - user_id: string; -}; - diff --git a/src/plugins/api/api-core/models/SubQuery.ts b/src/plugins/api/api-core/models/SubQuery.ts deleted file mode 100644 index 79a48ead62f22a643db0c356e190218ec4faf977..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/SubQuery.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AnnotationFilter } from './AnnotationFilter'; -import type { AssignmentFilter } from './AssignmentFilter'; -import type { FieldFilter } from './FieldFilter'; -import type { FieldFilters } from './FieldFilters'; -import type { ImportFilter } from './ImportFilter'; -import type { LabelFilterBool } from './LabelFilterBool'; -import type { LabelFilterInt } from './LabelFilterInt'; -import type { LabelFilterMulti } from './LabelFilterMulti'; -import type { MetaFilterBool } from './MetaFilterBool'; -import type { MetaFilterInt } from './MetaFilterInt'; -import type { MetaFilterStr } from './MetaFilterStr'; - -export type SubQuery = { - filter?: any; - and_?: null; - or_?: null; - not_?: ((FieldFilter | FieldFilters | LabelFilterMulti | LabelFilterBool | LabelFilterInt | AssignmentFilter | AnnotationFilter | ImportFilter | MetaFilterBool | MetaFilterInt | MetaFilterStr | SubQuery) | null); -}; - diff --git a/src/plugins/api/api-core/models/TermStats.ts b/src/plugins/api/api-core/models/TermStats.ts deleted file mode 100644 index de3f954fb8a0fb39e8436f7fe820598732c63e19..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/TermStats.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TermStats = { - term: string; - df: number; - ttf: number; -}; - diff --git a/src/plugins/api/api-core/models/TwitterAPIFileImport.ts b/src/plugins/api/api-core/models/TwitterAPIFileImport.ts deleted file mode 100644 index e53e05dfff6d84539f07b03f0a6ffea13f2fdf4f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/TwitterAPIFileImport.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TwitterAPIFileImport = { - func_name: any; - encoding?: any; - project_id?: (string | null); - import_id?: (string | null); - filenames: Array<string>; -}; - diff --git a/src/plugins/api/api-core/models/TwitterDBFileImport.ts b/src/plugins/api/api-core/models/TwitterDBFileImport.ts deleted file mode 100644 index f55f6a1eee3ea84e85d27567dcb99ba5af6bb898..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/TwitterDBFileImport.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type TwitterDBFileImport = { - func_name: any; - encoding?: any; - project_id?: (string | null); - import_id?: (string | null); - filenames: Array<string>; -}; - diff --git a/src/plugins/api/api-core/models/TwitterItemModel.ts b/src/plugins/api/api-core/models/TwitterItemModel.ts deleted file mode 100644 index 316b70f99439dd28dcfde844e2944e53e5cb5477..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/TwitterItemModel.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Cashtag } from './Cashtag'; -import type { ContextAnnotation } from './ContextAnnotation'; -import type { Hashtag } from './Hashtag'; -import type { ItemType } from './ItemType'; -import type { Mention } from './Mention'; -import type { ReferencedTweet } from './ReferencedTweet'; -import type { TwitterUserModel } from './TwitterUserModel'; -import type { URL } from './URL'; - -/** - * Corresponds to db.models.items.TwitterItem - * - * For more in-depth documentation, please refer to: - * https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet - */ -export type TwitterItemModel = { - item_id?: (string | null); - project_id?: (string | null); - type?: ItemType; - text?: (string | null); - twitter_id?: (string | null); - twitter_author_id?: (string | null); - created_at: string; - language?: (string | null); - conversation_id?: (string | null); - referenced_tweets?: (Array<ReferencedTweet> | null); - latitude?: (number | null); - longitude?: (number | null); - hashtags?: (Array<Hashtag> | null); - mentions?: (Array<Mention> | null); - urls?: (Array<URL> | null); - cashtags?: (Array<Cashtag> | null); - context_annotations?: (Array<ContextAnnotation> | null); - retweet_count: number; - reply_count: number; - like_count: number; - quote_count: number; - user?: (TwitterUserModel | null); -}; - diff --git a/src/plugins/api/api-core/models/TwitterUserModel.ts b/src/plugins/api/api-core/models/TwitterUserModel.ts deleted file mode 100644 index c19205c5b65c04aa0ace0b3177ea0cdb4b3b8320..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/TwitterUserModel.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * Flattened and reduced representation of a Twitter User Object - * https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user - * - * NOTE: - * - In the context of a `TwitterItemModel`, the `id` is not set as it can be inferred from `twitter_author_id` - * - `name` is None if `name` == `username` to save space - */ -export type TwitterUserModel = { - id?: (string | null); - created_at: string; - name?: (string | null); - username: string; - verified: boolean; - description?: (string | null); - location?: (string | null); - followers_count?: (number | null); - following_count?: (number | null); - tweet_count?: (number | null); - listed_count?: (number | null); -}; - diff --git a/src/plugins/api/api-core/models/URL.ts b/src/plugins/api/api-core/models/URL.ts deleted file mode 100644 index 0790b3220b3bb601fc7c37ab41f6f3ccd1d4daa6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/URL.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type URL = { - start: number; - end: number; - url: string; - url_expanded: string; -}; - diff --git a/src/plugins/api/api-core/models/UserBaseModel.ts b/src/plugins/api/api-core/models/UserBaseModel.ts deleted file mode 100644 index b9d3fdd5d15c8b28ad734b7095727976f1833b11..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/UserBaseModel.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * User represents a person. - * Most entries in the database will be (indirectly) linked to user accounts, so this is - * at the core of access management and ownership. - */ -export type UserBaseModel = { - user_id?: (string | null); - username?: (string | null); - full_name?: (string | null); - email?: (string | null); - affiliation?: (string | null); - is_superuser?: (boolean | null); - is_active?: (boolean | null); - time_created?: (string | null); - time_updated?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/UserInDBModel.ts b/src/plugins/api/api-core/models/UserInDBModel.ts deleted file mode 100644 index 79cced084399bfd577827642a9e2b958b0424bef..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/UserInDBModel.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type UserInDBModel = { - user_id?: (string | null); - username?: (string | null); - full_name?: (string | null); - email?: (string | null); - affiliation?: (string | null); - is_superuser?: (boolean | null); - is_active?: (boolean | null); - time_created?: (string | null); - time_updated?: (string | null); - password?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/UserModel.ts b/src/plugins/api/api-core/models/UserModel.ts deleted file mode 100644 index 1a96fd5ac6665e80673d09d79dd28d9cade977db..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/UserModel.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type UserModel = { - user_id?: (string | null); - username?: (string | null); - full_name?: (string | null); - email?: (string | null); - affiliation?: (string | null); - is_superuser?: (boolean | null); - is_active?: (boolean | null); - time_created?: (string | null); - time_updated?: (string | null); -}; - diff --git a/src/plugins/api/api-core/models/UserPermission.ts b/src/plugins/api/api-core/models/UserPermission.ts deleted file mode 100644 index 3845c478a656004128082aa628bb15347cfa986f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/UserPermission.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { UserBaseModel } from './UserBaseModel'; - -export type UserPermission = { - project_permission_id?: (string | null); - project_id: string; - user_id: string; - owner?: boolean; - dataset_read?: boolean; - dataset_edit?: boolean; - imports_read?: boolean; - imports_edit?: boolean; - annotations_read?: boolean; - annotations_edit?: boolean; - pipelines_read?: boolean; - pipelines_edit?: boolean; - artefacts_read?: boolean; - artefacts_edit?: boolean; - search_dimensions?: boolean; - search_oa?: boolean; - import_limit_oa?: number; - user: UserBaseModel; -}; - diff --git a/src/plugins/api/api-core/models/UserProjectAssignmentScope.ts b/src/plugins/api/api-core/models/UserProjectAssignmentScope.ts deleted file mode 100644 index 3e5e300262e65424522fa8aabd21648ab3fb2b9a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/UserProjectAssignmentScope.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { AssignmentScopeModel } from './AssignmentScopeModel'; - -export type UserProjectAssignmentScope = { - scope: AssignmentScopeModel; - scheme_name: string; - scheme_description: string; - num_assignments: number; - num_open: number; - num_partial: number; - num_completed: number; -}; - diff --git a/src/plugins/api/api-core/models/UsersFilter.ts b/src/plugins/api/api-core/models/UsersFilter.ts deleted file mode 100644 index 841921f1fd5e5af61c8560f92b1e39234b924449..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/UsersFilter.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type UsersFilter = { - user_ids: Array<string>; - mode: UsersFilter.mode; -}; - -export namespace UsersFilter { - - export enum mode { - ALL = 'ALL', - ANY = 'ANY', - } - - -} - diff --git a/src/plugins/api/api-core/models/ValidationError.ts b/src/plugins/api/api-core/models/ValidationError.ts deleted file mode 100644 index 14e1fdecd0c51f4d820d0278c19fb993dfe40045..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/ValidationError.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ValidationError = { - loc: Array<(string | number)>; - msg: string; - type: string; -}; - diff --git a/src/plugins/api/api-core/models/WOSImport.ts b/src/plugins/api/api-core/models/WOSImport.ts deleted file mode 100644 index 465cbd35a1f31a97f4802c85efb9fd2ebb837b7e..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/models/WOSImport.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type WOSImport = { - func_name: any; - project_id?: (string | null); - import_id?: (string | null); - filenames: Array<string>; -}; - diff --git a/src/plugins/api/api-core/schemas/$AcademicAuthorModel.ts b/src/plugins/api/api-core/schemas/$AcademicAuthorModel.ts deleted file mode 100644 index 56e2ea216505cd6329660cac76720d234940909d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AcademicAuthorModel.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AcademicAuthorModel = { - properties: { - name: { - type: 'string', - isRequired: true, - }, - surname_initials: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - email: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - orcid: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - scopus_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - openalex_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - s2_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - affiliations: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'AffiliationModel', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AcademicItemImport.ts b/src/plugins/api/api-core/schemas/$AcademicItemImport.ts deleted file mode 100644 index 6df4562e363babeba8c9006f51e0e47033995721..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AcademicItemImport.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AcademicItemImport = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - encoding: { - properties: { - }, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - filenames: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AcademicItemModel.ts b/src/plugins/api/api-core/schemas/$AcademicItemModel.ts deleted file mode 100644 index c2270bc3a406091ed6d702b3a3b0f94a53f2f684..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AcademicItemModel.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AcademicItemModel = { - description: `Corresponds to db.schema.items.academic.AcademicItem`, - properties: { - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - type: { - type: 'all-of', - contains: [{ - type: 'ItemType', - }], - }, - text: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - doi: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - wos_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - scopus_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - openalex_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - s2_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - pubmed_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - dimensions_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - title: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - title_slug: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - publication_year: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - source: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - keywords: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - authors: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'AcademicAuthorModel', - }, - }, { - type: 'null', - }], - }, - meta: { - type: 'any-of', - contains: [{ - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AffiliationModel.ts b/src/plugins/api/api-core/schemas/$AffiliationModel.ts deleted file mode 100644 index 565015d50c1913d8fd8e716b20f9ca1d4bf17e19..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AffiliationModel.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AffiliationModel = { - properties: { - name: { - type: 'string', - isRequired: true, - }, - country: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - openalex_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - s2_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotatedItem.ts b/src/plugins/api/api-core/schemas/$AnnotatedItem.ts deleted file mode 100644 index cd252d23e9f1a6cbb3c6aab0179516fec59dfa49..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotatedItem.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotatedItem = { - properties: { - scheme: { - type: 'AnnotationSchemeModel', - isRequired: true, - }, - assignment: { - type: 'AssignmentModel', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationFilter.ts b/src/plugins/api/api-core/schemas/$AnnotationFilter.ts deleted file mode 100644 index 22740b7bfcf1f8c30957d1169f641c8c20808e6f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationFilter.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationFilter = { - properties: { - filter: { - properties: { - }, - }, - incl: { - type: 'boolean', - isRequired: true, - }, - scopes: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - scheme: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationItem.ts b/src/plugins/api/api-core/schemas/$AnnotationItem.ts deleted file mode 100644 index 7c6d64958560fcb2561eece9f7c8f1d8d9abcca0..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationItem.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationItem = { - properties: { - scheme: { - type: 'AnnotationSchemeModel', - isRequired: true, - }, - assignment: { - type: 'AssignmentModel', - isRequired: true, - }, - scope: { - type: 'AssignmentScopeModel', - isRequired: true, - }, - item: { - type: 'any-of', - contains: [{ - type: 'TwitterItemModel', - }, { - type: 'AcademicItemModel', - }, { - type: 'LexisNexisItemModel', - }, { - type: 'FullLexisNexisItemModel', - }, { - type: 'GenericItemModel', - }], - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationModel.ts b/src/plugins/api/api-core/schemas/$AnnotationModel.ts deleted file mode 100644 index b261d6d7214dc0496be358a94b2144bd73e1f023..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationModel.ts +++ /dev/null @@ -1,164 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationModel = { - description: `Corresponds to db.models.annotations.Annotation - - Annotation holds the judgement of a User for a specific Item in the context of an AnnotationScheme - as a response to an Assignment. - Once an Annotation exists, the Assignment should be considered (partially) resolved. - - Note, that AnnotationScheme, User, and Item would be implicit by the Assignment. - However, for ease of use and in favour of fewer joins, this information is replicated here. - - The Annotation refers to an AnnotationSchemeLabel defined in an AnnotationScheme, which is referred to by its \`key\`. - If the scheme allows the user to make repeated annotations for the same Label (\`key\`), - an offset is defined in \`repeat\` (e.g. for primary technology is "natural tech", secondary is "forests"). - - Note, that there is no database constraints on the completeness of an Assignment/AnnotationScheme. - The interface/backend code should be used to make sure, to either not allow partial fulfillment of an - AnnotationScheme or not display an Assignment as complete.`, - properties: { - value_bool: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - value_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_float: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_str: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - multi_int: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - annotation_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - assignment_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - snippet_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - key: { - type: 'string', - isRequired: true, - }, - repeat: { - type: 'number', - }, - parent: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationQualityModel.ts b/src/plugins/api/api-core/schemas/$AnnotationQualityModel.ts deleted file mode 100644 index 7eb60d4e91529be96b97850f485e3662d16b27a1..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationQualityModel.ts +++ /dev/null @@ -1,284 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationQualityModel = { - description: `Annotation Quality Trackers - Computing annotator agreements is a little too expensive to do on the fly. Hence, we capture different - quality metrics in this table; one row per assignment scope and label.`, - properties: { - annotation_quality_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - assignment_scope_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - bot_annotation_metadata_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - user_base: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - annotations_base: { - type: 'any-of', - contains: [{ - type: 'null', - }], - }, - user_target: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - annotations_target: { - type: 'any-of', - contains: [{ - type: 'null', - }], - }, - label_key: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - label_value: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - cohen: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - fleiss: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - randolph: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - krippendorff: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - pearson: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - pearson_p: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - kendall: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - kendall_p: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - spearman: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - spearman_p: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - precision: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - recall: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - f1: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - multi_overlap_mean: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - multi_overlap_median: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - multi_overlap_std: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - num_items: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - num_overlap: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - num_agree: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - num_disagree: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - perc_agree: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationSchemeInfo.ts b/src/plugins/api/api-core/schemas/$AnnotationSchemeInfo.ts deleted file mode 100644 index f5e3594df4cc576628f812318abecca10b8ce7c5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationSchemeInfo.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationSchemeInfo = { - properties: { - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - description: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - inclusion_rule: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationSchemeLabel.ts b/src/plugins/api/api-core/schemas/$AnnotationSchemeLabel.ts deleted file mode 100644 index aad3f396100ed4d90412c215c56b73e4e2f68b0c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationSchemeLabel.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationSchemeLabel = { - properties: { - name: { - type: 'string', - isRequired: true, - }, - key: { - type: 'string', - isRequired: true, - }, - hint: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - max_repeat: { - type: 'number', - }, - required: { - type: 'boolean', - }, - dropdown: { - type: 'boolean', - }, - kind: { - type: 'Enum', - }, - choices: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'AnnotationSchemeLabelChoice', - }, - }, { - type: 'null', - }], - }, - annotation: { - type: 'any-of', - contains: [{ - type: 'AnnotationModel', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationSchemeLabelChoice.ts b/src/plugins/api/api-core/schemas/$AnnotationSchemeLabelChoice.ts deleted file mode 100644 index 92a96ccf83c4ba9e792c5df834912f2f2955e077..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationSchemeLabelChoice.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationSchemeLabelChoice = { - properties: { - name: { - type: 'string', - isRequired: true, - }, - hint: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - value: { - type: 'number', - isRequired: true, - }, - children: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'AnnotationSchemeLabel', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationSchemeLabelChoiceFlat.ts b/src/plugins/api/api-core/schemas/$AnnotationSchemeLabelChoiceFlat.ts deleted file mode 100644 index 5c72e376a2cdf43f8f44a8140723da7f02e496f2..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationSchemeLabelChoiceFlat.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationSchemeLabelChoiceFlat = { - properties: { - name: { - type: 'string', - isRequired: true, - }, - hint: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - value: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationSchemeModel.ts b/src/plugins/api/api-core/schemas/$AnnotationSchemeModel.ts deleted file mode 100644 index cf7d9b9999f39bc1d60f0a4d3716dc9d6c2bb1c0..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationSchemeModel.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationSchemeModel = { - description: `Corresponds to db.models.annotations.AnnotationScheme - - AnnotationScheme defines the annotation scheme for a particular project. - Each project may have multiple AnnotationSchemes, - but projects cannot share the same scheme. In case they are technically the same, - the user would have to create a new copy of that scheme for a different project. - - The actual annotation scheme is defined as a list of labels (see schemas.annotations.AnnotationSchemeLabel). - The other fields pose as meta-data.`, - properties: { - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - description: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - inclusion_rule: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - labels: { - type: 'array', - contains: { - type: 'AnnotationSchemeLabel', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationSchemeModelFlat.ts b/src/plugins/api/api-core/schemas/$AnnotationSchemeModelFlat.ts deleted file mode 100644 index 57b2fff58aa79f3d1b9a68b8de632f52e08936a4..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationSchemeModelFlat.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationSchemeModelFlat = { - description: `Same as AnnotationSchemeModel but with flattened structure.`, - properties: { - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - description: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - inclusion_rule: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - labels: { - type: 'array', - contains: { - type: 'FlattenedAnnotationSchemeLabel', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationTrackerModel.ts b/src/plugins/api/api-core/schemas/$AnnotationTrackerModel.ts deleted file mode 100644 index 2c9f2a1e42b6e8a529d0ed9ab14530c42d86d689..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationTrackerModel.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationTrackerModel = { - description: `Tracker for annotation statistics. - This includes the latest stopping criterion (buscar) metrics and more. - - You may have more than one tracker per project, for example for keeping track of different progresses.`, - properties: { - annotation_tracking_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }], - isRequired: true, - }, - inclusion_rule: { - type: 'string', - isRequired: true, - }, - majority: { - type: 'boolean', - isRequired: true, - }, - n_items_total: { - type: 'number', - isRequired: true, - }, - recall_target: { - type: 'number', - isRequired: true, - }, - source_ids: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }, { - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - labels: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'array', - contains: { - type: 'number', - }, - }, - }, { - type: 'null', - }], - }, - recall: { - type: 'any-of', - contains: [{ - type: 'null', - }], - }, - buscar: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'any[]', - maxItems: 2, - minItems: 2, - }, - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AnnotationValue.ts b/src/plugins/api/api-core/schemas/$AnnotationValue.ts deleted file mode 100644 index f09e2463e69617d07160203bb1cf06f09b95d2b5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AnnotationValue.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AnnotationValue = { - properties: { - value_bool: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - value_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_float: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_str: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - multi_int: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentCounts.ts b/src/plugins/api/api-core/schemas/$AssignmentCounts.ts deleted file mode 100644 index 17f83deb0488681ec5d5aadb85ca4569fc8da990..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentCounts.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentCounts = { - properties: { - num_total: { - type: 'number', - isRequired: true, - }, - num_open: { - type: 'number', - isRequired: true, - }, - num_partial: { - type: 'number', - isRequired: true, - }, - num_full: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentFilter.ts b/src/plugins/api/api-core/schemas/$AssignmentFilter.ts deleted file mode 100644 index d2e6579753e807782e670aad4cda257f8774482d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentFilter.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentFilter = { - properties: { - filter: { - properties: { - }, - }, - mode: { - type: 'number', - isRequired: true, - }, - scopes: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - scheme: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentInfo.ts b/src/plugins/api/api-core/schemas/$AssignmentInfo.ts deleted file mode 100644 index 7c888f9f649f141ab6a33d11182d46fabe19db9c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentInfo.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentInfo = { - properties: { - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - username: { - type: 'string', - isRequired: true, - }, - order: { - type: 'number', - isRequired: true, - }, - assignment_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - status: { - type: 'AssignmentStatus', - isRequired: true, - }, - labels: { - type: 'any-of', - contains: [{ - type: 'dictionary', - contains: { - type: 'array', - contains: { - type: 'AssignmentInfoLabel', - }, - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentInfoLabel.ts b/src/plugins/api/api-core/schemas/$AssignmentInfoLabel.ts deleted file mode 100644 index 9a6e1a08381b8c0e54603c479125fc8dbd3681cb..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentInfoLabel.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentInfoLabel = { - properties: { - repeat: { - type: 'number', - isRequired: true, - }, - value_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_bool: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - multi_ind: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentModel.ts b/src/plugins/api/api-core/schemas/$AssignmentModel.ts deleted file mode 100644 index c8bd38348ba483509526e591b2fc2e1a133914c5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentModel.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentModel = { - description: `Corresponds to db.models.annotations.Assignment - - Assignment is used to request a user/annotator (User) to annotate a particular item (BaseItem) in the database - following a pre-defined annotation scheme (AnnotationScheme). - - Each AnnotationScheme will have several Assignments. - Each User will "receive" several Assignments. - Each Item may have several Assignments (either in relation to different AnnotationSchemes or double-coding). - The Project is implicit by the AnnotationScheme. - - The most common use-cases are: - * Creating assignments in bulk at random (e.g. 3 users should annotate 50 documents each) - * Creating assignments one at a time based on a set of rules (e.g. for double-coding, defined order, bias, ...) - * Creating assignments in small batches or one-by-one in prioritised annotation settings`, - properties: { - assignment_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - assignment_scope_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - status: { - type: 'AssignmentStatus', - isRequired: true, - }, - order: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentScopeEntry.ts b/src/plugins/api/api-core/schemas/$AssignmentScopeEntry.ts deleted file mode 100644 index 422205faf840864736950fb5068510600b4aebac..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentScopeEntry.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentScopeEntry = { - properties: { - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - first_occurrence: { - type: 'number', - isRequired: true, - }, - identifier: { - type: 'number', - isRequired: true, - }, - assignments: { - type: 'array', - contains: { - type: 'AssignmentInfo', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentScopeModel.ts b/src/plugins/api/api-core/schemas/$AssignmentScopeModel.ts deleted file mode 100644 index 900924d1af37770786d46c85dddf7439cb6359dd..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentScopeModel.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentScopeModel = { - description: `AssignmentScope can be used to logically group a set of Assignments. - For example, one may wish to re-use the same AnnotationScheme several times within a project - without copying it each time. It may also be used to logically group different scopes of - the annotation process, for example to make it clear that different subsets of a dataset - are to be annotated. - Logically, this should be viewed as a hierarchical organisation - AnnotationScheme -> [AssignmentScope] -> Assignment -> Annotation`, - properties: { - assignment_scope_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - description: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - config: { - type: 'any-of', - contains: [{ - type: 'one-of', - contains: [{ - type: 'AssignmentScopeRandomWithExclusionConfig', - }, { - type: 'AssignmentScopeRandomWithNQLConfig', - }, { - type: 'AssignmentScopeRandomConfig', - }], - }, { - type: 'null', - }], - }, - highlighter_ids: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentScopeRandomConfig.ts b/src/plugins/api/api-core/schemas/$AssignmentScopeRandomConfig.ts deleted file mode 100644 index d68fd22d011d6a0e8316215c0921fc67bcd1ff42..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentScopeRandomConfig.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentScopeRandomConfig = { - properties: { - config_type: { - properties: { - }, - }, - users: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }, { - type: 'null', - }], - }, - num_items: { - type: 'number', - isRequired: true, - }, - min_assignments_per_item: { - type: 'number', - isRequired: true, - }, - max_assignments_per_item: { - type: 'number', - isRequired: true, - }, - num_multi_coded_items: { - type: 'number', - isRequired: true, - }, - random_seed: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentScopeRandomWithExclusionConfig.ts b/src/plugins/api/api-core/schemas/$AssignmentScopeRandomWithExclusionConfig.ts deleted file mode 100644 index 6d5f546b21b38c5e9501a239969075aa5498b3aa..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentScopeRandomWithExclusionConfig.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentScopeRandomWithExclusionConfig = { - properties: { - config_type: { - properties: { - }, - }, - users: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }, { - type: 'null', - }], - }, - num_items: { - type: 'number', - isRequired: true, - }, - min_assignments_per_item: { - type: 'number', - isRequired: true, - }, - max_assignments_per_item: { - type: 'number', - isRequired: true, - }, - num_multi_coded_items: { - type: 'number', - isRequired: true, - }, - random_seed: { - type: 'number', - isRequired: true, - }, - excluded_scopes: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }], - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentScopeRandomWithNQLConfig.ts b/src/plugins/api/api-core/schemas/$AssignmentScopeRandomWithNQLConfig.ts deleted file mode 100644 index a1dca18f211ed31f34103d894f26b0b820b50199..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentScopeRandomWithNQLConfig.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentScopeRandomWithNQLConfig = { - properties: { - config_type: { - properties: { - }, - }, - users: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }, { - type: 'null', - }], - }, - num_items: { - type: 'number', - isRequired: true, - }, - min_assignments_per_item: { - type: 'number', - isRequired: true, - }, - max_assignments_per_item: { - type: 'number', - isRequired: true, - }, - num_multi_coded_items: { - type: 'number', - isRequired: true, - }, - random_seed: { - type: 'number', - isRequired: true, - }, - query_parsed: { - type: 'one-of', - contains: [{ - type: 'FieldFilter', - }, { - type: 'FieldFilters', - }, { - type: 'LabelFilterMulti', - }, { - type: 'LabelFilterBool', - }, { - type: 'LabelFilterInt', - }, { - type: 'AssignmentFilter', - }, { - type: 'AnnotationFilter', - }, { - type: 'ImportFilter', - }, { - type: 'MetaFilterBool', - }, { - type: 'MetaFilterInt', - }, { - type: 'MetaFilterStr', - }, { - type: 'SubQuery', - }], - isRequired: true, - }, - query_str: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$AssignmentStatus.ts b/src/plugins/api/api-core/schemas/$AssignmentStatus.ts deleted file mode 100644 index d5dec7719f08826c29fc1d36e301af24073d22ff..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AssignmentStatus.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AssignmentStatus = { - type: 'Enum', -} as const; diff --git a/src/plugins/api/api-core/schemas/$AuthTokenModel.ts b/src/plugins/api/api-core/schemas/$AuthTokenModel.ts deleted file mode 100644 index 1f4bb512bd28eea0e9a2bf7bca9b5065e6d01769..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$AuthTokenModel.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $AuthTokenModel = { - properties: { - token_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - username: { - type: 'string', - isRequired: true, - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - valid_till: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$BasicProjectStats.ts b/src/plugins/api/api-core/schemas/$BasicProjectStats.ts deleted file mode 100644 index a1874a817e0f8783fae8e3a313ed4e7494761d24..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BasicProjectStats.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BasicProjectStats = { - properties: { - num_items: { - type: 'number', - isRequired: true, - }, - num_imports: { - type: 'number', - isRequired: true, - }, - num_schemes: { - type: 'number', - isRequired: true, - }, - num_scopes: { - type: 'number', - isRequired: true, - }, - num_labels: { - type: 'number', - isRequired: true, - }, - num_labeled_items: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$Body_login_for_access_token_api_login_token_post.ts b/src/plugins/api/api-core/schemas/$Body_login_for_access_token_api_login_token_post.ts deleted file mode 100644 index 5a907d51fe5ffd316bc06a51a2e66e0e6b445b93..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$Body_login_for_access_token_api_login_token_post.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Body_login_for_access_token_api_login_token_post = { - properties: { - grant_type: { - type: 'any-of', - contains: [{ - type: 'string', - pattern: 'password', - }, { - type: 'null', - }], - }, - username: { - type: 'string', - isRequired: true, - }, - password: { - type: 'string', - isRequired: true, - }, - scope: { - type: 'string', - }, - client_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - client_secret: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$Body_save_resolved_annotations_api_annotations_config_resolve__put.ts b/src/plugins/api/api-core/schemas/$Body_save_resolved_annotations_api_annotations_config_resolve__put.ts deleted file mode 100644 index f04eadee1ec6fbbcdb7e5d270ac70dfb86d0ec40..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$Body_save_resolved_annotations_api_annotations_config_resolve__put.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Body_save_resolved_annotations_api_annotations_config_resolve__put = { - properties: { - settings: { - type: 'BotMetaResolveBase', - isRequired: true, - }, - matrix: { - type: 'dictionary', - contains: { - type: 'dictionary', - contains: { - type: 'ResolutionCell', - }, - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$BotAnnotationMetaDataBaseModel.ts b/src/plugins/api/api-core/schemas/$BotAnnotationMetaDataBaseModel.ts deleted file mode 100644 index 52929a6d4bc95e8bbd2e81704aa482a573482699..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BotAnnotationMetaDataBaseModel.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BotAnnotationMetaDataBaseModel = { - properties: { - bot_annotation_metadata_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - kind: { - type: 'BotKind', - isRequired: true, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - assignment_scope_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$BotAnnotationModel.ts b/src/plugins/api/api-core/schemas/$BotAnnotationModel.ts deleted file mode 100644 index a3c109af134c5d132e7a2a7ae165219340f655a7..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BotAnnotationModel.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BotAnnotationModel = { - properties: { - value_bool: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - value_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_float: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_str: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - multi_int: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - bot_annotation_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - bot_annotation_metadata_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - parent: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - key: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - repeat: { - type: 'number', - }, - order: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - confidence: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$BotAnnotationResolution.ts b/src/plugins/api/api-core/schemas/$BotAnnotationResolution.ts deleted file mode 100644 index 3b51e116c6c07c8848e8323b158f5bc029e37685..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BotAnnotationResolution.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BotAnnotationResolution = { - properties: { - bot_annotation_metadata_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - kind: { - type: 'BotKind', - isRequired: true, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - assignment_scope_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - meta: { - type: 'BotMetaResolve', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$BotKind.ts b/src/plugins/api/api-core/schemas/$BotKind.ts deleted file mode 100644 index 7fa62d4baf51a5418198da907550bc2bf3661970..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BotKind.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BotKind = { - type: 'Enum', -} as const; diff --git a/src/plugins/api/api-core/schemas/$BotMetaInfo.ts b/src/plugins/api/api-core/schemas/$BotMetaInfo.ts deleted file mode 100644 index a8f3ea340408f3c8c2020adf01ab9253d3054386..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BotMetaInfo.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BotMetaInfo = { - properties: { - bot_annotation_metadata_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - kind: { - type: 'BotKind', - isRequired: true, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - assignment_scope_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - num_annotations: { - type: 'number', - isRequired: true, - }, - num_annotated_items: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$BotMetaResolve.ts b/src/plugins/api/api-core/schemas/$BotMetaResolve.ts deleted file mode 100644 index 2061286a51e13d3a1ea68bf8c8516848504f6883..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BotMetaResolve.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BotMetaResolve = { - properties: { - algorithm: { - type: 'Enum', - isRequired: true, - }, - ignore_hierarchy: { - type: 'boolean', - isRequired: true, - }, - ignore_repeat: { - type: 'boolean', - isRequired: true, - }, - snapshot: { - type: 'array', - contains: { - type: 'SnapshotEntry', - }, - isRequired: true, - }, - resolutions: { - type: 'array', - contains: { - type: 'ResolutionSnapshotEntry', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$BotMetaResolveBase.ts b/src/plugins/api/api-core/schemas/$BotMetaResolveBase.ts deleted file mode 100644 index fa44e5ae6bda7fa6af50e28eae81ec4cfc9b075f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$BotMetaResolveBase.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $BotMetaResolveBase = { - properties: { - algorithm: { - type: 'Enum', - isRequired: true, - }, - ignore_hierarchy: { - type: 'boolean', - isRequired: true, - }, - ignore_repeat: { - type: 'boolean', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$Cashtag.ts b/src/plugins/api/api-core/schemas/$Cashtag.ts deleted file mode 100644 index 44a7ef3d78aec4181781356d30dcc524bc674da2..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$Cashtag.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Cashtag = { - properties: { - start: { - type: 'number', - isRequired: true, - }, - end: { - type: 'number', - isRequired: true, - }, - tag: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ContextAnnotation.ts b/src/plugins/api/api-core/schemas/$ContextAnnotation.ts deleted file mode 100644 index 167e02d215261620a7fe35bf7650aa0e5e8ec689..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ContextAnnotation.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ContextAnnotation = { - description: `Flattened and reduced version of the context_annotation object - https://developer.twitter.com/en/docs/twitter-api/annotations/overview - - NOTE: Under the assumption that we could always recover the \`description\` - of the domain and entity, this information is not stored to save space.`, - properties: { - domain_id: { - type: 'string', - isRequired: true, - }, - domain_name: { - type: 'string', - isRequired: true, - }, - entity_id: { - type: 'string', - isRequired: true, - }, - entity_name: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$DehydratedAnnotationTracker.ts b/src/plugins/api/api-core/schemas/$DehydratedAnnotationTracker.ts deleted file mode 100644 index 6d21ef695ac7598753a472c13e269c6f926e8a83..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$DehydratedAnnotationTracker.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $DehydratedAnnotationTracker = { - properties: { - annotation_tracking_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$DehydratedAssignment.ts b/src/plugins/api/api-core/schemas/$DehydratedAssignment.ts deleted file mode 100644 index 586363d3d18c862bea47a008c97aa1708e7a46c7..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$DehydratedAssignment.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $DehydratedAssignment = { - properties: { - assignment_id: { - type: 'string', - isRequired: true, - }, - user_id: { - type: 'string', - isRequired: true, - }, - item_id: { - type: 'string', - isRequired: true, - }, - username: { - type: 'string', - isRequired: true, - }, - status: { - type: 'AssignmentStatus', - isRequired: true, - }, - order: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$DehydratedUser.ts b/src/plugins/api/api-core/schemas/$DehydratedUser.ts deleted file mode 100644 index bc9abe5c5aaabd05480309dc0b92fb30f07b9fd8..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$DehydratedUser.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $DehydratedUser = { - properties: { - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - username: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - full_name: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$Event.ts b/src/plugins/api/api-core/schemas/$Event.ts deleted file mode 100644 index cf7da7ee4d4eef18fc1d9a101d043e3af8b5b4ef..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$Event.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Event = { - properties: { - event: { - type: 'Enum', - isRequired: true, - }, - payload: { - type: 'any-of', - contains: [{ - type: 'ExampleEvent', - }, { - type: 'ExampleSubEvent', - }], - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ExampleEvent.ts b/src/plugins/api/api-core/schemas/$ExampleEvent.ts deleted file mode 100644 index d97c077eb14b9dba49e76c8f671ca92f9001ec65..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ExampleEvent.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ExampleEvent = { - properties: { - payload_a: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ExampleSubEvent.ts b/src/plugins/api/api-core/schemas/$ExampleSubEvent.ts deleted file mode 100644 index a79c5dcebef110c4b935dcb37cbcdca7472adcd0..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ExampleSubEvent.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ExampleSubEvent = { - properties: { - payload_a: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ExportRequest.ts b/src/plugins/api/api-core/schemas/$ExportRequest.ts deleted file mode 100644 index 484f75fd61d59195f6b05832e71c60a70341c8ed..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ExportRequest.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ExportRequest = { - properties: { - labels: { - type: 'array', - contains: { - type: 'LabelOptions', - }, - isRequired: true, - }, - nql_filter: { - type: 'any-of', - contains: [{ - type: 'one-of', - contains: [{ - type: 'FieldFilter', - }, { - type: 'FieldFilters', - }, { - type: 'LabelFilterMulti', - }, { - type: 'LabelFilterBool', - }, { - type: 'LabelFilterInt', - }, { - type: 'AssignmentFilter', - }, { - type: 'AnnotationFilter', - }, { - type: 'ImportFilter', - }, { - type: 'MetaFilterBool', - }, { - type: 'MetaFilterInt', - }, { - type: 'MetaFilterStr', - }, { - type: 'SubQuery', - }], - }, { - type: 'null', - }], - }, - bot_annotation_metadata_ids: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - assignment_scope_ids: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - user_ids: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - ignore_hierarchy: { - type: 'boolean', - }, - ignore_repeat: { - type: 'boolean', - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$FieldFilter.ts b/src/plugins/api/api-core/schemas/$FieldFilter.ts deleted file mode 100644 index 1cdda582f0fe0d2c60655e40063c76b1be61cad4..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$FieldFilter.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FieldFilter = { - properties: { - filter: { - properties: { - }, - }, - field: { - type: 'Enum', - isRequired: true, - }, - value: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'number', - }], - isRequired: true, - }, - comp: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$FieldFilters.ts b/src/plugins/api/api-core/schemas/$FieldFilters.ts deleted file mode 100644 index 0f64a6816a26967eaff18a77815ace4ae437d1c6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$FieldFilters.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FieldFilters = { - properties: { - filter: { - properties: { - }, - }, - field: { - type: 'Enum', - isRequired: true, - }, - values: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$FlatLabel.ts b/src/plugins/api/api-core/schemas/$FlatLabel.ts deleted file mode 100644 index 43f8046eea668c7d1e009addf9e697f3d012cb3c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$FlatLabel.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FlatLabel = { - properties: { - path: { - type: 'array', - contains: { - type: 'Label', - }, - isRequired: true, - }, - repeat: { - type: 'number', - isRequired: true, - }, - path_key: { - type: 'string', - isRequired: true, - }, - parent_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - parent_key: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - parent_value: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - hint: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - key: { - type: 'string', - isRequired: true, - }, - required: { - type: 'boolean', - isRequired: true, - }, - max_repeat: { - type: 'number', - isRequired: true, - }, - kind: { - type: 'Enum', - isRequired: true, - }, - choices: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'FlatLabelChoice', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$FlatLabelChoice.ts b/src/plugins/api/api-core/schemas/$FlatLabelChoice.ts deleted file mode 100644 index 3063f413f17800eb978fe8d2569ceb8382340766..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$FlatLabelChoice.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FlatLabelChoice = { - properties: { - name: { - type: 'string', - isRequired: true, - }, - hint: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - value: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$FlattenedAnnotationSchemeLabel.ts b/src/plugins/api/api-core/schemas/$FlattenedAnnotationSchemeLabel.ts deleted file mode 100644 index 51ba427a256c04b339d3b3f1a8b11f534159858c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$FlattenedAnnotationSchemeLabel.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FlattenedAnnotationSchemeLabel = { - properties: { - name: { - type: 'string', - isRequired: true, - }, - hint: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - key: { - type: 'string', - isRequired: true, - }, - required: { - type: 'boolean', - isRequired: true, - }, - max_repeat: { - type: 'number', - isRequired: true, - }, - implicit_max_repeat: { - type: 'number', - isRequired: true, - }, - kind: { - type: 'Enum', - isRequired: true, - }, - choices: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'AnnotationSchemeLabelChoiceFlat', - }, - }, { - type: 'null', - }], - }, - parent_label: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - parent_choice: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$FullLexisNexisItemModel.ts b/src/plugins/api/api-core/schemas/$FullLexisNexisItemModel.ts deleted file mode 100644 index 53fe381fa33a6ddcb2f530c8c9aeb4cf8bdc78cf..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$FullLexisNexisItemModel.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FullLexisNexisItemModel = { - properties: { - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - type: { - type: 'all-of', - contains: [{ - type: 'ItemType', - }], - }, - text: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - teaser: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - authors: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - sources: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'LexisNexisItemSourceModel', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$GenericItemModel.ts b/src/plugins/api/api-core/schemas/$GenericItemModel.ts deleted file mode 100644 index b7eb31fbf02cdbed1ba5dbd10504be4790c19f9b..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$GenericItemModel.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $GenericItemModel = { - description: `Corresponds to db.models.items.generic.GenericItem`, - properties: { - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - type: { - type: 'all-of', - contains: [{ - type: 'ItemType', - }], - }, - text: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - meta: { - properties: { - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$HTTPValidationError.ts b/src/plugins/api/api-core/schemas/$HTTPValidationError.ts deleted file mode 100644 index 0d129d4b6772ebe31f7eec28c9fa4723320ce9e8..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$HTTPValidationError.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $HTTPValidationError = { - properties: { - detail: { - type: 'array', - contains: { - type: 'ValidationError', - }, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$Hashtag.ts b/src/plugins/api/api-core/schemas/$Hashtag.ts deleted file mode 100644 index 2878a6d0e679538f2b674ca3b04e25000bf45f47..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$Hashtag.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Hashtag = { - properties: { - start: { - type: 'number', - isRequired: true, - }, - end: { - type: 'number', - isRequired: true, - }, - tag: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$HighlighterModel.ts b/src/plugins/api/api-core/schemas/$HighlighterModel.ts deleted file mode 100644 index 0fdf5fc2c7ee6cb6dd7463bdc4545f8b2b0e2334..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$HighlighterModel.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $HighlighterModel = { - description: `A highlighter can be used in a project to highlight tokens in text to make - it easier for users to annotate documents when certain keywords are highlighted. - - It is assumed, that a highlighter roughly corresponds to query terms. - Furthermore, keywords in a highlighter will typically be joined into - a regular expression group (e.g. "(keyword1|double keyword|wildcar.*)"). - - Each matching group will be wrapped in a highlight span in the frontend.`, - properties: { - highlighter_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - name: { - type: 'string', - isRequired: true, - }, - keywords: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - style: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$HistogramEntry.ts b/src/plugins/api/api-core/schemas/$HistogramEntry.ts deleted file mode 100644 index e15f941428d57303b2824f6dd53585ab6a771d82..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$HistogramEntry.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $HistogramEntry = { - properties: { - bucket: { - type: 'string', - isRequired: true, - format: 'date-time', - }, - num_items: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$IEUUID.ts b/src/plugins/api/api-core/schemas/$IEUUID.ts deleted file mode 100644 index b8b9d4688810884aa9aac6d74d7c74cd8df68b28..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$IEUUID.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $IEUUID = { - properties: { - incl: { - type: 'boolean', - isRequired: true, - }, - uuid: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ImportConfigTwitter.ts b/src/plugins/api/api-core/schemas/$ImportConfigTwitter.ts deleted file mode 100644 index b48e6add184809f06bde6e1cc4a19fe57a2913a9..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ImportConfigTwitter.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ImportConfigTwitter = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - query: { - type: 'string', - isRequired: true, - }, - max_results: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - next_token: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - since_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - until_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - sort_order: { - type: 'Enum', - }, - start_time: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - end_time: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - bearer_token: { - type: 'string', - isRequired: true, - }, - results_per_response: { - type: 'number', - }, - max_requests: { - type: 'number', - }, - max_tweets: { - type: 'number', - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ImportFilter.ts b/src/plugins/api/api-core/schemas/$ImportFilter.ts deleted file mode 100644 index fceb5d12139c68b1956af54d1cf888d3d052e6e9..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ImportFilter.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ImportFilter = { - properties: { - filter: { - properties: { - }, - }, - import_ids: { - type: 'array', - contains: { - type: 'IEUUID', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ImportModel.ts b/src/plugins/api/api-core/schemas/$ImportModel.ts deleted file mode 100644 index be5f7d4dc9f9cb8e750c1766b73e437cdbe4b244..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ImportModel.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ImportModel = { - properties: { - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }], - isRequired: true, - }, - pipeline_task_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - description: { - type: 'string', - isRequired: true, - }, - type: { - type: 'string', - isRequired: true, - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_started: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_finished: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - config: { - type: 'any-of', - contains: [{ - type: 'one-of', - contains: [{ - type: 'TwitterDBFileImport', - }, { - type: 'TwitterAPIFileImport', - }, { - type: 'ImportConfigTwitter', - }, { - type: 'OpenAlexImport', - }, { - type: 'WOSImport', - }, { - type: 'OpenAlexItemImport', - }, { - type: 'AcademicItemImport', - }, { - type: 'ScopusCSVImport', - }], - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ItemAnnotation.ts b/src/plugins/api/api-core/schemas/$ItemAnnotation.ts deleted file mode 100644 index 99280e163ca9b4375a4fc552cfc09c76bf89ab42..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ItemAnnotation.ts +++ /dev/null @@ -1,163 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ItemAnnotation = { - properties: { - value_bool: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - value_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_float: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_str: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - multi_int: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - annotation_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - assignment_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - annotation_scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - snippet_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - key: { - type: 'string', - isRequired: true, - }, - repeat: { - type: 'number', - }, - parent: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - path: { - type: 'array', - contains: { - type: 'Label', - }, - isRequired: true, - }, - old: { - type: 'any-of', - contains: [{ - type: 'AnnotationValue', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ItemType.ts b/src/plugins/api/api-core/schemas/$ItemType.ts deleted file mode 100644 index 91b58a8378b7aed40561ee68473cc6c679028ebc..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ItemType.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ItemType = { - type: 'Enum', -} as const; diff --git a/src/plugins/api/api-core/schemas/$ItemWithCount.ts b/src/plugins/api/api-core/schemas/$ItemWithCount.ts deleted file mode 100644 index 181a2d238d1ce4db1f4bf45f8e5e01e57894c057..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ItemWithCount.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ItemWithCount = { - properties: { - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }], - isRequired: true, - }, - num_total: { - type: 'number', - isRequired: true, - }, - num_open: { - type: 'number', - isRequired: true, - }, - num_partial: { - type: 'number', - isRequired: true, - }, - num_full: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$Label.ts b/src/plugins/api/api-core/schemas/$Label.ts deleted file mode 100644 index 305710124caa98e57fa0014df583a7860c38e16d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$Label.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Label = { - description: `Convenience type (corresponding to internal type in db annotation_label). - For Annotation or BotAnnotation, this is the combination of their respective key, repeat value. - - Mainly used during resolving annotations.`, - properties: { - key: { - type: 'string', - isRequired: true, - }, - repeat: { - type: 'number', - isRequired: true, - }, - value: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$LabelFilterBool.ts b/src/plugins/api/api-core/schemas/$LabelFilterBool.ts deleted file mode 100644 index da4b3c4ab80d301cc974db8b9148611f271f4926..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$LabelFilterBool.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LabelFilterBool = { - properties: { - scopes: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - scheme: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - users: { - type: 'any-of', - contains: [{ - type: 'UsersFilter', - }, { - type: 'null', - }], - }, - repeats: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - key: { - type: 'string', - isRequired: true, - }, - type: { - type: 'Enum', - isRequired: true, - }, - filter: { - properties: { - }, - }, - value_type: { - properties: { - }, - }, - comp: { - properties: { - }, - }, - value_bool: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$LabelFilterInt.ts b/src/plugins/api/api-core/schemas/$LabelFilterInt.ts deleted file mode 100644 index 45a2b5ad7ffe7cd492e57d094d8e6606999c1a9d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$LabelFilterInt.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LabelFilterInt = { - properties: { - scopes: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - scheme: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - users: { - type: 'any-of', - contains: [{ - type: 'UsersFilter', - }, { - type: 'null', - }], - }, - repeats: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - key: { - type: 'string', - isRequired: true, - }, - type: { - type: 'Enum', - isRequired: true, - }, - filter: { - properties: { - }, - }, - value_type: { - properties: { - }, - }, - value_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - comp: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$LabelFilterMulti.ts b/src/plugins/api/api-core/schemas/$LabelFilterMulti.ts deleted file mode 100644 index f5681ef9bf421bca1a739312b7e74f37bde500e3..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$LabelFilterMulti.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LabelFilterMulti = { - properties: { - scopes: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - scheme: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - users: { - type: 'any-of', - contains: [{ - type: 'UsersFilter', - }, { - type: 'null', - }], - }, - repeats: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - key: { - type: 'string', - isRequired: true, - }, - type: { - type: 'Enum', - isRequired: true, - }, - filter: { - properties: { - }, - }, - value_type: { - properties: { - }, - }, - multi_int: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - comp: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$LabelOptions.ts b/src/plugins/api/api-core/schemas/$LabelOptions.ts deleted file mode 100644 index dde0bd29c6a748709c74bfcfa54269e269bc5ad5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$LabelOptions.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LabelOptions = { - properties: { - key: { - type: 'string', - isRequired: true, - }, - options_int: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - options_bool: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'boolean', - }, - }, { - type: 'null', - }], - }, - options_multi: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - strings: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$LabelScope.ts b/src/plugins/api/api-core/schemas/$LabelScope.ts deleted file mode 100644 index 527b2e04a56d5ec181e1da7da6013ee03086580f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$LabelScope.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LabelScope = { - properties: { - scope_id: { - type: 'string', - isRequired: true, - }, - name: { - type: 'string', - isRequired: true, - }, - scope_type: { - type: 'Enum', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$LexisNexisItemModel.ts b/src/plugins/api/api-core/schemas/$LexisNexisItemModel.ts deleted file mode 100644 index 1f25d5d4ce8740e0a11c3c5304cb6fb78ae0e262..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$LexisNexisItemModel.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LexisNexisItemModel = { - properties: { - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - type: { - type: 'all-of', - contains: [{ - type: 'ItemType', - }], - }, - text: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - teaser: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - authors: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$LexisNexisItemSourceModel.ts b/src/plugins/api/api-core/schemas/$LexisNexisItemSourceModel.ts deleted file mode 100644 index 45a835657540ca589b65b75a3219ab401490eec9..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$LexisNexisItemSourceModel.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $LexisNexisItemSourceModel = { - properties: { - item_source_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - lexis_id: { - type: 'string', - isRequired: true, - }, - name: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - title: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - section: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - jurisdiction: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - location: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - content_type: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - published_at: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - updated_at: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - meta: { - type: 'any-of', - contains: [{ - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$MakeAssignmentsRequestModel.ts b/src/plugins/api/api-core/schemas/$MakeAssignmentsRequestModel.ts deleted file mode 100644 index b17f03c0ca8945d8ce45ba4e0b2e85f1e575b9e5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$MakeAssignmentsRequestModel.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $MakeAssignmentsRequestModel = { - properties: { - annotation_scheme_id: { - type: 'string', - isRequired: true, - }, - scope_id: { - type: 'string', - isRequired: true, - }, - config: { - type: 'one-of', - contains: [{ - type: 'AssignmentScopeRandomWithExclusionConfig', - }, { - type: 'AssignmentScopeRandomWithNQLConfig', - }, { - type: 'AssignmentScopeRandomConfig', - }], - isRequired: true, - }, - save: { - type: 'boolean', - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$Mention.ts b/src/plugins/api/api-core/schemas/$Mention.ts deleted file mode 100644 index 06c1650c75a73ce7e6ac3504a04b8b1cfa329020..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$Mention.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Mention = { - properties: { - start: { - type: 'number', - isRequired: true, - }, - end: { - type: 'number', - isRequired: true, - }, - username: { - type: 'string', - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'number', - }], - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$MetaFilterBool.ts b/src/plugins/api/api-core/schemas/$MetaFilterBool.ts deleted file mode 100644 index e3d74e0886a1a9c8fe4a2f66ed0c1acd63deb890..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$MetaFilterBool.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $MetaFilterBool = { - properties: { - field: { - type: 'string', - isRequired: true, - }, - filter: { - properties: { - }, - }, - value_type: { - properties: { - }, - }, - comp: { - properties: { - }, - }, - value: { - type: 'boolean', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$MetaFilterInt.ts b/src/plugins/api/api-core/schemas/$MetaFilterInt.ts deleted file mode 100644 index 3d60556149b473d0311c59f7b72885bd3afc1122..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$MetaFilterInt.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $MetaFilterInt = { - properties: { - field: { - type: 'string', - isRequired: true, - }, - filter: { - properties: { - }, - }, - value_type: { - properties: { - }, - }, - comp: { - type: 'string', - isRequired: true, - }, - value: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$MetaFilterStr.ts b/src/plugins/api/api-core/schemas/$MetaFilterStr.ts deleted file mode 100644 index ccb7cee0267e389922a469d812b5a51502954b98..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$MetaFilterStr.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $MetaFilterStr = { - properties: { - field: { - type: 'string', - isRequired: true, - }, - filter: { - properties: { - }, - }, - value_type: { - properties: { - }, - }, - comp: { - properties: { - }, - }, - value: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$OpenAlexImport.ts b/src/plugins/api/api-core/schemas/$OpenAlexImport.ts deleted file mode 100644 index 5a8cf8a6b379ff517121f730d9a25b87b7787948..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$OpenAlexImport.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $OpenAlexImport = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - query: { - type: 'string', - isRequired: true, - }, - def_type: { - type: 'Enum', - }, - field: { - type: 'Enum', - }, - op: { - type: 'Enum', - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$OpenAlexItemImport.ts b/src/plugins/api/api-core/schemas/$OpenAlexItemImport.ts deleted file mode 100644 index 35cfb52eea27759bc1d1cab871f12b9de478e108..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$OpenAlexItemImport.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $OpenAlexItemImport = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - encoding: { - properties: { - }, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - filenames: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ProjectBaseInfo.ts b/src/plugins/api/api-core/schemas/$ProjectBaseInfo.ts deleted file mode 100644 index 0ef1e6d4511d9576e489f7532738b2be36f02caa..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ProjectBaseInfo.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ProjectBaseInfo = { - properties: { - users: { - type: 'array', - contains: { - type: 'ProjectBaseInfoEntry', - }, - isRequired: true, - }, - scopes: { - type: 'array', - contains: { - type: 'ProjectBaseInfoScopeEntry', - }, - isRequired: true, - }, - bot_scopes: { - type: 'array', - contains: { - type: 'ProjectBaseInfoEntry', - }, - isRequired: true, - }, - labels: { - type: 'dictionary', - contains: { - type: 'LabelOptions', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ProjectBaseInfoEntry.ts b/src/plugins/api/api-core/schemas/$ProjectBaseInfoEntry.ts deleted file mode 100644 index 2a3c6871e0e46e52b34108b3f3b2c4522bcc76ea..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ProjectBaseInfoEntry.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ProjectBaseInfoEntry = { - properties: { - id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - name: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ProjectBaseInfoScopeEntry.ts b/src/plugins/api/api-core/schemas/$ProjectBaseInfoScopeEntry.ts deleted file mode 100644 index 1ffa231161c622107e017bd584c35e48c631eb78..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ProjectBaseInfoScopeEntry.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ProjectBaseInfoScopeEntry = { - properties: { - id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - name: { - type: 'string', - isRequired: true, - }, - scheme_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - scheme_name: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ProjectInfo.ts b/src/plugins/api/api-core/schemas/$ProjectInfo.ts deleted file mode 100644 index 37cf4dd5e8d4a1b1cdb95aa89130dced72138022..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ProjectInfo.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ProjectInfo = { - properties: { - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - description: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - type: { - type: 'any-of', - contains: [{ - type: 'Enum', - }, { - type: 'ItemType', - }], - isRequired: true, - }, - setting_motivational_quotes: { - type: 'boolean', - }, - owners: { - type: 'array', - contains: { - type: 'UserBaseModel', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ProjectModel.ts b/src/plugins/api/api-core/schemas/$ProjectModel.ts deleted file mode 100644 index 424ad7c1f39bd8207b77d66008818b17988f9111..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ProjectModel.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ProjectModel = { - description: `Project is the basic structural and conceptual place around which all functionality evolves. - It is essentially a container for a logically connected set of analyses, e.g. all work for a paper. - - Although Items (and subsequently their type-specific extensions) live outside the scope of a project, - they way they are augmented by annotations and analysis outcomes is always constrained to the scope - of a Project.`, - properties: { - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - name: { - type: 'string', - isRequired: true, - }, - description: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - type: { - type: 'any-of', - contains: [{ - type: 'Enum', - }, { - type: 'ItemType', - }], - isRequired: true, - }, - setting_motivational_quotes: { - type: 'boolean', - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ProjectPermissionsModel.ts b/src/plugins/api/api-core/schemas/$ProjectPermissionsModel.ts deleted file mode 100644 index 8fef952e23a7aab36f66be544f5986a0414111ea..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ProjectPermissionsModel.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ProjectPermissionsModel = { - description: `ProjectPermissions allows to define fine-grained project-level permission management. - Once such an entry exists, the user is assumed to have very basic access to the respective project. - A user may become "owner" of a project, which will allow them to do everything and effectively ignoring the - other more fine-grained permission settings. - - It is assumed, that a user can always see and edit their own contributions (e.g. annotations) but - by giving them permission to view annotations, they can also see other users' annotations.`, - properties: { - project_permission_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - owner: { - type: 'boolean', - }, - dataset_read: { - type: 'boolean', - }, - dataset_edit: { - type: 'boolean', - }, - imports_read: { - type: 'boolean', - }, - imports_edit: { - type: 'boolean', - }, - annotations_read: { - type: 'boolean', - }, - annotations_edit: { - type: 'boolean', - }, - pipelines_read: { - type: 'boolean', - }, - pipelines_edit: { - type: 'boolean', - }, - artefacts_read: { - type: 'boolean', - }, - artefacts_edit: { - type: 'boolean', - }, - search_dimensions: { - type: 'boolean', - }, - search_oa: { - type: 'boolean', - }, - import_limit_oa: { - type: 'number', - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$QueryResult.ts b/src/plugins/api/api-core/schemas/$QueryResult.ts deleted file mode 100644 index a8f9b38b4f557d2db034858ec77a55791b4d2a26..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$QueryResult.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $QueryResult = { - properties: { - n_docs: { - type: 'number', - isRequired: true, - }, - docs: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'AcademicItemModel', - }, - }, { - type: 'array', - contains: { - type: 'FullLexisNexisItemModel', - }, - }, { - type: 'array', - contains: { - type: 'GenericItemModel', - }, - }], - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$RankEntry.ts b/src/plugins/api/api-core/schemas/$RankEntry.ts deleted file mode 100644 index 7cc4ea36f2f73cdb9893589934e0301d8756e6bd..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$RankEntry.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $RankEntry = { - properties: { - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'uuid', - }, { - type: 'string', - }], - isRequired: true, - }, - username: { - type: 'string', - isRequired: true, - }, - full_name: { - type: 'string', - isRequired: true, - }, - email: { - type: 'string', - isRequired: true, - }, - affiliation: { - type: 'string', - isRequired: true, - }, - num_labels: { - type: 'number', - isRequired: true, - }, - num_labeled_items: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ReferencedTweet.ts b/src/plugins/api/api-core/schemas/$ReferencedTweet.ts deleted file mode 100644 index 0cf9a9a0ec4cdd9c27957675e30131ed7d1564d9..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ReferencedTweet.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ReferencedTweet = { - properties: { - id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'number', - }], - isRequired: true, - }, - type: { - type: 'Enum', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ResolutionCell.ts b/src/plugins/api/api-core/schemas/$ResolutionCell.ts deleted file mode 100644 index 1adf9601cf2a638a07149cd6b30a737c6231da8e..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ResolutionCell.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ResolutionCell = { - properties: { - labels: { - type: 'dictionary', - contains: { - type: 'array', - contains: { - type: 'ResolutionUserEntry', - }, - }, - isRequired: true, - }, - resolution: { - type: 'BotAnnotationModel', - isRequired: true, - }, - status: { - type: 'all-of', - contains: [{ - type: 'ResolutionStatus', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ResolutionOrdering.ts b/src/plugins/api/api-core/schemas/$ResolutionOrdering.ts deleted file mode 100644 index 94e2a3522a3f2fa7637f94889226e8994a0c4494..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ResolutionOrdering.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ResolutionOrdering = { - properties: { - identifier: { - type: 'number', - isRequired: true, - }, - first_occurrence: { - type: 'number', - isRequired: true, - }, - item_id: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ResolutionProposal.ts b/src/plugins/api/api-core/schemas/$ResolutionProposal.ts deleted file mode 100644 index 41d825c4528040f11248e4641e68bd2d3af37b9c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ResolutionProposal.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ResolutionProposal = { - properties: { - scheme_info: { - type: 'AnnotationSchemeInfo', - isRequired: true, - }, - labels: { - type: 'array', - contains: { - type: 'FlatLabel', - }, - isRequired: true, - }, - annotators: { - type: 'array', - contains: { - type: 'UserModel', - }, - isRequired: true, - }, - ordering: { - type: 'array', - contains: { - type: 'ResolutionOrdering', - }, - isRequired: true, - }, - matrix: { - type: 'dictionary', - contains: { - type: 'dictionary', - contains: { - type: 'ResolutionCell', - }, - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ResolutionSnapshotEntry.ts b/src/plugins/api/api-core/schemas/$ResolutionSnapshotEntry.ts deleted file mode 100644 index 402a66d4695d3e6948a2c3dcaddb3aeb5a1751a3..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ResolutionSnapshotEntry.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ResolutionSnapshotEntry = { - properties: { - order_key: { - type: 'string', - isRequired: true, - }, - path_key: { - type: 'string', - isRequired: true, - }, - ba_id: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ResolutionStatus.ts b/src/plugins/api/api-core/schemas/$ResolutionStatus.ts deleted file mode 100644 index 0e1f5410c0ba1e8760607a9fccfa7f027d00df57..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ResolutionStatus.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ResolutionStatus = { - type: 'Enum', -} as const; diff --git a/src/plugins/api/api-core/schemas/$ResolutionUserEntry.ts b/src/plugins/api/api-core/schemas/$ResolutionUserEntry.ts deleted file mode 100644 index 43400c0acd437e1a682c1e9d32161e3d7fdd6589..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ResolutionUserEntry.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ResolutionUserEntry = { - properties: { - assignment: { - type: 'any-of', - contains: [{ - type: 'DehydratedAssignment', - }, { - type: 'null', - }], - }, - annotation: { - type: 'any-of', - contains: [{ - type: 'ItemAnnotation', - }, { - type: 'null', - }], - }, - status: { - type: 'all-of', - contains: [{ - type: 'ResolutionStatus', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$SavedResolution.ts b/src/plugins/api/api-core/schemas/$SavedResolution.ts deleted file mode 100644 index 3dc82c02af2d46b30cc5aa744d6c412050c70992..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$SavedResolution.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $SavedResolution = { - properties: { - meta: { - type: 'BotAnnotationResolution', - isRequired: true, - }, - proposal: { - type: 'ResolutionProposal', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ScopusCSVImport.ts b/src/plugins/api/api-core/schemas/$ScopusCSVImport.ts deleted file mode 100644 index 9aac4c8812c8e5a2fecac7617751653bb929d4dc..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ScopusCSVImport.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ScopusCSVImport = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - filenames: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$SearchResult.ts b/src/plugins/api/api-core/schemas/$SearchResult.ts deleted file mode 100644 index 75c172aa28e04dd9dce14478dd7a8a81d9b20273..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$SearchResult.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $SearchResult = { - properties: { - query_time: { - type: 'number', - isRequired: true, - }, - num_found: { - type: 'number', - isRequired: true, - }, - docs: { - type: 'array', - contains: { - type: 'AcademicItemModel', - }, - isRequired: true, - }, - histogram: { - type: 'any-of', - contains: [{ - type: 'dictionary', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$SnapshotEntry.ts b/src/plugins/api/api-core/schemas/$SnapshotEntry.ts deleted file mode 100644 index 174832be1e379283dcb84a54498df4990157546f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$SnapshotEntry.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $SnapshotEntry = { - properties: { - value_bool: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - value_int: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_float: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - value_str: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - multi_int: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'number', - }, - }, { - type: 'null', - }], - }, - order_key: { - type: 'string', - isRequired: true, - }, - path_key: { - type: 'string', - isRequired: true, - }, - item_id: { - type: 'string', - isRequired: true, - }, - anno_id: { - type: 'string', - isRequired: true, - }, - user_id: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$SubQuery.ts b/src/plugins/api/api-core/schemas/$SubQuery.ts deleted file mode 100644 index 7a7fc7c6c8df0d63c3711b953f20e9fc7d1bbc74..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$SubQuery.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $SubQuery = { - properties: { - filter: { - properties: { - }, - }, - and_: { - type: 'any-of', - contains: [{ - type: 'null', - }], - }, - or_: { - type: 'any-of', - contains: [{ - type: 'null', - }], - }, - not_: { - type: 'any-of', - contains: [{ - type: 'one-of', - contains: [{ - type: 'FieldFilter', - }, { - type: 'FieldFilters', - }, { - type: 'LabelFilterMulti', - }, { - type: 'LabelFilterBool', - }, { - type: 'LabelFilterInt', - }, { - type: 'AssignmentFilter', - }, { - type: 'AnnotationFilter', - }, { - type: 'ImportFilter', - }, { - type: 'MetaFilterBool', - }, { - type: 'MetaFilterInt', - }, { - type: 'MetaFilterStr', - }, { - type: 'SubQuery', - }], - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$TermStats.ts b/src/plugins/api/api-core/schemas/$TermStats.ts deleted file mode 100644 index c47bccf66f237ace574dac72a38c21bbc647c1d7..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$TermStats.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $TermStats = { - properties: { - term: { - type: 'string', - isRequired: true, - }, - df: { - type: 'number', - isRequired: true, - }, - ttf: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$TwitterAPIFileImport.ts b/src/plugins/api/api-core/schemas/$TwitterAPIFileImport.ts deleted file mode 100644 index 7c5b9c84aa125edb155dcad55027b893789a76b0..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$TwitterAPIFileImport.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $TwitterAPIFileImport = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - encoding: { - properties: { - }, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - filenames: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$TwitterDBFileImport.ts b/src/plugins/api/api-core/schemas/$TwitterDBFileImport.ts deleted file mode 100644 index 095f869455c95d0ab9f0767d42de9e408d04ec8a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$TwitterDBFileImport.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $TwitterDBFileImport = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - encoding: { - properties: { - }, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - filenames: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$TwitterItemModel.ts b/src/plugins/api/api-core/schemas/$TwitterItemModel.ts deleted file mode 100644 index 599d9ad08ee0b3c42e5414884568f443599a8309..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$TwitterItemModel.ts +++ /dev/null @@ -1,190 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $TwitterItemModel = { - description: `Corresponds to db.models.items.TwitterItem - - For more in-depth documentation, please refer to: - https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet`, - properties: { - item_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - type: { - type: 'all-of', - contains: [{ - type: 'ItemType', - }], - }, - text: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - twitter_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - twitter_author_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - created_at: { - type: 'string', - isRequired: true, - format: 'date-time', - }, - language: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - conversation_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - referenced_tweets: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'ReferencedTweet', - }, - }, { - type: 'null', - }], - }, - latitude: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - longitude: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - hashtags: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'Hashtag', - }, - }, { - type: 'null', - }], - }, - mentions: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'Mention', - }, - }, { - type: 'null', - }], - }, - urls: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'URL', - }, - }, { - type: 'null', - }], - }, - cashtags: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'Cashtag', - }, - }, { - type: 'null', - }], - }, - context_annotations: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'ContextAnnotation', - }, - }, { - type: 'null', - }], - }, - retweet_count: { - type: 'number', - isRequired: true, - }, - reply_count: { - type: 'number', - isRequired: true, - }, - like_count: { - type: 'number', - isRequired: true, - }, - quote_count: { - type: 'number', - isRequired: true, - }, - user: { - type: 'any-of', - contains: [{ - type: 'TwitterUserModel', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$TwitterUserModel.ts b/src/plugins/api/api-core/schemas/$TwitterUserModel.ts deleted file mode 100644 index 338d33e8d5ebcdf4d9cb4f6c58e20987338b437f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$TwitterUserModel.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $TwitterUserModel = { - description: `Flattened and reduced representation of a Twitter User Object - https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user - - NOTE: - - In the context of a \`TwitterItemModel\`, the \`id\` is not set as it can be inferred from \`twitter_author_id\` - - \`name\` is None if \`name\` == \`username\` to save space`, - properties: { - id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - created_at: { - type: 'string', - isRequired: true, - format: 'date-time', - }, - name: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - username: { - type: 'string', - isRequired: true, - }, - verified: { - type: 'boolean', - isRequired: true, - }, - description: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - location: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - followers_count: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - following_count: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - tweet_count: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - listed_count: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$URL.ts b/src/plugins/api/api-core/schemas/$URL.ts deleted file mode 100644 index f27b6d27408aca74193a2e64c1007cb908574614..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$URL.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $URL = { - properties: { - start: { - type: 'number', - isRequired: true, - }, - end: { - type: 'number', - isRequired: true, - }, - url: { - type: 'string', - isRequired: true, - }, - url_expanded: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$UserBaseModel.ts b/src/plugins/api/api-core/schemas/$UserBaseModel.ts deleted file mode 100644 index 281e84186833c587326a42d6655dae319b10a241..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$UserBaseModel.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $UserBaseModel = { - description: `User represents a person. - Most entries in the database will be (indirectly) linked to user accounts, so this is - at the core of access management and ownership.`, - properties: { - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - username: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - full_name: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - email: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'email', - }, { - type: 'null', - }], - }, - affiliation: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - is_superuser: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - is_active: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$UserInDBModel.ts b/src/plugins/api/api-core/schemas/$UserInDBModel.ts deleted file mode 100644 index 24febd0c687a0f483b5640462d5a023265970d7a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$UserInDBModel.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $UserInDBModel = { - properties: { - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - username: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - full_name: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - email: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'email', - }, { - type: 'null', - }], - }, - affiliation: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - is_superuser: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - is_active: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - password: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$UserModel.ts b/src/plugins/api/api-core/schemas/$UserModel.ts deleted file mode 100644 index 1909200f912c85053737cc5212609c454b98c826..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$UserModel.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $UserModel = { - properties: { - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - username: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - full_name: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - email: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'email', - }, { - type: 'null', - }], - }, - affiliation: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - is_superuser: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - is_active: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_updated: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$UserPermission.ts b/src/plugins/api/api-core/schemas/$UserPermission.ts deleted file mode 100644 index a3d6c530a20d3b5bdb7b4b66ecad09b162b9e408..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$UserPermission.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $UserPermission = { - properties: { - project_permission_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }], - isRequired: true, - }, - owner: { - type: 'boolean', - }, - dataset_read: { - type: 'boolean', - }, - dataset_edit: { - type: 'boolean', - }, - imports_read: { - type: 'boolean', - }, - imports_edit: { - type: 'boolean', - }, - annotations_read: { - type: 'boolean', - }, - annotations_edit: { - type: 'boolean', - }, - pipelines_read: { - type: 'boolean', - }, - pipelines_edit: { - type: 'boolean', - }, - artefacts_read: { - type: 'boolean', - }, - artefacts_edit: { - type: 'boolean', - }, - search_dimensions: { - type: 'boolean', - }, - search_oa: { - type: 'boolean', - }, - import_limit_oa: { - type: 'number', - }, - user: { - type: 'UserBaseModel', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$UserProjectAssignmentScope.ts b/src/plugins/api/api-core/schemas/$UserProjectAssignmentScope.ts deleted file mode 100644 index fd9114d23e7228c51681574f2398903abdf867b1..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$UserProjectAssignmentScope.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $UserProjectAssignmentScope = { - properties: { - scope: { - type: 'AssignmentScopeModel', - isRequired: true, - }, - scheme_name: { - type: 'string', - isRequired: true, - }, - scheme_description: { - type: 'string', - isRequired: true, - }, - num_assignments: { - type: 'number', - isRequired: true, - }, - num_open: { - type: 'number', - isRequired: true, - }, - num_partial: { - type: 'number', - isRequired: true, - }, - num_completed: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$UsersFilter.ts b/src/plugins/api/api-core/schemas/$UsersFilter.ts deleted file mode 100644 index 53eb28c066a64991882d0f53f18322872ba88573..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$UsersFilter.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $UsersFilter = { - properties: { - user_ids: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - mode: { - type: 'Enum', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$ValidationError.ts b/src/plugins/api/api-core/schemas/$ValidationError.ts deleted file mode 100644 index d4c5c3e4712be5e77b79c5e336d0e75d616c1e5a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$ValidationError.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ValidationError = { - properties: { - loc: { - type: 'array', - contains: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'number', - }], - }, - isRequired: true, - }, - msg: { - type: 'string', - isRequired: true, - }, - type: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/schemas/$WOSImport.ts b/src/plugins/api/api-core/schemas/$WOSImport.ts deleted file mode 100644 index 303742424f7910d28854e5f4439d7f0b2329e125..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/schemas/$WOSImport.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $WOSImport = { - properties: { - func_name: { - properties: { - }, - isRequired: true, - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - import_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - filenames: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-core/services/AnnotationsService.ts b/src/plugins/api/api-core/services/AnnotationsService.ts deleted file mode 100644 index 06b4dfa36151c5c8c1f5af76282d8f722f1ac014..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/AnnotationsService.ts +++ /dev/null @@ -1,894 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AnnotatedItem } from '../models/AnnotatedItem'; -import type { AnnotationItem } from '../models/AnnotationItem'; -import type { AnnotationSchemeModel } from '../models/AnnotationSchemeModel'; -import type { AnnotationSchemeModelFlat } from '../models/AnnotationSchemeModelFlat'; -import type { AssignmentCounts } from '../models/AssignmentCounts'; -import type { AssignmentModel } from '../models/AssignmentModel'; -import type { AssignmentScopeEntry } from '../models/AssignmentScopeEntry'; -import type { AssignmentScopeModel } from '../models/AssignmentScopeModel'; -import type { AssignmentStatus } from '../models/AssignmentStatus'; -import type { Body_save_resolved_annotations_api_annotations_config_resolve__put } from '../models/Body_save_resolved_annotations_api_annotations_config_resolve__put'; -import type { BotAnnotationMetaDataBaseModel } from '../models/BotAnnotationMetaDataBaseModel'; -import type { BotMetaInfo } from '../models/BotMetaInfo'; -import type { BotMetaResolveBase } from '../models/BotMetaResolveBase'; -import type { ItemWithCount } from '../models/ItemWithCount'; -import type { MakeAssignmentsRequestModel } from '../models/MakeAssignmentsRequestModel'; -import type { ResolutionCell } from '../models/ResolutionCell'; -import type { ResolutionProposal } from '../models/ResolutionProposal'; -import type { SavedResolution } from '../models/SavedResolution'; -import type { UserModel } from '../models/UserModel'; -import type { UserProjectAssignmentScope } from '../models/UserProjectAssignmentScope'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class AnnotationsService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Scheme Definition - * This endpoint returns the detailed definition of an annotation scheme. - * - * :param annotation_scheme_id: database id of the annotation scheme. - * :param flat: True to get the flattened scheme - * :param permissions: - * :return: a single annotation scheme - * @returns any Successful Response - * @throws ApiError - */ - public getSchemeDefinitionApiAnnotationsSchemesDefinitionAnnotationSchemeIdGet({ - annotationSchemeId, - xProjectId, - flat = false, - }: { - annotationSchemeId: string, - xProjectId: string, - flat?: boolean, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<(AnnotationSchemeModelFlat | AnnotationSchemeModel)> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/schemes/definition/{annotation_scheme_id}', - path: { - 'annotation_scheme_id': annotationSchemeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'flat': flat, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Put Annotation Scheme - * @returns string Successful Response - * @throws ApiError - */ - public putAnnotationSchemeApiAnnotationsSchemesDefinitionPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: AnnotationSchemeModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/annotations/schemes/definition/', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Remove Annotation Scheme - * @returns any Successful Response - * @throws ApiError - */ - public removeAnnotationSchemeApiAnnotationsSchemesDefinitionSchemeIdDelete({ - annotationSchemeId, - xProjectId, - }: { - annotationSchemeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/annotations/schemes/definition/{scheme_id}', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'annotation_scheme_id': annotationSchemeId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Scheme Definitions For Project - * This endpoint returns the detailed definitions of all annotation schemes associated with a project. - * - * :param project_id: database id of the project - * :param permissions: - * :return: list of annotation schemes - * @returns AnnotationSchemeModel Successful Response - * @throws ApiError - */ - public getSchemeDefinitionsForProjectApiAnnotationsSchemesListProjectIdGet({ - projectId, - xProjectId, - }: { - projectId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AnnotationSchemeModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/schemes/list/{project_id}', - path: { - 'project_id': projectId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Next Assignment For Scope For User - * @returns AnnotationItem Successful Response - * @throws ApiError - */ - public getNextAssignmentForScopeForUserApiAnnotationsAnnotateNextAssignmentScopeIdCurrentAssignmentIdGet({ - assignmentScopeId, - currentAssignmentId, - xProjectId, - }: { - assignmentScopeId: string, - currentAssignmentId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AnnotationItem> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/next/{assignment_scope_id}/{current_assignment_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - 'current_assignment_id': currentAssignmentId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Next Open Assignment For Scope For User - * @returns AnnotationItem Successful Response - * @throws ApiError - */ - public getNextOpenAssignmentForScopeForUserApiAnnotationsAnnotateNextAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AnnotationItem> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/next/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignment - * @returns AnnotationItem Successful Response - * @throws ApiError - */ - public getAssignmentApiAnnotationsAnnotateAssignmentAssignmentIdGet({ - assignmentId, - xProjectId, - }: { - assignmentId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AnnotationItem> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/assignment/{assignment_id}', - path: { - 'assignment_id': assignmentId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignment Scopes For User - * @returns UserProjectAssignmentScope Successful Response - * @throws ApiError - */ - public getAssignmentScopesForUserApiAnnotationsAnnotateScopesProjectIdGet({ - projectId, - xProjectId, - }: { - projectId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<UserProjectAssignmentScope>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/scopes/{project_id}', - path: { - 'project_id': projectId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignment Scopes For Project - * @returns AssignmentScopeModel Successful Response - * @throws ApiError - */ - public getAssignmentScopesForProjectApiAnnotationsAnnotateScopesGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AssignmentScopeModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/scopes/', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignment Scope - * @returns AssignmentScopeModel Successful Response - * @throws ApiError - */ - public getAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AssignmentScopeModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/scope/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Remove Assignment Scope - * @returns any Successful Response - * @throws ApiError - */ - public removeAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdDelete({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/annotations/annotate/scope/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Put Assignment Scope - * @returns string Successful Response - * @throws ApiError - */ - public putAssignmentScopeApiAnnotationsAnnotateScopePut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: AssignmentScopeModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/annotations/annotate/scope/', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Num Assignments For Scope - * @returns AssignmentCounts Successful Response - * @throws ApiError - */ - public getNumAssignmentsForScopeApiAnnotationsAnnotateScopeCountsAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AssignmentCounts> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/scope/counts/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignments - * @returns AssignmentModel Successful Response - * @throws ApiError - */ - public getAssignmentsApiAnnotationsAnnotateAssignmentsAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AssignmentModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/assignments/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignment Indicators For Scope - * @returns AssignmentScopeEntry Successful Response - * @throws ApiError - */ - public getAssignmentIndicatorsForScopeApiAnnotationsAnnotateAssignmentProgressAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AssignmentScopeEntry>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/assignment/progress/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignments For Scope - * @returns AssignmentModel Successful Response - * @throws ApiError - */ - public getAssignmentsForScopeApiAnnotationsAnnotateAssignmentsScopeAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AssignmentModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/assignments/scope/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Annotations - * @returns AssignmentModel Successful Response - * @throws ApiError - */ - public getAnnotationsApiAnnotationsAnnotateAnnotationsAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AssignmentModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/annotate/annotations/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Save Annotation - * @returns AssignmentStatus Successful Response - * @throws ApiError - */ - public saveAnnotationApiAnnotationsAnnotateSavePost({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: AnnotatedItem, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AssignmentStatus> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/annotations/annotate/save', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Items With Count - * @returns ItemWithCount Successful Response - * @throws ApiError - */ - public getItemsWithCountApiAnnotationsConfigItemsGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<ItemWithCount>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/config/items/', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Make Assignments - * @returns AssignmentModel Successful Response - * @throws ApiError - */ - public makeAssignmentsApiAnnotationsConfigAssignmentsPost({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: MakeAssignmentsRequestModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AssignmentModel>> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/annotations/config/assignments/', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Assignment Scopes For Scheme - * @returns AssignmentScopeModel Successful Response - * @throws ApiError - */ - public getAssignmentScopesForSchemeApiAnnotationsConfigScopesSchemeIdGet({ - schemeId, - xProjectId, - }: { - schemeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AssignmentScopeModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/config/scopes/{scheme_id}', - path: { - 'scheme_id': schemeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Annotators For Scheme - * @returns UserModel Successful Response - * @throws ApiError - */ - public getAnnotatorsForSchemeApiAnnotationsConfigAnnotatorsSchemeIdGet({ - schemeId, - xProjectId, - }: { - schemeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<UserModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/config/annotators/{scheme_id}', - path: { - 'scheme_id': schemeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Resolved Annotations - * Get all annotations that match the filters (e.g. all annotations made by users in scope with :scope_id). - * - * :param include_new: - * :param update_existing: - * :param assignment_scope_id: - * :param bot_annotation_metadat_id: - * :param include_empty: - * :param settings - * :param permissions: - * :return: - * @returns ResolutionProposal Successful Response - * @throws ApiError - */ - public getResolvedAnnotationsApiAnnotationsConfigResolvePost({ - xProjectId, - requestBody, - assignmentScopeId, - botAnnotationMetadatId, - includeEmpty = false, - includeNew = false, - updateExisting = false, - }: { - xProjectId: string, - requestBody: BotMetaResolveBase, - assignmentScopeId?: (string | null), - botAnnotationMetadatId?: (string | null), - includeEmpty?: boolean, - includeNew?: boolean, - updateExisting?: boolean, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<ResolutionProposal> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/annotations/config/resolve', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'assignment_scope_id': assignmentScopeId, - 'bot_annotation_metadat_id': botAnnotationMetadatId, - 'include_empty': includeEmpty, - 'include_new': includeNew, - 'update_existing': updateExisting, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Saved Resolved Annotations - * @returns SavedResolution Successful Response - * @throws ApiError - */ - public getSavedResolvedAnnotationsApiAnnotationsConfigResolvedBotAnnotationMetadataIdGet({ - botAnnotationMetadataId, - xProjectId, - }: { - botAnnotationMetadataId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<SavedResolution> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/config/resolved/{bot_annotation_metadata_id}', - path: { - 'bot_annotation_metadata_id': botAnnotationMetadataId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Save Resolved Annotations - * @returns string Successful Response - * @throws ApiError - */ - public saveResolvedAnnotationsApiAnnotationsConfigResolvePut({ - name, - assignmentScopeId, - annotationSchemeId, - xProjectId, - requestBody, - }: { - name: string, - assignmentScopeId: string, - annotationSchemeId: string, - xProjectId: string, - requestBody: Body_save_resolved_annotations_api_annotations_config_resolve__put, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/annotations/config/resolve/', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'name': name, - 'assignment_scope_id': assignmentScopeId, - 'annotation_scheme_id': annotationSchemeId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Update Resolved Annotations - * @returns any Successful Response - * @throws ApiError - */ - public updateResolvedAnnotationsApiAnnotationsConfigResolveUpdatePut({ - botAnnotationMetadataId, - name, - xProjectId, - requestBody, - }: { - botAnnotationMetadataId: string, - name: string, - xProjectId: string, - requestBody: Record<string, Record<string, ResolutionCell>>, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/annotations/config/resolve/update', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'bot_annotation_metadata_id': botAnnotationMetadataId, - 'name': name, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * List Saved Resolved Annotations - * @returns BotAnnotationMetaDataBaseModel Successful Response - * @throws ApiError - */ - public listSavedResolvedAnnotationsApiAnnotationsConfigResolvedListGet({ - xProjectId, - annotationSchemeId, - }: { - xProjectId: string, - annotationSchemeId?: (string | null), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<BotAnnotationMetaDataBaseModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/config/resolved-list/', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'annotation_scheme_id': annotationSchemeId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Delete Saved Resolved Annotations - * @returns any Successful Response - * @throws ApiError - */ - public deleteSavedResolvedAnnotationsApiAnnotationsConfigResolvedBotAnnotationMetaIdDelete({ - botAnnotationMetadataId, - xProjectId, - }: { - botAnnotationMetadataId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/annotations/config/resolved/{bot_annotation_meta_id}', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'bot_annotation_metadata_id': botAnnotationMetadataId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Bot Annotations - * @returns BotMetaInfo Successful Response - * @throws ApiError - */ - public getBotAnnotationsApiAnnotationsBotAnnotationsGet({ - xProjectId, - includeResolve = false, - }: { - xProjectId: string, - includeResolve?: boolean, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<BotMetaInfo>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/annotations/bot/annotations', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'include_resolve': includeResolve, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/DefaultService.ts b/src/plugins/api/api-core/services/DefaultService.ts deleted file mode 100644 index 95e441b1c4b8573bd7c525fbcc231807eb7d202c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/DefaultService.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class DefaultService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Pong - * @returns string Successful Response - * @throws ApiError - */ - public pongApiPingGet(options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/', - ...options, - }); - } - - /** - * Err - * @returns string Successful Response - * @throws ApiError - */ - public errApiPingErrorGet(options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/error', - ...options, - }); - } - - /** - * Warn - * @returns string Successful Response - * @throws ApiError - */ - public warnApiPingWarnGet(options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/warn', - ...options, - }); - } - - /** - * Perm - * @returns any Successful Response - * @throws ApiError - */ - public permApiPingPermissionGet(options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/permission', - ...options, - }); - } - - /** - * Ping - * @returns string Successful Response - * @throws ApiError - */ - public pingApiPingNamePost({ - name, - }: { - name: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/ping/{name}', - path: { - 'name': name, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/EvaluationService.ts b/src/plugins/api/api-core/services/EvaluationService.ts deleted file mode 100644 index 29f4a1dbaf6795cf102d76cd6119cac1cc780f4d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/EvaluationService.ts +++ /dev/null @@ -1,241 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AnnotationQualityModel } from '../models/AnnotationQualityModel'; -import type { AnnotationTrackerModel } from '../models/AnnotationTrackerModel'; -import type { BotAnnotationMetaDataBaseModel } from '../models/BotAnnotationMetaDataBaseModel'; -import type { DehydratedAnnotationTracker } from '../models/DehydratedAnnotationTracker'; -import type { LabelScope } from '../models/LabelScope'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class EvaluationService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Project Scopes - * @returns LabelScope Successful Response - * @throws ApiError - */ - public getProjectScopesApiEvalTrackingScopesGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<LabelScope>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/eval/tracking/scopes', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Resolutions For Scope - * @returns BotAnnotationMetaDataBaseModel Successful Response - * @throws ApiError - */ - public getResolutionsForScopeApiEvalResolutionsGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<BotAnnotationMetaDataBaseModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/eval/resolutions', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'assignment_scope_id': assignmentScopeId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Project Trackers - * @returns DehydratedAnnotationTracker Successful Response - * @throws ApiError - */ - public getProjectTrackersApiEvalTrackingTrackersGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<DehydratedAnnotationTracker>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/eval/tracking/trackers', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Tracker - * @returns AnnotationTrackerModel Successful Response - * @throws ApiError - */ - public getTrackerApiEvalTrackingTrackerTrackerIdGet({ - trackerId, - xProjectId, - }: { - trackerId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AnnotationTrackerModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/eval/tracking/tracker/{tracker_id}', - path: { - 'tracker_id': trackerId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Save Tracker - * @returns string Successful Response - * @throws ApiError - */ - public saveTrackerApiEvalTrackingTrackerPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: AnnotationTrackerModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/eval/tracking/tracker', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Update Tracker - * @returns AnnotationTrackerModel Successful Response - * @throws ApiError - */ - public updateTrackerApiEvalTrackingRefreshPost({ - trackerId, - xProjectId, - batchSize, - reset = false, - }: { - trackerId: string, - xProjectId: string, - batchSize?: (number | null), - reset?: boolean, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AnnotationTrackerModel> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/eval/tracking/refresh', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'tracker_id': trackerId, - 'batch_size': batchSize, - 'reset': reset, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Irr - * @returns AnnotationQualityModel Successful Response - * @throws ApiError - */ - public getIrrApiEvalQualityLoadAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AnnotationQualityModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/eval/quality/load/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Recompute Irr - * @returns AnnotationQualityModel Successful Response - * @throws ApiError - */ - public recomputeIrrApiEvalQualityComputeGet({ - assignmentScopeId, - xProjectId, - botAnnotationMetadataId, - }: { - assignmentScopeId: string, - xProjectId: string, - botAnnotationMetadataId?: (string | null), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AnnotationQualityModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/eval/quality/compute', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'assignment_scope_id': assignmentScopeId, - 'bot_annotation_metadata_id': botAnnotationMetadataId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/EventsService.ts b/src/plugins/api/api-core/services/EventsService.ts deleted file mode 100644 index 5eb8b12bac0b65a74a67651bd52d31d01b8ca709..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/EventsService.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Event } from '../models/Event'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class EventsService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Emit - * This route can be used to trigger an event on the system. - * FIXME: This should require some sort of authentication! - * - * :param event: event (incl optional payload) to emit - * :return: void - * @returns any Successful Response - * @throws ApiError - */ - public emitApiEventsEmitPost({ - requestBody, - }: { - requestBody: Event, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/events/emit', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/ExportService.ts b/src/plugins/api/api-core/services/ExportService.ts deleted file mode 100644 index 313a33488deba43d4e67dd2fa2074ec14bdf827f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/ExportService.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ExportRequest } from '../models/ExportRequest'; -import type { ProjectBaseInfo } from '../models/ProjectBaseInfo'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class ExportService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Annotations Csv - * @returns string Successful Response - * @throws ApiError - */ - public getAnnotationsCsvApiExportAnnotationsCsvPost({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: ExportRequest, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/export/annotations/csv', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Export Baseinfo - * @returns ProjectBaseInfo Successful Response - * @throws ApiError - */ - public getExportBaseinfoApiExportProjectBaseinfoGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<ProjectBaseInfo> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/export/project/baseinfo', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/HighlightersService.ts b/src/plugins/api/api-core/services/HighlightersService.ts deleted file mode 100644 index 1b22f05e510ce86faeb60273b6818e4e4f822078..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/HighlightersService.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { HighlighterModel } from '../models/HighlighterModel'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class HighlightersService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Scope Highlighters - * @returns any Successful Response - * @throws ApiError - */ - public getScopeHighlightersApiHighlightersScopeAssignmentScopeIdGet({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<(Array<HighlighterModel> | null)> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/highlighters/scope/{assignment_scope_id}', - path: { - 'assignment_scope_id': assignmentScopeId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Project Highlighters - * @returns HighlighterModel Successful Response - * @throws ApiError - */ - public getProjectHighlightersApiHighlightersProjectGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<HighlighterModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/highlighters/project', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Upsert Highlighter - * @returns string Successful Response - * @throws ApiError - */ - public upsertHighlighterApiHighlightersProjectPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: HighlighterModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/highlighters/project', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Highlighter - * @returns any Successful Response - * @throws ApiError - */ - public getHighlighterApiHighlightersHighlighterIdGet({ - highlighterId, - xProjectId, - }: { - highlighterId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<(HighlighterModel | null)> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/highlighters/{highlighter_id}', - path: { - 'highlighter_id': highlighterId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/ImportsService.ts b/src/plugins/api/api-core/services/ImportsService.ts deleted file mode 100644 index ccf5cd29e31cb1b3382edbcebf949751fb702c68..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/ImportsService.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ImportModel } from '../models/ImportModel'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class ImportsService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get All Imports For Project - * @returns ImportModel Successful Response - * @throws ApiError - */ - public getAllImportsForProjectApiImportsListGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<ImportModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/imports/list', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Import Details - * @returns ImportModel Successful Response - * @throws ApiError - */ - public getImportDetailsApiImportsImportImportIdGet({ - importId, - xProjectId, - }: { - importId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<ImportModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/imports/import/{import_id}', - path: { - 'import_id': importId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Trigger Import - * @returns string Successful Response - * @throws ApiError - */ - public triggerImportApiImportsImportImportIdPost({ - importId, - xProjectId, - }: { - importId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/imports/import/{import_id}', - path: { - 'import_id': importId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Import Counts - * @returns number Successful Response - * @throws ApiError - */ - public getImportCountsApiImportsImportImportIdCountGet({ - importId, - xProjectId, - }: { - importId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<number> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/imports/import/{import_id}/count/', - path: { - 'import_id': importId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Put Import Details - * @returns string Successful Response - * @throws ApiError - */ - public putImportDetailsApiImportsImportPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: ImportModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/imports/import', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Delete Import Details - * @returns string Successful Response - * @throws ApiError - */ - public deleteImportDetailsApiImportsImportDeleteImportIdDelete({ - importId, - xProjectId, - }: { - importId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/imports/import/delete/{import_id}', - path: { - 'import_id': importId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/MailingService.ts b/src/plugins/api/api-core/services/MailingService.ts deleted file mode 100644 index c2c241d1a50d44adf898ffda7b689801a5b937f7..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/MailingService.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class MailingService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Reset Password - * @returns string Successful Response - * @throws ApiError - */ - public resetPasswordApiMailResetPasswordUsernamePost({ - username, - }: { - username: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/mail/reset-password/{username}', - path: { - 'username': username, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Welcome Mail - * @returns string Successful Response - * @throws ApiError - */ - public welcomeMailApiMailWelcomePost({ - username, - password, - }: { - username: string, - password: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/mail/welcome', - query: { - 'username': username, - 'password': password, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Remind Users Assigment - * @returns string Successful Response - * @throws ApiError - */ - public remindUsersAssigmentApiMailAssignmentReminderPost({ - assignmentScopeId, - xProjectId, - }: { - assignmentScopeId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<string>> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/mail/assignment-reminder', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'assignment_scope_id': assignmentScopeId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/OauthService.ts b/src/plugins/api/api-core/services/OauthService.ts deleted file mode 100644 index 9d6458e1a1610141ed9232b3b2efc2783048516d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/OauthService.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AuthTokenModel } from '../models/AuthTokenModel'; -import type { Body_login_for_access_token_api_login_token_post } from '../models/Body_login_for_access_token_api_login_token_post'; -import type { UserModel } from '../models/UserModel'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class OauthService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Login For Access Token - * @returns AuthTokenModel Successful Response - * @throws ApiError - */ - public loginForAccessTokenApiLoginTokenPost({ - formData, - }: { - formData: Body_login_for_access_token_api_login_token_post, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AuthTokenModel> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/login/token', - formData: formData, - mediaType: 'application/x-www-form-urlencoded', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Refresh Token - * @returns AuthTokenModel Successful Response - * @throws ApiError - */ - public refreshTokenApiLoginTokenTokenIdPut({ - tokenId, - }: { - tokenId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<AuthTokenModel> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/login/token/{token_id}', - path: { - 'token_id': tokenId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Revoke Token - * @returns any Successful Response - * @throws ApiError - */ - public revokeTokenApiLoginTokenTokenIdDelete({ - tokenId, - }: { - tokenId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/login/token/{token_id}', - path: { - 'token_id': tokenId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Read Tokens Me - * @returns AuthTokenModel Successful Response - * @throws ApiError - */ - public readTokensMeApiLoginMyTokensGet(options?: Partial<ApiRequestOptions>): CancelablePromise<Array<AuthTokenModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/login/my-tokens', - ...options, - }); - } - - /** - * Read Users Me - * @returns UserModel Successful Response - * @throws ApiError - */ - public readUsersMeApiLoginMeGet(options?: Partial<ApiRequestOptions>): CancelablePromise<UserModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/login/me', - ...options, - }); - } - - /** - * Logout - * @returns any Successful Response - * @throws ApiError - */ - public logoutApiLoginLogoutGet(options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/login/logout', - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/ProjectService.ts b/src/plugins/api/api-core/services/ProjectService.ts deleted file mode 100644 index 82609f9309b06d2c701daa3531a0c4ce18d5da94..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/ProjectService.ts +++ /dev/null @@ -1,407 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AcademicItemModel } from '../models/AcademicItemModel'; -import type { FullLexisNexisItemModel } from '../models/FullLexisNexisItemModel'; -import type { GenericItemModel } from '../models/GenericItemModel'; -import type { LexisNexisItemModel } from '../models/LexisNexisItemModel'; -import type { ProjectModel } from '../models/ProjectModel'; -import type { ProjectPermissionsModel } from '../models/ProjectPermissionsModel'; -import type { TwitterItemModel } from '../models/TwitterItemModel'; -import type { UserPermission } from '../models/UserPermission'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class ProjectService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Project - * @returns ProjectModel Successful Response - * @throws ApiError - */ - public getProjectApiProjectInfoGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<ProjectModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/info', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Save Project - * @returns string Successful Response - * @throws ApiError - */ - public saveProjectApiProjectInfoPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: ProjectModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/project/info', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Project Permissions Current User - * @returns ProjectPermissionsModel Successful Response - * @throws ApiError - */ - public getProjectPermissionsCurrentUserApiProjectPermissionsMeGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<ProjectPermissionsModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/permissions/me', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get All Project Permissions - * @returns ProjectPermissionsModel Successful Response - * @throws ApiError - */ - public getAllProjectPermissionsApiProjectPermissionsListProjectIdGet({ - projectId, - xProjectId, - }: { - projectId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<ProjectPermissionsModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/permissions/list/{project_id}', - path: { - 'project_id': projectId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get All User Permissions - * @returns UserPermission Successful Response - * @throws ApiError - */ - public getAllUserPermissionsApiProjectPermissionsListUsersGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<UserPermission>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/permissions/list-users', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Save Project Permission - * @returns string Successful Response - * @throws ApiError - */ - public saveProjectPermissionApiProjectPermissionsPermissionPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: ProjectPermissionsModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/project/permissions/permission', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Remove Project Permission - * @returns any Successful Response - * @throws ApiError - */ - public removeProjectPermissionApiProjectPermissionsPermissionDelete({ - projectPermissionId, - xProjectId, - }: { - projectPermissionId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/project/permissions/permission', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'project_permission_id': projectPermissionId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Project Permissions By Id - * @returns ProjectPermissionsModel Successful Response - * @throws ApiError - */ - public getProjectPermissionsByIdApiProjectPermissionsProjectPermissionIdGet({ - projectPermissionId, - xProjectId, - }: { - projectPermissionId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<ProjectPermissionsModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/permissions/{project_permission_id}', - path: { - 'project_permission_id': projectPermissionId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * List Project Data - * @returns any Successful Response - * @throws ApiError - */ - public listProjectDataApiProjectItemsItemTypeListGet({ - itemType, - xProjectId, - }: { - itemType: 'generic' | 'twitter' | 'academic' | 'patents' | 'lexis', - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<(Array<TwitterItemModel> | Array<AcademicItemModel> | Array<LexisNexisItemModel> | Array<FullLexisNexisItemModel> | Array<GenericItemModel>)> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/items/{item_type}/list', - path: { - 'item_type': itemType, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * List Project Data Paged - * @returns any Successful Response - * @throws ApiError - */ - public listProjectDataPagedApiProjectItemsItemTypeListPagePageSizeGet({ - itemType, - page, - pageSize, - xProjectId, - }: { - itemType: 'generic' | 'twitter' | 'academic' | 'patents' | 'lexis', - page: number, - pageSize: number, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<(Array<TwitterItemModel> | Array<AcademicItemModel> | Array<LexisNexisItemModel> | Array<FullLexisNexisItemModel> | Array<GenericItemModel>)> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/items/{item_type}/list/{page}/{page_size}', - path: { - 'item_type': itemType, - 'page': page, - 'page_size': pageSize, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Detail For Item - * @returns any Successful Response - * @throws ApiError - */ - public getDetailForItemApiProjectItemsDetailItemIdGet({ - itemId, - xProjectId, - itemType, - }: { - itemId: string, - xProjectId: string, - itemType?: ('generic' | 'twitter' | 'academic' | 'patents' | 'lexis' | null), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<(TwitterItemModel | AcademicItemModel | LexisNexisItemModel | FullLexisNexisItemModel | GenericItemModel)> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/items/detail/{item_id}', - path: { - 'item_id': itemId, - }, - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'item_type': itemType, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Text For Item - * @returns string Successful Response - * @throws ApiError - */ - public getTextForItemApiProjectItemsTextItemIdGet({ - itemId, - xProjectId, - }: { - itemId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/items/text/{item_id}', - path: { - 'item_id': itemId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Count Project Items - * @returns number Successful Response - * @throws ApiError - */ - public countProjectItemsApiProjectItemsCountGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<number> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/project/items/count', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Add Tweet - * @returns any Successful Response - * @throws ApiError - */ - public addTweetApiProjectItemsTwitterAddPost({ - xProjectId, - requestBody, - importId, - }: { - xProjectId: string, - requestBody: TwitterItemModel, - importId?: (string | null), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/project/items/twitter/add', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'import_id': importId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/ProjectsService.ts b/src/plugins/api/api-core/services/ProjectsService.ts deleted file mode 100644 index 00c1dd39f5d1488e8ca8d0c484222543c49363b6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/ProjectsService.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ProjectInfo } from '../models/ProjectInfo'; -import type { ProjectModel } from '../models/ProjectModel'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class ProjectsService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get All Projects - * This endpoint returns all projects the currently logged-in user can see. - * For regular users, this includes all projects for which an entry in ProjectPermissions exists. - * For SuperUsers, this returns all projects on the platform. - * - * :return: List of projects - * @returns ProjectInfo Successful Response - * @throws ApiError - */ - public getAllProjectsApiProjectsListGet(options?: Partial<ApiRequestOptions>): CancelablePromise<Array<ProjectInfo>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/projects/list', - ...options, - }); - } - - /** - * Create Project - * @returns string Successful Response - * @throws ApiError - */ - public createProjectApiProjectsCreatePut({ - requestBody, - }: { - requestBody: ProjectModel, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/projects/create', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/SearchService.ts b/src/plugins/api/api-core/services/SearchService.ts deleted file mode 100644 index f0ab11c03cfa77b27217eba7788a7c499128b34b..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/SearchService.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AnnotationFilter } from '../models/AnnotationFilter'; -import type { AssignmentFilter } from '../models/AssignmentFilter'; -import type { FieldFilter } from '../models/FieldFilter'; -import type { FieldFilters } from '../models/FieldFilters'; -import type { ImportFilter } from '../models/ImportFilter'; -import type { LabelFilterBool } from '../models/LabelFilterBool'; -import type { LabelFilterInt } from '../models/LabelFilterInt'; -import type { LabelFilterMulti } from '../models/LabelFilterMulti'; -import type { MetaFilterBool } from '../models/MetaFilterBool'; -import type { MetaFilterInt } from '../models/MetaFilterInt'; -import type { MetaFilterStr } from '../models/MetaFilterStr'; -import type { QueryResult } from '../models/QueryResult'; -import type { SearchResult } from '../models/SearchResult'; -import type { SubQuery } from '../models/SubQuery'; -import type { TermStats } from '../models/TermStats'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class SearchService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Search Openalex - * @returns SearchResult Successful Response - * @throws ApiError - */ - public searchOpenalexApiSearchOpenalexSelectPost({ - query, - xProjectId, - limit = 20, - offset, - defType = 'lucene', - field = 'title_abstract', - histogram = false, - op = 'AND', - histogramFrom = 1990, - histogramTo = 2024, - }: { - query: string, - xProjectId: string, - limit?: number, - offset?: number, - defType?: 'edismax' | 'lucene' | 'dismax', - field?: 'title' | 'abstract' | 'title_abstract', - histogram?: boolean, - op?: 'OR' | 'AND', - histogramFrom?: number, - histogramTo?: number, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<SearchResult> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/search/openalex/select', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'query': query, - 'limit': limit, - 'offset': offset, - 'def_type': defType, - 'field': field, - 'histogram': histogram, - 'op': op, - 'histogram_from': histogramFrom, - 'histogram_to': histogramTo, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Term Expansion - * @returns TermStats Successful Response - * @throws ApiError - */ - public termExpansionApiSearchOpenalexTermsGet({ - termPrefix, - xProjectId, - limit = 20, - }: { - termPrefix: string, - xProjectId: string, - limit?: number, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<TermStats>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/search/openalex/terms', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'term_prefix': termPrefix, - 'limit': limit, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Nql Query - * @returns QueryResult Successful Response - * @throws ApiError - */ - public nqlQueryApiSearchNqlQueryPost({ - xProjectId, - requestBody, - page = 1, - limit = 20, - }: { - xProjectId: string, - requestBody: (FieldFilter | FieldFilters | LabelFilterMulti | LabelFilterBool | LabelFilterInt | AssignmentFilter | AnnotationFilter | ImportFilter | MetaFilterBool | MetaFilterInt | MetaFilterStr | SubQuery), - page?: number, - limit?: number, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<QueryResult> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/search/nql/query', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'page': page, - 'limit': limit, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Nql Query Count - * @returns number Successful Response - * @throws ApiError - */ - public nqlQueryCountApiSearchNqlCountPost({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: (FieldFilter | FieldFilters | LabelFilterMulti | LabelFilterBool | LabelFilterInt | AssignmentFilter | AnnotationFilter | ImportFilter | MetaFilterBool | MetaFilterInt | MetaFilterStr | SubQuery), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<number> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/search/nql/count', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/StatsService.ts b/src/plugins/api/api-core/services/StatsService.ts deleted file mode 100644 index aa6b0f4502d26485062fd0a18f8eef1777b6c8e7..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/StatsService.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BasicProjectStats } from '../models/BasicProjectStats'; -import type { HistogramEntry } from '../models/HistogramEntry'; -import type { RankEntry } from '../models/RankEntry'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class StatsService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Basic Stats - * @returns BasicProjectStats Successful Response - * @throws ApiError - */ - public getBasicStatsApiStatsBasicsGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<BasicProjectStats> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/stats/basics', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Annotator Ranking - * @returns RankEntry Successful Response - * @throws ApiError - */ - public getAnnotatorRankingApiStatsRankGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<RankEntry>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/stats/rank', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Publication Year Histogram - * @returns HistogramEntry Successful Response - * @throws ApiError - */ - public getPublicationYearHistogramApiStatsHistogramYearsGet({ - xProjectId, - fromYear = 1990, - toYear = 2025, - }: { - xProjectId: string, - fromYear?: number, - toYear?: number, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<HistogramEntry>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/stats/histogram/years', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'from_year': fromYear, - 'to_year': toYear, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-core/services/UsersService.ts b/src/plugins/api/api-core/services/UsersService.ts deleted file mode 100644 index f215d6f8eaf0db407c43973c76f060ee1d7fce7a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-core/services/UsersService.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { DehydratedUser } from '../models/DehydratedUser'; -import type { UserBaseModel } from '../models/UserBaseModel'; -import type { UserInDBModel } from '../models/UserInDBModel'; -import type { UserModel } from '../models/UserModel'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class UsersService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get All Users - * @returns UserBaseModel Successful Response - * @throws ApiError - */ - public getAllUsersApiUsersListAllGet(options?: Partial<ApiRequestOptions>): CancelablePromise<Array<UserBaseModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/users/list/all', - ...options, - }); - } - - /** - * Get All Users Dehydrated - * @returns DehydratedUser Successful Response - * @throws ApiError - */ - public getAllUsersDehydratedApiUsersListAllDehydratedGet(options?: Partial<ApiRequestOptions>): CancelablePromise<Array<DehydratedUser>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/users/list/all/dehydrated', - ...options, - }); - } - - /** - * Get Project Annotator Users - * @returns UserBaseModel Successful Response - * @throws ApiError - */ - public getProjectAnnotatorUsersApiUsersListProjectAnnotatorsProjectIdGet({ - projectId, - xProjectId, - }: { - projectId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Record<string, UserBaseModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/users/list/project/annotators/{project_id}', - path: { - 'project_id': projectId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Project Users - * @returns UserBaseModel Successful Response - * @throws ApiError - */ - public getProjectUsersApiUsersListProjectProjectIdGet({ - projectId, - xProjectId, - }: { - projectId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<UserBaseModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/users/list/project/{project_id}', - path: { - 'project_id': projectId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get User By Id - * @returns UserModel Successful Response - * @throws ApiError - */ - public getUserByIdApiUsersDetailsUserIdGet({ - userId, - xProjectId, - }: { - userId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<UserModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/users/details/{user_id}', - path: { - 'user_id': userId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Users By Ids - * @returns UserModel Successful Response - * @throws ApiError - */ - public getUsersByIdsApiUsersDetailsGet({ - userId, - xProjectId, - }: { - userId: Array<string>, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<UserModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/users/details', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'user_id': userId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Save User - * @returns string Successful Response - * @throws ApiError - */ - public saveUserApiUsersDetailsPut({ - requestBody, - }: { - requestBody: (UserInDBModel | UserModel), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/users/details', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Save User Self - * @returns string Successful Response - * @throws ApiError - */ - public saveUserSelfApiUsersMyDetailsPut({ - requestBody, - }: { - requestBody: (UserInDBModel | UserModel), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/users/my-details', - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-pipe/PipelinesClient.ts b/src/plugins/api/api-pipe/PipelinesClient.ts deleted file mode 100644 index bd6fd8828d7b5becf6b2674f9053e74eb6dc6601..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/PipelinesClient.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; -import type { OpenAPIConfig } from '@/plugins/api/core/OpenAPI'; -import { AxiosHttpRequest } from '@/plugins/api/core/AxiosHttpRequest'; - -import { ArtefactsService } from './services/ArtefactsService'; -import { LibraryService } from './services/LibraryService'; -import { PingService } from './services/PingService'; -import { QueueService } from './services/QueueService'; - -type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; - -export class PipelinesClient { - - public readonly artefacts: ArtefactsService; - public readonly library: LibraryService; - public readonly ping: PingService; - public readonly queue: QueueService; - - public readonly request: BaseHttpRequest; - - constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = AxiosHttpRequest) { - this.request = new HttpRequest({ - BASE: config?.BASE ?? '', - VERSION: config?.VERSION ?? '0.1.0', - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, - CREDENTIALS: config?.CREDENTIALS ?? 'include', - TOKEN: config?.TOKEN, - USERNAME: config?.USERNAME, - PASSWORD: config?.PASSWORD, - HEADERS: config?.HEADERS, - ENCODE_PATH: config?.ENCODE_PATH, - }); - - this.artefacts = new ArtefactsService(this.request); - this.library = new LibraryService(this.request); - this.ping = new PingService(this.request); - this.queue = new QueueService(this.request); - } -} - diff --git a/src/plugins/api/api-pipe/index.ts b/src/plugins/api/api-pipe/index.ts deleted file mode 100644 index 558f031071aeed8a7a0798934094ace3ec142c2e..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export { PipelinesClient } from './PipelinesClient'; - - -export type { Artefact_Any_ } from './models/Artefact_Any_'; -export type { Body_upload_file_api_artefacts_files_upload_post } from './models/Body_upload_file_api_artefacts_files_upload_post'; -export type { Body_upload_files_api_artefacts_files_upload_many_post } from './models/Body_upload_files_api_artefacts_files_upload_many_post'; -export { CPULoadClassification } from './models/CPULoadClassification'; -export type { DeletionRequest } from './models/DeletionRequest'; -export { ExecutionLocation } from './models/ExecutionLocation'; -export type { FileOnDisk } from './models/FileOnDisk'; -export type { FunctionInfo } from './models/FunctionInfo'; -export type { HTTPValidationError } from './models/HTTPValidationError'; -export type { KWARG } from './models/KWARG'; -export type { SerializedArtefact } from './models/SerializedArtefact'; -export type { SerializedArtefactReference } from './models/SerializedArtefactReference'; -export type { SubmittedTask } from './models/SubmittedTask'; -export type { TaskModel } from './models/TaskModel'; -export { TaskStatus } from './models/TaskStatus'; -export type { ValidationError } from './models/ValidationError'; - -export { $Artefact_Any_ } from './schemas/$Artefact_Any_'; -export { $Body_upload_file_api_artefacts_files_upload_post } from './schemas/$Body_upload_file_api_artefacts_files_upload_post'; -export { $Body_upload_files_api_artefacts_files_upload_many_post } from './schemas/$Body_upload_files_api_artefacts_files_upload_many_post'; -export { $CPULoadClassification } from './schemas/$CPULoadClassification'; -export { $DeletionRequest } from './schemas/$DeletionRequest'; -export { $ExecutionLocation } from './schemas/$ExecutionLocation'; -export { $FileOnDisk } from './schemas/$FileOnDisk'; -export { $FunctionInfo } from './schemas/$FunctionInfo'; -export { $HTTPValidationError } from './schemas/$HTTPValidationError'; -export { $KWARG } from './schemas/$KWARG'; -export { $SerializedArtefact } from './schemas/$SerializedArtefact'; -export { $SerializedArtefactReference } from './schemas/$SerializedArtefactReference'; -export { $SubmittedTask } from './schemas/$SubmittedTask'; -export { $TaskModel } from './schemas/$TaskModel'; -export { $TaskStatus } from './schemas/$TaskStatus'; -export { $ValidationError } from './schemas/$ValidationError'; - -export { ArtefactsService } from './services/ArtefactsService'; -export { LibraryService } from './services/LibraryService'; -export { PingService } from './services/PingService'; -export { QueueService } from './services/QueueService'; diff --git a/src/plugins/api/api-pipe/models/Artefact_Any_.ts b/src/plugins/api/api-pipe/models/Artefact_Any_.ts deleted file mode 100644 index 7e6ebc07e8097113ba7773c1a2536366d09f23ad..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/Artefact_Any_.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type Artefact_Any_ = { - serializer: string; - dtype: string; - filename?: (string | null); - filenames?: (string | Array<string> | null); - fn_resolved?: boolean; -}; - diff --git a/src/plugins/api/api-pipe/models/Body_upload_file_api_artefacts_files_upload_post.ts b/src/plugins/api/api-pipe/models/Body_upload_file_api_artefacts_files_upload_post.ts deleted file mode 100644 index f4fa67114fb27dc341645562a914a0d44b7dd6fd..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/Body_upload_file_api_artefacts_files_upload_post.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type Body_upload_file_api_artefacts_files_upload_post = { - file: Blob; -}; - diff --git a/src/plugins/api/api-pipe/models/Body_upload_files_api_artefacts_files_upload_many_post.ts b/src/plugins/api/api-pipe/models/Body_upload_files_api_artefacts_files_upload_many_post.ts deleted file mode 100644 index f18a40cd60df639072fbddf37c89fcd6f8e64f55..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/Body_upload_files_api_artefacts_files_upload_many_post.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type Body_upload_files_api_artefacts_files_upload_many_post = { - file: Array<Blob>; -}; - diff --git a/src/plugins/api/api-pipe/models/CPULoadClassification.ts b/src/plugins/api/api-pipe/models/CPULoadClassification.ts deleted file mode 100644 index 1c1fc03b8392a51183bcc13dbe7cacb7770f089d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/CPULoadClassification.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum CPULoadClassification { - VHIGH = 'VHIGH', - HIGH = 'HIGH', - MEDIUM = 'MEDIUM', - LOW = 'LOW', - MINIMAL = 'MINIMAL', -} diff --git a/src/plugins/api/api-pipe/models/DeletionRequest.ts b/src/plugins/api/api-pipe/models/DeletionRequest.ts deleted file mode 100644 index ca9a5c3301a9cf9fa012269bc39229b3484d9f67..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/DeletionRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type DeletionRequest = { - task_id: string; - files: Array<string>; -}; - diff --git a/src/plugins/api/api-pipe/models/ExecutionLocation.ts b/src/plugins/api/api-pipe/models/ExecutionLocation.ts deleted file mode 100644 index a0444221c85b9424377300b37fffcf5e2fd5e5ed..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/ExecutionLocation.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum ExecutionLocation { - LOCAL = 'LOCAL', - PIK = 'PIK', -} diff --git a/src/plugins/api/api-pipe/models/FileOnDisk.ts b/src/plugins/api/api-pipe/models/FileOnDisk.ts deleted file mode 100644 index b164aca0b2565dc48cadb13175855ecee2238851..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/FileOnDisk.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type FileOnDisk = { - path: string; - size: number; -}; - diff --git a/src/plugins/api/api-pipe/models/FunctionInfo.ts b/src/plugins/api/api-pipe/models/FunctionInfo.ts deleted file mode 100644 index 3eab5fd9089ac3626218b39f711e09e12f8083be..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/FunctionInfo.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Artefact_Any_ } from './Artefact_Any_'; -import type { CPULoadClassification } from './CPULoadClassification'; -import type { KWARG } from './KWARG'; - -export type FunctionInfo = { - module: string; - function: string; - kwargs: Record<string, KWARG>; - name: string; - docstring: string; - artefacts: Record<string, Artefact_Any_>; - filepath: string; - filepath_rel: string; - tags?: (Array<string> | null); - est_cpu_load?: CPULoadClassification; - recommended_lifetime?: (number | null); -}; - diff --git a/src/plugins/api/api-pipe/models/HTTPValidationError.ts b/src/plugins/api/api-pipe/models/HTTPValidationError.ts deleted file mode 100644 index 5e13adc4e54b08988e273a49fe36fb5feca731b6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/HTTPValidationError.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ValidationError } from './ValidationError'; - -export type HTTPValidationError = { - detail?: Array<ValidationError>; -}; - diff --git a/src/plugins/api/api-pipe/models/KWARG.ts b/src/plugins/api/api-pipe/models/KWARG.ts deleted file mode 100644 index 8f49ee4150535f55d5b156850d42d77688ee2003..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/KWARG.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { SerializedArtefact } from './SerializedArtefact'; - -export type KWARG = { - dtype: Array<string>; - optional?: (boolean | null); - default?: (number | boolean | string | null); - artefact?: (SerializedArtefact | null); - params?: (Record<string, KWARG> | null); - options?: (Array<string> | null); - generics?: (Array<string> | null); -}; - diff --git a/src/plugins/api/api-pipe/models/SerializedArtefact.ts b/src/plugins/api/api-pipe/models/SerializedArtefact.ts deleted file mode 100644 index 3451f1a809ea7c0b25e42e587133dd2c1549638c..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/SerializedArtefact.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -/** - * - * The SerializedArtefact is the interface definition on how references to artefacts - * are communicated. It is essentially just a proxy for `Artefact`. - * - */ -export type SerializedArtefact = { - serializer: string; - dtype: string; - filename: (string | null); - filenames: (string | Array<string> | null); -}; - diff --git a/src/plugins/api/api-pipe/models/SerializedArtefactReference.ts b/src/plugins/api/api-pipe/models/SerializedArtefactReference.ts deleted file mode 100644 index 1e43048221c6749987f8593d9eb8df55b25006c5..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/SerializedArtefactReference.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type SerializedArtefactReference = { - task_id: string; - artefact: string; -}; - diff --git a/src/plugins/api/api-pipe/models/SubmittedTask.ts b/src/plugins/api/api-pipe/models/SubmittedTask.ts deleted file mode 100644 index 4ab2d12f3dbee01584dca6bcbe2e640b52488773..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/SubmittedTask.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { ExecutionLocation } from './ExecutionLocation'; -import type { SerializedArtefactReference } from './SerializedArtefactReference'; - -export type SubmittedTask = { - task_id?: (string | null); - function_name: string; - user_id?: (string | null); - project_id?: (string | null); - comment?: (string | null); - location?: ExecutionLocation; - params?: (Record<string, (number | string | SerializedArtefactReference)> | string | null); - force_run?: boolean; - forced_dependencies?: (Array<string> | null); -}; - diff --git a/src/plugins/api/api-pipe/models/TaskModel.ts b/src/plugins/api/api-pipe/models/TaskModel.ts deleted file mode 100644 index 6f199094947a0ba7f2d9c6b00316c374edec3535..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/TaskModel.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CPULoadClassification } from './CPULoadClassification'; -import type { ExecutionLocation } from './ExecutionLocation'; -import type { SerializedArtefactReference } from './SerializedArtefactReference'; -import type { TaskStatus } from './TaskStatus'; - -export type TaskModel = { - task_id?: (string | null); - function_name: string; - user_id?: (string | null); - project_id?: (string | null); - comment?: (string | null); - location?: ExecutionLocation; - params?: (Record<string, (number | string | SerializedArtefactReference)> | string | null); - fingerprint: string; - time_created?: (string | null); - time_started?: (string | null); - time_finished?: (string | null); - est_runtime?: (number | null); - est_memory?: (number | null); - est_cpu_load?: CPULoadClassification; - rec_expunge?: (string | null); - dependencies?: (Array<string> | null); - status?: TaskStatus; -}; - diff --git a/src/plugins/api/api-pipe/models/TaskStatus.ts b/src/plugins/api/api-pipe/models/TaskStatus.ts deleted file mode 100644 index d4bf67e399be894e87db896131a90661b1a9fd1b..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/TaskStatus.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export enum TaskStatus { - PENDING = 'PENDING', - RUNNING = 'RUNNING', - COMPLETED = 'COMPLETED', - FAILED = 'FAILED', - CANCELLED = 'CANCELLED', -} diff --git a/src/plugins/api/api-pipe/models/ValidationError.ts b/src/plugins/api/api-pipe/models/ValidationError.ts deleted file mode 100644 index 14e1fdecd0c51f4d820d0278c19fb993dfe40045..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/models/ValidationError.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -export type ValidationError = { - loc: Array<(string | number)>; - msg: string; - type: string; -}; - diff --git a/src/plugins/api/api-pipe/schemas/$Artefact_Any_.ts b/src/plugins/api/api-pipe/schemas/$Artefact_Any_.ts deleted file mode 100644 index def8a89e2f2ac7f8e019f932855eaa071b8c433f..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$Artefact_Any_.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Artefact_Any_ = { - properties: { - serializer: { - type: 'string', - isRequired: true, - }, - dtype: { - type: 'string', - isRequired: true, - }, - filename: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - filenames: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - fn_resolved: { - type: 'boolean', - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$Body_upload_file_api_artefacts_files_upload_post.ts b/src/plugins/api/api-pipe/schemas/$Body_upload_file_api_artefacts_files_upload_post.ts deleted file mode 100644 index 21925aeaeca4e7996822879a9dd26231215e96c0..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$Body_upload_file_api_artefacts_files_upload_post.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Body_upload_file_api_artefacts_files_upload_post = { - properties: { - file: { - type: 'binary', - isRequired: true, - format: 'binary', - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$Body_upload_files_api_artefacts_files_upload_many_post.ts b/src/plugins/api/api-pipe/schemas/$Body_upload_files_api_artefacts_files_upload_many_post.ts deleted file mode 100644 index 39e85c0fdbf311035d116960d4f70e503a1573be..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$Body_upload_files_api_artefacts_files_upload_many_post.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $Body_upload_files_api_artefacts_files_upload_many_post = { - properties: { - file: { - type: 'array', - contains: { - type: 'binary', - format: 'binary', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$CPULoadClassification.ts b/src/plugins/api/api-pipe/schemas/$CPULoadClassification.ts deleted file mode 100644 index 756aca8e797c5752d2709dfd6912769517ac01b9..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$CPULoadClassification.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $CPULoadClassification = { - type: 'Enum', -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$DeletionRequest.ts b/src/plugins/api/api-pipe/schemas/$DeletionRequest.ts deleted file mode 100644 index 06a4b6129094c02d652eea0507e9857e996db519..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$DeletionRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $DeletionRequest = { - properties: { - task_id: { - type: 'string', - isRequired: true, - }, - files: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$ExecutionLocation.ts b/src/plugins/api/api-pipe/schemas/$ExecutionLocation.ts deleted file mode 100644 index 29dcd65172a4095f14a236a507ba279e2ebc37cf..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$ExecutionLocation.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ExecutionLocation = { - type: 'Enum', -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$FileOnDisk.ts b/src/plugins/api/api-pipe/schemas/$FileOnDisk.ts deleted file mode 100644 index d30ad00ee350225fc2a4d3811ab93b0ae899892d..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$FileOnDisk.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FileOnDisk = { - properties: { - path: { - type: 'string', - isRequired: true, - }, - size: { - type: 'number', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$FunctionInfo.ts b/src/plugins/api/api-pipe/schemas/$FunctionInfo.ts deleted file mode 100644 index d03f87102cb64ffe273b591fa4d5e13e2b3b0251..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$FunctionInfo.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $FunctionInfo = { - properties: { - module: { - type: 'string', - isRequired: true, - }, - function: { - type: 'string', - isRequired: true, - }, - kwargs: { - type: 'dictionary', - contains: { - type: 'KWARG', - }, - isRequired: true, - }, - name: { - type: 'string', - isRequired: true, - }, - docstring: { - type: 'string', - isRequired: true, - }, - artefacts: { - type: 'dictionary', - contains: { - type: 'Artefact_Any_', - }, - isRequired: true, - }, - filepath: { - type: 'string', - isRequired: true, - }, - filepath_rel: { - type: 'string', - isRequired: true, - }, - tags: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - est_cpu_load: { - type: 'all-of', - contains: [{ - type: 'CPULoadClassification', - }], - }, - recommended_lifetime: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$HTTPValidationError.ts b/src/plugins/api/api-pipe/schemas/$HTTPValidationError.ts deleted file mode 100644 index 0d129d4b6772ebe31f7eec28c9fa4723320ce9e8..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$HTTPValidationError.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $HTTPValidationError = { - properties: { - detail: { - type: 'array', - contains: { - type: 'ValidationError', - }, - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$KWARG.ts b/src/plugins/api/api-pipe/schemas/$KWARG.ts deleted file mode 100644 index d7675bc8b944c318f5a31f2190a3dfa4f2f6ba3b..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$KWARG.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $KWARG = { - properties: { - dtype: { - type: 'array', - contains: { - type: 'string', - }, - isRequired: true, - }, - optional: { - type: 'any-of', - contains: [{ - type: 'boolean', - }, { - type: 'null', - }], - }, - default: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'number', - }, { - type: 'boolean', - }, { - type: 'string', - }, { - type: 'null', - }], - }, - artefact: { - type: 'any-of', - contains: [{ - type: 'SerializedArtefact', - }, { - type: 'null', - }], - }, - params: { - type: 'any-of', - contains: [{ - type: 'dictionary', - contains: { - type: 'KWARG', - }, - }, { - type: 'null', - }], - }, - options: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - generics: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$SerializedArtefact.ts b/src/plugins/api/api-pipe/schemas/$SerializedArtefact.ts deleted file mode 100644 index 25ccbb12f84e2f7a7f039fa72046bcd97825ae5e..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$SerializedArtefact.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $SerializedArtefact = { - description: ` - The SerializedArtefact is the interface definition on how references to artefacts - are communicated. It is essentially just a proxy for \`Artefact\`. - `, - properties: { - serializer: { - type: 'string', - isRequired: true, - }, - dtype: { - type: 'string', - isRequired: true, - }, - filename: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - isRequired: true, - }, - filenames: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'null', - }], - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$SerializedArtefactReference.ts b/src/plugins/api/api-pipe/schemas/$SerializedArtefactReference.ts deleted file mode 100644 index 1db9dced5a9e6c0281a127cd65475c39437b0401..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$SerializedArtefactReference.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $SerializedArtefactReference = { - properties: { - task_id: { - type: 'string', - isRequired: true, - }, - artefact: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$SubmittedTask.ts b/src/plugins/api/api-pipe/schemas/$SubmittedTask.ts deleted file mode 100644 index df25744746499569502181e7236ac59599f9d44a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$SubmittedTask.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $SubmittedTask = { - properties: { - task_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - function_name: { - type: 'string', - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - comment: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - location: { - type: 'all-of', - contains: [{ - type: 'ExecutionLocation', - }], - }, - params: { - type: 'any-of', - contains: [{ - type: 'dictionary', - contains: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'number', - }, { - type: 'string', - }, { - type: 'SerializedArtefactReference', - }], - }, - }, { - type: 'string', - }, { - type: 'null', - }], - }, - force_run: { - type: 'boolean', - }, - forced_dependencies: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }, { - type: 'null', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$TaskModel.ts b/src/plugins/api/api-pipe/schemas/$TaskModel.ts deleted file mode 100644 index 69997448fe6c6796063398e8837b89d422be8e02..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$TaskModel.ts +++ /dev/null @@ -1,165 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $TaskModel = { - properties: { - task_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - function_name: { - type: 'string', - isRequired: true, - }, - user_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - project_id: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'string', - format: 'uuid', - }, { - type: 'null', - }], - }, - comment: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'null', - }], - }, - location: { - type: 'all-of', - contains: [{ - type: 'ExecutionLocation', - }], - }, - params: { - type: 'any-of', - contains: [{ - type: 'dictionary', - contains: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'number', - }, { - type: 'string', - }, { - type: 'SerializedArtefactReference', - }], - }, - }, { - type: 'string', - }, { - type: 'null', - }], - }, - fingerprint: { - type: 'string', - isRequired: true, - }, - time_created: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_started: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - time_finished: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - est_runtime: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - est_memory: { - type: 'any-of', - contains: [{ - type: 'number', - }, { - type: 'null', - }], - }, - est_cpu_load: { - type: 'all-of', - contains: [{ - type: 'CPULoadClassification', - }], - }, - rec_expunge: { - type: 'any-of', - contains: [{ - type: 'string', - format: 'date-time', - }, { - type: 'null', - }], - }, - dependencies: { - type: 'any-of', - contains: [{ - type: 'array', - contains: { - type: 'string', - }, - }, { - type: 'array', - contains: { - type: 'string', - format: 'uuid', - }, - }, { - type: 'null', - }], - }, - status: { - type: 'all-of', - contains: [{ - type: 'TaskStatus', - }], - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$TaskStatus.ts b/src/plugins/api/api-pipe/schemas/$TaskStatus.ts deleted file mode 100644 index 202cde3818b08396274a19de73b396f253f72564..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$TaskStatus.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $TaskStatus = { - type: 'Enum', -} as const; diff --git a/src/plugins/api/api-pipe/schemas/$ValidationError.ts b/src/plugins/api/api-pipe/schemas/$ValidationError.ts deleted file mode 100644 index d4c5c3e4712be5e77b79c5e336d0e75d616c1e5a..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/schemas/$ValidationError.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export const $ValidationError = { - properties: { - loc: { - type: 'array', - contains: { - type: 'any-of', - contains: [{ - type: 'string', - }, { - type: 'number', - }], - }, - isRequired: true, - }, - msg: { - type: 'string', - isRequired: true, - }, - type: { - type: 'string', - isRequired: true, - }, - }, -} as const; diff --git a/src/plugins/api/api-pipe/services/ArtefactsService.ts b/src/plugins/api/api-pipe/services/ArtefactsService.ts deleted file mode 100644 index c39548c005b6a6ab36a6815b92f6c528b27fabbb..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/services/ArtefactsService.ts +++ /dev/null @@ -1,247 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Body_upload_file_api_artefacts_files_upload_post } from '../models/Body_upload_file_api_artefacts_files_upload_post'; -import type { Body_upload_files_api_artefacts_files_upload_many_post } from '../models/Body_upload_files_api_artefacts_files_upload_many_post'; -import type { DeletionRequest } from '../models/DeletionRequest'; -import type { FileOnDisk } from '../models/FileOnDisk'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class ArtefactsService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Artefacts - * @returns FileOnDisk Successful Response - * @throws ApiError - */ - public getArtefactsApiArtefactsListGet({ - xTaskId, - xProjectId, - }: { - xTaskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<FileOnDisk>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/artefacts/list', - headers: { - 'x-task-id': xTaskId, - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Task Log - * @returns string Successful Response - * @throws ApiError - */ - public getTaskLogApiArtefactsLogGet({ - xTaskId, - xProjectId, - }: { - xTaskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/artefacts/log', - headers: { - 'x-task-id': xTaskId, - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get File - * @returns any Successful Response - * @throws ApiError - */ - public getFileApiArtefactsFileGet({ - filename, - xTaskId, - xProjectId, - }: { - filename: string, - xTaskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/artefacts/file', - headers: { - 'x-task-id': xTaskId, - 'x-project-id': xProjectId, - }, - query: { - 'filename': filename, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Archive - * @returns any Successful Response - * @throws ApiError - */ - public getArchiveApiArtefactsFilesGet({ - xTaskId, - xProjectId, - }: { - xTaskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/artefacts/files', - headers: { - 'x-task-id': xTaskId, - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Delete Files - * @returns any Successful Response - * @throws ApiError - */ - public deleteFilesApiArtefactsFilesDelete({ - xTaskId, - xProjectId, - requestBody, - }: { - xTaskId: string, - xProjectId: string, - requestBody: DeletionRequest, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/artefacts/files', - headers: { - 'x-task-id': xTaskId, - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Upload File - * @returns string Successful Response - * @throws ApiError - */ - public uploadFileApiArtefactsFilesUploadPost({ - xProjectId, - formData, - folder, - }: { - xProjectId: string, - formData: Body_upload_file_api_artefacts_files_upload_post, - folder?: (string | null), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/artefacts/files/upload', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'folder': folder, - }, - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Upload Files - * @returns string Successful Response - * @throws ApiError - */ - public uploadFilesApiArtefactsFilesUploadManyPost({ - xProjectId, - formData, - folder, - }: { - xProjectId: string, - formData: Body_upload_files_api_artefacts_files_upload_many_post, - folder?: (string | null), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<string>> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/artefacts/files/upload-many', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'folder': folder, - }, - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Delete Task Files - * @returns any Successful Response - * @throws ApiError - */ - public deleteTaskFilesApiArtefactsTaskDelete({ - xTaskId, - xProjectId, - }: { - xTaskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/artefacts/task', - headers: { - 'x-task-id': xTaskId, - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-pipe/services/LibraryService.ts b/src/plugins/api/api-pipe/services/LibraryService.ts deleted file mode 100644 index 12221530d31770de1ef370cf4e00ad1e6352aae6..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/services/LibraryService.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { FunctionInfo } from '../models/FunctionInfo'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class LibraryService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get Full Library - * @returns FunctionInfo Successful Response - * @throws ApiError - */ - public getFullLibraryApiLibraryListGet(options?: Partial<ApiRequestOptions>): CancelablePromise<Array<FunctionInfo>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/library/list', - ...options, - }); - } - - /** - * Get Function Info - * @returns FunctionInfo Successful Response - * @throws ApiError - */ - public getFunctionInfoApiLibraryInfoFuncNameGet({ - funcName, - }: { - funcName: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<FunctionInfo> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/library/info/{func_name}', - path: { - 'func_name': funcName, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Function Infos - * @returns FunctionInfo Successful Response - * @throws ApiError - */ - public getFunctionInfosApiLibraryInfosGet({ - funcName, - }: { - funcName: Array<string>, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<FunctionInfo>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/library/infos', - query: { - 'func_name': funcName, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Reload Library - * @returns number Successful Response - * @throws ApiError - */ - public reloadLibraryApiLibraryRefreshPatch(options?: Partial<ApiRequestOptions>): CancelablePromise<number> { - return this.httpRequest.request({ - method: 'PATCH', - url: '/api/library/refresh', - ...options, - }); - } - -} diff --git a/src/plugins/api/api-pipe/services/PingService.ts b/src/plugins/api/api-pipe/services/PingService.ts deleted file mode 100644 index 3a35b1389de1d869e4a13a2a87bba796af048974..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/services/PingService.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class PingService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Pong - * @returns string Successful Response - * @throws ApiError - */ - public pongApiPingGet(options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/', - ...options, - }); - } - - /** - * Err - * @returns string Successful Response - * @throws ApiError - */ - public errApiPingErrorGet(options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/error', - ...options, - }); - } - - /** - * Warn - * @returns string Successful Response - * @throws ApiError - */ - public warnApiPingWarnGet(options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/warn', - ...options, - }); - } - - /** - * Warn2 - * @returns string Successful Response - * @throws ApiError - */ - public warn2ApiPingWarn2Get(options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/ping/warn2', - ...options, - }); - } - - /** - * Ping - * @returns string Successful Response - * @throws ApiError - */ - public pingApiPingNamePost({ - name, - }: { - name: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/ping/{name}', - path: { - 'name': name, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/api-pipe/services/QueueService.ts b/src/plugins/api/api-pipe/services/QueueService.ts deleted file mode 100644 index b6e06b9690d1213d401f2a71f8d4f8236ff4f102..0000000000000000000000000000000000000000 --- a/src/plugins/api/api-pipe/services/QueueService.ts +++ /dev/null @@ -1,341 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { SubmittedTask } from '../models/SubmittedTask'; -import type { TaskModel } from '../models/TaskModel'; -import type { TaskStatus } from '../models/TaskStatus'; - -import type { CancelablePromise } from '@/plugins/api/core/CancelablePromise'; -import type { BaseHttpRequest } from '@/plugins/api/core/BaseHttpRequest'; - -import type { ApiRequestOptions } from '@/plugins/api/core/ApiRequestOptions'; - -export class QueueService { - - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get All - * @returns TaskModel Successful Response - * @throws ApiError - */ - public getAllApiQueueListGet(options?: Partial<ApiRequestOptions>): CancelablePromise<Array<TaskModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/queue/list', - ...options, - }); - } - - /** - * Get By Status - * @returns TaskModel Successful Response - * @throws ApiError - */ - public getByStatusApiQueueListStatusGet({ - status, - }: { - status: TaskStatus, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<TaskModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/queue/list/{status}', - path: { - 'status': status, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get All For Project - * @returns TaskModel Successful Response - * @throws ApiError - */ - public getAllForProjectApiQueueProjectListGet({ - xProjectId, - }: { - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<TaskModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/queue/project/list', - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get By Status For Project - * @returns TaskModel Successful Response - * @throws ApiError - */ - public getByStatusForProjectApiQueueProjectListStatusGet({ - status, - xProjectId, - }: { - status: TaskStatus, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<TaskModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/queue/project/list/{status}', - path: { - 'status': status, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Search Tasks - * @returns TaskModel Successful Response - * @throws ApiError - */ - public searchTasksApiQueueSearchGet({ - xProjectId, - functionName, - fingerprint, - userId, - location, - status, - orderByFields, - }: { - xProjectId: string, - functionName?: (string | null), - fingerprint?: (string | null), - userId?: (string | null), - location?: (string | null), - status?: (string | null), - orderByFields?: (Array<string> | null), - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<TaskModel>> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/queue/search', - headers: { - 'x-project-id': xProjectId, - }, - query: { - 'function_name': functionName, - 'fingerprint': fingerprint, - 'user_id': userId, - 'location': location, - 'status': status, - 'order_by_fields': orderByFields, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Task - * @returns TaskModel Successful Response - * @throws ApiError - */ - public getTaskApiQueueTaskTaskIdGet({ - taskId, - xProjectId, - }: { - taskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<TaskModel> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/queue/task/{task_id}', - path: { - 'task_id': taskId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Delete Task - * @returns any Successful Response - * @throws ApiError - */ - public deleteTaskApiQueueTaskTaskIdDelete({ - taskId, - xProjectId, - }: { - taskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/queue/task/{task_id}', - path: { - 'task_id': taskId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Get Status - * @returns TaskStatus Successful Response - * @throws ApiError - */ - public getStatusApiQueueStatusTaskIdGet({ - taskId, - xProjectId, - }: { - taskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<TaskStatus> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/queue/status/{task_id}', - path: { - 'task_id': taskId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Force Run - * @returns any Successful Response - * @throws ApiError - */ - public forceRunApiQueueForceRunTaskIdPost({ - taskId, - xProjectId, - }: { - taskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/queue/force-run/{task_id}', - path: { - 'task_id': taskId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Submit Bulk - * @returns any Successful Response - * @throws ApiError - */ - public submitBulkApiQueueSubmitTasksPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: Array<SubmittedTask>, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<Array<(string | null)>> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/queue/submit/tasks', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Submit Single - * @returns string Successful Response - * @throws ApiError - */ - public submitSingleApiQueueSubmitTaskPut({ - xProjectId, - requestBody, - }: { - xProjectId: string, - requestBody: SubmittedTask, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<string> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/queue/submit/task', - headers: { - 'x-project-id': xProjectId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - - /** - * Cancel Task - * @returns any Successful Response - * @throws ApiError - */ - public cancelTaskApiQueueCancelTaskIdPut({ - taskId, - xProjectId, - }: { - taskId: string, - xProjectId: string, - }, options?: Partial<ApiRequestOptions>): CancelablePromise<any> { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/queue/cancel/{task_id}', - path: { - 'task_id': taskId, - }, - headers: { - 'x-project-id': xProjectId, - }, - errors: { - 422: `Validation Error`, - }, - ...options, - }); - } - -} diff --git a/src/plugins/api/core/ApiRequestOptions.ts b/src/plugins/api/core/ApiRequestOptions.ts deleted file mode 100644 index b18111e6e45203db2801d5295bfa623a660ca976..0000000000000000000000000000000000000000 --- a/src/plugins/api/core/ApiRequestOptions.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { AxiosRequestConfig } from "axios"; - -export type ApiRequestOptions = { - readonly method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH"; - readonly url: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly path?: Record<string, any>; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly cookies?: Record<string, any>; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly headers?: Record<string, any>; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly query?: Record<string, any>; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly formData?: Record<string, any>; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record<number, string>; - readonly customRequestConfig?: AxiosRequestConfig; -}; diff --git a/src/plugins/api/core/ApiResult.ts b/src/plugins/api/core/ApiResult.ts deleted file mode 100644 index c6b5269d136ef0765c36424c9d4aa4112e91c468..0000000000000000000000000000000000000000 --- a/src/plugins/api/core/ApiResult.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { AxiosResponse } from "axios"; - -export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - readonly body: any; - readonly response: AxiosResponse; -}; diff --git a/src/plugins/api/core/AxiosHttpRequest.ts b/src/plugins/api/core/AxiosHttpRequest.ts deleted file mode 100644 index 3cdc2b73bcf470b72d981fe3208d0e04aae903e1..0000000000000000000000000000000000000000 --- a/src/plugins/api/core/AxiosHttpRequest.ts +++ /dev/null @@ -1 +0,0 @@ -export { BaseHttpRequest as AxiosHttpRequest } from "./BaseHttpRequest"; diff --git a/src/plugins/api/core/BaseHttpRequest.ts b/src/plugins/api/core/BaseHttpRequest.ts deleted file mode 100644 index 1d2679ab3c6ab1acf43a7f3f81929c55dfa50c10..0000000000000000000000000000000000000000 --- a/src/plugins/api/core/BaseHttpRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { CancelablePromise } from "./CancelablePromise"; -import { request as __request } from "./request"; -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { OpenAPIConfig } from "./OpenAPI"; - -export class BaseHttpRequest { - constructor(public readonly config: OpenAPIConfig) {} - - /** - * Request method - * @param options The request options from the service - * @returns CancelablePromise<T> - * @throws ApiError - */ - public request<T>(options: ApiRequestOptions): CancelablePromise<T> { - return __request<T>(this.config, options); - } -} diff --git a/src/plugins/api/core/CancelablePromise.ts b/src/plugins/api/core/CancelablePromise.ts deleted file mode 100644 index 9e59fea14ddf7a5f3076bac899a16e7b40cfbb2c..0000000000000000000000000000000000000000 --- a/src/plugins/api/core/CancelablePromise.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* eslint-disable max-classes-per-file, no-underscore-dangle, lines-between-class-members */ -import type { AxiosResponse } from "axios"; -import { EventBus } from "@/plugins/events"; -import { ToastEvent } from "@/plugins/events/events/toast"; - -export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = "CancelError"; - } - - public get isCancelled(): boolean { - return true; - } -} - -export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; - - (cancelHandler: () => void): void; -} - -export enum ErrorLevel { - WARNING = "WARNING", - ERROR = "ERROR", -} - -export type ErrorDetails = { - level: ErrorLevel; - type: string; - message: string; - args?: unknown[]; - error?: Error; -}; - -type ApiResponseBase = { - readonly ok: boolean; - readonly status: number; - readonly response?: AxiosResponse; -}; - -export type ApiResponse<T> = ApiResponseBase & { data: T }; -export type ApiResponseReject = ApiResponseBase & { error: { detail: ErrorDetails } }; - -export function ignore() {} - -export function logReject(reason: ApiResponseReject) { - console.error(reason); -} - -export function toastReject(reason: ApiResponseReject) { - EventBus.emit( - new ToastEvent( - "WARN", - `Request failed ${reason.error.detail.level}[${reason.status}] ${reason.error.detail.type}(${reason.error.detail.message})`, - ), - ); -} - -export class CancelablePromise<T> implements Promise<ApiResponse<T>> { - readonly [Symbol.toStringTag]!: string; - - private _isResolved: boolean; - - private _isRejected: boolean; - - private _isCancelled: boolean; - - private readonly _cancelHandlers: (() => void)[]; - - private readonly _promise: Promise<ApiResponse<T>>; - - private _resolve?: (value: ApiResponse<T> | PromiseLike<ApiResponse<T>>) => void; - - private _reject?: (reason?: ApiResponseReject) => void; - - constructor( - executor: ( - resolve: (value: ApiResponse<T> | PromiseLike<ApiResponse<T>>) => void, - reject: (reason?: ApiResponseReject) => void, - onCancel: OnCancel, - ) => void, - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this._cancelHandlers = []; - this._promise = new Promise<ApiResponse<T>>((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: ApiResponse<T> | PromiseLike<ApiResponse<T>>): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isResolved = true; - this._resolve?.(value); - }; - - const onReject = (reason?: ApiResponseReject): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isRejected = true; - this._reject?.(reason); - }; - - const onCancel = (cancelHandler: () => void): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, "isResolved", { - get: (): boolean => this._isResolved, - }); - - Object.defineProperty(onCancel, "isRejected", { - get: (): boolean => this._isRejected, - }); - - Object.defineProperty(onCancel, "isCancelled", { - get: (): boolean => this._isCancelled, - }); - - // eslint-disable-next-line no-promise-executor-return - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - public then<TResult1 = ApiResponse<T>, TResult2 = ApiResponseReject>( - onFulfilled?: ((value: ApiResponse<T>) => TResult1 | PromiseLike<TResult1>) | null, - onRejected?: ((reason: ApiResponseReject) => TResult2 | PromiseLike<TResult2>) | null, - ): Promise<TResult1 | TResult2> { - return this._promise.then(onFulfilled, onRejected); - } - - public catch<TResult = ApiResponseReject>( - onRejected?: ((reason: ApiResponseReject) => TResult | PromiseLike<TResult>) | null, - ): Promise<ApiResponse<T> | TResult> { - return this._promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise<ApiResponse<T>> { - return this._promise.finally(onFinally); - } - - public cancel(): void { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isCancelled = true; - if (this._cancelHandlers.length) { - try { - // eslint-disable-next-line no-restricted-syntax - for (const cancelHandler of this._cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn("Cancellation threw an error", error); - return; - } - } - this._cancelHandlers.length = 0; - this._reject?.({ - // new CancelError('Request aborted') - ok: false, - status: -1, - response: undefined, - error: { - detail: { - level: ErrorLevel.WARNING, - message: "Request aborted", - type: "CancelError", - }, - }, - }); - } - - public get isCancelled(): boolean { - return this._isCancelled; - } -} diff --git a/src/plugins/api/core/OpenAPI.ts b/src/plugins/api/core/OpenAPI.ts deleted file mode 100644 index 7f1ea6a026d445354319f821eb312b4b2c23ab06..0000000000000000000000000000000000000000 --- a/src/plugins/api/core/OpenAPI.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { ApiRequestOptions } from "./ApiRequestOptions"; - -type Resolver<T> = (options: ApiRequestOptions) => Promise<T>; -type Headers = Record<string, string>; - -export type OpenAPIConfig = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - CREDENTIALS: "include" | "omit" | "same-origin"; - TOKEN?: string | Resolver<string>; - USERNAME?: string | Resolver<string>; - PASSWORD?: string | Resolver<string>; - HEADERS?: Headers | Resolver<Headers>; - ENCODE_PATH?: (path: string) => string; -}; - -export const OpenAPI: OpenAPIConfig = { - BASE: "", - VERSION: "0.1.0", - WITH_CREDENTIALS: false, - CREDENTIALS: "include", - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, - ENCODE_PATH: undefined, -}; diff --git a/src/plugins/api/index.ts b/src/plugins/api/index.ts index 3d01dc1cfaa50ae3fbf55727b627a1a2ca343095..a98ea189594882e3ebde74c59147f7dbf1c63834 100644 --- a/src/plugins/api/index.ts +++ b/src/plugins/api/index.ts @@ -1,22 +1,60 @@ -import type { App } from "vue"; -import { CoreClient } from "./api-core"; -import { PipelinesClient } from "./api-pipe"; +export { OpenAPI } from "@/plugins/api/spec/core/OpenAPI"; +import { OpenAPI } from "@/plugins/api/spec/core/OpenAPI"; +import { + AnnotationsService, + DefaultService, + EvaluationService, + EventsService, + ExportService, + HighlightersService, + ImportsService, + MailingService, + OauthService, + ProjectService, + ProjectsService, + SearchService, + StatsService, + UsersService, + PipesService, +} from "@/plugins/api/spec/services.gen"; +import type { ApiResponseReject } from "@/plugins/api/spec/core/ApiResult"; +import { EventBus } from "@/plugins/events"; +import { ToastEvent } from "@/plugins/events/events/toast"; -const API = { - pipe: new PipelinesClient({ - BASE: import.meta.env.VITE_NACSOS_PIPE_URL, - }), - core: new CoreClient({ - BASE: import.meta.env.VITE_NACSOS_CORE_URL, - }), -}; +OpenAPI.BASE = import.meta.env.VITE_NACSOS_CORE_URL; -export default { - install(app: App) { - // eslint-disable-next-line no-param-reassign - app.config.globalProperties.$API = API; - }, +export const API = { + annotations: AnnotationsService, + ping: DefaultService, + evaluation: EvaluationService, + events: EventsService, + export: ExportService, + highlighters: HighlightersService, + imports: ImportsService, + mailing: MailingService, + oauth: OauthService, + project: ProjectService, + projects: ProjectsService, + search: SearchService, + stats: StatsService, + users: UsersService, + pipes: PipesService, }; -export { API }; -export type { ApiResponse, ApiResponseReject, ErrorDetails, ErrorLevel } from "@/plugins/api/core/CancelablePromise"; -export { ignore, toastReject, logReject } from "@/plugins/api/core/CancelablePromise"; + +export function ignore() {} + +export function logReject(reason: ApiResponseReject) { + console.error(reason); +} + +export function toastReject(reason: ApiResponseReject) { + EventBus.emit( + new ToastEvent( + "WARN", + `Request failed ${reason.error.detail.level}[${reason.status}] ${reason.error.detail.type}(${reason.error.detail.message})`, + ), + ); +} + +export type { ApiResult, ApiResponseReject, ErrorDetails } from "@/plugins/api/spec/core/ApiResult"; +export { ErrorLevel } from "@/plugins/api/spec/core/ApiResult"; diff --git a/src/plugins/api/core/ApiError.ts b/src/plugins/api/spec/core/ApiError.ts similarity index 70% rename from src/plugins/api/core/ApiError.ts rename to src/plugins/api/spec/core/ApiError.ts index ef2efe06b4d964e6e66592a065324b78d2a8fbbc..ce92047add0c2c1bbab25e23a2991bcb054a610a 100644 --- a/src/plugins/api/core/ApiError.ts +++ b/src/plugins/api/spec/core/ApiError.ts @@ -1,33 +1,25 @@ -import type { AxiosResponse } from "axios"; import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; +import type { ApiResultIntern } from "./ApiResult"; +import type { AxiosResponse } from "axios"; export class ApiError extends Error { public readonly url: string; - - public readonly ok: boolean; - public readonly status: number; - public readonly statusText: string; - - // eslint-disable-next-line @typescript-eslint/no-explicit-any public readonly body: any; - - public readonly response: AxiosResponse; - public readonly request: ApiRequestOptions; + public readonly response: AxiosResponse; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { + constructor(request: ApiRequestOptions, response: ApiResultIntern, message: string) { super(message); this.name = "ApiError"; - this.ok = response.ok; this.url = response.url; this.status = response.status; this.statusText = response.statusText; + this.statusText = response.statusText; this.body = response.body; - this.response = response.response; this.request = request; + this.response = response.response; } } diff --git a/src/plugins/api/spec/core/ApiRequestOptions.ts b/src/plugins/api/spec/core/ApiRequestOptions.ts new file mode 100644 index 0000000000000000000000000000000000000000..5ca6b6978df0d04642e5682a56152990572c7030 --- /dev/null +++ b/src/plugins/api/spec/core/ApiRequestOptions.ts @@ -0,0 +1,17 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { AxiosRequestConfig } from "axios"; + +export type ApiRequestOptions = { + readonly method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH"; + readonly url: string; + readonly path?: Record<string, unknown>; + readonly cookies?: Record<string, unknown>; + readonly headers?: Record<string, unknown>; + readonly query?: Record<string, unknown>; + readonly formData?: Record<string, unknown>; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record<number, string>; + readonly customRequestConfig?: AxiosRequestConfig; +}; diff --git a/src/plugins/api/spec/core/ApiResult.ts b/src/plugins/api/spec/core/ApiResult.ts new file mode 100644 index 0000000000000000000000000000000000000000..28a72478a59fdca28c528552e4cded712d12a9aa --- /dev/null +++ b/src/plugins/api/spec/core/ApiResult.ts @@ -0,0 +1,33 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { AxiosResponse } from "axios"; + +export type ApiResultIntern<TData = any> = { + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; + readonly response: AxiosResponse; +}; + +export enum ErrorLevel { + WARNING = "WARNING", + ERROR = "ERROR", +} + +export type ErrorDetails = { + level: ErrorLevel; + type: string; + message: string; + args?: unknown[]; + error?: Error; +}; + +type ApiResponseBase = { + readonly ok: boolean; + readonly status: number; + readonly response?: AxiosResponse; +}; + +export type ApiResult<T> = ApiResponseBase & { data: T }; +export type ApiResponseReject = ApiResponseBase & { error: { detail: ErrorDetails } }; diff --git a/src/plugins/api/spec/core/CancelablePromise.ts b/src/plugins/api/spec/core/CancelablePromise.ts new file mode 100644 index 0000000000000000000000000000000000000000..39f989e14a5fec480d573996aca196122f8e1b8f --- /dev/null +++ b/src/plugins/api/spec/core/CancelablePromise.ts @@ -0,0 +1,141 @@ +import { ErrorLevel } from "@/plugins/api"; + +export class CancelError extends Error { + constructor(message: string) { + super(message); + this.name = "CancelError"; + } + + public get isCancelled(): boolean { + return true; + } +} + +export interface OnCancel { + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; + + (cancelHandler: () => void): void; +} + +export class CancelablePromise<T> implements Promise<T> { + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise<T>; + private _resolve?: (value: T | PromiseLike<T>) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike<T>) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise<T>((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike<T>): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; + + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; + + const onCancel = (cancelHandler: () => void): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this.cancelHandlers.push(cancelHandler); + }; + + Object.defineProperty(onCancel, "isResolved", { + get: (): boolean => this._isResolved, + }); + + Object.defineProperty(onCancel, "isRejected", { + get: (): boolean => this._isRejected, + }); + + Object.defineProperty(onCancel, "isCancelled", { + get: (): boolean => this._isCancelled, + }); + + return executor(onResolve, onReject, onCancel as OnCancel); + }); + } + + get [Symbol.toStringTag]() { + return "Cancellable Promise"; + } + + public then<TResult1 = T, TResult2 = never>( + onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null, + ): Promise<TResult1 | TResult2> { + return this.promise.then(onFulfilled, onRejected); + } + + public catch<TResult = never>( + onRejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null, + ): Promise<T | TResult> { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise<T> { + return this.promise.finally(onFinally); + } + + public cancel(): void { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isCancelled = true; + if (this.cancelHandlers.length) { + try { + for (const cancelHandler of this.cancelHandlers) { + cancelHandler(); + } + } catch (error) { + console.warn("Cancellation threw an error", error); + return; + } + } + this.cancelHandlers.length = 0; + if (this._reject) + this._reject({ + // new CancelError('Request aborted') + ok: false, + status: -1, + response: undefined, + error: { + detail: { + level: ErrorLevel.WARNING, + message: "Request aborted", + type: "CancelError", + }, + }, + }); + } + + public get isCancelled(): boolean { + return this._isCancelled; + } +} diff --git a/src/plugins/api/spec/core/OpenAPI.ts b/src/plugins/api/spec/core/OpenAPI.ts new file mode 100644 index 0000000000000000000000000000000000000000..dd887b41a0315f5ad80881b5afd63255a7a9e884 --- /dev/null +++ b/src/plugins/api/spec/core/OpenAPI.ts @@ -0,0 +1,51 @@ +import type { AxiosRequestConfig, AxiosResponse } from "axios"; +import type { ApiRequestOptions } from "./ApiRequestOptions"; + +type Headers = Record<string, string>; +type Middleware<T> = (value: T) => T | Promise<T>; +type Resolver<T> = (options: ApiRequestOptions) => Promise<T>; + +export class Interceptors<T> { + _fns: Middleware<T>[]; + + constructor() { + this._fns = []; + } + + eject(fn: Middleware<T>) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; + } + } + + use(fn: Middleware<T>) { + this._fns = [...this._fns, fn]; + } +} + +export type OpenAPIConfig = { + BASE: string; + CREDENTIALS: "include" | "omit" | "same-origin"; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver<Headers> | undefined; + PASSWORD?: string | Resolver<string> | undefined; + TOKEN?: string | Resolver<string> | undefined; + USERNAME?: string | Resolver<string> | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { request: Interceptors<AxiosRequestConfig>; response: Interceptors<AxiosResponse> }; +}; + +export const OpenAPI: OpenAPIConfig = { + BASE: "", + CREDENTIALS: "include", + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: "0.1.0", + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, +}; diff --git a/src/plugins/api/core/request.ts b/src/plugins/api/spec/core/request.ts similarity index 50% rename from src/plugins/api/core/request.ts rename to src/plugins/api/spec/core/request.ts index 5df1cef4f5c52ca3b502d36d02414fb132e9d597..dc94de96ea0e3a1fea6b4cc3fb6cd69c7bbd9fe2 100644 --- a/src/plugins/api/core/request.ts +++ b/src/plugins/api/spec/core/request.ts @@ -1,43 +1,39 @@ -import type { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios"; +/* eslint-disable @typescript-eslint/no-explicit-any */ import axios from "axios"; -import FormData from "form-data"; -import { useRequestsStore } from "@/stores/RequestsStore"; -import { EventBus } from "@/plugins/events"; -import { ClearUserStoreEvent } from "@/plugins/events/events/auth"; +import type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from "axios"; -import type { OnCancel } from "./CancelablePromise"; -import { CancelablePromise, ErrorLevel } from "./CancelablePromise"; import { ApiError } from "./ApiError"; import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; +import type { ApiResult, ApiResultIntern } from "./ApiResult"; +import { CancelablePromise } from "./CancelablePromise"; +import type { OnCancel } from "./CancelablePromise"; import type { OpenAPIConfig } from "./OpenAPI"; +import { useRequestsStore } from "@/stores/RequestsStore"; +import { EventBus } from "@/plugins/events"; +import { ClearUserStoreEvent } from "@/plugins/events/events/auth"; +import { ErrorLevel } from "./ApiResult"; -const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => - value !== undefined && value !== null; - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const isString = (value: any): value is string => typeof value === "string"; +export const isString = (value: unknown): value is string => { + return typeof value === "string"; +}; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const isStringWithValue = (value: any): value is string => isString(value) && value !== ""; +export const isStringWithValue = (value: unknown): value is string => { + return isString(value) && value !== ""; +}; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const isBlob = (value: any): value is Blob => - typeof value === "object" && - typeof value.type === "string" && - typeof value.stream === "function" && - typeof value.arrayBuffer === "function" && - typeof value.constructor === "function" && - typeof value.constructor.name === "string" && - /^(Blob|File)$/.test(value.constructor.name) && - /^(Blob|File)$/.test(value[Symbol.toStringTag]); +export const isBlob = (value: any): value is Blob => { + return value instanceof Blob; +}; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const isFormData = (value: any): value is FormData => value instanceof FormData; +export const isFormData = (value: unknown): value is FormData => { + return value instanceof FormData; +}; -const isSuccess = (status: number): boolean => status >= 200 && status < 300; +export const isSuccess = (status: number): boolean => { + return status >= 200 && status < 300; +}; -const base64 = (str: string): string => { +export const base64 = (str: string): string => { try { return btoa(str); } catch (err) { @@ -46,41 +42,30 @@ const base64 = (str: string): string => { } }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const getQueryString = (params: Record<string, any>): string => { +export const getQueryString = (params: Record<string, unknown>): string => { const qs: string[] = []; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const append = (key: string, value: any) => { + const append = (key: string, value: unknown) => { qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); }; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const process = (key: string, value: any) => { - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach((v) => { - process(key, v); - }); - } else if (typeof value === "object") { - Object.entries(value).forEach(([k, v]) => { - process(`${key}[${k}]`, v); - }); - } else { - append(key, value); - } + const encodePair = (key: string, value: unknown) => { + if (value === undefined || value === null) { + return; + } + + if (Array.isArray(value)) { + value.forEach((v) => encodePair(key, v)); + } else if (typeof value === "object") { + Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v)); + } else { + append(key, value); } }; - Object.entries(params).forEach(([key, value]) => { - process(key, value); - }); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - if (qs.length > 0) { - return `?${qs.join("&")}`; - } - - return ""; + return qs.length ? `?${qs.join("&")}` : ""; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { @@ -89,25 +74,21 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { const path = options.url .replace("{api-version}", config.VERSION) .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path && Object.prototype.hasOwnProperty.call(options.path, group)) { + if (options.path?.hasOwnProperty(group)) { return encoder(String(options.path[group])); } return substring; }); - const url = `${config.BASE}${path}`; - if (options.query) { - return `${url}${getQueryString(options.query)}`; - } - return url; + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -const getFormData = (options: ApiRequestOptions): FormData | undefined => { +export const getFormData = (options: ApiRequestOptions): FormData | undefined => { if (options.formData) { const formData = new FormData(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const process = (key: string, value: any) => { + const process = (key: string, value: unknown) => { if (isString(value) || isBlob(value)) { formData.append(key, value); } else { @@ -116,8 +97,7 @@ const getFormData = (options: ApiRequestOptions): FormData | undefined => { }; Object.entries(options.formData) - // eslint-disable-next-line @typescript-eslint/no-unused-vars - .filter(([_, value]) => isDefined(value)) + .filter(([, value]) => value !== undefined && value !== null) .forEach(([key, value]) => { if (Array.isArray(value)) { value.forEach((v) => process(key, v)); @@ -133,50 +113,48 @@ const getFormData = (options: ApiRequestOptions): FormData | undefined => { type Resolver<T> = (options: ApiRequestOptions) => Promise<T>; -const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => { +export const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => { if (typeof resolver === "function") { return (resolver as Resolver<T>)(options); } return resolver; }; -const getHeaders = async ( +export const getHeaders = async ( config: OpenAPIConfig, options: ApiRequestOptions, - formData?: FormData, ): Promise<Record<string, string>> => { - const token = await resolve(options, config.TOKEN); - const username = await resolve(options, config.USERNAME); - const password = await resolve(options, config.PASSWORD); - const additionalHeaders = await resolve(options, config.HEADERS); - const formHeaders = typeof formData?.getHeaders === "function" ? formData?.getHeaders() : {}; + const [token, username, password, additionalHeaders] = await Promise.all([ + resolve(options, config.TOKEN), + resolve(options, config.USERNAME), + resolve(options, config.PASSWORD), + resolve(options, config.HEADERS), + ]); const headers = Object.entries({ Accept: "application/json", ...additionalHeaders, ...options.headers, - ...formHeaders, }) - // eslint-disable-next-line @typescript-eslint/no-unused-vars - .filter(([_, value]) => isDefined(value)) + .filter(([, value]) => value !== undefined && value !== null) .reduce( - (heads, [key, value]) => ({ - ...heads, + (headers, [key, value]) => ({ + ...headers, [key]: String(value), }), {} as Record<string, string>, ); if (isStringWithValue(token)) { - headers.Authorization = `Bearer ${token}`; + headers["Authorization"] = `Bearer ${token}`; } if (isStringWithValue(username) && isStringWithValue(password)) { const credentials = base64(`${username}:${password}`); - headers.Authorization = `Basic ${credentials}`; + headers["Authorization"] = `Basic ${credentials}`; } - if (options.body) { + if (options.body !== undefined) { if (options.mediaType) { headers["Content-Type"] = options.mediaType; } else if (isBlob(options.body)) { @@ -186,45 +164,52 @@ const getHeaders = async ( } else if (!isFormData(options.body)) { headers["Content-Type"] = "application/json"; } + } else if (options.formData !== undefined) { + if (options.mediaType) { + headers["Content-Type"] = options.mediaType; + } } return headers; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const getRequestBody = (options: ApiRequestOptions): any => { +export const getRequestBody = (options: ApiRequestOptions): unknown => { if (options.body) { return options.body; } return undefined; }; -const sendRequest = async <T>( +export const sendRequest = async <T>( config: OpenAPIConfig, options: ApiRequestOptions, url: string, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - body: any, + body: unknown, formData: FormData | undefined, headers: Record<string, string>, onCancel: OnCancel, + axiosClient: AxiosInstance, ): Promise<AxiosResponse<T>> => { - const source = axios.CancelToken.source(); + const controller = new AbortController(); - const requestConfig: AxiosRequestConfig = { - url, - headers, + let requestConfig: AxiosRequestConfig = { data: body ?? formData, + headers, method: options.method, + signal: controller.signal, + url, withCredentials: config.WITH_CREDENTIALS, - cancelToken: source.token, ...options.customRequestConfig, }; - onCancel(() => source.cancel("The user aborted a request.")); + onCancel(() => controller.abort()); + + for (const fn of config.interceptors.request._fns) { + requestConfig = await fn(requestConfig); + } try { - return await axios.request(requestConfig); + return await axiosClient.request(requestConfig); } catch (error) { const axiosError = error as AxiosError<T>; if (axiosError.response) { @@ -234,8 +219,7 @@ const sendRequest = async <T>( } }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const getResponseHeader = (response: AxiosResponse<any>, responseHeader?: string): string | undefined => { +export const getResponseHeader = (response: AxiosResponse<unknown>, responseHeader?: string): string | undefined => { if (responseHeader) { const content = response.headers[responseHeader]; if (isString(content)) { @@ -245,33 +229,79 @@ const getResponseHeader = (response: AxiosResponse<any>, responseHeader?: string return undefined; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const getResponseBody = (response: AxiosResponse<any>): any => { +export const getResponseBody = (response: AxiosResponse<unknown>): unknown => { if (response.status !== 204) { return response.data; } return undefined; }; -const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { +export const catchErrorCodes = <T>(options: ApiRequestOptions, result: ApiResultIntern<T>): void => { const errors: Record<number, string> = { 400: "Bad Request", 401: "Unauthorized", + 402: "Payment Required", 403: "Forbidden", 404: "Not Found", + 405: "Method Not Allowed", + 406: "Not Acceptable", + 407: "Proxy Authentication Required", + 408: "Request Timeout", + 409: "Conflict", + 410: "Gone", + 411: "Length Required", + 412: "Precondition Failed", + 413: "Payload Too Large", + 414: "URI Too Long", + 415: "Unsupported Media Type", + 416: "Range Not Satisfiable", + 417: "Expectation Failed", + 418: "Im a teapot", + 421: "Misdirected Request", + 422: "Unprocessable Content", + 423: "Locked", + 424: "Failed Dependency", + 425: "Too Early", + 426: "Upgrade Required", + 428: "Precondition Required", + 429: "Too Many Requests", + 431: "Request Header Fields Too Large", + 451: "Unavailable For Legal Reasons", 500: "Internal Server Error", + 501: "Not Implemented", 502: "Bad Gateway", 503: "Service Unavailable", + 504: "Gateway Timeout", + 505: "HTTP Version Not Supported", + 506: "Variant Also Negotiates", + 507: "Insufficient Storage", + 508: "Loop Detected", + 510: "Not Extended", + 511: "Network Authentication Required", ...options.errors, }; const error = errors[result.status]; - if (error || !result.ok) { + if (error) { throw new ApiError(options, result, error); } if (!result.ok) { - throw new ApiError(options, result, "Generic Error"); + const errorStatus = result.status ?? "unknown"; + const errorStatusText = result.statusText ?? "unknown"; + const errorBody = (() => { + try { + return JSON.stringify(result.body, null, 2); + } catch (e) { + return undefined; + } + })(); + + throw new ApiError( + options, + result, + `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`, + ); } }; @@ -279,26 +309,35 @@ const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => * Request method * @param config The OpenAPI configuration object * @param options The request options from the service - * @returns CancelablePromise<T> + * @param axiosClient The axios client instance to use + * @returns CancelablePromise<ApiResult<T>> * @throws ApiError */ -export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => - new CancelablePromise(async (resolvePromise, rejectPromise, onCancel) => { +export const request = <T>( + config: OpenAPIConfig, + options: ApiRequestOptions, + axiosClient: AxiosInstance = axios, +): CancelablePromise<ApiResult<T>> => { + return new CancelablePromise(async (resolve, reject, onCancel) => { const requestsStore = useRequestsStore(); try { requestsStore.logRequestStart(); const url = getUrl(config, options); const formData = getFormData(options); const body = getRequestBody(options); - const headers = await getHeaders(config, options, formData); + const headers = await getHeaders(config, options); if (!onCancel.isCancelled) { - const response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel); + let response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel, axiosClient); + for (const fn of config.interceptors.response._fns) { + response = await fn(response); + } + const responseBody = getResponseBody(response); const responseHeader = getResponseHeader(response, options.responseHeader); requestsStore.logRequestEnd(); - const result: ApiResult = { + const result: ApiResultIntern = { url, ok: isSuccess(response.status), status: response.status, @@ -307,9 +346,9 @@ export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): C response, }; - catchErrorCodes(options, result); + catchErrorCodes<T>(options, result); - resolvePromise({ + resolve({ ok: result.ok, status: result.status, response, @@ -323,7 +362,7 @@ export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): C if (error instanceof ApiError) { const reason = { - ok: error.ok, + ok: false, status: error.status, response: error.response, error: error.body, @@ -336,9 +375,9 @@ export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): C // userStore.clear(); } - rejectPromise(reason); + reject(reason); } else { - rejectPromise({ + reject({ ok: false, status: -1, error: { @@ -353,3 +392,4 @@ export const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): C } } }); +}; diff --git a/src/plugins/api/spec/enums.gen.ts b/src/plugins/api/spec/enums.gen.ts new file mode 100644 index 0000000000000000000000000000000000000000..edf3f780e8aa93a8fda0d7593ac05e5f03dc0d08 --- /dev/null +++ b/src/plugins/api/spec/enums.gen.ts @@ -0,0 +1,94 @@ +// This file is auto-generated by @hey-api/openapi-ts +/* eslint-disable @typescript-eslint/no-unused-vars */ + +export enum KindEnum { + BOOL = "bool", + STR = "str", + FLOAT = "float", + INT = "int", + SINGLE = "single", + MULTI = "multi", + INTEXT = "intext", +} + +export enum AssignmentStatusEnum { + FULL = "FULL", + PARTIAL = "PARTIAL", + OPEN = "OPEN", + INVALID = "INVALID", +} + +export enum BotKindEnum { + CLASSIFICATION = "CLASSIFICATION", + RULES = "RULES", + TOPICS = "TOPICS", + RESOLVE = "RESOLVE", + SCRIPT = "SCRIPT", +} + +export enum EventEnum { + EXAMPLE_SUB_EVENT = "ExampleSubEvent", + EXAMPLE_EVENT = "ExampleEvent", +} + +export enum FieldEnum { + TITLE = "title", + ABSTRACT = "abstract", + PUB_YEAR = "pub_year", + DATE = "date", + SOURCE = "source", +} + +export enum ItemTypeEnum { + GENERIC = "generic", + TWITTER = "twitter", + ACADEMIC = "academic", + PATENTS = "patents", + LEXIS = "lexis", +} + +export enum TypeEnum { + USER = "user", + BOT = "bot", + RESOLVED = "resolved", +} + +export enum ScopeTypeEnum { + H = "H", + R = "R", +} + +export enum DefTypeEnum { + EDISMAX = "edismax", + LUCENE = "lucene", + DISMAX = "dismax", +} + +export enum OpEnum { + OR = "OR", + AND = "AND", +} + +export enum ResolutionMethodEnum { + MAJORITY = "majority", + FIRST = "first", +} + +export enum ResolutionStatusEnum { + NEW = "NEW", + CHANGED = "CHANGED", + UNCHANGED = "UNCHANGED", +} + +export enum TaskStatusEnum { + PENDING = "PENDING", + RUNNING = "RUNNING", + COMPLETED = "COMPLETED", + FAILED = "FAILED", + CANCELLED = "CANCELLED", +} + +export enum ModeEnum { + ALL = "ALL", + ANY = "ANY", +} diff --git a/src/plugins/api/spec/index.ts b/src/plugins/api/spec/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..8769f3dd9e8f8aab57a0bf9b1d1b3e19cf48d042 --- /dev/null +++ b/src/plugins/api/spec/index.ts @@ -0,0 +1,7 @@ +// This file is auto-generated by @hey-api/openapi-ts +/* eslint-disable @typescript-eslint/no-unused-vars */ + +export * from "./enums.gen"; +export * from "./schemas.gen"; +export * from "./services.gen"; +export * from "./types.gen"; diff --git a/src/plugins/api/spec/schemas.gen.ts b/src/plugins/api/spec/schemas.gen.ts new file mode 100644 index 0000000000000000000000000000000000000000..10d5ab8124377a0ad9e540725eb671696240bae7 --- /dev/null +++ b/src/plugins/api/spec/schemas.gen.ts @@ -0,0 +1,7566 @@ +// This file is auto-generated by @hey-api/openapi-ts +/* eslint-disable @typescript-eslint/no-unused-vars */ + +export const $AcademicAuthorModel = { + properties: { + name: { + type: "string", + title: "Name", + }, + surname_initials: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Surname Initials", + }, + email: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Email", + }, + orcid: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Orcid", + }, + scopus_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Scopus Id", + }, + openalex_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Openalex Id", + }, + s2_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "S2 Id", + }, + affiliations: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/AffiliationModel", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Affiliations", + }, + }, + type: "object", + required: ["name"], + title: "AcademicAuthorModel", +} as const; + +export const $AcademicItemImport = { + properties: { + sources: { + items: { + type: "string", + format: "path", + }, + type: "array", + title: "Sources", + }, + kind: { + const: "academic", + title: "Kind", + default: "academic", + }, + }, + type: "object", + required: ["sources"], + title: "AcademicItemImport", +} as const; + +export const $AcademicItemModel = { + properties: { + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Item Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + type: { + allOf: [ + { + $ref: "#/components/schemas/ItemType", + }, + ], + default: "academic", + }, + text: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Text", + }, + doi: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Doi", + }, + wos_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Wos Id", + }, + scopus_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Scopus Id", + }, + openalex_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Openalex Id", + }, + s2_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "S2 Id", + }, + pubmed_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Pubmed Id", + }, + dimensions_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Dimensions Id", + }, + title: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Title", + }, + title_slug: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Title Slug", + }, + publication_year: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Publication Year", + }, + source: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Source", + }, + keywords: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Keywords", + }, + authors: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/AcademicAuthorModel", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Authors", + }, + meta: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Meta", + }, + }, + type: "object", + title: "AcademicItemModel", + description: "Corresponds to db.schema.items.academic.AcademicItem", +} as const; + +export const $AffiliationModel = { + properties: { + name: { + type: "string", + title: "Name", + }, + country: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Country", + }, + openalex_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Openalex Id", + }, + s2_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "S2 Id", + }, + }, + type: "object", + required: ["name"], + title: "AffiliationModel", +} as const; + +export const $AnnotatedItem = { + properties: { + scheme: { + $ref: "#/components/schemas/AnnotationSchemeModel", + }, + assignment: { + $ref: "#/components/schemas/AssignmentModel", + }, + }, + type: "object", + required: ["scheme", "assignment"], + title: "AnnotatedItem", +} as const; + +export const $AnnotationFilter = { + properties: { + filter: { + const: "annotation", + title: "Filter", + default: "annotation", + }, + incl: { + type: "boolean", + title: "Incl", + }, + scopes: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Scopes", + }, + scheme: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Scheme", + }, + }, + type: "object", + required: ["incl"], + title: "AnnotationFilter", +} as const; + +export const $AnnotationItem = { + properties: { + scheme: { + $ref: "#/components/schemas/AnnotationSchemeModel", + }, + assignment: { + $ref: "#/components/schemas/AssignmentModel", + }, + scope: { + $ref: "#/components/schemas/AssignmentScopeModel", + }, + item: { + anyOf: [ + { + $ref: "#/components/schemas/TwitterItemModel", + }, + { + $ref: "#/components/schemas/AcademicItemModel", + }, + { + $ref: "#/components/schemas/LexisNexisItemModel", + }, + { + $ref: "#/components/schemas/FullLexisNexisItemModel", + }, + { + $ref: "#/components/schemas/GenericItemModel", + }, + ], + title: "Item", + }, + }, + type: "object", + required: ["scheme", "assignment", "scope", "item"], + title: "AnnotationItem", +} as const; + +export const $AnnotationModel = { + properties: { + value_bool: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Value Bool", + }, + value_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value Int", + }, + value_float: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Value Float", + }, + value_str: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Value Str", + }, + multi_int: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Multi Int", + }, + annotation_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Annotation Id", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + assignment_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Assignment Id", + }, + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "User Id", + }, + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Item Id", + }, + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Annotation Scheme Id", + }, + snippet_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Snippet Id", + }, + key: { + type: "string", + title: "Key", + }, + repeat: { + type: "integer", + title: "Repeat", + default: 1, + }, + parent: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Parent", + }, + }, + type: "object", + required: ["assignment_id", "user_id", "item_id", "annotation_scheme_id", "key"], + title: "AnnotationModel", + description: `Corresponds to db.models.annotations.Annotation + +Annotation holds the judgement of a User for a specific Item in the context of an AnnotationScheme +as a response to an Assignment. +Once an Annotation exists, the Assignment should be considered (partially) resolved. + +Note, that AnnotationScheme, User, and Item would be implicit by the Assignment. +However, for ease of use and in favour of fewer joins, this information is replicated here. + +The Annotation refers to an AnnotationSchemeLabel defined in an AnnotationScheme, which is referred to by its \`key\`. +If the scheme allows the user to make repeated annotations for the same Label (\`key\`), +an offset is defined in \`repeat\` (e.g. for primary technology is "natural tech", secondary is "forests"). + +Note, that there is no database constraints on the completeness of an Assignment/AnnotationScheme. +The interface/backend code should be used to make sure, to either not allow partial fulfillment of an +AnnotationScheme or not display an Assignment as complete.`, +} as const; + +export const $AnnotationQualityModel = { + properties: { + annotation_quality_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Annotation Quality Id", + }, + project_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + assignment_scope_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Assignment Scope Id", + }, + bot_annotation_metadata_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Bot Annotation Metadata Id", + }, + user_base: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "User Base", + }, + annotations_base: { + anyOf: [ + { + items: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + }, + type: "array", + }, + { + items: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + }, + type: "array", + }, + { + items: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Annotations Base", + }, + user_target: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "User Target", + }, + annotations_target: { + anyOf: [ + { + items: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + }, + type: "array", + }, + { + items: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + }, + type: "array", + }, + { + items: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Annotations Target", + }, + label_key: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Label Key", + }, + label_value: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Label Value", + }, + cohen: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Cohen", + }, + fleiss: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Fleiss", + }, + randolph: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Randolph", + }, + krippendorff: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Krippendorff", + }, + pearson: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Pearson", + }, + pearson_p: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Pearson P", + }, + kendall: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Kendall", + }, + kendall_p: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Kendall P", + }, + spearman: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Spearman", + }, + spearman_p: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Spearman P", + }, + precision: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Precision", + }, + recall: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Recall", + }, + f1: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "F1", + }, + multi_overlap_mean: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Multi Overlap Mean", + }, + multi_overlap_median: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Multi Overlap Median", + }, + multi_overlap_std: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Multi Overlap Std", + }, + num_items: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Num Items", + }, + num_overlap: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Num Overlap", + }, + num_agree: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Num Agree", + }, + num_disagree: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Num Disagree", + }, + perc_agree: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Perc Agree", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + }, + type: "object", + title: "AnnotationQualityModel", + description: `Annotation Quality Trackers +Computing annotator agreements is a little too expensive to do on the fly. Hence, we capture different +quality metrics in this table; one row per assignment scope and label.`, +} as const; + +export const $AnnotationSchemeInfo = { + properties: { + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Annotation Scheme Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + inclusion_rule: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Inclusion Rule", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + }, + type: "object", + required: ["name"], + title: "AnnotationSchemeInfo", +} as const; + +export const $AnnotationSchemeLabel = { + properties: { + name: { + type: "string", + title: "Name", + }, + key: { + type: "string", + title: "Key", + }, + hint: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Hint", + }, + max_repeat: { + type: "integer", + title: "Max Repeat", + default: 1, + }, + required: { + type: "boolean", + title: "Required", + default: true, + }, + dropdown: { + type: "boolean", + title: "Dropdown", + default: false, + }, + kind: { + type: "string", + enum: ["bool", "str", "float", "int", "single", "multi", "intext"], + title: "Kind", + default: "single", + }, + choices: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/AnnotationSchemeLabelChoice", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Choices", + }, + annotation: { + anyOf: [ + { + $ref: "#/components/schemas/AnnotationModel", + }, + { + type: "null", + }, + ], + }, + }, + type: "object", + required: ["name", "key"], + title: "AnnotationSchemeLabel", +} as const; + +export const $AnnotationSchemeLabelChoice = { + properties: { + name: { + type: "string", + title: "Name", + }, + hint: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Hint", + }, + value: { + type: "integer", + title: "Value", + }, + children: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/AnnotationSchemeLabel", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Children", + }, + }, + type: "object", + required: ["name", "value"], + title: "AnnotationSchemeLabelChoice", +} as const; + +export const $AnnotationSchemeLabelChoiceFlat = { + properties: { + name: { + type: "string", + title: "Name", + }, + hint: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Hint", + }, + value: { + type: "integer", + title: "Value", + }, + }, + type: "object", + required: ["name", "value"], + title: "AnnotationSchemeLabelChoiceFlat", +} as const; + +export const $AnnotationSchemeModel = { + properties: { + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Annotation Scheme Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + inclusion_rule: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Inclusion Rule", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + labels: { + items: { + $ref: "#/components/schemas/AnnotationSchemeLabel", + }, + type: "array", + title: "Labels", + }, + }, + type: "object", + required: ["name", "labels"], + title: "AnnotationSchemeModel", + description: `Corresponds to db.models.annotations.AnnotationScheme + +AnnotationScheme defines the annotation scheme for a particular project. +Each project may have multiple AnnotationSchemes, +but projects cannot share the same scheme. In case they are technically the same, +the user would have to create a new copy of that scheme for a different project. + +The actual annotation scheme is defined as a list of labels (see schemas.annotations.AnnotationSchemeLabel). +The other fields pose as meta-data.`, +} as const; + +export const $AnnotationSchemeModelFlat = { + properties: { + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Annotation Scheme Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + inclusion_rule: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Inclusion Rule", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + labels: { + items: { + $ref: "#/components/schemas/FlattenedAnnotationSchemeLabel", + }, + type: "array", + title: "Labels", + }, + }, + type: "object", + required: ["name", "labels"], + title: "AnnotationSchemeModelFlat", + description: "Same as AnnotationSchemeModel but with flattened structure.", +} as const; + +export const $AnnotationTrackerModel = { + properties: { + annotation_tracking_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Annotation Tracking Id", + }, + name: { + type: "string", + title: "Name", + }, + project_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + ], + title: "Project Id", + }, + inclusion_rule: { + type: "string", + title: "Inclusion Rule", + }, + majority: { + type: "boolean", + title: "Majority", + }, + n_items_total: { + type: "integer", + title: "N Items Total", + }, + recall_target: { + type: "number", + title: "Recall Target", + }, + source_ids: { + anyOf: [ + { + items: { + type: "string", + format: "uuid", + }, + type: "array", + }, + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Source Ids", + }, + labels: { + anyOf: [ + { + items: { + items: { + type: "integer", + }, + type: "array", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Labels", + }, + recall: { + anyOf: [ + { + items: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Recall", + }, + buscar: { + anyOf: [ + { + items: { + prefixItems: [ + { + type: "integer", + }, + { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + }, + ], + type: "array", + maxItems: 2, + minItems: 2, + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Buscar", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + }, + type: "object", + required: ["name", "project_id", "inclusion_rule", "majority", "n_items_total", "recall_target"], + title: "AnnotationTrackerModel", + description: `Tracker for annotation statistics. +This includes the latest stopping criterion (buscar) metrics and more. + +You may have more than one tracker per project, for example for keeping track of different progresses.`, +} as const; + +export const $AnnotationValue = { + properties: { + value_bool: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Value Bool", + }, + value_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value Int", + }, + value_float: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Value Float", + }, + value_str: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Value Str", + }, + multi_int: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Multi Int", + }, + }, + type: "object", + title: "AnnotationValue", +} as const; + +export const $AssignmentCounts = { + properties: { + num_total: { + type: "integer", + title: "Num Total", + }, + num_open: { + type: "integer", + title: "Num Open", + }, + num_partial: { + type: "integer", + title: "Num Partial", + }, + num_full: { + type: "integer", + title: "Num Full", + }, + }, + type: "object", + required: ["num_total", "num_open", "num_partial", "num_full"], + title: "AssignmentCounts", +} as const; + +export const $AssignmentFilter = { + properties: { + filter: { + const: "assignment", + title: "Filter", + default: "assignment", + }, + mode: { + type: "integer", + title: "Mode", + }, + scopes: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Scopes", + }, + scheme: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Scheme", + }, + }, + type: "object", + required: ["mode"], + title: "AssignmentFilter", +} as const; + +export const $AssignmentInfo = { + properties: { + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "User Id", + }, + username: { + type: "string", + title: "Username", + }, + order: { + type: "integer", + title: "Order", + }, + assignment_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Assignment Id", + }, + status: { + $ref: "#/components/schemas/AssignmentStatus", + }, + labels: { + anyOf: [ + { + additionalProperties: { + items: { + $ref: "#/components/schemas/AssignmentInfoLabel", + }, + type: "array", + }, + type: "object", + }, + { + type: "null", + }, + ], + title: "Labels", + }, + }, + type: "object", + required: ["user_id", "username", "order", "assignment_id", "status"], + title: "AssignmentInfo", +} as const; + +export const $AssignmentInfoLabel = { + properties: { + repeat: { + type: "integer", + title: "Repeat", + }, + value_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value Int", + }, + value_bool: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Value Bool", + }, + multi_ind: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Multi Ind", + }, + }, + type: "object", + required: ["repeat"], + title: "AssignmentInfoLabel", +} as const; + +export const $AssignmentModel = { + properties: { + assignment_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Assignment Id", + }, + assignment_scope_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Assignment Scope Id", + }, + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "User Id", + }, + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Item Id", + }, + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Annotation Scheme Id", + }, + status: { + $ref: "#/components/schemas/AssignmentStatus", + }, + order: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Order", + }, + }, + type: "object", + required: ["assignment_scope_id", "user_id", "item_id", "annotation_scheme_id", "status"], + title: "AssignmentModel", + description: `Corresponds to db.models.annotations.Assignment + +Assignment is used to request a user/annotator (User) to annotate a particular item (BaseItem) in the database +following a pre-defined annotation scheme (AnnotationScheme). + +Each AnnotationScheme will have several Assignments. +Each User will "receive" several Assignments. +Each Item may have several Assignments (either in relation to different AnnotationSchemes or double-coding). +The Project is implicit by the AnnotationScheme. + +The most common use-cases are: + * Creating assignments in bulk at random (e.g. 3 users should annotate 50 documents each) + * Creating assignments one at a time based on a set of rules (e.g. for double-coding, defined order, bias, ...) + * Creating assignments in small batches or one-by-one in prioritised annotation settings`, +} as const; + +export const $AssignmentScopeEntry = { + properties: { + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Item Id", + }, + first_occurrence: { + type: "integer", + title: "First Occurrence", + }, + identifier: { + type: "integer", + title: "Identifier", + }, + assignments: { + items: { + $ref: "#/components/schemas/AssignmentInfo", + }, + type: "array", + title: "Assignments", + }, + }, + type: "object", + required: ["item_id", "first_occurrence", "identifier", "assignments"], + title: "AssignmentScopeEntry", +} as const; + +export const $AssignmentScopeModel = { + properties: { + assignment_scope_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Assignment Scope Id", + }, + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Annotation Scheme Id", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + config: { + anyOf: [ + { + oneOf: [ + { + $ref: "#/components/schemas/AssignmentScopeRandomWithExclusionConfig", + }, + { + $ref: "#/components/schemas/AssignmentScopeRandomWithNQLConfig", + }, + { + $ref: "#/components/schemas/AssignmentScopeRandomConfig", + }, + ], + discriminator: { + propertyName: "config_type", + mapping: { + random: "#/components/schemas/AssignmentScopeRandomConfig", + random_exclusion: "#/components/schemas/AssignmentScopeRandomWithExclusionConfig", + random_nql: "#/components/schemas/AssignmentScopeRandomWithNQLConfig", + }, + }, + }, + { + type: "null", + }, + ], + title: "Config", + }, + highlighter_ids: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + items: { + type: "string", + format: "uuid", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Highlighter Ids", + }, + }, + type: "object", + required: ["annotation_scheme_id", "name"], + title: "AssignmentScopeModel", + description: `AssignmentScope can be used to logically group a set of Assignments. +For example, one may wish to re-use the same AnnotationScheme several times within a project +without copying it each time. It may also be used to logically group different scopes of +the annotation process, for example to make it clear that different subsets of a dataset +are to be annotated. +Logically, this should be viewed as a hierarchical organisation +AnnotationScheme -> [AssignmentScope] -> Assignment -> Annotation`, +} as const; + +export const $AssignmentScopeRandomConfig = { + properties: { + config_type: { + const: "random", + title: "Config Type", + default: "random", + }, + users: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + items: { + type: "string", + format: "uuid", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Users", + }, + num_items: { + type: "integer", + title: "Num Items", + }, + min_assignments_per_item: { + type: "integer", + title: "Min Assignments Per Item", + }, + max_assignments_per_item: { + type: "integer", + title: "Max Assignments Per Item", + }, + num_multi_coded_items: { + type: "integer", + title: "Num Multi Coded Items", + }, + random_seed: { + type: "integer", + title: "Random Seed", + }, + }, + type: "object", + required: [ + "num_items", + "min_assignments_per_item", + "max_assignments_per_item", + "num_multi_coded_items", + "random_seed", + ], + title: "AssignmentScopeRandomConfig", +} as const; + +export const $AssignmentScopeRandomWithExclusionConfig = { + properties: { + config_type: { + const: "random_exclusion", + title: "Config Type", + default: "random_exclusion", + }, + users: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + items: { + type: "string", + format: "uuid", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Users", + }, + num_items: { + type: "integer", + title: "Num Items", + }, + min_assignments_per_item: { + type: "integer", + title: "Min Assignments Per Item", + }, + max_assignments_per_item: { + type: "integer", + title: "Max Assignments Per Item", + }, + num_multi_coded_items: { + type: "integer", + title: "Num Multi Coded Items", + }, + random_seed: { + type: "integer", + title: "Random Seed", + }, + excluded_scopes: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + items: { + type: "string", + format: "uuid", + }, + type: "array", + }, + ], + title: "Excluded Scopes", + }, + }, + type: "object", + required: [ + "num_items", + "min_assignments_per_item", + "max_assignments_per_item", + "num_multi_coded_items", + "random_seed", + "excluded_scopes", + ], + title: "AssignmentScopeRandomWithExclusionConfig", +} as const; + +export const $AssignmentScopeRandomWithNQLConfig = { + properties: { + config_type: { + const: "random_nql", + title: "Config Type", + default: "random_nql", + }, + users: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + items: { + type: "string", + format: "uuid", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Users", + }, + num_items: { + type: "integer", + title: "Num Items", + }, + min_assignments_per_item: { + type: "integer", + title: "Min Assignments Per Item", + }, + max_assignments_per_item: { + type: "integer", + title: "Max Assignments Per Item", + }, + num_multi_coded_items: { + type: "integer", + title: "Num Multi Coded Items", + }, + random_seed: { + type: "integer", + title: "Random Seed", + }, + query_parsed: { + oneOf: [ + { + $ref: "#/components/schemas/FieldFilter", + }, + { + $ref: "#/components/schemas/FieldFilters", + }, + { + $ref: "#/components/schemas/LabelFilterMulti", + }, + { + $ref: "#/components/schemas/LabelFilterBool", + }, + { + $ref: "#/components/schemas/LabelFilterInt", + }, + { + $ref: "#/components/schemas/AssignmentFilter", + }, + { + $ref: "#/components/schemas/AnnotationFilter", + }, + { + $ref: "#/components/schemas/ImportFilter", + }, + { + $ref: "#/components/schemas/MetaFilterBool", + }, + { + $ref: "#/components/schemas/MetaFilterInt", + }, + { + $ref: "#/components/schemas/MetaFilterStr", + }, + { + $ref: "#/components/schemas/SubQuery", + }, + ], + title: "Query Parsed", + discriminator: { + propertyName: "filter", + mapping: { + annotation: "#/components/schemas/AnnotationFilter", + assignment: "#/components/schemas/AssignmentFilter", + field: "#/components/schemas/FieldFilter", + field_mul: "#/components/schemas/FieldFilters", + import: "#/components/schemas/ImportFilter", + label_bool: "#/components/schemas/LabelFilterBool", + label_int: "#/components/schemas/LabelFilterInt", + label_multi: "#/components/schemas/LabelFilterMulti", + meta_bool: "#/components/schemas/MetaFilterBool", + meta_int: "#/components/schemas/MetaFilterInt", + meta_str: "#/components/schemas/MetaFilterStr", + sub: "#/components/schemas/SubQuery", + }, + }, + }, + query_str: { + type: "string", + title: "Query Str", + }, + }, + type: "object", + required: [ + "num_items", + "min_assignments_per_item", + "max_assignments_per_item", + "num_multi_coded_items", + "random_seed", + "query_parsed", + "query_str", + ], + title: "AssignmentScopeRandomWithNQLConfig", +} as const; + +export const $AssignmentStatus = { + type: "string", + enum: ["FULL", "PARTIAL", "OPEN", "INVALID"], + title: "AssignmentStatus", +} as const; + +export const $AuthTokenModel = { + properties: { + token_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Token Id", + }, + username: { + type: "string", + title: "Username", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + valid_till: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Valid Till", + }, + }, + type: "object", + required: ["token_id", "username"], + title: "AuthTokenModel", +} as const; + +export const $BasicProjectStats = { + properties: { + num_items: { + type: "integer", + title: "Num Items", + }, + num_imports: { + type: "integer", + title: "Num Imports", + }, + num_schemes: { + type: "integer", + title: "Num Schemes", + }, + num_scopes: { + type: "integer", + title: "Num Scopes", + }, + num_labels: { + type: "integer", + title: "Num Labels", + }, + num_labeled_items: { + type: "integer", + title: "Num Labeled Items", + }, + }, + type: "object", + required: ["num_items", "num_imports", "num_schemes", "num_scopes", "num_labels", "num_labeled_items"], + title: "BasicProjectStats", +} as const; + +export const $Body_login_for_access_token_api_login_token_post = { + properties: { + grant_type: { + anyOf: [ + { + type: "string", + pattern: "password", + }, + { + type: "null", + }, + ], + title: "Grant Type", + }, + username: { + type: "string", + title: "Username", + }, + password: { + type: "string", + title: "Password", + }, + scope: { + type: "string", + title: "Scope", + default: "", + }, + client_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Client Id", + }, + client_secret: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Client Secret", + }, + }, + type: "object", + required: ["username", "password"], + title: "Body_login_for_access_token_api_login_token_post", +} as const; + +export const $Body_save_resolved_annotations_api_annotations_config_resolve__put = { + properties: { + settings: { + $ref: "#/components/schemas/BotMetaResolveBase", + }, + matrix: { + additionalProperties: { + additionalProperties: { + $ref: "#/components/schemas/ResolutionCell", + }, + type: "object", + }, + type: "object", + title: "Matrix", + }, + }, + type: "object", + required: ["settings", "matrix"], + title: "Body_save_resolved_annotations_api_annotations_config_resolve__put", +} as const; + +export const $Body_upload_file_api_pipes_artefacts_files_upload_post = { + properties: { + file: { + type: "string", + format: "binary", + title: "File", + }, + }, + type: "object", + required: ["file"], + title: "Body_upload_file_api_pipes_artefacts_files_upload_post", +} as const; + +export const $Body_upload_files_api_pipes_artefacts_files_upload_many_post = { + properties: { + file: { + items: { + type: "string", + format: "binary", + }, + type: "array", + title: "File", + }, + }, + type: "object", + required: ["file"], + title: "Body_upload_files_api_pipes_artefacts_files_upload_many_post", +} as const; + +export const $BotAnnotationMetaDataBaseModel = { + properties: { + bot_annotation_metadata_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Bot Annotation Metadata Id", + }, + name: { + type: "string", + title: "Name", + }, + kind: { + $ref: "#/components/schemas/BotKind", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Project Id", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + assignment_scope_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Assignment Scope Id", + }, + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Annotation Scheme Id", + }, + }, + type: "object", + required: ["name", "kind", "project_id"], + title: "BotAnnotationMetaDataBaseModel", +} as const; + +export const $BotAnnotationModel = { + properties: { + value_bool: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Value Bool", + }, + value_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value Int", + }, + value_float: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Value Float", + }, + value_str: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Value Str", + }, + multi_int: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Multi Int", + }, + bot_annotation_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Bot Annotation Id", + }, + bot_annotation_metadata_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Bot Annotation Metadata Id", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Item Id", + }, + parent: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Parent", + }, + key: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Key", + }, + repeat: { + type: "integer", + title: "Repeat", + default: 1, + }, + order: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Order", + }, + confidence: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Confidence", + }, + }, + type: "object", + required: ["item_id"], + title: "BotAnnotationModel", +} as const; + +export const $BotAnnotationResolution = { + properties: { + bot_annotation_metadata_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Bot Annotation Metadata Id", + }, + name: { + type: "string", + title: "Name", + }, + kind: { + $ref: "#/components/schemas/BotKind", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Project Id", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + assignment_scope_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Assignment Scope Id", + }, + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Annotation Scheme Id", + }, + meta: { + $ref: "#/components/schemas/BotMetaResolve", + }, + }, + type: "object", + required: ["name", "kind", "project_id", "assignment_scope_id", "annotation_scheme_id", "meta"], + title: "BotAnnotationResolution", +} as const; + +export const $BotKind = { + type: "string", + enum: ["CLASSIFICATION", "RULES", "TOPICS", "RESOLVE", "SCRIPT"], + title: "BotKind", +} as const; + +export const $BotMetaInfo = { + properties: { + bot_annotation_metadata_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Bot Annotation Metadata Id", + }, + name: { + type: "string", + title: "Name", + }, + kind: { + $ref: "#/components/schemas/BotKind", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Project Id", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + assignment_scope_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Assignment Scope Id", + }, + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Annotation Scheme Id", + }, + num_annotations: { + type: "integer", + title: "Num Annotations", + }, + num_annotated_items: { + type: "integer", + title: "Num Annotated Items", + }, + }, + type: "object", + required: ["name", "kind", "project_id", "num_annotations", "num_annotated_items"], + title: "BotMetaInfo", +} as const; + +export const $BotMetaResolve = { + properties: { + algorithm: { + $ref: "#/components/schemas/ResolutionMethod", + }, + ignore_hierarchy: { + type: "boolean", + title: "Ignore Hierarchy", + }, + ignore_repeat: { + type: "boolean", + title: "Ignore Repeat", + }, + snapshot: { + items: { + $ref: "#/components/schemas/SnapshotEntry", + }, + type: "array", + title: "Snapshot", + }, + resolutions: { + items: { + $ref: "#/components/schemas/ResolutionSnapshotEntry", + }, + type: "array", + title: "Resolutions", + }, + }, + type: "object", + required: ["algorithm", "ignore_hierarchy", "ignore_repeat", "snapshot", "resolutions"], + title: "BotMetaResolve", +} as const; + +export const $BotMetaResolveBase = { + properties: { + algorithm: { + $ref: "#/components/schemas/ResolutionMethod", + }, + ignore_hierarchy: { + type: "boolean", + title: "Ignore Hierarchy", + }, + ignore_repeat: { + type: "boolean", + title: "Ignore Repeat", + }, + }, + type: "object", + required: ["algorithm", "ignore_hierarchy", "ignore_repeat"], + title: "BotMetaResolveBase", +} as const; + +export const $Cashtag = { + properties: { + start: { + type: "integer", + title: "Start", + }, + end: { + type: "integer", + title: "End", + }, + tag: { + type: "string", + title: "Tag", + }, + }, + type: "object", + required: ["start", "end", "tag"], + title: "Cashtag", +} as const; + +export const $ContextAnnotation = { + properties: { + domain_id: { + type: "string", + title: "Domain Id", + }, + domain_name: { + type: "string", + title: "Domain Name", + }, + entity_id: { + type: "string", + title: "Entity Id", + }, + entity_name: { + type: "string", + title: "Entity Name", + }, + }, + type: "object", + required: ["domain_id", "domain_name", "entity_id", "entity_name"], + title: "ContextAnnotation", + description: `Flattened and reduced version of the context_annotation object +https://developer.twitter.com/en/docs/twitter-api/annotations/overview + +NOTE: Under the assumption that we could always recover the \`description\` + of the domain and entity, this information is not stored to save space.`, +} as const; + +export const $DehydratedAnnotationTracker = { + properties: { + annotation_tracking_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Annotation Tracking Id", + }, + name: { + type: "string", + title: "Name", + }, + }, + type: "object", + required: ["name"], + title: "DehydratedAnnotationTracker", +} as const; + +export const $DehydratedAssignment = { + properties: { + assignment_id: { + type: "string", + title: "Assignment Id", + }, + user_id: { + type: "string", + title: "User Id", + }, + item_id: { + type: "string", + title: "Item Id", + }, + username: { + type: "string", + title: "Username", + }, + status: { + $ref: "#/components/schemas/AssignmentStatus", + }, + order: { + type: "integer", + title: "Order", + }, + }, + type: "object", + required: ["assignment_id", "user_id", "item_id", "username", "status", "order"], + title: "DehydratedAssignment", +} as const; + +export const $DehydratedUser = { + properties: { + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "User Id", + }, + username: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Username", + }, + full_name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Full Name", + }, + }, + type: "object", + title: "DehydratedUser", +} as const; + +export const $Event = { + properties: { + event: { + type: "string", + enum: ["ExampleSubEvent", "ExampleEvent"], + title: "Event", + }, + payload: { + anyOf: [ + { + $ref: "#/components/schemas/ExampleSubEvent", + }, + { + $ref: "#/components/schemas/ExampleEvent", + }, + ], + title: "Payload", + }, + }, + type: "object", + required: ["event", "payload"], + title: "Event", +} as const; + +export const $ExampleEvent = { + properties: { + payload_a: { + type: "string", + title: "Payload A", + }, + }, + type: "object", + required: ["payload_a"], + title: "ExampleEvent", +} as const; + +export const $ExampleSubEvent = { + properties: { + payload_a: { + type: "string", + title: "Payload A", + }, + }, + type: "object", + required: ["payload_a"], + title: "ExampleSubEvent", +} as const; + +export const $ExportRequest = { + properties: { + labels: { + items: { + $ref: "#/components/schemas/LabelOptions", + }, + type: "array", + title: "Labels", + }, + nql_filter: { + anyOf: [ + { + oneOf: [ + { + $ref: "#/components/schemas/FieldFilter", + }, + { + $ref: "#/components/schemas/FieldFilters", + }, + { + $ref: "#/components/schemas/LabelFilterMulti", + }, + { + $ref: "#/components/schemas/LabelFilterBool", + }, + { + $ref: "#/components/schemas/LabelFilterInt", + }, + { + $ref: "#/components/schemas/AssignmentFilter", + }, + { + $ref: "#/components/schemas/AnnotationFilter", + }, + { + $ref: "#/components/schemas/ImportFilter", + }, + { + $ref: "#/components/schemas/MetaFilterBool", + }, + { + $ref: "#/components/schemas/MetaFilterInt", + }, + { + $ref: "#/components/schemas/MetaFilterStr", + }, + { + $ref: "#/components/schemas/SubQuery", + }, + ], + discriminator: { + propertyName: "filter", + mapping: { + annotation: "#/components/schemas/AnnotationFilter", + assignment: "#/components/schemas/AssignmentFilter", + field: "#/components/schemas/FieldFilter", + field_mul: "#/components/schemas/FieldFilters", + import: "#/components/schemas/ImportFilter", + label_bool: "#/components/schemas/LabelFilterBool", + label_int: "#/components/schemas/LabelFilterInt", + label_multi: "#/components/schemas/LabelFilterMulti", + meta_bool: "#/components/schemas/MetaFilterBool", + meta_int: "#/components/schemas/MetaFilterInt", + meta_str: "#/components/schemas/MetaFilterStr", + sub: "#/components/schemas/SubQuery", + }, + }, + }, + { + type: "null", + }, + ], + title: "Nql Filter", + }, + bot_annotation_metadata_ids: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Bot Annotation Metadata Ids", + }, + assignment_scope_ids: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Assignment Scope Ids", + }, + user_ids: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "User Ids", + }, + ignore_hierarchy: { + type: "boolean", + title: "Ignore Hierarchy", + default: true, + }, + ignore_repeat: { + type: "boolean", + title: "Ignore Repeat", + default: true, + }, + }, + type: "object", + required: ["labels"], + title: "ExportRequest", +} as const; + +export const $FieldFilter = { + properties: { + filter: { + const: "field", + title: "Filter", + default: "field", + }, + field: { + type: "string", + enum: ["title", "abstract", "pub_year", "date", "source"], + title: "Field", + }, + value: { + anyOf: [ + { + type: "string", + }, + { + type: "integer", + }, + ], + title: "Value", + }, + comp: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Comp", + }, + }, + type: "object", + required: ["field", "value"], + title: "FieldFilter", +} as const; + +export const $FieldFilters = { + properties: { + filter: { + const: "field_mul", + title: "Filter", + default: "field_mul", + }, + field: { + type: "string", + enum: ["doi", "item_id", "openalex_id"], + title: "Field", + }, + values: { + items: { + type: "string", + }, + type: "array", + title: "Values", + }, + }, + type: "object", + required: ["field", "values"], + title: "FieldFilters", +} as const; + +export const $FileOnDisk = { + properties: { + path: { + type: "string", + title: "Path", + }, + size: { + type: "integer", + title: "Size", + }, + }, + type: "object", + required: ["path", "size"], + title: "FileOnDisk", +} as const; + +export const $FlatLabel = { + properties: { + path: { + items: { + $ref: "#/components/schemas/Label", + }, + type: "array", + title: "Path", + }, + repeat: { + type: "integer", + title: "Repeat", + }, + path_key: { + type: "string", + title: "Path Key", + }, + parent_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Parent Int", + }, + parent_key: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Parent Key", + }, + parent_value: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Parent Value", + }, + name: { + type: "string", + title: "Name", + }, + hint: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Hint", + }, + key: { + type: "string", + title: "Key", + }, + required: { + type: "boolean", + title: "Required", + }, + max_repeat: { + type: "integer", + title: "Max Repeat", + }, + kind: { + type: "string", + enum: ["bool", "str", "float", "int", "single", "multi", "intext"], + title: "Kind", + }, + choices: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/FlatLabelChoice", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Choices", + }, + }, + type: "object", + required: ["path", "repeat", "path_key", "name", "key", "required", "max_repeat", "kind"], + title: "FlatLabel", +} as const; + +export const $FlatLabelChoice = { + properties: { + name: { + type: "string", + title: "Name", + }, + hint: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Hint", + }, + value: { + type: "integer", + title: "Value", + }, + }, + type: "object", + required: ["name", "value"], + title: "FlatLabelChoice", +} as const; + +export const $FlattenedAnnotationSchemeLabel = { + properties: { + name: { + type: "string", + title: "Name", + }, + hint: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Hint", + }, + key: { + type: "string", + title: "Key", + }, + required: { + type: "boolean", + title: "Required", + }, + max_repeat: { + type: "integer", + title: "Max Repeat", + }, + implicit_max_repeat: { + type: "integer", + title: "Implicit Max Repeat", + }, + kind: { + type: "string", + enum: ["bool", "str", "float", "int", "single", "multi", "intext"], + title: "Kind", + }, + choices: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/AnnotationSchemeLabelChoiceFlat", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Choices", + }, + parent_label: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Parent Label", + }, + parent_choice: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Parent Choice", + }, + }, + type: "object", + required: ["name", "key", "required", "max_repeat", "implicit_max_repeat", "kind"], + title: "FlattenedAnnotationSchemeLabel", +} as const; + +export const $FullLexisNexisItemModel = { + properties: { + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Item Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + type: { + allOf: [ + { + $ref: "#/components/schemas/ItemType", + }, + ], + default: "lexis", + }, + text: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Text", + }, + teaser: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Teaser", + }, + authors: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Authors", + }, + sources: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/LexisNexisItemSourceModel", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Sources", + }, + }, + type: "object", + title: "FullLexisNexisItemModel", +} as const; + +export const $GenericItemModel = { + properties: { + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Item Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + type: { + allOf: [ + { + $ref: "#/components/schemas/ItemType", + }, + ], + default: "generic", + }, + text: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Text", + }, + meta: { + type: "object", + title: "Meta", + }, + }, + type: "object", + required: ["meta"], + title: "GenericItemModel", + description: "Corresponds to db.models.items.generic.GenericItem", +} as const; + +export const $HTTPValidationError = { + properties: { + detail: { + items: { + $ref: "#/components/schemas/ValidationError", + }, + type: "array", + title: "Detail", + }, + }, + type: "object", + title: "HTTPValidationError", +} as const; + +export const $Hashtag = { + properties: { + start: { + type: "integer", + title: "Start", + }, + end: { + type: "integer", + title: "End", + }, + tag: { + type: "string", + title: "Tag", + }, + }, + type: "object", + required: ["start", "end", "tag"], + title: "Hashtag", +} as const; + +export const $HighlighterModel = { + properties: { + highlighter_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Highlighter Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Project Id", + }, + name: { + type: "string", + title: "Name", + }, + keywords: { + items: { + type: "string", + }, + type: "array", + title: "Keywords", + }, + style: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Style", + }, + }, + type: "object", + required: ["highlighter_id", "project_id", "name", "keywords"], + title: "HighlighterModel", + description: `A highlighter can be used in a project to highlight tokens in text to make +it easier for users to annotate documents when certain keywords are highlighted. + +It is assumed, that a highlighter roughly corresponds to query terms. +Furthermore, keywords in a highlighter will typically be joined into +a regular expression group (e.g. "(keyword1|double keyword|wildcar.*)"). + +Each matching group will be wrapped in a highlight span in the frontend.`, +} as const; + +export const $HistogramEntry = { + properties: { + bucket: { + type: "string", + format: "date-time", + title: "Bucket", + }, + num_items: { + type: "integer", + title: "Num Items", + }, + }, + type: "object", + required: ["bucket", "num_items"], + title: "HistogramEntry", +} as const; + +export const $IEUUID = { + properties: { + incl: { + type: "boolean", + title: "Incl", + }, + uuid: { + type: "string", + title: "Uuid", + }, + }, + type: "object", + required: ["incl", "uuid"], + title: "IEUUID", +} as const; + +export const $ImportFilter = { + properties: { + filter: { + const: "import", + title: "Filter", + default: "import", + }, + import_ids: { + items: { + $ref: "#/components/schemas/IEUUID", + }, + type: "array", + title: "Import Ids", + }, + }, + type: "object", + required: ["import_ids"], + title: "ImportFilter", +} as const; + +export const $ImportModel = { + properties: { + import_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Import Id", + }, + user_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "User Id", + }, + project_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + ], + title: "Project Id", + }, + pipeline_task_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Pipeline Task Id", + }, + name: { + type: "string", + title: "Name", + }, + description: { + type: "string", + title: "Description", + }, + type: { + type: "string", + title: "Type", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_started: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Started", + }, + time_finished: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Finished", + }, + config: { + anyOf: [ + { + oneOf: [ + { + $ref: "#/components/schemas/ScopusImport", + }, + { + $ref: "#/components/schemas/AcademicItemImport", + }, + { + $ref: "#/components/schemas/OpenAlexFileImport", + }, + { + $ref: "#/components/schemas/OpenAlexSolrImport", + }, + { + $ref: "#/components/schemas/WoSImport", + }, + ], + discriminator: { + propertyName: "kind", + mapping: { + academic: "#/components/schemas/AcademicItemImport", + "oa-file": "#/components/schemas/OpenAlexFileImport", + "oa-solr": "#/components/schemas/OpenAlexSolrImport", + scopus: "#/components/schemas/ScopusImport", + wos: "#/components/schemas/WoSImport", + }, + }, + }, + { + type: "null", + }, + ], + title: "Config", + }, + }, + type: "object", + required: ["project_id", "name", "description", "type"], + title: "ImportModel", +} as const; + +export const $ItemAnnotation = { + properties: { + value_bool: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Value Bool", + }, + value_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value Int", + }, + value_float: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Value Float", + }, + value_str: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Value Str", + }, + multi_int: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Multi Int", + }, + annotation_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Annotation Id", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + assignment_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Assignment Id", + }, + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "User Id", + }, + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Item Id", + }, + annotation_scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Annotation Scheme Id", + }, + snippet_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Snippet Id", + }, + key: { + type: "string", + title: "Key", + }, + repeat: { + type: "integer", + title: "Repeat", + default: 1, + }, + parent: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Parent", + }, + path: { + items: { + $ref: "#/components/schemas/Label", + }, + type: "array", + title: "Path", + }, + old: { + anyOf: [ + { + $ref: "#/components/schemas/AnnotationValue", + }, + { + type: "null", + }, + ], + }, + }, + type: "object", + required: ["assignment_id", "user_id", "item_id", "annotation_scheme_id", "key", "path"], + title: "ItemAnnotation", +} as const; + +export const $ItemType = { + type: "string", + enum: ["generic", "twitter", "academic", "patents", "lexis"], + title: "ItemType", +} as const; + +export const $ItemWithCount = { + properties: { + item_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + ], + title: "Item Id", + }, + num_total: { + type: "integer", + title: "Num Total", + }, + num_open: { + type: "integer", + title: "Num Open", + }, + num_partial: { + type: "integer", + title: "Num Partial", + }, + num_full: { + type: "integer", + title: "Num Full", + }, + }, + type: "object", + required: ["item_id", "num_total", "num_open", "num_partial", "num_full"], + title: "ItemWithCount", +} as const; + +export const $Label = { + properties: { + key: { + type: "string", + title: "Key", + }, + repeat: { + type: "integer", + title: "Repeat", + }, + value: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value", + }, + }, + type: "object", + required: ["key", "repeat"], + title: "Label", + description: `Convenience type (corresponding to internal type in db annotation_label). +For Annotation or BotAnnotation, this is the combination of their respective key, repeat value. + +Mainly used during resolving annotations.`, +} as const; + +export const $LabelFilterBool = { + properties: { + scopes: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Scopes", + }, + scheme: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Scheme", + }, + users: { + anyOf: [ + { + $ref: "#/components/schemas/UsersFilter", + }, + { + type: "null", + }, + ], + }, + repeats: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Repeats", + }, + key: { + type: "string", + title: "Key", + }, + type: { + type: "string", + enum: ["user", "bot", "resolved"], + title: "Type", + }, + filter: { + const: "label_bool", + title: "Filter", + default: "label_bool", + }, + value_type: { + const: "bool", + title: "Value Type", + default: "bool", + }, + comp: { + const: "=", + title: "Comp", + default: "=", + }, + value_bool: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Value Bool", + }, + }, + type: "object", + required: ["key", "type"], + title: "LabelFilterBool", +} as const; + +export const $LabelFilterInt = { + properties: { + scopes: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Scopes", + }, + scheme: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Scheme", + }, + users: { + anyOf: [ + { + $ref: "#/components/schemas/UsersFilter", + }, + { + type: "null", + }, + ], + }, + repeats: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Repeats", + }, + key: { + type: "string", + title: "Key", + }, + type: { + type: "string", + enum: ["user", "bot", "resolved"], + title: "Type", + }, + filter: { + const: "label_int", + title: "Filter", + default: "label_int", + }, + value_type: { + const: "int", + title: "Value Type", + default: "int", + }, + value_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value Int", + }, + comp: { + type: "string", + title: "Comp", + }, + }, + type: "object", + required: ["key", "type", "comp"], + title: "LabelFilterInt", +} as const; + +export const $LabelFilterMulti = { + properties: { + scopes: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Scopes", + }, + scheme: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Scheme", + }, + users: { + anyOf: [ + { + $ref: "#/components/schemas/UsersFilter", + }, + { + type: "null", + }, + ], + }, + repeats: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Repeats", + }, + key: { + type: "string", + title: "Key", + }, + type: { + type: "string", + enum: ["user", "bot", "resolved"], + title: "Type", + }, + filter: { + const: "label_multi", + title: "Filter", + default: "label_multi", + }, + value_type: { + const: "multi", + title: "Value Type", + default: "multi", + }, + multi_int: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Multi Int", + }, + comp: { + type: "string", + title: "Comp", + }, + }, + type: "object", + required: ["key", "type", "comp"], + title: "LabelFilterMulti", +} as const; + +export const $LabelOptions = { + properties: { + key: { + type: "string", + title: "Key", + }, + options_int: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Options Int", + }, + options_bool: { + anyOf: [ + { + items: { + type: "boolean", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Options Bool", + }, + options_multi: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Options Multi", + }, + strings: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Strings", + }, + }, + type: "object", + required: ["key"], + title: "LabelOptions", +} as const; + +export const $LabelScope = { + properties: { + scope_id: { + type: "string", + title: "Scope Id", + }, + name: { + type: "string", + title: "Name", + }, + scope_type: { + type: "string", + enum: ["H", "R"], + title: "Scope Type", + }, + }, + type: "object", + required: ["scope_id", "name", "scope_type"], + title: "LabelScope", +} as const; + +export const $LexisNexisItemModel = { + properties: { + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Item Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + type: { + allOf: [ + { + $ref: "#/components/schemas/ItemType", + }, + ], + default: "lexis", + }, + text: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Text", + }, + teaser: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Teaser", + }, + authors: { + anyOf: [ + { + items: { + type: "string", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Authors", + }, + }, + type: "object", + title: "LexisNexisItemModel", +} as const; + +export const $LexisNexisItemSourceModel = { + properties: { + item_source_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Item Source Id", + }, + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Item Id", + }, + lexis_id: { + type: "string", + title: "Lexis Id", + }, + name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Name", + }, + title: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Title", + }, + section: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Section", + }, + jurisdiction: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Jurisdiction", + }, + location: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Location", + }, + content_type: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Content Type", + }, + published_at: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Published At", + }, + updated_at: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Updated At", + }, + meta: { + anyOf: [ + { + type: "object", + }, + { + type: "null", + }, + ], + title: "Meta", + }, + }, + type: "object", + required: ["lexis_id"], + title: "LexisNexisItemSourceModel", +} as const; + +export const $MakeAssignmentsRequestModel = { + properties: { + annotation_scheme_id: { + type: "string", + title: "Annotation Scheme Id", + }, + scope_id: { + type: "string", + title: "Scope Id", + }, + config: { + oneOf: [ + { + $ref: "#/components/schemas/AssignmentScopeRandomWithExclusionConfig", + }, + { + $ref: "#/components/schemas/AssignmentScopeRandomWithNQLConfig", + }, + { + $ref: "#/components/schemas/AssignmentScopeRandomConfig", + }, + ], + title: "Config", + discriminator: { + propertyName: "config_type", + mapping: { + random: "#/components/schemas/AssignmentScopeRandomConfig", + random_exclusion: "#/components/schemas/AssignmentScopeRandomWithExclusionConfig", + random_nql: "#/components/schemas/AssignmentScopeRandomWithNQLConfig", + }, + }, + }, + save: { + type: "boolean", + title: "Save", + default: false, + }, + }, + type: "object", + required: ["annotation_scheme_id", "scope_id", "config"], + title: "MakeAssignmentsRequestModel", +} as const; + +export const $Mention = { + properties: { + start: { + type: "integer", + title: "Start", + }, + end: { + type: "integer", + title: "End", + }, + username: { + type: "string", + title: "Username", + }, + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "integer", + }, + ], + title: "User Id", + }, + }, + type: "object", + required: ["start", "end", "username", "user_id"], + title: "Mention", +} as const; + +export const $MetaFilterBool = { + properties: { + field: { + type: "string", + title: "Field", + }, + filter: { + const: "meta_bool", + title: "Filter", + default: "meta_bool", + }, + value_type: { + const: "bool", + title: "Value Type", + default: "bool", + }, + comp: { + const: "=", + title: "Comp", + default: "=", + }, + value: { + type: "boolean", + title: "Value", + }, + }, + type: "object", + required: ["field", "value"], + title: "MetaFilterBool", +} as const; + +export const $MetaFilterInt = { + properties: { + field: { + type: "string", + title: "Field", + }, + filter: { + const: "meta_int", + title: "Filter", + default: "meta_int", + }, + value_type: { + const: "int", + title: "Value Type", + default: "int", + }, + comp: { + type: "string", + title: "Comp", + }, + value: { + type: "integer", + title: "Value", + }, + }, + type: "object", + required: ["field", "comp", "value"], + title: "MetaFilterInt", +} as const; + +export const $MetaFilterStr = { + properties: { + field: { + type: "string", + title: "Field", + }, + filter: { + const: "meta_str", + title: "Filter", + default: "meta_str", + }, + value_type: { + const: "str", + title: "Value Type", + default: "str", + }, + comp: { + const: "LIKE", + title: "Comp", + default: "LIKE", + }, + value: { + type: "string", + title: "Value", + }, + }, + type: "object", + required: ["field", "value"], + title: "MetaFilterStr", +} as const; + +export const $OpenAlexFileImport = { + properties: { + sources: { + items: { + type: "string", + format: "path", + }, + type: "array", + title: "Sources", + }, + kind: { + const: "oa-file", + title: "Kind", + default: "oa-file", + }, + }, + type: "object", + required: ["sources"], + title: "OpenAlexFileImport", +} as const; + +export const $OpenAlexSolrImport = { + properties: { + kind: { + const: "oa-solr", + title: "Kind", + default: "oa-solr", + }, + query: { + type: "string", + title: "Query", + }, + def_type: { + type: "string", + enum: ["edismax", "lucene", "dismax"], + title: "Def Type", + default: "lucene", + }, + field: { + type: "string", + enum: ["title", "abstract", "title_abstract"], + title: "Field", + default: "title_abstract", + }, + op: { + type: "string", + enum: ["OR", "AND"], + title: "Op", + default: "AND", + }, + }, + type: "object", + required: ["query"], + title: "OpenAlexSolrImport", +} as const; + +export const $ProjectBaseInfo = { + properties: { + users: { + items: { + $ref: "#/components/schemas/ProjectBaseInfoEntry", + }, + type: "array", + title: "Users", + }, + scopes: { + items: { + $ref: "#/components/schemas/ProjectBaseInfoScopeEntry", + }, + type: "array", + title: "Scopes", + }, + bot_scopes: { + items: { + $ref: "#/components/schemas/ProjectBaseInfoEntry", + }, + type: "array", + title: "Bot Scopes", + }, + labels: { + additionalProperties: { + $ref: "#/components/schemas/LabelOptions", + }, + type: "object", + title: "Labels", + }, + }, + type: "object", + required: ["users", "scopes", "bot_scopes", "labels"], + title: "ProjectBaseInfo", +} as const; + +export const $ProjectBaseInfoEntry = { + properties: { + id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Id", + }, + name: { + type: "string", + title: "Name", + }, + }, + type: "object", + required: ["id", "name"], + title: "ProjectBaseInfoEntry", +} as const; + +export const $ProjectBaseInfoScopeEntry = { + properties: { + id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Id", + }, + name: { + type: "string", + title: "Name", + }, + scheme_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Scheme Id", + }, + scheme_name: { + type: "string", + title: "Scheme Name", + }, + }, + type: "object", + required: ["id", "name", "scheme_id", "scheme_name"], + title: "ProjectBaseInfoScopeEntry", +} as const; + +export const $ProjectInfo = { + properties: { + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + type: { + anyOf: [ + { + type: "string", + enum: ["generic", "twitter", "academic", "patents", "lexis"], + }, + { + $ref: "#/components/schemas/ItemType", + }, + ], + title: "Type", + }, + setting_motivational_quotes: { + type: "boolean", + title: "Setting Motivational Quotes", + default: true, + }, + owners: { + items: { + $ref: "#/components/schemas/UserBaseModel", + }, + type: "array", + title: "Owners", + }, + }, + type: "object", + required: ["name", "type", "owners"], + title: "ProjectInfo", +} as const; + +export const $ProjectModel = { + properties: { + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + name: { + type: "string", + title: "Name", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + type: { + anyOf: [ + { + type: "string", + enum: ["generic", "twitter", "academic", "patents", "lexis"], + }, + { + $ref: "#/components/schemas/ItemType", + }, + ], + title: "Type", + }, + setting_motivational_quotes: { + type: "boolean", + title: "Setting Motivational Quotes", + default: true, + }, + }, + type: "object", + required: ["name", "type"], + title: "ProjectModel", + description: `Project is the basic structural and conceptual place around which all functionality evolves. +It is essentially a container for a logically connected set of analyses, e.g. all work for a paper. + +Although Items (and subsequently their type-specific extensions) live outside the scope of a project, +they way they are augmented by annotations and analysis outcomes is always constrained to the scope +of a Project.`, +} as const; + +export const $ProjectPermissionsModel = { + properties: { + project_permission_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Permission Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Project Id", + }, + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "User Id", + }, + owner: { + type: "boolean", + title: "Owner", + default: false, + }, + dataset_read: { + type: "boolean", + title: "Dataset Read", + default: false, + }, + dataset_edit: { + type: "boolean", + title: "Dataset Edit", + default: false, + }, + imports_read: { + type: "boolean", + title: "Imports Read", + default: false, + }, + imports_edit: { + type: "boolean", + title: "Imports Edit", + default: false, + }, + annotations_read: { + type: "boolean", + title: "Annotations Read", + default: false, + }, + annotations_edit: { + type: "boolean", + title: "Annotations Edit", + default: false, + }, + pipelines_read: { + type: "boolean", + title: "Pipelines Read", + default: false, + }, + pipelines_edit: { + type: "boolean", + title: "Pipelines Edit", + default: false, + }, + artefacts_read: { + type: "boolean", + title: "Artefacts Read", + default: false, + }, + artefacts_edit: { + type: "boolean", + title: "Artefacts Edit", + default: false, + }, + search_dimensions: { + type: "boolean", + title: "Search Dimensions", + default: false, + }, + search_oa: { + type: "boolean", + title: "Search Oa", + default: false, + }, + import_limit_oa: { + type: "integer", + title: "Import Limit Oa", + default: 0, + }, + }, + type: "object", + required: ["project_id", "user_id"], + title: "ProjectPermissionsModel", + description: `ProjectPermissions allows to define fine-grained project-level permission management. +Once such an entry exists, the user is assumed to have very basic access to the respective project. +A user may become "owner" of a project, which will allow them to do everything and effectively ignoring the +other more fine-grained permission settings. + +It is assumed, that a user can always see and edit their own contributions (e.g. annotations) but +by giving them permission to view annotations, they can also see other users' annotations.`, +} as const; + +export const $QueryResult = { + properties: { + n_docs: { + type: "integer", + title: "N Docs", + }, + docs: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/AcademicItemModel", + }, + type: "array", + }, + { + items: { + $ref: "#/components/schemas/FullLexisNexisItemModel", + }, + type: "array", + }, + { + items: { + $ref: "#/components/schemas/GenericItemModel", + }, + type: "array", + }, + ], + title: "Docs", + }, + }, + type: "object", + required: ["n_docs", "docs"], + title: "QueryResult", +} as const; + +export const $RankEntry = { + properties: { + user_id: { + anyOf: [ + { + type: "string", + format: "uuid", + }, + { + type: "string", + }, + ], + title: "User Id", + }, + username: { + type: "string", + title: "Username", + }, + full_name: { + type: "string", + title: "Full Name", + }, + email: { + type: "string", + title: "Email", + }, + affiliation: { + type: "string", + title: "Affiliation", + }, + num_labels: { + type: "integer", + title: "Num Labels", + }, + num_labeled_items: { + type: "integer", + title: "Num Labeled Items", + }, + }, + type: "object", + required: ["user_id", "username", "full_name", "email", "affiliation", "num_labels", "num_labeled_items"], + title: "RankEntry", +} as const; + +export const $ReferencedTweet = { + properties: { + id: { + anyOf: [ + { + type: "string", + }, + { + type: "integer", + }, + ], + title: "Id", + }, + type: { + type: "string", + enum: ["retweeted", "quoted", "replied_to"], + title: "Type", + }, + }, + type: "object", + required: ["id", "type"], + title: "ReferencedTweet", +} as const; + +export const $ResolutionCell = { + properties: { + labels: { + additionalProperties: { + items: { + $ref: "#/components/schemas/ResolutionUserEntry", + }, + type: "array", + }, + type: "object", + title: "Labels", + }, + resolution: { + $ref: "#/components/schemas/BotAnnotationModel", + }, + status: { + allOf: [ + { + $ref: "#/components/schemas/ResolutionStatus", + }, + ], + default: "UNCHANGED", + }, + }, + type: "object", + required: ["labels", "resolution"], + title: "ResolutionCell", +} as const; + +export const $ResolutionMethod = { + type: "string", + enum: ["majority", "first", "first", "first"], + title: "ResolutionMethod", +} as const; + +export const $ResolutionOrdering = { + properties: { + identifier: { + type: "integer", + title: "Identifier", + }, + first_occurrence: { + type: "integer", + title: "First Occurrence", + }, + item_id: { + type: "string", + title: "Item Id", + }, + }, + type: "object", + required: ["identifier", "first_occurrence", "item_id"], + title: "ResolutionOrdering", +} as const; + +export const $ResolutionProposal = { + properties: { + scheme_info: { + $ref: "#/components/schemas/AnnotationSchemeInfo", + }, + labels: { + items: { + $ref: "#/components/schemas/FlatLabel", + }, + type: "array", + title: "Labels", + }, + annotators: { + items: { + $ref: "#/components/schemas/UserModel", + }, + type: "array", + title: "Annotators", + }, + ordering: { + items: { + $ref: "#/components/schemas/ResolutionOrdering", + }, + type: "array", + title: "Ordering", + }, + matrix: { + additionalProperties: { + additionalProperties: { + $ref: "#/components/schemas/ResolutionCell", + }, + type: "object", + }, + type: "object", + title: "Matrix", + }, + }, + type: "object", + required: ["scheme_info", "labels", "annotators", "ordering", "matrix"], + title: "ResolutionProposal", +} as const; + +export const $ResolutionSnapshotEntry = { + properties: { + order_key: { + type: "string", + title: "Order Key", + }, + path_key: { + type: "string", + title: "Path Key", + }, + ba_id: { + type: "string", + title: "Ba Id", + }, + }, + type: "object", + required: ["order_key", "path_key", "ba_id"], + title: "ResolutionSnapshotEntry", +} as const; + +export const $ResolutionStatus = { + type: "string", + enum: ["NEW", "CHANGED", "UNCHANGED"], + title: "ResolutionStatus", +} as const; + +export const $ResolutionUserEntry = { + properties: { + assignment: { + anyOf: [ + { + $ref: "#/components/schemas/DehydratedAssignment", + }, + { + type: "null", + }, + ], + }, + annotation: { + anyOf: [ + { + $ref: "#/components/schemas/ItemAnnotation", + }, + { + type: "null", + }, + ], + }, + status: { + allOf: [ + { + $ref: "#/components/schemas/ResolutionStatus", + }, + ], + default: "UNCHANGED", + }, + }, + type: "object", + title: "ResolutionUserEntry", +} as const; + +export const $SavedResolution = { + properties: { + meta: { + $ref: "#/components/schemas/BotAnnotationResolution", + }, + proposal: { + $ref: "#/components/schemas/ResolutionProposal", + }, + }, + type: "object", + required: ["meta", "proposal"], + title: "SavedResolution", +} as const; + +export const $ScopusImport = { + properties: { + sources: { + items: { + type: "string", + format: "path", + }, + type: "array", + title: "Sources", + }, + kind: { + const: "scopus", + title: "Kind", + default: "scopus", + }, + }, + type: "object", + required: ["sources"], + title: "ScopusImport", +} as const; + +export const $SearchResult = { + properties: { + query_time: { + type: "integer", + title: "Query Time", + }, + num_found: { + type: "integer", + title: "Num Found", + }, + docs: { + items: { + $ref: "#/components/schemas/AcademicItemModel", + }, + type: "array", + title: "Docs", + }, + histogram: { + anyOf: [ + { + additionalProperties: { + type: "integer", + }, + type: "object", + }, + { + type: "null", + }, + ], + title: "Histogram", + }, + }, + type: "object", + required: ["query_time", "num_found", "docs"], + title: "SearchResult", +} as const; + +export const $SnapshotEntry = { + properties: { + value_bool: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Value Bool", + }, + value_int: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Value Int", + }, + value_float: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Value Float", + }, + value_str: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Value Str", + }, + multi_int: { + anyOf: [ + { + items: { + type: "integer", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Multi Int", + }, + order_key: { + type: "string", + title: "Order Key", + }, + path_key: { + type: "string", + title: "Path Key", + }, + item_id: { + type: "string", + title: "Item Id", + }, + anno_id: { + type: "string", + title: "Anno Id", + }, + user_id: { + type: "string", + title: "User Id", + }, + }, + type: "object", + required: ["order_key", "path_key", "item_id", "anno_id", "user_id"], + title: "SnapshotEntry", +} as const; + +export const $SubQuery = { + properties: { + filter: { + const: "sub", + title: "Filter", + default: "sub", + }, + and_: { + anyOf: [ + { + items: { + oneOf: [ + { + $ref: "#/components/schemas/FieldFilter", + }, + { + $ref: "#/components/schemas/FieldFilters", + }, + { + $ref: "#/components/schemas/LabelFilterMulti", + }, + { + $ref: "#/components/schemas/LabelFilterBool", + }, + { + $ref: "#/components/schemas/LabelFilterInt", + }, + { + $ref: "#/components/schemas/AssignmentFilter", + }, + { + $ref: "#/components/schemas/AnnotationFilter", + }, + { + $ref: "#/components/schemas/ImportFilter", + }, + { + $ref: "#/components/schemas/MetaFilterBool", + }, + { + $ref: "#/components/schemas/MetaFilterInt", + }, + { + $ref: "#/components/schemas/MetaFilterStr", + }, + { + $ref: "#/components/schemas/SubQuery", + }, + ], + discriminator: { + propertyName: "filter", + mapping: { + annotation: "#/components/schemas/AnnotationFilter", + assignment: "#/components/schemas/AssignmentFilter", + field: "#/components/schemas/FieldFilter", + field_mul: "#/components/schemas/FieldFilters", + import: "#/components/schemas/ImportFilter", + label_bool: "#/components/schemas/LabelFilterBool", + label_int: "#/components/schemas/LabelFilterInt", + label_multi: "#/components/schemas/LabelFilterMulti", + meta_bool: "#/components/schemas/MetaFilterBool", + meta_int: "#/components/schemas/MetaFilterInt", + meta_str: "#/components/schemas/MetaFilterStr", + sub: "#/components/schemas/SubQuery", + }, + }, + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "And ", + }, + or_: { + anyOf: [ + { + items: { + oneOf: [ + { + $ref: "#/components/schemas/FieldFilter", + }, + { + $ref: "#/components/schemas/FieldFilters", + }, + { + $ref: "#/components/schemas/LabelFilterMulti", + }, + { + $ref: "#/components/schemas/LabelFilterBool", + }, + { + $ref: "#/components/schemas/LabelFilterInt", + }, + { + $ref: "#/components/schemas/AssignmentFilter", + }, + { + $ref: "#/components/schemas/AnnotationFilter", + }, + { + $ref: "#/components/schemas/ImportFilter", + }, + { + $ref: "#/components/schemas/MetaFilterBool", + }, + { + $ref: "#/components/schemas/MetaFilterInt", + }, + { + $ref: "#/components/schemas/MetaFilterStr", + }, + { + $ref: "#/components/schemas/SubQuery", + }, + ], + discriminator: { + propertyName: "filter", + mapping: { + annotation: "#/components/schemas/AnnotationFilter", + assignment: "#/components/schemas/AssignmentFilter", + field: "#/components/schemas/FieldFilter", + field_mul: "#/components/schemas/FieldFilters", + import: "#/components/schemas/ImportFilter", + label_bool: "#/components/schemas/LabelFilterBool", + label_int: "#/components/schemas/LabelFilterInt", + label_multi: "#/components/schemas/LabelFilterMulti", + meta_bool: "#/components/schemas/MetaFilterBool", + meta_int: "#/components/schemas/MetaFilterInt", + meta_str: "#/components/schemas/MetaFilterStr", + sub: "#/components/schemas/SubQuery", + }, + }, + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Or ", + }, + not_: { + anyOf: [ + { + oneOf: [ + { + $ref: "#/components/schemas/FieldFilter", + }, + { + $ref: "#/components/schemas/FieldFilters", + }, + { + $ref: "#/components/schemas/LabelFilterMulti", + }, + { + $ref: "#/components/schemas/LabelFilterBool", + }, + { + $ref: "#/components/schemas/LabelFilterInt", + }, + { + $ref: "#/components/schemas/AssignmentFilter", + }, + { + $ref: "#/components/schemas/AnnotationFilter", + }, + { + $ref: "#/components/schemas/ImportFilter", + }, + { + $ref: "#/components/schemas/MetaFilterBool", + }, + { + $ref: "#/components/schemas/MetaFilterInt", + }, + { + $ref: "#/components/schemas/MetaFilterStr", + }, + { + $ref: "#/components/schemas/SubQuery", + }, + ], + discriminator: { + propertyName: "filter", + mapping: { + annotation: "#/components/schemas/AnnotationFilter", + assignment: "#/components/schemas/AssignmentFilter", + field: "#/components/schemas/FieldFilter", + field_mul: "#/components/schemas/FieldFilters", + import: "#/components/schemas/ImportFilter", + label_bool: "#/components/schemas/LabelFilterBool", + label_int: "#/components/schemas/LabelFilterInt", + label_multi: "#/components/schemas/LabelFilterMulti", + meta_bool: "#/components/schemas/MetaFilterBool", + meta_int: "#/components/schemas/MetaFilterInt", + meta_str: "#/components/schemas/MetaFilterStr", + sub: "#/components/schemas/SubQuery", + }, + }, + }, + { + type: "null", + }, + ], + title: "Not ", + }, + }, + type: "object", + title: "SubQuery", +} as const; + +export const $TaskModel = { + properties: { + task_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Task Id", + }, + function_name: { + type: "string", + title: "Function Name", + }, + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "User Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + celery_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Celery Id", + }, + comment: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Comment", + }, + params: { + anyOf: [ + { + type: "object", + }, + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Params", + }, + fingerprint: { + type: "string", + title: "Fingerprint", + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_started: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Started", + }, + time_finished: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Finished", + }, + rec_expunge: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Rec Expunge", + }, + status: { + allOf: [ + { + $ref: "#/components/schemas/TaskStatus", + }, + ], + default: "PENDING", + }, + }, + type: "object", + required: ["function_name", "fingerprint"], + title: "TaskModel", +} as const; + +export const $TaskStatus = { + type: "string", + enum: ["PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED"], + title: "TaskStatus", +} as const; + +export const $TermStats = { + properties: { + term: { + type: "string", + title: "Term", + }, + df: { + type: "integer", + title: "Df", + }, + ttf: { + type: "integer", + title: "Ttf", + }, + }, + type: "object", + required: ["term", "df", "ttf"], + title: "TermStats", +} as const; + +export const $TwitterItemModel = { + properties: { + item_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Item Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Id", + }, + type: { + allOf: [ + { + $ref: "#/components/schemas/ItemType", + }, + ], + default: "twitter", + }, + text: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Text", + }, + twitter_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Twitter Id", + }, + twitter_author_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Twitter Author Id", + }, + created_at: { + type: "string", + format: "date-time", + title: "Created At", + }, + language: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Language", + }, + conversation_id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Conversation Id", + }, + referenced_tweets: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/ReferencedTweet", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Referenced Tweets", + }, + latitude: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Latitude", + }, + longitude: { + anyOf: [ + { + type: "number", + }, + { + type: "null", + }, + ], + title: "Longitude", + }, + hashtags: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/Hashtag", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Hashtags", + }, + mentions: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/Mention", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Mentions", + }, + urls: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/URL", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Urls", + }, + cashtags: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/Cashtag", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Cashtags", + }, + context_annotations: { + anyOf: [ + { + items: { + $ref: "#/components/schemas/ContextAnnotation", + }, + type: "array", + }, + { + type: "null", + }, + ], + title: "Context Annotations", + }, + retweet_count: { + type: "integer", + title: "Retweet Count", + }, + reply_count: { + type: "integer", + title: "Reply Count", + }, + like_count: { + type: "integer", + title: "Like Count", + }, + quote_count: { + type: "integer", + title: "Quote Count", + }, + user: { + anyOf: [ + { + $ref: "#/components/schemas/TwitterUserModel", + }, + { + type: "null", + }, + ], + }, + }, + type: "object", + required: ["created_at", "retweet_count", "reply_count", "like_count", "quote_count"], + title: "TwitterItemModel", + description: `Corresponds to db.models.items.TwitterItem + +For more in-depth documentation, please refer to: +https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet`, +} as const; + +export const $TwitterUserModel = { + properties: { + id: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Id", + }, + created_at: { + type: "string", + format: "date-time", + title: "Created At", + }, + name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Name", + }, + username: { + type: "string", + title: "Username", + }, + verified: { + type: "boolean", + title: "Verified", + }, + description: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Description", + }, + location: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Location", + }, + followers_count: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Followers Count", + }, + following_count: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Following Count", + }, + tweet_count: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Tweet Count", + }, + listed_count: { + anyOf: [ + { + type: "integer", + }, + { + type: "null", + }, + ], + title: "Listed Count", + }, + }, + type: "object", + required: ["created_at", "username", "verified"], + title: "TwitterUserModel", + description: `Flattened and reduced representation of a Twitter User Object +https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user + +NOTE: + - In the context of a \`TwitterItemModel\`, the \`id\` is not set as it can be inferred from \`twitter_author_id\` + - \`name\` is None if \`name\` == \`username\` to save space`, +} as const; + +export const $URL = { + properties: { + start: { + type: "integer", + title: "Start", + }, + end: { + type: "integer", + title: "End", + }, + url: { + type: "string", + title: "Url", + }, + url_expanded: { + type: "string", + title: "Url Expanded", + }, + }, + type: "object", + required: ["start", "end", "url", "url_expanded"], + title: "URL", +} as const; + +export const $UserBaseModel = { + properties: { + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "User Id", + }, + username: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Username", + }, + full_name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Full Name", + }, + email: { + anyOf: [ + { + type: "string", + format: "email", + }, + { + type: "null", + }, + ], + title: "Email", + }, + affiliation: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Affiliation", + }, + is_superuser: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Superuser", + default: false, + }, + is_active: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Active", + default: true, + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + }, + type: "object", + title: "UserBaseModel", + description: `User represents a person. +Most entries in the database will be (indirectly) linked to user accounts, so this is +at the core of access management and ownership.`, +} as const; + +export const $UserInDBModel = { + properties: { + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "User Id", + }, + username: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Username", + }, + full_name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Full Name", + }, + email: { + anyOf: [ + { + type: "string", + format: "email", + }, + { + type: "null", + }, + ], + title: "Email", + }, + affiliation: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Affiliation", + }, + is_superuser: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Superuser", + default: false, + }, + is_active: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Active", + default: true, + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + password: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Password", + }, + }, + type: "object", + title: "UserInDBModel", +} as const; + +export const $UserModel = { + properties: { + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "User Id", + }, + username: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Username", + }, + full_name: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Full Name", + }, + email: { + anyOf: [ + { + type: "string", + format: "email", + }, + { + type: "null", + }, + ], + title: "Email", + }, + affiliation: { + anyOf: [ + { + type: "string", + }, + { + type: "null", + }, + ], + title: "Affiliation", + }, + is_superuser: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Superuser", + default: false, + }, + is_active: { + anyOf: [ + { + type: "boolean", + }, + { + type: "null", + }, + ], + title: "Is Active", + default: true, + }, + time_created: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Created", + }, + time_updated: { + anyOf: [ + { + type: "string", + format: "date-time", + }, + { + type: "null", + }, + ], + title: "Time Updated", + }, + }, + type: "object", + title: "UserModel", +} as const; + +export const $UserPermission = { + properties: { + project_permission_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + { + type: "null", + }, + ], + title: "Project Permission Id", + }, + project_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "Project Id", + }, + user_id: { + anyOf: [ + { + type: "string", + }, + { + type: "string", + format: "uuid", + }, + ], + title: "User Id", + }, + owner: { + type: "boolean", + title: "Owner", + default: false, + }, + dataset_read: { + type: "boolean", + title: "Dataset Read", + default: false, + }, + dataset_edit: { + type: "boolean", + title: "Dataset Edit", + default: false, + }, + imports_read: { + type: "boolean", + title: "Imports Read", + default: false, + }, + imports_edit: { + type: "boolean", + title: "Imports Edit", + default: false, + }, + annotations_read: { + type: "boolean", + title: "Annotations Read", + default: false, + }, + annotations_edit: { + type: "boolean", + title: "Annotations Edit", + default: false, + }, + pipelines_read: { + type: "boolean", + title: "Pipelines Read", + default: false, + }, + pipelines_edit: { + type: "boolean", + title: "Pipelines Edit", + default: false, + }, + artefacts_read: { + type: "boolean", + title: "Artefacts Read", + default: false, + }, + artefacts_edit: { + type: "boolean", + title: "Artefacts Edit", + default: false, + }, + search_dimensions: { + type: "boolean", + title: "Search Dimensions", + default: false, + }, + search_oa: { + type: "boolean", + title: "Search Oa", + default: false, + }, + import_limit_oa: { + type: "integer", + title: "Import Limit Oa", + default: 0, + }, + user: { + $ref: "#/components/schemas/UserBaseModel", + }, + }, + type: "object", + required: ["project_id", "user_id", "user"], + title: "UserPermission", +} as const; + +export const $UserProjectAssignmentScope = { + properties: { + scope: { + $ref: "#/components/schemas/AssignmentScopeModel", + }, + scheme_name: { + type: "string", + title: "Scheme Name", + }, + scheme_description: { + type: "string", + title: "Scheme Description", + }, + num_assignments: { + type: "integer", + title: "Num Assignments", + }, + num_open: { + type: "integer", + title: "Num Open", + }, + num_partial: { + type: "integer", + title: "Num Partial", + }, + num_completed: { + type: "integer", + title: "Num Completed", + }, + }, + type: "object", + required: [ + "scope", + "scheme_name", + "scheme_description", + "num_assignments", + "num_open", + "num_partial", + "num_completed", + ], + title: "UserProjectAssignmentScope", +} as const; + +export const $UsersFilter = { + properties: { + user_ids: { + items: { + type: "string", + }, + type: "array", + title: "User Ids", + }, + mode: { + type: "string", + enum: ["ALL", "ANY"], + title: "Mode", + }, + }, + type: "object", + required: ["user_ids", "mode"], + title: "UsersFilter", +} as const; + +export const $ValidationError = { + properties: { + loc: { + items: { + anyOf: [ + { + type: "string", + }, + { + type: "integer", + }, + ], + }, + type: "array", + title: "Location", + }, + msg: { + type: "string", + title: "Message", + }, + type: { + type: "string", + title: "Error Type", + }, + }, + type: "object", + required: ["loc", "msg", "type"], + title: "ValidationError", +} as const; + +export const $WoSImport = { + properties: { + sources: { + items: { + type: "string", + format: "path", + }, + type: "array", + title: "Sources", + }, + kind: { + const: "wos", + title: "Kind", + default: "wos", + }, + }, + type: "object", + required: ["sources"], + title: "WoSImport", +} as const; diff --git a/src/plugins/api/spec/services.gen.ts b/src/plugins/api/spec/services.gen.ts new file mode 100644 index 0000000000000000000000000000000000000000..f37d3019f889a1afdd2fe63c611a2f07fafd4c55 --- /dev/null +++ b/src/plugins/api/spec/services.gen.ts @@ -0,0 +1,2107 @@ +// This file is auto-generated by @hey-api/openapi-ts +/* eslint-disable @typescript-eslint/no-unused-vars */ + +import type { CancelablePromise } from "./core/CancelablePromise"; +import type { ApiResult } from "./core/ApiResult"; +import { OpenAPI } from "./core/OpenAPI"; +import { request as __request } from "./core/request"; +import type { AxiosRequestConfig } from "axios"; +import type { $OpenApiTs } from "./types.gen"; + +export class DefaultService { + public static pongApiPingGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/ping/"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/ping/", + customRequestConfig: options, + }); + } + + public static errApiPingErrorGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/ping/error"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/ping/error", + customRequestConfig: options, + }); + } + + public static warnApiPingWarnGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/ping/warn"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/ping/warn", + customRequestConfig: options, + }); + } + + public static permApiPingPermissionGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/ping/permission"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/ping/permission", + customRequestConfig: options, + }); + } + + public static pingApiPingNamePost( + data: $OpenApiTs["/api/ping/{name}"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/ping/{name}"]["post"]["res"][200]>> { + const { name } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/ping/{name}", + path: { + name, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class AnnotationsService { + public static getSchemeDefinitionApiAnnotationsSchemesDefinitionAnnotationSchemeIdGet( + data: $OpenApiTs["/api/annotations/schemes/definition/{annotation_scheme_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/schemes/definition/{annotation_scheme_id}"]["get"]["res"][200]> + > { + const { annotationSchemeId, xProjectId, flat } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/schemes/definition/{annotation_scheme_id}", + path: { + annotation_scheme_id: annotationSchemeId, + }, + headers: { + "x-project-id": xProjectId, + }, + query: { + flat, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static putAnnotationSchemeApiAnnotationsSchemesDefinitionPut( + data: $OpenApiTs["/api/annotations/schemes/definition/"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/schemes/definition/"]["put"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/annotations/schemes/definition/", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static removeAnnotationSchemeApiAnnotationsSchemesDefinitionSchemeIdDelete( + data: $OpenApiTs["/api/annotations/schemes/definition/{scheme_id}"]["delete"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/schemes/definition/{scheme_id}"]["delete"]["res"][200]>> { + const { annotationSchemeId, xProjectId } = data; + return __request(OpenAPI, { + method: "DELETE", + url: "/api/annotations/schemes/definition/{scheme_id}", + headers: { + "x-project-id": xProjectId, + }, + query: { + annotation_scheme_id: annotationSchemeId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getSchemeDefinitionsForProjectApiAnnotationsSchemesListProjectIdGet( + data: $OpenApiTs["/api/annotations/schemes/list/{project_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/schemes/list/{project_id}"]["get"]["res"][200]>> { + const { projectId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/schemes/list/{project_id}", + path: { + project_id: projectId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getNextAssignmentForScopeForUserApiAnnotationsAnnotateNextAssignmentScopeIdCurrentAssignmentIdGet( + data: $OpenApiTs["/api/annotations/annotate/next/{assignment_scope_id}/{current_assignment_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult< + $OpenApiTs["/api/annotations/annotate/next/{assignment_scope_id}/{current_assignment_id}"]["get"]["res"][200] + > + > { + const { assignmentScopeId, currentAssignmentId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/next/{assignment_scope_id}/{current_assignment_id}", + path: { + assignment_scope_id: assignmentScopeId, + current_assignment_id: currentAssignmentId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getNextOpenAssignmentForScopeForUserApiAnnotationsAnnotateNextAssignmentScopeIdGet( + data: $OpenApiTs["/api/annotations/annotate/next/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/next/{assignment_scope_id}"]["get"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/next/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentApiAnnotationsAnnotateAssignmentAssignmentIdGet( + data: $OpenApiTs["/api/annotations/annotate/assignment/{assignment_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/assignment/{assignment_id}"]["get"]["res"][200]> + > { + const { assignmentId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/assignment/{assignment_id}", + path: { + assignment_id: assignmentId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentScopesForUserApiAnnotationsAnnotateScopesProjectIdGet( + data: $OpenApiTs["/api/annotations/annotate/scopes/{project_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/annotate/scopes/{project_id}"]["get"]["res"][200]>> { + const { projectId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/scopes/{project_id}", + path: { + project_id: projectId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentScopesForProjectApiAnnotationsAnnotateScopesGet( + data: $OpenApiTs["/api/annotations/annotate/scopes/"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/annotate/scopes/"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/scopes/", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdGet( + data: $OpenApiTs["/api/annotations/annotate/scope/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/scope/{assignment_scope_id}"]["get"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/scope/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static removeAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdDelete( + data: $OpenApiTs["/api/annotations/annotate/scope/{assignment_scope_id}"]["delete"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/scope/{assignment_scope_id}"]["delete"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "DELETE", + url: "/api/annotations/annotate/scope/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static putAssignmentScopeApiAnnotationsAnnotateScopePut( + data: $OpenApiTs["/api/annotations/annotate/scope/"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/annotate/scope/"]["put"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/annotations/annotate/scope/", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getNumAssignmentsForScopeApiAnnotationsAnnotateScopeCountsAssignmentScopeIdGet( + data: $OpenApiTs["/api/annotations/annotate/scope/counts/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/scope/counts/{assignment_scope_id}"]["get"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/scope/counts/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentsApiAnnotationsAnnotateAssignmentsAssignmentScopeIdGet( + data: $OpenApiTs["/api/annotations/annotate/assignments/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/assignments/{assignment_scope_id}"]["get"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/assignments/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentIndicatorsForScopeApiAnnotationsAnnotateAssignmentProgressAssignmentScopeIdGet( + data: $OpenApiTs["/api/annotations/annotate/assignment/progress/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/assignment/progress/{assignment_scope_id}"]["get"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/assignment/progress/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentsForScopeApiAnnotationsAnnotateAssignmentsScopeAssignmentScopeIdGet( + data: $OpenApiTs["/api/annotations/annotate/assignments/scope/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/assignments/scope/{assignment_scope_id}"]["get"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/assignments/scope/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAnnotationsApiAnnotationsAnnotateAnnotationsAssignmentScopeIdGet( + data: $OpenApiTs["/api/annotations/annotate/annotations/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/annotate/annotations/{assignment_scope_id}"]["get"]["res"][200]> + > { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/annotate/annotations/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static saveAnnotationApiAnnotationsAnnotateSavePost( + data: $OpenApiTs["/api/annotations/annotate/save"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/annotate/save"]["post"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/annotations/annotate/save", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getItemsWithCountApiAnnotationsConfigItemsGet( + data: $OpenApiTs["/api/annotations/config/items/"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/items/"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/config/items/", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static makeAssignmentsApiAnnotationsConfigAssignmentsPost( + data: $OpenApiTs["/api/annotations/config/assignments/"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/assignments/"]["post"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/annotations/config/assignments/", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAssignmentScopesForSchemeApiAnnotationsConfigScopesSchemeIdGet( + data: $OpenApiTs["/api/annotations/config/scopes/{scheme_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/scopes/{scheme_id}"]["get"]["res"][200]>> { + const { schemeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/config/scopes/{scheme_id}", + path: { + scheme_id: schemeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAnnotatorsForSchemeApiAnnotationsConfigAnnotatorsSchemeIdGet( + data: $OpenApiTs["/api/annotations/config/annotators/{scheme_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/annotators/{scheme_id}"]["get"]["res"][200]>> { + const { schemeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/config/annotators/{scheme_id}", + path: { + scheme_id: schemeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getResolvedAnnotationsApiAnnotationsConfigResolvePost( + data: $OpenApiTs["/api/annotations/config/resolve"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/resolve"]["post"]["res"][200]>> { + const { + xProjectId, + requestBody, + assignmentScopeId, + botAnnotationMetadatId, + includeEmpty, + includeNew, + updateExisting, + } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/annotations/config/resolve", + headers: { + "x-project-id": xProjectId, + }, + query: { + assignment_scope_id: assignmentScopeId, + bot_annotation_metadat_id: botAnnotationMetadatId, + include_empty: includeEmpty, + include_new: includeNew, + update_existing: updateExisting, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getSavedResolvedAnnotationsApiAnnotationsConfigResolvedBotAnnotationMetadataIdGet( + data: $OpenApiTs["/api/annotations/config/resolved/{bot_annotation_metadata_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/config/resolved/{bot_annotation_metadata_id}"]["get"]["res"][200]> + > { + const { botAnnotationMetadataId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/config/resolved/{bot_annotation_metadata_id}", + path: { + bot_annotation_metadata_id: botAnnotationMetadataId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static saveResolvedAnnotationsApiAnnotationsConfigResolvePut( + data: $OpenApiTs["/api/annotations/config/resolve/"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/resolve/"]["put"]["res"][200]>> { + const { name, assignmentScopeId, annotationSchemeId, xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/annotations/config/resolve/", + headers: { + "x-project-id": xProjectId, + }, + query: { + name, + assignment_scope_id: assignmentScopeId, + annotation_scheme_id: annotationSchemeId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static updateResolvedAnnotationsApiAnnotationsConfigResolveUpdatePut( + data: $OpenApiTs["/api/annotations/config/resolve/update"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/resolve/update"]["put"]["res"][200]>> { + const { botAnnotationMetadataId, name, xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/annotations/config/resolve/update", + headers: { + "x-project-id": xProjectId, + }, + query: { + bot_annotation_metadata_id: botAnnotationMetadataId, + name, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static listSavedResolvedAnnotationsApiAnnotationsConfigResolvedListGet( + data: $OpenApiTs["/api/annotations/config/resolved-list/"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/config/resolved-list/"]["get"]["res"][200]>> { + const { xProjectId, annotationSchemeId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/config/resolved-list/", + headers: { + "x-project-id": xProjectId, + }, + query: { + annotation_scheme_id: annotationSchemeId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static deleteSavedResolvedAnnotationsApiAnnotationsConfigResolvedBotAnnotationMetaIdDelete( + data: $OpenApiTs["/api/annotations/config/resolved/{bot_annotation_meta_id}"]["delete"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/annotations/config/resolved/{bot_annotation_meta_id}"]["delete"]["res"][200]> + > { + const { botAnnotationMetadataId, xProjectId } = data; + return __request(OpenAPI, { + method: "DELETE", + url: "/api/annotations/config/resolved/{bot_annotation_meta_id}", + headers: { + "x-project-id": xProjectId, + }, + query: { + bot_annotation_metadata_id: botAnnotationMetadataId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getBotAnnotationsApiAnnotationsBotAnnotationsGet( + data: $OpenApiTs["/api/annotations/bot/annotations"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/annotations/bot/annotations"]["get"]["res"][200]>> { + const { xProjectId, includeResolve } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/annotations/bot/annotations", + headers: { + "x-project-id": xProjectId, + }, + query: { + include_resolve: includeResolve, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class UsersService { + public static getAllUsersApiUsersListAllGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/list/all"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/users/list/all", + customRequestConfig: options, + }); + } + + public static getAllUsersDehydratedApiUsersListAllDehydratedGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/list/all/dehydrated"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/users/list/all/dehydrated", + customRequestConfig: options, + }); + } + + public static getProjectAnnotatorUsersApiUsersListProjectAnnotatorsProjectIdGet( + data: $OpenApiTs["/api/users/list/project/annotators/{project_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/list/project/annotators/{project_id}"]["get"]["res"][200]>> { + const { projectId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/users/list/project/annotators/{project_id}", + path: { + project_id: projectId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getProjectUsersApiUsersListProjectProjectIdGet( + data: $OpenApiTs["/api/users/list/project/{project_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/list/project/{project_id}"]["get"]["res"][200]>> { + const { projectId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/users/list/project/{project_id}", + path: { + project_id: projectId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getUserByIdApiUsersDetailsUserIdGet( + data: $OpenApiTs["/api/users/details/{user_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/details/{user_id}"]["get"]["res"][200]>> { + const { userId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/users/details/{user_id}", + path: { + user_id: userId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getUsersByIdsApiUsersDetailsGet( + data: $OpenApiTs["/api/users/details"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/details"]["get"]["res"][200]>> { + const { userId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/users/details", + headers: { + "x-project-id": xProjectId, + }, + query: { + user_id: userId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static saveUserApiUsersDetailsPut( + data: $OpenApiTs["/api/users/details"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/details"]["put"]["res"][200]>> { + const { requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/users/details", + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static saveUserSelfApiUsersMyDetailsPut( + data: $OpenApiTs["/api/users/my-details"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/users/my-details"]["put"]["res"][200]>> { + const { requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/users/my-details", + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class OauthService { + public static loginForAccessTokenApiLoginTokenPost( + data: $OpenApiTs["/api/login/token"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/login/token"]["post"]["res"][200]>> { + const { formData } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/login/token", + formData, + mediaType: "application/x-www-form-urlencoded", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static refreshTokenApiLoginTokenTokenIdPut( + data: $OpenApiTs["/api/login/token/{token_id}"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/login/token/{token_id}"]["put"]["res"][200]>> { + const { tokenId } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/login/token/{token_id}", + path: { + token_id: tokenId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static revokeTokenApiLoginTokenTokenIdDelete( + data: $OpenApiTs["/api/login/token/{token_id}"]["delete"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/login/token/{token_id}"]["delete"]["res"][200]>> { + const { tokenId } = data; + return __request(OpenAPI, { + method: "DELETE", + url: "/api/login/token/{token_id}", + path: { + token_id: tokenId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static readTokensMeApiLoginMyTokensGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/login/my-tokens"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/login/my-tokens", + customRequestConfig: options, + }); + } + + public static readUsersMeApiLoginMeGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/login/me"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/login/me", + customRequestConfig: options, + }); + } + + public static logoutApiLoginLogoutGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/login/logout"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/login/logout", + customRequestConfig: options, + }); + } +} + +export class ProjectsService { + public static getAllProjectsApiProjectsListGet( + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/projects/list"]["get"]["res"][200]>> { + return __request(OpenAPI, { + method: "GET", + url: "/api/projects/list", + customRequestConfig: options, + }); + } + + public static createProjectApiProjectsCreatePut( + data: $OpenApiTs["/api/projects/create"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/projects/create"]["put"]["res"][200]>> { + const { requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/projects/create", + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class ProjectService { + public static getProjectApiProjectInfoGet( + data: $OpenApiTs["/api/project/info"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/info"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/info", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static saveProjectApiProjectInfoPut( + data: $OpenApiTs["/api/project/info"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/info"]["put"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/project/info", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getProjectPermissionsCurrentUserApiProjectPermissionsMeGet( + data: $OpenApiTs["/api/project/permissions/me"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/permissions/me"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/permissions/me", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAllProjectPermissionsApiProjectPermissionsListProjectIdGet( + data: $OpenApiTs["/api/project/permissions/list/{project_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/permissions/list/{project_id}"]["get"]["res"][200]>> { + const { projectId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/permissions/list/{project_id}", + path: { + project_id: projectId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAllUserPermissionsApiProjectPermissionsListUsersGet( + data: $OpenApiTs["/api/project/permissions/list-users"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/permissions/list-users"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/permissions/list-users", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static saveProjectPermissionApiProjectPermissionsPermissionPut( + data: $OpenApiTs["/api/project/permissions/permission"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/permissions/permission"]["put"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/project/permissions/permission", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static removeProjectPermissionApiProjectPermissionsPermissionDelete( + data: $OpenApiTs["/api/project/permissions/permission"]["delete"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/permissions/permission"]["delete"]["res"][200]>> { + const { projectPermissionId, xProjectId } = data; + return __request(OpenAPI, { + method: "DELETE", + url: "/api/project/permissions/permission", + headers: { + "x-project-id": xProjectId, + }, + query: { + project_permission_id: projectPermissionId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getProjectPermissionsByIdApiProjectPermissionsProjectPermissionIdGet( + data: $OpenApiTs["/api/project/permissions/{project_permission_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/permissions/{project_permission_id}"]["get"]["res"][200]>> { + const { projectPermissionId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/permissions/{project_permission_id}", + path: { + project_permission_id: projectPermissionId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static listProjectDataApiProjectItemsItemTypeListGet( + data: $OpenApiTs["/api/project/items/{item_type}/list"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/items/{item_type}/list"]["get"]["res"][200]>> { + const { itemType, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/items/{item_type}/list", + path: { + item_type: itemType, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static listProjectDataPagedApiProjectItemsItemTypeListPagePageSizeGet( + data: $OpenApiTs["/api/project/items/{item_type}/list/{page}/{page_size}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise< + ApiResult<$OpenApiTs["/api/project/items/{item_type}/list/{page}/{page_size}"]["get"]["res"][200]> + > { + const { itemType, page, pageSize, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/items/{item_type}/list/{page}/{page_size}", + path: { + item_type: itemType, + page, + page_size: pageSize, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getDetailForItemApiProjectItemsDetailItemIdGet( + data: $OpenApiTs["/api/project/items/detail/{item_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/items/detail/{item_id}"]["get"]["res"][200]>> { + const { itemId, xProjectId, itemType } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/items/detail/{item_id}", + path: { + item_id: itemId, + }, + headers: { + "x-project-id": xProjectId, + }, + query: { + item_type: itemType, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getTextForItemApiProjectItemsTextItemIdGet( + data: $OpenApiTs["/api/project/items/text/{item_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/items/text/{item_id}"]["get"]["res"][200]>> { + const { itemId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/items/text/{item_id}", + path: { + item_id: itemId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static countProjectItemsApiProjectItemsCountGet( + data: $OpenApiTs["/api/project/items/count"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/items/count"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/project/items/count", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static addTweetApiProjectItemsTwitterAddPost( + data: $OpenApiTs["/api/project/items/twitter/add"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/project/items/twitter/add"]["post"]["res"][200]>> { + const { xProjectId, requestBody, importId } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/project/items/twitter/add", + headers: { + "x-project-id": xProjectId, + }, + query: { + import_id: importId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class ImportsService { + public static getAllImportsForProjectApiImportsListGet( + data: $OpenApiTs["/api/imports/list"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/imports/list"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/imports/list", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getImportDetailsApiImportsImportImportIdGet( + data: $OpenApiTs["/api/imports/import/{import_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/imports/import/{import_id}"]["get"]["res"][200]>> { + const { importId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/imports/import/{import_id}", + path: { + import_id: importId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static triggerImportApiImportsImportImportIdPost( + data: $OpenApiTs["/api/imports/import/{import_id}"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/imports/import/{import_id}"]["post"]["res"][200]>> { + const { importId, xProjectId } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/imports/import/{import_id}", + path: { + import_id: importId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getImportCountsApiImportsImportImportIdCountGet( + data: $OpenApiTs["/api/imports/import/{import_id}/count/"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/imports/import/{import_id}/count/"]["get"]["res"][200]>> { + const { importId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/imports/import/{import_id}/count/", + path: { + import_id: importId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static putImportDetailsApiImportsImportPut( + data: $OpenApiTs["/api/imports/import"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/imports/import"]["put"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/imports/import", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static deleteImportDetailsApiImportsImportDeleteImportIdDelete( + data: $OpenApiTs["/api/imports/import/delete/{import_id}"]["delete"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/imports/import/delete/{import_id}"]["delete"]["res"][200]>> { + const { importId, xProjectId } = data; + return __request(OpenAPI, { + method: "DELETE", + url: "/api/imports/import/delete/{import_id}", + path: { + import_id: importId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class EventsService { + public static emitApiEventsEmitPost( + data: $OpenApiTs["/api/events/emit"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/events/emit"]["post"]["res"][200]>> { + const { requestBody } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/events/emit", + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class HighlightersService { + public static getScopeHighlightersApiHighlightersScopeAssignmentScopeIdGet( + data: $OpenApiTs["/api/highlighters/scope/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/highlighters/scope/{assignment_scope_id}"]["get"]["res"][200]>> { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/highlighters/scope/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getProjectHighlightersApiHighlightersProjectGet( + data: $OpenApiTs["/api/highlighters/project"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/highlighters/project"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/highlighters/project", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static upsertHighlighterApiHighlightersProjectPut( + data: $OpenApiTs["/api/highlighters/project"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/highlighters/project"]["put"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/highlighters/project", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getHighlighterApiHighlightersHighlighterIdGet( + data: $OpenApiTs["/api/highlighters/{highlighter_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/highlighters/{highlighter_id}"]["get"]["res"][200]>> { + const { highlighterId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/highlighters/{highlighter_id}", + path: { + highlighter_id: highlighterId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class StatsService { + public static getBasicStatsApiStatsBasicsGet( + data: $OpenApiTs["/api/stats/basics"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/stats/basics"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/stats/basics", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getAnnotatorRankingApiStatsRankGet( + data: $OpenApiTs["/api/stats/rank"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/stats/rank"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/stats/rank", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getPublicationYearHistogramApiStatsHistogramYearsGet( + data: $OpenApiTs["/api/stats/histogram/years"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/stats/histogram/years"]["get"]["res"][200]>> { + const { xProjectId, fromYear, toYear } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/stats/histogram/years", + headers: { + "x-project-id": xProjectId, + }, + query: { + from_year: fromYear, + to_year: toYear, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class ExportService { + public static getAnnotationsCsvApiExportAnnotationsCsvPost( + data: $OpenApiTs["/api/export/annotations/csv"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/export/annotations/csv"]["post"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/export/annotations/csv", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getExportBaseinfoApiExportProjectBaseinfoGet( + data: $OpenApiTs["/api/export/project/baseinfo"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/export/project/baseinfo"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/export/project/baseinfo", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class SearchService { + public static searchOpenalexApiSearchOpenalexSelectPost( + data: $OpenApiTs["/api/search/openalex/select"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/search/openalex/select"]["post"]["res"][200]>> { + const { query, xProjectId, limit, offset, defType, field, histogram, op, histogramFrom, histogramTo } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/search/openalex/select", + headers: { + "x-project-id": xProjectId, + }, + query: { + query, + limit, + offset, + def_type: defType, + field, + histogram, + op, + histogram_from: histogramFrom, + histogram_to: histogramTo, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static termExpansionApiSearchOpenalexTermsGet( + data: $OpenApiTs["/api/search/openalex/terms"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/search/openalex/terms"]["get"]["res"][200]>> { + const { termPrefix, xProjectId, limit } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/search/openalex/terms", + headers: { + "x-project-id": xProjectId, + }, + query: { + term_prefix: termPrefix, + limit, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static nqlQueryApiSearchNqlQueryPost( + data: $OpenApiTs["/api/search/nql/query"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/search/nql/query"]["post"]["res"][200]>> { + const { xProjectId, requestBody, page, limit } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/search/nql/query", + headers: { + "x-project-id": xProjectId, + }, + query: { + page, + limit, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static nqlQueryCountApiSearchNqlCountPost( + data: $OpenApiTs["/api/search/nql/count"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/search/nql/count"]["post"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/search/nql/count", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class EvaluationService { + public static getProjectScopesApiEvalTrackingScopesGet( + data: $OpenApiTs["/api/eval/tracking/scopes"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/tracking/scopes"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/eval/tracking/scopes", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getResolutionsForScopeApiEvalResolutionsGet( + data: $OpenApiTs["/api/eval/resolutions"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/resolutions"]["get"]["res"][200]>> { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/eval/resolutions", + headers: { + "x-project-id": xProjectId, + }, + query: { + assignment_scope_id: assignmentScopeId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getProjectTrackersApiEvalTrackingTrackersGet( + data: $OpenApiTs["/api/eval/tracking/trackers"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/tracking/trackers"]["get"]["res"][200]>> { + const { xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/eval/tracking/trackers", + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getTrackerApiEvalTrackingTrackerTrackerIdGet( + data: $OpenApiTs["/api/eval/tracking/tracker/{tracker_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/tracking/tracker/{tracker_id}"]["get"]["res"][200]>> { + const { trackerId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/eval/tracking/tracker/{tracker_id}", + path: { + tracker_id: trackerId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static saveTrackerApiEvalTrackingTrackerPut( + data: $OpenApiTs["/api/eval/tracking/tracker"]["put"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/tracking/tracker"]["put"]["res"][200]>> { + const { xProjectId, requestBody } = data; + return __request(OpenAPI, { + method: "PUT", + url: "/api/eval/tracking/tracker", + headers: { + "x-project-id": xProjectId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static updateTrackerApiEvalTrackingRefreshPost( + data: $OpenApiTs["/api/eval/tracking/refresh"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/tracking/refresh"]["post"]["res"][200]>> { + const { trackerId, xProjectId, batchSize, reset } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/eval/tracking/refresh", + headers: { + "x-project-id": xProjectId, + }, + query: { + tracker_id: trackerId, + batch_size: batchSize, + reset, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getIrrApiEvalQualityLoadAssignmentScopeIdGet( + data: $OpenApiTs["/api/eval/quality/load/{assignment_scope_id}"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/quality/load/{assignment_scope_id}"]["get"]["res"][200]>> { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/eval/quality/load/{assignment_scope_id}", + path: { + assignment_scope_id: assignmentScopeId, + }, + headers: { + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static recomputeIrrApiEvalQualityComputeGet( + data: $OpenApiTs["/api/eval/quality/compute"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/eval/quality/compute"]["get"]["res"][200]>> { + const { assignmentScopeId, xProjectId, botAnnotationMetadataId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/eval/quality/compute", + headers: { + "x-project-id": xProjectId, + }, + query: { + assignment_scope_id: assignmentScopeId, + bot_annotation_metadata_id: botAnnotationMetadataId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class MailingService { + public static resetPasswordApiMailResetPasswordUsernamePost( + data: $OpenApiTs["/api/mail/reset-password/{username}"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/mail/reset-password/{username}"]["post"]["res"][200]>> { + const { username } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/mail/reset-password/{username}", + path: { + username, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static welcomeMailApiMailWelcomePost( + data: $OpenApiTs["/api/mail/welcome"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/mail/welcome"]["post"]["res"][200]>> { + const { username, password } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/mail/welcome", + query: { + username, + password, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static remindUsersAssigmentApiMailAssignmentReminderPost( + data: $OpenApiTs["/api/mail/assignment-reminder"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/mail/assignment-reminder"]["post"]["res"][200]>> { + const { assignmentScopeId, xProjectId } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/mail/assignment-reminder", + headers: { + "x-project-id": xProjectId, + }, + query: { + assignment_scope_id: assignmentScopeId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} + +export class PipesService { + public static getArtefactsApiPipesArtefactsListGet( + data: $OpenApiTs["/api/pipes/artefacts/list"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/artefacts/list"]["get"]["res"][200]>> { + const { xTaskId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/pipes/artefacts/list", + headers: { + "x-task-id": xTaskId, + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getTaskLogApiPipesArtefactsLogGet( + data: $OpenApiTs["/api/pipes/artefacts/log"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/artefacts/log"]["get"]["res"][200]>> { + const { xTaskId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/pipes/artefacts/log", + headers: { + "x-task-id": xTaskId, + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getFileApiPipesArtefactsFileGet( + data: $OpenApiTs["/api/pipes/artefacts/file"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/artefacts/file"]["get"]["res"][200]>> { + const { filename, xTaskId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/pipes/artefacts/file", + headers: { + "x-task-id": xTaskId, + "x-project-id": xProjectId, + }, + query: { + filename, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getArchiveApiPipesArtefactsFilesGet( + data: $OpenApiTs["/api/pipes/artefacts/files"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/artefacts/files"]["get"]["res"][200]>> { + const { xTaskId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/pipes/artefacts/files", + headers: { + "x-task-id": xTaskId, + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static uploadFileApiPipesArtefactsFilesUploadPost( + data: $OpenApiTs["/api/pipes/artefacts/files/upload"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/artefacts/files/upload"]["post"]["res"][200]>> { + const { xProjectId, formData, folder } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/pipes/artefacts/files/upload", + headers: { + "x-project-id": xProjectId, + }, + query: { + folder, + }, + formData, + mediaType: "multipart/form-data", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static uploadFilesApiPipesArtefactsFilesUploadManyPost( + data: $OpenApiTs["/api/pipes/artefacts/files/upload-many"]["post"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/artefacts/files/upload-many"]["post"]["res"][200]>> { + const { xProjectId, formData, folder } = data; + return __request(OpenAPI, { + method: "POST", + url: "/api/pipes/artefacts/files/upload-many", + headers: { + "x-project-id": xProjectId, + }, + query: { + folder, + }, + formData, + mediaType: "multipart/form-data", + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static searchTasksApiPipesTasksGet( + data: $OpenApiTs["/api/pipes/tasks"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/tasks"]["get"]["res"][200]>> { + const { xProjectId, functionName, fingerprint, userId, location, status, orderByFields } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/pipes/tasks", + headers: { + "x-project-id": xProjectId, + }, + query: { + function_name: functionName, + fingerprint, + user_id: userId, + location, + status, + order_by_fields: orderByFields, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static getTaskApiPipesTaskGet( + data: $OpenApiTs["/api/pipes/task"]["get"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/task"]["get"]["res"][200]>> { + const { xTaskId, xProjectId } = data; + return __request(OpenAPI, { + method: "GET", + url: "/api/pipes/task", + headers: { + "x-task-id": xTaskId, + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } + + public static deleteTaskApiPipesTaskDelete( + data: $OpenApiTs["/api/pipes/task"]["delete"]["req"], + options?: Partial<AxiosRequestConfig>, + ): CancelablePromise<ApiResult<$OpenApiTs["/api/pipes/task"]["delete"]["res"][200]>> { + const { xTaskId, xProjectId } = data; + return __request(OpenAPI, { + method: "DELETE", + url: "/api/pipes/task", + headers: { + "x-task-id": xTaskId, + "x-project-id": xProjectId, + }, + errors: { + 422: "Validation Error", + }, + customRequestConfig: options, + }); + } +} diff --git a/src/plugins/api/spec/types.gen.ts b/src/plugins/api/spec/types.gen.ts new file mode 100644 index 0000000000000000000000000000000000000000..9cd1d729dabd9ff439938c88a93a7320e9dfff80 --- /dev/null +++ b/src/plugins/api/spec/types.gen.ts @@ -0,0 +1,3110 @@ +// This file is auto-generated by @hey-api/openapi-ts +/* eslint-disable @typescript-eslint/no-unused-vars */ + +export type AcademicAuthorModel = { + name: string; + surname_initials?: string | null; + email?: string | null; + orcid?: string | null; + scopus_id?: string | null; + openalex_id?: string | null; + s2_id?: string | null; + affiliations?: Array<AffiliationModel> | null; +}; + +export type AcademicItemImport = { + sources: Array<string>; + kind?: "academic"; +}; + +/** + * Corresponds to db.schema.items.academic.AcademicItem + */ +export type AcademicItemModel = { + item_id?: string | null; + project_id?: string | null; + type?: ItemType; + text?: string | null; + doi?: string | null; + wos_id?: string | null; + scopus_id?: string | null; + openalex_id?: string | null; + s2_id?: string | null; + pubmed_id?: string | null; + dimensions_id?: string | null; + title?: string | null; + title_slug?: string | null; + publication_year?: number | null; + source?: string | null; + keywords?: Array<string> | null; + authors?: Array<AcademicAuthorModel> | null; + meta?: { + [key: string]: unknown; + } | null; +}; + +export type AffiliationModel = { + name: string; + country?: string | null; + openalex_id?: string | null; + s2_id?: string | null; +}; + +export type AnnotatedItem = { + scheme: AnnotationSchemeModel; + assignment: AssignmentModel; +}; + +export type AnnotationFilter = { + filter?: "annotation"; + incl: boolean; + scopes?: Array<string> | null; + scheme?: string | null; +}; + +export type AnnotationItem = { + scheme: AnnotationSchemeModel; + assignment: AssignmentModel; + scope: AssignmentScopeModel; + item: TwitterItemModel | AcademicItemModel | LexisNexisItemModel | FullLexisNexisItemModel | GenericItemModel; +}; + +/** + * Corresponds to db.models.annotations.Annotation + * + * Annotation holds the judgement of a User for a specific Item in the context of an AnnotationScheme + * as a response to an Assignment. + * Once an Annotation exists, the Assignment should be considered (partially) resolved. + * + * Note, that AnnotationScheme, User, and Item would be implicit by the Assignment. + * However, for ease of use and in favour of fewer joins, this information is replicated here. + * + * The Annotation refers to an AnnotationSchemeLabel defined in an AnnotationScheme, which is referred to by its `key`. + * If the scheme allows the user to make repeated annotations for the same Label (`key`), + * an offset is defined in `repeat` (e.g. for primary technology is "natural tech", secondary is "forests"). + * + * Note, that there is no database constraints on the completeness of an Assignment/AnnotationScheme. + * The interface/backend code should be used to make sure, to either not allow partial fulfillment of an + * AnnotationScheme or not display an Assignment as complete. + */ +export type AnnotationModel = { + value_bool?: boolean | null; + value_int?: number | null; + value_float?: number | null; + value_str?: string | null; + multi_int?: Array<number> | null; + annotation_id?: string | null; + time_created?: string | null; + time_updated?: string | null; + assignment_id: string; + user_id: string; + item_id: string; + annotation_scheme_id: string; + snippet_id?: string | null; + key: string; + repeat?: number; + parent?: string | null; +}; + +/** + * Annotation Quality Trackers + * Computing annotator agreements is a little too expensive to do on the fly. Hence, we capture different + * quality metrics in this table; one row per assignment scope and label. + */ +export type AnnotationQualityModel = { + annotation_quality_id?: string | null; + project_id?: string | null; + assignment_scope_id?: string | null; + bot_annotation_metadata_id?: string | null; + user_base?: string | null; + annotations_base?: Array<Array<number> | null> | Array<boolean | null> | Array<number | null> | null; + user_target?: string | null; + annotations_target?: Array<boolean | null> | Array<number | null> | Array<Array<number> | null> | null; + label_key?: string | null; + label_value?: number | null; + cohen?: number | null; + fleiss?: number | null; + randolph?: number | null; + krippendorff?: number | null; + pearson?: number | null; + pearson_p?: number | null; + kendall?: number | null; + kendall_p?: number | null; + spearman?: number | null; + spearman_p?: number | null; + precision?: number | null; + recall?: number | null; + f1?: number | null; + multi_overlap_mean?: number | null; + multi_overlap_median?: number | null; + multi_overlap_std?: number | null; + num_items?: number | null; + num_overlap?: number | null; + num_agree?: number | null; + num_disagree?: number | null; + perc_agree?: number | null; + time_created?: string | null; + time_updated?: string | null; +}; + +export type AnnotationSchemeInfo = { + annotation_scheme_id?: string | null; + project_id?: string | null; + name: string; + description?: string | null; + inclusion_rule?: string | null; + time_created?: string | null; + time_updated?: string | null; +}; + +export type AnnotationSchemeLabel = { + name: string; + key: string; + hint?: string | null; + max_repeat?: number; + required?: boolean; + dropdown?: boolean; + kind?: "bool" | "str" | "float" | "int" | "single" | "multi" | "intext"; + choices?: Array<AnnotationSchemeLabelChoice> | null; + annotation?: AnnotationModel | null; +}; + +export type AnnotationSchemeLabelChoice = { + name: string; + hint?: string | null; + value: number; + children?: Array<AnnotationSchemeLabel> | null; +}; + +export type AnnotationSchemeLabelChoiceFlat = { + name: string; + hint?: string | null; + value: number; +}; + +/** + * Corresponds to db.models.annotations.AnnotationScheme + * + * AnnotationScheme defines the annotation scheme for a particular project. + * Each project may have multiple AnnotationSchemes, + * but projects cannot share the same scheme. In case they are technically the same, + * the user would have to create a new copy of that scheme for a different project. + * + * The actual annotation scheme is defined as a list of labels (see schemas.annotations.AnnotationSchemeLabel). + * The other fields pose as meta-data. + */ +export type AnnotationSchemeModel = { + annotation_scheme_id?: string | null; + project_id?: string | null; + name: string; + description?: string | null; + inclusion_rule?: string | null; + time_created?: string | null; + time_updated?: string | null; + labels: Array<AnnotationSchemeLabel>; +}; + +/** + * Same as AnnotationSchemeModel but with flattened structure. + */ +export type AnnotationSchemeModelFlat = { + annotation_scheme_id?: string | null; + project_id?: string | null; + name: string; + description?: string | null; + inclusion_rule?: string | null; + time_created?: string | null; + time_updated?: string | null; + labels: Array<FlattenedAnnotationSchemeLabel>; +}; + +/** + * Tracker for annotation statistics. + * This includes the latest stopping criterion (buscar) metrics and more. + * + * You may have more than one tracker per project, for example for keeping track of different progresses. + */ +export type AnnotationTrackerModel = { + annotation_tracking_id?: string | null; + name: string; + project_id: string; + inclusion_rule: string; + majority: boolean; + n_items_total: number; + recall_target: number; + source_ids?: Array<string> | null; + labels?: Array<Array<number>> | null; + recall?: Array<number | null> | null; + buscar?: Array<unknown[]> | null; + time_created?: string | null; + time_updated?: string | null; +}; + +export type AnnotationValue = { + value_bool?: boolean | null; + value_int?: number | null; + value_float?: number | null; + value_str?: string | null; + multi_int?: Array<number> | null; +}; + +export type AssignmentCounts = { + num_total: number; + num_open: number; + num_partial: number; + num_full: number; +}; + +export type AssignmentFilter = { + filter?: "assignment"; + mode: number; + scopes?: Array<string> | null; + scheme?: string | null; +}; + +export type AssignmentInfo = { + user_id: string; + username: string; + order: number; + assignment_id: string; + status: AssignmentStatus; + labels?: { + [key: string]: Array<AssignmentInfoLabel>; + } | null; +}; + +export type AssignmentInfoLabel = { + repeat: number; + value_int?: number | null; + value_bool?: boolean | null; + multi_ind?: Array<number> | null; +}; + +/** + * Corresponds to db.models.annotations.Assignment + * + * Assignment is used to request a user/annotator (User) to annotate a particular item (BaseItem) in the database + * following a pre-defined annotation scheme (AnnotationScheme). + * + * Each AnnotationScheme will have several Assignments. + * Each User will "receive" several Assignments. + * Each Item may have several Assignments (either in relation to different AnnotationSchemes or double-coding). + * The Project is implicit by the AnnotationScheme. + * + * The most common use-cases are: + * * Creating assignments in bulk at random (e.g. 3 users should annotate 50 documents each) + * * Creating assignments one at a time based on a set of rules (e.g. for double-coding, defined order, bias, ...) + * * Creating assignments in small batches or one-by-one in prioritised annotation settings + */ +export type AssignmentModel = { + assignment_id?: string | null; + assignment_scope_id: string; + user_id: string; + item_id: string; + annotation_scheme_id: string; + status: AssignmentStatus; + order?: number | null; +}; + +export type AssignmentScopeEntry = { + item_id: string; + first_occurrence: number; + identifier: number; + assignments: Array<AssignmentInfo>; +}; + +/** + * AssignmentScope can be used to logically group a set of Assignments. + * For example, one may wish to re-use the same AnnotationScheme several times within a project + * without copying it each time. It may also be used to logically group different scopes of + * the annotation process, for example to make it clear that different subsets of a dataset + * are to be annotated. + * Logically, this should be viewed as a hierarchical organisation + * AnnotationScheme -> [AssignmentScope] -> Assignment -> Annotation + */ +export type AssignmentScopeModel = { + assignment_scope_id?: string | null; + annotation_scheme_id: string; + time_created?: string | null; + name: string; + description?: string | null; + config?: + | AssignmentScopeRandomWithExclusionConfig + | AssignmentScopeRandomWithNQLConfig + | AssignmentScopeRandomConfig + | null; + highlighter_ids?: Array<string> | null; +}; + +export type AssignmentScopeRandomConfig = { + config_type?: "random"; + users?: Array<string> | null; + num_items: number; + min_assignments_per_item: number; + max_assignments_per_item: number; + num_multi_coded_items: number; + random_seed: number; +}; + +export type AssignmentScopeRandomWithExclusionConfig = { + config_type?: "random_exclusion"; + users?: Array<string> | null; + num_items: number; + min_assignments_per_item: number; + max_assignments_per_item: number; + num_multi_coded_items: number; + random_seed: number; + excluded_scopes: Array<string>; +}; + +export type AssignmentScopeRandomWithNQLConfig = { + config_type?: "random_nql"; + users?: Array<string> | null; + num_items: number; + min_assignments_per_item: number; + max_assignments_per_item: number; + num_multi_coded_items: number; + random_seed: number; + query_parsed: + | FieldFilter + | FieldFilters + | LabelFilterMulti + | LabelFilterBool + | LabelFilterInt + | AssignmentFilter + | AnnotationFilter + | ImportFilter + | MetaFilterBool + | MetaFilterInt + | MetaFilterStr + | SubQuery; + query_str: string; +}; + +export type AssignmentStatus = "FULL" | "PARTIAL" | "OPEN" | "INVALID"; + +export type AuthTokenModel = { + token_id: string; + username: string; + time_created?: string | null; + time_updated?: string | null; + valid_till?: string | null; +}; + +export type BasicProjectStats = { + num_items: number; + num_imports: number; + num_schemes: number; + num_scopes: number; + num_labels: number; + num_labeled_items: number; +}; + +export type Body_login_for_access_token_api_login_token_post = { + grant_type?: string | null; + username: string; + password: string; + scope?: string; + client_id?: string | null; + client_secret?: string | null; +}; + +export type Body_save_resolved_annotations_api_annotations_config_resolve__put = { + settings: BotMetaResolveBase; + matrix: { + [key: string]: { + [key: string]: ResolutionCell; + }; + }; +}; + +export type Body_upload_file_api_pipes_artefacts_files_upload_post = { + file: Blob | File; +}; + +export type Body_upload_files_api_pipes_artefacts_files_upload_many_post = { + file: Array<Blob | File>; +}; + +export type BotAnnotationMetaDataBaseModel = { + bot_annotation_metadata_id?: string | null; + name: string; + kind: BotKind; + project_id: string; + time_created?: string | null; + time_updated?: string | null; + assignment_scope_id?: string | null; + annotation_scheme_id?: string | null; +}; + +export type BotAnnotationModel = { + value_bool?: boolean | null; + value_int?: number | null; + value_float?: number | null; + value_str?: string | null; + multi_int?: Array<number> | null; + bot_annotation_id?: string | null; + bot_annotation_metadata_id?: string | null; + time_created?: string | null; + time_updated?: string | null; + item_id: string; + parent?: string | null; + key?: string | null; + repeat?: number; + order?: number | null; + confidence?: number | null; +}; + +export type BotAnnotationResolution = { + bot_annotation_metadata_id?: string | null; + name: string; + kind: BotKind; + project_id: string; + time_created?: string | null; + time_updated?: string | null; + assignment_scope_id: string; + annotation_scheme_id: string; + meta: BotMetaResolve; +}; + +export type BotKind = "CLASSIFICATION" | "RULES" | "TOPICS" | "RESOLVE" | "SCRIPT"; + +export type BotMetaInfo = { + bot_annotation_metadata_id?: string | null; + name: string; + kind: BotKind; + project_id: string; + time_created?: string | null; + time_updated?: string | null; + assignment_scope_id?: string | null; + annotation_scheme_id?: string | null; + num_annotations: number; + num_annotated_items: number; +}; + +export type BotMetaResolve = { + algorithm: ResolutionMethod; + ignore_hierarchy: boolean; + ignore_repeat: boolean; + snapshot: Array<SnapshotEntry>; + resolutions: Array<ResolutionSnapshotEntry>; +}; + +export type BotMetaResolveBase = { + algorithm: ResolutionMethod; + ignore_hierarchy: boolean; + ignore_repeat: boolean; +}; + +export type Cashtag = { + start: number; + end: number; + tag: string; +}; + +/** + * Flattened and reduced version of the context_annotation object + * https://developer.twitter.com/en/docs/twitter-api/annotations/overview + * + * NOTE: Under the assumption that we could always recover the `description` + * of the domain and entity, this information is not stored to save space. + */ +export type ContextAnnotation = { + domain_id: string; + domain_name: string; + entity_id: string; + entity_name: string; +}; + +export type DehydratedAnnotationTracker = { + annotation_tracking_id?: string | null; + name: string; +}; + +export type DehydratedAssignment = { + assignment_id: string; + user_id: string; + item_id: string; + username: string; + status: AssignmentStatus; + order: number; +}; + +export type DehydratedUser = { + user_id?: string | null; + username?: string | null; + full_name?: string | null; +}; + +export type Event = { + event: "ExampleSubEvent" | "ExampleEvent"; + payload: ExampleSubEvent | ExampleEvent; +}; + +export type ExampleEvent = { + payload_a: string; +}; + +export type ExampleSubEvent = { + payload_a: string; +}; + +export type ExportRequest = { + labels: Array<LabelOptions>; + nql_filter?: + | FieldFilter + | FieldFilters + | LabelFilterMulti + | LabelFilterBool + | LabelFilterInt + | AssignmentFilter + | AnnotationFilter + | ImportFilter + | MetaFilterBool + | MetaFilterInt + | MetaFilterStr + | SubQuery + | null; + bot_annotation_metadata_ids?: Array<string> | null; + assignment_scope_ids?: Array<string> | null; + user_ids?: Array<string> | null; + ignore_hierarchy?: boolean; + ignore_repeat?: boolean; +}; + +export type FieldFilter = { + filter?: "field"; + field: "title" | "abstract" | "pub_year" | "date" | "source"; + value: string | number; + comp?: string | null; +}; + +export type FieldFilters = { + filter?: "field_mul"; + field: "doi" | "item_id" | "openalex_id"; + values: Array<string>; +}; + +export type FileOnDisk = { + path: string; + size: number; +}; + +export type FlatLabel = { + path: Array<Label>; + repeat: number; + path_key: string; + parent_int?: number | null; + parent_key?: string | null; + parent_value?: number | null; + name: string; + hint?: string | null; + key: string; + required: boolean; + max_repeat: number; + kind: "bool" | "str" | "float" | "int" | "single" | "multi" | "intext"; + choices?: Array<FlatLabelChoice> | null; +}; + +export type FlatLabelChoice = { + name: string; + hint?: string | null; + value: number; +}; + +export type FlattenedAnnotationSchemeLabel = { + name: string; + hint?: string | null; + key: string; + required: boolean; + max_repeat: number; + implicit_max_repeat: number; + kind: "bool" | "str" | "float" | "int" | "single" | "multi" | "intext"; + choices?: Array<AnnotationSchemeLabelChoiceFlat> | null; + parent_label?: string | null; + parent_choice?: number | null; +}; + +export type FullLexisNexisItemModel = { + item_id?: string | null; + project_id?: string | null; + type?: ItemType; + text?: string | null; + teaser?: string | null; + authors?: Array<string> | null; + sources?: Array<LexisNexisItemSourceModel> | null; +}; + +/** + * Corresponds to db.models.items.generic.GenericItem + */ +export type GenericItemModel = { + item_id?: string | null; + project_id?: string | null; + type?: ItemType; + text?: string | null; + meta: { + [key: string]: unknown; + }; +}; + +export type HTTPValidationError = { + detail?: Array<ValidationError>; +}; + +export type Hashtag = { + start: number; + end: number; + tag: string; +}; + +/** + * A highlighter can be used in a project to highlight tokens in text to make + * it easier for users to annotate documents when certain keywords are highlighted. + * + * It is assumed, that a highlighter roughly corresponds to query terms. + * Furthermore, keywords in a highlighter will typically be joined into + * a regular expression group (e.g. "(keyword1|double keyword|wildcar.*)"). + * + * Each matching group will be wrapped in a highlight span in the frontend. + */ +export type HighlighterModel = { + highlighter_id: string; + project_id: string; + name: string; + keywords: Array<string>; + style?: string | null; +}; + +export type HistogramEntry = { + bucket: string; + num_items: number; +}; + +export type IEUUID = { + incl: boolean; + uuid: string; +}; + +export type ImportFilter = { + filter?: "import"; + import_ids: Array<IEUUID>; +}; + +export type ImportModel = { + import_id?: string | null; + user_id?: string | null; + project_id: string; + pipeline_task_id?: string | null; + name: string; + description: string; + type: string; + time_created?: string | null; + time_started?: string | null; + time_finished?: string | null; + config?: ScopusImport | AcademicItemImport | OpenAlexFileImport | OpenAlexSolrImport | WoSImport | null; +}; + +export type ItemAnnotation = { + value_bool?: boolean | null; + value_int?: number | null; + value_float?: number | null; + value_str?: string | null; + multi_int?: Array<number> | null; + annotation_id?: string | null; + time_created?: string | null; + time_updated?: string | null; + assignment_id: string; + user_id: string; + item_id: string; + annotation_scheme_id: string; + snippet_id?: string | null; + key: string; + repeat?: number; + parent?: string | null; + path: Array<Label>; + old?: AnnotationValue | null; +}; + +export type ItemType = "generic" | "twitter" | "academic" | "patents" | "lexis"; + +export type ItemWithCount = { + item_id: string; + num_total: number; + num_open: number; + num_partial: number; + num_full: number; +}; + +/** + * Convenience type (corresponding to internal type in db annotation_label). + * For Annotation or BotAnnotation, this is the combination of their respective key, repeat value. + * + * Mainly used during resolving annotations. + */ +export type Label = { + key: string; + repeat: number; + value?: number | null; +}; + +export type LabelFilterBool = { + scopes?: Array<string> | null; + scheme?: string | null; + users?: UsersFilter | null; + repeats?: Array<number> | null; + key: string; + type: "user" | "bot" | "resolved"; + filter?: "label_bool"; + value_type?: "bool"; + comp?: "="; + value_bool?: boolean | null; +}; + +export type LabelFilterInt = { + scopes?: Array<string> | null; + scheme?: string | null; + users?: UsersFilter | null; + repeats?: Array<number> | null; + key: string; + type: "user" | "bot" | "resolved"; + filter?: "label_int"; + value_type?: "int"; + value_int?: number | null; + comp: string; +}; + +export type LabelFilterMulti = { + scopes?: Array<string> | null; + scheme?: string | null; + users?: UsersFilter | null; + repeats?: Array<number> | null; + key: string; + type: "user" | "bot" | "resolved"; + filter?: "label_multi"; + value_type?: "multi"; + multi_int?: Array<number> | null; + comp: string; +}; + +export type LabelOptions = { + key: string; + options_int?: Array<number> | null; + options_bool?: Array<boolean> | null; + options_multi?: Array<number> | null; + strings?: boolean | null; +}; + +export type LabelScope = { + scope_id: string; + name: string; + scope_type: "H" | "R"; +}; + +export type LexisNexisItemModel = { + item_id?: string | null; + project_id?: string | null; + type?: ItemType; + text?: string | null; + teaser?: string | null; + authors?: Array<string> | null; +}; + +export type LexisNexisItemSourceModel = { + item_source_id?: string | null; + item_id?: string | null; + lexis_id: string; + name?: string | null; + title?: string | null; + section?: string | null; + jurisdiction?: string | null; + location?: string | null; + content_type?: string | null; + published_at?: string | null; + updated_at?: string | null; + meta?: { + [key: string]: unknown; + } | null; +}; + +export type MakeAssignmentsRequestModel = { + annotation_scheme_id: string; + scope_id: string; + config: AssignmentScopeRandomWithExclusionConfig | AssignmentScopeRandomWithNQLConfig | AssignmentScopeRandomConfig; + save?: boolean; +}; + +export type Mention = { + start: number; + end: number; + username: string; + user_id: string | number; +}; + +export type MetaFilterBool = { + field: string; + filter?: "meta_bool"; + value_type?: "bool"; + comp?: "="; + value: boolean; +}; + +export type MetaFilterInt = { + field: string; + filter?: "meta_int"; + value_type?: "int"; + comp: string; + value: number; +}; + +export type MetaFilterStr = { + field: string; + filter?: "meta_str"; + value_type?: "str"; + comp?: "LIKE"; + value: string; +}; + +export type OpenAlexFileImport = { + sources: Array<string>; + kind?: "oa-file"; +}; + +export type OpenAlexSolrImport = { + kind?: "oa-solr"; + query: string; + def_type?: "edismax" | "lucene" | "dismax"; + field?: "title" | "abstract" | "title_abstract"; + op?: "OR" | "AND"; +}; + +export type ProjectBaseInfo = { + users: Array<ProjectBaseInfoEntry>; + scopes: Array<ProjectBaseInfoScopeEntry>; + bot_scopes: Array<ProjectBaseInfoEntry>; + labels: { + [key: string]: LabelOptions; + }; +}; + +export type ProjectBaseInfoEntry = { + id: string; + name: string; +}; + +export type ProjectBaseInfoScopeEntry = { + id: string; + name: string; + scheme_id: string; + scheme_name: string; +}; + +export type ProjectInfo = { + project_id?: string | null; + name: string; + description?: string | null; + time_created?: string | null; + type: "generic" | "twitter" | "academic" | "patents" | "lexis" | ItemType; + setting_motivational_quotes?: boolean; + owners: Array<UserBaseModel>; +}; + +/** + * Project is the basic structural and conceptual place around which all functionality evolves. + * It is essentially a container for a logically connected set of analyses, e.g. all work for a paper. + * + * Although Items (and subsequently their type-specific extensions) live outside the scope of a project, + * they way they are augmented by annotations and analysis outcomes is always constrained to the scope + * of a Project. + */ +export type ProjectModel = { + project_id?: string | null; + name: string; + description?: string | null; + time_created?: string | null; + type: "generic" | "twitter" | "academic" | "patents" | "lexis" | ItemType; + setting_motivational_quotes?: boolean; +}; + +/** + * ProjectPermissions allows to define fine-grained project-level permission management. + * Once such an entry exists, the user is assumed to have very basic access to the respective project. + * A user may become "owner" of a project, which will allow them to do everything and effectively ignoring the + * other more fine-grained permission settings. + * + * It is assumed, that a user can always see and edit their own contributions (e.g. annotations) but + * by giving them permission to view annotations, they can also see other users' annotations. + */ +export type ProjectPermissionsModel = { + project_permission_id?: string | null; + project_id: string; + user_id: string; + owner?: boolean; + dataset_read?: boolean; + dataset_edit?: boolean; + imports_read?: boolean; + imports_edit?: boolean; + annotations_read?: boolean; + annotations_edit?: boolean; + pipelines_read?: boolean; + pipelines_edit?: boolean; + artefacts_read?: boolean; + artefacts_edit?: boolean; + search_dimensions?: boolean; + search_oa?: boolean; + import_limit_oa?: number; +}; + +export type QueryResult = { + n_docs: number; + docs: Array<AcademicItemModel> | Array<FullLexisNexisItemModel> | Array<GenericItemModel>; +}; + +export type RankEntry = { + user_id: string; + username: string; + full_name: string; + email: string; + affiliation: string; + num_labels: number; + num_labeled_items: number; +}; + +export type ReferencedTweet = { + id: string | number; + type: "retweeted" | "quoted" | "replied_to"; +}; + +export type ResolutionCell = { + labels: { + [key: string]: Array<ResolutionUserEntry>; + }; + resolution: BotAnnotationModel; + status?: ResolutionStatus; +}; + +export type ResolutionMethod = "majority" | "first"; + +export type ResolutionOrdering = { + identifier: number; + first_occurrence: number; + item_id: string; +}; + +export type ResolutionProposal = { + scheme_info: AnnotationSchemeInfo; + labels: Array<FlatLabel>; + annotators: Array<UserModel>; + ordering: Array<ResolutionOrdering>; + matrix: { + [key: string]: { + [key: string]: ResolutionCell; + }; + }; +}; + +export type ResolutionSnapshotEntry = { + order_key: string; + path_key: string; + ba_id: string; +}; + +export type ResolutionStatus = "NEW" | "CHANGED" | "UNCHANGED"; + +export type ResolutionUserEntry = { + assignment?: DehydratedAssignment | null; + annotation?: ItemAnnotation | null; + status?: ResolutionStatus; +}; + +export type SavedResolution = { + meta: BotAnnotationResolution; + proposal: ResolutionProposal; +}; + +export type ScopusImport = { + sources: Array<string>; + kind?: "scopus"; +}; + +export type SearchResult = { + query_time: number; + num_found: number; + docs: Array<AcademicItemModel>; + histogram?: { + [key: string]: number; + } | null; +}; + +export type SnapshotEntry = { + value_bool?: boolean | null; + value_int?: number | null; + value_float?: number | null; + value_str?: string | null; + multi_int?: Array<number> | null; + order_key: string; + path_key: string; + item_id: string; + anno_id: string; + user_id: string; +}; + +export type SubQuery = { + filter?: "sub"; + and_?: Array< + | FieldFilter + | FieldFilters + | LabelFilterMulti + | LabelFilterBool + | LabelFilterInt + | AssignmentFilter + | AnnotationFilter + | ImportFilter + | MetaFilterBool + | MetaFilterInt + | MetaFilterStr + | SubQuery + > | null; + or_?: Array< + | FieldFilter + | FieldFilters + | LabelFilterMulti + | LabelFilterBool + | LabelFilterInt + | AssignmentFilter + | AnnotationFilter + | ImportFilter + | MetaFilterBool + | MetaFilterInt + | MetaFilterStr + | SubQuery + > | null; + not_?: + | FieldFilter + | FieldFilters + | LabelFilterMulti + | LabelFilterBool + | LabelFilterInt + | AssignmentFilter + | AnnotationFilter + | ImportFilter + | MetaFilterBool + | MetaFilterInt + | MetaFilterStr + | SubQuery + | null; +}; + +export type TaskModel = { + task_id?: string | null; + function_name: string; + user_id?: string | null; + project_id?: string | null; + celery_id?: string | null; + comment?: string | null; + params?: + | { + [key: string]: unknown; + } + | string + | null; + fingerprint: string; + time_created?: string | null; + time_started?: string | null; + time_finished?: string | null; + rec_expunge?: string | null; + status?: TaskStatus; +}; + +export type TaskStatus = "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED"; + +export type TermStats = { + term: string; + df: number; + ttf: number; +}; + +/** + * Corresponds to db.models.items.TwitterItem + * + * For more in-depth documentation, please refer to: + * https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet + */ +export type TwitterItemModel = { + item_id?: string | null; + project_id?: string | null; + type?: ItemType; + text?: string | null; + twitter_id?: string | null; + twitter_author_id?: string | null; + created_at: string; + language?: string | null; + conversation_id?: string | null; + referenced_tweets?: Array<ReferencedTweet> | null; + latitude?: number | null; + longitude?: number | null; + hashtags?: Array<Hashtag> | null; + mentions?: Array<Mention> | null; + urls?: Array<URL> | null; + cashtags?: Array<Cashtag> | null; + context_annotations?: Array<ContextAnnotation> | null; + retweet_count: number; + reply_count: number; + like_count: number; + quote_count: number; + user?: TwitterUserModel | null; +}; + +/** + * Flattened and reduced representation of a Twitter User Object + * https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user + * + * NOTE: + * - In the context of a `TwitterItemModel`, the `id` is not set as it can be inferred from `twitter_author_id` + * - `name` is None if `name` == `username` to save space + */ +export type TwitterUserModel = { + id?: string | null; + created_at: string; + name?: string | null; + username: string; + verified: boolean; + description?: string | null; + location?: string | null; + followers_count?: number | null; + following_count?: number | null; + tweet_count?: number | null; + listed_count?: number | null; +}; + +export type URL = { + start: number; + end: number; + url: string; + url_expanded: string; +}; + +/** + * User represents a person. + * Most entries in the database will be (indirectly) linked to user accounts, so this is + * at the core of access management and ownership. + */ +export type UserBaseModel = { + user_id?: string | null; + username?: string | null; + full_name?: string | null; + email?: string | null; + affiliation?: string | null; + is_superuser?: boolean | null; + is_active?: boolean | null; + time_created?: string | null; + time_updated?: string | null; +}; + +export type UserInDBModel = { + user_id?: string | null; + username?: string | null; + full_name?: string | null; + email?: string | null; + affiliation?: string | null; + is_superuser?: boolean | null; + is_active?: boolean | null; + time_created?: string | null; + time_updated?: string | null; + password?: string | null; +}; + +export type UserModel = { + user_id?: string | null; + username?: string | null; + full_name?: string | null; + email?: string | null; + affiliation?: string | null; + is_superuser?: boolean | null; + is_active?: boolean | null; + time_created?: string | null; + time_updated?: string | null; +}; + +export type UserPermission = { + project_permission_id?: string | null; + project_id: string; + user_id: string; + owner?: boolean; + dataset_read?: boolean; + dataset_edit?: boolean; + imports_read?: boolean; + imports_edit?: boolean; + annotations_read?: boolean; + annotations_edit?: boolean; + pipelines_read?: boolean; + pipelines_edit?: boolean; + artefacts_read?: boolean; + artefacts_edit?: boolean; + search_dimensions?: boolean; + search_oa?: boolean; + import_limit_oa?: number; + user: UserBaseModel; +}; + +export type UserProjectAssignmentScope = { + scope: AssignmentScopeModel; + scheme_name: string; + scheme_description: string; + num_assignments: number; + num_open: number; + num_partial: number; + num_completed: number; +}; + +export type UsersFilter = { + user_ids: Array<string>; + mode: "ALL" | "ANY"; +}; + +export type ValidationError = { + loc: Array<string | number>; + msg: string; + type: string; +}; + +export type WoSImport = { + sources: Array<string>; + kind?: "wos"; +}; + +export type $OpenApiTs = { + "/api/ping/": { + get: { + res: { + /** + * Successful Response + */ + 200: string; + }; + }; + }; + "/api/ping/error": { + get: { + res: { + /** + * Successful Response + */ + 200: string; + }; + }; + }; + "/api/ping/warn": { + get: { + res: { + /** + * Successful Response + */ + 200: string; + }; + }; + }; + "/api/ping/permission": { + get: { + res: { + /** + * Successful Response + */ + 200: unknown; + }; + }; + }; + "/api/ping/{name}": { + post: { + req: { + name: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/schemes/definition/{annotation_scheme_id}": { + get: { + req: { + annotationSchemeId: string; + flat?: boolean; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AnnotationSchemeModelFlat | AnnotationSchemeModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/schemes/definition/": { + put: { + req: { + requestBody: AnnotationSchemeModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/schemes/definition/{scheme_id}": { + delete: { + req: { + annotationSchemeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/schemes/list/{project_id}": { + get: { + req: { + projectId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AnnotationSchemeModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/next/{assignment_scope_id}/{current_assignment_id}": { + get: { + req: { + assignmentScopeId: string; + currentAssignmentId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AnnotationItem; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/next/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AnnotationItem; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/assignment/{assignment_id}": { + get: { + req: { + assignmentId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AnnotationItem; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/scopes/{project_id}": { + get: { + req: { + projectId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<UserProjectAssignmentScope>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/scopes/": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AssignmentScopeModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/scope/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AssignmentScopeModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + delete: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/scope/": { + put: { + req: { + requestBody: AssignmentScopeModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/scope/counts/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AssignmentCounts; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/assignments/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AssignmentModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/assignment/progress/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AssignmentScopeEntry>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/assignments/scope/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AssignmentModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/annotations/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AssignmentModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/annotate/save": { + post: { + req: { + requestBody: AnnotatedItem; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AssignmentStatus; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/items/": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<ItemWithCount>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/assignments/": { + post: { + req: { + requestBody: MakeAssignmentsRequestModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AssignmentModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/scopes/{scheme_id}": { + get: { + req: { + schemeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AssignmentScopeModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/annotators/{scheme_id}": { + get: { + req: { + schemeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<UserModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/resolve": { + post: { + req: { + assignmentScopeId?: string | null; + botAnnotationMetadatId?: string | null; + includeEmpty?: boolean; + includeNew?: boolean; + requestBody: BotMetaResolveBase; + updateExisting?: boolean; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: ResolutionProposal; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/resolved/{bot_annotation_metadata_id}": { + get: { + req: { + botAnnotationMetadataId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: SavedResolution; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/resolve/": { + put: { + req: { + annotationSchemeId: string; + assignmentScopeId: string; + name: string; + requestBody: Body_save_resolved_annotations_api_annotations_config_resolve__put; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/resolve/update": { + put: { + req: { + botAnnotationMetadataId: string; + name: string; + requestBody: { + [key: string]: { + [key: string]: ResolutionCell; + }; + }; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/resolved-list/": { + get: { + req: { + annotationSchemeId?: string | null; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<BotAnnotationMetaDataBaseModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/config/resolved/{bot_annotation_meta_id}": { + delete: { + req: { + botAnnotationMetadataId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/annotations/bot/annotations": { + get: { + req: { + includeResolve?: boolean; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<BotMetaInfo>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/users/list/all": { + get: { + res: { + /** + * Successful Response + */ + 200: Array<UserBaseModel>; + }; + }; + }; + "/api/users/list/all/dehydrated": { + get: { + res: { + /** + * Successful Response + */ + 200: Array<DehydratedUser>; + }; + }; + }; + "/api/users/list/project/annotators/{project_id}": { + get: { + req: { + projectId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: { + [key: string]: UserBaseModel; + }; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/users/list/project/{project_id}": { + get: { + req: { + projectId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<UserBaseModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/users/details/{user_id}": { + get: { + req: { + userId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: UserModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/users/details": { + get: { + req: { + userId: Array<string>; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<UserModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + put: { + req: { + requestBody: UserInDBModel | UserModel; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/users/my-details": { + put: { + req: { + requestBody: UserInDBModel | UserModel; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/login/token": { + post: { + req: { + formData: Body_login_for_access_token_api_login_token_post; + }; + res: { + /** + * Successful Response + */ + 200: AuthTokenModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/login/token/{token_id}": { + put: { + req: { + tokenId: string; + }; + res: { + /** + * Successful Response + */ + 200: AuthTokenModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + delete: { + req: { + tokenId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/login/my-tokens": { + get: { + res: { + /** + * Successful Response + */ + 200: Array<AuthTokenModel>; + }; + }; + }; + "/api/login/me": { + get: { + res: { + /** + * Successful Response + */ + 200: UserModel; + }; + }; + }; + "/api/login/logout": { + get: { + res: { + /** + * Successful Response + */ + 200: unknown; + }; + }; + }; + "/api/projects/list": { + get: { + res: { + /** + * Successful Response + */ + 200: Array<ProjectInfo>; + }; + }; + }; + "/api/projects/create": { + put: { + req: { + requestBody: ProjectModel; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/info": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: ProjectModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + put: { + req: { + requestBody: ProjectModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/permissions/me": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: ProjectPermissionsModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/permissions/list/{project_id}": { + get: { + req: { + projectId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<ProjectPermissionsModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/permissions/list-users": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<UserPermission>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/permissions/permission": { + put: { + req: { + requestBody: ProjectPermissionsModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + delete: { + req: { + projectPermissionId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/permissions/{project_permission_id}": { + get: { + req: { + projectPermissionId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: ProjectPermissionsModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/items/{item_type}/list": { + get: { + req: { + itemType: "generic" | "twitter" | "academic" | "patents" | "lexis"; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: + | Array<TwitterItemModel> + | Array<AcademicItemModel> + | Array<LexisNexisItemModel> + | Array<FullLexisNexisItemModel> + | Array<GenericItemModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/items/{item_type}/list/{page}/{page_size}": { + get: { + req: { + itemType: "generic" | "twitter" | "academic" | "patents" | "lexis"; + page: number; + pageSize: number; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: + | Array<TwitterItemModel> + | Array<AcademicItemModel> + | Array<LexisNexisItemModel> + | Array<FullLexisNexisItemModel> + | Array<GenericItemModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/items/detail/{item_id}": { + get: { + req: { + itemId: string; + itemType?: "generic" | "twitter" | "academic" | "patents" | "lexis" | null; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: TwitterItemModel | AcademicItemModel | LexisNexisItemModel | FullLexisNexisItemModel | GenericItemModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/items/text/{item_id}": { + get: { + req: { + itemId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/items/count": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: number; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/project/items/twitter/add": { + post: { + req: { + importId?: string | null; + requestBody: TwitterItemModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/imports/list": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<ImportModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/imports/import/{import_id}": { + get: { + req: { + importId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: ImportModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + post: { + req: { + importId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/imports/import/{import_id}/count/": { + get: { + req: { + importId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: number; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/imports/import": { + put: { + req: { + requestBody: ImportModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/imports/import/delete/{import_id}": { + delete: { + req: { + importId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/events/emit": { + post: { + req: { + requestBody: Event; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/highlighters/scope/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<HighlighterModel> | null; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/highlighters/project": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<HighlighterModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + put: { + req: { + requestBody: HighlighterModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/highlighters/{highlighter_id}": { + get: { + req: { + highlighterId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: HighlighterModel | null; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/stats/basics": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: BasicProjectStats; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/stats/rank": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<RankEntry>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/stats/histogram/years": { + get: { + req: { + fromYear?: number; + toYear?: number; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<HistogramEntry>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/export/annotations/csv": { + post: { + req: { + requestBody: ExportRequest; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/export/project/baseinfo": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: ProjectBaseInfo; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/search/openalex/select": { + post: { + req: { + defType?: "edismax" | "lucene" | "dismax"; + field?: "title" | "abstract" | "title_abstract"; + histogram?: boolean; + histogramFrom?: number; + histogramTo?: number; + limit?: number; + offset?: number; + op?: "OR" | "AND"; + query: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: SearchResult; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/search/openalex/terms": { + get: { + req: { + limit?: number; + termPrefix: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<TermStats>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/search/nql/query": { + post: { + req: { + limit?: number; + page?: number; + requestBody: + | FieldFilter + | FieldFilters + | LabelFilterMulti + | LabelFilterBool + | LabelFilterInt + | AssignmentFilter + | AnnotationFilter + | ImportFilter + | MetaFilterBool + | MetaFilterInt + | MetaFilterStr + | SubQuery; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: QueryResult; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/search/nql/count": { + post: { + req: { + requestBody: + | FieldFilter + | FieldFilters + | LabelFilterMulti + | LabelFilterBool + | LabelFilterInt + | AssignmentFilter + | AnnotationFilter + | ImportFilter + | MetaFilterBool + | MetaFilterInt + | MetaFilterStr + | SubQuery; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: number; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/tracking/scopes": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<LabelScope>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/resolutions": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<BotAnnotationMetaDataBaseModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/tracking/trackers": { + get: { + req: { + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<DehydratedAnnotationTracker>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/tracking/tracker/{tracker_id}": { + get: { + req: { + trackerId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AnnotationTrackerModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/tracking/tracker": { + put: { + req: { + requestBody: AnnotationTrackerModel; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/tracking/refresh": { + post: { + req: { + batchSize?: number | null; + reset?: boolean; + trackerId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: AnnotationTrackerModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/quality/load/{assignment_scope_id}": { + get: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AnnotationQualityModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/eval/quality/compute": { + get: { + req: { + assignmentScopeId: string; + botAnnotationMetadataId?: string | null; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<AnnotationQualityModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/mail/reset-password/{username}": { + post: { + req: { + username: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/mail/welcome": { + post: { + req: { + password: string; + username: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/mail/assignment-reminder": { + post: { + req: { + assignmentScopeId: string; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<string>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/artefacts/list": { + get: { + req: { + xProjectId: string; + xTaskId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<FileOnDisk>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/artefacts/log": { + get: { + req: { + xProjectId: string; + xTaskId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/artefacts/file": { + get: { + req: { + filename: string; + xProjectId: string; + xTaskId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/artefacts/files": { + get: { + req: { + xProjectId: string; + xTaskId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/artefacts/files/upload": { + post: { + req: { + folder?: string | null; + formData: Body_upload_file_api_pipes_artefacts_files_upload_post; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: string; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/artefacts/files/upload-many": { + post: { + req: { + folder?: string | null; + formData: Body_upload_files_api_pipes_artefacts_files_upload_many_post; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<string>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/tasks": { + get: { + req: { + fingerprint?: string | null; + functionName?: string | null; + location?: string | null; + orderByFields?: Array<string> | null; + status?: TaskStatus | null; + userId?: string | null; + xProjectId: string; + }; + res: { + /** + * Successful Response + */ + 200: Array<TaskModel>; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; + "/api/pipes/task": { + get: { + req: { + xProjectId: string; + xTaskId: string; + }; + res: { + /** + * Successful Response + */ + 200: TaskModel; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + delete: { + req: { + xProjectId: string; + xTaskId: string; + }; + res: { + /** + * Successful Response + */ + 200: unknown; + /** + * Validation Error + */ + 422: HTTPValidationError; + }; + }; + }; +}; diff --git a/src/plugins/api/types.ts b/src/plugins/api/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..32fb6e17f3488c8684e0dc93a1319cb52cec9fbb --- /dev/null +++ b/src/plugins/api/types.ts @@ -0,0 +1,45 @@ +import type { EnumLiteral } from "@/util"; + +export * from "./spec/types.gen"; +export * from "./spec/enums.gen"; + +export enum AssignmentScopeBaseConfigTypesEnum { + RANDOM = "random", + RANDOM_EXCLUSION = "random_exclusion", + RANDOM_NQL = "random_nql", +} + +export type AssignmentScopeBaseConfigTypes = EnumLiteral<AssignmentScopeBaseConfigTypesEnum>; + +export enum AnnotationSchemeLabelKindEnum { + BOOL = "bool", + STR = "str", + FLOAT = "float", + INT = "int", + SINGLE = "single", + MULTI = "multi", + INTEXT = "intext", +} + +export type AnnotationSchemeLabelKindTypes = EnumLiteral<AnnotationSchemeLabelKindEnum>; + +export enum ImportConfigEnum { + WOS = "wos", + SCOPUS = "scopus", + ACADEMIC = "academic", + OA_FILE = "oa-file", + OA_SOLR = "oa_solr", +} + +export type ImportConfigTypes = EnumLiteral<ImportConfigEnum>; + +export enum SearchFieldEnum { + TITLE = "title", + ABSTRACT = "abstract", + TITLE_ABSTRACT = "title_abstract", +} + +export type SearchFieldType = EnumLiteral<SearchFieldEnum>; + +// import type { AssignmentStatusEnum } from "@/plugins/api/spec/enums.gen"; +// export type AssignmentStatus = EnumLiteral<AssignmentStatusEnum>; diff --git a/src/plugins/events/EventHandlers/project.ts b/src/plugins/events/EventHandlers/project.ts index e4a7df5b0f137240ff1dfb4572b28e2c57de4710..ec049743a6b1e083287421e9b253b40d90739507 100644 --- a/src/plugins/events/EventHandlers/project.ts +++ b/src/plugins/events/EventHandlers/project.ts @@ -13,8 +13,8 @@ export default () => { // set the projectId first, so it can be used during the following requests currentProjectStore.projectId = projectId; Promise.allSettled([ - API.core.project.getProjectApiProjectInfoGet({ xProjectId: projectId }), - API.core.project.getProjectPermissionsCurrentUserApiProjectPermissionsMeGet({ xProjectId: projectId }), + API.project.getProjectApiProjectInfoGet({ xProjectId: projectId }), + API.project.getProjectPermissionsCurrentUserApiProjectPermissionsMeGet({ xProjectId: projectId }), ]).then((values) => { const [projectInfo, projectPermissions] = values; if ( diff --git a/src/plugins/events/events/auth.ts b/src/plugins/events/events/auth.ts index 03cad11b136074af7927a6344825721ae12adfd9..afdac1cee7fa680714c4f542a63265103f3aec96 100644 --- a/src/plugins/events/events/auth.ts +++ b/src/plugins/events/events/auth.ts @@ -1,7 +1,7 @@ /* eslint-disable max-classes-per-file, no-useless-constructor */ import { BaseEvent } from "@/plugins/events/baseEvent"; -import type { UserModel } from "@/plugins/api/api-core"; +import type { UserModel } from "@/plugins/api/spec/types.gen"; // FIXME this event seems wrong here... export class RequestSubmittedEvent extends BaseEvent { diff --git a/src/plugins/events/events/projects.ts b/src/plugins/events/events/projects.ts index 7cbf6e9b7a8ff9285d458c37e896c497404d5995..d5a1300e1bf6603e78bb4a91977a68b25bfd9395 100644 --- a/src/plugins/events/events/projects.ts +++ b/src/plugins/events/events/projects.ts @@ -1,6 +1,6 @@ /* eslint-disable max-classes-per-file, no-useless-constructor */ -import type { ProjectModel, ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectModel, ProjectPermissionsModel } from "@/plugins/api/spec/types.gen"; import { BaseEvent } from "@/plugins/events/baseEvent"; export class CurrentProjectSelectedEvent extends BaseEvent { diff --git a/src/router/index.ts b/src/router/index.ts index 4fc303e3b033296d90332563cea4aaaad7ea81a6..30c3971acce9cb4477181aab693239cf7388e625 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -30,6 +30,7 @@ const routes: Array<RouteRecordRaw> = [ { path: "/parse", name: "parse", + alias: ["/nql"], component: () => import(/* webpackChunkName: "ParseView" */ "../views/ParseView.vue"), }, { @@ -61,26 +62,6 @@ const routes: Array<RouteRecordRaw> = [ }, ], }, - { - path: "/project/pipelines", - name: "project-pipelines", - component: () => import(/* webpackChunkName: "PipelinesContainer" */ "../views/Pipelines/PipelinesContainer.vue"), - children: [ - { - path: "", - alias: ["", "setup"], - name: "project-pipelines-setup", - component: () => - import(/* webpackChunkName: "PipelinesSetupView" */ "../views/Pipelines/PipelinesSetupView.vue"), - }, - { - path: "presets", - name: "project-pipelines-presets", - component: () => - import(/* webpackChunkName: "PipelinePresetsView" */ "../views/Pipelines/PipelinePresetsView.vue"), - }, - ], - }, { path: "/project/bot-annotations", name: "project-bot-annotations", @@ -266,16 +247,21 @@ const routes: Array<RouteRecordRaw> = [ component: () => import(/* webpackChunkName: "OverviewView" */ "../views/Admin/OverviewView.vue"), }, { - path: "users/", + path: "users", name: "admin-users", component: () => import(/* webpackChunkName: "OverviewView" */ "../views/Admin/UserManagementView.vue"), }, { - path: "projects/", + path: "projects", name: "admin-projects", component: () => import(/* webpackChunkName: "ProjectManagementView" */ "../views/Admin/ProjectManagementView.vue"), }, + { + path: "celery", + name: "admin-celery", + component: () => import(/* webpackChunkName: "CeleryView" */ "../views/Admin/CeleryView.vue"), + }, ], }, { diff --git a/src/stores/CurrentProjectStore.ts b/src/stores/CurrentProjectStore.ts index 97343099d035f7a69794e872a7495c81ee105f10..8c11fe07732546b0e89d487bdac30ba6dec114bc 100644 --- a/src/stores/CurrentProjectStore.ts +++ b/src/stores/CurrentProjectStore.ts @@ -1,7 +1,7 @@ import { defineStore } from "pinia"; import { useStorage } from "@vueuse/core"; import type { RemovableRef } from "@vueuse/core"; -import type { ProjectModel, ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectModel, ProjectPermissionsModel } from "@/plugins/api/spec/types.gen"; import Serializer from "@/types/serializer"; const ProjectSerializer = Serializer<ProjectModel>(); diff --git a/src/stores/CurrentUserStore.ts b/src/stores/CurrentUserStore.ts index 4063885f244afe5fd6d48d39edaa1dee22f96f9e..8d24d6d754517c3eb163f7288270b802e38abeae 100644 --- a/src/stores/CurrentUserStore.ts +++ b/src/stores/CurrentUserStore.ts @@ -2,8 +2,8 @@ import { defineStore } from "pinia"; import type { RemovableRef } from "@vueuse/core"; import { useStorage } from "@vueuse/core"; import Serializer from "@/types/serializer"; -import type { AuthTokenModel, UserModel } from "@/plugins/api/api-core"; -import { API, toastReject } from "@/plugins/api"; +import type { AuthTokenModel, UserModel } from "@/plugins/api/spec/types.gen"; +import { API, toastReject, OpenAPI } from "@/plugins/api"; import { EventBus } from "@/plugins/events"; import { AuthFailedEvent, LoginSuccessEvent, LogoutSuccessEvent } from "@/plugins/events/events/auth"; @@ -41,9 +41,9 @@ export const useCurrentUserStore = defineStore("CurrentUserStore", { actions: { async login(username: string, password: string) { try { - const token = await API.core.oauth.loginForAccessTokenApiLoginTokenPost({ formData: { username, password } }); + const token = await API.oauth.loginForAccessTokenApiLoginTokenPost({ formData: { username, password } }); this.setAuthToken(token.data); - const me = await API.core.oauth.readUsersMeApiLoginMeGet(); + const me = await API.oauth.readUsersMeApiLoginMeGet(); this.setUser(me.data); EventBus.emit(new LoginSuccessEvent(me.data)); } catch (reason) { @@ -53,12 +53,12 @@ export const useCurrentUserStore = defineStore("CurrentUserStore", { } }, async loginWithAuthToken(token: string) { - API.core.request.config.TOKEN = token; + OpenAPI.TOKEN = token; try { - const userTokens = (await API.core.oauth.readTokensMeApiLoginMyTokensGet()).data; + const userTokens = (await API.oauth.readTokensMeApiLoginMyTokensGet()).data; if (userTokens[0].token_id === token) { this.setAuthToken(userTokens[0]); - const me = await API.core.oauth.readUsersMeApiLoginMeGet(); + const me = await API.oauth.readUsersMeApiLoginMeGet(); this.setUser(me.data); EventBus.emit(new LoginSuccessEvent(me.data)); } else { @@ -73,7 +73,7 @@ export const useCurrentUserStore = defineStore("CurrentUserStore", { async logout() { try { if (this.authToken) { - await API.core.oauth.logoutApiLoginLogoutGet(); + await API.oauth.logoutApiLoginLogoutGet(); } } catch (reason) { console.error(reason); @@ -84,13 +84,11 @@ export const useCurrentUserStore = defineStore("CurrentUserStore", { clear() { this.authToken = undefined; this.user = undefined; - API.core.request.config.TOKEN = undefined; - API.pipe.request.config.TOKEN = undefined; + OpenAPI.TOKEN = undefined; }, setAuthToken(authToken: AuthTokenModel) { this.authToken = authToken; - API.core.request.config.TOKEN = authToken.token_id; - API.pipe.request.config.TOKEN = authToken.token_id; + OpenAPI.TOKEN = authToken.token_id; }, setUser(user: UserModel) { this.user = user; @@ -98,7 +96,7 @@ export const useCurrentUserStore = defineStore("CurrentUserStore", { async extendAuthTokenValidity() { try { if (this.authToken) { - const newToken = await API.core.oauth.refreshTokenApiLoginTokenTokenIdPut({ + const newToken = await API.oauth.refreshTokenApiLoginTokenTokenIdPut({ tokenId: this.authToken.token_id, }); this.authToken = newToken.data; diff --git a/src/stores/PlatformUsersStore.ts b/src/stores/PlatformUsersStore.ts index c0a1b6938f30574acfd92991989b112b1de25328..88c498571d6ee27acbe2577c0c32df1f7890afe9 100644 --- a/src/stores/PlatformUsersStore.ts +++ b/src/stores/PlatformUsersStore.ts @@ -2,7 +2,7 @@ import { defineStore } from "pinia"; import type { RemovableRef } from "@vueuse/core"; import { useStorage } from "@vueuse/core"; import Serializer from "@/types/serializer"; -import type { DehydratedUser } from "@/plugins/api/api-core"; +import type { DehydratedUser } from "@/plugins/api/spec/types.gen"; import { API } from "@/plugins/api"; const UsersSerializer = Serializer<Array<DehydratedUser>>(); @@ -28,7 +28,7 @@ export const usePlatformUsersStore = defineStore("PlatformUsersStore", { actions: { async refresh() { try { - this.users = (await API.core.users.getAllUsersDehydratedApiUsersListAllDehydratedGet()).data; + this.users = (await API.users.getAllUsersDehydratedApiUsersListAllDehydratedGet()).data; this.lastUpdate = Date.now(); } catch (reason) { console.error(reason); diff --git a/src/stores/index.ts b/src/stores/index.ts index b2579b183d52c57cfcafdead1b233abc1bfabe1e..55ded42d45b725dcc6b6e372f1f8a75aeedc3c8c 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -2,11 +2,11 @@ import { createPinia } from "pinia"; import { useCurrentUserStore } from "@/stores/CurrentUserStore"; import { useCurrentProjectStore } from "@/stores/CurrentProjectStore"; import { useInterfaceSettingsStore } from "@/stores/InterfaceSettingsStore"; -import { API } from "@/plugins/api"; import { useRequestsStore } from "@/stores/RequestsStore"; import { ClearUserStoreEvent } from "@/plugins/events/events/auth"; import { EventBus } from "@/plugins/events"; import { usePlatformUsersStore } from "@/stores/PlatformUsersStore"; +import { OpenAPI } from "@/plugins/api"; const pinia = createPinia(); @@ -19,8 +19,7 @@ export const requestsStore = useRequestsStore(pinia); EventBus.on(ClearUserStoreEvent, currentUserStore.clear); if (currentUserStore.isAuthTokenValid) { - API.core.request.config.TOKEN = currentUserStore.authToken?.token_id; - API.pipe.request.config.TOKEN = currentUserStore.authToken?.token_id; + OpenAPI.TOKEN = currentUserStore.authToken?.token_id; } export default pinia; diff --git a/src/types/colours.ts b/src/types/colours.ts index 52a60fcc61585d872f64c473538b719b9ff87375..0751034c83b63dc8fb1b41b11ef83ffb840d5114 100644 --- a/src/types/colours.ts +++ b/src/types/colours.ts @@ -1,5 +1,5 @@ -import { AssignmentStatus } from "@/plugins/api/api-core"; -import type { AnnotationSchemeLabelChoice } from "@/plugins/api/api-core"; +import { type AssignmentStatus, AssignmentStatusEnum } from "@/plugins/api/types"; +import type { AnnotationSchemeLabelChoice } from "@/plugins/api/spec/types.gen"; export const cmap = [ "#e6194B", // # 0 @@ -62,10 +62,10 @@ export type Extractor<T, R> = (v: T) => R | undefined | null; export function lookupMakerStatus<T>(extract: Extractor<T, AssignmentStatus>): (v: T) => string { const mapper = lookupMaker<AssignmentStatus>( { - [AssignmentStatus.OPEN]: "white", - [AssignmentStatus.PARTIAL]: "yellow", - [AssignmentStatus.FULL]: "#42b983", - [AssignmentStatus.INVALID]: "red", + [AssignmentStatusEnum.OPEN]: "white", + [AssignmentStatusEnum.PARTIAL]: "yellow", + [AssignmentStatusEnum.FULL]: "#42b983", + [AssignmentStatusEnum.INVALID]: "red", }, "white", "white", diff --git a/src/types/imports.d.ts b/src/types/imports.d.ts index 8966e07c9fe024fb53796cad13db27ead89dce15..18997b70501fb649fd2e090c47a9739a0a7f6447 100644 --- a/src/types/imports.d.ts +++ b/src/types/imports.d.ts @@ -1,5 +1,5 @@ import { Component } from "vue"; -import { ImportType, ProjectType } from "@/plugins/api/api-core"; +import { ImportType, ProjectType } from "@/plugins/api/spec/types.gen"; export type ComponentMapping = { [key in ImportType]?: [string, Component] }; export type CompatibilityMapping = { [key in ProjectType]: ImportType[] }; diff --git a/src/types/items.d.ts b/src/types/items.d.ts index ee99357e3375de89ef1796aa9cc64001069450ec..689a9df7a9bf94f11f508091201602073921145b 100644 --- a/src/types/items.d.ts +++ b/src/types/items.d.ts @@ -1,4 +1,4 @@ -import { ItemModel, TwitterItemModel, AcademicItemModel } from "@/plugins/api/api-core"; +import { ItemModel, TwitterItemModel, AcademicItemModel } from "@/plugins/api/spec/types.gen"; export type BaseItem = ItemModel & { meta: Record<string, unknown> }; diff --git a/src/types/permissions.ts b/src/types/permissions.ts index a9e8b94b2c4cc4ebc05e468265546b028b3970c1..0232aba47ceae94dd6f51e0f76ca444def334d75 100644 --- a/src/types/permissions.ts +++ b/src/types/permissions.ts @@ -1,4 +1,4 @@ -import type { UserPermission } from "@/plugins/api/api-core"; +import type { UserPermission } from "@/plugins/api/spec/types.gen"; // https://github.com/typescript-eslint/typescript-eslint/issues/1824 export type PermissionKeys = diff --git a/src/types/pipelines.d.ts b/src/types/pipelines.d.ts deleted file mode 100644 index 701db377f804223990779c46772b160d2f314c87..0000000000000000000000000000000000000000 --- a/src/types/pipelines.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ArtefactReference, FunctionInfo, TaskInDB } from "@/plugins/api/api-pipe"; - -export type ArtefactCallback = (artefactRef: ArtefactReference) => void; - -export type ParamsType = { [key: string]: string | number | string[] | number[] | ArtefactReference }; - -export type NestedLibrary = { [key: string]: NestedLibrary | FunctionInfo }; - -export interface BaseTask { - task_id: string; - function_name: string; - params?: ParamsType; - user_id?: string; - project_id?: string; - location?: TaskInDB.location; -} - -export interface SubmittedTask extends BaseTask { - force_run: boolean; - forced_dependencies?: string[]; -} - -export interface TaskConfig { - task: SubmittedTask; - info: FunctionInfo; -} diff --git a/src/util/index.ts b/src/util/index.ts index 2b1d5538a393903eb50acbf4bf3476b32f90d41b..4763d98931cc0bc14aef4285ef41c0cb30b92dcb 100644 --- a/src/util/index.ts +++ b/src/util/index.ts @@ -1,6 +1,7 @@ import type { App } from "vue"; import type { RouteLocationNormalized, RouteRecordNormalized } from "vue-router"; -import { isFunctionInfo, isArtefactOrSerializedArtefact, type2str } from "@/util/typeChecks"; +import { marked } from "marked"; + // inspired by https://github.com/jashkenas/underscore/blob/master/modules/_shallowProperty.js // Internal helper to generate a function to obtain property `key` from `obj`. export function shallowProperty<T>(key: string) { @@ -97,6 +98,29 @@ export function dt2str(datetime: string | null | undefined): string | null { return null; } +export function md2html(s: string): string { + return marked.parse(s, { async: false }) as string; +} + +export type StringValues<T> = { + [K in keyof T]: T[K] extends string ? T[K] : never; +}[keyof T]; + +export type NumberValues<T> = { + [K in keyof T]: T[K] extends number ? T[K] : never; +}[keyof T]; + +/** + * Usage : type EnumValues = EnumAsUnion<typeof anEnum> + */ +export type EnumLiteral<T> = `${StringValues<T>}` | NumberValues<T>; + +/** + * Usage: type SearchParams = ArgumentTypes<typeof PipesService.searchTasksApiPipesTasksGet>[0]; + */ +// eslint-disable-next-line @typescript-eslint/ban-types +export type ArgumentTypes<F extends Function> = F extends (...args: infer A) => any ? A : never; + export default { install(app: App) { // eslint-disable-next-line no-param-reassign @@ -105,14 +129,12 @@ export default { range, isObject, isArray, - isFunctionInfo, - isArtefactOrSerializedArtefact, - type2str, - isOnRoute, notNone, isNone, is, + md2html, dt2str, + isOnRoute, }; }, }; diff --git a/src/util/nql/index.ts b/src/util/nql/index.ts index 349d5be4819c6381b146555dff9e67bb15902e9c..3c0100bc3b58d5b482718bf11192b0eecc8865aa 100644 --- a/src/util/nql/index.ts +++ b/src/util/nql/index.ts @@ -13,7 +13,7 @@ import type { MetaFilterInt, MetaFilterStr, SubQuery, -} from "@/plugins/api/api-core"; +} from "@/plugins/api/types"; export interface Column { grammar: Grammar; diff --git a/src/util/typeChecks.ts b/src/util/typeChecks.ts deleted file mode 100644 index 1f8b3a1b4c2b96fa1307c39f423524a28bcfd78c..0000000000000000000000000000000000000000 --- a/src/util/typeChecks.ts +++ /dev/null @@ -1,49 +0,0 @@ -import type { KWARG } from "@/plugins/api/api-pipe"; - -export function isFunctionInfo(obj: unknown) { - if (typeof obj !== "object" || !obj) return false; - return ( - "module" in obj && - "function" in obj && - "kwargs" in obj && - "name" in obj && - "docstring" in obj && - "artefacts" in obj && - "filepath" in obj && - "filepath_rel" in obj && - // && 'tags' in obj - // && 'recommended_lifetime' in obj - "est_cpu_load" in obj - ); -} - -export function isArtefactOrSerializedArtefact(obj: unknown) { - if (typeof obj !== "object" || !obj) return false; - return "serializer" in obj && "dtype" in obj && "filename" in obj; -} - -export function isNotImplemented() { - return false; -} - -export function type2str(tp: KWARG): string { - if (tp.artefact) { - return `Artefact[${tp.artefact.serializer}, ${tp.artefact.dtype}]`; - } - if (tp.options) { - return `Literal['${tp.options.join("', '")}']`; - } - if (tp.params) { - const parsedParams = Object.entries(tp.params).map(([key_, dtype_]) => `${key_}: ${type2str(dtype_)}`); - return `${tp.dtype}{${parsedParams.join(", ")}}`; - } - // FIXME deal with UNIONS where tp.dtype.length > 1 - let ret: string = tp.dtype[0]; - if (tp.generics) { - ret += `[${tp.generics.join(", ")}]`; - } - if (tp.default) { - ret += ` = ${tp.default}`; - } - return ret; -} diff --git a/src/views/Admin/AdminContainer.vue b/src/views/Admin/AdminContainer.vue index 93e103891b9ef2794dcff71cf2cc617a9716cb41..da74c129e8c2be6527a01a15dbf58d8c860303f8 100644 --- a/src/views/Admin/AdminContainer.vue +++ b/src/views/Admin/AdminContainer.vue @@ -10,7 +10,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentUserStore } from "@/stores"; -import type { UserModel } from "@/plugins/api/api-core"; +import type { UserModel } from "@/plugins/api/spec/types.gen"; type AdminContainerData = { user: UserModel; diff --git a/src/views/Admin/CeleryView.vue b/src/views/Admin/CeleryView.vue new file mode 100644 index 0000000000000000000000000000000000000000..5782c29257b10392374ef948b5b964f7054bb330 --- /dev/null +++ b/src/views/Admin/CeleryView.vue @@ -0,0 +1,18 @@ +<template> + <div>bla</div> +</template> + +<script lang="ts"> +import { defineComponent } from "vue"; + +export default defineComponent({ + name: "OverviewView", + data() { + return { + // pass + }; + }, +}); +</script> + +<style scoped></style> diff --git a/src/views/Admin/ProjectManagementView.vue b/src/views/Admin/ProjectManagementView.vue index 55a564d0937ebb7be354b5da5f0a3441e19e1fc2..de4df2c8563ddd01935daf5a752010a256967808 100644 --- a/src/views/Admin/ProjectManagementView.vue +++ b/src/views/Admin/ProjectManagementView.vue @@ -75,8 +75,8 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { API } from "@/plugins/api"; import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; -import type { ProjectModel } from "@/plugins/api/api-core"; -import { ItemType } from "@/plugins/api/api-core"; +import type { ProjectModel } from "@/plugins/api/spec/types.gen"; +import { ItemTypeEnum as ItemType } from "@/plugins/api/spec/enums.gen"; import ProjectTypeIcon from "@/components/ProjectTypeIcon.vue"; import { CurrentProjectSelectedEvent, CurrentProjectSetEvent } from "@/plugins/events/events/projects"; import { ConfirmationRequestEvent } from "@/plugins/events/events/confirmation"; @@ -98,7 +98,7 @@ export default defineComponent({ }, methods: { refreshData() { - API.core.projects + API.projects .getAllProjectsApiProjectsListGet() .then((response) => { this.projects = response.data; @@ -126,7 +126,7 @@ export default defineComponent({ } }, saveProject(project: ProjectModelExt) { - API.core.projects + API.projects .createProjectApiProjectsCreatePut({ requestBody: project, }) @@ -151,20 +151,6 @@ export default defineComponent({ (confirmationResponse) => { if (confirmationResponse === "ACCEPT") { EventBus.emit(new ToastEvent("WARN", "Not implemented yet, too dangerous.")); - /* - // TODO - API.core.projects.delete({ - projectId: project.project_id, - }).then(() => { - EventBus.emit(new ToastEvent('SUCCESS', `Deleted ${project.project_id}`)); - this.refreshData(); - }).catch(() => { - EventBus.emit(new ToastEvent( - 'ERROR', - `Failed to delete ${project.project_id}.`, - )); - }); - */ } }, "Delete project", diff --git a/src/views/Admin/UserManagementView.vue b/src/views/Admin/UserManagementView.vue index 302945876d88871f2d65cc36732eb08a8f29b7c0..3ea366acf04e781726689a5356a6a1eb5b741ae4 100644 --- a/src/views/Admin/UserManagementView.vue +++ b/src/views/Admin/UserManagementView.vue @@ -1,7 +1,7 @@ <template> <div> <ul class="list-group"> - <li v-for="user in users" :key="user.user_id" class="list-group-item p-4"> + <li v-for="user in users" :key="user.user_id as string" class="list-group-item p-4"> <div class="row"> <div class="col"> <div class="mb-2 d-flex justify-content-start"> @@ -140,7 +140,7 @@ import { defineComponent } from "vue"; import { API, toastReject } from "@/plugins/api"; import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; -import type { UserBaseModel } from "@/plugins/api/api-core"; +import type { UserBaseModel } from "@/plugins/api/spec/types.gen"; type UserModel = UserBaseModel & { password?: string; @@ -160,7 +160,7 @@ export default defineComponent({ }; }, mounted() { - API.core.users + API.users .getAllUsersApiUsersListAllGet() .then((response) => { this.users = response.data; @@ -183,7 +183,8 @@ export default defineComponent({ isNew: true, }); }, - deleteUser() { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + deleteUser(user: UserBaseModel) { EventBus.emit( new ToastEvent( "WARN", @@ -193,7 +194,7 @@ export default defineComponent({ ); }, saveUser(user: UserBaseModel) { - API.core.users + API.users .saveUserApiUsersDetailsPut({ requestBody: user, }) @@ -213,7 +214,7 @@ export default defineComponent({ console.log(user); }, resetPasswordMail(user: UserModel) { - API.core.mailing + API.mailing .resetPasswordApiMailResetPasswordUsernamePost({ username: user.username as string, }) @@ -223,7 +224,7 @@ export default defineComponent({ .catch(toastReject); }, sendWelcome(user: UserModel) { - API.core.mailing + API.mailing .welcomeMailApiMailWelcomePost({ username: user.username as string, password: user.password as string, diff --git a/src/views/Annotations/AnnotationConfigs/AnnotationConfigEditView.vue b/src/views/Annotations/AnnotationConfigs/AnnotationConfigEditView.vue index f57dd96863b8ec9b74e74a7241107df19225d8fb..e9988727a09cd1fc346d6ac3bbd066cf2633c53a 100644 --- a/src/views/Annotations/AnnotationConfigs/AnnotationConfigEditView.vue +++ b/src/views/Annotations/AnnotationConfigs/AnnotationConfigEditView.vue @@ -93,7 +93,11 @@ import { ToastEvent } from "@/plugins/events/events/toast"; import { ConfirmationRequestEvent } from "@/plugins/events/events/confirmation"; import { currentProjectStore } from "@/stores"; import AnnotationSchemeLabelsEditor from "@/components/annotations/AnnotationSchemeLabelsEditor.vue"; -import type { AnnotationSchemeLabel, AnnotationSchemeLabelChoice, AnnotationSchemeModel } from "@/plugins/api/api-core"; +import type { + AnnotationSchemeLabel, + AnnotationSchemeLabelChoice, + AnnotationSchemeModel, +} from "@/plugins/api/spec/types.gen"; import { API } from "@/plugins/api"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; @@ -120,14 +124,14 @@ export default defineComponent({ }, async mounted() { if (!this.isNewScheme) { - API.core.annotations + API.annotations .getSchemeDefinitionApiAnnotationsSchemesDefinitionAnnotationSchemeIdGet({ annotationSchemeId: this.annotationSchemeId as string, xProjectId: currentProjectStore.projectId as string, flat: false, }) .then((response) => { - this.scheme = ref(response.data); + this.scheme = ref(response.data as AnnotationSchemeModel); }) .catch(() => { EventBus.emit(new ToastEvent("ERROR", "Failed to load assignment scope info. Please try reloading.")); @@ -143,7 +147,7 @@ export default defineComponent({ "can lead to very unexpected behaviour. Are you sure you want to proceed?", (response) => { if (response === "ACCEPT") { - API.core.annotations + API.annotations .putAnnotationSchemeApiAnnotationsSchemesDefinitionPut({ xProjectId: currentProjectStore.projectId as string, requestBody: this.scheme, diff --git a/src/views/Annotations/AnnotationConfigs/AnnotationConfigListView.vue b/src/views/Annotations/AnnotationConfigs/AnnotationConfigListView.vue index 898d52cd40cd2d20f19a3c30745cc572ccb2de7e..a9c69ac8f4a6458070fbfefdf9186061f2b04b40 100644 --- a/src/views/Annotations/AnnotationConfigs/AnnotationConfigListView.vue +++ b/src/views/Annotations/AnnotationConfigs/AnnotationConfigListView.vue @@ -148,6 +148,8 @@ params: { bot_annotation_metadata_id: resolution.bot_annotation_metadata_id }, }" class="text-decoration-none flex-grow-1 d-flex text-black" + custom + v-slot="{ navigate }" > <span @click.stop="navigate" role="button" class="me-3 ms-2"> {{ resolution.name }} @@ -200,9 +202,8 @@ import type { AnnotationSchemeModel, AssignmentScopeModel, BotAnnotationMetaDataBaseModel, -} from "@/plugins/api/api-core"; -import { type ApiResponseReject } from "@/plugins/api"; -import { API } from "@/plugins/api"; +} from "@/plugins/api/spec/types.gen"; +import { type ApiResponseReject, API } from "@/plugins/api"; import PopOver from "@/components/PopOver.vue"; export default defineComponent({ @@ -222,20 +223,20 @@ export default defineComponent({ async refreshData() { try { this.projectSchemes = ( - await API.core.annotations.getSchemeDefinitionsForProjectApiAnnotationsSchemesListProjectIdGet({ + await API.annotations.getSchemeDefinitionsForProjectApiAnnotationsSchemesListProjectIdGet({ projectId: currentProjectStore.projectId as string, xProjectId: currentProjectStore.projectId as string, }) ).data; this.projectScopes = ( - await API.core.annotations.getAssignmentScopesForProjectApiAnnotationsAnnotateScopesGet({ + await API.annotations.getAssignmentScopesForProjectApiAnnotationsAnnotateScopesGet({ xProjectId: currentProjectStore.projectId as string, }) ).data; this.projectResolutions = ( - await API.core.annotations.listSavedResolvedAnnotationsApiAnnotationsConfigResolvedListGet({ + await API.annotations.listSavedResolvedAnnotationsApiAnnotationsConfigResolvedListGet({ xProjectId: currentProjectStore.projectId as string, }) ).data; @@ -254,7 +255,7 @@ export default defineComponent({ copy.name = `[COPY] ${scheme.name}`; try { - const copyId = await API.core.annotations.putAnnotationSchemeApiAnnotationsSchemesDefinitionPut({ + const copyId = await API.annotations.putAnnotationSchemeApiAnnotationsSchemesDefinitionPut({ xProjectId: currentProjectStore.projectId as string, requestBody: copy, }); @@ -262,7 +263,7 @@ export default defineComponent({ new ToastEvent("SUCCESS", `Created copy of the annotation scheme "${scheme.name}" with ID ${copyId.data}.`), ); - const schemes = await API.core.annotations.getSchemeDefinitionsForProjectApiAnnotationsSchemesListProjectIdGet({ + const schemes = await API.annotations.getSchemeDefinitionsForProjectApiAnnotationsSchemesListProjectIdGet({ projectId: currentProjectStore.projectId as string, xProjectId: currentProjectStore.projectId as string, }); @@ -280,7 +281,7 @@ export default defineComponent({ "This may result in deletion of all associated assignments and annotations or at least make them meaningless!", (confirmationResponse) => { if (confirmationResponse === "ACCEPT") { - API.core.annotations + API.annotations .removeAnnotationSchemeApiAnnotationsSchemesDefinitionSchemeIdDelete({ xProjectId: currentProjectStore.projectId as string, annotationSchemeId: scheme.annotation_scheme_id as string, @@ -307,7 +308,7 @@ export default defineComponent({ "This may result in deletion of all associated assignments and annotations or at least make them meaningless!", (confirmationResponse) => { if (confirmationResponse === "ACCEPT") { - API.core.annotations + API.annotations .removeAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdDelete({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: scope.assignment_scope_id as string, @@ -333,7 +334,7 @@ export default defineComponent({ `- ID: ${meta.bot_annotation_metadata_id}`, (confirmationResponse) => { if (confirmationResponse === "ACCEPT") { - API.core.annotations + API.annotations .deleteSavedResolvedAnnotationsApiAnnotationsConfigResolvedBotAnnotationMetaIdDelete({ botAnnotationMetadataId: meta.bot_annotation_metadata_id!, xProjectId: currentProjectStore.projectId as string, diff --git a/src/views/Annotations/AnnotationConfigs/AnnotationConfigResolveView.vue b/src/views/Annotations/AnnotationConfigs/AnnotationConfigResolveView.vue index debc5038d2b7ddcf97f031159647bb4bfd318d2c..072c454ea925565661f831c6c261fe97bfc824d8 100644 --- a/src/views/Annotations/AnnotationConfigs/AnnotationConfigResolveView.vue +++ b/src/views/Annotations/AnnotationConfigs/AnnotationConfigResolveView.vue @@ -174,8 +174,8 @@ import type { FlatLabel, BotMetaResolveBase, DehydratedUser, -} from "@/plugins/api/api-core"; -import { BotMetaResolve } from "@/plugins/api/api-core"; +} from "@/plugins/api/spec/types.gen"; +import { ResolutionMethodEnum } from "@/plugins/api/spec/enums.gen"; import { API, toastReject } from "@/plugins/api"; import ItemModal from "@/components/items/ItemModal.vue"; import ToolTip from "@/components/ToolTip.vue"; @@ -215,7 +215,7 @@ export default defineComponent({ settings: { ignore_hierarchy: false, ignore_repeat: false, - algorithm: BotMetaResolve.algorithm.MAJORITY, + algorithm: ResolutionMethodEnum.MAJORITY, } as BotMetaResolveBase, // Models @@ -250,7 +250,7 @@ export default defineComponent({ try { if (!this.isNew && this.bot_annotation_metadata_id) { const { meta, proposal } = ( - await API.core.annotations.getSavedResolvedAnnotationsApiAnnotationsConfigResolvedBotAnnotationMetadataIdGet({ + await API.annotations.getSavedResolvedAnnotationsApiAnnotationsConfigResolvedBotAnnotationMetadataIdGet({ botAnnotationMetadataId: this.bot_annotation_metadata_id, xProjectId: currentProjectStore.projectId as string, }) @@ -264,7 +264,7 @@ export default defineComponent({ } if (this.annotation_scheme_id) { this.annotationScheme = ( - await API.core.annotations.getSchemeDefinitionApiAnnotationsSchemesDefinitionAnnotationSchemeIdGet({ + await API.annotations.getSchemeDefinitionApiAnnotationsSchemesDefinitionAnnotationSchemeIdGet({ annotationSchemeId: this.annotation_scheme_id, xProjectId: currentProjectStore.projectId as string, flat: true, @@ -273,7 +273,7 @@ export default defineComponent({ } if (this.assignment_scope_id) { this.assignmentScope = ( - await API.core.annotations.getAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdGet({ + await API.annotations.getAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdGet({ assignmentScopeId: this.assignment_scope_id, xProjectId: currentProjectStore.projectId as string, }) @@ -301,7 +301,7 @@ export default defineComponent({ EventBus.emit(new ToastEvent("WARN", "Nothing to save (yet)!")); this.savingAllowed = true; } else { - API.core.annotations + API.annotations .updateResolvedAnnotationsApiAnnotationsConfigResolveUpdatePut({ botAnnotationMetadataId: this.bot_annotation_metadata_id as string, name: this.name, @@ -320,7 +320,7 @@ export default defineComponent({ EventBus.emit(new ToastEvent("WARN", "Nothing to save (yet)!")); this.savingAllowed = true; } else { - API.core.annotations + API.annotations .saveResolvedAnnotationsApiAnnotationsConfigResolvePut({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: this.assignment_scope_id, @@ -349,7 +349,7 @@ export default defineComponent({ }, fetchProposal() { this.loadingProposals = true; - API.core.annotations + API.annotations .getResolvedAnnotationsApiAnnotationsConfigResolvePost({ assignmentScopeId: this.assignment_scope_id, botAnnotationMetadatId: this.bot_annotation_metadata_id, diff --git a/src/views/Annotations/AnnotationConfigs/AnnotationConfigsContainer.vue b/src/views/Annotations/AnnotationConfigs/AnnotationConfigsContainer.vue index 40be6da51eab8154c077dc8c5efc1f00ecd91d7c..f7097894f3e5a7c16f3f28eb32ee08ce68100b0b 100644 --- a/src/views/Annotations/AnnotationConfigs/AnnotationConfigsContainer.vue +++ b/src/views/Annotations/AnnotationConfigs/AnnotationConfigsContainer.vue @@ -10,7 +10,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectPermissionsModel } from "@/plugins/api/spec/types.gen"; export default defineComponent({ name: "AnnotationConfigsContainer", diff --git a/src/views/Annotations/AnnotationConfigs/AssignmentScopeConfigView.vue b/src/views/Annotations/AnnotationConfigs/AssignmentScopeConfigView.vue index b3abae89f97f1554866762bff5482cca08a54488..550bfc1915d872f78be32ab90b95ac5fe278f9da 100644 --- a/src/views/Annotations/AnnotationConfigs/AssignmentScopeConfigView.vue +++ b/src/views/Annotations/AnnotationConfigs/AssignmentScopeConfigView.vue @@ -181,18 +181,24 @@ import RandomAssignmentWithExclusionConfig from "@/components/annotations/assign import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; import { ConfirmationRequestEvent } from "@/plugins/events/events/confirmation"; -import { API, ignore, logReject, toastReject } from "@/plugins/api"; -import type { ApiResponseReject } from "@/plugins/api"; +import { API, ignore, logReject, toastReject, type ApiResponseReject } from "@/plugins/api"; import type { AssignmentCounts, AssignmentScopeEntry, AssignmentScopeModel, HighlighterModel, UserModel, -} from "@/plugins/api/api-core"; + UserBaseModel, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + AssignmentScopeRandomWithNQLConfig, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + AssignmentScopeRandomWithExclusionConfig, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + AssignmentScopeRandomConfig, +} from "@/plugins/api/spec/types.gen"; +import { type AssignmentScopeBaseConfigTypes } from "@/plugins/api/types"; import { currentProjectStore } from "@/stores"; import ScopeQuality from "@/components/annotations/ScopeQuality.vue"; -import type { UserBaseModel } from "@/plugins/api/api-core"; import RandomAssignmentWithNQLConfig from "@/components/annotations/assignments/RandomAssignmentWithNQL.vue"; type AssignmentScopeConfigData = { @@ -205,7 +211,7 @@ type AssignmentScopeConfigData = { // users selected to be in the query pool selectedUsers: UserModel[]; // assignment strategy type - strategyConfigType?: "random"; + strategyConfigType?: AssignmentScopeBaseConfigTypes; // indicates whether this is (or will be) a newly created scope isNewScope: boolean; // holds the assignment counts (or undefined if none exist) @@ -253,7 +259,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.highlighters + API.highlighters .getProjectHighlightersApiHighlightersProjectGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -265,11 +271,11 @@ export default defineComponent({ }); if (!this.isNewScope) { Promise.allSettled([ - API.core.annotations.getAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdGet({ + API.annotations.getAssignmentScopeApiAnnotationsAnnotateScopeAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: this.scopeId as string, }), - API.core.annotations.getNumAssignmentsForScopeApiAnnotationsAnnotateScopeCountsAssignmentScopeIdGet({ + API.annotations.getNumAssignmentsForScopeApiAnnotationsAnnotateScopeCountsAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: this.scopeId as string, }), @@ -287,7 +293,7 @@ export default defineComponent({ if ((this.assignmentScope.config?.users || []).length > 0) { this.strategyConfigType = this.assignmentScope.config!.config_type; - API.core.users + API.users .getUsersByIdsApiUsersDetailsGet({ xProjectId: currentProjectStore.projectId as string, userId: this.assignmentScope.config!.users as string[], @@ -327,7 +333,7 @@ export default defineComponent({ }; payload.config.users = this.selectedUserIds; - API.core.annotations + API.annotations .makeAssignmentsApiAnnotationsConfigAssignmentsPost({ xProjectId: currentProjectStore.projectId as string, requestBody: payload, @@ -364,7 +370,7 @@ export default defineComponent({ if (!scope.highlighter_ids || scope.highlighter_ids.length === 0) { scope.highlighter_ids = undefined; } - API.core.annotations + API.annotations .putAssignmentScopeApiAnnotationsAnnotateScopePut({ xProjectId: currentProjectStore.projectId as string, requestBody: scope, @@ -395,7 +401,7 @@ export default defineComponent({ }, loadResults() { if (this.assignmentScope.assignment_scope_id) { - API.core.annotations + API.annotations .getNumAssignmentsForScopeApiAnnotationsAnnotateScopeCountsAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: this.assignmentScope.assignment_scope_id, @@ -407,7 +413,7 @@ export default defineComponent({ EventBus.emit(new ToastEvent("ERROR", "Failed to load assignment counts.")); }); - API.core.annotations + API.annotations .getAssignmentIndicatorsForScopeApiAnnotationsAnnotateAssignmentProgressAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: this.assignmentScope.assignment_scope_id, @@ -417,7 +423,7 @@ export default defineComponent({ }) .catch(toastReject); - API.core.users + API.users .getProjectAnnotatorUsersApiUsersListProjectAnnotatorsProjectIdGet({ projectId: currentProjectStore.projectId as string, xProjectId: currentProjectStore.projectId as string, @@ -430,7 +436,7 @@ export default defineComponent({ }, async loadListOfUsers() { this.users = []; - API.core.users + API.users .getProjectUsersApiUsersListProjectProjectIdGet({ xProjectId: currentProjectStore.projectId as string, projectId: currentProjectStore.projectId as string, @@ -444,7 +450,7 @@ export default defineComponent({ }, async sendReminders() { EventBus.emit(new ToastEvent("INFO", "Please only click the button once. Sending emails may take a while.")); - API.core.mailing + API.mailing .remindUsersAssigmentApiMailAssignmentReminderPost({ assignmentScopeId: this.assignmentScope.assignment_scope_id as string, xProjectId: currentProjectStore.projectId as string, diff --git a/src/views/Annotations/AnnotationConfigs/HighlightersView.vue b/src/views/Annotations/AnnotationConfigs/HighlightersView.vue index 7147b57d86848b841dd7e33e5f568068e905db9e..7adf0d236a9561ec623d577ce8376fa04d56b9c2 100644 --- a/src/views/Annotations/AnnotationConfigs/HighlightersView.vue +++ b/src/views/Annotations/AnnotationConfigs/HighlightersView.vue @@ -122,8 +122,7 @@ import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; -import type { HighlighterModel } from "@/plugins/api/api-core"; - +import type { HighlighterModel } from "@/plugins/api/types"; import { API, toastReject } from "@/plugins/api"; import ClosablePill from "@/components/ClosablePill.vue"; @@ -146,7 +145,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.highlighters + API.highlighters .getProjectHighlightersApiHighlightersProjectGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -169,13 +168,13 @@ export default defineComponent({ keywords: [], keywordsStr: "", style: "", - } as HighlighterModel); + } as Highlighter); }, saveHighlighter(highlighter: HighlighterModel) { const highlighterCopy = JSON.parse(JSON.stringify(highlighter)); delete highlighterCopy.keywordsStr; delete highlighterCopy.error; - API.core.highlighters + API.highlighters .upsertHighlighterApiHighlightersProjectPut({ xProjectId: currentProjectStore.projectId as string, requestBody: highlighter, diff --git a/src/views/Annotations/Annotations/AnnotationProgressView.vue b/src/views/Annotations/Annotations/AnnotationProgressView.vue index 1fe24a369a20169737c9b981cad892ed44781f1c..16bfa0c725e5e2cf7a8a5daf38dfdcf9b6b174fe 100644 --- a/src/views/Annotations/Annotations/AnnotationProgressView.vue +++ b/src/views/Annotations/Annotations/AnnotationProgressView.vue @@ -242,7 +242,7 @@ import type { DehydratedAnnotationTracker, LabelScope, ProjectPermissionsModel, -} from "@/plugins/api/api-core"; +} from "@/plugins/api/types"; import { currentProjectStore } from "@/stores"; import { API, ignore } from "@/plugins/api"; import ExpandableBox from "@/components/ExpandableBox.vue"; @@ -265,7 +265,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.evaluation + API.evaluation .getProjectTrackersApiEvalTrackingTrackersGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -274,7 +274,7 @@ export default defineComponent({ }) .catch(ignore); - API.core.evaluation + API.evaluation .getProjectScopesApiEvalTrackingScopesGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -301,7 +301,7 @@ export default defineComponent({ }, saveTracker() { if (this.trackerDetails) { - API.core.evaluation + API.evaluation .saveTrackerApiEvalTrackingTrackerPut({ xProjectId: currentProjectStore.projectId as string, requestBody: this.trackerDetails, @@ -322,7 +322,7 @@ export default defineComponent({ }, refreshTracker(reset: boolean) { if (this.trackerDetails) { - API.core.evaluation + API.evaluation .updateTrackerApiEvalTrackingRefreshPost({ xProjectId: this.trackerDetails.project_id as string, trackerId: this.trackerDetails.annotation_tracking_id as string, @@ -352,7 +352,7 @@ export default defineComponent({ } }, focus(tracker: DehydratedAnnotationTracker) { - API.core.evaluation + API.evaluation .getTrackerApiEvalTrackingTrackerTrackerIdGet({ xProjectId: currentProjectStore.projectId as string, trackerId: tracker.annotation_tracking_id as string, @@ -364,7 +364,7 @@ export default defineComponent({ }, refresh() { if (this.trackerDetails) { - API.core.evaluation + API.evaluation .getTrackerApiEvalTrackingTrackerTrackerIdGet({ xProjectId: currentProjectStore.projectId as string, trackerId: this.trackerDetails.annotation_tracking_id as string, diff --git a/src/views/Annotations/Annotations/AnnotationQualityView.vue b/src/views/Annotations/Annotations/AnnotationQualityView.vue index dbbbb90255cebd4df5f2560ac274d90511cb40ea..ae9192c61679cb39f3f84f13eec694bcc6ed2fac 100644 --- a/src/views/Annotations/Annotations/AnnotationQualityView.vue +++ b/src/views/Annotations/Annotations/AnnotationQualityView.vue @@ -23,10 +23,9 @@ <script lang="ts"> import { defineComponent } from "vue"; -import type { AssignmentCounts, UserBaseModel } from "@/plugins/api/api-core"; -import { currentProjectStore } from "@/stores"; import { API, ignore } from "@/plugins/api"; -import type { AnnotationSchemeModel, AssignmentScopeModel } from "@/plugins/api/api-core"; +import type { AssignmentCounts, UserBaseModel, AnnotationSchemeModel, AssignmentScopeModel } from "@/plugins/api/types"; +import { currentProjectStore } from "@/stores"; import ScopeQuality from "@/components/annotations/ScopeQuality.vue"; export default defineComponent({ @@ -41,7 +40,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.annotations + API.annotations .getSchemeDefinitionsForProjectApiAnnotationsSchemesListProjectIdGet({ projectId: currentProjectStore.projectId as string, xProjectId: currentProjectStore.projectId as string, @@ -50,7 +49,7 @@ export default defineComponent({ this.schemes = response.data; }) .catch(ignore); - API.core.annotations + API.annotations .getAssignmentScopesForProjectApiAnnotationsAnnotateScopesGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -58,7 +57,7 @@ export default defineComponent({ this.scopes = response.data; }) .catch(ignore); - API.core.users + API.users .getProjectAnnotatorUsersApiUsersListProjectAnnotatorsProjectIdGet({ projectId: currentProjectStore.projectId as string, xProjectId: currentProjectStore.projectId as string, diff --git a/src/views/Annotations/Annotations/AnnotationsView.vue b/src/views/Annotations/Annotations/AnnotationsView.vue index 3f4a1ddaba808de9e83488ca447856c2ed41d666..394cc5783b96e7490358272328a57775c8e8c24a 100644 --- a/src/views/Annotations/Annotations/AnnotationsView.vue +++ b/src/views/Annotations/Annotations/AnnotationsView.vue @@ -151,7 +151,7 @@ import AnyItemComponent from "@/components/items/AnyItem.vue"; import AnnotationLabels from "@/components/annotations/AnnotationLabels.vue"; import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; -import type { +import { AnnotationItem, AnnotationSchemeModel, AssignmentInfo, @@ -159,10 +159,12 @@ import type { AssignmentScopeEntry, AssignmentScopeModel, HighlighterModel, -} from "@/plugins/api/api-core"; -import { AssignmentStatus, AnnotationSchemeLabel } from "@/plugins/api/api-core"; -import type { AnyItem } from "@/types/items.d"; + KindEnum, + AssignmentStatus, + AnnotationSchemeLabel, +} from "@/plugins/api/types"; import { API, ignore } from "@/plugins/api"; +import type { AnyItem } from "@/types/items.d"; import { currentProjectStore, currentUserStore, interfaceSettingsStore } from "@/stores"; import { lookupMakerBool, lookupMakerChoice, lookupMakerStatus } from "@/types/colours"; @@ -268,25 +270,23 @@ export default defineComponent({ let response: AnnotationItem; if (currentAssignmentId) { response = ( - await API.core.annotations.getAssignmentApiAnnotationsAnnotateAssignmentAssignmentIdGet({ + await API.annotations.getAssignmentApiAnnotationsAnnotateAssignmentAssignmentIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentId: currentAssignmentId, }) ).data; } else { response = ( - await API.core.annotations.getNextOpenAssignmentForScopeForUserApiAnnotationsAnnotateNextAssignmentScopeIdGet( - { - xProjectId: currentProjectStore.projectId as string, - assignmentScopeId, - }, - ) + await API.annotations.getNextOpenAssignmentForScopeForUserApiAnnotationsAnnotateNextAssignmentScopeIdGet({ + xProjectId: currentProjectStore.projectId as string, + assignmentScopeId, + }) ).data; } await this.setCurrentAssignment(response); - API.core.highlighters + API.highlighters .getScopeHighlightersApiHighlightersScopeAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId, @@ -423,7 +423,7 @@ export default defineComponent({ scheme.labels = removeEmptyAnnotations(labels); // Send data to the server - API.core.annotations + API.annotations .saveAnnotationApiAnnotationsAnnotateSavePost({ xProjectId: currentProjectStore.projectId as string, requestBody: { @@ -464,7 +464,7 @@ export default defineComponent({ this.rerenderCounter += 1; // update the assignments progress bar - API.core.annotations + API.annotations .getAssignmentIndicatorsForScopeApiAnnotationsAnnotateAssignmentProgressAssignmentScopeIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentScopeId: annotationItem.scope.assignment_scope_id as string, @@ -486,7 +486,7 @@ export default defineComponent({ async saveAndGoto(targetAssignmentId: string) { await this.save(); - API.core.annotations + API.annotations .getAssignmentApiAnnotationsAnnotateAssignmentAssignmentIdGet({ xProjectId: currentProjectStore.projectId as string, assignmentId: targetAssignmentId, @@ -619,7 +619,7 @@ export default defineComponent({ return indicateStatusMapper; } - if (label.kind === AnnotationSchemeLabel.kind.SINGLE && label.choices) { + if (label.kind === KindEnum.SINGLE && label.choices) { return lookupMakerChoice<UserAssignmentInfo>( label.choices, false, @@ -627,7 +627,7 @@ export default defineComponent({ ); } - if (label.kind === AnnotationSchemeLabel.kind.BOOL) { + if (label.kind === KindEnum.BOOL) { return lookupMakerBool<UserAssignmentInfo>( (indicator: UserAssignmentInfo): boolean | null | undefined => indicator.labels?.[labelKey]?.[0]?.value_bool, ); diff --git a/src/views/Annotations/Annotations/AssignmentScopesView.vue b/src/views/Annotations/Annotations/AssignmentScopesView.vue index 5044b46439a4178368c41ac5293e01b516a3dfde..cb12352ceaefcd80e40d296323e3d185c362190c 100644 --- a/src/views/Annotations/Annotations/AssignmentScopesView.vue +++ b/src/views/Annotations/Annotations/AssignmentScopesView.vue @@ -98,7 +98,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; -import type { UserProjectAssignmentScope } from "@/plugins/api/api-core"; +import type { UserProjectAssignmentScope } from "@/plugins/api/types"; import { API, ignore } from "@/plugins/api"; enum Sort { @@ -121,7 +121,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.annotations + API.annotations .getAssignmentScopesForUserApiAnnotationsAnnotateScopesProjectIdGet({ projectId: currentProjectStore.projectId as string, xProjectId: currentProjectStore.projectId as string, diff --git a/src/views/Annotations/BotAnnotations/BotAnnotationsListView.vue b/src/views/Annotations/BotAnnotations/BotAnnotationsListView.vue index 95200e0dab40c567f7d11e51a762cd3d654d12fb..d914cada2a88023f352ebdda1f55cfcce764d43c 100644 --- a/src/views/Annotations/BotAnnotations/BotAnnotationsListView.vue +++ b/src/views/Annotations/BotAnnotations/BotAnnotationsListView.vue @@ -91,7 +91,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; -import type { BotMetaInfo } from "@/plugins/api/api-core"; +import type { BotMetaInfo } from "@/plugins/api/types"; import { API, ignore } from "@/plugins/api"; enum Sort { @@ -115,7 +115,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.annotations + API.annotations .getBotAnnotationsApiAnnotationsBotAnnotationsGet({ includeResolve: true, xProjectId: currentProjectStore.projectId as string, diff --git a/src/views/Artefacts/ArtefactDetailsView.vue b/src/views/Artefacts/ArtefactDetailsView.vue index cf4ff7e17e3d8846c479f3705d2e542cf18036b0..f81ed98e8c38a06adc84c2271be365549675d48e 100644 --- a/src/views/Artefacts/ArtefactDetailsView.vue +++ b/src/views/Artefacts/ArtefactDetailsView.vue @@ -81,13 +81,13 @@ </div> </div> </template> - <template v-else> Loading... </template> + <template v-else> Loading...</template> </div> </template> <script lang="ts"> import { defineComponent } from "vue"; -import type { FileOnDisk, TaskModel } from "@/plugins/api/api-pipe"; +import type { FileOnDisk, TaskModel } from "@/plugins/api/types"; import { API, toastReject } from "@/plugins/api"; import { currentProjectStore } from "@/stores"; // @ts-ignore @@ -107,9 +107,9 @@ export default defineComponent({ }; }, mounted() { - API.pipe.queue - .getTaskApiQueueTaskTaskIdGet({ - taskId: this.taskId as string, + API.pipes + .getTaskApiPipesTaskGet({ + xTaskId: this.taskId as string, xProjectId: currentProjectStore.projectId as string, }) .then((response) => { @@ -117,8 +117,8 @@ export default defineComponent({ }) .catch(toastReject); - API.pipe.artefacts - .getArtefactsApiArtefactsListGet({ + API.pipes + .getArtefactsApiPipesArtefactsListGet({ xTaskId: this.taskId as string, xProjectId: currentProjectStore.projectId as string, }) @@ -129,13 +129,13 @@ export default defineComponent({ }, methods: { downloadArchive() { - API.pipe.artefacts - .getArchiveApiArtefactsFilesGet({ + API.pipes + .getArchiveApiPipesArtefactsFilesGet({ xTaskId: this.taskId, xProjectId: currentProjectStore.projectId as string, }) .then((response) => { - const file = new File([response.data], "archive.zip", { type: "application/zip;charset=utf-8" }); + const file = new File([response.data as Blob], "archive.zip", { type: "application/zip;charset=utf-8" }); // FileSaver.saveAs(file); saveAs(file); }) @@ -143,22 +143,22 @@ export default defineComponent({ }, downloadFile(filename: string) { const parts = filename.split("/"); - API.pipe.artefacts - .getFileApiArtefactsFileGet({ + API.pipes + .getFileApiPipesArtefactsFileGet({ filename, xTaskId: this.taskId, xProjectId: currentProjectStore.projectId as string, }) .then((response) => { - const file = new File([response.data], parts[parts.length - 1]); + const file = new File([response.data as Blob], parts[parts.length - 1]); // FileSaver.saveAs(file); saveAs(file); }) .catch(toastReject); }, loadLog() { - API.pipe.artefacts - .getTaskLogApiArtefactsLogGet({ + API.pipes + .getTaskLogApiPipesArtefactsLogGet({ xTaskId: this.taskId, xProjectId: currentProjectStore.projectId as string, }) diff --git a/src/views/Artefacts/ArtefactsContainer.vue b/src/views/Artefacts/ArtefactsContainer.vue index 351742b2174882096b01c1e09a41e81610ba43dd..f3b323b3ee37c316a7c0947f64d6aaca0a66ff3c 100644 --- a/src/views/Artefacts/ArtefactsContainer.vue +++ b/src/views/Artefacts/ArtefactsContainer.vue @@ -10,7 +10,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectPermissionsModel } from "@/plugins/api/types"; export default defineComponent({ name: "ArtefactsContainer", diff --git a/src/views/Artefacts/ArtefactsListView.vue b/src/views/Artefacts/ArtefactsListView.vue index 8696fc0b0abc3d0e54db1271868ec332c1091409..32f194c9527d072fc2f010da7271b3aba75f8ce0 100644 --- a/src/views/Artefacts/ArtefactsListView.vue +++ b/src/views/Artefacts/ArtefactsListView.vue @@ -82,17 +82,16 @@ <script lang="ts"> import { defineComponent } from "vue"; import { marked } from "marked"; -import type { TaskModel, FunctionInfo, FileOnDisk, QueueService } from "@/plugins/api/api-pipe"; +import type { TaskModel, FileOnDisk } from "@/plugins/api/types"; import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; import { API } from "@/plugins/api"; +import type { PipesService } from "@/plugins/api/spec/services.gen"; import { currentProjectStore, currentUserStore } from "@/stores"; - -type SearchParams = Parameters<QueueService["searchTasksApiQueueSearchGet"]>[0]; +import { ArgumentTypes } from "@/util"; interface Entry { task: TaskModel; - info: FunctionInfo; showArtefacts: boolean; showLog: boolean; log: boolean; @@ -107,6 +106,8 @@ type ArtefactListData = { searchByTags?: string; }; +type SearchParams = ArgumentTypes<typeof PipesService.searchTasksApiPipesTasksGet>[0]; + export default defineComponent({ name: "ArtefactsListView", data(): ArtefactListData { @@ -124,7 +125,7 @@ export default defineComponent({ methods: { async loadEntries() { try { - const tasks = (await API.pipe.queue.searchTasksApiQueueSearchGet(this.searchObject)).data; + const tasks = (await API.pipes.searchTasksApiPipesTasksGet(this.searchObject)).data; if (!tasks || tasks.length === 0) { EventBus.emit( @@ -133,20 +134,8 @@ export default defineComponent({ return; } - const funcNames: string[] = Array.from(new Set(tasks.map((task: TaskModel) => task.function_name))); - const funcInfos = (await API.pipe.library.getFunctionInfosApiLibraryInfosGet({ funcName: funcNames })).data; - if (!funcInfos) { - EventBus.emit(new ToastEvent("ERROR", "Failed to load function infos. Please try reloading the page.")); - return; - } - - const funcs = Object.fromEntries( - funcInfos.map((func: FunctionInfo) => [`${func.module}.${func.function}`, func]), - ); - this.entries = tasks.map((task: TaskModel) => ({ task, - info: funcs[task.function_name], showArtefacts: false, showLog: false, log: false, @@ -157,11 +146,11 @@ export default defineComponent({ } }, md2html(s: string): string { - return marked(s); + return marked.parse(s, { async: false }) as string; }, async toggleEntry(entry: Entry) { const artefacts = ( - await API.pipe.artefacts.getArtefactsApiArtefactsListGet({ + await API.pipes.getArtefactsApiPipesArtefactsListGet({ xTaskId: entry.task.task_id as string, xProjectId: currentProjectStore.projectId as string, }) diff --git a/src/views/Dataset/DatasetContainer.vue b/src/views/Dataset/DatasetContainer.vue index d2e16fcca700a1a041b0bbc0b9aa6c3fc7a36bf1..0c686c3254de7a49102f3f6b8081120ab86af31d 100644 --- a/src/views/Dataset/DatasetContainer.vue +++ b/src/views/Dataset/DatasetContainer.vue @@ -10,7 +10,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectPermissionsModel } from "@/plugins/api/types"; export default defineComponent({ name: "DatasetContainer", diff --git a/src/views/Dataset/DatasetExportView.vue b/src/views/Dataset/DatasetExportView.vue index b9373431cd06355ed66a00654ecaf60cb50eb715..447c73830b74c210a46148b26bf02e203499f472 100644 --- a/src/views/Dataset/DatasetExportView.vue +++ b/src/views/Dataset/DatasetExportView.vue @@ -235,7 +235,7 @@ import { defineComponent } from "vue"; import { API, toastReject } from "@/plugins/api"; import { currentProjectStore } from "@/stores"; -import type { LabelOptions, ProjectBaseInfoEntry, ProjectBaseInfoScopeEntry } from "@/plugins/api/api-core"; +import type { LabelOptions, ProjectBaseInfoEntry, ProjectBaseInfoScopeEntry } from "@/plugins/api/types"; import NQLBox from "@/components/NQLBox.vue"; import { type Filter as NQLFilter } from "@/util/nql"; import { isEmpty } from "@/util"; @@ -263,7 +263,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.export + API.export .getExportBaseinfoApiExportProjectBaseinfoGet({ xProjectId: currentProjectStore.projectId as string }) .then((response) => { this.projectScopes = response.data.scopes; @@ -292,7 +292,7 @@ export default defineComponent({ }) as LabelOptions, ); - API.core.export + API.export .getAnnotationsCsvApiExportAnnotationsCsvPost({ xProjectId: currentProjectStore.projectId as string, requestBody: { diff --git a/src/views/Dataset/DatasetListView.vue b/src/views/Dataset/DatasetListView.vue index e20cf8bfa40c411fc278578a7a0e71c08a927b65..565b4cc9343eb7f3506981e00bd5245dcea890f8 100644 --- a/src/views/Dataset/DatasetListView.vue +++ b/src/views/Dataset/DatasetListView.vue @@ -143,7 +143,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.project + API.project .countProjectItemsApiProjectItemsCountGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -168,7 +168,7 @@ export default defineComponent({ }, fetchData({ currentPage, currentPageSize }: UseOffsetPaginationReturn): void { if (this.queryParsed.length > 0) { - API.core.search + API.search .nqlQueryApiSearchNqlQueryPost({ xProjectId: currentProjectStore.projectId as string, requestBody: this.queryParsed[0], @@ -183,7 +183,7 @@ export default defineComponent({ }) .catch(toastReject); } else { - API.core.project + API.project .listProjectDataPagedApiProjectItemsItemTypeListPagePageSizeGet({ xProjectId: currentProjectStore.projectId as string, page: this.pagination.currentPage, diff --git a/src/views/Dataset/DatasetStatisticsView.vue b/src/views/Dataset/DatasetStatisticsView.vue index e1a476c732855452d8de05e5e7a0d2b05ab9a89f..82fcf01f9ff3269700037e32896a6091a29c5c01 100644 --- a/src/views/Dataset/DatasetStatisticsView.vue +++ b/src/views/Dataset/DatasetStatisticsView.vue @@ -62,7 +62,7 @@ import { Bar } from "vue-chartjs"; import { Chart as ChartJS, Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale } from "chart.js"; import { API, ignore } from "@/plugins/api"; import { currentProjectStore } from "@/stores"; -import type { BasicProjectStats, HistogramEntry, RankEntry } from "@/plugins/api/api-core"; +import type { BasicProjectStats, HistogramEntry, RankEntry } from "@/plugins/api/types"; ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale); @@ -77,19 +77,19 @@ export default defineComponent({ }; }, mounted() { - API.core.stats + API.stats .getBasicStatsApiStatsBasicsGet({ xProjectId: currentProjectStore.projectId as string }) .then((response) => { this.basic = response.data; }) .catch(ignore); - API.core.stats + API.stats .getAnnotatorRankingApiStatsRankGet({ xProjectId: currentProjectStore.projectId as string }) .then((response) => { this.leaderboard = response.data; }) .catch(ignore); - API.core.stats + API.stats .getPublicationYearHistogramApiStatsHistogramYearsGet({ xProjectId: currentProjectStore.projectId as string }) .then((response) => { this.histogramYears = response.data; diff --git a/src/views/Imports/ImportDetailsView.vue b/src/views/Imports/ImportDetailsView.vue index c58047a03be29f16015c8555d66b2502a5021d46..d2527568e402d5190c83047e72c37f7ef9c1a22d 100644 --- a/src/views/Imports/ImportDetailsView.vue +++ b/src/views/Imports/ImportDetailsView.vue @@ -102,14 +102,11 @@ import { defineComponent } from "vue"; import type { Component } from "vue"; import { ToastEvent } from "@/plugins/events/events/toast"; import { EventBus } from "@/plugins/events"; -import { ItemType } from "@/plugins/api/api-core"; -import type { ImportModel, ProjectModel, ProjectPermissionsModel } from "@/plugins/api/api-core"; -import ConfigTwitter from "@/components/imports/ConfigTwitter.vue"; +import { ItemType } from "@/plugins/api/types"; +import type { ImportModel, ProjectModel, ProjectPermissionsModel } from "@/plugins/api/types"; import ConfigWoS from "@/components/imports/ConfigWoS.vue"; import ConfigJSONLOpenAlexWorks from "@/components/imports/ConfigJSONLOpenAlexWorks.vue"; import ConfigJSONLAcademicItem from "@/components/imports/ConfigJSONLAcademicItem.vue"; -import ConfigJSONLTwitterAPI from "@/components/imports/ConfigJSONLTwitterAPI.vue"; -import ConfigJSONLTwitterDb from "@/components/imports/ConfigJSONLTwitterDb.vue"; import ConfigScopus from "@/components/imports/ConfigScopus.vue"; import { currentProjectStore, currentUserStore } from "@/stores"; import { ConfirmationRequestEvent } from "@/plugins/events/events/confirmation"; @@ -144,23 +141,12 @@ const configs: Record<string, ConfigOption> = { component: ConfigJSONLAcademicItem, name: "Upload JSONl file (AcademicItemModel)", }, - twitterApi: { - component: ConfigTwitter, - name: "Twitter Search API", - }, - twitterDbFile: { - component: ConfigJSONLTwitterDb, - name: "Import JSONl file (TwitterItemModel)", - }, - twitterApiFile: { - component: ConfigJSONLTwitterAPI, - name: "Import JSONl file (API dump)", - }, }; export const projectTypeImportTypeCompatibility: { [key in ProjectModel["type"]]: string[] } = { academic: ["academicFile", "oaFile", "oa", "scopusCSV", "wos"], - twitter: ["twitterApi", "twitterApiFile", "twitterDbFile"], + // twitter: ["twitterApi", "twitterApiFile", "twitterDbFile"], + twitter: [], lexis: [], generic: [], patents: [], @@ -183,11 +169,8 @@ type ImportDetails = { export default defineComponent({ name: "ImportDetailsView", components: { - ConfigJSONLTwitterDb, ConfigScopus, ConfigWoS, - ConfigJSONLTwitterAPI, - ConfigTwitter, ConfigJSONLAcademicItem, ConfigJSONLOpenAlexWorks, ConfigOpenAlex, @@ -221,7 +204,7 @@ export default defineComponent({ methods: { fetchImportDetails(onDone?: () => void) { if (this.importId) { - API.core.imports + API.imports .getImportDetailsApiImportsImportImportIdGet({ importId: this.importId, xProjectId: currentProjectStore.projectId as string, @@ -258,7 +241,7 @@ export default defineComponent({ ); }, async saveRequest() { - API.core.imports + API.imports .putImportDetailsApiImportsImportPut({ // @ts-ignore requestBody: this.importDetails, @@ -303,7 +286,7 @@ export default defineComponent({ "Make sure to **click save before importing**!", (response) => { if (response === "ACCEPT") { - API.core.imports + API.imports .triggerImportApiImportsImportImportIdPost({ importId: this.importId as string, xProjectId: currentProjectStore.projectId as string, @@ -327,7 +310,7 @@ export default defineComponent({ ); }, async loadImportStats() { - API.core.imports + API.imports .getImportCountsApiImportsImportImportIdCountGet({ importId: this.importId as string, xProjectId: currentProjectStore.projectId as string, diff --git a/src/views/Imports/ImportsContainer.vue b/src/views/Imports/ImportsContainer.vue index 6abd3a92eacadd1c40067d9726da5beb74e13407..b149251e05510e7b89ad9d616f187fed60080578 100644 --- a/src/views/Imports/ImportsContainer.vue +++ b/src/views/Imports/ImportsContainer.vue @@ -10,7 +10,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectPermissionsModel } from "@/plugins/api/types"; export default defineComponent({ name: "ImportsContainer", diff --git a/src/views/Imports/ImportsListView.vue b/src/views/Imports/ImportsListView.vue index b06c0da94f843c1572cbcb83be1b54848ff2e45b..ae6b68836991c55d10f4f641fc22665a9216edc3 100644 --- a/src/views/Imports/ImportsListView.vue +++ b/src/views/Imports/ImportsListView.vue @@ -45,7 +45,7 @@ class="link-secondary me-2" aria-label="Copy import" tabindex="0" - @click="copyImport(importDetails)" + @click.stop="copyImport(importDetails)" > <InlineToolTip info="Copy"> <font-awesome-icon :icon="['far', 'clone']" /> @@ -56,7 +56,7 @@ class="link-secondary me-2" aria-label="Delete import" tabindex="0" - @click="removeImport(importDetails)" + @click.stop="removeImport(importDetails)" > <InlineToolTip info="Delete"> <font-awesome-icon :icon="['fas', 'trash-can']" /> @@ -124,7 +124,7 @@ <script lang="ts"> import { defineComponent } from "vue"; -import type { ImportModel } from "@/plugins/api/api-core"; +import type { ImportModel } from "@/plugins/api/types"; import InlineToolTip from "@/components/InlineToolTip.vue"; import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; @@ -152,7 +152,7 @@ export default defineComponent({ }; }, async mounted() { - API.core.imports + API.imports .getAllImportsForProjectApiImportsListGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -190,7 +190,7 @@ export default defineComponent({ // append "copy", so that the user has a chance to distinguish the new entry from the old one newImport.name += " copy"; - API.core.imports + API.imports .putImportDetailsApiImportsImportPut({ requestBody: newImport, xProjectId: currentProjectStore.projectId as string, @@ -204,7 +204,7 @@ export default defineComponent({ } // save again since we changed the config - API.core.imports + API.imports .putImportDetailsApiImportsImportPut({ requestBody: newImport, xProjectId: currentProjectStore.projectId as string, @@ -237,7 +237,7 @@ export default defineComponent({ "other imports). Any annotations associated with these items will also be lost.", (confirmationResponse) => { if (confirmationResponse === "ACCEPT") { - API.core.imports + API.imports .deleteImportDetailsApiImportsImportDeleteImportIdDelete({ // @ts-ignore importId: importDetails.import_id, diff --git a/src/views/Imports/OpenAlexSearchView.vue b/src/views/Imports/OpenAlexSearchView.vue index 4ca3cb9143e7caab56e6a3a8c59eea5195eb5742..2684eb21ee0bdd6b0c9fef27564fa3b19ea70128 100644 --- a/src/views/Imports/OpenAlexSearchView.vue +++ b/src/views/Imports/OpenAlexSearchView.vue @@ -231,7 +231,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { Bar } from "vue-chartjs"; import { BarElement, CategoryScale, Chart as ChartJS, Legend, LinearScale, Title, Tooltip } from "chart.js"; import type { ChartOptions, ChartData } from "chart.js"; -import type { AcademicItemModel, TermStats } from "@/plugins/api/api-core"; +import type { AcademicItemModel, TermStats } from "@/plugins/api/types"; import { currentProjectStore } from "@/stores"; import { EventBus } from "@/plugins/events"; import { ToastEvent } from "@/plugins/events/events/toast"; @@ -285,7 +285,7 @@ export default defineComponent({ } }, runSearch() { - API.core.search + API.search .searchOpenalexApiSearchOpenalexSelectPost({ query: this.query, xProjectId: currentProjectStore.projectId as string, @@ -311,7 +311,7 @@ export default defineComponent({ }); }, expandTokens() { - API.core.search + API.search .termExpansionApiSearchOpenalexTermsGet({ xProjectId: currentProjectStore.projectId as string, termPrefix: this.tokenSearchPrefix, diff --git a/src/views/ParseView.vue b/src/views/ParseView.vue index 2734a0c67be7a47b741e5de36f0b2a52d331627c..b587245845059faa0926b256bf7ebb37a5bf48d9 100644 --- a/src/views/ParseView.vue +++ b/src/views/ParseView.vue @@ -102,7 +102,7 @@ export default defineComponent({ ask() { const query = debug(this.queryStr); this.count = -1; - API.core.search + API.search .nqlQueryApiSearchNqlQueryPost({ xProjectId: currentProjectStore.projectId as string, requestBody: query[0], diff --git a/src/views/Pipelines/PipelinePresetsView.vue b/src/views/Pipelines/PipelinePresetsView.vue deleted file mode 100644 index fde22480fc1a79c5d2c98f7abba13a7a5f378c5f..0000000000000000000000000000000000000000 --- a/src/views/Pipelines/PipelinePresetsView.vue +++ /dev/null @@ -1,38 +0,0 @@ -<template> - <div> - <div class="row"> - <h2>Pipeline setup</h2> - </div> - <div class="row"> - <span class="text-warning"> - <strong>TODO:</strong> have useful presets of entire (configured) pipelines of sub-tasks. For example, instead - of scraping WoS, deduplicating, cleaning, .... import tasks, have a preset that sensibly combines all these - steps with good preset parameters. - </span> - </div> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; - -export default defineComponent({ - name: "PipelinePresetsView", - data() { - return { - // pass - }; - }, - async mounted() { - // pass - }, - methods: { - // pass - }, - computed: { - // pass - }, -}); -</script> - -<style scoped></style> diff --git a/src/views/Pipelines/PipelinesContainer.vue b/src/views/Pipelines/PipelinesContainer.vue deleted file mode 100644 index c20e7c41bfa6f832e55ad4f1458e99a3577c2c9e..0000000000000000000000000000000000000000 --- a/src/views/Pipelines/PipelinesContainer.vue +++ /dev/null @@ -1,25 +0,0 @@ -<template> - <div> - <div v-if="projectPermissions.pipelines_read"> - <router-view /> - </div> - <div v-else>Unfortunately, you don't have permission to access this page.</div> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import { currentProjectStore } from "@/stores"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; - -export default defineComponent({ - name: "PipelinesContainer", - data() { - return { - projectPermissions: currentProjectStore.projectPermissions as ProjectPermissionsModel, - }; - }, -}); -</script> - -<style scoped></style> diff --git a/src/views/Pipelines/PipelinesSetupView.vue b/src/views/Pipelines/PipelinesSetupView.vue deleted file mode 100644 index 8896556f571a185b8473da56998bd021868e5091..0000000000000000000000000000000000000000 --- a/src/views/Pipelines/PipelinesSetupView.vue +++ /dev/null @@ -1,376 +0,0 @@ -<template> - <div> - <div class="row"> - <h2>Pipeline setup</h2> - </div> - <div class="row g-2"> - <!-- Library Explorer --> - <div class="col-4"> - <div class="card"> - <div class="card-header d-flex"> - Library - <font-awesome-icon - type="button" - class="btn ms-auto small text-muted" - :icon="['fas', 'rotate-right']" - @click="reloadLibrary" - /> - </div> - <div class="card-body p-0 pt-2"> - <NestedExpandableComponent - :tree="nestedLibrary" - class="border-start-0" - @showInfo="highlight = $event" - @useFunc="addTask($event)" - /> - </div> - </div> - </div> - <!-- /Library Explorer --> - - <!-- Config Pane --> - <div class="col"> - <div class="card"> - <div class="card-body"> - <div class="d-flex mb-2"> - <button type="button" class="btn btn-success ms-auto" @click="submitTasks">Submit</button> - </div> - - <template v-for="config in configs" :key="config.task.task_id"> - <TaskConfigComponent - :config="config" - class="mb-2" - ref="taskConfigs" - @showInfo="highlight = $event" - @pickArtefactReference="pickReference($event)" - /> - </template> - </div> - </div> - </div> - <!-- /Config Pane --> - </div> - - <!-- FunctionInfo Card --> - <div v-if="highlight !== undefined"> - <!-- FIXME @click="highlight=undefined" --> - <div class="modal fade show" tabindex="-1" style="display: block" data-bs-backdrop="static"> - <div class="modal-dialog modal-dialog-centered modal-xl"> - <div class="modal-content"> - <div class="modal-header"> - <h5 class="modal-title">{{ highlight.name }}</h5> - <button - type="button" - class="btn-close" - data-bs-dismiss="modal" - aria-label="Close" - @click="highlight = undefined" - /> - </div> - <div class="modal-body text-start"> - <div class="d-flex flex-row flex-wrap" style="gap: 2rem"> - <ul class="list-unstyled small text-muted m-0"> - <li> - {{ highlight.module }}.<strong>{{ highlight.function }}(⋅)</strong> - </li> - <li> - <strong>Parameters:</strong> - <ul class="list-unstyled ms-2"> - <li v-for="(tp, arg) in highlight.kwargs" :key="arg"> - <code - ><strong>{{ arg }}:</strong><span v-if="tp.optional !== true">*</span> - {{ $util.type2str(tp) }}</code - > - </li> - </ul> - </li> - <li><strong>Location:</strong> {{ highlight.filepath_rel }}</li> - <li v-if="highlight.tags"><strong>Tags:</strong> {{ highlight.tags.join(", ") }}</li> - <li><strong>CPU load:</strong> {{ highlight.est_cpu_load }}</li> - <li v-if="highlight.recommended_lifetime"> - <strong>Artefact lifetime:</strong> {{ highlight.recommended_lifetime }} days - </li> - <li v-if="!$util.isEmpty(highlight.artefacts)"> - <strong>Produced artefacts:</strong> - <ul class="list-unstyled ms-2"> - <li v-for="(artefact, aKey) in highlight.artefacts" :key="aKey"> - <code> - <strong>{{ aKey }}:</strong> - Artefact[{{ artefact.serializer }}, {{ artefact.dtype }}]({{ artefact.filename }}) - </code> - </li> - </ul> - </li> - </ul> - <pre class="card p-2 pb-0 flex-fill col-md-6"> - <code v-html="md2html(highlight.docstring)" /> - </pre> - </div> - </div> - </div> - </div> - </div> - <div class="modal-backdrop fade show" /> - </div> - <!-- /FunctionInfo Card --> - - <!-- Artefact Reference Picker --> - <div v-if="artefactQuery !== undefined"> - <div class="modal fade show" tabindex="-1" style="display: block" data-bs-backdrop="static"> - <div class="modal-dialog modal-dialog-centered modal-xl"> - <div class="modal-content"> - <div class="modal-header"> - <h5 class="modal-title">Pick reference for artefact</h5> - <button - type="button" - class="btn-close" - data-bs-dismiss="modal" - aria-label="Close" - @click="resolveReferenceQuery(false)" - /> - </div> - <div class="modal-body text-start"> - <font-awesome-icon - type="button" - class="btn ms-auto small text-muted" - :icon="['fas', 'rotate-right']" - @click="loadQueuedTasks" - /> - <ul class="list-group"> - <!-- List of tasks currently configured --> - <li - class="list-group-item list-group-item-warning" - v-for="config in configs" - :key="config.task.task_id" - > - <strong>{{ config.task.task_id }}</strong> {{ config.info.name }} - <code>{{ config.info.function }}(⋅)</code><br /> - <button - type="button" - class="btn btn-outline-secondary btn-sm" - v-for="(atype, art) in config.info.artefacts" - :key="art" - @click="selectReference(config.task.task_id, art)" - > - <strong>{{ art }}:</strong> <code>Artefact[{{ atype.serializer }}, {{ atype.dtype }}]</code> - </button> - </li> - - <!-- List of tasks in the DB --> - <li class="list-group-item list-group-item-info" v-for="task in queuedTasks" :key="task.task_id"> - <strong>{{ task.task_id }}</strong> - <code>{{ task.function_name }}(⋅)</code><br /> - {{ task.comment }} - <button - type="button" - class="btn btn-outline-secondary btn-sm" - v-for="(atype, art) in getInfoByName(task.function_name)?.artefacts" - :key="art" - @click="selectReference(task.task_id, art)" - > - <strong>{{ art }}:</strong> <code>Artefact[{{ atype.serializer }}, {{ atype.dtype }}]</code> - </button> - </li> - </ul> - <h5 class="mt-2">Selected:</h5> - <ul class="list-unstyled"> - <li><strong>Task:</strong> {{ artefactQueryReference?.task_id || "[REF?]" }}</li> - <li><strong>Artefact:</strong> {{ artefactQueryReference?.artefact || "[REF?]" }}</li> - </ul> - <div class="d-flex justify-content-end"> - <button type="button" class="btn btn-outline-secondary m-2" @click="resolveReferenceQuery(false)"> - Cancel - </button> - <button type="button" class="btn btn-success m-2" @click="resolveReferenceQuery(true)">Select</button> - </div> - </div> - </div> - </div> - </div> - <div class="modal-backdrop fade show" /> - </div> - <!-- /Artefact Reference Picker --> - </div> -</template> - -<script lang="ts"> -import { defineComponent } from "vue"; -import { marked } from "marked"; -import { EventBus } from "@/plugins/events"; -import { ToastEvent } from "@/plugins/events/events/toast"; -import NestedExpandableComponent from "@/components/pipelines/NestedExpandableComponent.vue"; -import TaskConfigComponent from "@/components/pipelines/TaskConfig.vue"; -import { ConfirmationRequestEvent } from "@/plugins/events/events/confirmation"; -import { currentProjectStore, currentUserStore } from "@/stores"; -import { API, toastReject } from "@/plugins/api"; -import type { FunctionInfo, SerializedArtefact, TaskModel, SerializedArtefactReference } from "@/plugins/api/api-pipe"; -import type { ArtefactCallback, TaskConfig, NestedLibrary } from "@/types/pipelines.d"; - -export default defineComponent({ - name: "PipelinesSetupView", - components: { TaskConfigComponent, NestedExpandableComponent }, - data() { - return { - library: [] as FunctionInfo[], - highlight: undefined as FunctionInfo | undefined, - artefactQuery: undefined as SerializedArtefact | undefined, - artefactQueryCallback: undefined as ArtefactCallback | undefined, - artefactQueryReference: undefined as SerializedArtefactReference | undefined, - queuedTasks: [] as TaskModel[], - configs: [] as TaskConfig[], - }; - }, - async mounted() { - API.pipe.library - .getFullLibraryApiLibraryListGet() - .then((response) => { - this.library = response.data; - }) - .catch(toastReject); - }, - methods: { - async reloadLibrary() { - try { - const numFunctions = (await API.pipe.library.reloadLibraryApiLibraryRefreshPatch()).data; - this.library = (await API.pipe.library.getFullLibraryApiLibraryListGet()).data; - EventBus.emit(new ToastEvent("INFO", `Reload of library done, found ${numFunctions} functions.`)); - } catch (e) { - console.error(e); - } - }, - md2html(s: string): string { - return marked(s.trim()); - }, - async loadQueuedTasks() { - // TODO: Add type matching -> Only show tasks where an output artefact matches the type of the param artefact type - // FIXME: Add some filters? Ideally configurable in the interface (only this project, only current user). - API.pipe.queue - .searchTasksApiQueueSearchGet({ - xProjectId: currentProjectStore.projectId as string, - }) - .then((response) => { - this.queuedTasks = response.data; - }) - .catch(toastReject); - }, - pickReference(query: [SerializedArtefact, SerializedArtefactReference]) { - const [artefact, cb] = query; - this.artefactQuery = artefact; - // @ts-ignore FIXME - this.artefactQueryCallback = cb; - this.artefactQueryReference = { - // @ts-ignore FIXME - task_id: undefined, - // @ts-ignore FIXME - artefact: undefined, - }; - }, - selectReference(taskId: string, artefact: string) { - if (this.artefactQueryReference) { - this.artefactQueryReference.task_id = taskId; - this.artefactQueryReference.artefact = artefact; - } - }, - resolveReferenceQuery(respond = true) { - if (respond && this.artefactQueryCallback) { - this.artefactQueryCallback(JSON.parse(JSON.stringify(this.artefactQueryReference))); - } - this.artefactQuery = undefined; - this.artefactQueryReference = undefined; - this.artefactQueryCallback = undefined; - }, - getInfoByName(functionName: string) { - return this.library.find((info: FunctionInfo) => `${info.module}.${info.function}` === functionName); - }, - addTask(info: FunctionInfo) { - this.configs.push({ - task: { - task_id: crypto.randomUUID(), - function_name: `${info.module}.${info.function}`, - force_run: false, - params: {}, - user_id: currentUserStore.user?.user_id, - project_id: currentProjectStore.projectId, - }, - info, - }); - }, - submitTasks() { - // TODO check that all non-optional parameters are filled - // TODO hide submit button otherwise (and if this.configs.length === 0) - EventBus.emit( - new ConfirmationRequestEvent( - "This will submit all the tasks configured in this view to the compute pipeline. " + - "Please only proceed if you know exactly what you are doing!\n\n" + - "Cancellation of tasks is currently not implemented, so proceeding is extra-dangerous.", - (confirmationResponse) => { - if (confirmationResponse === "ACCEPT") { - // TODO implement - - const tasks = JSON.parse( - JSON.stringify( - Object.fromEntries(this.configs.map((config: TaskConfig) => [config.task.task_id, config.task])), - ), - ); - - // @ts-ignore FIXME - // eslint-disable-next-line @typescript-eslint/no-explicit-any - this.$refs.taskConfigs.forEach((config: any) => { - tasks[config.config.task.task_id].params = JSON.stringify(config.getTaskParams()); - }); - API.pipe.queue - .submitBulkApiQueueSubmitTasksPut({ - xProjectId: currentProjectStore.projectId as string, - requestBody: Object.values(tasks), - }) - .then((response) => { - EventBus.emit(new ToastEvent("SUCCESS", `Submitted ${response.data?.length} tasks to the queue!`)); - }) - .catch((reason) => { - console.error(reason); - EventBus.emit(new ToastEvent("ERROR", "Failed to submit tasks!")); - }); - } - }, - "Submission of Task(s)", - "Yes, proceed", - "Cancel", - ), - ); - }, - }, - computed: { - filteredLibrary(): FunctionInfo[] { - // TODO filter library by search queries - // -> by tag - // -> keywords in the docstring - // -> artefact types - // -> has matching artefact in queue (non-failed tasks) - return this.library; - }, - nestedLibrary(): NestedLibrary { - const ret: NestedLibrary = {}; - - function setInfo(path: string[], info: FunctionInfo) { - let ptr = ret; - path.forEach((key: string) => { - if (!(key in ptr)) { - ptr[key] = {}; - } - ptr = ptr[key] as NestedLibrary; - }); - ptr[info.function] = info; - } - - this.filteredLibrary.forEach((info: FunctionInfo) => { - const path = info.module.split("."); - setInfo(path, info); - }); - if ("nacsos_lib" in ret) return ret.nacsos_lib as NestedLibrary; - return ret; - }, - }, -}); -</script> - -<style scoped></style> diff --git a/src/views/Projects/ProjectOverviewView.vue b/src/views/Projects/ProjectOverviewView.vue index 0fc62c0b14a9372ea83ab34e228ab7723a321be8..cce803eea3e4783dbbe87b687cf55e4bc4766f0d 100644 --- a/src/views/Projects/ProjectOverviewView.vue +++ b/src/views/Projects/ProjectOverviewView.vue @@ -35,7 +35,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { marked } from "marked"; -import type { ProjectModel, ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectModel, ProjectPermissionsModel } from "@/plugins/api/types"; import { currentProjectStore } from "@/stores"; import PermissionSettingsCardReadOnly from "@/components/users/PermissionSettingsCardReadOnly.vue"; diff --git a/src/views/Projects/ProjectSettingsContainer.vue b/src/views/Projects/ProjectSettingsContainer.vue index bc029138c566d4a02c07230a512eea6c1d6028c3..a5bfa0d537459504dacdbe213f3e74f5f2f97c11 100644 --- a/src/views/Projects/ProjectSettingsContainer.vue +++ b/src/views/Projects/ProjectSettingsContainer.vue @@ -10,7 +10,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore } from "@/stores"; -import type { ProjectPermissionsModel } from "@/plugins/api/api-core"; +import type { ProjectPermissionsModel } from "@/plugins/api/types"; export default defineComponent({ name: "ProjectSettingsContainer", diff --git a/src/views/Projects/ProjectSettingsView.vue b/src/views/Projects/ProjectSettingsView.vue index ab50ccfc19fafe214888ae5ed7c83e667b7dc352..df6fd95869d4fee0dea791e306ce2f54d0d840bb 100644 --- a/src/views/Projects/ProjectSettingsView.vue +++ b/src/views/Projects/ProjectSettingsView.vue @@ -92,7 +92,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; -import type { ProjectModel, UserBaseModel, UserPermission } from "@/plugins/api/api-core"; +import type { ProjectModel, UserBaseModel, UserPermission } from "@/plugins/api/types"; import { currentProjectStore } from "@/stores"; import { API, logReject } from "@/plugins/api"; import { EventBus } from "@/plugins/events"; @@ -119,14 +119,14 @@ export default defineComponent({ }; }, mounted() { - API.core.project + API.project .getProjectApiProjectInfoGet({ xProjectId: currentProjectStore.projectId as string }) .then((response) => { const { data } = response; this.project = data; }) .catch(logReject); - API.core.project + API.project .getAllUserPermissionsApiProjectPermissionsListUsersGet({ xProjectId: currentProjectStore.projectId as string, }) @@ -165,7 +165,7 @@ export default defineComponent({ }, saveProject() { if (this.project !== undefined) { - API.core.project + API.project .saveProjectApiProjectInfoPut({ requestBody: this.project, xProjectId: currentProjectStore.projectId as string, diff --git a/src/views/Projects/ProjectsListView.vue b/src/views/Projects/ProjectsListView.vue index 99a7ccaad81b423a3d49836da355eb9ddac060e2..0895c8556f694ee2813988fd40d9bc6d4ab73bec 100644 --- a/src/views/Projects/ProjectsListView.vue +++ b/src/views/Projects/ProjectsListView.vue @@ -80,9 +80,9 @@ import { marked } from "marked"; import "core-js/modules/es.array.to-sorted"; import { EventBus } from "@/plugins/events"; import { CurrentProjectSelectedEvent, CurrentProjectSetEvent } from "@/plugins/events/events/projects"; -import type { ProjectInfo } from "@/plugins/api/api-core"; +import type { ProjectInfo } from "@/plugins/api/types"; import { API, toastReject } from "@/plugins/api"; -import { ItemType } from "@/plugins/api/api-core"; +import { ItemTypeEnum as ItemType } from "@/plugins/api/types"; import ProjectTypeIcon from "@/components/ProjectTypeIcon.vue"; enum Sort { @@ -120,7 +120,7 @@ export default defineComponent({ // clear the currentProjectStore to prevent side effects // currentProjectStore.clear(); // get all projects from the server (that we have permission to access) - API.core.projects + API.projects .getAllProjectsApiProjectsListGet() .then((response) => { this.projectList = response.data; @@ -154,7 +154,7 @@ export default defineComponent({ } }, renderMD(txt: string): string { - return marked(txt); + return marked.parse(txt, { async: false }) as string; }, }, computed: { diff --git a/src/views/User/LoginView.vue b/src/views/User/LoginView.vue index 1c9d292d3a866a56e7927d4afde53e91eee19eb2..24f8a3a88fa42e00583db077711a67ce552588ff 100644 --- a/src/views/User/LoginView.vue +++ b/src/views/User/LoginView.vue @@ -82,7 +82,7 @@ export default defineComponent({ }, async reset() { this.error = false; - API.core.mailing + API.mailing .resetPasswordApiMailResetPasswordUsernamePost({ username: this.username as string, }) diff --git a/src/views/User/UserProfileView.vue b/src/views/User/UserProfileView.vue index cd12ac8c5ff4567db65a2a978a3d2c110f1e1f5c..96e29d7e08d6a04271ecb996df764962b33412ed 100644 --- a/src/views/User/UserProfileView.vue +++ b/src/views/User/UserProfileView.vue @@ -117,7 +117,7 @@ <script lang="ts"> import { defineComponent } from "vue"; import { currentProjectStore, currentUserStore } from "@/stores"; -import type { AuthTokenModel, UserModel } from "@/plugins/api/api-core"; +import type { AuthTokenModel, UserModel } from "@/plugins/api/types"; import { API, toastReject } from "@/plugins/api"; import ToolTip from "@/components/ToolTip.vue"; import { EventBus } from "@/plugins/events"; @@ -147,7 +147,7 @@ export default defineComponent({ currentProjectStore.clear(); // load user data - API.core.oauth + API.oauth .readUsersMeApiLoginMeGet() .then((response) => { this.user = response.data; @@ -162,7 +162,7 @@ export default defineComponent({ if (this.invalidPassword) { EventBus.emit(new ToastEvent("WARN", "Something is not right with your password!")); } else { - API.core.users + API.users .saveUserSelfApiUsersMyDetailsPut({ requestBody: this.user, }) @@ -178,7 +178,7 @@ export default defineComponent({ } }, refreshAuthTokens() { - API.core.oauth + API.oauth .readTokensMeApiLoginMyTokensGet() .then((response) => { this.tokens = response.data; @@ -186,7 +186,7 @@ export default defineComponent({ .catch(toastReject); }, revoke(token: AuthTokenModel) { - API.core.oauth + API.oauth .revokeTokenApiLoginTokenTokenIdDelete({ tokenId: token.token_id, }) @@ -197,7 +197,7 @@ export default defineComponent({ if (token.token_id === currentUserStore.authToken?.token_id) { currentUserStore.extendAuthTokenValidity(); } else { - API.core.oauth + API.oauth .refreshTokenApiLoginTokenTokenIdPut({ tokenId: token.token_id, }) diff --git a/tools/openapi-gen/bin/index.js b/tools/openapi-gen/bin/index.js deleted file mode 100755 index ac83be9ddd69e811f1da1580a1044ef8ffa49c6c..0000000000000000000000000000000000000000 --- a/tools/openapi-gen/bin/index.js +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -const path = require('path'); -const { program } = require('commander'); -const pkg = require('../package.json'); - -const params = program - .name('openapi') - .usage('[options]') - .version(pkg.version) - .requiredOption('-i, --input <value>', 'OpenAPI specification, can be a path, url or string content (required)') - .requiredOption('-o, --output <value>', 'Output directory (required)') - .option('-c, --client <value>', 'HTTP client to generate [fetch, xhr, node, axios, angular]', 'fetch') - .option('--name <value>', 'Custom client class name') - .option('--useOptions', 'Use options instead of arguments') - .option('--useUnionTypes', 'Use union types instead of enums') - .option('--exportCore <value>', 'Write core files to disk', true) - .option('--exportServices <value>', 'Write services to disk', true) - .option('--exportModels <value>', 'Write models to disk', true) - .option('--exportSchemas <value>', 'Write schemas to disk', false) - .option('--indent <value>', 'Indentation options [4, 2, tabs]', '4') - .option('--postfix <value>', 'Service name postfix', 'Service') - .option('--request <value>', 'Path to custom request file') - .option('--corePathTop <value>', 'abs/rel import path to the core library') - .option('--corePathDeep <value>', 'abs/rel import path to the core library') - .parse(process.argv) - .opts(); - -const OpenAPI = require(path.resolve(__dirname, '../dist/index.js')); - -if (OpenAPI) { - OpenAPI.generate({ - input: params.input, - output: params.output, - httpClient: params.client, - clientName: params.name, - useOptions: params.useOptions, - useUnionTypes: params.useUnionTypes, - exportCore: JSON.parse(params.exportCore) === true, - exportServices: JSON.parse(params.exportServices) === true, - exportModels: JSON.parse(params.exportModels) === true, - exportSchemas: JSON.parse(params.exportSchemas) === true, - corePathTop: params.corePathTop, - corePathDeep: params.corePathDeep, - indent: params.indent, - postfix: params.postfix, - request: params.request, - }) - .then(() => { - process.exit(0); - }) - .catch(error => { - console.error(error); - process.exit(1); - }); -} diff --git a/tools/openapi-gen/bin/index.spec.js b/tools/openapi-gen/bin/index.spec.js deleted file mode 100755 index 2896318128bfffbd2da893b272b6b0cd18e46e97..0000000000000000000000000000000000000000 --- a/tools/openapi-gen/bin/index.spec.js +++ /dev/null @@ -1,70 +0,0 @@ -const crossSpawn = require('cross-spawn'); - -describe('bin', () => { - it('it should support minimal params', async () => { - const result = crossSpawn.sync('node', [ - './bin/index.js', - '--input', - './test/spec/v3.json', - '--output', - './test/generated/bin', - ]); - expect(result.stdout.toString()).toBe(''); - expect(result.stderr.toString()).toBe(''); - }); - - it('it should support all params', async () => { - const result = crossSpawn.sync('node', [ - './bin/index.js', - '--input', - './test/spec/v3.json', - '--output', - './test/generated/bin', - '--client', - 'fetch', - '--useOptions', - '--useUnionTypes', - '--exportCore', - 'true', - '--exportServices', - 'true', - '--exportModels', - 'true', - '--exportSchemas', - 'true', - '--indent', - '4', - '--postfix', - 'Service', - ]); - expect(result.stdout.toString()).toBe(''); - expect(result.stderr.toString()).toBe(''); - }); - - it('it should throw error without params', async () => { - const result = crossSpawn.sync('node', ['./bin/index.js']); - expect(result.stdout.toString()).toBe(''); - expect(result.stderr.toString()).toContain(`error: required option '-i, --input <value>' not specified`); - }); - - it('it should throw error with wrong params', async () => { - const result = crossSpawn.sync('node', [ - './bin/index.js', - '--input', - './test/spec/v3.json', - '--output', - './test/generated/bin', - '--unknown', - ]); - expect(result.stdout.toString()).toBe(''); - expect(result.stderr.toString()).toContain(`error: unknown option '--unknown'`); - }); - - it('it should display help', async () => { - const result = crossSpawn.sync('node', ['./bin/index.js', '--help']); - expect(result.stdout.toString()).toContain(`Usage: openapi [options]`); - expect(result.stdout.toString()).toContain(`-i, --input <value>`); - expect(result.stdout.toString()).toContain(`-o, --output <value>`); - expect(result.stderr.toString()).toBe(''); - }); -}); diff --git a/tools/openapi-gen/dist/index.cjs b/tools/openapi-gen/dist/index.cjs deleted file mode 100644 index 1890ae3d8e211d1c310d61a3844dff30e81efd76..0000000000000000000000000000000000000000 --- a/tools/openapi-gen/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,n=require("camelcase"),r=require("json-schema-ref-parser"),o=require("os"),a=require("path"),l=require("fs-extra");exports.HttpClient=void 0,(e=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",e.XHR="xhr",e.NODE="node",e.AXIOS="axios",e.ANGULAR="angular",exports.Indent=void 0,(t=exports.Indent||(exports.Indent={})).SPACE_4="4",t.SPACE_2="2",t.TAB="tab";const s=e=>null==e?void 0:e.replace(/\\/g,"\\\\"),i=e=>"string"==typeof e,u=(e,t)=>{var n,r;const o=null===(n=t["x-enum-varnames"])||void 0===n?void 0:n.filter(i),a=null===(r=t["x-enum-descriptions"])||void 0===r?void 0:r.filter(i);return e.map(((e,t)=>({name:(null==o?void 0:o[t])||e.name,description:(null==a?void 0:a[t])||e.description,value:e.value,type:e.type})))},p=e=>Array.isArray(e)?e.filter(((e,t,n)=>n.indexOf(e)===t)).filter((e=>"number"==typeof e||"string"==typeof e)).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e.replace(/'/g,"\\'")}'`,type:"string",description:null})):[],c=e=>{if(e||""===e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e},m=new Map([["file","binary"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]),d=e=>e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_"),f=(e="any",t)=>{const n={type:"any",base:"any",template:null,imports:[],isNullable:!1},r=((e,t)=>"binary"===t?"binary":m.get(e))(e,t);if(r)return n.type=r,n.base=r,n;const o=decodeURIComponent(e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,""));if(/\[.*\]$/g.test(o)){const e=o.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const t=f(d(e[1])),r=f(d(e[2]));return"any[]"===t.type?(n.type=`${r.type}[]`,n.base=r.type,t.imports=[]):r.type?(n.type=`${t.type}<${r.type}>`,n.base=t.type,n.template=r.type):(n.type=t.type,n.base=t.type,n.template=t.type),n.imports.push(...t.imports),n.imports.push(...r.imports),n}}if(o){const e=d(o);return n.type=e,n.base=e,n.imports.push(e),n}return n},h=(e,t,n)=>{var r;const o=[];for(const a in t.properties)if(t.properties.hasOwnProperty(a)){const l=t.properties[a],i=!!(null===(r=t.required)||void 0===r?void 0:r.includes(a));if(l.$ref){const e=f(l.$ref);o.push({name:c(a),export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:l.description||null,isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:s(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const t=n(e,l);o.push({name:c(a),export:t.export,type:t.type,base:t.base,template:t.template,link:t.link,description:l.description||null,isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:i,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:s(l.pattern),imports:t.imports,enum:t.enum,enums:t.enums,properties:t.properties})}}return o},y=/~1/g,v=/~0/g,g=(e,t)=>{if(t.$ref){const n=t.$ref.replace(/^#/g,"").split("/").filter((e=>e));let r=e;return n.forEach((e=>{const n=decodeURIComponent(e.replace(y,"/").replace(v,"~"));if(!r.hasOwnProperty(n))throw new Error(`Could not find reference: "${t.$ref}"`);r=r[n]})),r}return t},P=(e,t,n,r,o)=>{const a={type:r,imports:[],enums:[],properties:[]},l=[];if(n.map((t=>o(e,t))).filter((e=>{const t=e.properties.length,n=e.enums.length;return!("any"===e.type&&!t&&!n)})).forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),a.properties.push(e)})),t.required){const r=((e,t,n,r)=>n.reduce(((t,n)=>{if(n.$ref){const o=g(e,n);return[...t,...r(e,o).properties]}return[...t,...r(e,n).properties]}),[]).filter((e=>!e.isRequired&&t.includes(e.name))).map((e=>({...e,isRequired:!0}))))(e,t.required,n,o);r.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums)})),l.push(...r)}if(t.properties){const n=h(e,t,o);n.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),"enum"===e.export&&a.enums.push(e)})),l.push(...n)}return l.length&&a.properties.push({name:"properties",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:l}),a},b=(e,t,n=!1,r="")=>{var o;const a={name:r,export:"interface",type:"any",base:"any",template:null,link:null,description:t.description||null,isDefinition:n,isReadOnly:!0===t.readOnly,isNullable:!0===t["x-nullable"],isRequired:!1,format:t.format,maximum:t.maximum,exclusiveMaximum:t.exclusiveMaximum,minimum:t.minimum,exclusiveMinimum:t.exclusiveMinimum,multipleOf:t.multipleOf,maxLength:t.maxLength,minLength:t.minLength,maxItems:t.maxItems,minItems:t.minItems,uniqueItems:t.uniqueItems,maxProperties:t.maxProperties,minProperties:t.minProperties,pattern:s(t.pattern),imports:[],enum:[],enums:[],properties:[]};if(t.$ref){const e=f(t.$ref);return a.export="reference",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}if(t.enum&&"boolean"!==t.type){const e=p(t.enum),n=u(e,t);if(n.length)return a.export="enum",a.type="string",a.base="string",a.enum.push(...n),a}if("array"===t.type&&t.items){if(t.items.$ref){const e=f(t.items.$ref);return a.export="array",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}{const n=b(e,t.items);return a.export="array",a.type=n.type,a.base=n.base,a.template=n.template,a.link=n,a.imports.push(...n.imports),a}}if("object"===t.type&&"object"==typeof t.additionalProperties){if(t.additionalProperties.$ref){const e=f(t.additionalProperties.$ref);return a.export="dictionary",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}{const n=b(e,t.additionalProperties);return a.export="dictionary",a.type=n.type,a.base=n.base,a.template=n.template,a.link=n,a.imports.push(...n.imports),a}}if(null===(o=t.allOf)||void 0===o?void 0:o.length){const n=P(e,t,t.allOf,"all-of",b);return a.export=n.type,a.imports.push(...n.imports),a.properties.push(...n.properties),a.enums.push(...n.enums),a}if("object"===t.type){if(a.export="interface",a.type="any",a.base="any",t.properties){h(e,t,b).forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),a.properties.push(e),"enum"===e.export&&a.enums.push(e)}))}return a}if(t.type){const e=f(t.type,t.format);return a.export="generic",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}return a},O=(e,t,n)=>n.indexOf(e)===t,x=(e,t)=>{var n;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===t.export&&(null===(n=t.enum)||void 0===n?void 0:n[e.default])?t.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}},k=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g,R=e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return n(t).replace(k,"_$1")},C=(e,t)=>{const n={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const r=g(e,t),o=((e,t)=>{var n;const r={in:t.in,prop:t.name,export:"interface",name:R(t.name),type:"any",base:"any",template:null,link:null,description:t.description||null,isDefinition:!1,isReadOnly:!1,isRequired:!0===t.required,isNullable:!0===t["x-nullable"],format:t.format,maximum:t.maximum,exclusiveMaximum:t.exclusiveMaximum,minimum:t.minimum,exclusiveMinimum:t.exclusiveMinimum,multipleOf:t.multipleOf,maxLength:t.maxLength,minLength:t.minLength,maxItems:t.maxItems,minItems:t.minItems,uniqueItems:t.uniqueItems,pattern:s(t.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(t.$ref){const e=f(t.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=x(t,r),r}if(t.enum){const e=p(t.enum),n=u(e,t);if(n.length)return r.export="enum",r.type="string",r.base="string",r.enum.push(...n),r.default=x(t,r),r}if("array"===t.type&&t.items){const e=f(t.items.type,t.items.format);return r.export="array",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=x(t,r),r}if("object"===t.type&&t.items){const e=f(t.items.type,t.items.format);return r.export="dictionary",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=x(t,r),r}let o=t.schema;if(o){if((null===(n=o.$ref)||void 0===n?void 0:n.startsWith("#/parameters/"))&&(o=g(e,o)),o.$ref){const e=f(o.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=x(t,r),r}{const n=b(e,o);return r.export=n.export,r.type=n.type,r.base=n.base,r.template=n.template,r.link=n.link,r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r.default=x(t,r),r}}if(t.type){const e=f(t.type,t.format);return r.export="generic",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=x(t,r),r}return r})(e,r);if("api-version"!==o.prop)switch(o.in){case"path":n.parametersPath.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"query":n.parametersQuery.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"header":n.parametersHeader.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"formData":n.parametersForm.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"body":n.parametersBody=o,n.parameters.push(o),n.imports.push(...o.imports)}})),n},w=(e,t,n)=>{var r;const o={in:"response",name:"",code:n,description:t.description||null,export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};let a=t.schema;if(a){if((null===(r=a.$ref)||void 0===r?void 0:r.startsWith("#/responses/"))&&(a=g(e,a)),a.$ref){const e=f(a.$ref);return o.export="reference",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}{const t=b(e,a);return o.export=t.export,o.type=t.type,o.base=t.base,o.template=t.template,o.link=t.link,o.isReadOnly=t.isReadOnly,o.isRequired=t.isRequired,o.isNullable=t.isNullable,o.format=t.format,o.maximum=t.maximum,o.exclusiveMaximum=t.exclusiveMaximum,o.minimum=t.minimum,o.exclusiveMinimum=t.exclusiveMinimum,o.multipleOf=t.multipleOf,o.maxLength=t.maxLength,o.minLength=t.minLength,o.maxItems=t.maxItems,o.minItems=t.minItems,o.uniqueItems=t.uniqueItems,o.maxProperties=t.maxProperties,o.minProperties=t.minProperties,o.pattern=s(t.pattern),o.imports.push(...t.imports),o.enum.push(...t.enum),o.enums.push(...t.enums),o.properties.push(...t.properties),o}}if(t.headers)for(const e in t.headers)if(t.headers.hasOwnProperty(e))return o.in="header",o.name=e,o.type="string",o.base="string",o;return o},q=e=>{if("default"===e)return 200;if(/[0-9]+/g.test(e)){const t=parseInt(e);if(Number.isInteger(t))return Math.abs(t)}return null},A=(e,t)=>{const n=e.type===t.type&&e.base===t.base&&e.template===t.template;return n&&e.link&&t.link?A(e.link,t.link):n},j=(e,t)=>{const n=e.isRequired&&void 0===e.default,r=t.isRequired&&void 0===t.default;return n&&!r?-1:r&&!n?1:0},H=(e,t,r,o,a,l)=>{const s=(e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return n(t,{pascalCase:!0})})(o),i=((e,t,r)=>{if(r)return n(r.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim());const o=e.replace(/[^/]*?{api-version}.*?\//g,"").replace(/{(.*?)}/g,"").replace(/\//g,"-");return n(`${t}-${o}`)})(t,r,a.operationId),u={service:s,name:i,summary:a.summary||null,description:a.description||null,deprecated:!0===a.deprecated,method:r.toUpperCase(),path:t,parameters:[...l.parameters],parametersPath:[...l.parametersPath],parametersQuery:[...l.parametersQuery],parametersForm:[...l.parametersForm],parametersHeader:[...l.parametersHeader],parametersCookie:[...l.parametersCookie],parametersBody:l.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const t=C(e,a.parameters);u.imports.push(...t.imports),u.parameters.push(...t.parameters),u.parametersPath.push(...t.parametersPath),u.parametersQuery.push(...t.parametersQuery),u.parametersForm.push(...t.parametersForm),u.parametersHeader.push(...t.parametersHeader),u.parametersCookie.push(...t.parametersCookie),u.parametersBody=t.parametersBody}if(a.responses){const t=((e,t)=>{const n=[];for(const r in t)if(t.hasOwnProperty(r)){const o=t[r],a=g(e,o),l=q(r);if(l){const t=w(e,a,l);n.push(t)}}return n.sort(((e,t)=>e.code<t.code?-1:e.code>t.code?1:0))})(e,a.responses),n=(e=>{const t=[];return e.forEach((e=>{const{code:n}=e;n&&204!==n&&n>=200&&n<300&&t.push(e)})),t.length||t.push({in:"response",name:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),t.filter(((e,t,n)=>n.findIndex((t=>A(t,e)))===t))})(t);u.errors=(e=>e.filter((e=>e.code>=300&&e.description)).map((e=>({code:e.code,description:e.description}))))(t),u.responseHeader=(e=>{const t=e.find((e=>"header"===e.in));return t?t.name:null})(n),n.forEach((e=>{u.results.push(e),u.imports.push(...e.imports)}))}return u.parameters=u.parameters.sort(j),u},D=e=>{const t=((e="1.0")=>String(e).replace(/^v/gi,""))(e.info.version),n=(e=>{var t;const n=(null===(t=e.schemes)||void 0===t?void 0:t[0])||"http",r=e.host,o=e.basePath||"";return(r?`${n}://${r}${o}`:o).replace(/\/$/g,"")})(e),r=(e=>{const t=[];for(const n in e.definitions)if(e.definitions.hasOwnProperty(n)){const r=e.definitions[n],o=f(n),a=b(e,r,!0,o.base);t.push(a)}return t})(e),o=(e=>{var t;const n=new Map;for(const r in e.paths)if(e.paths.hasOwnProperty(r)){const o=e.paths[r],a=C(e,o.parameters||[]);for(const l in o)if(o.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const s=o[l];((null===(t=s.tags)||void 0===t?void 0:t.length)?s.tags.filter(O):["Default"]).forEach((t=>{const o=H(e,r,l,t,s,a),i=n.get(o.service)||{name:o.service,operations:[],imports:[]};i.operations.push(o),i.imports.push(...o.imports),n.set(o.service,i)}))}}return Array.from(n.values())})(e);return{version:t,server:n,models:r,services:o}},E=e=>e.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,""),T=(e,t)=>{if(e.mapping){const n=(e=>{const t={};for(const n in e)t[e[n]]=n;return t})(e.mapping),r=Object.keys(n).find((e=>E(e)==t.name));if(r&&n[r])return n[r]}return t.name},I=e=>{if(e||""===e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e},S=e=>null!=e&&""!==e,_=new Map([["file","binary"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]),N=(e,t)=>"binary"===t?"binary":_.get(e),B=e=>e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_"),$=(e="any",t)=>{const n={type:"any",base:"any",template:null,imports:[],isNullable:!1};if(Array.isArray(e)){const r=e.filter((e=>"null"!==e)).map((e=>N(e,t))).filter(S).join(" | ");return n.type=r,n.base=r,n.isNullable=e.includes("null"),n}const r=N(e,t);if(r)return n.type=r,n.base=r,n;const o=decodeURIComponent(E(e));if(/\[.*\]$/g.test(o)){const e=o.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const t=$(B(e[1])),r=$(B(e[2]));return"any[]"===t.type?(n.type=`${r.type}[]`,n.base=`${r.type}`,t.imports=[]):r.type?(n.type=`${t.type}<${r.type}>`,n.base=t.type,n.template=r.type):(n.type=t.type,n.base=t.type,n.template=t.type),n.imports.push(...t.imports),n.imports.push(...r.imports),n}}if(o){const e=B(o);return n.type=e,n.base=e,n.imports.push(e),n}return n},M=(e,t,n,r)=>{var o;const a=[],l=((e,t)=>{var n;if(e.components&&t)for(const r in e.components.schemas)if(e.components.schemas.hasOwnProperty(r)){const o=e.components.schemas[r];if(o.discriminator&&(null===(n=o.oneOf)||void 0===n?void 0:n.length)&&o.oneOf.some((e=>e.$ref&&E(e.$ref)==t.name)))return o.discriminator}})(e,r);for(const i in t.properties)if(t.properties.hasOwnProperty(i)){const u=t.properties[i],p=!!(null===(o=t.required)||void 0===o?void 0:o.includes(i)),c={name:I(i),description:u.description||null,deprecated:!0===u.deprecated,isDefinition:!1,isReadOnly:!0===u.readOnly,isRequired:p,format:u.format,maximum:u.maximum,exclusiveMaximum:u.exclusiveMaximum,minimum:u.minimum,exclusiveMinimum:u.exclusiveMinimum,multipleOf:u.multipleOf,maxLength:u.maxLength,minLength:u.minLength,maxItems:u.maxItems,minItems:u.minItems,uniqueItems:u.uniqueItems,maxProperties:u.maxProperties,minProperties:u.minProperties,pattern:s(u.pattern)};if(r&&(null==l?void 0:l.propertyName)==i)a.push({export:"reference",type:"string",base:`'${T(l,r)}'`,template:null,isNullable:!0===u.nullable,link:null,imports:[],enum:[],enums:[],properties:[],...c});else if(u.$ref){const e=$(u.$ref);a.push({export:"reference",type:e.type,base:e.base,template:e.template,link:null,isNullable:e.isNullable||!0===u.nullable,imports:e.imports,enum:[],enums:[],properties:[],...c})}else{const t=n(e,u);a.push({export:t.export,type:t.type,base:t.base,template:t.template,link:t.link,isNullable:t.isNullable||!0===u.nullable,imports:t.imports,enum:t.enum,enums:t.enums,properties:t.properties,...c})}}return a},L=/~1/g,F=/~0/g,W=(e,t)=>{if(t.$ref){const n=t.$ref.replace(/^#/g,"").split("/").filter((e=>e));let r=e;return n.forEach((e=>{const n=decodeURIComponent(e.replace(L,"/").replace(F,"~"));if(!r.hasOwnProperty(n))throw new Error(`Could not find reference: "${t.$ref}"`);r=r[n]})),r}return t},V=(e,t,n,r,o)=>{const a={type:r,imports:[],enums:[],properties:[]},l=[];if(n.map((t=>o(e,t))).filter((e=>{const t=e.properties.length,n=e.enums.length,r="any"===e.type,o="dictionary"===e.export;return!(r&&!t&&!n)||o})).forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),a.properties.push(e)})),t.required){const r=((e,t,n,r)=>n.reduce(((t,n)=>{if(n.$ref){const o=W(e,n);return[...t,...r(e,o).properties]}return[...t,...r(e,n).properties]}),[]).filter((e=>!e.isRequired&&t.includes(e.name))).map((e=>({...e,isRequired:!0}))))(e,t.required,n,o);r.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums)})),l.push(...r)}if(t.properties){const n=M(e,t,o);n.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),"enum"===e.export&&a.enums.push(e)})),l.push(...n)}return l.length&&a.properties.push({name:"properties",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:l}),a},U=(e,t)=>{var n;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==t?void 0:t.export)&&(null===(n=t.enum)||void 0===n?void 0:n[e.default])?t.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}},Q=(e,t,n=!1,r="")=>{var o,a,l;const u={name:r,export:"interface",type:"any",base:"any",template:null,link:null,description:t.description||null,deprecated:!0===t.deprecated,isDefinition:n,isReadOnly:!0===t.readOnly,isNullable:!0===t.nullable,isRequired:!1,format:t.format,maximum:t.maximum,exclusiveMaximum:t.exclusiveMaximum,minimum:t.minimum,exclusiveMinimum:t.exclusiveMinimum,multipleOf:t.multipleOf,maxLength:t.maxLength,minLength:t.minLength,maxItems:t.maxItems,minItems:t.minItems,uniqueItems:t.uniqueItems,maxProperties:t.maxProperties,minProperties:t.minProperties,pattern:s(t.pattern),imports:[],enum:[],enums:[],properties:[]};if(t.$ref){const e=$(t.$ref);return u.export="reference",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=U(t,u),u}if(t.enum&&"boolean"!==t.type){const e=(p=t.enum,Array.isArray(p)?p.filter(((e,t,n)=>n.indexOf(e)===t)).filter((e=>"number"==typeof e||"string"==typeof e)).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e.replace(/'/g,"\\'")}'`,type:"string",description:null})):[]),n=((e,t)=>{var n,r;const o=null===(n=t["x-enum-varnames"])||void 0===n?void 0:n.filter(i),a=null===(r=t["x-enum-descriptions"])||void 0===r?void 0:r.filter(i);return e.map(((e,t)=>({name:(null==o?void 0:o[t])||e.name,description:(null==a?void 0:a[t])||e.description,value:e.value,type:e.type})))})(e,t);if(n.length)return u.export="enum",u.type="string",u.base="string",u.enum.push(...n),u.default=U(t,u),u}var p;if("array"===t.type&&t.items){if(t.items.$ref){const e=$(t.items.$ref);return u.export="array",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=U(t,u),u}{const n=Q(e,t.items);return u.export="array",u.type=n.type,u.base=n.base,u.template=n.template,u.link=n,u.imports.push(...n.imports),u.default=U(t,u),u}}if("object"===t.type&&"object"==typeof t.additionalProperties){if(t.additionalProperties.$ref){const e=$(t.additionalProperties.$ref);return u.export="dictionary",u.type=e.type,u.base=e.base,u.template=e.template,u.imports.push(...e.imports),u.default=U(t,u),u}{const n=Q(e,t.additionalProperties);return u.export="dictionary",u.type=n.type,u.base=n.base,u.template=n.template,u.link=n,u.imports.push(...n.imports),u.default=U(t,u),u}}if(null===(o=t.oneOf)||void 0===o?void 0:o.length){const n=V(e,t,t.oneOf,"one-of",Q);return u.export=n.type,u.imports.push(...n.imports),u.properties.push(...n.properties),u.enums.push(...n.enums),u}if(null===(a=t.anyOf)||void 0===a?void 0:a.length){const n=V(e,t,t.anyOf,"any-of",Q);return u.export=n.type,u.imports.push(...n.imports),u.properties.push(...n.properties),u.enums.push(...n.enums),u}if(null===(l=t.allOf)||void 0===l?void 0:l.length){const n=V(e,t,t.allOf,"all-of",Q);return u.export=n.type,u.imports.push(...n.imports),u.properties.push(...n.properties),u.enums.push(...n.enums),u}if("object"===t.type){if(u.export="interface",u.type="any",u.base="any",u.default=U(t,u),t.properties){M(e,t,Q,u).forEach((e=>{u.imports.push(...e.imports),u.enums.push(...e.enums),u.properties.push(e),"enum"===e.export&&u.enums.push(e)}))}return u}if(t.type){const e=$(t.type,t.format);return u.export="generic",u.type=e.type,u.base=e.base,u.template=e.template,u.isNullable=e.isNullable||u.isNullable,u.imports.push(...e.imports),u.default=U(t,u),u}return u},z=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g,J=e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return n(t).replace(z,"_$1")},G=(e,t)=>{const n={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const r=W(e,t),o=((e,t)=>{var n;const r={in:t.in,prop:t.name,export:"interface",name:J(t.name),type:"any",base:"any",template:null,link:null,description:t.description||null,deprecated:!0===t.deprecated,isDefinition:!1,isReadOnly:!1,isRequired:!0===t.required,isNullable:!0===t.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(t.$ref){const e=$(t.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}let o=t.schema;if(o){if((null===(n=o.$ref)||void 0===n?void 0:n.startsWith("#/components/parameters/"))&&(o=W(e,o)),o.$ref){const e=$(o.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=U(o),r}{const t=Q(e,o);return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=r.isRequired||t.isRequired,r.isNullable=r.isNullable||t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=s(t.pattern),r.default=t.default,r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}return r})(e,r);if("api-version"!==o.prop)switch(r.in){case"path":n.parametersPath.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"query":n.parametersQuery.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"formData":n.parametersForm.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"cookie":n.parametersCookie.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"header":n.parametersHeader.push(o),n.parameters.push(o),n.imports.push(...o.imports)}})),n},Z=["application/json-patch+json","application/json","application/x-www-form-urlencoded","text/json","text/plain","multipart/form-data","multipart/mixed","multipart/related","multipart/batch"],K=(e,t)=>{const n=Object.keys(t).filter((e=>{const t=e.split(";")[0].trim();return Z.includes(t)})).find((e=>{var n;return S(null===(n=t[e])||void 0===n?void 0:n.schema)}));if(n)return{mediaType:n,schema:t[n].schema};const r=Object.keys(t).find((e=>{var n;return S(null===(n=t[e])||void 0===n?void 0:n.schema)}));return r?{mediaType:r,schema:t[r].schema}:null},X=(e,t,n)=>{var r;const o={in:"response",name:"",code:n,description:t.description||null,export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(t.content){const n=K(0,t.content);if(n){if((null===(r=n.schema.$ref)||void 0===r?void 0:r.startsWith("#/components/responses/"))&&(n.schema=W(e,n.schema)),n.schema.$ref){const e=$(n.schema.$ref);return o.export="reference",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}{const t=Q(e,n.schema);return o.export=t.export,o.type=t.type,o.base=t.base,o.template=t.template,o.link=t.link,o.isReadOnly=t.isReadOnly,o.isRequired=t.isRequired,o.isNullable=t.isNullable,o.format=t.format,o.maximum=t.maximum,o.exclusiveMaximum=t.exclusiveMaximum,o.minimum=t.minimum,o.exclusiveMinimum=t.exclusiveMinimum,o.multipleOf=t.multipleOf,o.maxLength=t.maxLength,o.minLength=t.minLength,o.maxItems=t.maxItems,o.minItems=t.minItems,o.uniqueItems=t.uniqueItems,o.maxProperties=t.maxProperties,o.minProperties=t.minProperties,o.pattern=s(t.pattern),o.imports.push(...t.imports),o.enum.push(...t.enum),o.enums.push(...t.enums),o.properties.push(...t.properties),o}}}if(t.headers)for(const e in t.headers)if(t.headers.hasOwnProperty(e))return o.in="header",o.name=e,o.type="string",o.base="string",o;return o},Y=e=>{if("default"===e)return 200;if(/[0-9]+/g.test(e)){const t=parseInt(e);if(Number.isInteger(t))return Math.abs(t)}return null},ee=(e,t)=>{const n=e.type===t.type&&e.base===t.base&&e.template===t.template;return n&&e.link&&t.link?ee(e.link,t.link):n},te=(e,t)=>{const n=e.isRequired&&void 0===e.default,r=t.isRequired&&void 0===t.default;return n&&!r?-1:r&&!n?1:0},ne=(e,t,r,o,a,l)=>{const i=(e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return n(t,{pascalCase:!0})})(o),u=((e,t,r)=>{if(r)return n(r.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim());const o=e.replace(/[^/]*?{api-version}.*?\//g,"").replace(/{(.*?)}/g,"").replace(/\//g,"-");return n(`${t}-${o}`)})(t,r,a.operationId),p={service:i,name:u,summary:a.summary||null,description:a.description||null,deprecated:!0===a.deprecated,method:r.toUpperCase(),path:t,parameters:[...l.parameters],parametersPath:[...l.parametersPath],parametersQuery:[...l.parametersQuery],parametersForm:[...l.parametersForm],parametersHeader:[...l.parametersHeader],parametersCookie:[...l.parametersCookie],parametersBody:l.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(a.parameters){const t=G(e,a.parameters);p.imports.push(...t.imports),p.parameters.push(...t.parameters),p.parametersPath.push(...t.parametersPath),p.parametersQuery.push(...t.parametersQuery),p.parametersForm.push(...t.parametersForm),p.parametersHeader.push(...t.parametersHeader),p.parametersCookie.push(...t.parametersCookie),p.parametersBody=t.parametersBody}if(a.requestBody){const t=((e,t)=>{const n={in:"body",export:"interface",prop:"requestBody",name:"requestBody",type:"any",base:"any",template:null,link:null,description:t.description||null,default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===t.required,isNullable:!0===t.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(t.content){const r=K(0,t.content);if(r){switch(n.mediaType=r.mediaType,n.mediaType){case"application/x-www-form-urlencoded":case"multipart/form-data":n.in="formData",n.name="formData",n.prop="formData"}if(r.schema.$ref){const e=$(r.schema.$ref);return n.export="reference",n.type=e.type,n.base=e.base,n.template=e.template,n.imports.push(...e.imports),n}{const t=Q(e,r.schema);return n.export=t.export,n.type=t.type,n.base=t.base,n.template=t.template,n.link=t.link,n.isReadOnly=t.isReadOnly,n.isRequired=n.isRequired||t.isRequired,n.isNullable=n.isNullable||t.isNullable,n.format=t.format,n.maximum=t.maximum,n.exclusiveMaximum=t.exclusiveMaximum,n.minimum=t.minimum,n.exclusiveMinimum=t.exclusiveMinimum,n.multipleOf=t.multipleOf,n.maxLength=t.maxLength,n.minLength=t.minLength,n.maxItems=t.maxItems,n.minItems=t.minItems,n.uniqueItems=t.uniqueItems,n.maxProperties=t.maxProperties,n.minProperties=t.minProperties,n.pattern=s(t.pattern),n.imports.push(...t.imports),n.enum.push(...t.enum),n.enums.push(...t.enums),n.properties.push(...t.properties),n}}}return n})(e,W(e,a.requestBody));p.imports.push(...t.imports),p.parameters.push(t),p.parametersBody=t}if(a.responses){const t=((e,t)=>{const n=[];for(const r in t)if(t.hasOwnProperty(r)){const o=t[r],a=W(e,o),l=Y(r);if(l){const t=X(e,a,l);n.push(t)}}return n.sort(((e,t)=>e.code<t.code?-1:e.code>t.code?1:0))})(e,a.responses),n=(e=>{const t=[];return e.forEach((e=>{const{code:n}=e;n&&204!==n&&n>=200&&n<300&&t.push(e)})),t.length||t.push({in:"response",name:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),t.filter(((e,t,n)=>n.findIndex((t=>ee(t,e)))===t))})(t);p.errors=(e=>e.filter((e=>e.code>=300&&e.description)).map((e=>({code:e.code,description:e.description}))))(t),p.responseHeader=(e=>{const t=e.find((e=>"header"===e.in));return t?t.name:null})(n),n.forEach((e=>{p.results.push(e),p.imports.push(...e.imports)}))}return p.parameters=p.parameters.sort(te),p},re=e=>{const t=((e="1.0")=>String(e).replace(/^v/gi,""))(e.info.version),n=(e=>{var t;const n=null===(t=e.servers)||void 0===t?void 0:t[0],r=(null==n?void 0:n.variables)||{};let o=(null==n?void 0:n.url)||"";for(const e in r)r.hasOwnProperty(e)&&(o=o.replace(`{${e}}`,r[e].default));return o.replace(/\/$/g,"")})(e),r=(e=>{const t=[];if(e.components)for(const n in e.components.schemas)if(e.components.schemas.hasOwnProperty(n)){const r=e.components.schemas[n],o=$(n),a=Q(e,r,!0,o.base);t.push(a)}return t})(e),o=(e=>{var t;const n=new Map;for(const r in e.paths)if(e.paths.hasOwnProperty(r)){const o=e.paths[r],a=G(e,o.parameters||[]);for(const l in o)if(o.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const s=o[l];((null===(t=s.tags)||void 0===t?void 0:t.length)?s.tags.filter(O):["Default"]).forEach((t=>{const o=ne(e,r,l,t,s,a),i=n.get(o.service)||{name:o.service,operations:[],imports:[]};i.operations.push(o),i.imports.push(...o.imports),n.set(o.service,i)}))}}return Array.from(n.values())})(e);return{version:t,server:n,models:r,services:o}};var oe;!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(oe||(oe={}));const ae=e=>e.enum.filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t)),le=e=>e.enums.filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t)),se=(e,t)=>{const n=e.toLowerCase(),r=t.toLowerCase();return n.localeCompare(r,"en")},ie=e=>e.imports.filter(O).sort(se).filter((t=>e.name!==t)),ue=(e,t)=>{const n=[];return e.map(t).forEach((e=>{n.push(...e)})),n},pe=e=>{const t={...e};return t.operations=(e=>{const t=new Map;return e.operations.map((e=>{const n={...e};n.imports.push(...ue(n.parameters,(e=>e.imports))),n.imports.push(...ue(n.results,(e=>e.imports)));const r=n.name,o=t.get(r)||0;return o>0&&(n.name=`${r}${o}`),t.set(r,o+1),n}))})(t),t.operations.forEach((e=>{t.imports.push(...e.imports)})),t.imports=(e=>e.imports.filter(O).sort(se))(t),t},ce=e=>({...e,models:e.models.map((e=>(e=>({...e,imports:ie(e),enums:le(e),enum:ae(e)}))(e))),services:e.services.map((e=>pe(e)))});var me="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},de={exports:{}},fe={},he={__esModule:!0};he.extend=be,he.indexOf=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},he.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!ge.test(e))return e;return e.replace(ve,Pe)},he.isEmpty=function(e){return!e&&0!==e||!(!ke(e)||0!==e.length)},he.createFrame=function(e){var t=be({},e);return t._parent=e,t},he.blockParams=function(e,t){return e.path=t,e},he.appendContextPath=function(e,t){return(e?e+".":"")+t};var ye={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},ve=/[&<>"'`=]/g,ge=/[&<>"'`=]/;function Pe(e){return ye[e]}function be(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var Oe=Object.prototype.toString;he.toString=Oe;var xe=function(e){return"function"==typeof e};xe(/x/)&&(he.isFunction=xe=function(e){return"function"==typeof e&&"[object Function]"===Oe.call(e)}),he.isFunction=xe;var ke=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===Oe.call(e)};he.isArray=ke;var Re={exports:{}};!function(e,t){t.__esModule=!0;var n=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(e,t){var o=t&&t.loc,a=void 0,l=void 0,s=void 0,i=void 0;o&&(a=o.start.line,l=o.end.line,s=o.start.column,i=o.end.column,e+=" - "+a+":"+s);for(var u=Error.prototype.constructor.call(this,e),p=0;p<n.length;p++)this[n[p]]=u[n[p]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{o&&(this.lineNumber=a,this.endLineNumber=l,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:i,enumerable:!0})):(this.column=s,this.endColumn=i))}catch(e){}}r.prototype=new Error,t.default=r,e.exports=t.default}(Re,Re.exports);var Ce={},we={exports:{}};!function(e,t){t.__esModule=!0;var n=he;t.default=function(e){e.registerHelper("blockHelperMissing",(function(t,r){var o=r.inverse,a=r.fn;if(!0===t)return a(this);if(!1===t||null==t)return o(this);if(n.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):o(this);if(r.data&&r.ids){var l=n.createFrame(r.data);l.contextPath=n.appendContextPath(r.data.contextPath,r.name),r={data:l}}return a(t,r)}))},e.exports=t.default}(we,we.exports);var qe={exports:{}};!function(e,t){t.__esModule=!0;var n,r=he,o=(n=Re.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new o.default("Must pass iterator to #each");var n,a=t.fn,l=t.inverse,s=0,i="",u=void 0,p=void 0;function c(t,n,o){u&&(u.key=t,u.index=n,u.first=0===n,u.last=!!o,p&&(u.contextPath=p+t)),i+=a(e[t],{data:u,blockParams:r.blockParams([e[t],t],[p+t,null])})}if(t.data&&t.ids&&(p=r.appendContextPath(t.data.contextPath,t.ids[0])+"."),r.isFunction(e)&&(e=e.call(this)),t.data&&(u=r.createFrame(t.data)),e&&"object"==typeof e)if(r.isArray(e))for(var m=e.length;s<m;s++)s in e&&c(s,s,s===e.length-1);else if(me.Symbol&&e[me.Symbol.iterator]){for(var d=[],f=e[me.Symbol.iterator](),h=f.next();!h.done;h=f.next())d.push(h.value);for(m=(e=d).length;s<m;s++)c(s,s,s===e.length-1)}else n=void 0,Object.keys(e).forEach((function(e){void 0!==n&&c(n,s-1),n=e,s++})),void 0!==n&&c(n,s-1,!0);return 0===s&&(i=l(this)),i}))},e.exports=t.default}(qe,qe.exports);var Ae={exports:{}};!function(e,t){t.__esModule=!0;var n,r=(n=Re.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},e.exports=t.default}(Ae,Ae.exports);var je={exports:{}};!function(e,t){t.__esModule=!0;var n,r=he,o=(n=Re.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("if",(function(e,t){if(2!=arguments.length)throw new o.default("#if requires exactly one argument");return r.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)})),e.registerHelper("unless",(function(t,n){if(2!=arguments.length)throw new o.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}))},e.exports=t.default}(je,je.exports);var He={exports:{}};!function(e,t){t.__esModule=!0,t.default=function(e){e.registerHelper("log",(function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var o=1;null!=n.hash.level?o=n.hash.level:n.data&&null!=n.data.level&&(o=n.data.level),t[0]=o,e.log.apply(e,t)}))},e.exports=t.default}(He,He.exports);var De={exports:{}};!function(e,t){t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",(function(e,t,n){return e?n.lookupProperty(e,t):e}))},e.exports=t.default}(De,De.exports);var Ee={exports:{}};function Te(e){return e&&e.__esModule?e:{default:e}}!function(e,t){t.__esModule=!0;var n,r=he,o=(n=Re.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("with",(function(e,t){if(2!=arguments.length)throw new o.default("#with requires exactly one argument");r.isFunction(e)&&(e=e.call(this));var n=t.fn;if(r.isEmpty(e))return t.inverse(this);var a=t.data;return t.data&&t.ids&&((a=r.createFrame(t.data)).contextPath=r.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:a,blockParams:r.blockParams([e],[a&&a.contextPath])})}))},e.exports=t.default}(Ee,Ee.exports),Ce.__esModule=!0,Ce.registerDefaultHelpers=function(e){Ie.default(e),Se.default(e),_e.default(e),Ne.default(e),Be.default(e),$e.default(e),Me.default(e)},Ce.moveHelperToHooks=function(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])};var Ie=Te(we.exports),Se=Te(qe.exports),_e=Te(Ae.exports),Ne=Te(je.exports),Be=Te(He.exports),$e=Te(De.exports),Me=Te(Ee.exports);var Le={},Fe={exports:{}};!function(e,t){t.__esModule=!0;var n=he;t.default=function(e){e.registerDecorator("inline",(function(e,t,r,o){var a=e;return t.partials||(t.partials={},a=function(o,a){var l=r.partials;r.partials=n.extend({},l,t.partials);var s=e(o,a);return r.partials=l,s}),t.partials[o.args[0]]=o.fn,a}))},e.exports=t.default}(Fe,Fe.exports),Le.__esModule=!0,Le.registerDefaultDecorators=function(e){Ve.default(e)};var We,Ve=(We=Fe.exports)&&We.__esModule?We:{default:We};var Ue={exports:{}};!function(e,t){t.__esModule=!0;var n=he,r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),"undefined"!=typeof console&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t="log");for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];console[t].apply(console,o)}}};t.default=r,e.exports=t.default}(Ue,Ue.exports);var Qe={},ze={__esModule:!0,createNewLookupObject:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Je.extend.apply(void 0,[Object.create(null)].concat(t))}},Je=he;Qe.__esModule=!0,Qe.createProtoAccessControl=function(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var n=Object.create(null);return n.__proto__=!1,{properties:{whitelist:Ge.createNewLookupObject(n,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Ge.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}},Qe.resultIsAllowed=function(e,t,n){return Xe("function"==typeof e?t.methods:t.properties,n)},Qe.resetLoggedProperties=function(){Object.keys(Ke).forEach((function(e){delete Ke[e]}))};var Ge=ze,Ze=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(Ue.exports),Ke=Object.create(null);function Xe(e,t){return void 0!==e.whitelist[t]?!0===e.whitelist[t]:void 0!==e.defaultValue?e.defaultValue:(function(e){!0!==Ke[e]&&(Ke[e]=!0,Ze.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}(t),!1)}function Ye(e){return e&&e.__esModule?e:{default:e}}fe.__esModule=!0,fe.HandlebarsEnvironment=lt;var et=he,tt=Ye(Re.exports),nt=Ce,rt=Le,ot=Ye(Ue.exports),at=Qe;fe.VERSION="4.7.7";fe.COMPILER_REVISION=8;fe.LAST_COMPATIBLE_COMPILER_REVISION=7;fe.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};function lt(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},nt.registerDefaultHelpers(this),rt.registerDefaultDecorators(this)}lt.prototype={constructor:lt,logger:ot.default,log:ot.default.log,registerHelper:function(e,t){if("[object Object]"===et.toString.call(e)){if(t)throw new tt.default("Arg not supported with multiple helpers");et.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if("[object Object]"===et.toString.call(e))et.extend(this.partials,e);else{if(void 0===t)throw new tt.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if("[object Object]"===et.toString.call(e)){if(t)throw new tt.default("Arg not supported with multiple decorators");et.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){at.resetLoggedProperties()}};var st=ot.default.log;fe.log=st,fe.createFrame=et.createFrame,fe.logger=ot.default;var it={exports:{}};!function(e,t){function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t.default=n,e.exports=t.default}(it,it.exports);var ut={},pt={};pt.__esModule=!0,pt.wrapHelper=function(e,t){if("function"!=typeof e)return e;return function(){return arguments[arguments.length-1]=t(arguments[arguments.length-1]),e.apply(this,arguments)}},ut.__esModule=!0,ut.checkRevision=function(e){var t=e&&e[0]||1,n=dt.COMPILER_REVISION;if(t>=dt.LAST_COMPATIBLE_COMPILER_REVISION&&t<=dt.COMPILER_REVISION)return;if(t<dt.LAST_COMPATIBLE_COMPILER_REVISION){var r=dt.REVISION_CHANGES[n],o=dt.REVISION_CHANGES[t];throw new mt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new mt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")},ut.template=function(e,t){if(!t)throw new mt.default("No environment passed to template");if(!e||!e.main)throw new mt.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&7===e.compiler[0];var r={strict:function(e,t,n){if(!e||!(t in e))throw new mt.default('"'+t+'" not defined in '+e,{loc:n});return r.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];return null==n||Object.prototype.hasOwnProperty.call(e,t)||yt.resultIsAllowed(n,r.protoAccessControl,t)?n:void 0},lookup:function(e,t){for(var n=e.length,o=0;o<n;o++){if(null!=(e[o]&&r.lookupProperty(e[o],t)))return e[o][t]}},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:ct.escapeExpression,invokePartial:function(n,r,o){o.hash&&(r=ct.extend({},r,o.hash),o.ids&&(o.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,r,o);var a=ct.extend({},o,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),l=t.VM.invokePartial.call(this,n,r,a);if(null==l&&t.compile&&(o.partials[o.name]=t.compile(n,e.compilerOptions,t),l=o.partials[o.name](r,a)),null!=l){if(o.indent){for(var s=l.split("\n"),i=0,u=s.length;i<u&&(s[i]||i+1!==u);i++)s[i]=o.indent+s[i];l=s.join("\n")}return l}throw new mt.default("The partial "+o.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var n=e[t];return n.decorator=e[t+"_d"],n},programs:[],program:function(e,t,n,r,o){var a=this.programs[e],l=this.fn(e);return t||o||r||n?a=vt(this,e,l,t,n,r,o):a||(a=this.programs[e]=vt(this,e,l)),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=ct.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=n.data;o._setup(n),!n.partial&&e.useData&&(a=Pt(t,a));var l=void 0,s=e.useBlockParams?[]:void 0;function i(t){return""+e.main(r,t,r.helpers,r.partials,a,s,l)}return e.useDepths&&(l=n.depths?t!=n.depths[0]?[t].concat(n.depths):n.depths:[t]),(i=bt(e.main,i,r,n.depths||[],a,s))(t,n)}return o.isTop=!0,o._setup=function(o){if(o.partial)r.protoAccessControl=o.protoAccessControl,r.helpers=o.helpers,r.partials=o.partials,r.decorators=o.decorators,r.hooks=o.hooks;else{var a=ct.extend({},t.helpers,o.helpers);!function(e,t){Object.keys(e).forEach((function(n){var r=e[n];e[n]=function(e,t){var n=t.lookupProperty;return ht.wrapHelper(e,(function(e){return ct.extend({lookupProperty:n},e)}))}(r,t)}))}(a,r),r.helpers=a,e.usePartial&&(r.partials=r.mergeIfNeeded(o.partials,t.partials)),(e.usePartial||e.useDecorators)&&(r.decorators=ct.extend({},t.decorators,o.decorators)),r.hooks={},r.protoAccessControl=yt.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||n;ft.moveHelperToHooks(r,"helperMissing",l),ft.moveHelperToHooks(r,"blockHelperMissing",l)}},o._child=function(t,n,o,a){if(e.useBlockParams&&!o)throw new mt.default("must pass block params");if(e.useDepths&&!a)throw new mt.default("must pass parent depths");return vt(r,t,e[t],n,0,o,a)},o},ut.wrapProgram=vt,ut.resolvePartial=function(e,t,n){e?e.call||n.name||(n.name=e,e=n.partials[e]):e="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name];return e},ut.invokePartial=function(e,t,n){var r=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var o=void 0;n.fn&&n.fn!==gt&&function(){n.data=dt.createFrame(n.data);var e=n.fn;o=n.data["partial-block"]=function(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.data=dt.createFrame(n.data),n.data["partial-block"]=r,e(t,n)},e.partials&&(n.partials=ct.extend({},n.partials,e.partials))}();void 0===e&&o&&(e=o);if(void 0===e)throw new mt.default("The partial "+n.name+" could not be found");if(e instanceof Function)return e(t,n)},ut.noop=gt;var ct=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(he),mt=function(e){return e&&e.__esModule?e:{default:e}}(Re.exports),dt=fe,ft=Ce,ht=pt,yt=Qe;function vt(e,t,n,r,o,a,l){function s(t){var o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=l;return!l||t==l[0]||t===e.nullContext&&null===l[0]||(s=[t].concat(l)),n(e,t,e.helpers,e.partials,o.data||r,a&&[o.blockParams].concat(a),s)}return(s=bt(n,s,e,l,r,a)).program=t,s.depth=l?l.length:0,s.blockParams=o||0,s}function gt(){return""}function Pt(e,t){return t&&"root"in t||((t=t?dt.createFrame(t):{}).root=e),t}function bt(e,t,n,r,o,a){if(e.decorator){var l={};t=e.decorator(t,l,n,r&&r[0],o,a,r),ct.extend(t,l)}return t}var Ot={exports:{}};!function(e,t){t.__esModule=!0,t.default=function(e){var t=void 0!==me?me:window,n=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=n),e}},e.exports=t.default}(Ot,Ot.exports),function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}t.__esModule=!0;var o=r(fe),a=n(it.exports),l=n(Re.exports),s=r(he),i=r(ut),u=n(Ot.exports);function p(){var e=new o.HandlebarsEnvironment;return s.extend(e,o),e.SafeString=a.default,e.Exception=l.default,e.Utils=s,e.escapeExpression=s.escapeExpression,e.VM=i,e.template=function(t){return i.template(t,e)},e}var c=p();c.create=p,u.default(c),c.default=c,t.default=c,e.exports=t.default}(de,de.exports);var xt=de.exports.default,kt={1:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { NgModule} from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { AngularHttpRequest } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:7,column:38},end:{line:7,column:55}}),t))?a:"")+"/AngularHttpRequest';\nimport { BaseHttpRequest } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:8,column:35},end:{line:8,column:52}}),t))?a:"")+"/BaseHttpRequest';\nimport type { OpenAPIConfig } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:9,column:38},end:{line:9,column:55}}),t))?a:"")+"/OpenAPI';\nimport { OpenAPI } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:10,column:27},end:{line:10,column:44}}),t))?a:"")+"/OpenAPI';\n"},3:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import type { BaseHttpRequest } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:12,column:40},end:{line:12,column:57}}),t))?a:"")+"/BaseHttpRequest';\nimport type { OpenAPIConfig } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:13,column:38},end:{line:13,column:55}}),t))?a:"")+"/OpenAPI';\nimport { "+(null!=(a=s(l(t,"httpRequest",{start:{line:14,column:12},end:{line:14,column:23}}),t))?a:"")+" } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:14,column:37},end:{line:14,column:54}}),t))?a:"")+"/"+(null!=(a=s(l(t,"httpRequest",{start:{line:14,column:60},end:{line:14,column:71}}),t))?a:"")+"';\n"},5:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"services"),{name:"each",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:0},end:{line:20,column:9}}}))?a:""},6:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { "+(null!=(a=s(l(t,"name",{start:{line:19,column:12},end:{line:19,column:16}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:19,column:22},end:{line:19,column:35}}),t))?a:"")+" } from './services/"+(null!=(a=s(l(t,"name",{start:{line:19,column:61},end:{line:19,column:65}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:19,column:71},end:{line:19,column:84}}),t))?a:"")+"';\n"},8:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"@NgModule({\n\timports: [HttpClientModule],\n\tproviders: [\n\t\t{\n\t\t\tprovide: OpenAPI,\n\t\t\tuseValue: {\n\t\t\t\tBASE: OpenAPI?.BASE ?? '"+(null!=(a=s(l(t,"server",{start:{line:30,column:31},end:{line:30,column:37}}),t))?a:"")+"',\n\t\t\t\tVERSION: OpenAPI?.VERSION ?? '"+(null!=(a=s(l(t,"version",{start:{line:31,column:37},end:{line:31,column:44}}),t))?a:"")+"',\n\t\t\t\tWITH_CREDENTIALS: OpenAPI?.WITH_CREDENTIALS ?? false,\n\t\t\t\tCREDENTIALS: OpenAPI?.CREDENTIALS ?? 'include',\n\t\t\t\tTOKEN: OpenAPI?.TOKEN,\n\t\t\t\tUSERNAME: OpenAPI?.USERNAME,\n\t\t\t\tPASSWORD: OpenAPI?.PASSWORD,\n\t\t\t\tHEADERS: OpenAPI?.HEADERS,\n\t\t\t\tENCODE_PATH: OpenAPI?.ENCODE_PATH,\n\t\t\t} as OpenAPIConfig,\n\t\t},\n\t\t{\n\t\t\tprovide: BaseHttpRequest,\n\t\t\tuseClass: AngularHttpRequest,\n\t\t},\n"+(null!=(a=i(n,"each").call(null!=t?t:e.nullContext||{},i(t,"services"),{name:"each",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:45,column:2},end:{line:47,column:11}}}))?a:"")+"\t]\n})\nexport class "+(null!=(a=s(l(t,"clientName",{start:{line:50,column:16},end:{line:50,column:26}}),t))?a:"")+" {}\n"},9:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t"+(null!=(a=s(l(t,"name",{start:{line:46,column:5},end:{line:46,column:9}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:46,column:15},end:{line:46,column:28}}),t))?a:"")+",\n"},11:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=null!=t?t:e.nullContext||{},u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;\n\nexport class "+(null!=(a=s(l(t,"clientName",{start:{line:54,column:16},end:{line:54,column:26}}),t))?a:"")+" {\n\n"+(null!=(a=u(n,"each").call(i,u(t,"services"),{name:"each",hash:{},fn:e.program(12,o,0),inverse:e.noop,data:o,loc:{start:{line:56,column:1},end:{line:58,column:10}}}))?a:"")+"\n\tpublic readonly request: BaseHttpRequest;\n\n\tconstructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = "+(null!=(a=s(l(t,"httpRequest",{start:{line:62,column:87},end:{line:62,column:98}}),t))?a:"")+") {\n\t\tthis.request = new HttpRequest({\n\t\t\tBASE: config?.BASE ?? '"+(null!=(a=s(l(t,"server",{start:{line:64,column:29},end:{line:64,column:35}}),t))?a:"")+"',\n\t\t\tVERSION: config?.VERSION ?? '"+(null!=(a=s(l(t,"version",{start:{line:65,column:35},end:{line:65,column:42}}),t))?a:"")+"',\n\t\t\tWITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,\n\t\t\tCREDENTIALS: config?.CREDENTIALS ?? 'include',\n\t\t\tTOKEN: config?.TOKEN,\n\t\t\tUSERNAME: config?.USERNAME,\n\t\t\tPASSWORD: config?.PASSWORD,\n\t\t\tHEADERS: config?.HEADERS,\n\t\t\tENCODE_PATH: config?.ENCODE_PATH,\n\t\t});\n\n"+(null!=(a=u(n,"each").call(i,u(t,"services"),{name:"each",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o,loc:{start:{line:75,column:2},end:{line:77,column:11}}}))?a:"")+"\t}\n}\n"},12:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic readonly "+(null!=(a=i(n,"camelCase").call(null!=t?t:e.nullContext||{},i(t,"name"),{name:"camelCase",hash:{},data:o,loc:{start:{line:57,column:17},end:{line:57,column:37}}}))?a:"")+": "+(null!=(a=s(l(t,"name",{start:{line:57,column:42},end:{line:57,column:46}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:57,column:52},end:{line:57,column:65}}),t))?a:"")+";\n"},14:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\tthis."+(null!=(a=i(n,"camelCase").call(null!=t?t:e.nullContext||{},i(t,"name"),{name:"camelCase",hash:{},data:o,loc:{start:{line:76,column:7},end:{line:76,column:27}}}))?a:"")+" = new "+(null!=(a=s(l(t,"name",{start:{line:76,column:37},end:{line:76,column:41}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:76,column:47},end:{line:76,column:60}}),t))?a:"")+"(this.request);\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:15,column:11}}}))?a:"")+"\n"+(null!=(a=s(n,"if").call(l,s(t,"services"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:0},end:{line:21,column:7}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(8,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:23,column:0},end:{line:80,column:11}}}))?a:"")},usePartial:!0,useData:!0},Rt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): Observable<HttpHeaders> => {\n\treturn forkJoin({\n\t\ttoken: resolve(options, config.TOKEN),\n\t\tusername: resolve(options, config.USERNAME),\n\t\tpassword: resolve(options, config.PASSWORD),\n\t\tadditionalHeaders: resolve(options, config.HEADERS),\n\t}).pipe(\n\t\tmap(({ token, username, password, additionalHeaders }) => {\n\t\t\tconst headers = Object.entries({\n\t\t\t\tAccept: 'application/json',\n\t\t\t\t...additionalHeaders,\n\t\t\t\t...options.headers,\n\t\t\t})\n\t\t\t\t.filter(([_, value]) => isDefined(value))\n\t\t\t\t.reduce((headers, [key, value]) => ({\n\t\t\t\t\t...headers,\n\t\t\t\t\t[key]: String(value),\n\t\t\t\t}), {} as Record<string, string>);\n\n\t\t\tif (isStringWithValue(token)) {\n\t\t\t\theaders['Authorization'] = `Bearer ${token}`;\n\t\t\t}\n\n\t\t\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\t\t\tconst credentials = base64(`${username}:${password}`);\n\t\t\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t\t\t}\n\n\t\t\tif (options.body) {\n\t\t\t\tif (options.mediaType) {\n\t\t\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t\t\t} else if (isBlob(options.body)) {\n\t\t\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t\t\t} else if (isString(options.body)) {\n\t\t\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t\t\t} else if (!isFormData(options.body)) {\n\t\t\t\t\theaders['Content-Type'] = 'application/json';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new HttpHeaders(headers);\n\t\t}),\n\t);\n};"},useData:!0},Ct={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},wt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = <T>(response: HttpResponse<T>): T | undefined => {\n\tif (response.status !== 204 && response.body !== null) {\n\t\treturn response.body;\n\t}\n\treturn undefined;\n};"},useData:!0},qt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = <T>(response: HttpResponse<T>, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst value = response.headers.get(responseHeader);\n\t\tif (isString(value)) {\n\t\t\treturn value;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},At={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport type { HttpResponse, HttpErrorResponse } from '@angular/common/http';\nimport { forkJoin, of, throwError } from 'rxjs';\nimport { catchError, map, switchMap } from 'rxjs/operators';\nimport type { Observable } from 'rxjs';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getHeaders"),t,{name:"angular/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getRequestBody"),t,{name:"angular/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/sendRequest"),t,{name:"angular/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getResponseHeader"),t,{name:"angular/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getResponseBody"),t,{name:"angular/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param http The Angular HTTP client\n * @param options The request options from the service\n * @returns Observable<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, http: HttpClient, options: ApiRequestOptions): Observable<T> => {\n\tconst url = getUrl(config, options);\n\tconst formData = getFormData(options);\n\tconst body = getRequestBody(options);\n\n\treturn getHeaders(config, options).pipe(\n\t\tswitchMap(headers => {\n\t\t\treturn sendRequest<T>(config, options, http, url, formData, body, headers);\n\t\t}),\n\t\tmap(response => {\n\t\t\tconst responseBody = getResponseBody(response);\n\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\t\t\treturn {\n\t\t\t\turl,\n\t\t\t\tok: response.ok,\n\t\t\t\tstatus: response.status,\n\t\t\t\tstatusText: response.statusText,\n\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t} as ApiResult;\n\t\t}),\n\t\tcatchError((error: HttpErrorResponse) => {\n\t\t\tif (!error.status) {\n\t\t\t\treturn throwError(error);\n\t\t\t}\n\t\t\treturn of({\n\t\t\t\turl,\n\t\t\t\tok: error.ok,\n\t\t\t\tstatus: error.status,\n\t\t\t\tstatusText: error.statusText,\n\t\t\t\tbody: error.error ?? error.statusText,\n\t\t\t} as ApiResult);\n\t\t}),\n\t\tmap(result => {\n\t\t\tcatchErrorCodes(options, result);\n\t\t\treturn result.body as T;\n\t\t}),\n\t\tcatchError((error: ApiError) => {\n\t\t\treturn throwError(error);\n\t\t}),\n\t);\n};"},usePartial:!0,useData:!0},jt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = <T>(\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\thttp: HttpClient,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: HttpHeaders\n): Observable<HttpResponse<T>> => {\n\treturn http.request<T>(options.method, url, {\n\t\theaders,\n\t\tbody: body ?? formData,\n\t\twithCredentials: config.WITH_CREDENTIALS,\n\t\tobserve: 'response',\n\t});\n};"},useData:!0},Ht={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n\tpublic readonly url: string;\n\tpublic readonly status: number;\n\tpublic readonly statusText: string;\n\tpublic readonly body: any;\n\tpublic readonly request: ApiRequestOptions;\n\n\tconstructor(request: ApiRequestOptions, response: ApiResult, message: string) {\n\t\tsuper(message);\n\n\t\tthis.name = 'ApiError';\n\t\tthis.url = response.url;\n\t\tthis.status = response.status;\n\t\tthis.statusText = response.statusText;\n\t\tthis.body = response.body;\n\t\tthis.request = request;\n\t}\n}"},usePartial:!0,useData:!0},Dt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport type ApiRequestOptions = {\n\treadonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n\treadonly url: string;\n\treadonly path?: Record<string, any>;\n\treadonly cookies?: Record<string, any>;\n\treadonly headers?: Record<string, any>;\n\treadonly query?: Record<string, any>;\n\treadonly formData?: Record<string, any>;\n\treadonly body?: any;\n\treadonly mediaType?: string;\n\treadonly responseHeader?: string;\n\treadonly errors?: Record<number, string>;\n};"},usePartial:!0,useData:!0},Et={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport type ApiResult = {\n\treadonly url: string;\n\treadonly ok: boolean;\n\treadonly status: number;\n\treadonly statusText: string;\n\treadonly body: any;\n};"},usePartial:!0,useData:!0},Tt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData): Promise<Record<string, string>> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\tconst formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {}\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t\t...formHeaders,\n\t})\n\t.filter(([_, value]) => isDefined(value))\n\t.reduce((headers, [key, value]) => ({\n\t\t...headers,\n\t\t[key]: String(value),\n\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn headers;\n};"},useData:!0},It={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body) {\n\t\treturn options.body;\n\t}\n\treturn undefined;\n};"},useData:!0},St={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = (response: AxiosResponse<any>): any => {\n\tif (response.status !== 204) {\n\t\treturn response.data;\n\t}\n\treturn undefined;\n};"},useData:!0},_t={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (response: AxiosResponse<any>, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = response.headers[responseHeader];\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Nt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport axios from 'axios';\nimport type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';\nimport FormData from 'form-data';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isSuccess"),t,{name:"functions/isSuccess",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getHeaders"),t,{name:"axios/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getRequestBody"),t,{name:"axios/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/sendRequest"),t,{name:"axios/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getResponseHeader"),t,{name:"axios/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getResponseBody"),t,{name:"axios/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options, formData);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: isSuccess(response.status),\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},Bt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const sendRequest = async <T>(\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Record<string, string>,\n\tonCancel: OnCancel\n): Promise<AxiosResponse<T>> => {\n\tconst source = axios.CancelToken.source();\n\n\tconst requestConfig: AxiosRequestConfig = {\n\t\turl,\n\t\theaders,\n\t\tdata: body ?? formData,\n\t\tmethod: options.method,\n\t\twithCredentials: config.WITH_CREDENTIALS,\n\t\tcancelToken: source.token,\n\t};\n\n\tonCancel(() => source.cancel('The user aborted a request.'));\n\n\ttry {\n\t\treturn await axios.request(requestConfig);\n\t} catch (error) {\n\t\tconst axiosError = error as AxiosError<T>;\n\t\tif (axiosError.response) {\n\t\t\treturn axiosError.response;\n\t\t}\n\t\tthrow error;\n\t}\n};"},useData:!0},$t={1:function(e,t,n,r,o){return"import type { HttpClient } from '@angular/common/http';\nimport type { Observable } from 'rxjs';\n\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { OpenAPIConfig } from './OpenAPI';\n"},3:function(e,t,n,r,o){return"import type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { CancelablePromise } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n"},5:function(e,t,n,r,o){return"\tconstructor(\n\t\tpublic readonly config: OpenAPIConfig,\n\t\tpublic readonly http: HttpClient,\n\t) {}\n"},7:function(e,t,n,r,o){return"\tconstructor(public readonly config: OpenAPIConfig) {}\n"},9:function(e,t,n,r,o){return"\tpublic abstract request<T>(options: ApiRequestOptions): Observable<T>;\n"},11:function(e,t,n,r,o){return"\tpublic abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:13,column:11}}}))?a:"")+"\nexport abstract class BaseHttpRequest {\n\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(5,o,0),inverse:e.program(7,o,0),data:o,loc:{start:{line:17,column:1},end:{line:24,column:12}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(9,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:26,column:1},end:{line:30,column:12}}}))?a:"")+"}"},usePartial:!0,useData:!0},Mt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport class CancelError extends Error {\n\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = 'CancelError';\n\t}\n\n\tpublic get isCancelled(): boolean {\n\t\treturn true;\n\t}\n}\n\nexport interface OnCancel {\n\treadonly isResolved: boolean;\n\treadonly isRejected: boolean;\n\treadonly isCancelled: boolean;\n\n\t(cancelHandler: () => void): void;\n}\n\nexport class CancelablePromise<T> implements Promise<T> {\n\treadonly [Symbol.toStringTag]!: string;\n\n\tprivate _isResolved: boolean;\n\tprivate _isRejected: boolean;\n\tprivate _isCancelled: boolean;\n\tprivate readonly _cancelHandlers: (() => void)[];\n\tprivate readonly _promise: Promise<T>;\n\tprivate _resolve?: (value: T | PromiseLike<T>) => void;\n\tprivate _reject?: (reason?: any) => void;\n\n\tconstructor(\n\t\texecutor: (\n\t\t\tresolve: (value: T | PromiseLike<T>) => void,\n\t\t\treject: (reason?: any) => void,\n\t\t\tonCancel: OnCancel\n\t\t) => void\n\t) {\n\t\tthis._isResolved = false;\n\t\tthis._isRejected = false;\n\t\tthis._isCancelled = false;\n\t\tthis._cancelHandlers = [];\n\t\tthis._promise = new Promise<T>((resolve, reject) => {\n\t\t\tthis._resolve = resolve;\n\t\t\tthis._reject = reject;\n\n\t\t\tconst onResolve = (value: T | PromiseLike<T>): void => {\n\t\t\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._isResolved = true;\n\t\t\t\tthis._resolve?.(value);\n\t\t\t};\n\n\t\t\tconst onReject = (reason?: any): void => {\n\t\t\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._isRejected = true;\n\t\t\t\tthis._reject?.(reason);\n\t\t\t};\n\n\t\t\tconst onCancel = (cancelHandler: () => void): void => {\n\t\t\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._cancelHandlers.push(cancelHandler);\n\t\t\t};\n\n\t\t\tObject.defineProperty(onCancel, 'isResolved', {\n\t\t\t\tget: (): boolean => this._isResolved,\n\t\t\t});\n\n\t\t\tObject.defineProperty(onCancel, 'isRejected', {\n\t\t\t\tget: (): boolean => this._isRejected,\n\t\t\t});\n\n\t\t\tObject.defineProperty(onCancel, 'isCancelled', {\n\t\t\t\tget: (): boolean => this._isCancelled,\n\t\t\t});\n\n\t\t\treturn executor(onResolve, onReject, onCancel as OnCancel);\n\t\t});\n\t}\n\n\tpublic then<TResult1 = T, TResult2 = never>(\n\t\tonFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n\t\tonRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null\n\t): Promise<TResult1 | TResult2> {\n\t\treturn this._promise.then(onFulfilled, onRejected);\n\t}\n\n\tpublic catch<TResult = never>(\n\t\tonRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null\n\t): Promise<T | TResult> {\n\t\treturn this._promise.catch(onRejected);\n\t}\n\n\tpublic finally(onFinally?: (() => void) | null): Promise<T> {\n\t\treturn this._promise.finally(onFinally);\n\t}\n\n\tpublic cancel(): void {\n\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isCancelled = true;\n\t\tif (this._cancelHandlers.length) {\n\t\t\ttry {\n\t\t\t\tfor (const cancelHandler of this._cancelHandlers) {\n\t\t\t\t\tcancelHandler();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.warn('Cancellation threw an error', error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis._cancelHandlers.length = 0;\n\t\tthis._reject?.(new CancelError('Request aborted'));\n\t}\n\n\tpublic get isCancelled(): boolean {\n\t\treturn this._isCancelled;\n\t}\n}"},usePartial:!0,useData:!0},Lt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t})\n\t\t.filter(([_, value]) => isDefined(value))\n\t\t.reduce((headers, [key, value]) => ({\n\t\t\t...headers,\n\t\t\t[key]: String(value),\n\t\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn new Headers(headers);\n};"},useData:!0},Ft={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body !== undefined) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Wt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = async (response: Response): Promise<any> => {\n\tif (response.status !== 204) {\n\t\ttry {\n\t\t\tconst contentType = response.headers.get('Content-Type');\n\t\t\tif (contentType) {\n\t\t\t\tconst isJSON = contentType.toLowerCase().startsWith('application/json');\n\t\t\t\tif (isJSON) {\n\t\t\t\t\treturn await response.json();\n\t\t\t\t} else {\n\t\t\t\t\treturn await response.text();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Vt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = response.headers.get(responseHeader);\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Ut={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getHeaders"),t,{name:"fetch/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getRequestBody"),t,{name:"fetch/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/sendRequest"),t,{name:"fetch/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getResponseHeader"),t,{name:"fetch/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getResponseBody"),t,{name:"fetch/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = await getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: response.ok,\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},Qt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = async (\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Headers,\n\tonCancel: OnCancel\n): Promise<Response> => {\n\tconst controller = new AbortController();\n\n\tconst request: RequestInit = {\n\t\theaders,\n\t\tbody: body ?? formData,\n\t\tmethod: options.method,\n\t\tsignal: controller.signal,\n\t};\n\n\tif (config.WITH_CREDENTIALS) {\n\t\trequest.credentials = config.CREDENTIALS;\n\t}\n\n\tonCancel(() => controller.abort());\n\n\treturn await fetch(url, request);\n};"},useData:!0},zt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const base64 = (str: string): string => {\n\ttry {\n\t\treturn btoa(str);\n\t} catch (err) {\n\t\t// @ts-ignore\n\t\treturn Buffer.from(str).toString('base64');\n\t}\n};"},useData:!0},Jt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {\n\tconst errors: Record<number, string> = {\n\t\t400: 'Bad Request',\n\t\t401: 'Unauthorized',\n\t\t403: 'Forbidden',\n\t\t404: 'Not Found',\n\t\t500: 'Internal Server Error',\n\t\t502: 'Bad Gateway',\n\t\t503: 'Service Unavailable',\n\t\t...options.errors,\n\t}\n\n\tconst error = errors[result.status];\n\tif (error) {\n\t\tthrow new ApiError(options, result, error);\n\t}\n\n\tif (!result.ok) {\n\t\tthrow new ApiError(options, result, 'Generic Error');\n\t}\n};"},useData:!0},Gt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getFormData = (options: ApiRequestOptions): FormData | undefined => {\n\tif (options.formData) {\n\t\tconst formData = new FormData();\n\n\t\tconst process = (key: string, value: any) => {\n\t\t\tif (isString(value) || isBlob(value)) {\n\t\t\t\tformData.append(key, value);\n\t\t\t} else {\n\t\t\t\tformData.append(key, JSON.stringify(value));\n\t\t\t}\n\t\t};\n\n\t\tObject.entries(options.formData)\n\t\t\t.filter(([_, value]) => isDefined(value))\n\t\t\t.forEach(([key, value]) => {\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tvalue.forEach(v => process(key, v));\n\t\t\t\t} else {\n\t\t\t\t\tprocess(key, value);\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn formData;\n\t}\n\treturn undefined;\n};"},useData:!0},Zt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getQueryString = (params: Record<string, any>): string => {\n\tconst qs: string[] = [];\n\n\tconst append = (key: string, value: any) => {\n\t\tqs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n\t};\n\n\tconst process = (key: string, value: any) => {\n\t\tif (isDefined(value)) {\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tvalue.forEach(v => {\n\t\t\t\t\tprocess(key, v);\n\t\t\t\t});\n\t\t\t} else if (typeof value === 'object') {\n\t\t\t\tObject.entries(value).forEach(([k, v]) => {\n\t\t\t\t\tprocess(`${key}[${k}]`, v);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tappend(key, value);\n\t\t\t}\n\t\t}\n\t};\n\n\tObject.entries(params).forEach(([key, value]) => {\n\t\tprocess(key, value);\n\t});\n\n\tif (qs.length > 0) {\n\t\treturn `?${qs.join('&')}`;\n\t}\n\n\treturn '';\n};"},useData:!0},Kt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {\n\tconst encoder = config.ENCODE_PATH || encodeURI;\n\n\tconst path = options.url\n\t\t.replace('{api-version}', config.VERSION)\n\t\t.replace(/{(.*?)}/g, (substring: string, group: string) => {\n\t\t\tif (options.path?.hasOwnProperty(group)) {\n\t\t\t\treturn encoder(String(options.path[group]));\n\t\t\t}\n\t\t\treturn substring;\n\t\t});\n\n\tconst url = `${config.BASE}${path}`;\n\tif (options.query) {\n\t\treturn `${url}${getQueryString(options.query)}`;\n\t}\n\treturn url;\n};"},useData:!0},Xt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isBlob = (value: any): value is Blob => {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.type === 'string' &&\n\t\ttypeof value.stream === 'function' &&\n\t\ttypeof value.arrayBuffer === 'function' &&\n\t\ttypeof value.constructor === 'function' &&\n\t\ttypeof value.constructor.name === 'string' &&\n\t\t/^(Blob|File)$/.test(value.constructor.name) &&\n\t\t/^(Blob|File)$/.test(value[Symbol.toStringTag])\n\t);\n};"},useData:!0},Yt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {\n\treturn value !== undefined && value !== null;\n};"},useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isFormData = (value: any): value is FormData => {\n\treturn value instanceof FormData;\n};"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isString = (value: any): value is string => {\n\treturn typeof value === 'string';\n};"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isStringWithValue = (value: any): value is string => {\n\treturn isString(value) && value !== '';\n};"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isSuccess = (status: number): boolean => {\n\treturn status >= 200 && status < 300;\n};"},useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nconst resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {\n\tif (typeof resolver === 'function') {\n\t\treturn (resolver as Resolver<T>)(options);\n\t}\n\treturn resolver;\n};"},useData:!0},an={1:function(e,t,n,r,o){return"import { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport type { Observable } from 'rxjs';\n\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport { BaseHttpRequest } from './BaseHttpRequest';\nimport type { OpenAPIConfig } from './OpenAPI';\nimport { OpenAPI } from './OpenAPI';\nimport { request as __request } from './request';\n"},3:function(e,t,n,r,o){return"import type { ApiRequestOptions } from './ApiRequestOptions';\nimport { BaseHttpRequest } from './BaseHttpRequest';\nimport type { CancelablePromise } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\nimport { request as __request } from './request';\n"},5:function(e,t,n,r,o){return"@Injectable()\n"},7:function(e,t,n,r,o){return"\tconstructor(\n\t\t@Inject(OpenAPI)\n\t\tconfig: OpenAPIConfig,\n\t\thttp: HttpClient,\n\t) {\n\t\tsuper(config, http);\n\t}\n"},9:function(e,t,n,r,o){return"\tconstructor(config: OpenAPIConfig) {\n\t\tsuper(config);\n\t}\n"},11:function(e,t,n,r,o){return"\t/**\n\t * Request method\n\t * @param options The request options from the service\n\t * @returns Observable<T>\n\t * @throws ApiError\n\t */\n\tpublic override request<T>(options: ApiRequestOptions): Observable<T> {\n\t\treturn __request(this.config, this.http, options);\n\t}\n"},13:function(e,t,n,r,o){return"\t/**\n\t * Request method\n\t * @param options The request options from the service\n\t * @returns CancelablePromise<T>\n\t * @throws ApiError\n\t */\n\tpublic override request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n\t\treturn __request(this.config, options);\n\t}\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:19,column:11}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:21,column:0},end:{line:23,column:11}}}))?a:"")+"export class "+(null!=(a=e.lambda(e.strict(t,"httpRequest",{start:{line:24,column:15},end:{line:24,column:26}}),t))?a:"")+" extends BaseHttpRequest {\n\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:26,column:1},end:{line:38,column:12}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(11,o,0),inverse:e.program(13,o,0),data:o,loc:{start:{line:40,column:1},end:{line:60,column:12}}}))?a:"")+"}"},usePartial:!0,useData:!0},ln={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t})\n\t\t.filter(([_, value]) => isDefined(value))\n\t\t.reduce((headers, [key, value]) => ({\n\t\t\t...headers,\n\t\t\t[key]: String(value),\n\t\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn new Headers(headers);\n};"},useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body !== undefined) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body as any;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},un={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = async (response: Response): Promise<any> => {\n\tif (response.status !== 204) {\n\t\ttry {\n\t\t\tconst contentType = response.headers.get('Content-Type');\n\t\t\tif (contentType) {\n\t\t\t\tconst isJSON = contentType.toLowerCase().startsWith('application/json');\n\t\t\t\tif (isJSON) {\n\t\t\t\t\treturn await response.json();\n\t\t\t\t} else {\n\t\t\t\t\treturn await response.text();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = response.headers.get(responseHeader);\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport FormData from 'form-data';\nimport fetch, { Headers } from 'node-fetch';\nimport type { RequestInit, Response } from 'node-fetch';\nimport type { AbortSignal } from 'node-fetch/externals';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getHeaders"),t,{name:"node/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getRequestBody"),t,{name:"node/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/sendRequest"),t,{name:"node/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getResponseHeader"),t,{name:"node/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getResponseBody"),t,{name:"node/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest(options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = await getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: response.ok,\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = async (\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Headers,\n\tonCancel: OnCancel\n): Promise<Response> => {\n\tconst controller = new AbortController();\n\n\tconst request: RequestInit = {\n\t\theaders,\n\t\tmethod: options.method,\n\t\tbody: body ?? formData,\n\t\tsignal: controller.signal as AbortSignal,\n\t};\n\n\tonCancel(() => controller.abort());\n\n\treturn await fetch(url, request);\n};"},useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(i(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\nexport type OpenAPIConfig = {\n\tBASE: string;\n\tVERSION: string;\n\tWITH_CREDENTIALS: boolean;\n\tCREDENTIALS: 'include' | 'omit' | 'same-origin';\n\tTOKEN?: string | Resolver<string>;\n\tUSERNAME?: string | Resolver<string>;\n\tPASSWORD?: string | Resolver<string>;\n\tHEADERS?: Headers | Resolver<Headers>;\n\tENCODE_PATH?: (path: string) => string;\n};\n\nexport const OpenAPI: OpenAPIConfig = {\n\tBASE: '"+(null!=(a=s(l(t,"server",{start:{line:21,column:11},end:{line:21,column:17}}),t))?a:"")+"',\n\tVERSION: '"+(null!=(a=s(l(t,"version",{start:{line:22,column:14},end:{line:22,column:21}}),t))?a:"")+"',\n\tWITH_CREDENTIALS: false,\n\tCREDENTIALS: 'include',\n\tTOKEN: undefined,\n\tUSERNAME: undefined,\n\tPASSWORD: undefined,\n\tHEADERS: undefined,\n\tENCODE_PATH: undefined,\n};"},usePartial:!0,useData:!0},fn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"fetch/request"),t,{name:"fetch/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"xhr/request"),t,{name:"xhr/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},5:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"axios/request"),t,{name:"axios/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"angular/request"),t,{name:"angular/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"node/request"),t,{name:"node/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:3,column:67}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:4,column:71}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:5,column:65}}}))?a:"")},usePartial:!0,useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t})\n\t\t.filter(([_, value]) => isDefined(value))\n\t\t.reduce((headers, [key, value]) => ({\n\t\t\t...headers,\n\t\t\t[key]: String(value),\n\t\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn new Headers(headers);\n};"},useData:!0},yn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body !== undefined) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},vn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = (xhr: XMLHttpRequest): any => {\n\tif (xhr.status !== 204) {\n\t\ttry {\n\t\t\tconst contentType = xhr.getResponseHeader('Content-Type');\n\t\t\tif (contentType) {\n\t\t\t\tconst isJSON = contentType.toLowerCase().startsWith('application/json');\n\t\t\t\tif (isJSON) {\n\t\t\t\t\treturn JSON.parse(xhr.responseText);\n\t\t\t\t} else {\n\t\t\t\t\treturn xhr.responseText;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},gn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (xhr: XMLHttpRequest, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = xhr.getResponseHeader(responseHeader);\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Pn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isSuccess"),t,{name:"functions/isSuccess",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getHeaders"),t,{name:"fetch/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/getRequestBody"),t,{name:"xhr/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/sendRequest"),t,{name:"xhr/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/getResponseHeader"),t,{name:"xhr/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/getResponseBody"),t,{name:"xhr/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: isSuccess(response.status),\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},bn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = async (\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Headers,\n\tonCancel: OnCancel\n): Promise<XMLHttpRequest> => {\n\tconst xhr = new XMLHttpRequest();\n\txhr.open(options.method, url, true);\n\txhr.withCredentials = config.WITH_CREDENTIALS;\n\n\theaders.forEach((value, key) => {\n\t\txhr.setRequestHeader(key, value);\n\t});\n\n\treturn new Promise<XMLHttpRequest>((resolve, reject) => {\n\t\txhr.onload = () => resolve(xhr);\n\t\txhr.onabort = () => reject(new Error('Request aborted'));\n\t\txhr.onerror = () => reject(new Error('Network error'));\n\t\txhr.send(body ?? formData);\n\n\t\tonCancel(() => xhr.abort());\n\t});\n};"},useData:!0},On={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"imports"),{name:"each",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?a:"")},2:function(e,t,n,r,o){var a,l=e.lambda;return"import type { "+(null!=(a=l(t,t))?a:"")+" } from './"+(null!=(a=l(t,t))?a:"")+"';\n"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportInterface"),t,{name:"exportInterface",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"one-of",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:12,column:0},end:{line:26,column:0}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportComposition"),t,{name:"exportComposition",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"any-of",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(10,o,0),data:o,loc:{start:{line:14,column:0},end:{line:26,column:0}}}))?a:""},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"all-of",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:16,column:0},end:{line:26,column:0}}}))?a:""},11:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"enum",{name:"equals",hash:{},fn:e.program(12,o,0),inverse:e.program(13,o,0),data:o,loc:{start:{line:18,column:0},end:{line:26,column:0}}}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(13,o,0),inverse:e.program(15,o,0),data:o,loc:{start:{line:19,column:0},end:{line:23,column:7}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportType"),t,{name:"exportType",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportEnum"),t,{name:"exportEnum",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"if").call(l,s(t,"imports"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(t,"export"),"interface",{name:"equals",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:10,column:0},end:{line:26,column:11}}}))?a:"")},usePartial:!0,useData:!0},xn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport const $"+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:3,column:17},end:{line:3,column:21}}),t))?a:"")+" = "+(null!=(a=e.invokePartial(l(r,"schema"),t,{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+" as const;"},usePartial:!0,useData:!0},kn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.program(4,o,0),data:o,loc:{start:{line:4,column:0},end:{line:11,column:7}}}))?a:"")+"\n"},2:function(e,t,n,r,o){return"import { Injectable } from '@angular/core';\nimport type { Observable } from 'rxjs';\n"},4:function(e,t,n,r,o){return"import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport type { Observable } from 'rxjs';\n"},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"imports"),{name:"each",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:15,column:0},end:{line:17,column:9}}}))?a:"")+"\n"},7:function(e,t,n,r,o){var a,l=e.lambda;return"import type { "+(null!=(a=l(t,t))?a:"")+" } from '../models/"+(null!=(a=l(t,t))?a:"")+"';\n"},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import type { CancelablePromise } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathDeep",{start:{line:21,column:42},end:{line:21,column:60}}),t))?a:"")+"/CancelablePromise';\n"},11:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(12,o,0),inverse:e.program(14,o,0),data:o,loc:{start:{line:24,column:0},end:{line:28,column:11}}}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { BaseHttpRequest } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathDeep",{start:{line:25,column:35},end:{line:25,column:53}}),t))?a:"")+"/BaseHttpRequest';\n"},14:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import type { BaseHttpRequest } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathDeep",{start:{line:27,column:40},end:{line:27,column:58}}),t))?a:"")+"/BaseHttpRequest';\n"},16:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { OpenAPI } from '"+(null!=(a=s(l(i(o,"root"),"corePathDeep",{start:{line:30,column:27},end:{line:30,column:45}}),t))?a:"")+"/OpenAPI';\nimport { request as __request } from '"+(null!=(a=s(l(i(o,"root"),"corePathDeep",{start:{line:31,column:40},end:{line:31,column:58}}),t))?a:"")+"/request';\n"},18:function(e,t,n,r,o){return"@Injectable()\n"},20:function(e,t,n,r,o){return"\n\tconstructor(public readonly httpRequest: BaseHttpRequest) {}\n"},22:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(23,o,0),inverse:e.noop,data:o,loc:{start:{line:44,column:1},end:{line:47,column:12}}}))?a:""},23:function(e,t,n,r,o){return"\n\tconstructor(public readonly http: HttpClient) {}\n"},25:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.strict,i=e.lambda,u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n"+(null!=(a=u(n,"if").call(l,u(t,"deprecated"),{name:"if",hash:{},fn:e.program(26,o,0),inverse:e.noop,data:o,loc:{start:{line:52,column:1},end:{line:54,column:8}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"summary"),{name:"if",hash:{},fn:e.program(28,o,0),inverse:e.noop,data:o,loc:{start:{line:55,column:1},end:{line:57,column:8}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"description"),{name:"if",hash:{},fn:e.program(30,o,0),inverse:e.noop,data:o,loc:{start:{line:58,column:1},end:{line:60,column:8}}}))?a:"")+(null!=(a=u(n,"unless").call(l,u(u(o,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(32,o,0),inverse:e.noop,data:o,loc:{start:{line:61,column:1},end:{line:67,column:12}}}))?a:"")+(null!=(a=u(n,"each").call(l,u(t,"results"),{name:"each",hash:{},fn:e.program(37,o,0),inverse:e.noop,data:o,loc:{start:{line:68,column:1},end:{line:70,column:10}}}))?a:"")+"\t * @throws ApiError\n\t */\n"+(null!=(a=u(n,"if").call(l,u(u(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(39,o,0),inverse:e.program(45,o,0),data:o,loc:{start:{line:73,column:1},end:{line:89,column:8}}}))?a:"")+"\t\t\tmethod: '"+(null!=(a=i(s(t,"method",{start:{line:90,column:15},end:{line:90,column:21}}),t))?a:"")+"',\n\t\t\turl: '"+(null!=(a=i(s(t,"path",{start:{line:91,column:12},end:{line:91,column:16}}),t))?a:"")+"',\n"+(null!=(a=u(n,"if").call(l,u(t,"parametersPath"),{name:"if",hash:{},fn:e.program(50,o,0),inverse:e.noop,data:o,loc:{start:{line:92,column:3},end:{line:98,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersCookie"),{name:"if",hash:{},fn:e.program(53,o,0),inverse:e.noop,data:o,loc:{start:{line:99,column:3},end:{line:105,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersHeader"),{name:"if",hash:{},fn:e.program(55,o,0),inverse:e.noop,data:o,loc:{start:{line:106,column:3},end:{line:112,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersQuery"),{name:"if",hash:{},fn:e.program(57,o,0),inverse:e.noop,data:o,loc:{start:{line:113,column:3},end:{line:119,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersForm"),{name:"if",hash:{},fn:e.program(59,o,0),inverse:e.noop,data:o,loc:{start:{line:120,column:3},end:{line:126,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersBody"),{name:"if",hash:{},fn:e.program(61,o,0),inverse:e.noop,data:o,loc:{start:{line:127,column:3},end:{line:137,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"responseHeader"),{name:"if",hash:{},fn:e.program(68,o,0),inverse:e.noop,data:o,loc:{start:{line:138,column:3},end:{line:140,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"errors"),{name:"if",hash:{},fn:e.program(70,o,0),inverse:e.noop,data:o,loc:{start:{line:141,column:3},end:{line:147,column:10}}}))?a:"")+"\t\t\t...options,\n\t\t});\n\t}\n\n"},26:function(e,t,n,r,o){return"\t * @deprecated\n"},28:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"summary"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:56,column:4},end:{line:56,column:31}}}))?a:"")+"\n"},30:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:59,column:4},end:{line:59,column:35}}}))?a:"")+"\n"},32:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(33,o,0),inverse:e.noop,data:o,loc:{start:{line:62,column:1},end:{line:66,column:8}}}))?a:""},33:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"each",hash:{},fn:e.program(34,o,0),inverse:e.noop,data:o,loc:{start:{line:63,column:1},end:{line:65,column:10}}}))?a:""},34:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * @param "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:64,column:14},end:{line:64,column:18}}),t))?a:"")+" "+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"if",hash:{},fn:e.program(35,o,0),inverse:e.noop,data:o,loc:{start:{line:64,column:22},end:{line:64,column:79}}}))?a:"")+"\n"},35:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:64,column:41},end:{line:64,column:72}}}))?a:""},37:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * @returns "+(null!=(a=e.lambda(e.strict(t,"type",{start:{line:69,column:16},end:{line:69,column:20}}),t))?a:"")+" "+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"if",hash:{},fn:e.program(35,o,0),inverse:e.noop,data:o,loc:{start:{line:69,column:24},end:{line:69,column:81}}}))?a:"")+"\n"},39:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(40,o,0),inverse:e.program(43,o,0),data:o,loc:{start:{line:74,column:1},end:{line:80,column:12}}}))?a:""},40:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\tpublic "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:75,column:12},end:{line:75,column:16}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:75,column:35},end:{line:75,column:62}}}))?a:"")+"options?: Partial<ApiRequestOptions>): Observable<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn this.httpRequest.request({\n"},41:function(e,t,n,r,o){return", "},43:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:78,column:11},end:{line:78,column:15}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:78,column:34},end:{line:78,column:61}}}))?a:"")+"options?: Partial<ApiRequestOptions>): CancelablePromise<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn this.httpRequest.request({\n"},45:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(46,o,0),inverse:e.program(48,o,0),data:o,loc:{start:{line:82,column:1},end:{line:88,column:12}}}))?a:""},46:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:83,column:11},end:{line:83,column:15}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:83,column:34},end:{line:83,column:61}}}))?a:"")+"options?: Partial<ApiRequestOptions>): Observable<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn __request(OpenAPI, this.http, {\n"},48:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic static "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:86,column:18},end:{line:86,column:22}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:86,column:41},end:{line:86,column:68}}}))?a:"")+"options?: Partial<ApiRequestOptions>): CancelablePromise<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn __request(OpenAPI, {\n"},50:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tpath: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersPath"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:94,column:4},end:{line:96,column:13}}}))?a:"")+"\t\t\t},\n"},51:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t\t\t\t'"+(null!=(a=s(l(t,"prop",{start:{line:95,column:8},end:{line:95,column:12}}),t))?a:"")+"': "+(null!=(a=s(l(t,"name",{start:{line:95,column:21},end:{line:95,column:25}}),t))?a:"")+",\n"},53:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tcookies: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersCookie"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:101,column:4},end:{line:103,column:13}}}))?a:"")+"\t\t\t},\n"},55:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\theaders: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersHeader"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:108,column:4},end:{line:110,column:13}}}))?a:"")+"\t\t\t},\n"},57:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tquery: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersQuery"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:115,column:4},end:{line:117,column:13}}}))?a:"")+"\t\t\t},\n"},59:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tformData: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersForm"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:122,column:4},end:{line:124,column:13}}}))?a:"")+"\t\t\t},\n"},61:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"equals").call(l,s(s(t,"parametersBody"),"in"),"formData",{name:"equals",hash:{},fn:e.program(62,o,0),inverse:e.noop,data:o,loc:{start:{line:128,column:3},end:{line:130,column:14}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(t,"parametersBody"),"in"),"body",{name:"equals",hash:{},fn:e.program(64,o,0),inverse:e.noop,data:o,loc:{start:{line:131,column:3},end:{line:133,column:14}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(t,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(66,o,0),inverse:e.noop,data:o,loc:{start:{line:134,column:3},end:{line:136,column:10}}}))?a:"")},62:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tformData: "+(null!=(a=e.lambda(e.strict(l(t,"parametersBody"),"name",{start:{line:129,column:16},end:{line:129,column:35}}),t))?a:"")+",\n"},64:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tbody: "+(null!=(a=e.lambda(e.strict(l(t,"parametersBody"),"name",{start:{line:132,column:12},end:{line:132,column:31}}),t))?a:"")+",\n"},66:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tmediaType: '"+(null!=(a=e.lambda(e.strict(l(t,"parametersBody"),"mediaType",{start:{line:135,column:18},end:{line:135,column:42}}),t))?a:"")+"',\n"},68:function(e,t,n,r,o){var a;return"\t\t\tresponseHeader: '"+(null!=(a=e.lambda(e.strict(t,"responseHeader",{start:{line:139,column:23},end:{line:139,column:37}}),t))?a:"")+"',\n"},70:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\terrors: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"errors"),{name:"each",hash:{},fn:e.program(71,o,0),inverse:e.noop,data:o,loc:{start:{line:143,column:4},end:{line:145,column:13}}}))?a:"")+"\t\t\t},\n"},71:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\t\t"+(null!=(a=e.lambda(e.strict(t,"code",{start:{line:144,column:7},end:{line:144,column:11}}),t))?a:"")+": `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:144,column:17},end:{line:144,column:52}}}))?a:"")+"`,\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.strict,i=e.lambda,u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(u(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=u(n,"equals").call(l,u(u(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:13,column:11}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"imports"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:14,column:0},end:{line:19,column:7}}}))?a:"")+(null!=(a=u(n,"notEquals").call(l,u(u(o,"root"),"httpClient"),"angular",{name:"notEquals",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:20,column:0},end:{line:22,column:14}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(u(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.program(16,o,0),data:o,loc:{start:{line:23,column:0},end:{line:32,column:7}}}))?a:"")+"\nimport type { ApiRequestOptions } from '"+(null!=(a=i(s(u(o,"root"),"corePathDeep",{start:{line:34,column:42},end:{line:34,column:60}}),t))?a:"")+"/ApiRequestOptions';\n\n"+(null!=(a=u(n,"equals").call(l,u(u(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(18,o,0),inverse:e.noop,data:o,loc:{start:{line:36,column:0},end:{line:38,column:11}}}))?a:"")+"export class "+(null!=(a=i(s(t,"name",{start:{line:39,column:16},end:{line:39,column:20}}),t))?a:"")+(null!=(a=i(s(u(o,"root"),"postfix",{start:{line:39,column:26},end:{line:39,column:39}}),t))?a:"")+" {\n"+(null!=(a=u(n,"if").call(l,u(u(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(20,o,0),inverse:e.program(22,o,0),data:o,loc:{start:{line:40,column:1},end:{line:48,column:8}}}))?a:"")+"\n"+(null!=(a=u(n,"each").call(l,u(t,"operations"),{name:"each",hash:{},fn:e.program(25,o,0),inverse:e.noop,data:o,loc:{start:{line:50,column:1},end:{line:152,column:10}}}))?a:"")+"}"},usePartial:!0,useData:!0},Rn={1:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export { "+(null!=(a=s(l(t,"clientName",{start:{line:4,column:12},end:{line:4,column:22}}),t))?a:"")+" } from './"+(null!=(a=s(l(t,"clientName",{start:{line:4,column:39},end:{line:4,column:49}}),t))?a:"")+"';\n\n"},3:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"export { ApiError } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:8,column:28},end:{line:8,column:45}}),t))?a:"")+"/ApiError';\n"+(null!=(a=i(n,"if").call(null!=t?t:e.nullContext||{},i(i(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?a:"")+"export { CancelablePromise, CancelError } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:12,column:50},end:{line:12,column:67}}),t))?a:"")+"/CancelablePromise';\nexport { OpenAPI } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:13,column:27},end:{line:13,column:44}}),t))?a:"")+"/OpenAPI';\nexport type { OpenAPIConfig } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:14,column:38},end:{line:14,column:55}}),t))?a:"")+"/OpenAPI';\n"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"export { BaseHttpRequest } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathTop",{start:{line:10,column:35},end:{line:10,column:52}}),t))?a:"")+"/BaseHttpRequest';\n"},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:0},end:{line:30,column:7}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"each",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:19,column:0},end:{line:29,column:9}}}))?a:"")},8:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:20,column:0},end:{line:28,column:7}}}))?a:""},9:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export type { "+(null!=(a=s(l(t,"name",{start:{line:21,column:17},end:{line:21,column:21}}),t))?a:"")+" } from './models/"+(null!=(a=s(l(t,"name",{start:{line:21,column:45},end:{line:21,column:49}}),t))?a:"")+"';\n"},11:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"enum"),{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.program(14,o,0),data:o,loc:{start:{line:22,column:0},end:{line:28,column:0}}}))?a:""},12:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export { "+(null!=(a=s(l(t,"name",{start:{line:23,column:12},end:{line:23,column:16}}),t))?a:"")+" } from './models/"+(null!=(a=s(l(t,"name",{start:{line:23,column:40},end:{line:23,column:44}}),t))?a:"")+"';\n"},14:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"enums"),{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:24,column:0},end:{line:28,column:0}}}))?a:""},16:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"if",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o,loc:{start:{line:33,column:0},end:{line:38,column:7}}}))?a:""},17:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"each",hash:{},fn:e.program(18,o,0),inverse:e.noop,data:o,loc:{start:{line:35,column:0},end:{line:37,column:9}}}))?a:"")},18:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export { $"+(null!=(a=s(l(t,"name",{start:{line:36,column:13},end:{line:36,column:17}}),t))?a:"")+" } from './schemas/$"+(null!=(a=s(l(t,"name",{start:{line:36,column:43},end:{line:36,column:47}}),t))?a:"")+"';\n"},20:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"services"),{name:"if",hash:{},fn:e.program(21,o,0),inverse:e.noop,data:o,loc:{start:{line:41,column:0},end:{line:46,column:7}}}))?a:""},21:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"services"),{name:"each",hash:{},fn:e.program(22,o,0),inverse:e.noop,data:o,loc:{start:{line:43,column:0},end:{line:45,column:9}}}))?a:"")},22:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"export { "+(null!=(a=s(l(t,"name",{start:{line:44,column:12},end:{line:44,column:16}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:44,column:22},end:{line:44,column:35}}),t))?a:"")+" } from './services/"+(null!=(a=s(l(t,"name",{start:{line:44,column:61},end:{line:44,column:65}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:44,column:71},end:{line:44,column:84}}),t))?a:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:6,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportCore"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:7,column:0},end:{line:15,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportModels"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:16,column:0},end:{line:31,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportSchemas"),{name:"if",hash:{},fn:e.program(16,o,0),inverse:e.noop,data:o,loc:{start:{line:32,column:0},end:{line:39,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportServices"),{name:"if",hash:{},fn:e.program(20,o,0),inverse:e.noop,data:o,loc:{start:{line:40,column:0},end:{line:47,column:7}}}))?a:"")},usePartial:!0,useData:!0},Cn={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:4,column:53}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:5,column:55}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:6,column:52}}}))?a:"")},2:function(e,t,n,r,o){return"Blob"},4:function(e,t,n,r,o){var a;return null!=(a=e.lambda(e.strict(t,"base",{start:{line:8,column:3},end:{line:8,column:7}}),t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"base"),"binary",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(4,o,0),data:o,loc:{start:{line:1,column:0},end:{line:9,column:13}}}))?a:""},useData:!0},wn={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:37,column:11}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\nexport namespace "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:15,column:20},end:{line:15,column:24}}),t))?a:"")+" {\n\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"enums"),{name:"each",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:1},end:{line:34,column:10}}}))?a:"")+"\n}\n"},8:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"ifdef").call(l,s(t,"description"),s(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:1},end:{line:27,column:11}}}))?a:"")+"\texport enum "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:28,column:16},end:{line:28,column:20}}),t))?a:"")+" {\n"+(null!=(a=s(n,"each").call(l,s(t,"enum"),{name:"each",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o,loc:{start:{line:29,column:2},end:{line:31,column:11}}}))?a:"")+"\t}\n\n"},9:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:20,column:1},end:{line:22,column:8}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.noop,data:o,loc:{start:{line:23,column:1},end:{line:25,column:8}}}))?a:"")+"\t */\n"},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:21,column:4},end:{line:21,column:35}}}))?a:"")+"\n"},12:function(e,t,n,r,o){return"\t * @deprecated\n"},14:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t\t"+(null!=(a=s(l(t,"name",{start:{line:30,column:5},end:{line:30,column:9}}),t))?a:"")+" = "+(null!=(a=s(l(t,"value",{start:{line:30,column:18},end:{line:30,column:23}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"ifdef").call(l,s(t,"description"),s(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?a:"")+"export type "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?a:"")+" = "+(null!=(a=e.invokePartial(s(r,"type"),t,{name:"type",hash:{parent:s(t,"name")},data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+";\n"+(null!=(a=s(n,"if").call(l,s(t,"enums"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:0},end:{line:38,column:7}}}))?a:"")},usePartial:!0,useData:!0},qn={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},6:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:1},end:{line:17,column:8}}}))?a:"")+(null!=(a=s(n,"containsSpaces").call(l,s(t,"name"),{name:"containsSpaces",hash:{},fn:e.program(9,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:18,column:1},end:{line:22,column:20}}}))?a:"")},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:15,column:4},end:{line:15,column:35}}}))?a:"")+"\n\t */\n"},9:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t'"+(null!=(a=s(l(t,"name",{start:{line:19,column:5},end:{line:19,column:9}}),t))?a:"")+"' = "+(null!=(a=s(l(t,"value",{start:{line:19,column:19},end:{line:19,column:24}}),t))?a:"")+",\n"},11:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t"+(null!=(a=s(l(t,"name",{start:{line:21,column:4},end:{line:21,column:8}}),t))?a:"")+" = "+(null!=(a=s(l(t,"value",{start:{line:21,column:17},end:{line:21,column:22}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"ifdef").call(l,s(t,"description"),s(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?a:"")+"export enum "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?a:"")+" {\n"+(null!=(a=s(n,"each").call(l,s(t,"enum"),{name:"each",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:1},end:{line:23,column:10}}}))?a:"")+"}"},useData:!0},An={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},6:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=i(n,"ifdef").call(null!=t?t:e.nullContext||{},i(t,"description"),i(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(7,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:13,column:1},end:{line:22,column:11}}}))?s:"")+"\t"+(null!=(s=e.invokePartial(i(r,"isReadOnly"),t,{name:"isReadOnly",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(t,"name",{start:{line:23,column:19},end:{line:23,column:23}}),t))?s:"")+(null!=(s=e.invokePartial(i(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(i(r,"type"),t,{name:"type",hash:{parent:i(l[1],"name")},data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+";\n"},7:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:15,column:1},end:{line:17,column:8}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:1},end:{line:20,column:8}}}))?a:"")+"\t */\n"},8:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:16,column:4},end:{line:16,column:35}}}))?a:"")+"\n"},10:function(e,t,n,r,o){return"\t * @deprecated\n"},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(13,o,0),inverse:e.noop,data:o,loc:{start:{line:27,column:0},end:{line:46,column:11}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\nexport namespace "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:29,column:20},end:{line:29,column:24}}),t))?a:"")+" {\n\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"enums"),{name:"each",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o,loc:{start:{line:31,column:1},end:{line:43,column:10}}}))?a:"")+"\n}\n"},14:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o,loc:{start:{line:32,column:1},end:{line:36,column:8}}}))?a:"")+"\texport enum "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:37,column:16},end:{line:37,column:20}}),t))?a:"")+" {\n"+(null!=(a=s(n,"each").call(l,s(t,"enum"),{name:"each",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o,loc:{start:{line:38,column:2},end:{line:40,column:11}}}))?a:"")+"\t}\n\n"},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:34,column:4},end:{line:34,column:35}}}))?a:"")+"\n\t */\n"},17:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t\t"+(null!=(a=s(l(t,"name",{start:{line:39,column:5},end:{line:39,column:9}}),t))?a:"")+" = "+(null!=(a=s(l(t,"value",{start:{line:39,column:18},end:{line:39,column:23}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o,a,l){var s,i=null!=t?t:e.nullContext||{},u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=u(n,"ifdef").call(i,u(t,"description"),u(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?s:"")+"export type "+(null!=(s=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?s:"")+" = {\n"+(null!=(s=u(n,"each").call(i,u(t,"properties"),{name:"each",hash:{},fn:e.program(6,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:12,column:1},end:{line:24,column:10}}}))?s:"")+"};\n"+(null!=(s=u(n,"if").call(i,u(t,"enums"),{name:"if",hash:{},fn:e.program(12,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:26,column:0},end:{line:47,column:7}}}))?s:"")},usePartial:!0,useData:!0,useDepths:!0},jn={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"ifdef").call(null!=t?t:e.nullContext||{},l(t,"description"),l(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?a:"")+"export type "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?a:"")+" = "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+";"},usePartial:!0,useData:!0},Hn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},Dn={1:function(e,t,n,r,o){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"isNullable"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?a:""},useData:!0},En={1:function(e,t,n,r,o){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?a:""},useData:!0},Tn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(t,"isRequired"),{name:"unless",hash:{},fn:e.program(2,o,0),inverse:e.program(4,o,0),data:o,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?a:""},2:function(e,t,n,r,o){return"?"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(t,"isRequired"),{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"unless",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},useData:!0},In={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.program(12,o,0),data:o,loc:{start:{line:2,column:0},end:{line:27,column:7}}}))?a:""},2:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(a=s(n,"each").call(l,s(t,"parameters"),{name:"each",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?a:"")+"}: {\n"+(null!=(a=s(n,"each").call(l,s(t,"parameters"),{name:"each",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:8,column:0},end:{line:20,column:9}}}))?a:"")+"}"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.lambda(e.strict(t,"name",{start:{line:5,column:3},end:{line:5,column:7}}),t))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?a:"")+",\n"},4:function(e,t,n,r,o){var a;return" = "+(null!=(a=e.lambda(e.strict(t,"default",{start:{line:5,column:31},end:{line:5,column:38}}),t))?a:"")},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"ifdef").call(null!=t?t:e.nullContext||{},l(t,"description"),l(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:18,column:10}}}))?a:"")+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:19,column:3},end:{line:19,column:7}}),t))?a:"")+(null!=(a=e.invokePartial(l(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},7:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?a:"")+" */\n"},8:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:12,column:3},end:{line:12,column:34}}}))?a:"")+"\n"},10:function(e,t,n,r,o){return" * @deprecated\n"},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"each",hash:{},fn:e.program(13,o,0),inverse:e.noop,data:o,loc:{start:{line:24,column:0},end:{line:26,column:9}}}))?a:"")},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.lambda(e.strict(t,"name",{start:{line:25,column:3},end:{line:25,column:7}}),t))?a:"")+(null!=(a=e.invokePartial(l(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:25,column:36},end:{line:25,column:74}}}))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:28,column:7}}}))?a:""},usePartial:!0,useData:!0},Sn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"results"),{name:"each",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?a:""},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(o,"last"),{name:"unless",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?a:"")},3:function(e,t,n,r,o){return" | "},5:function(e,t,n,r,o){return"void"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"results"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(5,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},usePartial:!0,useData:!0},_n={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaInterface"),t,{name:"schemaInterface",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?a:""},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaEnum"),t,{name:"schemaEnum",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"array",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaArray"),t,{name:"schemaArray",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,o,0),inverse:e.program(12,o,0),data:o,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?a:""},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaDictionary"),t,{name:"schemaDictionary",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(15,o,0),data:o,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaComposition"),t,{name:"schemaComposition",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(16,o,0),data:o,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?a:""},16:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(17,o,0),data:o,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?a:""},17:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaGeneric"),t,{name:"schemaGeneric",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?a:""},usePartial:!0,useData:!0},Nn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tcontains: "+(null!=(a=e.invokePartial(l(r,"schema"),l(t,"link"),{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},3:function(e,t,n,r,o){var a;return"\tcontains: {\n\t\ttype: '"+(null!=(a=e.lambda(e.strict(t,"base",{start:{line:7,column:12},end:{line:7,column:16}}),t))?a:"")+"',\n\t},\n"},5:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:11,column:16},end:{line:11,column:26}}),t))?a:"")+",\n"},7:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:14,column:16},end:{line:14,column:26}}),t))?a:"")+",\n"},9:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:17,column:16},end:{line:17,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: 'array',\n"+(null!=(a=s(n,"if").call(l,s(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},Bn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tdescription: `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:4,column:15},end:{line:4,column:50}}}))?a:"")+"`,\n"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"schema"),t,{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(o,"last"),{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:43},end:{line:6,column:73}}}))?a:"")},4:function(e,t,n,r,o){return", "},6:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:8,column:16},end:{line:8,column:26}}),t))?a:"")+",\n"},8:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:11,column:16},end:{line:11,column:26}}),t))?a:"")+",\n"},10:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:14,column:16},end:{line:14,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: '"+(null!=(a=e.lambda(e.strict(t,"export",{start:{line:2,column:10},end:{line:2,column:16}}),t))?a:"")+"',\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+"\tcontains: ["+(null!=(a=s(n,"each").call(l,s(t,"properties"),{name:"each",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:12},end:{line:6,column:82}}}))?a:"")+"],\n"+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},$n={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tcontains: "+(null!=(a=e.invokePartial(l(r,"schema"),l(t,"link"),{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},3:function(e,t,n,r,o){var a;return"\tcontains: {\n\t\ttype: '"+(null!=(a=e.lambda(e.strict(t,"base",{start:{line:7,column:12},end:{line:7,column:16}}),t))?a:"")+"',\n\t},\n"},5:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:11,column:16},end:{line:11,column:26}}),t))?a:"")+",\n"},7:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:14,column:16},end:{line:14,column:26}}),t))?a:"")+",\n"},9:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:17,column:16},end:{line:17,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: 'dictionary',\n"+(null!=(a=s(n,"if").call(l,s(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},Mn={1:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:4,column:16},end:{line:4,column:26}}),t))?a:"")+",\n"},3:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:7,column:16},end:{line:7,column:26}}),t))?a:"")+",\n"},5:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:10,column:16},end:{line:10,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: 'Enum',\n"+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?a:"")+"}"},useData:!0},Ln={1:function(e,t,n,r,o){var a;return"\ttype: '"+(null!=(a=e.lambda(e.strict(t,"type",{start:{line:3,column:11},end:{line:3,column:15}}),t))?a:"")+"',\n"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tdescription: `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:6,column:15},end:{line:6,column:50}}}))?a:"")+"`,\n"},5:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:9,column:16},end:{line:9,column:26}}),t))?a:"")+",\n"},7:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:12,column:16},end:{line:12,column:26}}),t))?a:"")+",\n"},9:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:15,column:16},end:{line:15,column:26}}),t))?a:"")+",\n"},11:function(e,t,n,r,o){var a;return"\tformat: '"+(null!=(a=e.lambda(e.strict(t,"format",{start:{line:18,column:13},end:{line:18,column:19}}),t))?a:"")+"',\n"},13:function(e,t,n,r,o){var a;return"\tmaximum: "+(null!=(a=e.lambda(e.strict(t,"maximum",{start:{line:21,column:13},end:{line:21,column:20}}),t))?a:"")+",\n"},15:function(e,t,n,r,o){var a;return"\texclusiveMaximum: "+(null!=(a=e.lambda(e.strict(t,"exclusiveMaximum",{start:{line:24,column:22},end:{line:24,column:38}}),t))?a:"")+",\n"},17:function(e,t,n,r,o){var a;return"\tminimum: "+(null!=(a=e.lambda(e.strict(t,"minimum",{start:{line:27,column:13},end:{line:27,column:20}}),t))?a:"")+",\n"},19:function(e,t,n,r,o){var a;return"\texclusiveMinimum: "+(null!=(a=e.lambda(e.strict(t,"exclusiveMinimum",{start:{line:30,column:22},end:{line:30,column:38}}),t))?a:"")+",\n"},21:function(e,t,n,r,o){var a;return"\tmultipleOf: "+(null!=(a=e.lambda(e.strict(t,"multipleOf",{start:{line:33,column:16},end:{line:33,column:26}}),t))?a:"")+",\n"},23:function(e,t,n,r,o){var a;return"\tmaxLength: "+(null!=(a=e.lambda(e.strict(t,"maxLength",{start:{line:36,column:15},end:{line:36,column:24}}),t))?a:"")+",\n"},25:function(e,t,n,r,o){var a;return"\tminLength: "+(null!=(a=e.lambda(e.strict(t,"minLength",{start:{line:39,column:15},end:{line:39,column:24}}),t))?a:"")+",\n"},27:function(e,t,n,r,o){var a;return"\tpattern: '"+(null!=(a=e.lambda(e.strict(t,"pattern",{start:{line:42,column:14},end:{line:42,column:21}}),t))?a:"")+"',\n"},29:function(e,t,n,r,o){var a;return"\tmaxItems: "+(null!=(a=e.lambda(e.strict(t,"maxItems",{start:{line:45,column:14},end:{line:45,column:22}}),t))?a:"")+",\n"},31:function(e,t,n,r,o){var a;return"\tminItems: "+(null!=(a=e.lambda(e.strict(t,"minItems",{start:{line:48,column:14},end:{line:48,column:22}}),t))?a:"")+",\n"},33:function(e,t,n,r,o){var a;return"\tuniqueItems: "+(null!=(a=e.lambda(e.strict(t,"uniqueItems",{start:{line:51,column:17},end:{line:51,column:28}}),t))?a:"")+",\n"},35:function(e,t,n,r,o){var a;return"\tmaxProperties: "+(null!=(a=e.lambda(e.strict(t,"maxProperties",{start:{line:54,column:19},end:{line:54,column:32}}),t))?a:"")+",\n"},37:function(e,t,n,r,o){var a;return"\tminProperties: "+(null!=(a=e.lambda(e.strict(t,"minProperties",{start:{line:57,column:19},end:{line:57,column:32}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(a=s(n,"if").call(l,s(t,"type"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"format"),{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maximum"),{name:"if",hash:{},fn:e.program(13,o,0),inverse:e.noop,data:o,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minimum"),{name:"if",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(19,o,0),inverse:e.noop,data:o,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"multipleOf"),{name:"if",hash:{},fn:e.program(21,o,0),inverse:e.noop,data:o,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maxLength"),{name:"if",hash:{},fn:e.program(23,o,0),inverse:e.noop,data:o,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minLength"),{name:"if",hash:{},fn:e.program(25,o,0),inverse:e.noop,data:o,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"pattern"),{name:"if",hash:{},fn:e.program(27,o,0),inverse:e.noop,data:o,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maxItems"),{name:"if",hash:{},fn:e.program(29,o,0),inverse:e.noop,data:o,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minItems"),{name:"if",hash:{},fn:e.program(31,o,0),inverse:e.noop,data:o,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"uniqueItems"),{name:"if",hash:{},fn:e.program(33,o,0),inverse:e.noop,data:o,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maxProperties"),{name:"if",hash:{},fn:e.program(35,o,0),inverse:e.noop,data:o,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minProperties"),{name:"if",hash:{},fn:e.program(37,o,0),inverse:e.noop,data:o,loc:{start:{line:56,column:0},end:{line:58,column:7}}}))?a:"")+"}"},useData:!0},Fn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tdescription: `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:3,column:15},end:{line:3,column:50}}}))?a:"")+"`,\n"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"properties"),{name:"each",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:7,column:1},end:{line:9,column:10}}}))?a:""},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t"+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:8,column:5},end:{line:8,column:9}}),t))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"schema"),t,{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},6:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:13,column:16},end:{line:13,column:26}}),t))?a:"")+",\n"},8:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:16,column:16},end:{line:16,column:26}}),t))?a:"")+",\n"},10:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:19,column:16},end:{line:19,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?a:"")+"\tproperties: {\n"+(null!=(a=s(n,"if").call(l,s(t,"properties"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:10,column:7}}}))?a:"")+"\t},\n"+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:0},end:{line:20,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},Wn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeInterface"),t,{name:"typeInterface",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?a:""},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeReference"),t,{name:"typeReference",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeEnum"),t,{name:"typeEnum",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"array",{name:"equals",hash:{},fn:e.program(10,o,0),inverse:e.program(12,o,0),data:o,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?a:""},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeArray"),t,{name:"typeArray",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(15,o,0),data:o,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeDictionary"),t,{name:"typeDictionary",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,o,0),inverse:e.program(18,o,0),data:o,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?a:""},16:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeUnion"),t,{name:"typeUnion",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},18:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,o,0),inverse:e.program(19,o,0),data:o,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?a:""},19:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,o,0),inverse:e.program(22,o,0),data:o,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?a:""},20:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeIntersection"),t,{name:"typeIntersection",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},22:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeGeneric"),t,{name:"typeGeneric",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?a:""},usePartial:!0,useData:!0},Vn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Array<"+(null!=(a=e.invokePartial(l(r,"type"),l(t,"link"),{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Array<"+(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},usePartial:!0,useData:!0},Un={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Record<string, "+(null!=(a=e.invokePartial(l(r,"type"),l(t,"link"),{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Record<string, "+(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},usePartial:!0,useData:!0},Qn={1:function(e,t,n,r,o){var a;return null!=(a=e.lambda(t,t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"enumerator").call(null!=t?t:e.nullContext||{},l(t,"enum"),l(t,"parent"),l(t,"name"),{name:"enumerator",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:55}}}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},zn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},Jn={1:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(s=i(n,"each").call(null!=t?t:e.nullContext||{},i(t,"properties"),{name:"each",hash:{},fn:e.program(2,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:19,column:9}}}))?s:"")+"}"+(null!=(s=e.invokePartial(i(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")},2:function(e,t,n,r,o,a,l){var s,i=null!=t?t:e.nullContext||{},u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=u(n,"ifdef").call(i,u(t,"description"),u(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(3,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:13,column:10}}}))?s:"")+(null!=(s=u(n,"if").call(i,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(8,o,0,a,l),inverse:e.program(10,o,0,a,l),data:o,loc:{start:{line:14,column:0},end:{line:18,column:7}}}))?s:"")},3:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?a:"")+" */\n"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:7,column:3},end:{line:7,column:34}}}))?a:"")+"\n"},6:function(e,t,n,r,o){return" * @deprecated\n"},8:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=e.invokePartial(i(r,"isReadOnly"),t,{name:"isReadOnly",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(t,"name",{start:{line:15,column:18},end:{line:15,column:22}}),t))?s:"")+(null!=(s=e.invokePartial(i(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(i(r,"type"),t,{name:"type",hash:{parent:i(l[1],"parent")},data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+";\n"},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"isReadOnly"),t,{name:"isReadOnly",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:17,column:18},end:{line:17,column:22}}),t))?a:"")+(null!=(a=e.invokePartial(l(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+";\n"},12:function(e,t,n,r,o){return"any"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(s=i(n,"if").call(null!=t?t:e.nullContext||{},i(t,"properties"),{name:"if",hash:{},fn:e.program(1,o,0,a,l),inverse:e.program(12,o,0,a,l),data:o,loc:{start:{line:1,column:0},end:{line:23,column:9}}}))?s:""},usePartial:!0,useData:!0,useDepths:!0},Gn={1:function(e,t,n,r,o){var a;return null!=(a=e.lambda(t,t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"intersection").call(null!=t?t:e.nullContext||{},l(t,"properties"),l(t,"parent"),{name:"intersection",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},Zn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},Kn={1:function(e,t,n,r,o){var a;return null!=(a=e.lambda(t,t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"union").call(null!=t?t:e.nullContext||{},l(t,"properties"),l(t,"parent"),{name:"union",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0};const Xn=e=>{xt.registerHelper("ifdef",(function(...e){const t=e.pop();return e.every((e=>!e))?t.inverse(this):t.fn(this)})),xt.registerHelper("equals",(function(e,t,n){return e===t?n.fn(this):n.inverse(this)})),xt.registerHelper("notEquals",(function(e,t,n){return e!==t?n.fn(this):n.inverse(this)})),xt.registerHelper("containsSpaces",(function(e,t){return/\s+/.test(e)?t.fn(this):t.inverse(this)})),xt.registerHelper("union",(function(t,n,r){const o=xt.partials.type,a=t.map((t=>o({...e,...t,parent:n}))).filter(O);let l=a.join(" | ");return a.length>1&&(l=`(${l})`),r.fn(l)})),xt.registerHelper("intersection",(function(t,n,r){const o=xt.partials.type,a=t.map((t=>o({...e,...t,parent:n}))).filter(O);let l=a.join(" & ");return a.length>1&&(l=`(${l})`),r.fn(l)})),xt.registerHelper("enumerator",(function(t,n,r,o){return!e.useUnionTypes&&n&&r?`${n}.${r}`:o.fn(t.map((e=>e.value)).filter(O).join(" | "))})),xt.registerHelper("escapeComment",(function(e){return e.replace(/\*\//g,"*").replace(/\/\*/g,"*").replace(/\r?\n(.*)/g,((e,t)=>`${o.EOL} * ${t.trim()}`))})),xt.registerHelper("escapeDescription",(function(e){return e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\${/g,"\\${")})),xt.registerHelper("camelCase",(function(e){return n(e)}))},Yn=l.writeFile,er=l.copyFile,tr=l.pathExists,nr=l.mkdirp,rr=l.remove,or=e=>{let t=0,n=e.split(o.EOL);return n=n.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${"\t".repeat(n)}${e}`;return""===r.trim()?"":r})),n.join(o.EOL)},ar=(e,t)=>{let n=e.split(o.EOL);n=n.map((e=>{switch(t){case exports.Indent.SPACE_4:return e.replace(/\t/g," ");case exports.Indent.SPACE_2:return e.replace(/\t/g," ");case exports.Indent.TAB:return e}}));return`${n.join(o.EOL)}${o.EOL}`},lr=e=>{switch(e){case exports.HttpClient.FETCH:return"FetchHttpRequest";case exports.HttpClient.XHR:return"XHRHttpRequest";case exports.HttpClient.NODE:return"NodeHttpRequest";case exports.HttpClient.AXIOS:return"AxiosHttpRequest";case exports.HttpClient.ANGULAR:return"AngularHttpRequest"}},sr=e=>e.sort(((e,t)=>{const n=e.name.toLowerCase(),r=t.name.toLowerCase();return n.localeCompare(r,"en")})),ir=e=>e.sort(((e,t)=>{const n=e.name.toLowerCase(),r=t.name.toLowerCase();return n.localeCompare(r,"en")})),ur=async(e,t,n,r,o,l,s,i,u,p,c,m,d,f,h,y)=>{const v=a.resolve(process.cwd(),n),g=a.resolve(v,"core"),P=a.resolve(v,"models"),b=a.resolve(v,"schemas"),O=a.resolve(v,"services");if(x=process.cwd(),k=n,!a.relative(k,x).startsWith(".."))throw new Error("Output folder is not a subdirectory of the current working directory");var x,k;s&&(await rr(g),await nr(g),await(async(e,t,n,r,o,l,s,i,u)=>{const p=lr(r),c={httpClient:r,clientName:i,httpRequest:p,corePathTop:o,corePathDeep:l,server:e.server,version:e.version};if(await Yn(a.resolve(n,"OpenAPI.ts"),ar(t.core.settings(c),s)),await Yn(a.resolve(n,"ApiError.ts"),ar(t.core.apiError(c),s)),await Yn(a.resolve(n,"ApiRequestOptions.ts"),ar(t.core.apiRequestOptions(c),s)),await Yn(a.resolve(n,"ApiResult.ts"),ar(t.core.apiResult(c),s)),await Yn(a.resolve(n,"CancelablePromise.ts"),ar(t.core.cancelablePromise(c),s)),await Yn(a.resolve(n,"request.ts"),ar(t.core.request(c),s)),S(i)&&(await Yn(a.resolve(n,"BaseHttpRequest.ts"),ar(t.core.baseHttpRequest(c),s)),await Yn(a.resolve(n,`${p}.ts`),ar(t.core.httpRequest(c),s))),u){const e=a.resolve(process.cwd(),u);if(!await tr(e))throw new Error(`Custom request file "${e}" does not exists`);await er(e,a.resolve(n,"request.ts"))}})(e,t,g,r,c,m,d,h,y)),i&&(await rr(O),await nr(O),await(async(e,t,n,r,o,l,s,i,u,p,c)=>{for(const m of e){const e=a.resolve(n,`${m.name}${p}.ts`),d=t.exports.service({...m,httpClient:r,useUnionTypes:o,useOptions:l,postfix:p,corePathTop:s,corePathDeep:i,exportClient:S(c)});await Yn(e,ar(or(d),u))}})(e.services,t,O,r,l,o,c,m,d,f,h)),p&&(await rr(b),await nr(b),await(async(e,t,n,r,o,l)=>{for(const s of e){const e=a.resolve(n,`$${s.name}.ts`),i=t.exports.schema({...s,httpClient:r,useUnionTypes:o});await Yn(e,ar(or(i),l))}})(e.models,t,b,r,l,d)),u&&(await rr(P),await nr(P),await(async(e,t,n,r,o,l)=>{for(const s of e){const e=a.resolve(n,`${s.name}.ts`),i=t.exports.model({...s,httpClient:r,useUnionTypes:o});await Yn(e,ar(or(i),l))}})(e.models,t,P,r,l,d)),S(h)&&(await nr(v),await(async(e,t,n,r,o,l,s,i,u)=>{const p=t.client({clientName:o,httpClient:r,postfix:u,corePathTop:l,corePathDeep:s,server:e.server,version:e.version,models:sr(e.models),services:ir(e.services),httpRequest:lr(r)});await Yn(a.resolve(n,`${o}.ts`),ar(or(p),i))})(e,t,v,r,h,c,m,d,f)),(s||i||p||u)&&(await nr(v),await(async(e,t,n,r,o,l,s,i,u,p,c,m)=>{const d=t.index({exportCore:o,exportServices:l,exportModels:s,exportSchemas:i,useUnionTypes:r,corePathTop:u,corePathDeep:p,postfix:c,clientName:m,server:e.server,version:e.version,models:sr(e.models),services:ir(e.services),exportClient:S(m)});await Yn(a.resolve(n,"index.ts"),d)})(e,t,v,l,s,i,u,p,c,m,f,h))},pr=async({input:e,output:t,httpClient:n=exports.HttpClient.FETCH,clientName:o,useOptions:a=!1,useUnionTypes:l=!1,exportCore:s=!0,exportServices:u=!0,exportModels:p=!0,exportSchemas:c=!1,corePathTop:m="./core",corePathDeep:d="../core",indent:f=exports.Indent.SPACE_4,postfix:h="Service",request:y,write:v=!0})=>{const g=i(e)?await(async e=>await r.bundle(e,e,{}))(e):e,P=(e=>{const t=e.swagger||e.openapi;if("string"==typeof t){const e=t.charAt(0),n=Number.parseInt(e);if(n===oe.V2||n===oe.V3)return n}throw new Error(`Unsupported Open API version: "${String(t)}"`)})(g),b=(e=>{Xn(e);const t={index:xt.template(Rn),client:xt.template(kt),exports:{model:xt.template(On),schema:xt.template(xn),service:xt.template(kn)},core:{settings:xt.template(dn),apiError:xt.template(Ht),apiRequestOptions:xt.template(Dt),apiResult:xt.template(Et),cancelablePromise:xt.template(Mt),request:xt.template(fn),baseHttpRequest:xt.template($t),httpRequest:xt.template(an)}};return xt.registerPartial("exportEnum",xt.template(qn)),xt.registerPartial("exportInterface",xt.template(An)),xt.registerPartial("exportComposition",xt.template(wn)),xt.registerPartial("exportType",xt.template(jn)),xt.registerPartial("header",xt.template(Hn)),xt.registerPartial("isNullable",xt.template(Dn)),xt.registerPartial("isReadOnly",xt.template(En)),xt.registerPartial("isRequired",xt.template(Tn)),xt.registerPartial("parameters",xt.template(In)),xt.registerPartial("result",xt.template(Sn)),xt.registerPartial("schema",xt.template(_n)),xt.registerPartial("schemaArray",xt.template(Nn)),xt.registerPartial("schemaDictionary",xt.template($n)),xt.registerPartial("schemaEnum",xt.template(Mn)),xt.registerPartial("schemaGeneric",xt.template(Ln)),xt.registerPartial("schemaInterface",xt.template(Fn)),xt.registerPartial("schemaComposition",xt.template(Bn)),xt.registerPartial("type",xt.template(Wn)),xt.registerPartial("typeArray",xt.template(Vn)),xt.registerPartial("typeDictionary",xt.template(Un)),xt.registerPartial("typeEnum",xt.template(Qn)),xt.registerPartial("typeGeneric",xt.template(zn)),xt.registerPartial("typeInterface",xt.template(Jn)),xt.registerPartial("typeReference",xt.template(Zn)),xt.registerPartial("typeUnion",xt.template(Kn)),xt.registerPartial("typeIntersection",xt.template(Gn)),xt.registerPartial("base",xt.template(Cn)),xt.registerPartial("functions/catchErrorCodes",xt.template(Jt)),xt.registerPartial("functions/getFormData",xt.template(Gt)),xt.registerPartial("functions/getQueryString",xt.template(Zt)),xt.registerPartial("functions/getUrl",xt.template(Kt)),xt.registerPartial("functions/isBlob",xt.template(Xt)),xt.registerPartial("functions/isDefined",xt.template(Yt)),xt.registerPartial("functions/isFormData",xt.template(en)),xt.registerPartial("functions/isString",xt.template(tn)),xt.registerPartial("functions/isStringWithValue",xt.template(nn)),xt.registerPartial("functions/isSuccess",xt.template(rn)),xt.registerPartial("functions/base64",xt.template(zt)),xt.registerPartial("functions/resolve",xt.template(on)),xt.registerPartial("fetch/getHeaders",xt.template(Lt)),xt.registerPartial("fetch/getRequestBody",xt.template(Ft)),xt.registerPartial("fetch/getResponseBody",xt.template(Wt)),xt.registerPartial("fetch/getResponseHeader",xt.template(Vt)),xt.registerPartial("fetch/sendRequest",xt.template(Qt)),xt.registerPartial("fetch/request",xt.template(Ut)),xt.registerPartial("xhr/getHeaders",xt.template(hn)),xt.registerPartial("xhr/getRequestBody",xt.template(yn)),xt.registerPartial("xhr/getResponseBody",xt.template(vn)),xt.registerPartial("xhr/getResponseHeader",xt.template(gn)),xt.registerPartial("xhr/sendRequest",xt.template(bn)),xt.registerPartial("xhr/request",xt.template(Pn)),xt.registerPartial("node/getHeaders",xt.template(ln)),xt.registerPartial("node/getRequestBody",xt.template(sn)),xt.registerPartial("node/getResponseBody",xt.template(un)),xt.registerPartial("node/getResponseHeader",xt.template(pn)),xt.registerPartial("node/sendRequest",xt.template(mn)),xt.registerPartial("node/request",xt.template(cn)),xt.registerPartial("axios/getHeaders",xt.template(Tt)),xt.registerPartial("axios/getRequestBody",xt.template(It)),xt.registerPartial("axios/getResponseBody",xt.template(St)),xt.registerPartial("axios/getResponseHeader",xt.template(_t)),xt.registerPartial("axios/sendRequest",xt.template(Bt)),xt.registerPartial("axios/request",xt.template(Nt)),xt.registerPartial("angular/getHeaders",xt.template(Rt)),xt.registerPartial("angular/getRequestBody",xt.template(Ct)),xt.registerPartial("angular/getResponseBody",xt.template(wt)),xt.registerPartial("angular/getResponseHeader",xt.template(qt)),xt.registerPartial("angular/sendRequest",xt.template(jt)),xt.registerPartial("angular/request",xt.template(At)),t})({httpClient:n,useUnionTypes:l,useOptions:a,corePathTop:m,corePathDeep:d});switch(P){case oe.V2:{const e=D(g),r=ce(e);if(!v)break;await ur(r,b,t,n,a,l,s,u,p,c,m,d,f,h,o,y);break}case oe.V3:{const e=re(g),r=ce(e);if(!v)break;await ur(r,b,t,n,a,l,s,u,p,c,m,d,f,h,o,y);break}}};var cr={HttpClient:exports.HttpClient,generate:pr};exports.default=cr,exports.generate=pr; diff --git a/tools/openapi-gen/dist/index.js b/tools/openapi-gen/dist/index.js deleted file mode 100644 index 7af16762ad873418dd23ec27f92c2c34509fc0ea..0000000000000000000000000000000000000000 --- a/tools/openapi-gen/dist/index.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("camelcase"),t=require("json-schema-ref-parser"),n=require("os"),r=require("path"),o=require("fs-extra");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l,s,i=a(e),u=a(t);exports.HttpClient=void 0,(l=exports.HttpClient||(exports.HttpClient={})).FETCH="fetch",l.XHR="xhr",l.NODE="node",l.AXIOS="axios",l.ANGULAR="angular",exports.Indent=void 0,(s=exports.Indent||(exports.Indent={})).SPACE_4="4",s.SPACE_2="2",s.TAB="tab";const p=e=>null==e?void 0:e.replace(/\\/g,"\\\\"),c=e=>"string"==typeof e,m=(e,t)=>{var n,r;const o=null===(n=t["x-enum-varnames"])||void 0===n?void 0:n.filter(c),a=null===(r=t["x-enum-descriptions"])||void 0===r?void 0:r.filter(c);return e.map(((e,t)=>({name:(null==o?void 0:o[t])||e.name,description:(null==a?void 0:a[t])||e.description,value:e.value,type:e.type})))},d=e=>Array.isArray(e)?e.filter(((e,t,n)=>n.indexOf(e)===t)).filter((e=>"number"==typeof e||"string"==typeof e)).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e.replace(/'/g,"\\'")}'`,type:"string",description:null})):[],f=e=>{if(e||""===e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e},h=new Map([["file","binary"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]),y=e=>e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_"),v=(e="any",t)=>{const n={type:"any",base:"any",template:null,imports:[],isNullable:!1},r=((e,t)=>"binary"===t?"binary":h.get(e))(e,t);if(r)return n.type=r,n.base=r,n;const o=decodeURIComponent(e.trim().replace(/^#\/definitions\//,"").replace(/^#\/parameters\//,"").replace(/^#\/responses\//,"").replace(/^#\/securityDefinitions\//,""));if(/\[.*\]$/g.test(o)){const e=o.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const t=v(y(e[1])),r=v(y(e[2]));return"any[]"===t.type?(n.type=`${r.type}[]`,n.base=r.type,t.imports=[]):r.type?(n.type=`${t.type}<${r.type}>`,n.base=t.type,n.template=r.type):(n.type=t.type,n.base=t.type,n.template=t.type),n.imports.push(...t.imports),n.imports.push(...r.imports),n}}if(o){const e=y(o);return n.type=e,n.base=e,n.imports.push(e),n}return n},g=(e,t,n)=>{var r;const o=[];for(const a in t.properties)if(t.properties.hasOwnProperty(a)){const l=t.properties[a],s=!!(null===(r=t.required)||void 0===r?void 0:r.includes(a));if(l.$ref){const e=v(l.$ref);o.push({name:f(a),export:"reference",type:e.type,base:e.base,template:e.template,link:null,description:l.description||null,isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:s,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:p(l.pattern),imports:e.imports,enum:[],enums:[],properties:[]})}else{const t=n(e,l);o.push({name:f(a),export:t.export,type:t.type,base:t.base,template:t.template,link:t.link,description:l.description||null,isDefinition:!1,isReadOnly:!0===l.readOnly,isRequired:s,isNullable:!0===l["x-nullable"],format:l.format,maximum:l.maximum,exclusiveMaximum:l.exclusiveMaximum,minimum:l.minimum,exclusiveMinimum:l.exclusiveMinimum,multipleOf:l.multipleOf,maxLength:l.maxLength,minLength:l.minLength,maxItems:l.maxItems,minItems:l.minItems,uniqueItems:l.uniqueItems,maxProperties:l.maxProperties,minProperties:l.minProperties,pattern:p(l.pattern),imports:t.imports,enum:t.enum,enums:t.enums,properties:t.properties})}}return o},P=/~1/g,b=/~0/g,O=(e,t)=>{if(t.$ref){const n=t.$ref.replace(/^#/g,"").split("/").filter((e=>e));let r=e;return n.forEach((e=>{const n=decodeURIComponent(e.replace(P,"/").replace(b,"~"));if(!r.hasOwnProperty(n))throw new Error(`Could not find reference: "${t.$ref}"`);r=r[n]})),r}return t},x=(e,t,n,r,o)=>{const a={type:r,imports:[],enums:[],properties:[]},l=[];if(n.map((t=>o(e,t))).filter((e=>{const t=e.properties.length,n=e.enums.length;return!("any"===e.type&&!t&&!n)})).forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),a.properties.push(e)})),t.required){const r=((e,t,n,r)=>n.reduce(((t,n)=>{if(n.$ref){const o=O(e,n);return[...t,...r(e,o).properties]}return[...t,...r(e,n).properties]}),[]).filter((e=>!e.isRequired&&t.includes(e.name))).map((e=>({...e,isRequired:!0}))))(e,t.required,n,o);r.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums)})),l.push(...r)}if(t.properties){const n=g(e,t,o);n.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),"enum"===e.export&&a.enums.push(e)})),l.push(...n)}return l.length&&a.properties.push({name:"properties",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:l}),a},k=(e,t,n=!1,r="")=>{var o;const a={name:r,export:"interface",type:"any",base:"any",template:null,link:null,description:t.description||null,isDefinition:n,isReadOnly:!0===t.readOnly,isNullable:!0===t["x-nullable"],isRequired:!1,format:t.format,maximum:t.maximum,exclusiveMaximum:t.exclusiveMaximum,minimum:t.minimum,exclusiveMinimum:t.exclusiveMinimum,multipleOf:t.multipleOf,maxLength:t.maxLength,minLength:t.minLength,maxItems:t.maxItems,minItems:t.minItems,uniqueItems:t.uniqueItems,maxProperties:t.maxProperties,minProperties:t.minProperties,pattern:p(t.pattern),imports:[],enum:[],enums:[],properties:[]};if(t.$ref){const e=v(t.$ref);return a.export="reference",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}if(t.enum&&"boolean"!==t.type){const e=d(t.enum),n=m(e,t);if(n.length)return a.export="enum",a.type="string",a.base="string",a.enum.push(...n),a}if("array"===t.type&&t.items){if(t.items.$ref){const e=v(t.items.$ref);return a.export="array",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}{const n=k(e,t.items);return a.export="array",a.type=n.type,a.base=n.base,a.template=n.template,a.link=n,a.imports.push(...n.imports),a}}if("object"===t.type&&"object"==typeof t.additionalProperties){if(t.additionalProperties.$ref){const e=v(t.additionalProperties.$ref);return a.export="dictionary",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}{const n=k(e,t.additionalProperties);return a.export="dictionary",a.type=n.type,a.base=n.base,a.template=n.template,a.link=n,a.imports.push(...n.imports),a}}if(null===(o=t.allOf)||void 0===o?void 0:o.length){const n=x(e,t,t.allOf,"all-of",k);return a.export=n.type,a.imports.push(...n.imports),a.properties.push(...n.properties),a.enums.push(...n.enums),a}if("object"===t.type){if(a.export="interface",a.type="any",a.base="any",t.properties){g(e,t,k).forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),a.properties.push(e),"enum"===e.export&&a.enums.push(e)}))}return a}if(t.type){const e=v(t.type,t.format);return a.export="generic",a.type=e.type,a.base=e.base,a.template=e.template,a.imports.push(...e.imports),a}return a},R=(e,t,n)=>n.indexOf(e)===t,C=(e,t)=>{var n;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===t.export&&(null===(n=t.enum)||void 0===n?void 0:n[e.default])?t.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}},w=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g,q=e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return i.default(t).replace(w,"_$1")},A=(e,t)=>{const n={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const r=O(e,t),o=((e,t)=>{var n;const r={in:t.in,prop:t.name,export:"interface",name:q(t.name),type:"any",base:"any",template:null,link:null,description:t.description||null,isDefinition:!1,isReadOnly:!1,isRequired:!0===t.required,isNullable:!0===t["x-nullable"],format:t.format,maximum:t.maximum,exclusiveMaximum:t.exclusiveMaximum,minimum:t.minimum,exclusiveMinimum:t.exclusiveMinimum,multipleOf:t.multipleOf,maxLength:t.maxLength,minLength:t.minLength,maxItems:t.maxItems,minItems:t.minItems,uniqueItems:t.uniqueItems,pattern:p(t.pattern),imports:[],enum:[],enums:[],properties:[],mediaType:null};if(t.$ref){const e=v(t.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=C(t,r),r}if(t.enum){const e=d(t.enum),n=m(e,t);if(n.length)return r.export="enum",r.type="string",r.base="string",r.enum.push(...n),r.default=C(t,r),r}if("array"===t.type&&t.items){const e=v(t.items.type,t.items.format);return r.export="array",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=C(t,r),r}if("object"===t.type&&t.items){const e=v(t.items.type,t.items.format);return r.export="dictionary",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=C(t,r),r}let o=t.schema;if(o){if((null===(n=o.$ref)||void 0===n?void 0:n.startsWith("#/parameters/"))&&(o=O(e,o)),o.$ref){const e=v(o.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=C(t,r),r}{const n=k(e,o);return r.export=n.export,r.type=n.type,r.base=n.base,r.template=n.template,r.link=n.link,r.imports.push(...n.imports),r.enum.push(...n.enum),r.enums.push(...n.enums),r.properties.push(...n.properties),r.default=C(t,r),r}}if(t.type){const e=v(t.type,t.format);return r.export="generic",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=C(t,r),r}return r})(e,r);if("api-version"!==o.prop)switch(o.in){case"path":n.parametersPath.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"query":n.parametersQuery.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"header":n.parametersHeader.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"formData":n.parametersForm.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"body":n.parametersBody=o,n.parameters.push(o),n.imports.push(...o.imports)}})),n},j=(e,t,n)=>{var r;const o={in:"response",name:"",code:n,description:t.description||null,export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};let a=t.schema;if(a){if((null===(r=a.$ref)||void 0===r?void 0:r.startsWith("#/responses/"))&&(a=O(e,a)),a.$ref){const e=v(a.$ref);return o.export="reference",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}{const t=k(e,a);return o.export=t.export,o.type=t.type,o.base=t.base,o.template=t.template,o.link=t.link,o.isReadOnly=t.isReadOnly,o.isRequired=t.isRequired,o.isNullable=t.isNullable,o.format=t.format,o.maximum=t.maximum,o.exclusiveMaximum=t.exclusiveMaximum,o.minimum=t.minimum,o.exclusiveMinimum=t.exclusiveMinimum,o.multipleOf=t.multipleOf,o.maxLength=t.maxLength,o.minLength=t.minLength,o.maxItems=t.maxItems,o.minItems=t.minItems,o.uniqueItems=t.uniqueItems,o.maxProperties=t.maxProperties,o.minProperties=t.minProperties,o.pattern=p(t.pattern),o.imports.push(...t.imports),o.enum.push(...t.enum),o.enums.push(...t.enums),o.properties.push(...t.properties),o}}if(t.headers)for(const e in t.headers)if(t.headers.hasOwnProperty(e))return o.in="header",o.name=e,o.type="string",o.base="string",o;return o},H=e=>{if("default"===e)return 200;if(/[0-9]+/g.test(e)){const t=parseInt(e);if(Number.isInteger(t))return Math.abs(t)}return null},D=(e,t)=>{const n=e.type===t.type&&e.base===t.base&&e.template===t.template;return n&&e.link&&t.link?D(e.link,t.link):n},E=(e,t)=>{const n=e.isRequired&&void 0===e.default,r=t.isRequired&&void 0===t.default;return n&&!r?-1:r&&!n?1:0},T=(e,t,n,r,o,a)=>{const l=(e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return i.default(t,{pascalCase:!0})})(r),s=((e,t,n)=>{if(n)return i.default(n.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim());const r=e.replace(/[^/]*?{api-version}.*?\//g,"").replace(/{(.*?)}/g,"").replace(/\//g,"-");return i.default(`${t}-${r}`)})(t,n,o.operationId),u={service:l,name:s,summary:o.summary||null,description:o.description||null,deprecated:!0===o.deprecated,method:n.toUpperCase(),path:t,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(o.parameters){const t=A(e,o.parameters);u.imports.push(...t.imports),u.parameters.push(...t.parameters),u.parametersPath.push(...t.parametersPath),u.parametersQuery.push(...t.parametersQuery),u.parametersForm.push(...t.parametersForm),u.parametersHeader.push(...t.parametersHeader),u.parametersCookie.push(...t.parametersCookie),u.parametersBody=t.parametersBody}if(o.responses){const t=((e,t)=>{const n=[];for(const r in t)if(t.hasOwnProperty(r)){const o=t[r],a=O(e,o),l=H(r);if(l){const t=j(e,a,l);n.push(t)}}return n.sort(((e,t)=>e.code<t.code?-1:e.code>t.code?1:0))})(e,o.responses),n=(e=>{const t=[];return e.forEach((e=>{const{code:n}=e;n&&204!==n&&n>=200&&n<300&&t.push(e)})),t.length||t.push({in:"response",name:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),t.filter(((e,t,n)=>n.findIndex((t=>D(t,e)))===t))})(t);u.errors=(e=>e.filter((e=>e.code>=300&&e.description)).map((e=>({code:e.code,description:e.description}))))(t),u.responseHeader=(e=>{const t=e.find((e=>"header"===e.in));return t?t.name:null})(n),n.forEach((e=>{u.results.push(e),u.imports.push(...e.imports)}))}return u.parameters=u.parameters.sort(E),u},I=e=>{const t=((e="1.0")=>String(e).replace(/^v/gi,""))(e.info.version),n=(e=>{var t;const n=(null===(t=e.schemes)||void 0===t?void 0:t[0])||"http",r=e.host,o=e.basePath||"";return(r?`${n}://${r}${o}`:o).replace(/\/$/g,"")})(e),r=(e=>{const t=[];for(const n in e.definitions)if(e.definitions.hasOwnProperty(n)){const r=e.definitions[n],o=v(n),a=k(e,r,!0,o.base);t.push(a)}return t})(e),o=(e=>{var t;const n=new Map;for(const r in e.paths)if(e.paths.hasOwnProperty(r)){const o=e.paths[r],a=A(e,o.parameters||[]);for(const l in o)if(o.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const s=o[l];((null===(t=s.tags)||void 0===t?void 0:t.length)?s.tags.filter(R):["Default"]).forEach((t=>{const o=T(e,r,l,t,s,a),i=n.get(o.service)||{name:o.service,operations:[],imports:[]};i.operations.push(o),i.imports.push(...o.imports),n.set(o.service,i)}))}}return Array.from(n.values())})(e);return{version:t,server:n,models:r,services:o}},S=e=>e.trim().replace(/^#\/components\/schemas\//,"").replace(/^#\/components\/responses\//,"").replace(/^#\/components\/parameters\//,"").replace(/^#\/components\/examples\//,"").replace(/^#\/components\/requestBodies\//,"").replace(/^#\/components\/headers\//,"").replace(/^#\/components\/securitySchemes\//,"").replace(/^#\/components\/links\//,"").replace(/^#\/components\/callbacks\//,""),_=(e,t)=>{if(e.mapping){const n=(e=>{const t={};for(const n in e)t[e[n]]=n;return t})(e.mapping),r=Object.keys(n).find((e=>S(e)==t.name));if(r&&n[r])return n[r]}return t.name},N=e=>{if(e||""===e){if(!/^[a-zA-Z_$][\w$]+$/g.test(e))return`'${e}'`}return e},B=e=>null!=e&&""!==e,$=new Map([["file","binary"],["any","any"],["object","any"],["array","any[]"],["boolean","boolean"],["byte","number"],["int","number"],["integer","number"],["float","number"],["double","number"],["short","number"],["long","number"],["number","number"],["char","string"],["date","string"],["date-time","string"],["password","string"],["string","string"],["void","void"],["null","null"]]),M=(e,t)=>"binary"===t?"binary":$.get(e),L=e=>e.replace(/^[^a-zA-Z_$]+/g,"").replace(/[^\w$]+/g,"_"),F=(e="any",t)=>{const n={type:"any",base:"any",template:null,imports:[],isNullable:!1};if(Array.isArray(e)){const r=e.filter((e=>"null"!==e)).map((e=>M(e,t))).filter(B).join(" | ");return n.type=r,n.base=r,n.isNullable=e.includes("null"),n}const r=M(e,t);if(r)return n.type=r,n.base=r,n;const o=decodeURIComponent(S(e));if(/\[.*\]$/g.test(o)){const e=o.match(/(.*?)\[(.*)\]$/);if(null==e?void 0:e.length){const t=F(L(e[1])),r=F(L(e[2]));return"any[]"===t.type?(n.type=`${r.type}[]`,n.base=`${r.type}`,t.imports=[]):r.type?(n.type=`${t.type}<${r.type}>`,n.base=t.type,n.template=r.type):(n.type=t.type,n.base=t.type,n.template=t.type),n.imports.push(...t.imports),n.imports.push(...r.imports),n}}if(o){const e=L(o);return n.type=e,n.base=e,n.imports.push(e),n}return n},W=(e,t,n,r)=>{var o;const a=[],l=((e,t)=>{var n;if(e.components&&t)for(const r in e.components.schemas)if(e.components.schemas.hasOwnProperty(r)){const o=e.components.schemas[r];if(o.discriminator&&(null===(n=o.oneOf)||void 0===n?void 0:n.length)&&o.oneOf.some((e=>e.$ref&&S(e.$ref)==t.name)))return o.discriminator}})(e,r);for(const s in t.properties)if(t.properties.hasOwnProperty(s)){const i=t.properties[s],u=!!(null===(o=t.required)||void 0===o?void 0:o.includes(s)),c={name:N(s),description:i.description||null,deprecated:!0===i.deprecated,isDefinition:!1,isReadOnly:!0===i.readOnly,isRequired:u,format:i.format,maximum:i.maximum,exclusiveMaximum:i.exclusiveMaximum,minimum:i.minimum,exclusiveMinimum:i.exclusiveMinimum,multipleOf:i.multipleOf,maxLength:i.maxLength,minLength:i.minLength,maxItems:i.maxItems,minItems:i.minItems,uniqueItems:i.uniqueItems,maxProperties:i.maxProperties,minProperties:i.minProperties,pattern:p(i.pattern)};if(r&&(null==l?void 0:l.propertyName)==s)a.push({export:"reference",type:"string",base:`'${_(l,r)}'`,template:null,isNullable:!0===i.nullable,link:null,imports:[],enum:[],enums:[],properties:[],...c});else if(i.$ref){const e=F(i.$ref);a.push({export:"reference",type:e.type,base:e.base,template:e.template,link:null,isNullable:e.isNullable||!0===i.nullable,imports:e.imports,enum:[],enums:[],properties:[],...c})}else{const t=n(e,i);a.push({export:t.export,type:t.type,base:t.base,template:t.template,link:t.link,isNullable:t.isNullable||!0===i.nullable,imports:t.imports,enum:t.enum,enums:t.enums,properties:t.properties,...c})}}return a},V=/~1/g,U=/~0/g,Q=(e,t)=>{if(t.$ref){const n=t.$ref.replace(/^#/g,"").split("/").filter((e=>e));let r=e;return n.forEach((e=>{const n=decodeURIComponent(e.replace(V,"/").replace(U,"~"));if(!r.hasOwnProperty(n))throw new Error(`Could not find reference: "${t.$ref}"`);r=r[n]})),r}return t},z=(e,t,n,r,o)=>{const a={type:r,imports:[],enums:[],properties:[]},l=[];if(n.map((t=>o(e,t))).filter((e=>{const t=e.properties.length,n=e.enums.length,r="any"===e.type,o="dictionary"===e.export;return!(r&&!t&&!n)||o})).forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),a.properties.push(e)})),t.required){const r=((e,t,n,r)=>n.reduce(((t,n)=>{if(n.$ref){const o=Q(e,n);return[...t,...r(e,o).properties]}return[...t,...r(e,n).properties]}),[]).filter((e=>!e.isRequired&&t.includes(e.name))).map((e=>({...e,isRequired:!0}))))(e,t.required,n,o);r.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums)})),l.push(...r)}if(t.properties){const n=W(e,t,o);n.forEach((e=>{a.imports.push(...e.imports),a.enums.push(...e.enums),"enum"===e.export&&a.enums.push(e)})),l.push(...n)}return l.length&&a.properties.push({name:"properties",export:"interface",type:"any",base:"any",template:null,link:null,description:"",isDefinition:!1,isReadOnly:!1,isNullable:!1,isRequired:!1,imports:[],enum:[],enums:[],properties:l}),a},J=(e,t)=>{var n;if(void 0===e.default)return;if(null===e.default)return"null";switch(e.type||typeof e.default){case"int":case"integer":case"number":return"enum"===(null==t?void 0:t.export)&&(null===(n=t.enum)||void 0===n?void 0:n[e.default])?t.enum[e.default].value:e.default;case"boolean":return JSON.stringify(e.default);case"string":return`'${e.default}'`;case"object":try{return JSON.stringify(e.default,null,4)}catch(e){}}},G=(e,t,n=!1,r="")=>{var o,a,l;const s={name:r,export:"interface",type:"any",base:"any",template:null,link:null,description:t.description||null,deprecated:!0===t.deprecated,isDefinition:n,isReadOnly:!0===t.readOnly,isNullable:!0===t.nullable,isRequired:!1,format:t.format,maximum:t.maximum,exclusiveMaximum:t.exclusiveMaximum,minimum:t.minimum,exclusiveMinimum:t.exclusiveMinimum,multipleOf:t.multipleOf,maxLength:t.maxLength,minLength:t.minLength,maxItems:t.maxItems,minItems:t.minItems,uniqueItems:t.uniqueItems,maxProperties:t.maxProperties,minProperties:t.minProperties,pattern:p(t.pattern),imports:[],enum:[],enums:[],properties:[]};if(t.$ref){const e=F(t.$ref);return s.export="reference",s.type=e.type,s.base=e.base,s.template=e.template,s.imports.push(...e.imports),s.default=J(t,s),s}if(t.enum&&"boolean"!==t.type){const e=(i=t.enum,Array.isArray(i)?i.filter(((e,t,n)=>n.indexOf(e)===t)).filter((e=>"number"==typeof e||"string"==typeof e)).map((e=>"number"==typeof e?{name:`'_${e}'`,value:String(e),type:"number",description:null}:{name:String(e).replace(/\W+/g,"_").replace(/^(\d+)/g,"_$1").replace(/([a-z])([A-Z]+)/g,"$1_$2").toUpperCase(),value:`'${e.replace(/'/g,"\\'")}'`,type:"string",description:null})):[]),n=((e,t)=>{var n,r;const o=null===(n=t["x-enum-varnames"])||void 0===n?void 0:n.filter(c),a=null===(r=t["x-enum-descriptions"])||void 0===r?void 0:r.filter(c);return e.map(((e,t)=>({name:(null==o?void 0:o[t])||e.name,description:(null==a?void 0:a[t])||e.description,value:e.value,type:e.type})))})(e,t);if(n.length)return s.export="enum",s.type="string",s.base="string",s.enum.push(...n),s.default=J(t,s),s}var i;if("array"===t.type&&t.items){if(t.items.$ref){const e=F(t.items.$ref);return s.export="array",s.type=e.type,s.base=e.base,s.template=e.template,s.imports.push(...e.imports),s.default=J(t,s),s}{const n=G(e,t.items);return s.export="array",s.type=n.type,s.base=n.base,s.template=n.template,s.link=n,s.imports.push(...n.imports),s.default=J(t,s),s}}if("object"===t.type&&"object"==typeof t.additionalProperties){if(t.additionalProperties.$ref){const e=F(t.additionalProperties.$ref);return s.export="dictionary",s.type=e.type,s.base=e.base,s.template=e.template,s.imports.push(...e.imports),s.default=J(t,s),s}{const n=G(e,t.additionalProperties);return s.export="dictionary",s.type=n.type,s.base=n.base,s.template=n.template,s.link=n,s.imports.push(...n.imports),s.default=J(t,s),s}}if(null===(o=t.oneOf)||void 0===o?void 0:o.length){const n=z(e,t,t.oneOf,"one-of",G);return s.export=n.type,s.imports.push(...n.imports),s.properties.push(...n.properties),s.enums.push(...n.enums),s}if(null===(a=t.anyOf)||void 0===a?void 0:a.length){const n=z(e,t,t.anyOf,"any-of",G);return s.export=n.type,s.imports.push(...n.imports),s.properties.push(...n.properties),s.enums.push(...n.enums),s}if(null===(l=t.allOf)||void 0===l?void 0:l.length){const n=z(e,t,t.allOf,"all-of",G);return s.export=n.type,s.imports.push(...n.imports),s.properties.push(...n.properties),s.enums.push(...n.enums),s}if("object"===t.type){if(s.export="interface",s.type="any",s.base="any",s.default=J(t,s),t.properties){W(e,t,G,s).forEach((e=>{s.imports.push(...e.imports),s.enums.push(...e.enums),s.properties.push(e),"enum"===e.export&&s.enums.push(e)}))}return s}if(t.type){const e=F(t.type,t.format);return s.export="generic",s.type=e.type,s.base=e.base,s.template=e.template,s.isNullable=e.isNullable||s.isNullable,s.imports.push(...e.imports),s.default=J(t,s),s}return s},Z=/^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g,K=e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return i.default(t).replace(Z,"_$1")},X=(e,t)=>{const n={imports:[],parameters:[],parametersPath:[],parametersQuery:[],parametersForm:[],parametersCookie:[],parametersHeader:[],parametersBody:null};return t.forEach((t=>{const r=Q(e,t),o=((e,t)=>{var n;const r={in:t.in,prop:t.name,export:"interface",name:K(t.name),type:"any",base:"any",template:null,link:null,description:t.description||null,deprecated:!0===t.deprecated,isDefinition:!1,isReadOnly:!1,isRequired:!0===t.required,isNullable:!0===t.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(t.$ref){const e=F(t.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r}let o=t.schema;if(o){if((null===(n=o.$ref)||void 0===n?void 0:n.startsWith("#/components/parameters/"))&&(o=Q(e,o)),o.$ref){const e=F(o.$ref);return r.export="reference",r.type=e.type,r.base=e.base,r.template=e.template,r.imports.push(...e.imports),r.default=J(o),r}{const t=G(e,o);return r.export=t.export,r.type=t.type,r.base=t.base,r.template=t.template,r.link=t.link,r.isReadOnly=t.isReadOnly,r.isRequired=r.isRequired||t.isRequired,r.isNullable=r.isNullable||t.isNullable,r.format=t.format,r.maximum=t.maximum,r.exclusiveMaximum=t.exclusiveMaximum,r.minimum=t.minimum,r.exclusiveMinimum=t.exclusiveMinimum,r.multipleOf=t.multipleOf,r.maxLength=t.maxLength,r.minLength=t.minLength,r.maxItems=t.maxItems,r.minItems=t.minItems,r.uniqueItems=t.uniqueItems,r.maxProperties=t.maxProperties,r.minProperties=t.minProperties,r.pattern=p(t.pattern),r.default=t.default,r.imports.push(...t.imports),r.enum.push(...t.enum),r.enums.push(...t.enums),r.properties.push(...t.properties),r}}return r})(e,r);if("api-version"!==o.prop)switch(r.in){case"path":n.parametersPath.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"query":n.parametersQuery.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"formData":n.parametersForm.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"cookie":n.parametersCookie.push(o),n.parameters.push(o),n.imports.push(...o.imports);break;case"header":n.parametersHeader.push(o),n.parameters.push(o),n.imports.push(...o.imports)}})),n},Y=["application/json-patch+json","application/json","application/x-www-form-urlencoded","text/json","text/plain","multipart/form-data","multipart/mixed","multipart/related","multipart/batch"],ee=(e,t)=>{const n=Object.keys(t).filter((e=>{const t=e.split(";")[0].trim();return Y.includes(t)})).find((e=>{var n;return B(null===(n=t[e])||void 0===n?void 0:n.schema)}));if(n)return{mediaType:n,schema:t[n].schema};const r=Object.keys(t).find((e=>{var n;return B(null===(n=t[e])||void 0===n?void 0:n.schema)}));return r?{mediaType:r,schema:t[r].schema}:null},te=(e,t,n)=>{var r;const o={in:"response",name:"",code:n,description:t.description||null,export:"generic",type:"any",base:"any",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]};if(t.content){const n=ee(0,t.content);if(n){if((null===(r=n.schema.$ref)||void 0===r?void 0:r.startsWith("#/components/responses/"))&&(n.schema=Q(e,n.schema)),n.schema.$ref){const e=F(n.schema.$ref);return o.export="reference",o.type=e.type,o.base=e.base,o.template=e.template,o.imports.push(...e.imports),o}{const t=G(e,n.schema);return o.export=t.export,o.type=t.type,o.base=t.base,o.template=t.template,o.link=t.link,o.isReadOnly=t.isReadOnly,o.isRequired=t.isRequired,o.isNullable=t.isNullable,o.format=t.format,o.maximum=t.maximum,o.exclusiveMaximum=t.exclusiveMaximum,o.minimum=t.minimum,o.exclusiveMinimum=t.exclusiveMinimum,o.multipleOf=t.multipleOf,o.maxLength=t.maxLength,o.minLength=t.minLength,o.maxItems=t.maxItems,o.minItems=t.minItems,o.uniqueItems=t.uniqueItems,o.maxProperties=t.maxProperties,o.minProperties=t.minProperties,o.pattern=p(t.pattern),o.imports.push(...t.imports),o.enum.push(...t.enum),o.enums.push(...t.enums),o.properties.push(...t.properties),o}}}if(t.headers)for(const e in t.headers)if(t.headers.hasOwnProperty(e))return o.in="header",o.name=e,o.type="string",o.base="string",o;return o},ne=e=>{if("default"===e)return 200;if(/[0-9]+/g.test(e)){const t=parseInt(e);if(Number.isInteger(t))return Math.abs(t)}return null},re=(e,t)=>{const n=e.type===t.type&&e.base===t.base&&e.template===t.template;return n&&e.link&&t.link?re(e.link,t.link):n},oe=(e,t)=>{const n=e.isRequired&&void 0===e.default,r=t.isRequired&&void 0===t.default;return n&&!r?-1:r&&!n?1:0},ae=(e,t,n,r,o,a)=>{const l=(e=>{const t=e.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim();return i.default(t,{pascalCase:!0})})(r),s=((e,t,n)=>{if(n)return i.default(n.replace(/^[^a-zA-Z]+/g,"").replace(/[^\w\-]+/g,"-").trim());const r=e.replace(/[^/]*?{api-version}.*?\//g,"").replace(/{(.*?)}/g,"").replace(/\//g,"-");return i.default(`${t}-${r}`)})(t,n,o.operationId),u={service:l,name:s,summary:o.summary||null,description:o.description||null,deprecated:!0===o.deprecated,method:n.toUpperCase(),path:t,parameters:[...a.parameters],parametersPath:[...a.parametersPath],parametersQuery:[...a.parametersQuery],parametersForm:[...a.parametersForm],parametersHeader:[...a.parametersHeader],parametersCookie:[...a.parametersCookie],parametersBody:a.parametersBody,imports:[],errors:[],results:[],responseHeader:null};if(o.parameters){const t=X(e,o.parameters);u.imports.push(...t.imports),u.parameters.push(...t.parameters),u.parametersPath.push(...t.parametersPath),u.parametersQuery.push(...t.parametersQuery),u.parametersForm.push(...t.parametersForm),u.parametersHeader.push(...t.parametersHeader),u.parametersCookie.push(...t.parametersCookie),u.parametersBody=t.parametersBody}if(o.requestBody){const t=((e,t)=>{const n={in:"body",export:"interface",prop:"requestBody",name:"requestBody",type:"any",base:"any",template:null,link:null,description:t.description||null,default:void 0,isDefinition:!1,isReadOnly:!1,isRequired:!0===t.required,isNullable:!0===t.nullable,imports:[],enum:[],enums:[],properties:[],mediaType:null};if(t.content){const r=ee(0,t.content);if(r){switch(n.mediaType=r.mediaType,n.mediaType){case"application/x-www-form-urlencoded":case"multipart/form-data":n.in="formData",n.name="formData",n.prop="formData"}if(r.schema.$ref){const e=F(r.schema.$ref);return n.export="reference",n.type=e.type,n.base=e.base,n.template=e.template,n.imports.push(...e.imports),n}{const t=G(e,r.schema);return n.export=t.export,n.type=t.type,n.base=t.base,n.template=t.template,n.link=t.link,n.isReadOnly=t.isReadOnly,n.isRequired=n.isRequired||t.isRequired,n.isNullable=n.isNullable||t.isNullable,n.format=t.format,n.maximum=t.maximum,n.exclusiveMaximum=t.exclusiveMaximum,n.minimum=t.minimum,n.exclusiveMinimum=t.exclusiveMinimum,n.multipleOf=t.multipleOf,n.maxLength=t.maxLength,n.minLength=t.minLength,n.maxItems=t.maxItems,n.minItems=t.minItems,n.uniqueItems=t.uniqueItems,n.maxProperties=t.maxProperties,n.minProperties=t.minProperties,n.pattern=p(t.pattern),n.imports.push(...t.imports),n.enum.push(...t.enum),n.enums.push(...t.enums),n.properties.push(...t.properties),n}}}return n})(e,Q(e,o.requestBody));u.imports.push(...t.imports),u.parameters.push(t),u.parametersBody=t}if(o.responses){const t=((e,t)=>{const n=[];for(const r in t)if(t.hasOwnProperty(r)){const o=t[r],a=Q(e,o),l=ne(r);if(l){const t=te(e,a,l);n.push(t)}}return n.sort(((e,t)=>e.code<t.code?-1:e.code>t.code?1:0))})(e,o.responses),n=(e=>{const t=[];return e.forEach((e=>{const{code:n}=e;n&&204!==n&&n>=200&&n<300&&t.push(e)})),t.length||t.push({in:"response",name:"",code:200,description:"",export:"generic",type:"void",base:"void",template:null,link:null,isDefinition:!1,isReadOnly:!1,isRequired:!1,isNullable:!1,imports:[],enum:[],enums:[],properties:[]}),t.filter(((e,t,n)=>n.findIndex((t=>re(t,e)))===t))})(t);u.errors=(e=>e.filter((e=>e.code>=300&&e.description)).map((e=>({code:e.code,description:e.description}))))(t),u.responseHeader=(e=>{const t=e.find((e=>"header"===e.in));return t?t.name:null})(n),n.forEach((e=>{u.results.push(e),u.imports.push(...e.imports)}))}return u.parameters=u.parameters.sort(oe),u},le=e=>{const t=((e="1.0")=>String(e).replace(/^v/gi,""))(e.info.version),n=(e=>{var t;const n=null===(t=e.servers)||void 0===t?void 0:t[0],r=(null==n?void 0:n.variables)||{};let o=(null==n?void 0:n.url)||"";for(const e in r)r.hasOwnProperty(e)&&(o=o.replace(`{${e}}`,r[e].default));return o.replace(/\/$/g,"")})(e),r=(e=>{const t=[];if(e.components)for(const n in e.components.schemas)if(e.components.schemas.hasOwnProperty(n)){const r=e.components.schemas[n],o=F(n),a=G(e,r,!0,o.base);t.push(a)}return t})(e),o=(e=>{var t;const n=new Map;for(const r in e.paths)if(e.paths.hasOwnProperty(r)){const o=e.paths[r],a=X(e,o.parameters||[]);for(const l in o)if(o.hasOwnProperty(l))switch(l){case"get":case"put":case"post":case"delete":case"options":case"head":case"patch":const s=o[l];((null===(t=s.tags)||void 0===t?void 0:t.length)?s.tags.filter(R):["Default"]).forEach((t=>{const o=ae(e,r,l,t,s,a),i=n.get(o.service)||{name:o.service,operations:[],imports:[]};i.operations.push(o),i.imports.push(...o.imports),n.set(o.service,i)}))}}return Array.from(n.values())})(e);return{version:t,server:n,models:r,services:o}};var se;!function(e){e[e.V2=2]="V2",e[e.V3=3]="V3"}(se||(se={}));const ie=e=>e.enum.filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t)),ue=e=>e.enums.filter(((e,t,n)=>n.findIndex((t=>t.name===e.name))===t)),pe=(e,t)=>{const n=e.toLowerCase(),r=t.toLowerCase();return n.localeCompare(r,"en")},ce=e=>e.imports.filter(R).sort(pe).filter((t=>e.name!==t)),me=(e,t)=>{const n=[];return e.map(t).forEach((e=>{n.push(...e)})),n},de=e=>{const t={...e};return t.operations=(e=>{const t=new Map;return e.operations.map((e=>{const n={...e};n.imports.push(...me(n.parameters,(e=>e.imports))),n.imports.push(...me(n.results,(e=>e.imports)));const r=n.name,o=t.get(r)||0;return o>0&&(n.name=`${r}${o}`),t.set(r,o+1),n}))})(t),t.operations.forEach((e=>{t.imports.push(...e.imports)})),t.imports=(e=>e.imports.filter(R).sort(pe))(t),t},fe=e=>({...e,models:e.models.map((e=>(e=>({...e,imports:ce(e),enums:ue(e),enum:ie(e)}))(e))),services:e.services.map((e=>de(e)))});var he="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ye={exports:{}},ve={},ge={__esModule:!0};ge.extend=ke,ge.indexOf=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},ge.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML();if(null==e)return"";if(!e)return e+"";e=""+e}if(!Oe.test(e))return e;return e.replace(be,xe)},ge.isEmpty=function(e){return!e&&0!==e||!(!we(e)||0!==e.length)},ge.createFrame=function(e){var t=ke({},e);return t._parent=e,t},ge.blockParams=function(e,t){return e.path=t,e},ge.appendContextPath=function(e,t){return(e?e+".":"")+t};var Pe={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},be=/[&<>"'`=]/g,Oe=/[&<>"'`=]/;function xe(e){return Pe[e]}function ke(e){for(var t=1;t<arguments.length;t++)for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e}var Re=Object.prototype.toString;ge.toString=Re;var Ce=function(e){return"function"==typeof e};Ce(/x/)&&(ge.isFunction=Ce=function(e){return"function"==typeof e&&"[object Function]"===Re.call(e)}),ge.isFunction=Ce;var we=Array.isArray||function(e){return!(!e||"object"!=typeof e)&&"[object Array]"===Re.call(e)};ge.isArray=we;var qe={exports:{}};!function(e,t){t.__esModule=!0;var n=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(e,t){var o=t&&t.loc,a=void 0,l=void 0,s=void 0,i=void 0;o&&(a=o.start.line,l=o.end.line,s=o.start.column,i=o.end.column,e+=" - "+a+":"+s);for(var u=Error.prototype.constructor.call(this,e),p=0;p<n.length;p++)this[n[p]]=u[n[p]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{o&&(this.lineNumber=a,this.endLineNumber=l,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:i,enumerable:!0})):(this.column=s,this.endColumn=i))}catch(e){}}r.prototype=new Error,t.default=r,e.exports=t.default}(qe,qe.exports);var Ae={},je={exports:{}};!function(e,t){t.__esModule=!0;var n=ge;t.default=function(e){e.registerHelper("blockHelperMissing",(function(t,r){var o=r.inverse,a=r.fn;if(!0===t)return a(this);if(!1===t||null==t)return o(this);if(n.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):o(this);if(r.data&&r.ids){var l=n.createFrame(r.data);l.contextPath=n.appendContextPath(r.data.contextPath,r.name),r={data:l}}return a(t,r)}))},e.exports=t.default}(je,je.exports);var He={exports:{}};!function(e,t){t.__esModule=!0;var n,r=ge,o=(n=qe.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("each",(function(e,t){if(!t)throw new o.default("Must pass iterator to #each");var n,a=t.fn,l=t.inverse,s=0,i="",u=void 0,p=void 0;function c(t,n,o){u&&(u.key=t,u.index=n,u.first=0===n,u.last=!!o,p&&(u.contextPath=p+t)),i+=a(e[t],{data:u,blockParams:r.blockParams([e[t],t],[p+t,null])})}if(t.data&&t.ids&&(p=r.appendContextPath(t.data.contextPath,t.ids[0])+"."),r.isFunction(e)&&(e=e.call(this)),t.data&&(u=r.createFrame(t.data)),e&&"object"==typeof e)if(r.isArray(e))for(var m=e.length;s<m;s++)s in e&&c(s,s,s===e.length-1);else if(he.Symbol&&e[he.Symbol.iterator]){for(var d=[],f=e[he.Symbol.iterator](),h=f.next();!h.done;h=f.next())d.push(h.value);for(m=(e=d).length;s<m;s++)c(s,s,s===e.length-1)}else n=void 0,Object.keys(e).forEach((function(e){void 0!==n&&c(n,s-1),n=e,s++})),void 0!==n&&c(n,s-1,!0);return 0===s&&(i=l(this)),i}))},e.exports=t.default}(He,He.exports);var De={exports:{}};!function(e,t){t.__esModule=!0;var n,r=(n=qe.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("helperMissing",(function(){if(1!==arguments.length)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')}))},e.exports=t.default}(De,De.exports);var Ee={exports:{}};!function(e,t){t.__esModule=!0;var n,r=ge,o=(n=qe.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("if",(function(e,t){if(2!=arguments.length)throw new o.default("#if requires exactly one argument");return r.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||r.isEmpty(e)?t.inverse(this):t.fn(this)})),e.registerHelper("unless",(function(t,n){if(2!=arguments.length)throw new o.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:n.inverse,inverse:n.fn,hash:n.hash})}))},e.exports=t.default}(Ee,Ee.exports);var Te={exports:{}};!function(e,t){t.__esModule=!0,t.default=function(e){e.registerHelper("log",(function(){for(var t=[void 0],n=arguments[arguments.length-1],r=0;r<arguments.length-1;r++)t.push(arguments[r]);var o=1;null!=n.hash.level?o=n.hash.level:n.data&&null!=n.data.level&&(o=n.data.level),t[0]=o,e.log.apply(e,t)}))},e.exports=t.default}(Te,Te.exports);var Ie={exports:{}};!function(e,t){t.__esModule=!0,t.default=function(e){e.registerHelper("lookup",(function(e,t,n){return e?n.lookupProperty(e,t):e}))},e.exports=t.default}(Ie,Ie.exports);var Se={exports:{}};function _e(e){return e&&e.__esModule?e:{default:e}}!function(e,t){t.__esModule=!0;var n,r=ge,o=(n=qe.exports)&&n.__esModule?n:{default:n};t.default=function(e){e.registerHelper("with",(function(e,t){if(2!=arguments.length)throw new o.default("#with requires exactly one argument");r.isFunction(e)&&(e=e.call(this));var n=t.fn;if(r.isEmpty(e))return t.inverse(this);var a=t.data;return t.data&&t.ids&&((a=r.createFrame(t.data)).contextPath=r.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:a,blockParams:r.blockParams([e],[a&&a.contextPath])})}))},e.exports=t.default}(Se,Se.exports),Ae.__esModule=!0,Ae.registerDefaultHelpers=function(e){Ne.default(e),Be.default(e),$e.default(e),Me.default(e),Le.default(e),Fe.default(e),We.default(e)},Ae.moveHelperToHooks=function(e,t,n){e.helpers[t]&&(e.hooks[t]=e.helpers[t],n||delete e.helpers[t])};var Ne=_e(je.exports),Be=_e(He.exports),$e=_e(De.exports),Me=_e(Ee.exports),Le=_e(Te.exports),Fe=_e(Ie.exports),We=_e(Se.exports);var Ve={},Ue={exports:{}};!function(e,t){t.__esModule=!0;var n=ge;t.default=function(e){e.registerDecorator("inline",(function(e,t,r,o){var a=e;return t.partials||(t.partials={},a=function(o,a){var l=r.partials;r.partials=n.extend({},l,t.partials);var s=e(o,a);return r.partials=l,s}),t.partials[o.args[0]]=o.fn,a}))},e.exports=t.default}(Ue,Ue.exports),Ve.__esModule=!0,Ve.registerDefaultDecorators=function(e){ze.default(e)};var Qe,ze=(Qe=Ue.exports)&&Qe.__esModule?Qe:{default:Qe};var Je={exports:{}};!function(e,t){t.__esModule=!0;var n=ge,r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if("string"==typeof e){var t=n.indexOf(r.methodMap,e.toLowerCase());e=t>=0?t:parseInt(e,10)}return e},log:function(e){if(e=r.lookupLevel(e),"undefined"!=typeof console&&r.lookupLevel(r.level)<=e){var t=r.methodMap[e];console[t]||(t="log");for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];console[t].apply(console,o)}}};t.default=r,e.exports=t.default}(Je,Je.exports);var Ge={},Ze={__esModule:!0,createNewLookupObject:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ke.extend.apply(void 0,[Object.create(null)].concat(t))}},Ke=ge;Ge.__esModule=!0,Ge.createProtoAccessControl=function(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var n=Object.create(null);return n.__proto__=!1,{properties:{whitelist:Xe.createNewLookupObject(n,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Xe.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}},Ge.resultIsAllowed=function(e,t,n){return tt("function"==typeof e?t.methods:t.properties,n)},Ge.resetLoggedProperties=function(){Object.keys(et).forEach((function(e){delete et[e]}))};var Xe=Ze,Ye=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(Je.exports),et=Object.create(null);function tt(e,t){return void 0!==e.whitelist[t]?!0===e.whitelist[t]:void 0!==e.defaultValue?e.defaultValue:(function(e){!0!==et[e]&&(et[e]=!0,Ye.log("error",'Handlebars: Access has been denied to resolve the property "'+e+'" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'))}(t),!1)}function nt(e){return e&&e.__esModule?e:{default:e}}ve.__esModule=!0,ve.HandlebarsEnvironment=ut;var rt=ge,ot=nt(qe.exports),at=Ae,lt=Ve,st=nt(Je.exports),it=Ge;ve.VERSION="4.7.7";ve.COMPILER_REVISION=8;ve.LAST_COMPATIBLE_COMPILER_REVISION=7;ve.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};function ut(e,t,n){this.helpers=e||{},this.partials=t||{},this.decorators=n||{},at.registerDefaultHelpers(this),lt.registerDefaultDecorators(this)}ut.prototype={constructor:ut,logger:st.default,log:st.default.log,registerHelper:function(e,t){if("[object Object]"===rt.toString.call(e)){if(t)throw new ot.default("Arg not supported with multiple helpers");rt.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if("[object Object]"===rt.toString.call(e))rt.extend(this.partials,e);else{if(void 0===t)throw new ot.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if("[object Object]"===rt.toString.call(e)){if(t)throw new ot.default("Arg not supported with multiple decorators");rt.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){it.resetLoggedProperties()}};var pt=st.default.log;ve.log=pt,ve.createFrame=rt.createFrame,ve.logger=st.default;var ct={exports:{}};!function(e,t){function n(e){this.string=e}t.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},t.default=n,e.exports=t.default}(ct,ct.exports);var mt={},dt={};dt.__esModule=!0,dt.wrapHelper=function(e,t){if("function"!=typeof e)return e;return function(){return arguments[arguments.length-1]=t(arguments[arguments.length-1]),e.apply(this,arguments)}},mt.__esModule=!0,mt.checkRevision=function(e){var t=e&&e[0]||1,n=yt.COMPILER_REVISION;if(t>=yt.LAST_COMPATIBLE_COMPILER_REVISION&&t<=yt.COMPILER_REVISION)return;if(t<yt.LAST_COMPATIBLE_COMPILER_REVISION){var r=yt.REVISION_CHANGES[n],o=yt.REVISION_CHANGES[t];throw new ht.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+o+").")}throw new ht.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")},mt.template=function(e,t){if(!t)throw new ht.default("No environment passed to template");if(!e||!e.main)throw new ht.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var n=e.compiler&&7===e.compiler[0];var r={strict:function(e,t,n){if(!e||!(t in e))throw new ht.default('"'+t+'" not defined in '+e,{loc:n});return r.lookupProperty(e,t)},lookupProperty:function(e,t){var n=e[t];return null==n||Object.prototype.hasOwnProperty.call(e,t)||Pt.resultIsAllowed(n,r.protoAccessControl,t)?n:void 0},lookup:function(e,t){for(var n=e.length,o=0;o<n;o++){if(null!=(e[o]&&r.lookupProperty(e[o],t)))return e[o][t]}},lambda:function(e,t){return"function"==typeof e?e.call(t):e},escapeExpression:ft.escapeExpression,invokePartial:function(n,r,o){o.hash&&(r=ft.extend({},r,o.hash),o.ids&&(o.ids[0]=!0)),n=t.VM.resolvePartial.call(this,n,r,o);var a=ft.extend({},o,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),l=t.VM.invokePartial.call(this,n,r,a);if(null==l&&t.compile&&(o.partials[o.name]=t.compile(n,e.compilerOptions,t),l=o.partials[o.name](r,a)),null!=l){if(o.indent){for(var s=l.split("\n"),i=0,u=s.length;i<u&&(s[i]||i+1!==u);i++)s[i]=o.indent+s[i];l=s.join("\n")}return l}throw new ht.default("The partial "+o.name+" could not be compiled when running in runtime-only mode")},fn:function(t){var n=e[t];return n.decorator=e[t+"_d"],n},programs:[],program:function(e,t,n,r,o){var a=this.programs[e],l=this.fn(e);return t||o||r||n?a=bt(this,e,l,t,n,r,o):a||(a=this.programs[e]=bt(this,e,l)),a},data:function(e,t){for(;e&&t--;)e=e._parent;return e},mergeIfNeeded:function(e,t){var n=e||t;return e&&t&&e!==t&&(n=ft.extend({},t,e)),n},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function o(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],a=n.data;o._setup(n),!n.partial&&e.useData&&(a=xt(t,a));var l=void 0,s=e.useBlockParams?[]:void 0;function i(t){return""+e.main(r,t,r.helpers,r.partials,a,s,l)}return e.useDepths&&(l=n.depths?t!=n.depths[0]?[t].concat(n.depths):n.depths:[t]),(i=kt(e.main,i,r,n.depths||[],a,s))(t,n)}return o.isTop=!0,o._setup=function(o){if(o.partial)r.protoAccessControl=o.protoAccessControl,r.helpers=o.helpers,r.partials=o.partials,r.decorators=o.decorators,r.hooks=o.hooks;else{var a=ft.extend({},t.helpers,o.helpers);!function(e,t){Object.keys(e).forEach((function(n){var r=e[n];e[n]=function(e,t){var n=t.lookupProperty;return gt.wrapHelper(e,(function(e){return ft.extend({lookupProperty:n},e)}))}(r,t)}))}(a,r),r.helpers=a,e.usePartial&&(r.partials=r.mergeIfNeeded(o.partials,t.partials)),(e.usePartial||e.useDecorators)&&(r.decorators=ft.extend({},t.decorators,o.decorators)),r.hooks={},r.protoAccessControl=Pt.createProtoAccessControl(o);var l=o.allowCallsToHelperMissing||n;vt.moveHelperToHooks(r,"helperMissing",l),vt.moveHelperToHooks(r,"blockHelperMissing",l)}},o._child=function(t,n,o,a){if(e.useBlockParams&&!o)throw new ht.default("must pass block params");if(e.useDepths&&!a)throw new ht.default("must pass parent depths");return bt(r,t,e[t],n,0,o,a)},o},mt.wrapProgram=bt,mt.resolvePartial=function(e,t,n){e?e.call||n.name||(n.name=e,e=n.partials[e]):e="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name];return e},mt.invokePartial=function(e,t,n){var r=n.data&&n.data["partial-block"];n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var o=void 0;n.fn&&n.fn!==Ot&&function(){n.data=yt.createFrame(n.data);var e=n.fn;o=n.data["partial-block"]=function(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.data=yt.createFrame(n.data),n.data["partial-block"]=r,e(t,n)},e.partials&&(n.partials=ft.extend({},n.partials,e.partials))}();void 0===e&&o&&(e=o);if(void 0===e)throw new ht.default("The partial "+n.name+" could not be found");if(e instanceof Function)return e(t,n)},mt.noop=Ot;var ft=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(ge),ht=function(e){return e&&e.__esModule?e:{default:e}}(qe.exports),yt=ve,vt=Ae,gt=dt,Pt=Ge;function bt(e,t,n,r,o,a,l){function s(t){var o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=l;return!l||t==l[0]||t===e.nullContext&&null===l[0]||(s=[t].concat(l)),n(e,t,e.helpers,e.partials,o.data||r,a&&[o.blockParams].concat(a),s)}return(s=kt(n,s,e,l,r,a)).program=t,s.depth=l?l.length:0,s.blockParams=o||0,s}function Ot(){return""}function xt(e,t){return t&&"root"in t||((t=t?yt.createFrame(t):{}).root=e),t}function kt(e,t,n,r,o,a){if(e.decorator){var l={};t=e.decorator(t,l,n,r&&r[0],o,a,r),ft.extend(t,l)}return t}var Rt={exports:{}};!function(e,t){t.__esModule=!0,t.default=function(e){var t=void 0!==he?he:window,n=t.Handlebars;e.noConflict=function(){return t.Handlebars===e&&(t.Handlebars=n),e}},e.exports=t.default}(Rt,Rt.exports),function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}t.__esModule=!0;var o=r(ve),a=n(ct.exports),l=n(qe.exports),s=r(ge),i=r(mt),u=n(Rt.exports);function p(){var e=new o.HandlebarsEnvironment;return s.extend(e,o),e.SafeString=a.default,e.Exception=l.default,e.Utils=s,e.escapeExpression=s.escapeExpression,e.VM=i,e.template=function(t){return i.template(t,e)},e}var c=p();c.create=p,u.default(c),c.default=c,t.default=c,e.exports=t.default}(ye,ye.exports);var Ct=ye.exports.default,wt={1:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { NgModule} from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\n\nimport { AngularHttpRequest } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:7,column:38},end:{line:7,column:55}}),t))?a:"")+"/AngularHttpRequest';\nimport { BaseHttpRequest } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:8,column:35},end:{line:8,column:52}}),t))?a:"")+"/BaseHttpRequest';\nimport type { OpenAPIConfig } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:9,column:38},end:{line:9,column:55}}),t))?a:"")+"/OpenAPI';\nimport { OpenAPI } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:10,column:27},end:{line:10,column:44}}),t))?a:"")+"/OpenAPI';\n"},3:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import type { BaseHttpRequest } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:12,column:40},end:{line:12,column:57}}),t))?a:"")+"/BaseHttpRequest';\nimport type { OpenAPIConfig } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:13,column:38},end:{line:13,column:55}}),t))?a:"")+"/OpenAPI';\nimport { "+(null!=(a=s(l(t,"httpRequest",{start:{line:14,column:12},end:{line:14,column:23}}),t))?a:"")+" } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:14,column:37},end:{line:14,column:54}}),t))?a:"")+"/"+(null!=(a=s(l(t,"httpRequest",{start:{line:14,column:60},end:{line:14,column:71}}),t))?a:"")+"';\n"},5:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"services"),{name:"each",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:0},end:{line:20,column:9}}}))?a:""},6:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { "+(null!=(a=s(l(t,"name",{start:{line:19,column:12},end:{line:19,column:16}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:19,column:22},end:{line:19,column:35}}),t))?a:"")+" } from './services/"+(null!=(a=s(l(t,"name",{start:{line:19,column:61},end:{line:19,column:65}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:19,column:71},end:{line:19,column:84}}),t))?a:"")+"';\n"},8:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"@NgModule({\n\timports: [HttpClientModule],\n\tproviders: [\n\t\t{\n\t\t\tprovide: OpenAPI,\n\t\t\tuseValue: {\n\t\t\t\tBASE: OpenAPI?.BASE ?? '"+(null!=(a=s(l(t,"server",{start:{line:30,column:31},end:{line:30,column:37}}),t))?a:"")+"',\n\t\t\t\tVERSION: OpenAPI?.VERSION ?? '"+(null!=(a=s(l(t,"version",{start:{line:31,column:37},end:{line:31,column:44}}),t))?a:"")+"',\n\t\t\t\tWITH_CREDENTIALS: OpenAPI?.WITH_CREDENTIALS ?? false,\n\t\t\t\tCREDENTIALS: OpenAPI?.CREDENTIALS ?? 'include',\n\t\t\t\tTOKEN: OpenAPI?.TOKEN,\n\t\t\t\tUSERNAME: OpenAPI?.USERNAME,\n\t\t\t\tPASSWORD: OpenAPI?.PASSWORD,\n\t\t\t\tHEADERS: OpenAPI?.HEADERS,\n\t\t\t\tENCODE_PATH: OpenAPI?.ENCODE_PATH,\n\t\t\t} as OpenAPIConfig,\n\t\t},\n\t\t{\n\t\t\tprovide: BaseHttpRequest,\n\t\t\tuseClass: AngularHttpRequest,\n\t\t},\n"+(null!=(a=i(n,"each").call(null!=t?t:e.nullContext||{},i(t,"services"),{name:"each",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:45,column:2},end:{line:47,column:11}}}))?a:"")+"\t]\n})\nexport class "+(null!=(a=s(l(t,"clientName",{start:{line:50,column:16},end:{line:50,column:26}}),t))?a:"")+" {}\n"},9:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t"+(null!=(a=s(l(t,"name",{start:{line:46,column:5},end:{line:46,column:9}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:46,column:15},end:{line:46,column:28}}),t))?a:"")+",\n"},11:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=null!=t?t:e.nullContext||{},u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;\n\nexport class "+(null!=(a=s(l(t,"clientName",{start:{line:54,column:16},end:{line:54,column:26}}),t))?a:"")+" {\n\n"+(null!=(a=u(n,"each").call(i,u(t,"services"),{name:"each",hash:{},fn:e.program(12,o,0),inverse:e.noop,data:o,loc:{start:{line:56,column:1},end:{line:58,column:10}}}))?a:"")+"\n\tpublic readonly request: BaseHttpRequest;\n\n\tconstructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = "+(null!=(a=s(l(t,"httpRequest",{start:{line:62,column:87},end:{line:62,column:98}}),t))?a:"")+") {\n\t\tthis.request = new HttpRequest({\n\t\t\tBASE: config?.BASE ?? '"+(null!=(a=s(l(t,"server",{start:{line:64,column:29},end:{line:64,column:35}}),t))?a:"")+"',\n\t\t\tVERSION: config?.VERSION ?? '"+(null!=(a=s(l(t,"version",{start:{line:65,column:35},end:{line:65,column:42}}),t))?a:"")+"',\n\t\t\tWITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false,\n\t\t\tCREDENTIALS: config?.CREDENTIALS ?? 'include',\n\t\t\tTOKEN: config?.TOKEN,\n\t\t\tUSERNAME: config?.USERNAME,\n\t\t\tPASSWORD: config?.PASSWORD,\n\t\t\tHEADERS: config?.HEADERS,\n\t\t\tENCODE_PATH: config?.ENCODE_PATH,\n\t\t});\n\n"+(null!=(a=u(n,"each").call(i,u(t,"services"),{name:"each",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o,loc:{start:{line:75,column:2},end:{line:77,column:11}}}))?a:"")+"\t}\n}\n"},12:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic readonly "+(null!=(a=i(n,"camelCase").call(null!=t?t:e.nullContext||{},i(t,"name"),{name:"camelCase",hash:{},data:o,loc:{start:{line:57,column:17},end:{line:57,column:37}}}))?a:"")+": "+(null!=(a=s(l(t,"name",{start:{line:57,column:42},end:{line:57,column:46}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:57,column:52},end:{line:57,column:65}}),t))?a:"")+";\n"},14:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\tthis."+(null!=(a=i(n,"camelCase").call(null!=t?t:e.nullContext||{},i(t,"name"),{name:"camelCase",hash:{},data:o,loc:{start:{line:76,column:7},end:{line:76,column:27}}}))?a:"")+" = new "+(null!=(a=s(l(t,"name",{start:{line:76,column:37},end:{line:76,column:41}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:76,column:47},end:{line:76,column:60}}),t))?a:"")+"(this.request);\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:15,column:11}}}))?a:"")+"\n"+(null!=(a=s(n,"if").call(l,s(t,"services"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:0},end:{line:21,column:7}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(8,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:23,column:0},end:{line:80,column:11}}}))?a:"")},usePartial:!0,useData:!0},qt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): Observable<HttpHeaders> => {\n\treturn forkJoin({\n\t\ttoken: resolve(options, config.TOKEN),\n\t\tusername: resolve(options, config.USERNAME),\n\t\tpassword: resolve(options, config.PASSWORD),\n\t\tadditionalHeaders: resolve(options, config.HEADERS),\n\t}).pipe(\n\t\tmap(({ token, username, password, additionalHeaders }) => {\n\t\t\tconst headers = Object.entries({\n\t\t\t\tAccept: 'application/json',\n\t\t\t\t...additionalHeaders,\n\t\t\t\t...options.headers,\n\t\t\t})\n\t\t\t\t.filter(([_, value]) => isDefined(value))\n\t\t\t\t.reduce((headers, [key, value]) => ({\n\t\t\t\t\t...headers,\n\t\t\t\t\t[key]: String(value),\n\t\t\t\t}), {} as Record<string, string>);\n\n\t\t\tif (isStringWithValue(token)) {\n\t\t\t\theaders['Authorization'] = `Bearer ${token}`;\n\t\t\t}\n\n\t\t\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\t\t\tconst credentials = base64(`${username}:${password}`);\n\t\t\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t\t\t}\n\n\t\t\tif (options.body) {\n\t\t\t\tif (options.mediaType) {\n\t\t\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t\t\t} else if (isBlob(options.body)) {\n\t\t\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t\t\t} else if (isString(options.body)) {\n\t\t\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t\t\t} else if (!isFormData(options.body)) {\n\t\t\t\t\theaders['Content-Type'] = 'application/json';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new HttpHeaders(headers);\n\t\t}),\n\t);\n};"},useData:!0},At={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},jt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = <T>(response: HttpResponse<T>): T | undefined => {\n\tif (response.status !== 204 && response.body !== null) {\n\t\treturn response.body;\n\t}\n\treturn undefined;\n};"},useData:!0},Ht={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = <T>(response: HttpResponse<T>, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst value = response.headers.get(responseHeader);\n\t\tif (isString(value)) {\n\t\t\treturn value;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Dt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport type { HttpResponse, HttpErrorResponse } from '@angular/common/http';\nimport { forkJoin, of, throwError } from 'rxjs';\nimport { catchError, map, switchMap } from 'rxjs/operators';\nimport type { Observable } from 'rxjs';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getHeaders"),t,{name:"angular/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getRequestBody"),t,{name:"angular/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/sendRequest"),t,{name:"angular/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getResponseHeader"),t,{name:"angular/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"angular/getResponseBody"),t,{name:"angular/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param http The Angular HTTP client\n * @param options The request options from the service\n * @returns Observable<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, http: HttpClient, options: ApiRequestOptions): Observable<T> => {\n\tconst url = getUrl(config, options);\n\tconst formData = getFormData(options);\n\tconst body = getRequestBody(options);\n\n\treturn getHeaders(config, options).pipe(\n\t\tswitchMap(headers => {\n\t\t\treturn sendRequest<T>(config, options, http, url, formData, body, headers);\n\t\t}),\n\t\tmap(response => {\n\t\t\tconst responseBody = getResponseBody(response);\n\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\t\t\treturn {\n\t\t\t\turl,\n\t\t\t\tok: response.ok,\n\t\t\t\tstatus: response.status,\n\t\t\t\tstatusText: response.statusText,\n\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t} as ApiResult;\n\t\t}),\n\t\tcatchError((error: HttpErrorResponse) => {\n\t\t\tif (!error.status) {\n\t\t\t\treturn throwError(error);\n\t\t\t}\n\t\t\treturn of({\n\t\t\t\turl,\n\t\t\t\tok: error.ok,\n\t\t\t\tstatus: error.status,\n\t\t\t\tstatusText: error.statusText,\n\t\t\t\tbody: error.error ?? error.statusText,\n\t\t\t} as ApiResult);\n\t\t}),\n\t\tmap(result => {\n\t\t\tcatchErrorCodes(options, result);\n\t\t\treturn result.body as T;\n\t\t}),\n\t\tcatchError((error: ApiError) => {\n\t\t\treturn throwError(error);\n\t\t}),\n\t);\n};"},usePartial:!0,useData:!0},Et={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = <T>(\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\thttp: HttpClient,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: HttpHeaders\n): Observable<HttpResponse<T>> => {\n\treturn http.request<T>(options.method, url, {\n\t\theaders,\n\t\tbody: body ?? formData,\n\t\twithCredentials: config.WITH_CREDENTIALS,\n\t\tobserve: 'response',\n\t});\n};"},useData:!0},Tt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\n\nexport class ApiError extends Error {\n\tpublic readonly url: string;\n\tpublic readonly status: number;\n\tpublic readonly statusText: string;\n\tpublic readonly body: any;\n\tpublic readonly request: ApiRequestOptions;\n\n\tconstructor(request: ApiRequestOptions, response: ApiResult, message: string) {\n\t\tsuper(message);\n\n\t\tthis.name = 'ApiError';\n\t\tthis.url = response.url;\n\t\tthis.status = response.status;\n\t\tthis.statusText = response.statusText;\n\t\tthis.body = response.body;\n\t\tthis.request = request;\n\t}\n}"},usePartial:!0,useData:!0},It={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport type ApiRequestOptions = {\n\treadonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';\n\treadonly url: string;\n\treadonly path?: Record<string, any>;\n\treadonly cookies?: Record<string, any>;\n\treadonly headers?: Record<string, any>;\n\treadonly query?: Record<string, any>;\n\treadonly formData?: Record<string, any>;\n\treadonly body?: any;\n\treadonly mediaType?: string;\n\treadonly responseHeader?: string;\n\treadonly errors?: Record<number, string>;\n};"},usePartial:!0,useData:!0},St={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport type ApiResult = {\n\treadonly url: string;\n\treadonly ok: boolean;\n\treadonly status: number;\n\treadonly statusText: string;\n\treadonly body: any;\n};"},usePartial:!0,useData:!0},_t={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions, formData?: FormData): Promise<Record<string, string>> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\tconst formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {}\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t\t...formHeaders,\n\t})\n\t.filter(([_, value]) => isDefined(value))\n\t.reduce((headers, [key, value]) => ({\n\t\t...headers,\n\t\t[key]: String(value),\n\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn headers;\n};"},useData:!0},Nt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body) {\n\t\treturn options.body;\n\t}\n\treturn undefined;\n};"},useData:!0},Bt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = (response: AxiosResponse<any>): any => {\n\tif (response.status !== 204) {\n\t\treturn response.data;\n\t}\n\treturn undefined;\n};"},useData:!0},$t={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (response: AxiosResponse<any>, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = response.headers[responseHeader];\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Mt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport axios from 'axios';\nimport type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';\nimport FormData from 'form-data';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isSuccess"),t,{name:"functions/isSuccess",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getHeaders"),t,{name:"axios/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getRequestBody"),t,{name:"axios/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/sendRequest"),t,{name:"axios/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getResponseHeader"),t,{name:"axios/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"axios/getResponseBody"),t,{name:"axios/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options, formData);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest<T>(config, options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: isSuccess(response.status),\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},Lt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const sendRequest = async <T>(\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Record<string, string>,\n\tonCancel: OnCancel\n): Promise<AxiosResponse<T>> => {\n\tconst source = axios.CancelToken.source();\n\n\tconst requestConfig: AxiosRequestConfig = {\n\t\turl,\n\t\theaders,\n\t\tdata: body ?? formData,\n\t\tmethod: options.method,\n\t\twithCredentials: config.WITH_CREDENTIALS,\n\t\tcancelToken: source.token,\n\t};\n\n\tonCancel(() => source.cancel('The user aborted a request.'));\n\n\ttry {\n\t\treturn await axios.request(requestConfig);\n\t} catch (error) {\n\t\tconst axiosError = error as AxiosError<T>;\n\t\tif (axiosError.response) {\n\t\t\treturn axiosError.response;\n\t\t}\n\t\tthrow error;\n\t}\n};"},useData:!0},Ft={1:function(e,t,n,r,o){return"import type { HttpClient } from '@angular/common/http';\nimport type { Observable } from 'rxjs';\n\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { OpenAPIConfig } from './OpenAPI';\n"},3:function(e,t,n,r,o){return"import type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { CancelablePromise } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n"},5:function(e,t,n,r,o){return"\tconstructor(\n\t\tpublic readonly config: OpenAPIConfig,\n\t\tpublic readonly http: HttpClient,\n\t) {}\n"},7:function(e,t,n,r,o){return"\tconstructor(public readonly config: OpenAPIConfig) {}\n"},9:function(e,t,n,r,o){return"\tpublic abstract request<T>(options: ApiRequestOptions): Observable<T>;\n"},11:function(e,t,n,r,o){return"\tpublic abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:13,column:11}}}))?a:"")+"\nexport abstract class BaseHttpRequest {\n\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(5,o,0),inverse:e.program(7,o,0),data:o,loc:{start:{line:17,column:1},end:{line:24,column:12}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(9,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:26,column:1},end:{line:30,column:12}}}))?a:"")+"}"},usePartial:!0,useData:!0},Wt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport class CancelError extends Error {\n\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = 'CancelError';\n\t}\n\n\tpublic get isCancelled(): boolean {\n\t\treturn true;\n\t}\n}\n\nexport interface OnCancel {\n\treadonly isResolved: boolean;\n\treadonly isRejected: boolean;\n\treadonly isCancelled: boolean;\n\n\t(cancelHandler: () => void): void;\n}\n\nexport class CancelablePromise<T> implements Promise<T> {\n\treadonly [Symbol.toStringTag]!: string;\n\n\tprivate _isResolved: boolean;\n\tprivate _isRejected: boolean;\n\tprivate _isCancelled: boolean;\n\tprivate readonly _cancelHandlers: (() => void)[];\n\tprivate readonly _promise: Promise<T>;\n\tprivate _resolve?: (value: T | PromiseLike<T>) => void;\n\tprivate _reject?: (reason?: any) => void;\n\n\tconstructor(\n\t\texecutor: (\n\t\t\tresolve: (value: T | PromiseLike<T>) => void,\n\t\t\treject: (reason?: any) => void,\n\t\t\tonCancel: OnCancel\n\t\t) => void\n\t) {\n\t\tthis._isResolved = false;\n\t\tthis._isRejected = false;\n\t\tthis._isCancelled = false;\n\t\tthis._cancelHandlers = [];\n\t\tthis._promise = new Promise<T>((resolve, reject) => {\n\t\t\tthis._resolve = resolve;\n\t\t\tthis._reject = reject;\n\n\t\t\tconst onResolve = (value: T | PromiseLike<T>): void => {\n\t\t\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._isResolved = true;\n\t\t\t\tthis._resolve?.(value);\n\t\t\t};\n\n\t\t\tconst onReject = (reason?: any): void => {\n\t\t\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._isRejected = true;\n\t\t\t\tthis._reject?.(reason);\n\t\t\t};\n\n\t\t\tconst onCancel = (cancelHandler: () => void): void => {\n\t\t\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._cancelHandlers.push(cancelHandler);\n\t\t\t};\n\n\t\t\tObject.defineProperty(onCancel, 'isResolved', {\n\t\t\t\tget: (): boolean => this._isResolved,\n\t\t\t});\n\n\t\t\tObject.defineProperty(onCancel, 'isRejected', {\n\t\t\t\tget: (): boolean => this._isRejected,\n\t\t\t});\n\n\t\t\tObject.defineProperty(onCancel, 'isCancelled', {\n\t\t\t\tget: (): boolean => this._isCancelled,\n\t\t\t});\n\n\t\t\treturn executor(onResolve, onReject, onCancel as OnCancel);\n\t\t});\n\t}\n\n\tpublic then<TResult1 = T, TResult2 = never>(\n\t\tonFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,\n\t\tonRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null\n\t): Promise<TResult1 | TResult2> {\n\t\treturn this._promise.then(onFulfilled, onRejected);\n\t}\n\n\tpublic catch<TResult = never>(\n\t\tonRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null\n\t): Promise<T | TResult> {\n\t\treturn this._promise.catch(onRejected);\n\t}\n\n\tpublic finally(onFinally?: (() => void) | null): Promise<T> {\n\t\treturn this._promise.finally(onFinally);\n\t}\n\n\tpublic cancel(): void {\n\t\tif (this._isResolved || this._isRejected || this._isCancelled) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isCancelled = true;\n\t\tif (this._cancelHandlers.length) {\n\t\t\ttry {\n\t\t\t\tfor (const cancelHandler of this._cancelHandlers) {\n\t\t\t\t\tcancelHandler();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.warn('Cancellation threw an error', error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis._cancelHandlers.length = 0;\n\t\tthis._reject?.(new CancelError('Request aborted'));\n\t}\n\n\tpublic get isCancelled(): boolean {\n\t\treturn this._isCancelled;\n\t}\n}"},usePartial:!0,useData:!0},Vt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t})\n\t\t.filter(([_, value]) => isDefined(value))\n\t\t.reduce((headers, [key, value]) => ({\n\t\t\t...headers,\n\t\t\t[key]: String(value),\n\t\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn new Headers(headers);\n};"},useData:!0},Ut={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body !== undefined) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Qt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = async (response: Response): Promise<any> => {\n\tif (response.status !== 204) {\n\t\ttry {\n\t\t\tconst contentType = response.headers.get('Content-Type');\n\t\t\tif (contentType) {\n\t\t\t\tconst isJSON = contentType.toLowerCase().startsWith('application/json');\n\t\t\t\tif (isJSON) {\n\t\t\t\t\treturn await response.json();\n\t\t\t\t} else {\n\t\t\t\t\treturn await response.text();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},zt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = response.headers.get(responseHeader);\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},Jt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getHeaders"),t,{name:"fetch/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getRequestBody"),t,{name:"fetch/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/sendRequest"),t,{name:"fetch/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getResponseHeader"),t,{name:"fetch/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getResponseBody"),t,{name:"fetch/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = await getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: response.ok,\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},Gt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = async (\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Headers,\n\tonCancel: OnCancel\n): Promise<Response> => {\n\tconst controller = new AbortController();\n\n\tconst request: RequestInit = {\n\t\theaders,\n\t\tbody: body ?? formData,\n\t\tmethod: options.method,\n\t\tsignal: controller.signal,\n\t};\n\n\tif (config.WITH_CREDENTIALS) {\n\t\trequest.credentials = config.CREDENTIALS;\n\t}\n\n\tonCancel(() => controller.abort());\n\n\treturn await fetch(url, request);\n};"},useData:!0},Zt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const base64 = (str: string): string => {\n\ttry {\n\t\treturn btoa(str);\n\t} catch (err) {\n\t\t// @ts-ignore\n\t\treturn Buffer.from(str).toString('base64');\n\t}\n};"},useData:!0},Kt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {\n\tconst errors: Record<number, string> = {\n\t\t400: 'Bad Request',\n\t\t401: 'Unauthorized',\n\t\t403: 'Forbidden',\n\t\t404: 'Not Found',\n\t\t500: 'Internal Server Error',\n\t\t502: 'Bad Gateway',\n\t\t503: 'Service Unavailable',\n\t\t...options.errors,\n\t}\n\n\tconst error = errors[result.status];\n\tif (error) {\n\t\tthrow new ApiError(options, result, error);\n\t}\n\n\tif (!result.ok) {\n\t\tthrow new ApiError(options, result, 'Generic Error');\n\t}\n};"},useData:!0},Xt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getFormData = (options: ApiRequestOptions): FormData | undefined => {\n\tif (options.formData) {\n\t\tconst formData = new FormData();\n\n\t\tconst process = (key: string, value: any) => {\n\t\t\tif (isString(value) || isBlob(value)) {\n\t\t\t\tformData.append(key, value);\n\t\t\t} else {\n\t\t\t\tformData.append(key, JSON.stringify(value));\n\t\t\t}\n\t\t};\n\n\t\tObject.entries(options.formData)\n\t\t\t.filter(([_, value]) => isDefined(value))\n\t\t\t.forEach(([key, value]) => {\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tvalue.forEach(v => process(key, v));\n\t\t\t\t} else {\n\t\t\t\t\tprocess(key, value);\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn formData;\n\t}\n\treturn undefined;\n};"},useData:!0},Yt={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getQueryString = (params: Record<string, any>): string => {\n\tconst qs: string[] = [];\n\n\tconst append = (key: string, value: any) => {\n\t\tqs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);\n\t};\n\n\tconst process = (key: string, value: any) => {\n\t\tif (isDefined(value)) {\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tvalue.forEach(v => {\n\t\t\t\t\tprocess(key, v);\n\t\t\t\t});\n\t\t\t} else if (typeof value === 'object') {\n\t\t\t\tObject.entries(value).forEach(([k, v]) => {\n\t\t\t\t\tprocess(`${key}[${k}]`, v);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tappend(key, value);\n\t\t\t}\n\t\t}\n\t};\n\n\tObject.entries(params).forEach(([key, value]) => {\n\t\tprocess(key, value);\n\t});\n\n\tif (qs.length > 0) {\n\t\treturn `?${qs.join('&')}`;\n\t}\n\n\treturn '';\n};"},useData:!0},en={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {\n\tconst encoder = config.ENCODE_PATH || encodeURI;\n\n\tconst path = options.url\n\t\t.replace('{api-version}', config.VERSION)\n\t\t.replace(/{(.*?)}/g, (substring: string, group: string) => {\n\t\t\tif (options.path?.hasOwnProperty(group)) {\n\t\t\t\treturn encoder(String(options.path[group]));\n\t\t\t}\n\t\t\treturn substring;\n\t\t});\n\n\tconst url = `${config.BASE}${path}`;\n\tif (options.query) {\n\t\treturn `${url}${getQueryString(options.query)}`;\n\t}\n\treturn url;\n};"},useData:!0},tn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isBlob = (value: any): value is Blob => {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.type === 'string' &&\n\t\ttypeof value.stream === 'function' &&\n\t\ttypeof value.arrayBuffer === 'function' &&\n\t\ttypeof value.constructor === 'function' &&\n\t\ttypeof value.constructor.name === 'string' &&\n\t\t/^(Blob|File)$/.test(value.constructor.name) &&\n\t\t/^(Blob|File)$/.test(value[Symbol.toStringTag])\n\t);\n};"},useData:!0},nn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {\n\treturn value !== undefined && value !== null;\n};"},useData:!0},rn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isFormData = (value: any): value is FormData => {\n\treturn value instanceof FormData;\n};"},useData:!0},on={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isString = (value: any): value is string => {\n\treturn typeof value === 'string';\n};"},useData:!0},an={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isStringWithValue = (value: any): value is string => {\n\treturn isString(value) && value !== '';\n};"},useData:!0},ln={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const isSuccess = (status: number): boolean => {\n\treturn status >= 200 && status < 300;\n};"},useData:!0},sn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\n\nconst resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {\n\tif (typeof resolver === 'function') {\n\t\treturn (resolver as Resolver<T>)(options);\n\t}\n\treturn resolver;\n};"},useData:!0},un={1:function(e,t,n,r,o){return"import { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport type { Observable } from 'rxjs';\n\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport { BaseHttpRequest } from './BaseHttpRequest';\nimport type { OpenAPIConfig } from './OpenAPI';\nimport { OpenAPI } from './OpenAPI';\nimport { request as __request } from './request';\n"},3:function(e,t,n,r,o){return"import type { ApiRequestOptions } from './ApiRequestOptions';\nimport { BaseHttpRequest } from './BaseHttpRequest';\nimport type { CancelablePromise } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\nimport { request as __request } from './request';\n"},5:function(e,t,n,r,o){return"@Injectable()\n"},7:function(e,t,n,r,o){return"\tconstructor(\n\t\t@Inject(OpenAPI)\n\t\tconfig: OpenAPIConfig,\n\t\thttp: HttpClient,\n\t) {\n\t\tsuper(config, http);\n\t}\n"},9:function(e,t,n,r,o){return"\tconstructor(config: OpenAPIConfig) {\n\t\tsuper(config);\n\t}\n"},11:function(e,t,n,r,o){return"\t/**\n\t * Request method\n\t * @param options The request options from the service\n\t * @returns Observable<T>\n\t * @throws ApiError\n\t */\n\tpublic override request<T>(options: ApiRequestOptions): Observable<T> {\n\t\treturn __request(this.config, this.http, options);\n\t}\n"},13:function(e,t,n,r,o){return"\t/**\n\t * Request method\n\t * @param options The request options from the service\n\t * @returns CancelablePromise<T>\n\t * @throws ApiError\n\t */\n\tpublic override request<T>(options: ApiRequestOptions): CancelablePromise<T> {\n\t\treturn __request(this.config, options);\n\t}\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:19,column:11}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:21,column:0},end:{line:23,column:11}}}))?a:"")+"export class "+(null!=(a=e.lambda(e.strict(t,"httpRequest",{start:{line:24,column:15},end:{line:24,column:26}}),t))?a:"")+" extends BaseHttpRequest {\n\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:26,column:1},end:{line:38,column:12}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(11,o,0),inverse:e.program(13,o,0),data:o,loc:{start:{line:40,column:1},end:{line:60,column:12}}}))?a:"")+"}"},usePartial:!0,useData:!0},pn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t})\n\t\t.filter(([_, value]) => isDefined(value))\n\t\t.reduce((headers, [key, value]) => ({\n\t\t\t...headers,\n\t\t\t[key]: String(value),\n\t\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn new Headers(headers);\n};"},useData:!0},cn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body !== undefined) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body as any;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},mn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = async (response: Response): Promise<any> => {\n\tif (response.status !== 204) {\n\t\ttry {\n\t\t\tconst contentType = response.headers.get('Content-Type');\n\t\t\tif (contentType) {\n\t\t\t\tconst isJSON = contentType.toLowerCase().startsWith('application/json');\n\t\t\t\tif (isJSON) {\n\t\t\t\t\treturn await response.json();\n\t\t\t\t} else {\n\t\t\t\t\treturn await response.text();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},dn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = response.headers.get(responseHeader);\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},fn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport FormData from 'form-data';\nimport fetch, { Headers } from 'node-fetch';\nimport type { RequestInit, Response } from 'node-fetch';\nimport type { AbortSignal } from 'node-fetch/externals';\n\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getHeaders"),t,{name:"node/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getRequestBody"),t,{name:"node/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/sendRequest"),t,{name:"node/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getResponseHeader"),t,{name:"node/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"node/getResponseBody"),t,{name:"node/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest(options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = await getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: response.ok,\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},hn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = async (\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Headers,\n\tonCancel: OnCancel\n): Promise<Response> => {\n\tconst controller = new AbortController();\n\n\tconst request: RequestInit = {\n\t\theaders,\n\t\tmethod: options.method,\n\t\tbody: body ?? formData,\n\t\tsignal: controller.signal as AbortSignal,\n\t};\n\n\tonCancel(() => controller.abort());\n\n\treturn await fetch(url, request);\n};"},useData:!0},yn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(i(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport type { ApiRequestOptions } from './ApiRequestOptions';\n\ntype Resolver<T> = (options: ApiRequestOptions) => Promise<T>;\ntype Headers = Record<string, string>;\n\nexport type OpenAPIConfig = {\n\tBASE: string;\n\tVERSION: string;\n\tWITH_CREDENTIALS: boolean;\n\tCREDENTIALS: 'include' | 'omit' | 'same-origin';\n\tTOKEN?: string | Resolver<string>;\n\tUSERNAME?: string | Resolver<string>;\n\tPASSWORD?: string | Resolver<string>;\n\tHEADERS?: Headers | Resolver<Headers>;\n\tENCODE_PATH?: (path: string) => string;\n};\n\nexport const OpenAPI: OpenAPIConfig = {\n\tBASE: '"+(null!=(a=s(l(t,"server",{start:{line:21,column:11},end:{line:21,column:17}}),t))?a:"")+"',\n\tVERSION: '"+(null!=(a=s(l(t,"version",{start:{line:22,column:14},end:{line:22,column:21}}),t))?a:"")+"',\n\tWITH_CREDENTIALS: false,\n\tCREDENTIALS: 'include',\n\tTOKEN: undefined,\n\tUSERNAME: undefined,\n\tPASSWORD: undefined,\n\tHEADERS: undefined,\n\tENCODE_PATH: undefined,\n};"},usePartial:!0,useData:!0},vn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"fetch/request"),t,{name:"fetch/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"xhr/request"),t,{name:"xhr/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},5:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"axios/request"),t,{name:"axios/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"angular/request"),t,{name:"angular/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"node/request"),t,{name:"node/request",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:67}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:2,column:63}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:3,column:67}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:4,column:71}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:5,column:65}}}))?a:"")},usePartial:!0,useData:!0},gn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {\n\tconst token = await resolve(options, config.TOKEN);\n\tconst username = await resolve(options, config.USERNAME);\n\tconst password = await resolve(options, config.PASSWORD);\n\tconst additionalHeaders = await resolve(options, config.HEADERS);\n\n\tconst headers = Object.entries({\n\t\tAccept: 'application/json',\n\t\t...additionalHeaders,\n\t\t...options.headers,\n\t})\n\t\t.filter(([_, value]) => isDefined(value))\n\t\t.reduce((headers, [key, value]) => ({\n\t\t\t...headers,\n\t\t\t[key]: String(value),\n\t\t}), {} as Record<string, string>);\n\n\tif (isStringWithValue(token)) {\n\t\theaders['Authorization'] = `Bearer ${token}`;\n\t}\n\n\tif (isStringWithValue(username) && isStringWithValue(password)) {\n\t\tconst credentials = base64(`${username}:${password}`);\n\t\theaders['Authorization'] = `Basic ${credentials}`;\n\t}\n\n\tif (options.body) {\n\t\tif (options.mediaType) {\n\t\t\theaders['Content-Type'] = options.mediaType;\n\t\t} else if (isBlob(options.body)) {\n\t\t\theaders['Content-Type'] = options.body.type || 'application/octet-stream';\n\t\t} else if (isString(options.body)) {\n\t\t\theaders['Content-Type'] = 'text/plain';\n\t\t} else if (!isFormData(options.body)) {\n\t\t\theaders['Content-Type'] = 'application/json';\n\t\t}\n\t}\n\n\treturn new Headers(headers);\n};"},useData:!0},Pn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getRequestBody = (options: ApiRequestOptions): any => {\n\tif (options.body !== undefined) {\n\t\tif (options.mediaType?.includes('/json')) {\n\t\t\treturn JSON.stringify(options.body)\n\t\t} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {\n\t\t\treturn options.body;\n\t\t} else {\n\t\t\treturn JSON.stringify(options.body);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},bn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseBody = (xhr: XMLHttpRequest): any => {\n\tif (xhr.status !== 204) {\n\t\ttry {\n\t\t\tconst contentType = xhr.getResponseHeader('Content-Type');\n\t\t\tif (contentType) {\n\t\t\t\tconst isJSON = contentType.toLowerCase().startsWith('application/json');\n\t\t\t\tif (isJSON) {\n\t\t\t\t\treturn JSON.parse(xhr.responseText);\n\t\t\t\t} else {\n\t\t\t\t\treturn xhr.responseText;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},On={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"const getResponseHeader = (xhr: XMLHttpRequest, responseHeader?: string): string | undefined => {\n\tif (responseHeader) {\n\t\tconst content = xhr.getResponseHeader(responseHeader);\n\t\tif (isString(content)) {\n\t\t\treturn content;\n\t\t}\n\t}\n\treturn undefined;\n};"},useData:!0},xn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nimport { ApiError } from './ApiError';\nimport type { ApiRequestOptions } from './ApiRequestOptions';\nimport type { ApiResult } from './ApiResult';\nimport { CancelablePromise } from './CancelablePromise';\nimport type { OnCancel } from './CancelablePromise';\nimport type { OpenAPIConfig } from './OpenAPI';\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isDefined"),t,{name:"functions/isDefined",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isString"),t,{name:"functions/isString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isStringWithValue"),t,{name:"functions/isStringWithValue",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isBlob"),t,{name:"functions/isBlob",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isFormData"),t,{name:"functions/isFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/isSuccess"),t,{name:"functions/isSuccess",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/base64"),t,{name:"functions/base64",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getQueryString"),t,{name:"functions/getQueryString",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getUrl"),t,{name:"functions/getUrl",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/getFormData"),t,{name:"functions/getFormData",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/resolve"),t,{name:"functions/resolve",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"fetch/getHeaders"),t,{name:"fetch/getHeaders",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/getRequestBody"),t,{name:"xhr/getRequestBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/sendRequest"),t,{name:"xhr/sendRequest",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/getResponseHeader"),t,{name:"xhr/getResponseHeader",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"xhr/getResponseBody"),t,{name:"xhr/getResponseBody",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n"+(null!=(a=e.invokePartial(l(r,"functions/catchErrorCodes"),t,{name:"functions/catchErrorCodes",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n\n/**\n * Request method\n * @param config The OpenAPI configuration object\n * @param options The request options from the service\n * @returns CancelablePromise<T>\n * @throws ApiError\n */\nexport const request = <T>(config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise<T> => {\n\treturn new CancelablePromise(async (resolve, reject, onCancel) => {\n\t\ttry {\n\t\t\tconst url = getUrl(config, options);\n\t\t\tconst formData = getFormData(options);\n\t\t\tconst body = getRequestBody(options);\n\t\t\tconst headers = await getHeaders(config, options);\n\n\t\t\tif (!onCancel.isCancelled) {\n\t\t\t\tconst response = await sendRequest(config, options, url, body, formData, headers, onCancel);\n\t\t\t\tconst responseBody = getResponseBody(response);\n\t\t\t\tconst responseHeader = getResponseHeader(response, options.responseHeader);\n\n\t\t\t\tconst result: ApiResult = {\n\t\t\t\t\turl,\n\t\t\t\t\tok: isSuccess(response.status),\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\tbody: responseHeader ?? responseBody,\n\t\t\t\t};\n\n\t\t\t\tcatchErrorCodes(options, result);\n\n\t\t\t\tresolve(result.body);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\t});\n};"},usePartial:!0,useData:!0},kn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"export const sendRequest = async (\n\tconfig: OpenAPIConfig,\n\toptions: ApiRequestOptions,\n\turl: string,\n\tbody: any,\n\tformData: FormData | undefined,\n\theaders: Headers,\n\tonCancel: OnCancel\n): Promise<XMLHttpRequest> => {\n\tconst xhr = new XMLHttpRequest();\n\txhr.open(options.method, url, true);\n\txhr.withCredentials = config.WITH_CREDENTIALS;\n\n\theaders.forEach((value, key) => {\n\t\txhr.setRequestHeader(key, value);\n\t});\n\n\treturn new Promise<XMLHttpRequest>((resolve, reject) => {\n\t\txhr.onload = () => resolve(xhr);\n\t\txhr.onabort = () => reject(new Error('Request aborted'));\n\t\txhr.onerror = () => reject(new Error('Network error'));\n\t\txhr.send(body ?? formData);\n\n\t\tonCancel(() => xhr.abort());\n\t});\n};"},useData:!0},Rn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"imports"),{name:"each",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:7,column:9}}}))?a:"")},2:function(e,t,n,r,o){var a,l=e.lambda;return"import type { "+(null!=(a=l(t,t))?a:"")+" } from './"+(null!=(a=l(t,t))?a:"")+"';\n"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportInterface"),t,{name:"exportInterface",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"one-of",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:12,column:0},end:{line:26,column:0}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportComposition"),t,{name:"exportComposition",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"any-of",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(10,o,0),data:o,loc:{start:{line:14,column:0},end:{line:26,column:0}}}))?a:""},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"all-of",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:16,column:0},end:{line:26,column:0}}}))?a:""},11:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"enum",{name:"equals",hash:{},fn:e.program(12,o,0),inverse:e.program(13,o,0),data:o,loc:{start:{line:18,column:0},end:{line:26,column:0}}}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(13,o,0),inverse:e.program(15,o,0),data:o,loc:{start:{line:19,column:0},end:{line:23,column:7}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportType"),t,{name:"exportType",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"exportEnum"),t,{name:"exportEnum",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"if").call(l,s(t,"imports"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:8,column:7}}}))?a:"")+"\n"+(null!=(a=s(n,"equals").call(l,s(t,"export"),"interface",{name:"equals",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:10,column:0},end:{line:26,column:11}}}))?a:"")},usePartial:!0,useData:!0},Cn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\nexport const $"+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:3,column:17},end:{line:3,column:21}}),t))?a:"")+" = "+(null!=(a=e.invokePartial(l(r,"schema"),t,{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+" as const;"},usePartial:!0,useData:!0},wn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.program(4,o,0),data:o,loc:{start:{line:4,column:0},end:{line:11,column:7}}}))?a:"")+"\n"},2:function(e,t,n,r,o){return"import { Injectable } from '@angular/core';\nimport type { Observable } from 'rxjs';\n"},4:function(e,t,n,r,o){return"import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport type { Observable } from 'rxjs';\n"},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"imports"),{name:"each",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:15,column:0},end:{line:17,column:9}}}))?a:"")+"\n"},7:function(e,t,n,r,o){var a,l=e.lambda;return"import type { "+(null!=(a=l(t,t))?a:"")+" } from '../models/"+(null!=(a=l(t,t))?a:"")+"';\n"},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import type { CancelablePromise } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathDeep",{start:{line:21,column:42},end:{line:21,column:60}}),t))?a:"")+"/CancelablePromise';\n"},11:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(12,o,0),inverse:e.program(14,o,0),data:o,loc:{start:{line:24,column:0},end:{line:28,column:11}}}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { BaseHttpRequest } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathDeep",{start:{line:25,column:35},end:{line:25,column:53}}),t))?a:"")+"/BaseHttpRequest';\n"},14:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import type { BaseHttpRequest } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathDeep",{start:{line:27,column:40},end:{line:27,column:58}}),t))?a:"")+"/BaseHttpRequest';\n"},16:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"import { OpenAPI } from '"+(null!=(a=s(l(i(o,"root"),"corePathDeep",{start:{line:30,column:27},end:{line:30,column:45}}),t))?a:"")+"/OpenAPI';\nimport { request as __request } from '"+(null!=(a=s(l(i(o,"root"),"corePathDeep",{start:{line:31,column:40},end:{line:31,column:58}}),t))?a:"")+"/request';\n"},18:function(e,t,n,r,o){return"@Injectable()\n"},20:function(e,t,n,r,o){return"\n\tconstructor(public readonly httpRequest: BaseHttpRequest) {}\n"},22:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(23,o,0),inverse:e.noop,data:o,loc:{start:{line:44,column:1},end:{line:47,column:12}}}))?a:""},23:function(e,t,n,r,o){return"\n\tconstructor(public readonly http: HttpClient) {}\n"},25:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.strict,i=e.lambda,u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n"+(null!=(a=u(n,"if").call(l,u(t,"deprecated"),{name:"if",hash:{},fn:e.program(26,o,0),inverse:e.noop,data:o,loc:{start:{line:52,column:1},end:{line:54,column:8}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"summary"),{name:"if",hash:{},fn:e.program(28,o,0),inverse:e.noop,data:o,loc:{start:{line:55,column:1},end:{line:57,column:8}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"description"),{name:"if",hash:{},fn:e.program(30,o,0),inverse:e.noop,data:o,loc:{start:{line:58,column:1},end:{line:60,column:8}}}))?a:"")+(null!=(a=u(n,"unless").call(l,u(u(o,"root"),"useOptions"),{name:"unless",hash:{},fn:e.program(32,o,0),inverse:e.noop,data:o,loc:{start:{line:61,column:1},end:{line:67,column:12}}}))?a:"")+(null!=(a=u(n,"each").call(l,u(t,"results"),{name:"each",hash:{},fn:e.program(37,o,0),inverse:e.noop,data:o,loc:{start:{line:68,column:1},end:{line:70,column:10}}}))?a:"")+"\t * @throws ApiError\n\t */\n"+(null!=(a=u(n,"if").call(l,u(u(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(39,o,0),inverse:e.program(45,o,0),data:o,loc:{start:{line:73,column:1},end:{line:89,column:8}}}))?a:"")+"\t\t\tmethod: '"+(null!=(a=i(s(t,"method",{start:{line:90,column:15},end:{line:90,column:21}}),t))?a:"")+"',\n\t\t\turl: '"+(null!=(a=i(s(t,"path",{start:{line:91,column:12},end:{line:91,column:16}}),t))?a:"")+"',\n"+(null!=(a=u(n,"if").call(l,u(t,"parametersPath"),{name:"if",hash:{},fn:e.program(50,o,0),inverse:e.noop,data:o,loc:{start:{line:92,column:3},end:{line:98,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersCookie"),{name:"if",hash:{},fn:e.program(53,o,0),inverse:e.noop,data:o,loc:{start:{line:99,column:3},end:{line:105,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersHeader"),{name:"if",hash:{},fn:e.program(55,o,0),inverse:e.noop,data:o,loc:{start:{line:106,column:3},end:{line:112,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersQuery"),{name:"if",hash:{},fn:e.program(57,o,0),inverse:e.noop,data:o,loc:{start:{line:113,column:3},end:{line:119,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersForm"),{name:"if",hash:{},fn:e.program(59,o,0),inverse:e.noop,data:o,loc:{start:{line:120,column:3},end:{line:126,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"parametersBody"),{name:"if",hash:{},fn:e.program(61,o,0),inverse:e.noop,data:o,loc:{start:{line:127,column:3},end:{line:137,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"responseHeader"),{name:"if",hash:{},fn:e.program(68,o,0),inverse:e.noop,data:o,loc:{start:{line:138,column:3},end:{line:140,column:10}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"errors"),{name:"if",hash:{},fn:e.program(70,o,0),inverse:e.noop,data:o,loc:{start:{line:141,column:3},end:{line:147,column:10}}}))?a:"")+"\t\t\t...options,\n\t\t});\n\t}\n\n"},26:function(e,t,n,r,o){return"\t * @deprecated\n"},28:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"summary"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:56,column:4},end:{line:56,column:31}}}))?a:"")+"\n"},30:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:59,column:4},end:{line:59,column:35}}}))?a:"")+"\n"},32:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(33,o,0),inverse:e.noop,data:o,loc:{start:{line:62,column:1},end:{line:66,column:8}}}))?a:""},33:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"each",hash:{},fn:e.program(34,o,0),inverse:e.noop,data:o,loc:{start:{line:63,column:1},end:{line:65,column:10}}}))?a:""},34:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * @param "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:64,column:14},end:{line:64,column:18}}),t))?a:"")+" "+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"if",hash:{},fn:e.program(35,o,0),inverse:e.noop,data:o,loc:{start:{line:64,column:22},end:{line:64,column:79}}}))?a:"")+"\n"},35:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:64,column:41},end:{line:64,column:72}}}))?a:""},37:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * @returns "+(null!=(a=e.lambda(e.strict(t,"type",{start:{line:69,column:16},end:{line:69,column:20}}),t))?a:"")+" "+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"if",hash:{},fn:e.program(35,o,0),inverse:e.noop,data:o,loc:{start:{line:69,column:24},end:{line:69,column:81}}}))?a:"")+"\n"},39:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(40,o,0),inverse:e.program(43,o,0),data:o,loc:{start:{line:74,column:1},end:{line:80,column:12}}}))?a:""},40:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\tpublic "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:75,column:12},end:{line:75,column:16}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:75,column:35},end:{line:75,column:62}}}))?a:"")+"options?: Partial<ApiRequestOptions>): Observable<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn this.httpRequest.request({\n"},41:function(e,t,n,r,o){return", "},43:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:78,column:11},end:{line:78,column:15}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:78,column:34},end:{line:78,column:61}}}))?a:"")+"options?: Partial<ApiRequestOptions>): CancelablePromise<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn this.httpRequest.request({\n"},45:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(46,o,0),inverse:e.program(48,o,0),data:o,loc:{start:{line:82,column:1},end:{line:88,column:12}}}))?a:""},46:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:83,column:11},end:{line:83,column:15}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:83,column:34},end:{line:83,column:61}}}))?a:"")+"options?: Partial<ApiRequestOptions>): Observable<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn __request(OpenAPI, this.http, {\n"},48:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tpublic static "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:86,column:18},end:{line:86,column:22}}),t))?a:"")+"("+(null!=(a=e.invokePartial(l(r,"parameters"),t,{name:"parameters",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(41,o,0),inverse:e.noop,data:o,loc:{start:{line:86,column:41},end:{line:86,column:68}}}))?a:"")+"options?: Partial<ApiRequestOptions>): CancelablePromise<"+(null!=(a=e.invokePartial(l(r,"result"),t,{name:"result",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"> {\n\t\treturn __request(OpenAPI, {\n"},50:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tpath: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersPath"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:94,column:4},end:{line:96,column:13}}}))?a:"")+"\t\t\t},\n"},51:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t\t\t\t'"+(null!=(a=s(l(t,"prop",{start:{line:95,column:8},end:{line:95,column:12}}),t))?a:"")+"': "+(null!=(a=s(l(t,"name",{start:{line:95,column:21},end:{line:95,column:25}}),t))?a:"")+",\n"},53:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tcookies: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersCookie"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:101,column:4},end:{line:103,column:13}}}))?a:"")+"\t\t\t},\n"},55:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\theaders: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersHeader"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:108,column:4},end:{line:110,column:13}}}))?a:"")+"\t\t\t},\n"},57:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tquery: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersQuery"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:115,column:4},end:{line:117,column:13}}}))?a:"")+"\t\t\t},\n"},59:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tformData: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parametersForm"),{name:"each",hash:{},fn:e.program(51,o,0),inverse:e.noop,data:o,loc:{start:{line:122,column:4},end:{line:124,column:13}}}))?a:"")+"\t\t\t},\n"},61:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"equals").call(l,s(s(t,"parametersBody"),"in"),"formData",{name:"equals",hash:{},fn:e.program(62,o,0),inverse:e.noop,data:o,loc:{start:{line:128,column:3},end:{line:130,column:14}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(t,"parametersBody"),"in"),"body",{name:"equals",hash:{},fn:e.program(64,o,0),inverse:e.noop,data:o,loc:{start:{line:131,column:3},end:{line:133,column:14}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(t,"parametersBody"),"mediaType"),{name:"if",hash:{},fn:e.program(66,o,0),inverse:e.noop,data:o,loc:{start:{line:134,column:3},end:{line:136,column:10}}}))?a:"")},62:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tformData: "+(null!=(a=e.lambda(e.strict(l(t,"parametersBody"),"name",{start:{line:129,column:16},end:{line:129,column:35}}),t))?a:"")+",\n"},64:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tbody: "+(null!=(a=e.lambda(e.strict(l(t,"parametersBody"),"name",{start:{line:132,column:12},end:{line:132,column:31}}),t))?a:"")+",\n"},66:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\tmediaType: '"+(null!=(a=e.lambda(e.strict(l(t,"parametersBody"),"mediaType",{start:{line:135,column:18},end:{line:135,column:42}}),t))?a:"")+"',\n"},68:function(e,t,n,r,o){var a;return"\t\t\tresponseHeader: '"+(null!=(a=e.lambda(e.strict(t,"responseHeader",{start:{line:139,column:23},end:{line:139,column:37}}),t))?a:"")+"',\n"},70:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\terrors: {\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"errors"),{name:"each",hash:{},fn:e.program(71,o,0),inverse:e.noop,data:o,loc:{start:{line:143,column:4},end:{line:145,column:13}}}))?a:"")+"\t\t\t},\n"},71:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t\t\t"+(null!=(a=e.lambda(e.strict(t,"code",{start:{line:144,column:7},end:{line:144,column:11}}),t))?a:"")+": `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:144,column:17},end:{line:144,column:52}}}))?a:"")+"`,\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.strict,i=e.lambda,u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(u(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=u(n,"equals").call(l,u(u(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:13,column:11}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(t,"imports"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:14,column:0},end:{line:19,column:7}}}))?a:"")+(null!=(a=u(n,"notEquals").call(l,u(u(o,"root"),"httpClient"),"angular",{name:"notEquals",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:20,column:0},end:{line:22,column:14}}}))?a:"")+(null!=(a=u(n,"if").call(l,u(u(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.program(16,o,0),data:o,loc:{start:{line:23,column:0},end:{line:32,column:7}}}))?a:"")+"\nimport type { ApiRequestOptions } from '"+(null!=(a=i(s(u(o,"root"),"corePathDeep",{start:{line:34,column:42},end:{line:34,column:60}}),t))?a:"")+"/ApiRequestOptions';\n\n"+(null!=(a=u(n,"equals").call(l,u(u(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(18,o,0),inverse:e.noop,data:o,loc:{start:{line:36,column:0},end:{line:38,column:11}}}))?a:"")+"export class "+(null!=(a=i(s(t,"name",{start:{line:39,column:16},end:{line:39,column:20}}),t))?a:"")+(null!=(a=i(s(u(o,"root"),"postfix",{start:{line:39,column:26},end:{line:39,column:39}}),t))?a:"")+" {\n"+(null!=(a=u(n,"if").call(l,u(u(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(20,o,0),inverse:e.program(22,o,0),data:o,loc:{start:{line:40,column:1},end:{line:48,column:8}}}))?a:"")+"\n"+(null!=(a=u(n,"each").call(l,u(t,"operations"),{name:"each",hash:{},fn:e.program(25,o,0),inverse:e.noop,data:o,loc:{start:{line:50,column:1},end:{line:152,column:10}}}))?a:"")+"}"},usePartial:!0,useData:!0},qn={1:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export { "+(null!=(a=s(l(t,"clientName",{start:{line:4,column:12},end:{line:4,column:22}}),t))?a:"")+" } from './"+(null!=(a=s(l(t,"clientName",{start:{line:4,column:39},end:{line:4,column:49}}),t))?a:"")+"';\n\n"},3:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"export { ApiError } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:8,column:28},end:{line:8,column:45}}),t))?a:"")+"/ApiError';\n"+(null!=(a=i(n,"if").call(null!=t?t:e.nullContext||{},i(i(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?a:"")+"export { CancelablePromise, CancelError } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:12,column:50},end:{line:12,column:67}}),t))?a:"")+"/CancelablePromise';\nexport { OpenAPI } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:13,column:27},end:{line:13,column:44}}),t))?a:"")+"/OpenAPI';\nexport type { OpenAPIConfig } from '"+(null!=(a=s(l(i(o,"root"),"corePathTop",{start:{line:14,column:38},end:{line:14,column:55}}),t))?a:"")+"/OpenAPI';\n"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"export { BaseHttpRequest } from '"+(null!=(a=e.lambda(e.strict(l(o,"root"),"corePathTop",{start:{line:10,column:35},end:{line:10,column:52}}),t))?a:"")+"/BaseHttpRequest';\n"},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:0},end:{line:30,column:7}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"each",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:19,column:0},end:{line:29,column:9}}}))?a:"")},8:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:20,column:0},end:{line:28,column:7}}}))?a:""},9:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export type { "+(null!=(a=s(l(t,"name",{start:{line:21,column:17},end:{line:21,column:21}}),t))?a:"")+" } from './models/"+(null!=(a=s(l(t,"name",{start:{line:21,column:45},end:{line:21,column:49}}),t))?a:"")+"';\n"},11:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"enum"),{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.program(14,o,0),data:o,loc:{start:{line:22,column:0},end:{line:28,column:0}}}))?a:""},12:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export { "+(null!=(a=s(l(t,"name",{start:{line:23,column:12},end:{line:23,column:16}}),t))?a:"")+" } from './models/"+(null!=(a=s(l(t,"name",{start:{line:23,column:40},end:{line:23,column:44}}),t))?a:"")+"';\n"},14:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"enums"),{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:24,column:0},end:{line:28,column:0}}}))?a:""},16:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"if",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o,loc:{start:{line:33,column:0},end:{line:38,column:7}}}))?a:""},17:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"models"),{name:"each",hash:{},fn:e.program(18,o,0),inverse:e.noop,data:o,loc:{start:{line:35,column:0},end:{line:37,column:9}}}))?a:"")},18:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"export { $"+(null!=(a=s(l(t,"name",{start:{line:36,column:13},end:{line:36,column:17}}),t))?a:"")+" } from './schemas/$"+(null!=(a=s(l(t,"name",{start:{line:36,column:43},end:{line:36,column:47}}),t))?a:"")+"';\n"},20:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"services"),{name:"if",hash:{},fn:e.program(21,o,0),inverse:e.noop,data:o,loc:{start:{line:41,column:0},end:{line:46,column:7}}}))?a:""},21:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"services"),{name:"each",hash:{},fn:e.program(22,o,0),inverse:e.noop,data:o,loc:{start:{line:43,column:0},end:{line:45,column:9}}}))?a:"")},22:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"export { "+(null!=(a=s(l(t,"name",{start:{line:44,column:12},end:{line:44,column:16}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:44,column:22},end:{line:44,column:35}}),t))?a:"")+" } from './services/"+(null!=(a=s(l(t,"name",{start:{line:44,column:61},end:{line:44,column:65}}),t))?a:"")+(null!=(a=s(l(i(o,"root"),"postfix",{start:{line:44,column:71},end:{line:44,column:84}}),t))?a:"")+"';\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(s(r,"header"),t,{name:"header",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+"\n"+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportClient"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:6,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportCore"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:7,column:0},end:{line:15,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportModels"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:16,column:0},end:{line:31,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportSchemas"),{name:"if",hash:{},fn:e.program(16,o,0),inverse:e.noop,data:o,loc:{start:{line:32,column:0},end:{line:39,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(s(o,"root"),"exportServices"),{name:"if",hash:{},fn:e.program(20,o,0),inverse:e.noop,data:o,loc:{start:{line:40,column:0},end:{line:47,column:7}}}))?a:"")},usePartial:!0,useData:!0},An={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"fetch",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:2,column:53}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"xhr",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:3,column:51}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"axios",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:4,column:53}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"angular",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:5,column:55}}}))?a:"")+(null!=(a=s(n,"equals").call(l,s(s(o,"root"),"httpClient"),"node",{name:"equals",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:6,column:52}}}))?a:"")},2:function(e,t,n,r,o){return"Blob"},4:function(e,t,n,r,o){var a;return null!=(a=e.lambda(e.strict(t,"base",{start:{line:8,column:3},end:{line:8,column:7}}),t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"base"),"binary",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(4,o,0),data:o,loc:{start:{line:1,column:0},end:{line:9,column:13}}}))?a:""},useData:!0},jn={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:37,column:11}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\nexport namespace "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:15,column:20},end:{line:15,column:24}}),t))?a:"")+" {\n\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"enums"),{name:"each",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:1},end:{line:34,column:10}}}))?a:"")+"\n}\n"},8:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"ifdef").call(l,s(t,"description"),s(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:1},end:{line:27,column:11}}}))?a:"")+"\texport enum "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:28,column:16},end:{line:28,column:20}}),t))?a:"")+" {\n"+(null!=(a=s(n,"each").call(l,s(t,"enum"),{name:"each",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o,loc:{start:{line:29,column:2},end:{line:31,column:11}}}))?a:"")+"\t}\n\n"},9:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:20,column:1},end:{line:22,column:8}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.noop,data:o,loc:{start:{line:23,column:1},end:{line:25,column:8}}}))?a:"")+"\t */\n"},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:21,column:4},end:{line:21,column:35}}}))?a:"")+"\n"},12:function(e,t,n,r,o){return"\t * @deprecated\n"},14:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t\t"+(null!=(a=s(l(t,"name",{start:{line:30,column:5},end:{line:30,column:9}}),t))?a:"")+" = "+(null!=(a=s(l(t,"value",{start:{line:30,column:18},end:{line:30,column:23}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"ifdef").call(l,s(t,"description"),s(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?a:"")+"export type "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?a:"")+" = "+(null!=(a=e.invokePartial(s(r,"type"),t,{name:"type",hash:{parent:s(t,"name")},data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+";\n"+(null!=(a=s(n,"if").call(l,s(t,"enums"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:0},end:{line:38,column:7}}}))?a:"")},usePartial:!0,useData:!0},Hn={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},6:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:1},end:{line:17,column:8}}}))?a:"")+(null!=(a=s(n,"containsSpaces").call(l,s(t,"name"),{name:"containsSpaces",hash:{},fn:e.program(9,o,0),inverse:e.program(11,o,0),data:o,loc:{start:{line:18,column:1},end:{line:22,column:20}}}))?a:"")},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:15,column:4},end:{line:15,column:35}}}))?a:"")+"\n\t */\n"},9:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t'"+(null!=(a=s(l(t,"name",{start:{line:19,column:5},end:{line:19,column:9}}),t))?a:"")+"' = "+(null!=(a=s(l(t,"value",{start:{line:19,column:19},end:{line:19,column:24}}),t))?a:"")+",\n"},11:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t"+(null!=(a=s(l(t,"name",{start:{line:21,column:4},end:{line:21,column:8}}),t))?a:"")+" = "+(null!=(a=s(l(t,"value",{start:{line:21,column:17},end:{line:21,column:22}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"ifdef").call(l,s(t,"description"),s(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?a:"")+"export enum "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?a:"")+" {\n"+(null!=(a=s(n,"each").call(l,s(t,"enum"),{name:"each",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:1},end:{line:23,column:10}}}))?a:"")+"}"},useData:!0},Dn={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},6:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=i(n,"ifdef").call(null!=t?t:e.nullContext||{},i(t,"description"),i(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(7,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:13,column:1},end:{line:22,column:11}}}))?s:"")+"\t"+(null!=(s=e.invokePartial(i(r,"isReadOnly"),t,{name:"isReadOnly",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(t,"name",{start:{line:23,column:19},end:{line:23,column:23}}),t))?s:"")+(null!=(s=e.invokePartial(i(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(i(r,"type"),t,{name:"type",hash:{parent:i(l[1],"name")},data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+";\n"},7:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:15,column:1},end:{line:17,column:8}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:1},end:{line:20,column:8}}}))?a:"")+"\t */\n"},8:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:16,column:4},end:{line:16,column:35}}}))?a:"")+"\n"},10:function(e,t,n,r,o){return"\t * @deprecated\n"},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useUnionTypes"),{name:"unless",hash:{},fn:e.program(13,o,0),inverse:e.noop,data:o,loc:{start:{line:27,column:0},end:{line:46,column:11}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\nexport namespace "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:29,column:20},end:{line:29,column:24}}),t))?a:"")+" {\n\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"enums"),{name:"each",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o,loc:{start:{line:31,column:1},end:{line:43,column:10}}}))?a:"")+"\n}\n"},14:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o,loc:{start:{line:32,column:1},end:{line:36,column:8}}}))?a:"")+"\texport enum "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:37,column:16},end:{line:37,column:20}}),t))?a:"")+" {\n"+(null!=(a=s(n,"each").call(l,s(t,"enum"),{name:"each",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o,loc:{start:{line:38,column:2},end:{line:40,column:11}}}))?a:"")+"\t}\n\n"},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t/**\n\t * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:34,column:4},end:{line:34,column:35}}}))?a:"")+"\n\t */\n"},17:function(e,t,n,r,o){var a,l=e.strict,s=e.lambda;return"\t\t"+(null!=(a=s(l(t,"name",{start:{line:39,column:5},end:{line:39,column:9}}),t))?a:"")+" = "+(null!=(a=s(l(t,"value",{start:{line:39,column:18},end:{line:39,column:23}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o,a,l){var s,i=null!=t?t:e.nullContext||{},u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=u(n,"ifdef").call(i,u(t,"description"),u(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?s:"")+"export type "+(null!=(s=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?s:"")+" = {\n"+(null!=(s=u(n,"each").call(i,u(t,"properties"),{name:"each",hash:{},fn:e.program(6,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:12,column:1},end:{line:24,column:10}}}))?s:"")+"};\n"+(null!=(s=u(n,"if").call(i,u(t,"enums"),{name:"if",hash:{},fn:e.program(12,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:26,column:0},end:{line:47,column:7}}}))?s:"")},usePartial:!0,useData:!0,useDepths:!0},En={1:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+" */\n"},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:4,column:3},end:{line:4,column:34}}}))?a:"")+"\n"},4:function(e,t,n,r,o){return" * @deprecated\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"ifdef").call(null!=t?t:e.nullContext||{},l(t,"description"),l(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:10,column:10}}}))?a:"")+"export type "+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:11,column:15},end:{line:11,column:19}}),t))?a:"")+" = "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+";"},usePartial:!0,useData:!0},Tn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return"/* istanbul ignore file */\n/* tslint:disable */\n/* eslint-disable */"},useData:!0},In={1:function(e,t,n,r,o){return" | null"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"isNullable"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:32}}}))?a:""},useData:!0},Sn={1:function(e,t,n,r,o){return"readonly "},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:34}}}))?a:""},useData:!0},_n={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(t,"isRequired"),{name:"unless",hash:{},fn:e.program(2,o,0),inverse:e.program(4,o,0),data:o,loc:{start:{line:2,column:0},end:{line:2,column:54}}}))?a:""},2:function(e,t,n,r,o){return"?"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:23},end:{line:2,column:43}}}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(t,"isRequired"),{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:4,column:64}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"unless",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:22},end:{line:4,column:53}}}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},useData:!0},Nn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(l(o,"root"),"useOptions"),{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.program(12,o,0),data:o,loc:{start:{line:2,column:0},end:{line:27,column:7}}}))?a:""},2:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(a=s(n,"each").call(l,s(t,"parameters"),{name:"each",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:6,column:9}}}))?a:"")+"}: {\n"+(null!=(a=s(n,"each").call(l,s(t,"parameters"),{name:"each",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:8,column:0},end:{line:20,column:9}}}))?a:"")+"}"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.lambda(e.strict(t,"name",{start:{line:5,column:3},end:{line:5,column:7}}),t))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:10},end:{line:5,column:48}}}))?a:"")+",\n"},4:function(e,t,n,r,o){var a;return" = "+(null!=(a=e.lambda(e.strict(t,"default",{start:{line:5,column:31},end:{line:5,column:38}}),t))?a:"")},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"ifdef").call(null!=t?t:e.nullContext||{},l(t,"description"),l(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:18,column:10}}}))?a:"")+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:19,column:3},end:{line:19,column:7}}),t))?a:"")+(null!=(a=e.invokePartial(l(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},7:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?a:"")+" */\n"},8:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:12,column:3},end:{line:12,column:34}}}))?a:"")+"\n"},10:function(e,t,n,r,o){return" * @deprecated\n"},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\n"+(null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"each",hash:{},fn:e.program(13,o,0),inverse:e.noop,data:o,loc:{start:{line:24,column:0},end:{line:26,column:9}}}))?a:"")},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.lambda(e.strict(t,"name",{start:{line:25,column:3},end:{line:25,column:7}}),t))?a:"")+(null!=(a=e.invokePartial(l(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"default"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:25,column:36},end:{line:25,column:74}}}))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"parameters"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:28,column:7}}}))?a:""},usePartial:!0,useData:!0},Bn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"results"),{name:"each",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:2,column:66}}}))?a:""},2:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(o,"last"),{name:"unless",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:26},end:{line:2,column:57}}}))?a:"")},3:function(e,t,n,r,o){return" | "},5:function(e,t,n,r,o){return"void"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"results"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(5,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},usePartial:!0,useData:!0},$n={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaInterface"),t,{name:"schemaInterface",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"enum",{name:"equals",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:3,column:0},end:{line:17,column:0}}}))?a:""},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaEnum"),t,{name:"schemaEnum",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"array",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:5,column:0},end:{line:17,column:0}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaArray"),t,{name:"schemaArray",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(10,o,0),inverse:e.program(12,o,0),data:o,loc:{start:{line:7,column:0},end:{line:17,column:0}}}))?a:""},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaDictionary"),t,{name:"schemaDictionary",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"any-of",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(15,o,0),data:o,loc:{start:{line:9,column:0},end:{line:17,column:0}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaComposition"),t,{name:"schemaComposition",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"all-of",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(16,o,0),data:o,loc:{start:{line:11,column:0},end:{line:17,column:0}}}))?a:""},16:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"one-of",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(17,o,0),data:o,loc:{start:{line:13,column:0},end:{line:17,column:0}}}))?a:""},17:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"schemaGeneric"),t,{name:"schemaGeneric",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:17,column:11}}}))?a:""},usePartial:!0,useData:!0},Mn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tcontains: "+(null!=(a=e.invokePartial(l(r,"schema"),l(t,"link"),{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},3:function(e,t,n,r,o){var a;return"\tcontains: {\n\t\ttype: '"+(null!=(a=e.lambda(e.strict(t,"base",{start:{line:7,column:12},end:{line:7,column:16}}),t))?a:"")+"',\n\t},\n"},5:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:11,column:16},end:{line:11,column:26}}),t))?a:"")+",\n"},7:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:14,column:16},end:{line:14,column:26}}),t))?a:"")+",\n"},9:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:17,column:16},end:{line:17,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: 'array',\n"+(null!=(a=s(n,"if").call(l,s(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},Ln={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tdescription: `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:4,column:15},end:{line:4,column:50}}}))?a:"")+"`,\n"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"schema"),t,{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=l(n,"unless").call(null!=t?t:e.nullContext||{},l(o,"last"),{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:43},end:{line:6,column:73}}}))?a:"")},4:function(e,t,n,r,o){return", "},6:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:8,column:16},end:{line:8,column:26}}),t))?a:"")+",\n"},8:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:11,column:16},end:{line:11,column:26}}),t))?a:"")+",\n"},10:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:14,column:16},end:{line:14,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: '"+(null!=(a=e.lambda(e.strict(t,"export",{start:{line:2,column:10},end:{line:2,column:16}}),t))?a:"")+"',\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+"\tcontains: ["+(null!=(a=s(n,"each").call(l,s(t,"properties"),{name:"each",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:12},end:{line:6,column:82}}}))?a:"")+"],\n"+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:7,column:0},end:{line:9,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},Fn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tcontains: "+(null!=(a=e.invokePartial(l(r,"schema"),l(t,"link"),{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},3:function(e,t,n,r,o){var a;return"\tcontains: {\n\t\ttype: '"+(null!=(a=e.lambda(e.strict(t,"base",{start:{line:7,column:12},end:{line:7,column:16}}),t))?a:"")+"',\n\t},\n"},5:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:11,column:16},end:{line:11,column:26}}),t))?a:"")+",\n"},7:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:14,column:16},end:{line:14,column:26}}),t))?a:"")+",\n"},9:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:17,column:16},end:{line:17,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: 'dictionary',\n"+(null!=(a=s(n,"if").call(l,s(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:3,column:0},end:{line:9,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:10,column:0},end:{line:12,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:13,column:0},end:{line:15,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:16,column:0},end:{line:18,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},Wn={1:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:4,column:16},end:{line:4,column:26}}),t))?a:"")+",\n"},3:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:7,column:16},end:{line:7,column:26}}),t))?a:"")+",\n"},5:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:10,column:16},end:{line:10,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n\ttype: 'Enum',\n"+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:5,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?a:"")+"}"},useData:!0},Vn={1:function(e,t,n,r,o){var a;return"\ttype: '"+(null!=(a=e.lambda(e.strict(t,"type",{start:{line:3,column:11},end:{line:3,column:15}}),t))?a:"")+"',\n"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tdescription: `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:6,column:15},end:{line:6,column:50}}}))?a:"")+"`,\n"},5:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:9,column:16},end:{line:9,column:26}}),t))?a:"")+",\n"},7:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:12,column:16},end:{line:12,column:26}}),t))?a:"")+",\n"},9:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:15,column:16},end:{line:15,column:26}}),t))?a:"")+",\n"},11:function(e,t,n,r,o){var a;return"\tformat: '"+(null!=(a=e.lambda(e.strict(t,"format",{start:{line:18,column:13},end:{line:18,column:19}}),t))?a:"")+"',\n"},13:function(e,t,n,r,o){var a;return"\tmaximum: "+(null!=(a=e.lambda(e.strict(t,"maximum",{start:{line:21,column:13},end:{line:21,column:20}}),t))?a:"")+",\n"},15:function(e,t,n,r,o){var a;return"\texclusiveMaximum: "+(null!=(a=e.lambda(e.strict(t,"exclusiveMaximum",{start:{line:24,column:22},end:{line:24,column:38}}),t))?a:"")+",\n"},17:function(e,t,n,r,o){var a;return"\tminimum: "+(null!=(a=e.lambda(e.strict(t,"minimum",{start:{line:27,column:13},end:{line:27,column:20}}),t))?a:"")+",\n"},19:function(e,t,n,r,o){var a;return"\texclusiveMinimum: "+(null!=(a=e.lambda(e.strict(t,"exclusiveMinimum",{start:{line:30,column:22},end:{line:30,column:38}}),t))?a:"")+",\n"},21:function(e,t,n,r,o){var a;return"\tmultipleOf: "+(null!=(a=e.lambda(e.strict(t,"multipleOf",{start:{line:33,column:16},end:{line:33,column:26}}),t))?a:"")+",\n"},23:function(e,t,n,r,o){var a;return"\tmaxLength: "+(null!=(a=e.lambda(e.strict(t,"maxLength",{start:{line:36,column:15},end:{line:36,column:24}}),t))?a:"")+",\n"},25:function(e,t,n,r,o){var a;return"\tminLength: "+(null!=(a=e.lambda(e.strict(t,"minLength",{start:{line:39,column:15},end:{line:39,column:24}}),t))?a:"")+",\n"},27:function(e,t,n,r,o){var a;return"\tpattern: '"+(null!=(a=e.lambda(e.strict(t,"pattern",{start:{line:42,column:14},end:{line:42,column:21}}),t))?a:"")+"',\n"},29:function(e,t,n,r,o){var a;return"\tmaxItems: "+(null!=(a=e.lambda(e.strict(t,"maxItems",{start:{line:45,column:14},end:{line:45,column:22}}),t))?a:"")+",\n"},31:function(e,t,n,r,o){var a;return"\tminItems: "+(null!=(a=e.lambda(e.strict(t,"minItems",{start:{line:48,column:14},end:{line:48,column:22}}),t))?a:"")+",\n"},33:function(e,t,n,r,o){var a;return"\tuniqueItems: "+(null!=(a=e.lambda(e.strict(t,"uniqueItems",{start:{line:51,column:17},end:{line:51,column:28}}),t))?a:"")+",\n"},35:function(e,t,n,r,o){var a;return"\tmaxProperties: "+(null!=(a=e.lambda(e.strict(t,"maxProperties",{start:{line:54,column:19},end:{line:54,column:32}}),t))?a:"")+",\n"},37:function(e,t,n,r,o){var a;return"\tminProperties: "+(null!=(a=e.lambda(e.strict(t,"minProperties",{start:{line:57,column:19},end:{line:57,column:32}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(a=s(n,"if").call(l,s(t,"type"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:5,column:0},end:{line:7,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o,loc:{start:{line:8,column:0},end:{line:10,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o,loc:{start:{line:11,column:0},end:{line:13,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o,loc:{start:{line:14,column:0},end:{line:16,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"format"),{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o,loc:{start:{line:17,column:0},end:{line:19,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maximum"),{name:"if",hash:{},fn:e.program(13,o,0),inverse:e.noop,data:o,loc:{start:{line:20,column:0},end:{line:22,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"exclusiveMaximum"),{name:"if",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o,loc:{start:{line:23,column:0},end:{line:25,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minimum"),{name:"if",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o,loc:{start:{line:26,column:0},end:{line:28,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"exclusiveMinimum"),{name:"if",hash:{},fn:e.program(19,o,0),inverse:e.noop,data:o,loc:{start:{line:29,column:0},end:{line:31,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"multipleOf"),{name:"if",hash:{},fn:e.program(21,o,0),inverse:e.noop,data:o,loc:{start:{line:32,column:0},end:{line:34,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maxLength"),{name:"if",hash:{},fn:e.program(23,o,0),inverse:e.noop,data:o,loc:{start:{line:35,column:0},end:{line:37,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minLength"),{name:"if",hash:{},fn:e.program(25,o,0),inverse:e.noop,data:o,loc:{start:{line:38,column:0},end:{line:40,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"pattern"),{name:"if",hash:{},fn:e.program(27,o,0),inverse:e.noop,data:o,loc:{start:{line:41,column:0},end:{line:43,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maxItems"),{name:"if",hash:{},fn:e.program(29,o,0),inverse:e.noop,data:o,loc:{start:{line:44,column:0},end:{line:46,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minItems"),{name:"if",hash:{},fn:e.program(31,o,0),inverse:e.noop,data:o,loc:{start:{line:47,column:0},end:{line:49,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"uniqueItems"),{name:"if",hash:{},fn:e.program(33,o,0),inverse:e.noop,data:o,loc:{start:{line:50,column:0},end:{line:52,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"maxProperties"),{name:"if",hash:{},fn:e.program(35,o,0),inverse:e.noop,data:o,loc:{start:{line:53,column:0},end:{line:55,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"minProperties"),{name:"if",hash:{},fn:e.program(37,o,0),inverse:e.noop,data:o,loc:{start:{line:56,column:0},end:{line:58,column:7}}}))?a:"")+"}"},useData:!0},Un={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\tdescription: `"+(null!=(a=l(n,"escapeDescription").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeDescription",hash:{},data:o,loc:{start:{line:3,column:15},end:{line:3,column:50}}}))?a:"")+"`,\n"},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"each").call(null!=t?t:e.nullContext||{},l(t,"properties"),{name:"each",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:7,column:1},end:{line:9,column:10}}}))?a:""},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"\t\t"+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:8,column:5},end:{line:8,column:9}}),t))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"schema"),t,{name:"schema",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+",\n"},6:function(e,t,n,r,o){var a;return"\tisReadOnly: "+(null!=(a=e.lambda(e.strict(t,"isReadOnly",{start:{line:13,column:16},end:{line:13,column:26}}),t))?a:"")+",\n"},8:function(e,t,n,r,o){var a;return"\tisRequired: "+(null!=(a=e.lambda(e.strict(t,"isRequired",{start:{line:16,column:16},end:{line:16,column:26}}),t))?a:"")+",\n"},10:function(e,t,n,r,o){var a;return"\tisNullable: "+(null!=(a=e.lambda(e.strict(t,"isNullable",{start:{line:19,column:16},end:{line:19,column:26}}),t))?a:"")+",\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:2,column:0},end:{line:4,column:7}}}))?a:"")+"\tproperties: {\n"+(null!=(a=s(n,"if").call(l,s(t,"properties"),{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:10,column:7}}}))?a:"")+"\t},\n"+(null!=(a=s(n,"if").call(l,s(t,"isReadOnly"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:12,column:0},end:{line:14,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isRequired"),{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o,loc:{start:{line:15,column:0},end:{line:17,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"isNullable"),{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o,loc:{start:{line:18,column:0},end:{line:20,column:7}}}))?a:"")+"}"},usePartial:!0,useData:!0},Qn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeInterface"),t,{name:"typeInterface",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"reference",{name:"equals",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o,loc:{start:{line:3,column:0},end:{line:19,column:0}}}))?a:""},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeReference"),t,{name:"typeReference",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},6:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"enum",{name:"equals",hash:{},fn:e.program(7,o,0),inverse:e.program(9,o,0),data:o,loc:{start:{line:5,column:0},end:{line:19,column:0}}}))?a:""},7:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeEnum"),t,{name:"typeEnum",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},9:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"array",{name:"equals",hash:{},fn:e.program(10,o,0),inverse:e.program(12,o,0),data:o,loc:{start:{line:7,column:0},end:{line:19,column:0}}}))?a:""},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeArray"),t,{name:"typeArray",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},12:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"dictionary",{name:"equals",hash:{},fn:e.program(13,o,0),inverse:e.program(15,o,0),data:o,loc:{start:{line:9,column:0},end:{line:19,column:0}}}))?a:""},13:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeDictionary"),t,{name:"typeDictionary",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},15:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"one-of",{name:"equals",hash:{},fn:e.program(16,o,0),inverse:e.program(18,o,0),data:o,loc:{start:{line:11,column:0},end:{line:19,column:0}}}))?a:""},16:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeUnion"),t,{name:"typeUnion",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},18:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"any-of",{name:"equals",hash:{},fn:e.program(16,o,0),inverse:e.program(19,o,0),data:o,loc:{start:{line:13,column:0},end:{line:19,column:0}}}))?a:""},19:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"all-of",{name:"equals",hash:{},fn:e.program(20,o,0),inverse:e.program(22,o,0),data:o,loc:{start:{line:15,column:0},end:{line:19,column:0}}}))?a:""},20:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeIntersection"),t,{name:"typeIntersection",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},22:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=e.invokePartial(l(r,"typeGeneric"),t,{name:"typeGeneric",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"equals").call(null!=t?t:e.nullContext||{},l(t,"export"),"interface",{name:"equals",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:19,column:11}}}))?a:""},usePartial:!0,useData:!0},zn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Array<"+(null!=(a=e.invokePartial(l(r,"type"),l(t,"link"),{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Array<"+(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},usePartial:!0,useData:!0},Jn={1:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Record<string, "+(null!=(a=e.invokePartial(l(r,"type"),l(t,"link"),{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},3:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"Record<string, "+(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+">"+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(a=l(n,"if").call(null!=t?t:e.nullContext||{},l(t,"link"),{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o,loc:{start:{line:1,column:0},end:{line:5,column:9}}}))?a:""},usePartial:!0,useData:!0},Gn={1:function(e,t,n,r,o){var a;return null!=(a=e.lambda(t,t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"enumerator").call(null!=t?t:e.nullContext||{},l(t,"enum"),l(t,"parent"),l(t,"name"),{name:"enumerator",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:55}}}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},Zn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},Kn={1:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"{\n"+(null!=(s=i(n,"each").call(null!=t?t:e.nullContext||{},i(t,"properties"),{name:"each",hash:{},fn:e.program(2,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:3,column:0},end:{line:19,column:9}}}))?s:"")+"}"+(null!=(s=e.invokePartial(i(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")},2:function(e,t,n,r,o,a,l){var s,i=null!=t?t:e.nullContext||{},u=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=u(n,"ifdef").call(i,u(t,"description"),u(t,"deprecated"),{name:"ifdef",hash:{},fn:e.program(3,o,0,a,l),inverse:e.noop,data:o,loc:{start:{line:4,column:0},end:{line:13,column:10}}}))?s:"")+(null!=(s=u(n,"if").call(i,u(l[1],"parent"),{name:"if",hash:{},fn:e.program(8,o,0,a,l),inverse:e.program(10,o,0,a,l),data:o,loc:{start:{line:14,column:0},end:{line:18,column:7}}}))?s:"")},3:function(e,t,n,r,o){var a,l=null!=t?t:e.nullContext||{},s=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return"/**\n"+(null!=(a=s(n,"if").call(l,s(t,"description"),{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o,loc:{start:{line:6,column:0},end:{line:8,column:7}}}))?a:"")+(null!=(a=s(n,"if").call(l,s(t,"deprecated"),{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o,loc:{start:{line:9,column:0},end:{line:11,column:7}}}))?a:"")+" */\n"},4:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return" * "+(null!=(a=l(n,"escapeComment").call(null!=t?t:e.nullContext||{},l(t,"description"),{name:"escapeComment",hash:{},data:o,loc:{start:{line:7,column:3},end:{line:7,column:34}}}))?a:"")+"\n"},6:function(e,t,n,r,o){return" * @deprecated\n"},8:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(s=e.invokePartial(i(r,"isReadOnly"),t,{name:"isReadOnly",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+(null!=(s=e.lambda(e.strict(t,"name",{start:{line:15,column:18},end:{line:15,column:22}}),t))?s:"")+(null!=(s=e.invokePartial(i(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+": "+(null!=(s=e.invokePartial(i(r,"type"),t,{name:"type",hash:{parent:i(l[1],"parent")},data:o,helpers:n,partials:r,decorators:e.decorators}))?s:"")+";\n"},10:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"isReadOnly"),t,{name:"isReadOnly",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=e.lambda(e.strict(t,"name",{start:{line:17,column:18},end:{line:17,column:22}}),t))?a:"")+(null!=(a=e.invokePartial(l(r,"isRequired"),t,{name:"isRequired",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+": "+(null!=(a=e.invokePartial(l(r,"type"),t,{name:"type",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+";\n"},12:function(e,t,n,r,o){return"any"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o,a,l){var s,i=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return null!=(s=i(n,"if").call(null!=t?t:e.nullContext||{},i(t,"properties"),{name:"if",hash:{},fn:e.program(1,o,0,a,l),inverse:e.program(12,o,0,a,l),data:o,loc:{start:{line:1,column:0},end:{line:23,column:9}}}))?s:""},usePartial:!0,useData:!0,useDepths:!0},Xn={1:function(e,t,n,r,o){var a;return null!=(a=e.lambda(t,t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"intersection").call(null!=t?t:e.nullContext||{},l(t,"properties"),l(t,"parent"),{name:"intersection",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:60}}}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},Yn={compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=e.invokePartial(l(r,"base"),t,{name:"base",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0},er={1:function(e,t,n,r,o){var a;return null!=(a=e.lambda(t,t))?a:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var a,l=e.lookupProperty||function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]};return(null!=(a=l(n,"union").call(null!=t?t:e.nullContext||{},l(t,"properties"),l(t,"parent"),{name:"union",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o,loc:{start:{line:1,column:0},end:{line:1,column:46}}}))?a:"")+(null!=(a=e.invokePartial(l(r,"isNullable"),t,{name:"isNullable",data:o,helpers:n,partials:r,decorators:e.decorators}))?a:"")},usePartial:!0,useData:!0};const tr=e=>{Ct.registerHelper("ifdef",(function(...e){const t=e.pop();return e.every((e=>!e))?t.inverse(this):t.fn(this)})),Ct.registerHelper("equals",(function(e,t,n){return e===t?n.fn(this):n.inverse(this)})),Ct.registerHelper("notEquals",(function(e,t,n){return e!==t?n.fn(this):n.inverse(this)})),Ct.registerHelper("containsSpaces",(function(e,t){return/\s+/.test(e)?t.fn(this):t.inverse(this)})),Ct.registerHelper("union",(function(t,n,r){const o=Ct.partials.type,a=t.map((t=>o({...e,...t,parent:n}))).filter(R);let l=a.join(" | ");return a.length>1&&(l=`(${l})`),r.fn(l)})),Ct.registerHelper("intersection",(function(t,n,r){const o=Ct.partials.type,a=t.map((t=>o({...e,...t,parent:n}))).filter(R);let l=a.join(" & ");return a.length>1&&(l=`(${l})`),r.fn(l)})),Ct.registerHelper("enumerator",(function(t,n,r,o){return!e.useUnionTypes&&n&&r?`${n}.${r}`:o.fn(t.map((e=>e.value)).filter(R).join(" | "))})),Ct.registerHelper("escapeComment",(function(e){return e.replace(/\*\//g,"*").replace(/\/\*/g,"*").replace(/\r?\n(.*)/g,((e,t)=>`${n.EOL} * ${t.trim()}`))})),Ct.registerHelper("escapeDescription",(function(e){return e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\${/g,"\\${")})),Ct.registerHelper("camelCase",(function(e){return i.default(e)}))},nr=o.writeFile,rr=o.copyFile,or=o.pathExists,ar=o.mkdirp,lr=o.remove,sr=e=>{let t=0,r=e.split(n.EOL);return r=r.map((e=>{e=e.trim().replace(/^\*/g," *");let n=t;(e.endsWith("(")||e.endsWith("{")||e.endsWith("["))&&t++,(e.startsWith(")")||e.startsWith("}")||e.startsWith("]"))&&n&&(t--,n--);const r=`${"\t".repeat(n)}${e}`;return""===r.trim()?"":r})),r.join(n.EOL)},ir=(e,t)=>{let r=e.split(n.EOL);r=r.map((e=>{switch(t){case exports.Indent.SPACE_4:return e.replace(/\t/g," ");case exports.Indent.SPACE_2:return e.replace(/\t/g," ");case exports.Indent.TAB:return e}}));return`${r.join(n.EOL)}${n.EOL}`},ur=e=>{switch(e){case exports.HttpClient.FETCH:return"FetchHttpRequest";case exports.HttpClient.XHR:return"XHRHttpRequest";case exports.HttpClient.NODE:return"NodeHttpRequest";case exports.HttpClient.AXIOS:return"AxiosHttpRequest";case exports.HttpClient.ANGULAR:return"AngularHttpRequest"}},pr=e=>e.sort(((e,t)=>{const n=e.name.toLowerCase(),r=t.name.toLowerCase();return n.localeCompare(r,"en")})),cr=e=>e.sort(((e,t)=>{const n=e.name.toLowerCase(),r=t.name.toLowerCase();return n.localeCompare(r,"en")})),mr=async(e,t,n,o,a,l,s,i,u,p,c,m,d,f,h,y)=>{const v=r.resolve(process.cwd(),n),g=r.resolve(v,"core"),P=r.resolve(v,"models"),b=r.resolve(v,"schemas"),O=r.resolve(v,"services");if(x=process.cwd(),k=n,!r.relative(k,x).startsWith(".."))throw new Error("Output folder is not a subdirectory of the current working directory");var x,k;s&&(await lr(g),await ar(g),await(async(e,t,n,o,a,l,s,i,u)=>{const p=ur(o),c={httpClient:o,clientName:i,httpRequest:p,corePathTop:a,corePathDeep:l,server:e.server,version:e.version};if(await nr(r.resolve(n,"OpenAPI.ts"),ir(t.core.settings(c),s)),await nr(r.resolve(n,"ApiError.ts"),ir(t.core.apiError(c),s)),await nr(r.resolve(n,"ApiRequestOptions.ts"),ir(t.core.apiRequestOptions(c),s)),await nr(r.resolve(n,"ApiResult.ts"),ir(t.core.apiResult(c),s)),await nr(r.resolve(n,"CancelablePromise.ts"),ir(t.core.cancelablePromise(c),s)),await nr(r.resolve(n,"request.ts"),ir(t.core.request(c),s)),B(i)&&(await nr(r.resolve(n,"BaseHttpRequest.ts"),ir(t.core.baseHttpRequest(c),s)),await nr(r.resolve(n,`${p}.ts`),ir(t.core.httpRequest(c),s))),u){const e=r.resolve(process.cwd(),u);if(!await or(e))throw new Error(`Custom request file "${e}" does not exists`);await rr(e,r.resolve(n,"request.ts"))}})(e,t,g,o,c,m,d,h,y)),i&&(await lr(O),await ar(O),await(async(e,t,n,o,a,l,s,i,u,p,c)=>{for(const m of e){const e=r.resolve(n,`${m.name}${p}.ts`),d=t.exports.service({...m,httpClient:o,useUnionTypes:a,useOptions:l,postfix:p,corePathTop:s,corePathDeep:i,exportClient:B(c)});await nr(e,ir(sr(d),u))}})(e.services,t,O,o,l,a,c,m,d,f,h)),p&&(await lr(b),await ar(b),await(async(e,t,n,o,a,l)=>{for(const s of e){const e=r.resolve(n,`$${s.name}.ts`),i=t.exports.schema({...s,httpClient:o,useUnionTypes:a});await nr(e,ir(sr(i),l))}})(e.models,t,b,o,l,d)),u&&(await lr(P),await ar(P),await(async(e,t,n,o,a,l)=>{for(const s of e){const e=r.resolve(n,`${s.name}.ts`),i=t.exports.model({...s,httpClient:o,useUnionTypes:a});await nr(e,ir(sr(i),l))}})(e.models,t,P,o,l,d)),B(h)&&(await ar(v),await(async(e,t,n,o,a,l,s,i,u)=>{const p=t.client({clientName:a,httpClient:o,postfix:u,corePathTop:l,corePathDeep:s,server:e.server,version:e.version,models:pr(e.models),services:cr(e.services),httpRequest:ur(o)});await nr(r.resolve(n,`${a}.ts`),ir(sr(p),i))})(e,t,v,o,h,c,m,d,f)),(s||i||p||u)&&(await ar(v),await(async(e,t,n,o,a,l,s,i,u,p,c,m)=>{const d=t.index({exportCore:a,exportServices:l,exportModels:s,exportSchemas:i,useUnionTypes:o,corePathTop:u,corePathDeep:p,postfix:c,clientName:m,server:e.server,version:e.version,models:pr(e.models),services:cr(e.services),exportClient:B(m)});await nr(r.resolve(n,"index.ts"),d)})(e,t,v,l,s,i,u,p,c,m,f,h))},dr=async({input:e,output:t,httpClient:n=exports.HttpClient.FETCH,clientName:r,useOptions:o=!1,useUnionTypes:a=!1,exportCore:l=!0,exportServices:s=!0,exportModels:i=!0,exportSchemas:p=!1,corePathTop:m="./core",corePathDeep:d="../core",indent:f=exports.Indent.SPACE_4,postfix:h="Service",request:y,write:v=!0})=>{const g=c(e)?await(async e=>await u.default.bundle(e,e,{}))(e):e,P=(e=>{const t=e.swagger||e.openapi;if("string"==typeof t){const e=t.charAt(0),n=Number.parseInt(e);if(n===se.V2||n===se.V3)return n}throw new Error(`Unsupported Open API version: "${String(t)}"`)})(g),b=(e=>{tr(e);const t={index:Ct.template(qn),client:Ct.template(wt),exports:{model:Ct.template(Rn),schema:Ct.template(Cn),service:Ct.template(wn)},core:{settings:Ct.template(yn),apiError:Ct.template(Tt),apiRequestOptions:Ct.template(It),apiResult:Ct.template(St),cancelablePromise:Ct.template(Wt),request:Ct.template(vn),baseHttpRequest:Ct.template(Ft),httpRequest:Ct.template(un)}};return Ct.registerPartial("exportEnum",Ct.template(Hn)),Ct.registerPartial("exportInterface",Ct.template(Dn)),Ct.registerPartial("exportComposition",Ct.template(jn)),Ct.registerPartial("exportType",Ct.template(En)),Ct.registerPartial("header",Ct.template(Tn)),Ct.registerPartial("isNullable",Ct.template(In)),Ct.registerPartial("isReadOnly",Ct.template(Sn)),Ct.registerPartial("isRequired",Ct.template(_n)),Ct.registerPartial("parameters",Ct.template(Nn)),Ct.registerPartial("result",Ct.template(Bn)),Ct.registerPartial("schema",Ct.template($n)),Ct.registerPartial("schemaArray",Ct.template(Mn)),Ct.registerPartial("schemaDictionary",Ct.template(Fn)),Ct.registerPartial("schemaEnum",Ct.template(Wn)),Ct.registerPartial("schemaGeneric",Ct.template(Vn)),Ct.registerPartial("schemaInterface",Ct.template(Un)),Ct.registerPartial("schemaComposition",Ct.template(Ln)),Ct.registerPartial("type",Ct.template(Qn)),Ct.registerPartial("typeArray",Ct.template(zn)),Ct.registerPartial("typeDictionary",Ct.template(Jn)),Ct.registerPartial("typeEnum",Ct.template(Gn)),Ct.registerPartial("typeGeneric",Ct.template(Zn)),Ct.registerPartial("typeInterface",Ct.template(Kn)),Ct.registerPartial("typeReference",Ct.template(Yn)),Ct.registerPartial("typeUnion",Ct.template(er)),Ct.registerPartial("typeIntersection",Ct.template(Xn)),Ct.registerPartial("base",Ct.template(An)),Ct.registerPartial("functions/catchErrorCodes",Ct.template(Kt)),Ct.registerPartial("functions/getFormData",Ct.template(Xt)),Ct.registerPartial("functions/getQueryString",Ct.template(Yt)),Ct.registerPartial("functions/getUrl",Ct.template(en)),Ct.registerPartial("functions/isBlob",Ct.template(tn)),Ct.registerPartial("functions/isDefined",Ct.template(nn)),Ct.registerPartial("functions/isFormData",Ct.template(rn)),Ct.registerPartial("functions/isString",Ct.template(on)),Ct.registerPartial("functions/isStringWithValue",Ct.template(an)),Ct.registerPartial("functions/isSuccess",Ct.template(ln)),Ct.registerPartial("functions/base64",Ct.template(Zt)),Ct.registerPartial("functions/resolve",Ct.template(sn)),Ct.registerPartial("fetch/getHeaders",Ct.template(Vt)),Ct.registerPartial("fetch/getRequestBody",Ct.template(Ut)),Ct.registerPartial("fetch/getResponseBody",Ct.template(Qt)),Ct.registerPartial("fetch/getResponseHeader",Ct.template(zt)),Ct.registerPartial("fetch/sendRequest",Ct.template(Gt)),Ct.registerPartial("fetch/request",Ct.template(Jt)),Ct.registerPartial("xhr/getHeaders",Ct.template(gn)),Ct.registerPartial("xhr/getRequestBody",Ct.template(Pn)),Ct.registerPartial("xhr/getResponseBody",Ct.template(bn)),Ct.registerPartial("xhr/getResponseHeader",Ct.template(On)),Ct.registerPartial("xhr/sendRequest",Ct.template(kn)),Ct.registerPartial("xhr/request",Ct.template(xn)),Ct.registerPartial("node/getHeaders",Ct.template(pn)),Ct.registerPartial("node/getRequestBody",Ct.template(cn)),Ct.registerPartial("node/getResponseBody",Ct.template(mn)),Ct.registerPartial("node/getResponseHeader",Ct.template(dn)),Ct.registerPartial("node/sendRequest",Ct.template(hn)),Ct.registerPartial("node/request",Ct.template(fn)),Ct.registerPartial("axios/getHeaders",Ct.template(_t)),Ct.registerPartial("axios/getRequestBody",Ct.template(Nt)),Ct.registerPartial("axios/getResponseBody",Ct.template(Bt)),Ct.registerPartial("axios/getResponseHeader",Ct.template($t)),Ct.registerPartial("axios/sendRequest",Ct.template(Lt)),Ct.registerPartial("axios/request",Ct.template(Mt)),Ct.registerPartial("angular/getHeaders",Ct.template(qt)),Ct.registerPartial("angular/getRequestBody",Ct.template(At)),Ct.registerPartial("angular/getResponseBody",Ct.template(jt)),Ct.registerPartial("angular/getResponseHeader",Ct.template(Ht)),Ct.registerPartial("angular/sendRequest",Ct.template(Et)),Ct.registerPartial("angular/request",Ct.template(Dt)),t})({httpClient:n,useUnionTypes:a,useOptions:o,corePathTop:m,corePathDeep:d});switch(P){case se.V2:{const e=I(g),u=fe(e);if(!v)break;await mr(u,b,t,n,o,a,l,s,i,p,m,d,f,h,r,y);break}case se.V3:{const e=le(g),u=fe(e);if(!v)break;await mr(u,b,t,n,o,a,l,s,i,p,m,d,f,h,r,y);break}}};var fr={HttpClient:exports.HttpClient,generate:dr};exports.default=fr,exports.generate=dr; diff --git a/tools/openapi-gen/package.json b/tools/openapi-gen/package.json deleted file mode 100644 index 72abba295fcb755938a400b4375c7d95555884af..0000000000000000000000000000000000000000 --- a/tools/openapi-gen/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "name": "openapi-typescript-codegen", - "version": "0.23.1", - "description": "Library that generates Typescript clients based on the OpenAPI specification.", - "author": "Ferdi Koomen", - "homepage": "https://github.com/ferdikoomen/openapi-typescript-codegen", - "repository": { - "type": "git", - "url": "git+https://github.com/ferdikoomen/openapi-typescript-codegen.git" - }, - "bugs": { - "url": "https://github.com/ferdikoomen/openapi-typescript-codegen/issues" - }, - "license": "MIT", - "keywords": [ - "openapi", - "swagger", - "generator", - "typescript", - "yaml", - "json", - "fetch", - "xhr", - "axios", - "angular", - "node" - ], - "maintainers": [ - { - "name": "Ferdi Koomen", - "email": "info@madebyferdi.com" - } - ], - "main": "dist/index.js", - "types": "types/index.d.ts", - "bin": { - "openapi": "bin/index.js" - }, - "files": [ - "bin/index.js", - "dist/index.js", - "types/index.d.ts" - ], - "scripts": { - "clean": "rimraf ./dist ./test/generated ./test/e2e/generated ./samples/generated ./coverage ./node_modules/.cache", - "build": "rollup --config --environment NODE_ENV:development", - "build:watch": "rollup --config --environment NODE_ENV:development --watch", - "release": "rollup --config --environment NODE_ENV:production", - "validate": "tsc --project tsconfig.json --noEmit", - "run": "node ./test/index.js", - "test": "jest --selectProjects UNIT", - "test:update": "jest --selectProjects UNIT --updateSnapshot", - "test:watch": "jest --selectProjects UNIT --watch", - "test:coverage": "jest --selectProjects UNIT --coverage", - "test:e2e": "jest --selectProjects E2E --runInBand --verbose", - "eslint": "eslint .", - "eslint:fix": "eslint . --fix", - "prepublishOnly": "npm run clean && npm run release", - "codecov": "codecov --token=66c30c23-8954-4892-bef9-fbaed0a2e42b" - }, - "dependencies": { - "camelcase": "^6.3.0", - "commander": "^9.3.0", - "fs-extra": "^10.1.0", - "handlebars": "^4.7.7", - "json-schema-ref-parser": "^9.0.9" - }, - "devDependencies": { - "@angular-devkit/build-angular": "14.0.1", - "@angular/animations": "14.0.1", - "@angular/cli": "14.0.1", - "@angular/common": "14.0.1", - "@angular/compiler": "14.0.1", - "@angular/compiler-cli": "14.0.1", - "@angular/core": "14.0.1", - "@angular/forms": "14.0.1", - "@angular/platform-browser": "14.0.1", - "@angular/platform-browser-dynamic": "14.0.1", - "@angular/router": "14.0.1", - "@babel/cli": "7.18.10", - "@babel/core": "7.18.13", - "@babel/preset-env": "7.18.10", - "@babel/preset-typescript": "7.18.6", - "@rollup/plugin-commonjs": "22.0.2", - "@rollup/plugin-node-resolve": "13.3.0", - "@rollup/plugin-typescript": "8.4.0", - "@types/cross-spawn": "6.0.2", - "@types/express": "4.17.13", - "@types/fs-extra": "^9.0.13", - "@types/glob": "7.2.0", - "@types/jest": "28.1.8", - "@types/node": "18.7.11", - "@types/node-fetch": "2.6.1", - "@types/qs": "6.9.7", - "@typescript-eslint/eslint-plugin": "5.35.1", - "@typescript-eslint/parser": "5.34.0", - "abort-controller": "3.0.0", - "axios": "0.27.2", - "codecov": "3.8.3", - "cross-spawn": "7.0.3", - "eslint": "8.22.0", - "eslint-config-prettier": "8.5.0", - "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-simple-import-sort": "7.0.0", - "express": "4.18.1", - "form-data": "4.0.0", - "glob": "8.0.3", - "jest": "28.1.3", - "jest-cli": "28.1.3", - "prettier": "2.7.1", - "puppeteer": "15.5.0", - "qs": "6.11.0", - "rimraf": "3.0.2", - "rollup": "2.78.1", - "rollup-plugin-terser": "7.0.2", - "rxjs": "7.5.6", - "ts-node": "10.9.1", - "tslib": "2.4.0", - "typescript": "4.7.3", - "zone.js": "0.11.8" - }, - "resolutions": { - "node-fetch": "2.6.7" - } -} diff --git a/tools/openapi-ts/compiler/classes.ts b/tools/openapi-ts/compiler/classes.ts new file mode 100644 index 0000000000000000000000000000000000000000..73a3da5ccb6b6329ff216b88084305efa70cb8f3 --- /dev/null +++ b/tools/openapi-ts/compiler/classes.ts @@ -0,0 +1,200 @@ +import ts from "typescript"; + +import { createTypeNode } from "./typedef"; +import { toExpression } from "./types"; +import { addLeadingComment, Comments, isType } from "./utils"; + +type AccessLevel = "public" | "protected" | "private"; + +export type FunctionParameter = { + accessLevel?: AccessLevel; + default?: any; + isReadOnly?: boolean; + isRequired?: boolean; + name: string; + type: any | ts.TypeNode; +}; + +/** + * Convert AccessLevel to proper TypeScript compiler API modifier. + * @param access - the access level. + * @returns ts.ModifierLike[] + */ +const toAccessLevelModifiers = (access?: AccessLevel): ts.ModifierLike[] => { + const keyword = + access === "public" + ? ts.SyntaxKind.PublicKeyword + : access === "protected" + ? ts.SyntaxKind.ProtectedKeyword + : access === "private" + ? ts.SyntaxKind.PrivateKeyword + : undefined; + const modifiers: ts.ModifierLike[] = []; + if (keyword) { + modifiers.push(ts.factory.createModifier(keyword)); + } + return modifiers; +}; + +/** + * Convert parameters to the declaration array expected by compiler API. + * @param parameters - the parameters to conver to declarations + * @returns ts.ParameterDeclaration[] + */ +const toParameterDeclarations = (parameters: FunctionParameter[]) => + parameters.map((p) => { + const modifiers = toAccessLevelModifiers(p.accessLevel); + if (p.isReadOnly) { + modifiers.push(ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)); + } + return ts.factory.createParameterDeclaration( + modifiers, + undefined, + ts.factory.createIdentifier(p.name), + p.isRequired !== undefined && !p.isRequired ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : undefined, + p.type !== undefined ? createTypeNode(p.type) : undefined, + p.default !== undefined ? toExpression({ value: p.default }) : undefined, + ); + }); + +/** + * Create a class constructor declaration. + * @param accessLevel - the access level of the constructor. + * @param comment - comment to add to function. + * @param multiLine - if it should be multi line. + * @param parameters - parameters for the constructor. + * @param statements - statements to put in the contructor body. + * @returns ts.ConstructorDeclaration + */ +export const createConstructorDeclaration = ({ + accessLevel = undefined, + comment = undefined, + multiLine = true, + parameters = [], + statements = [], +}: { + accessLevel?: AccessLevel; + comment?: Comments; + multiLine?: boolean; + parameters?: FunctionParameter[]; + statements?: ts.Statement[]; +}) => { + const node = ts.factory.createConstructorDeclaration( + toAccessLevelModifiers(accessLevel), + toParameterDeclarations(parameters), + ts.factory.createBlock(statements, multiLine), + ); + if (comment?.length) { + addLeadingComment(node, comment); + } + return node; +}; + +/** + * Create a class method declaration. + * @param accessLevel - the access level of the method. + * @param comment - comment to add to function. + * @param isStatic - if the function is static. + * @param multiLine - if it should be multi line. + * @param name - name of the method. + * @param parameters - parameters for the method. + * @param returnType - the return type of the method. + * @param statements - statements to put in the contructor body. + * @returns ts.MethodDeclaration + */ +export const createMethodDeclaration = ({ + accessLevel = undefined, + comment = undefined, + isStatic = false, + multiLine = true, + name, + parameters = [], + returnType = undefined, + statements = [], +}: { + accessLevel?: AccessLevel; + comment?: Comments; + isStatic?: boolean; + multiLine?: boolean; + name: string; + parameters?: FunctionParameter[]; + returnType?: string | ts.TypeNode; + statements?: ts.Statement[]; +}) => { + const modifiers = toAccessLevelModifiers(accessLevel); + if (isStatic) { + modifiers.push(ts.factory.createModifier(ts.SyntaxKind.StaticKeyword)); + } + const node = ts.factory.createMethodDeclaration( + modifiers, + undefined, + ts.factory.createIdentifier(name), + undefined, + [], + toParameterDeclarations(parameters), + returnType ? createTypeNode(returnType) : undefined, + ts.factory.createBlock(statements, multiLine), + ); + if (comment?.length) { + addLeadingComment(node, comment); + } + return node; +}; + +type ClassDecorator = { + name: string; + args: any[]; +}; + +/** + * Create a class declaration. + * @param decorator - the class decorator + * @param members - elements in the class. + * @param name - name of the class. + * @returns ts.ClassDeclaration + */ +export const createClassDeclaration = ({ + decorator = undefined, + members = [], + name, +}: { + decorator?: ClassDecorator; + members?: ts.ClassElement[]; + name: string; +}) => { + const modifiers: ts.ModifierLike[] = [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)]; + if (decorator) { + modifiers.unshift( + ts.factory.createDecorator( + ts.factory.createCallExpression( + ts.factory.createIdentifier(decorator.name), + undefined, + decorator.args.map((arg) => toExpression({ value: arg })).filter(isType<ts.Expression>), + ), + ), + ); + } + // Add newline between each class member. + const m: ts.ClassElement[] = []; + members.forEach((member) => { + m.push(member); + // @ts-ignore + m.push(ts.factory.createIdentifier("\n")); + }); + return ts.factory.createClassDeclaration(modifiers, ts.factory.createIdentifier(name), [], [], m); +}; + +/** + * Create a return function call. Example `return call(param);`. + * @param args - arguments to pass to the function. + * @param name - name of the function to call. + * @returns ts.ReturnStatement + */ +export const createReturnFunctionCall = ({ args = [], name }: { args: any[]; name: string }) => + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier(name), + undefined, + args.map((arg) => ts.factory.createIdentifier(arg)).filter(isType<ts.Identifier>), + ), + ); diff --git a/tools/openapi-ts/compiler/index.ts b/tools/openapi-ts/compiler/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..549a9606629a387bd678efa825a6f73ba5412b95 --- /dev/null +++ b/tools/openapi-ts/compiler/index.ts @@ -0,0 +1,132 @@ +import { PathLike, rmSync, writeFileSync } from "node:fs"; +import path from "node:path"; + +import ts from "typescript"; + +import * as classes from "./classes"; +import * as module from "./module"; +import * as typedef from "./typedef"; +import * as types from "./types"; +import { addLeadingComment, stringToTsNodes, tsNodeToString } from "./utils"; + +export type { FunctionParameter } from "./classes"; +export type { Property } from "./typedef"; +export type { Comments } from "./utils"; +export type { ClassElement, Node, TypeNode } from "typescript"; + +const splitNameAndExtension = (fileName: string) => { + const match = fileName.match(/\.[0-9a-z]+$/i); + const extension = match ? match[0].slice(1) : ""; + const name = fileName.slice(0, fileName.length - (extension ? extension.length + 1 : 0)); + return { extension, name }; +}; + +export class TypeScriptFile { + private _headers: Array<string> = []; + private _imports: Array<ts.Node> = []; + private _items: Array<ts.Node | string> = []; + private _name: string; + private _path: PathLike; + + public constructor({ dir, name, header = true }: { dir: string; name: string; header?: boolean }) { + this._name = this._setName(name); + this._path = path.resolve(dir, this.getName()); + + if (header) { + const text = + "This file is auto-generated by @hey-api/openapi-ts\n/* eslint-disable @typescript-eslint/no-unused-vars */"; + const comment = addLeadingComment(undefined, [text], true, false); + this._headers = [...this._headers, comment]; + } + } + + public add(...nodes: Array<ts.Node | string>): void { + this._items = [...this._items, ...nodes]; + } + + public addNamedImport(...params: Parameters<typeof compiler.import.named>): void { + this._imports = [...this._imports, compiler.import.named(...params)]; + } + + public getName(withExtension = true) { + if (withExtension) { + return this._name; + } + + const { name } = splitNameAndExtension(this._name); + return name; + } + + public isEmpty() { + return !this._items.length; + } + + public remove(options?: Parameters<typeof rmSync>[1]) { + rmSync(this._path, options); + } + + private _setName(fileName: string) { + if (fileName.includes("index")) { + return fileName; + } + + const { extension, name } = splitNameAndExtension(fileName); + return [name, "gen", extension].filter(Boolean).join("."); + } + + public toString(seperator: string = "\n") { + let output: string[] = []; + if (this._headers.length) { + output = [...output, this._headers.join("\n")]; + } + if (this._imports.length) { + output = [...output, this._imports.map((v) => tsNodeToString(v)).join("\n")]; + } + output = [...output, ...this._items.map((v) => (typeof v === "string" ? v : tsNodeToString(v)))]; + return output.join(seperator); + } + + public write(seperator = "\n") { + if (this.isEmpty()) { + this.remove({ force: true }); + return; + } + writeFileSync(this._path, this.toString(seperator)); + } +} + +export const compiler = { + class: { + constructor: classes.createConstructorDeclaration, + create: classes.createClassDeclaration, + method: classes.createMethodDeclaration, + return: classes.createReturnFunctionCall, + }, + export: { + all: module.createExportAllDeclaration, + asConst: module.createExportVariableAsConst, + named: module.createNamedExportDeclarations, + }, + import: { + named: module.createNamedImportDeclarations, + }, + typedef: { + alias: typedef.createTypeAliasDeclaration, + array: typedef.createTypeArrayNode, + basic: typedef.createTypeNode, + interface: typedef.createTypeInterfaceNode, + intersect: typedef.createTypeIntersectNode, + record: typedef.createTypeRecordNode, + tuple: typedef.createTypeTupleNode, + union: typedef.createTypeUnionNode, + }, + types: { + array: types.createArrayType, + enum: types.createEnumDeclaration, + object: types.createObjectType, + }, + utils: { + toNode: stringToTsNodes, + toString: tsNodeToString, + }, +}; diff --git a/tools/openapi-ts/compiler/module.ts b/tools/openapi-ts/compiler/module.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ade9ee00120aacde36fea9c2387f9b741d4edae --- /dev/null +++ b/tools/openapi-ts/compiler/module.ts @@ -0,0 +1,88 @@ +import ts from "typescript"; + +import { ots } from "./utils"; + +/** + * Create export all declaration. Example: `export * from './y'`. + * @param module - module to export from. + * @returns ts.ExportDeclaration + */ +export const createExportAllDeclaration = (module: string) => + ts.factory.createExportDeclaration(undefined, false, undefined, ots.string(module)); + +type ImportItem = { name: string; isTypeOnly?: boolean; alias?: string } | string; + +/** + * Create a named export declaration. Example: `export { X } from './y'`. + * @param items - the items to export. + * @param module - module to export it from. + * @returns ExportDeclaration + */ +export const createNamedExportDeclarations = ( + items: Array<ImportItem> | ImportItem, + module: string, +): ts.ExportDeclaration => { + items = Array.isArray(items) ? items : [items]; + const isAllTypes = items.every((i) => typeof i === "object" && i.isTypeOnly); + return ts.factory.createExportDeclaration( + undefined, + isAllTypes, + ts.factory.createNamedExports( + items.map((item) => { + const { name, isTypeOnly = undefined, alias = undefined } = typeof item === "string" ? { name: item } : item; + return ots.export(name, isAllTypes ? false : Boolean(isTypeOnly), alias); + }), + ), + ots.string(module), + ); +}; + +/** + * Create an export variable as const statement. Example: `export x = {} as const`. + * @param name - name of the variable. + * @param expression - expression for the variable. + * @returns ts.VariableStatement + */ +export const createExportVariableAsConst = (name: string, expression: ts.Expression): ts.VariableStatement => + ts.factory.createVariableStatement( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createVariableDeclarationList( + [ + ts.factory.createVariableDeclaration( + ts.factory.createIdentifier(name), + undefined, + undefined, + ts.factory.createAsExpression(expression, ts.factory.createTypeReferenceNode("const")), + ), + ], + ts.NodeFlags.Const, + ), + ); + +/** + * Create a named import declaration. Example: `import { X } from './y'`. + * @param items - the items to export. + * @param module - module to export it from. + * @returns ImportDeclaration + */ +export const createNamedImportDeclarations = ( + items: Array<ImportItem> | ImportItem, + module: string, +): ts.ImportDeclaration => { + items = Array.isArray(items) ? items : [items]; + const isAllTypes = items.every((i) => typeof i === "object" && i.isTypeOnly); + return ts.factory.createImportDeclaration( + undefined, + ts.factory.createImportClause( + isAllTypes, + undefined, + ts.factory.createNamedImports( + items.map((item) => { + const { name, isTypeOnly = undefined, alias = undefined } = typeof item === "string" ? { name: item } : item; + return ots.import(name, isAllTypes ? false : Boolean(isTypeOnly), alias); + }), + ), + ), + ots.string(module), + ); +}; diff --git a/tools/openapi-ts/compiler/typedef.ts b/tools/openapi-ts/compiler/typedef.ts new file mode 100644 index 0000000000000000000000000000000000000000..961dbd4c87c4461d93d7406ef51eb4c2a6c749fa --- /dev/null +++ b/tools/openapi-ts/compiler/typedef.ts @@ -0,0 +1,166 @@ +import ts from "typescript"; + +import { addLeadingComment, type Comments, tsNodeToString } from "./utils"; + +export const createTypeNode = (base: any | ts.TypeNode, args?: (any | ts.TypeNode)[]): ts.TypeNode => { + if (ts.isTypeNode(base)) { + return base; + } + + if (typeof base === "number") { + return ts.factory.createLiteralTypeNode(ts.factory.createNumericLiteral(base)); + } + + return ts.factory.createTypeReferenceNode( + base, + args?.map((arg) => createTypeNode(arg)), + ); +}; + +/** + * Create a type alias declaration. Example `export type X = Y;`. + * @param name - the name of the type. + * @param type - the type. + * @param comments - comments to add if any. + * @returns ts.TypeAliasDeclaration + */ +export const createTypeAliasDeclaration = ( + name: string, + type: string | ts.TypeNode, + comments?: Comments, +): ts.TypeAliasDeclaration => { + const node = ts.factory.createTypeAliasDeclaration( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createIdentifier(name), + [], + createTypeNode(type), + ); + if (comments?.length) { + addLeadingComment(node, comments); + } + return node; +}; + +// Property of a interface type node. +export type Property = { + name: string; + type: any | ts.TypeNode; + isRequired?: boolean; + isReadOnly?: boolean; + comment?: Comments; +}; + +/** + * Create a interface type node. Example `{ readonly x: string, y?: number }` + * @param properties - the properties of the interface. + * @param isNullable - if the whole interface can be nullable + * @returns ts.TypeLiteralNode | ts.TypeUnionNode + */ +export const createTypeInterfaceNode = (properties: Property[], isNullable: boolean = false) => { + const node = ts.factory.createTypeLiteralNode( + properties.map((property) => { + const signature = ts.factory.createPropertySignature( + property.isReadOnly ? [ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)] : undefined, + property.name, + property.isRequired ? undefined : ts.factory.createToken(ts.SyntaxKind.QuestionToken), + createTypeNode(property.type), + ); + const comment = property.comment; + if (comment) { + addLeadingComment(signature, comment); + } + return signature; + }), + ); + if (!isNullable) { + return node; + } + return ts.factory.createUnionTypeNode([node, ts.factory.createTypeReferenceNode("null")]); +}; + +/** + * Create type union node. Example `string | number | boolean` + * @param types - the types in the union + * @param isNullable - if the whole type can be null + * @returns ts.UnionTypeNode + */ +export const createTypeUnionNode = (types: (any | ts.TypeNode)[], isNullable: boolean = false) => { + const nodes = types.map((t) => createTypeNode(t)); + if (isNullable) { + nodes.push(ts.factory.createTypeReferenceNode("null")); + } + return ts.factory.createUnionTypeNode(nodes); +}; + +/** + * Create type intersect node. Example `string & number & boolean` + * @param types - the types in the union + * @param isNullable - if the whole type can be null + * @returns ts.IntersectionTypeNode | ts.UnionTypeNode + */ +export const createTypeIntersectNode = (types: (any | ts.TypeNode)[], isNullable: boolean = false) => { + const nodes = types.map((t) => createTypeNode(t)); + const intersect = ts.factory.createIntersectionTypeNode(nodes); + if (isNullable) { + return ts.factory.createUnionTypeNode([intersect, ts.factory.createTypeReferenceNode("null")]); + } + return intersect; +}; + +/** + * Create type tuple node. Example `string, number, boolean` + * @param types - the types in the union + * @param isNullable - if the whole type can be null + * @returns ts.UnionTypeNode + */ +export const createTypeTupleNode = (types: (any | ts.TypeNode)[], isNullable: boolean = false) => { + const nodes = types.map((t) => createTypeNode(t)); + if (isNullable) { + nodes.push(ts.factory.createTypeReferenceNode("null")); + } + return ts.factory.createTupleTypeNode(nodes); +}; + +/** + * Create type record node. Example `{ [key: string]: string }` + * @param keys - key types. + * @param values - value types. + * @param isNullable - if the whole type can be null + * @returns ts.TypeReferenceNode | ts.UnionTypeNode + */ +export const createTypeRecordNode = ( + keys: (any | ts.TypeNode)[], + values: (any | ts.TypeNode)[], + isNullable: boolean = false, +) => { + const keyNode = createTypeUnionNode(keys); + const valueNode = createTypeUnionNode(values); + // NOTE: We use the syntax `{ [key: string]: string }` because using a Record causes + // invalid types with circular dependencies. This is functionally the same. + // Ref: https://github.com/hey-api/openapi-ts/issues/370 + const node = createTypeInterfaceNode([ + { + isRequired: true, + name: `[key: ${tsNodeToString(keyNode)}]`, + type: valueNode, + }, + ]); + if (!isNullable) { + return node; + } + return ts.factory.createUnionTypeNode([node, ts.factory.createTypeReferenceNode("null")]); +}; + +/** + * Create type array node. Example `Array<string | number>` + * @param types - the types + * @param isNullable - if the whole type can be null + * @returns ts.TypeReferenceNode | ts.UnionTypeNode + */ +export const createTypeArrayNode = (types: (any | ts.TypeNode)[], isNullable: boolean = false) => { + const node = ts.factory.createTypeReferenceNode("Array", [createTypeUnionNode(types)]); + if (!isNullable) { + return node; + } + return ts.factory.createUnionTypeNode([node, ts.factory.createTypeReferenceNode("null")]); +}; diff --git a/tools/openapi-ts/compiler/types.ts b/tools/openapi-ts/compiler/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..3f0dd3402d3c0deef897fdc32be9462a037cb0ec --- /dev/null +++ b/tools/openapi-ts/compiler/types.ts @@ -0,0 +1,165 @@ +import ts from "typescript"; + +import { addLeadingComment, type Comments, isType, ots } from "./utils"; + +/** + * Convert an unknown value to an expression. + * @param value - the unknown value. + * @param unescape - if string should be unescaped. + * @param shorthand - if shorthand syntax is allowed. + * @param indentifier - list of keys that are treated as indentifiers. + * @returns ts.Expression + */ +export const toExpression = <T = unknown>({ + value, + unescape = false, + shorthand = false, + identifiers = [], +}: { + value: T; + unescape?: boolean; + shorthand?: boolean; + identifiers?: string[]; +}): ts.Expression | undefined => { + if (value === null) { + return ts.factory.createNull(); + } + + if (Array.isArray(value)) { + return createArrayType({ arr: value }); + } + + if (typeof value === "object") { + return createObjectType({ identifiers, obj: value, shorthand }); + } + + if (typeof value === "number") { + return ots.number(value); + } + + if (typeof value === "boolean") { + return ots.boolean(value); + } + + if (typeof value === "string") { + return ots.string(value, unescape); + } + throw new Error(); +}; + +/** + * Create Array type expression. + * @param arr - The array to create. + * @param multiLine - if the array should be multiline. + * @returns ts.ArrayLiteralExpression + */ +export const createArrayType = <T>({ + arr, + multiLine = false, +}: { + arr: T[]; + multiLine?: boolean; +}): ts.ArrayLiteralExpression => + ts.factory.createArrayLiteralExpression( + arr.map((value) => toExpression({ value })).filter(isType<ts.Expression>), + // Multiline if the array contains objects, or if specified by the user. + (!Array.isArray(arr[0]) && typeof arr[0] === "object") || multiLine, + ); + +/** + * Create Object type expression. + * @param comments - comments to add to each property. + * @param identifier - keys that should be treated as identifiers. + * @param multiLine - if the object should be multiline. + * @param obj - the object to create expression with. + * @param shorthand - if shorthand syntax should be used. + * @param unescape - if properties strings should be unescaped. + * @returns ts.ObjectLiteralExpression + */ +export const createObjectType = <T extends object>({ + comments = {}, + identifiers = [], + multiLine = true, + obj, + shorthand = false, + unescape = false, +}: { + obj: T; + comments?: Record<string | number, Comments>; + identifiers?: string[]; + multiLine?: boolean; + shorthand?: boolean; + unescape?: boolean; +}): ts.ObjectLiteralExpression => { + const properties = Object.entries(obj) + .map(([key, value]) => { + // Pass all object properties as identifiers if the whole object is a indentifier + let initializer: ts.Expression | undefined = toExpression({ + identifiers: identifiers.includes(key) ? Object.keys(value) : [], + shorthand, + unescape, + value, + }); + if (!initializer) { + return undefined; + } + // Create a identifier if the current key is one and it is not an object + if (identifiers.includes(key) && !ts.isObjectLiteralExpression(initializer)) { + initializer = ts.factory.createIdentifier(value as string); + } + // Check key value equality before possibly modifying it + const hasShorthandSupport = key === value; + if (key.match(/\W/g) && !key.startsWith("'") && !key.endsWith("'")) { + key = `'${key}'`; + } + const assignment = + shorthand && hasShorthandSupport + ? ts.factory.createShorthandPropertyAssignment(value) + : ts.factory.createPropertyAssignment(key, initializer); + const c = comments?.[key]; + if (c?.length) { + addLeadingComment(assignment, c); + } + return assignment; + }) + .filter(isType<ts.ShorthandPropertyAssignment | ts.PropertyAssignment>); + return ts.factory.createObjectLiteralExpression(properties as any[], multiLine); +}; + +/** + * Create enum declaration. Example `export enum T = { X, Y };` + * @param name - the name of the enum. + * @param obj - the object representing the enum. + * @param leadingComment - leading comment to add to enum. + * @param comments - comments to add to each property of enum. + * @returns + */ +export const createEnumDeclaration = <T extends object>({ + name, + obj, + leadingComment = [], + comments = {}, +}: { + name: string; + obj: T; + leadingComment: Comments; + comments: Record<string | number, Comments>; +}): ts.EnumDeclaration => { + const declaration = ts.factory.createEnumDeclaration( + [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], + ts.factory.createIdentifier(name), + Object.entries(obj).map(([key, value]) => { + const initializer = toExpression({ unescape: true, value }); + const assignment = ts.factory.createEnumMember(key, initializer); + const c = comments?.[key]; + if (c) { + addLeadingComment(assignment, c); + } + return assignment; + }), + ); + if (leadingComment.length) { + addLeadingComment(declaration, leadingComment); + } + return declaration; +}; diff --git a/tools/openapi-ts/compiler/utils.ts b/tools/openapi-ts/compiler/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff77a2ccc3e88aa1057a9b0d4093b3817e969084 --- /dev/null +++ b/tools/openapi-ts/compiler/utils.ts @@ -0,0 +1,131 @@ +import ts from "typescript"; + +import { getConfig } from "../utils/config"; +import { unescapeName } from "../utils/escape"; + +export const CONFIG = { + newLine: ts.NewLineKind.LineFeed, + scriptKind: ts.ScriptKind.TS, + scriptTarget: ts.ScriptTarget.ES2015, + useSingleQuotes: true, +}; + +const printer = ts.createPrinter({ newLine: CONFIG.newLine }); + +export const createSourceFile = (sourceText: string) => + ts.createSourceFile("", sourceText, CONFIG.scriptTarget, undefined, CONFIG.scriptKind); + +const blankSourceFile = createSourceFile(""); + +/** + * Print a typescript node to a string. + * @param node - the node to print. + * @returns string + */ +export function tsNodeToString(node: ts.Node): string { + const result = printer.printNode(ts.EmitHint.Unspecified, node, blankSourceFile); + try { + return decodeURIComponent(result); + } catch { + if (getConfig().debug) { + console.warn("Could not decode value:", result); + } + return result; + } +} + +/** + * Convert a string to a TypeScript Node + * @param s - the string to convert. + * @returns ts.Node + */ +export function stringToTsNodes(s: string): ts.Node { + const file = createSourceFile(s); + return file.statements[0]; +} + +// ots for openapi-ts is helpers to reduce repetition of basic ts factory functions. +export const ots = { + // Create a boolean expression based on value. + boolean: (value: boolean) => (value ? ts.factory.createTrue() : ts.factory.createFalse()), + export: (name: string, isTypeOnly?: boolean, alias?: string) => { + const n = ts.factory.createIdentifier(encodeURIComponent(name)); + return ts.factory.createExportSpecifier( + isTypeOnly ?? false, + alias ? n : undefined, + alias ? ts.factory.createIdentifier(encodeURIComponent(alias)) : n, + ); + }, + import: (name: string, isTypeOnly?: boolean, alias?: string) => { + const n = ts.factory.createIdentifier(encodeURIComponent(name)); + return ts.factory.createImportSpecifier( + isTypeOnly ?? false, + alias ? n : undefined, + alias ? ts.factory.createIdentifier(encodeURIComponent(alias)) : n, + ); + }, + // Create a numeric expression, handling negative numbers. + number: (value: number) => { + if (value < 0) { + return ts.factory.createPrefixUnaryExpression( + ts.SyntaxKind.MinusToken, + ts.factory.createNumericLiteral(Math.abs(value)), + ); + } + return ts.factory.createNumericLiteral(value); + }, + // Create a string literal. This handles strings that start with '`' or "'". + string: (value: string, unescape = false) => { + if (unescape) { + value = unescapeName(value); + } + const hasBothQuotes = value.includes("'") && value.includes('"'); + const hasNewlines = value.includes("\n"); + const hasUnescapedBackticks = value.startsWith("`"); + const isBacktickEscaped = value.startsWith("\\`") && value.endsWith("\\`"); + if ((hasNewlines || hasBothQuotes || hasUnescapedBackticks) && !isBacktickEscaped) { + value = `\`${value.replace(/(?<!\\)`/g, "\\`").replace(/\${/g, "\\${")}\``; + } + const text = encodeURIComponent(value); + if (value.startsWith("`")) { + return ts.factory.createIdentifier(text); + } + return ts.factory.createStringLiteral(text, value.includes("'") ? false : CONFIG.useSingleQuotes); + }, +}; + +export const isType = <T>(value: T | undefined): value is T => value !== undefined; + +export type Comments = Array<string | null | false | undefined>; + +export const addLeadingComment = ( + node: ts.Node | undefined, + text: Comments, + hasTrailingNewLine: boolean = true, + useJSDocStyle = true, +): string => { + const comments = text.filter(Boolean); + + if (!comments.length) { + return ""; + } + + // if node is falsy, assume string mode + if (!node) { + if (useJSDocStyle) { + const result = ["/**", ...comments.map((row) => ` * ${row}`), " */"].join("\n"); + return hasTrailingNewLine ? `${result}\n` : result; + } + + const result = comments.map((row) => `// ${row}`).join("\n"); + return hasTrailingNewLine ? `${result}\n` : result; + } + + ts.addSyntheticLeadingComment( + node, + ts.SyntaxKind.MultiLineCommentTrivia, + encodeURIComponent(["*", ...comments.map((row) => ` * ${row}`), " "].join("\n")), + hasTrailingNewLine, + ); + return ""; +}; diff --git a/tools/openapi-ts/generate.ts b/tools/openapi-ts/generate.ts new file mode 100644 index 0000000000000000000000000000000000000000..224fec6b3d143d9288ab45b672b40b9bace07ded --- /dev/null +++ b/tools/openapi-ts/generate.ts @@ -0,0 +1,39 @@ +import { initConfig } from "./index"; +import { sync } from "cross-spawn"; +import { getOpenApiSpec } from "./utils/getOpenApiSpec"; +import { postProcessClient } from "./utils/postprocess"; +import { parse } from "./openApi"; +import { writeClient } from "./utils/write/client"; +import { UserConfig } from "./types/config"; + +const userConfig: UserConfig = { + input: "http://127.0.0.1:8081/openapi.json", + output: "src/plugins/api/spec/", + client: "axios", + enums: "typescript", + services: { + export: true, + response: "response", + }, + schemas: true, + useOptions: true, + exportCore: true, + // request: "src/plugins/api/request.ts", + // request: "@/plugins/api/request" +}; + +const config = await initConfig(userConfig); + +const openApi = + typeof config.input === "string" + ? await getOpenApiSpec(config.input) + : (config.input as unknown as Awaited<ReturnType<typeof getOpenApiSpec>>); + +const client = postProcessClient(parse(openApi)); + +await writeClient(openApi, client); + +console.log("✨ Done! Your client is located in:", config.output); + +console.log("✨ Running Prettier"); +sync("prettier", ["--ignore-unknown", config.output, "--write"]); diff --git a/tools/openapi-ts/index.ts b/tools/openapi-ts/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..abcd454829d311eacabad56d47e898183a891ff3 --- /dev/null +++ b/tools/openapi-ts/index.ts @@ -0,0 +1,131 @@ +import path from "node:path"; + +import { loadConfig } from "c12"; + +import type { Config, UserConfig } from "./types/config"; +import { setConfig } from "./utils/config"; + +const getSchemas = (userConfig: UserConfig): Config["schemas"] => { + let schemas: Config["schemas"] = { + export: true, + type: "json", + }; + if (typeof userConfig.schemas === "boolean") { + schemas.export = userConfig.schemas; + } else { + schemas = { + ...schemas, + ...userConfig.schemas, + }; + } + return schemas; +}; + +const getServices = (userConfig: UserConfig): Config["services"] => { + let services: Config["services"] = { + export: true, + name: "{{name}}Service", + operationId: true, + response: "body", + }; + if (typeof userConfig.services === "boolean") { + services.export = userConfig.services; + } else if (typeof userConfig.services === "string") { + services.include = userConfig.services; + } else { + services = { + ...services, + ...userConfig.services, + }; + } + return services; +}; + +const getTypes = (userConfig: UserConfig): Config["types"] => { + let types: Config["types"] = { + dates: false, + export: true, + name: "preserve", + }; + if (typeof userConfig.types === "boolean") { + types.export = userConfig.types; + } else if (typeof userConfig.types === "string") { + types.include = userConfig.types; + } else { + types = { + ...types, + ...userConfig.types, + }; + } + return types; +}; + +export const initConfig = async (userConfig: UserConfig) => { + const { config: userConfigFromFile } = await loadConfig<UserConfig>({ + jitiOptions: { + esmResolve: true, + }, + name: "openapi-ts", + overrides: userConfig, + }); + + if (userConfigFromFile) { + userConfig = { ...userConfigFromFile, ...userConfig }; + } + + const { + base, + debug = false, + dryRun = false, + enums = false, + exportCore = true, + format = true, + input, + lint = false, + name, + request, + useOptions = true, + } = userConfig; + + if (debug) { + console.warn("userConfig:", userConfig); + } + + if (!input) { + throw new Error("🚫 input not provided - provide path to OpenAPI specification"); + } + + if (!userConfig.output) { + throw new Error("🚫 output not provided - provide path where we should generate your client"); + } + + if (!useOptions) { + console.warn( + "âš ï¸ Deprecation warning: useOptions set to false. This setting will be removed in future versions. Please migrate useOptions to true https://heyapi.vercel.app/openapi-ts/migrating.html#v0-27-38", + ); + } + + const output = path.resolve(process.cwd(), userConfig.output); + const schemas = getSchemas(userConfig); + const services = getServices(userConfig); + const types = getTypes(userConfig); + + return setConfig({ + base, + client: "axios", + debug, + dryRun, + enums, + exportCore, + format, + input, + lint, + name, + output, + request, + schemas, + services, + types, + useOptions, + }); +}; diff --git a/tools/openapi-ts/openApi/common/interfaces/Dictionary.ts b/tools/openapi-ts/openApi/common/interfaces/Dictionary.ts new file mode 100644 index 0000000000000000000000000000000000000000..829f225db044da75e8b1b963b6330d898278c5f0 --- /dev/null +++ b/tools/openapi-ts/openApi/common/interfaces/Dictionary.ts @@ -0,0 +1,3 @@ +export interface Dictionary<T = unknown> { + [key: string]: T; +} diff --git a/tools/openapi-ts/openApi/common/interfaces/OpenApi.ts b/tools/openapi-ts/openApi/common/interfaces/OpenApi.ts new file mode 100644 index 0000000000000000000000000000000000000000..1f8967c91ef9c6a0939233f926c7929c3c9feff1 --- /dev/null +++ b/tools/openapi-ts/openApi/common/interfaces/OpenApi.ts @@ -0,0 +1,4 @@ +import type { OpenApi as OpenApiV2 } from "../../v2/interfaces/OpenApi"; +import type { OpenApi as OpenApiV3 } from "../../v3/interfaces/OpenApi"; + +export type OpenApi = OpenApiV2 | OpenApiV3; diff --git a/tools/openapi-ts/openApi/common/interfaces/Type.ts b/tools/openapi-ts/openApi/common/interfaces/Type.ts new file mode 100644 index 0000000000000000000000000000000000000000..1feeb5dd6d9235a1692060b45da7cd112e92d4af --- /dev/null +++ b/tools/openapi-ts/openApi/common/interfaces/Type.ts @@ -0,0 +1,8 @@ +export interface Type { + $refs: string[]; + base: string; + imports: string[]; + isNullable: boolean; + template: string | null; + type: string; +} diff --git a/tools/openapi-ts/openApi/common/interfaces/WithEnumExtension.ts b/tools/openapi-ts/openApi/common/interfaces/WithEnumExtension.ts new file mode 100644 index 0000000000000000000000000000000000000000..367fb59e041a8ba01680cc1851042e09ad5d3c2b --- /dev/null +++ b/tools/openapi-ts/openApi/common/interfaces/WithEnumExtension.ts @@ -0,0 +1,6 @@ +export interface WithEnumExtension { + // NSwag uses x-enumNames for custom enum names + "x-enumNames"?: ReadonlyArray<string>; + "x-enum-descriptions"?: ReadonlyArray<string>; + "x-enum-varnames"?: ReadonlyArray<string>; +} diff --git a/tools/openapi-ts/openApi/common/interfaces/client.ts b/tools/openapi-ts/openApi/common/interfaces/client.ts new file mode 100644 index 0000000000000000000000000000000000000000..66fa4ebff3b08c45339bb19ff274603cb41be8d2 --- /dev/null +++ b/tools/openapi-ts/openApi/common/interfaces/client.ts @@ -0,0 +1,119 @@ +export interface ModelComposition extends Pick<Model, "$refs" | "enums" | "imports" | "properties"> { + export: Extract<Model["export"], "all-of" | "any-of" | "one-of">; +} + +export interface Enum { + customDescription?: string; + customName?: string; + description?: string; + value: string | number; +} + +export interface OperationParameter extends Model { + in: "path" | "query" | "header" | "formData" | "body" | "cookie"; + prop: string; + mediaType: string | null; +} + +export interface OperationParameters extends Pick<Model, "$refs" | "imports"> { + parameters: OperationParameter[]; + parametersBody: OperationParameter | null; + parametersCookie: OperationParameter[]; + parametersForm: OperationParameter[]; + parametersHeader: OperationParameter[]; + parametersPath: OperationParameter[]; + parametersQuery: OperationParameter[]; +} + +export interface OperationResponse extends Model { + in: "response" | "header"; + code: number; +} + +export interface Operation extends OperationParameters { + deprecated: boolean; + description: string | null; + errors: OperationResponse[]; + method: "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT"; + /** + * Method name. Methods contain the request logic. + */ + name: string; + path: string; + responseHeader: string | null; + results: OperationResponse[]; + /** + * Service name, might be without postfix. This will be used to name the + * exported class. + */ + service: string; + summary: string | null; +} + +export interface Schema { + default?: unknown; + exclusiveMaximum?: boolean; + exclusiveMinimum?: boolean; + format?: + | "binary" + | "boolean" + | "byte" + | "date-time" + | "date" + | "double" + | "float" + | "int32" + | "int64" + | "password" + | "string"; + isDefinition: boolean; + isNullable: boolean; + isReadOnly: boolean; + isRequired: boolean; + maximum?: number; + maxItems?: number; + maxLength?: number; + maxProperties?: number; + minimum?: number; + minItems?: number; + minLength?: number; + minProperties?: number; + multipleOf?: number; + pattern?: string; + uniqueItems?: boolean; +} + +export interface Model extends Schema { + /** + * **Experimental.** Contains list of original refs so they can be used + * to access the schema from anywhere instead of relying on string name. + * This allows us to do things like detect type of ref. + */ + $refs: string[]; + base: string; + deprecated?: boolean; + description: string | null; + enum: Enum[]; + enums: Model[]; + export: + | "all-of" + | "any-of" + | "array" + | "const" + | "dictionary" + | "enum" + | "generic" + | "interface" + | "one-of" + | "reference"; + imports: string[]; + link: Model | null; + name: string; + properties: Model[]; + template: string | null; + type: string; +} + +export interface Service extends Pick<Model, "$refs" | "imports" | "name"> { + operations: Operation[]; +} diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/getPattern.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/getPattern.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..9b5b55d8781c6bd9b469eba8a41de1f30fb401a2 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/getPattern.spec.ts @@ -0,0 +1,22 @@ +import { describe, expect, it } from "vitest"; + +import { getPattern } from "../getPattern"; + +describe("getPattern", () => { + it.each([ + { expected: undefined, pattern: undefined }, + { expected: "", pattern: "" }, + { expected: "^[a-zA-Z]", pattern: "^[a-zA-Z]" }, + { expected: "^\\\\w+$", pattern: "^\\w+$" }, + { + expected: "^\\\\d{3}-\\\\d{2}-\\\\d{4}$", + pattern: "^\\d{3}-\\d{2}-\\d{4}$", + }, + { expected: "\\\\", pattern: "\\" }, + { expected: "\\\\/", pattern: "\\/" }, + { expected: "\\\\/\\\\/", pattern: "\\/\\/" }, + { expected: "\\'", pattern: "'" }, + ])("getPattern($pattern) -> $expected", ({ pattern, expected }) => { + expect(getPattern(pattern)).toEqual(expected); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/getRef.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/getRef.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..c92b8a38d29cdd373b7ef912a003b5c2b96d2735 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/getRef.spec.ts @@ -0,0 +1,95 @@ +import { describe, expect, it } from "vitest"; + +import { getRef } from "../getRef"; + +describe("getRef (v2)", () => { + it("should produce correct result", () => { + expect( + getRef( + { + basePath: "/api", + definitions: { + Example: { + description: "This is an Example model ", + type: "integer", + }, + }, + host: "localhost:8080", + info: { + title: "dummy", + version: "1.0", + }, + paths: {}, + schemes: ["http", "https"], + swagger: "2.0", + }, + { + $ref: "#/definitions/Example", + }, + ), + ).toEqual({ + description: "This is an Example model ", + type: "integer", + }); + }); +}); + +describe("getRef (v3)", () => { + it("should produce correct result", () => { + expect( + getRef( + { + components: { + schemas: { + Example: { + description: "This is an Example model ", + type: "integer", + }, + }, + }, + info: { + title: "dummy", + version: "1.0", + }, + openapi: "3.0", + paths: {}, + servers: [ + { + url: "https://localhost:8080/api", + }, + ], + }, + { + $ref: "#/components/schemas/Example", + }, + ), + ).toEqual({ + description: "This is an Example model ", + type: "integer", + }); + }); + + it("should produce correct result for encoded ref path", () => { + expect( + getRef( + { + info: { + title: "dummy", + version: "1.0", + }, + openapi: "3.0", + paths: { + "/api/user/{id}": { + description: "This is an Example path", + }, + }, + }, + { + $ref: "#/paths/~1api~1user~1%7Bid%7D", + }, + ), + ).toEqual({ + description: "This is an Example path", + }); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/operation.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/operation.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..fddfd53ba5c2fbc80895f898e92db1203c22a05d --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/operation.spec.ts @@ -0,0 +1,258 @@ +import { describe, expect, it } from "vitest"; + +import { setConfig } from "../../../../utils/config"; +import { getOperationName, getOperationParameterName, getOperationResponseCode } from "../operation"; + +describe("getOperationName", () => { + const options1: Parameters<typeof setConfig>[0] = { + client: "fetch", + debug: false, + dryRun: true, + enums: false, + exportCore: false, + format: false, + input: "", + lint: false, + output: "", + schemas: { + export: false, + }, + services: { + export: false, + operationId: true, + response: "body", + }, + types: { + export: false, + }, + useOptions: false, + }; + + const options2: Parameters<typeof setConfig>[0] = { + client: "fetch", + debug: false, + dryRun: true, + enums: false, + exportCore: false, + format: false, + input: "", + lint: false, + output: "", + schemas: { + export: false, + }, + services: { + export: false, + operationId: false, + response: "body", + }, + types: { + export: false, + }, + useOptions: false, + }; + + it.each([ + { + expected: "getAllUsers", + method: "GET", + operationId: "GetAllUsers", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "getApiUsers", + method: "GET", + operationId: undefined, + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "postApiUsers", + method: "POST", + operationId: undefined, + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "getAllUsers", + method: "GET", + operationId: "GetAllUsers", + options: options1, + url: "/api/v1/users", + }, + { + expected: "getApiV1Users", + method: "GET", + operationId: undefined, + options: options1, + url: "/api/v1/users", + }, + { + expected: "postApiV1Users", + method: "POST", + operationId: undefined, + options: options1, + url: "/api/v1/users", + }, + { + expected: "getApiV1UsersById", + method: "GET", + operationId: undefined, + options: options1, + url: "/api/v1/users/{id}", + }, + { + expected: "postApiV1UsersById", + method: "POST", + operationId: undefined, + options: options1, + url: "/api/v1/users/{id}", + }, + { + expected: "fooBar", + method: "GET", + operationId: "fooBar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "FooBar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "Foo Bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "foo bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "foo-bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "foo_bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "foo.bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "@foo.bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "$foo.bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "_foo.bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "-foo.bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "fooBar", + method: "GET", + operationId: "123.foo.bar", + options: options1, + url: "/api/v{api-version}/users", + }, + { + expected: "getApiV1Users", + method: "GET", + operationId: "GetAllUsers", + options: options2, + url: "/api/v1/users", + }, + { + expected: "getApiUsers", + method: "GET", + operationId: "fooBar", + options: options2, + url: "/api/v{api-version}/users", + }, + { + expected: "getApiUsersByUserIdLocationByLocationId", + method: "GET", + operationId: "fooBar", + options: options2, + url: "/api/v{api-version}/users/{userId}/location/{locationId}", + }, + ])( + "getOperationName($url, $method, { operationId: $useOperationId }, $operationId) -> $expected", + ({ url, method, options, operationId, expected }) => { + setConfig(options); + expect(getOperationName(url, method, operationId)).toBe(expected); + }, + ); +}); + +describe("getOperationParameterName", () => { + it.each([ + { expected: "", input: "" }, + { expected: "foobar", input: "foobar" }, + { expected: "fooBar", input: "fooBar" }, + { expected: "fooBar", input: "foo_bar" }, + { expected: "fooBar", input: "foo-bar" }, + { expected: "fooBar", input: "foo.bar" }, + { expected: "fooBar", input: "@foo.bar" }, + { expected: "fooBar", input: "$foo.bar" }, + { expected: "fooBar", input: "123.foo.bar" }, + { expected: "fooBar", input: "Foo-Bar" }, + { expected: "fooBar", input: "FOO-BAR" }, + { expected: "fooBar", input: "foo[bar]" }, + { expected: "fooBarArray", input: "foo.bar[]" }, + ])("getOperationParameterName($input) -> $expected", ({ input, expected }) => { + expect(getOperationParameterName(input)).toBe(expected); + }); +}); + +describe("getOperationResponseCode", () => { + it.each([ + { expected: null, input: "" }, + { expected: 200, input: "default" }, + { expected: 200, input: "200" }, + { expected: 300, input: "300" }, + { expected: 400, input: "400" }, + { expected: null, input: "abc" }, + { expected: 100, input: "-100" }, + ])("getOperationResponseCode($input) -> $expected", ({ input, expected }) => { + expect(getOperationResponseCode(input)).toBe(expected); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/sanitize.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/sanitize.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..73ef65d9b8899e3a5a99727b71ddc5a539edced6 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/sanitize.spec.ts @@ -0,0 +1,42 @@ +import { describe, expect, it } from "vitest"; + +import { + ensureValidTypeScriptJavaScriptIdentifier, + sanitizeNamespaceIdentifier, + sanitizeOperationParameterName, +} from "../sanitize"; + +describe("sanitizeOperationParameterName", () => { + it.each([ + { expected: "abc", input: "abc" }, + { expected: "æbc", input: "æbc" }, + { expected: "æb-c", input: "æb.c" }, + { expected: "æb-c", input: "1æb.c" }, + { expected: "unknownArray", input: "unknown[]" }, + ])("sanitizeOperationParameterName($input) -> $expected", ({ input, expected }) => { + expect(sanitizeOperationParameterName(input)).toEqual(expected); + }); +}); + +describe("sanitizeNamespaceIdentifier", () => { + it.each([ + { expected: "abc", input: "abc" }, + { expected: "æbc", input: "æbc" }, + { expected: "æb-c", input: "æb.c" }, + { expected: "æb-c", input: "1æb.c" }, + { expected: "a-b-c--d--e", input: "a/b{c}/d/$e" }, + ])("sanitizeNamespaceIdentifier($input) -> $expected", ({ input, expected }) => { + expect(sanitizeNamespaceIdentifier(input)).toEqual(expected); + }); +}); + +describe("ensureValidTypeScriptJavaScriptIdentifier", () => { + it.each([ + { expected: "abc", input: "abc" }, + { expected: "æbc", input: "æbc" }, + { expected: "æb_c", input: "æb.c" }, + { expected: "æb_c", input: "1æb.c" }, + ])("ensureValidTypeScriptJavaScriptIdentifier($input) -> $expected", ({ input, expected }) => { + expect(ensureValidTypeScriptJavaScriptIdentifier(input)).toEqual(expected); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/service.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/service.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb4155636fcc9d019a121e0fcf2bf4ba3cf7d6b7 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/service.spec.ts @@ -0,0 +1,31 @@ +import { describe, expect, it } from "vitest"; + +import { getServiceName, getServiceVersion } from "../service"; + +describe("getServiceVersion", () => { + it.each([ + { expected: "1.0", input: "1.0" }, + { expected: "1.2", input: "v1.2" }, + { expected: "2.4", input: "V2.4" }, + ])("should get $expected when version is $input", ({ input, expected }) => { + expect(getServiceVersion(input)).toEqual(expected); + }); +}); + +describe("getServiceName", () => { + it.each([ + { expected: "", input: "" }, + { expected: "FooBar", input: "FooBar" }, + { expected: "FooBar", input: "Foo Bar" }, + { expected: "FooBar", input: "foo bar" }, + { expected: "FooBar", input: "@fooBar" }, + { expected: "FooBar", input: "$fooBar" }, + { expected: "FooBar", input: "123fooBar" }, + { + expected: "NonAsciiÆøåÆøÅöôêÊå—符串", + input: "non-ascii-æøåÆØÅöôêÊå—符串", + }, + ])("getServiceName($input) -> $expected", ({ input, expected }) => { + expect(getServiceName(input)).toEqual(expected); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/sort.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/sort.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1a5cfc0c5a5470f5dbaff53199d5e44782b8454 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/sort.spec.ts @@ -0,0 +1,34 @@ +import { describe, expect, it } from "vitest"; + +import { toSortedByRequired } from "../sort"; + +describe("sort", () => { + it.each([ + { + expected: [ + { id: "test2", isRequired: true }, + { id: "test3", isRequired: true }, + { id: "test", isRequired: false }, + ], + input: [ + { id: "test", isRequired: false }, + { id: "test2", isRequired: true }, + { id: "test3", isRequired: true }, + ], + }, + { + expected: [ + { id: "test", isRequired: false }, + { id: "test2", isRequired: false }, + { default: "something", id: "test3", isRequired: true }, + ], + input: [ + { id: "test", isRequired: false }, + { id: "test2", isRequired: false }, + { default: "something", id: "test3", isRequired: true }, + ], + }, + ])("should sort $input by required to produce $expected", ({ input, expected }) => { + expect(toSortedByRequired(input)).toEqual(expected); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/stripNamespace.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/stripNamespace.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..c96cdd30dc55cf99ae47cce58742de88c6cb75f5 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/stripNamespace.spec.ts @@ -0,0 +1,23 @@ +import { describe, expect, it } from "vitest"; + +import { stripNamespace } from "../stripNamespace"; + +describe("stripNamespace", () => { + it.each([ + { expected: "Item", input: "#/definitions/Item" }, + { expected: "Item", input: "#/parameters/Item" }, + { expected: "Item", input: "#/responses/Item" }, + { expected: "Item", input: "#/securityDefinitions/Item" }, + { expected: "Item", input: "#/components/schemas/Item" }, + { expected: "Item", input: "#/components/responses/Item" }, + { expected: "Item", input: "#/components/parameters/Item" }, + { expected: "Item", input: "#/components/examples/Item" }, + { expected: "Item", input: "#/components/requestBodies/Item" }, + { expected: "Item", input: "#/components/headers/Item" }, + { expected: "Item", input: "#/components/securitySchemes/Item" }, + { expected: "Item", input: "#/components/links/Item" }, + { expected: "Item", input: "#/components/callbacks/Item" }, + ])("stripNamespace($input) -> $expected", ({ input, expected }) => { + expect(stripNamespace(input)).toEqual(expected); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/__tests__/type.spec.ts b/tools/openapi-ts/openApi/common/parser/__tests__/type.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..5c86efe0cb75a9feb983ebc1d0be8c26010422e1 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/__tests__/type.spec.ts @@ -0,0 +1,132 @@ +import { describe, expect, it } from "vitest"; + +import { getMappedType, getType } from "../type"; + +describe("getMappedType", () => { + it.each([ + { expected: undefined, type: "" }, + { expected: "unknown", type: "any" }, + { expected: "unknown[]", type: "array" }, + { expected: "boolean", type: "boolean" }, + { expected: "number", type: "byte" }, + { expected: "string", type: "char" }, + { expected: "string", type: "date-time" }, + { expected: "string", type: "date" }, + { expected: "number", type: "double" }, + { expected: "binary", type: "file" }, + { expected: "number", type: "float" }, + { expected: "number", type: "int" }, + { expected: "number", type: "integer" }, + { expected: "number", type: "long" }, + { expected: "null", type: "null" }, + { expected: "number", type: "number" }, + { expected: "unknown", type: "object" }, + { expected: "string", type: "password" }, + { expected: "number", type: "short" }, + { expected: "string", type: "string" }, + { expected: "void", type: "void" }, + ])("should map type $type to $expected", ({ type, expected }) => { + expect(getMappedType(type)).toEqual(expected); + }); +}); + +describe("getType", () => { + it("should convert int", () => { + const type = getType("int"); + expect(type.type).toEqual("number"); + expect(type.base).toEqual("number"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual([]); + expect(type.isNullable).toEqual(false); + }); + + it("should convert string", () => { + const type = getType("string"); + expect(type.type).toEqual("string"); + expect(type.base).toEqual("string"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual([]); + expect(type.isNullable).toEqual(false); + }); + + it("should convert string array", () => { + const type = getType("array[string]"); + expect(type.type).toEqual("string[]"); + expect(type.base).toEqual("string"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual([]); + expect(type.isNullable).toEqual(false); + }); + + it("should convert template with primary", () => { + const type = getType("#/components/schemas/Link[string]"); + expect(type.type).toEqual("Link<string>"); + expect(type.base).toEqual("Link"); + expect(type.template).toEqual("string"); + expect(type.imports).toEqual(["Link"]); + expect(type.isNullable).toEqual(false); + }); + + it("should convert template with model", () => { + const type = getType("#/components/schemas/Link[Model]"); + expect(type.type).toEqual("Link<Model>"); + expect(type.base).toEqual("Link"); + expect(type.template).toEqual("Model"); + expect(type.imports).toEqual(["Link", "Model"]); + expect(type.isNullable).toEqual(false); + }); + + it("should have double imports", () => { + const type = getType("#/components/schemas/Link[Link]"); + expect(type.type).toEqual("Link<Link>"); + expect(type.base).toEqual("Link"); + expect(type.template).toEqual("Link"); + expect(type.imports).toEqual(["Link", "Link"]); + expect(type.isNullable).toEqual(false); + }); + + it("should support dot", () => { + const type = getType("#/components/schemas/model.000"); + expect(type.type).toEqual("model_000"); + expect(type.base).toEqual("model_000"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual(["model_000"]); + expect(type.isNullable).toEqual(false); + }); + + it("should support dashes", () => { + const type = getType("#/components/schemas/some_special-schema"); + expect(type.type).toEqual("some_special_schema"); + expect(type.base).toEqual("some_special_schema"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual(["some_special_schema"]); + expect(type.isNullable).toEqual(false); + }); + + it("should support dollar sign", () => { + const type = getType("#/components/schemas/$some+special+schema"); + expect(type.type).toEqual("$some_special_schema"); + expect(type.base).toEqual("$some_special_schema"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual(["$some_special_schema"]); + expect(type.isNullable).toEqual(false); + }); + + it("should support multiple base types", () => { + const type = getType(["string", "int"]); + expect(type.type).toEqual("string | number"); + expect(type.base).toEqual("string | number"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual([]); + expect(type.isNullable).toEqual(false); + }); + + it("should support multiple nullable types", () => { + const type = getType(["string", "null"]); + expect(type.type).toEqual("string"); + expect(type.base).toEqual("string"); + expect(type.template).toEqual(null); + expect(type.imports).toEqual([]); + expect(type.isNullable).toEqual(true); + }); +}); diff --git a/tools/openapi-ts/openApi/common/parser/getDefault.ts b/tools/openapi-ts/openApi/common/parser/getDefault.ts new file mode 100644 index 0000000000000000000000000000000000000000..8897e05635097535bc668a604ce902e4ff1116cf --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/getDefault.ts @@ -0,0 +1,33 @@ +import type { Model } from "../../common/interfaces/client"; +import type { OpenApiParameter } from "../../v2/interfaces/OpenApiParameter"; +import type { OpenApiSchema } from "../../v3/interfaces/OpenApiSchema"; +import type { OperationParameter } from "../interfaces/client"; + +export const getDefault = ( + definition: OpenApiSchema | OpenApiParameter, + model?: Model | OperationParameter, +): unknown | undefined => { + if (definition.default === undefined || definition.default === null) { + return definition.default; + } + + const type = definition.type || typeof definition.default; + + switch (type) { + case "int": + case "integer": + case "number": + if (model?.export === "enum" && model.enum?.[definition.default as number]) { + const { value } = model.enum[definition.default as number]; + return value; + } + return definition.default; + case "string": + return definition.default; + case "array": + case "boolean": + case "object": + return definition.default; + } + return undefined; +}; diff --git a/tools/openapi-ts/openApi/common/parser/getEnums.ts b/tools/openapi-ts/openApi/common/parser/getEnums.ts new file mode 100644 index 0000000000000000000000000000000000000000..5135cad4256c22ef50494a065f6a9f566e324938 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/getEnums.ts @@ -0,0 +1,24 @@ +import { unique } from "../../../utils/unique"; +import type { Enum } from "../interfaces/client"; +import type { WithEnumExtension } from "../interfaces/WithEnumExtension"; + +export const getEnums = (definition: WithEnumExtension, values?: ReadonlyArray<string | number>): Enum[] => { + if (!Array.isArray(values)) { + return []; + } + + const descriptions = (definition["x-enum-descriptions"] ?? []).filter((value) => typeof value === "string"); + const names = (definition["x-enum-varnames"] ?? definition["x-enumNames"] ?? []).filter( + (value) => typeof value === "string", + ); + + return values + .filter(unique) + .filter((value) => typeof value === "number" || typeof value === "string") + .map((value, index) => ({ + customDescription: descriptions[index], + customName: names[index], + description: undefined, + value, + })); +}; diff --git a/tools/openapi-ts/openApi/common/parser/getPattern.ts b/tools/openapi-ts/openApi/common/parser/getPattern.ts new file mode 100644 index 0000000000000000000000000000000000000000..f97915bce260914d75cfea9e27c04dbbe90a7936 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/getPattern.ts @@ -0,0 +1,12 @@ +/** + * The spec generates a pattern like this '^\d{3}-\d{2}-\d{4}$' + * However, to use it in HTML or inside new RegExp() we need to + * escape the pattern to become: '^\\d{3}-\\d{2}-\\d{4}$' in order + * to make it a valid regexp string. + * + * Also, escape single quote characters, because the output uses single quotes for strings + * + * @param pattern + */ +export const getPattern = (pattern?: string): string | undefined => + pattern?.replace(/\\/g, "\\\\").replace(/'/g, "\\'"); diff --git a/tools/openapi-ts/openApi/common/parser/getRef.ts b/tools/openapi-ts/openApi/common/parser/getRef.ts new file mode 100644 index 0000000000000000000000000000000000000000..9614826ac14dbf3d738089a3fffd279af45c6ba7 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/getRef.ts @@ -0,0 +1,32 @@ +import type { OpenApiReference as OpenApiReferenceV2 } from "../../v2/interfaces/OpenApiReference"; +import type { OpenApiReference as OpenApiReferenceV3 } from "../../v3/interfaces/OpenApiReference"; +import { OpenApi } from "../interfaces/OpenApi"; + +const ESCAPED_REF_SLASH = /~1/g; +const ESCAPED_REF_TILDE = /~0/g; + +export function getRef<T>(openApi: OpenApi, item: T & (OpenApiReferenceV2 | OpenApiReferenceV3)): T { + if (item.$ref) { + // Fetch the paths to the definitions, this converts: + // "#/components/schemas/Form" to ["components", "schemas", "Form"] + const paths = item.$ref + .replace(/^#/g, "") + .split("/") + .filter((item) => item); + + // Try to find the reference by walking down the path, + // if we cannot find it, then we throw an error. + let result = openApi; + paths.forEach((path) => { + const decodedPath = decodeURIComponent(path.replace(ESCAPED_REF_SLASH, "/").replace(ESCAPED_REF_TILDE, "~")); + if (result.hasOwnProperty(decodedPath)) { + // @ts-ignore + result = result[decodedPath]; + } else { + throw new Error(`Could not find reference: "${item.$ref}"`); + } + }); + return result as T; + } + return item as T; +} diff --git a/tools/openapi-ts/openApi/common/parser/operation.ts b/tools/openapi-ts/openApi/common/parser/operation.ts new file mode 100644 index 0000000000000000000000000000000000000000..2f2f1653c7073a5a26f1be92ca51ac2665db5b0c --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/operation.ts @@ -0,0 +1,63 @@ +import camelCase from "camelcase"; + +import { getConfig } from "../../../utils/config"; +import type { OperationResponse } from "../interfaces/client"; +import { reservedWords } from "./reservedWords"; +import { sanitizeNamespaceIdentifier, sanitizeOperationParameterName } from "./sanitize"; + +/** + * Convert the input value to a correct operation (method) class name. + * This will use the operation ID - if available - and otherwise fallback + * on a generated name from the URL + */ +export const getOperationName = (url: string, method: string, operationId?: string): string => { + const config = getConfig(); + + if (config.services.operationId && operationId) { + return camelCase(sanitizeNamespaceIdentifier(operationId).trim()); + } + + const urlWithoutPlaceholders = url + .replace(/[^/]*?{api-version}.*?\//g, "") + .replace(/{(.*?)}/g, "by-$1") + .replace(/\//g, "-"); + + return camelCase(`${method}-${urlWithoutPlaceholders}`); +}; + +/** + * Replaces any invalid characters from a parameter name. + * For example: 'filter.someProperty' becomes 'filterSomeProperty'. + */ +export const getOperationParameterName = (value: string): string => { + const clean = sanitizeOperationParameterName(value).trim(); + return camelCase(clean).replace(reservedWords, "_$1"); +}; + +export const getOperationResponseHeader = (operationResponses: OperationResponse[]): string | null => { + const header = operationResponses.find((operationResponses) => operationResponses.in === "header"); + if (header) { + return header.name; + } + return null; +}; + +export const getOperationResponseCode = (value: string | "default"): number | null => { + // You can specify a "default" response, this is treated as HTTP code 200 + if (value === "default") { + return 200; + } + + // Check if we can parse the code and return of successful. + if (/[0-9]+/g.test(value)) { + const code = parseInt(value); + if (Number.isInteger(code)) { + return Math.abs(code); + } + } + + return null; +}; + +export const getOperationErrors = (operationResponses: OperationResponse[]): OperationResponse[] => + operationResponses.filter((operationResponse) => operationResponse.code >= 300 && operationResponse.description); diff --git a/tools/openapi-ts/openApi/common/parser/reservedWords.ts b/tools/openapi-ts/openApi/common/parser/reservedWords.ts new file mode 100644 index 0000000000000000000000000000000000000000..6065a7ec01c810d541e805607d8233fdad87820f --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/reservedWords.ts @@ -0,0 +1,2 @@ +// eslint-disable-next-line vue/max-len, prettier/prettier +export const reservedWords = /^(arguments|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|eval|export|extends|false|finally|for|function|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)$/g; diff --git a/tools/openapi-ts/openApi/common/parser/sanitize.ts b/tools/openapi-ts/openApi/common/parser/sanitize.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ab77d20fd81a11a436e4caecf56b8d0d49a0607 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/sanitize.ts @@ -0,0 +1,41 @@ +/** + * Sanitizes names of types, so they are valid TypeScript identifiers of a certain form. + * + * 1: Remove any leading characters that are illegal as starting character of a TypeScript identifier. + * 2: Replace illegal characters in remaining part of type name with underscore (_). + * + * Step 1 should perhaps instead also replace illegal characters with underscore, or prefix with it, like sanitizeEnumName + * does. The way this is now one could perhaps end up removing all characters, if all are illegal start characters. It + * would be sort of a breaking change to do so, though, previously generated code might change then. + * + * JavaScript identifier regexp pattern retrieved from + * https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers + */ +export const ensureValidTypeScriptJavaScriptIdentifier = (name: string) => + name.replace(/^[^$_\p{ID_Start}]+/u, "").replace(/[^$\u200c\u200d\p{ID_Continue}]/gu, "_"); + +/** + * Sanitizes namespace identifiers so they are valid TypeScript identifiers of a certain form. + * + * 1: Remove any leading characters that are illegal as starting character of a typescript identifier. + * 2: Replace illegal characters in remaining part of type name with hyphen (-). + * + * Step 1 should perhaps instead also replace illegal characters with underscore, or prefix with it, like sanitizeEnumName + * does. The way this is now one could perhaps end up removing all characters, if all are illegal start characters. It + * would be sort of a breaking change to do so, though, previously generated code might change then. + * + * JavaScript identifier regexp pattern retrieved from + * https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers + * + * The output of this is expected to be converted to PascalCase + */ +export const sanitizeNamespaceIdentifier = (name: string) => + name + .replace(/^[^\p{ID_Start}]+/u, "") + .replace(/[^$\u200c\u200d\p{ID_Continue}]/gu, "-") + .replace(/\$/g, "-"); + +export const sanitizeOperationParameterName = (name: string) => { + const withoutBrackets = name.replace("[]", "Array"); + return sanitizeNamespaceIdentifier(withoutBrackets); +}; diff --git a/tools/openapi-ts/openApi/common/parser/service.ts b/tools/openapi-ts/openApi/common/parser/service.ts new file mode 100644 index 0000000000000000000000000000000000000000..49dcafb1de693f0c36c70f7d23b3afe0f3d64d63 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/service.ts @@ -0,0 +1,21 @@ +import camelCase from "camelcase"; + +import { sanitizeNamespaceIdentifier } from "./sanitize"; + +/** + * Convert the service version to 'normal' version. + * This basically removes any "v" prefix from the version string. + * @param version + */ +export function getServiceVersion(version = "1.0"): string { + return String(version).replace(/^v/gi, ""); +} + +/** + * Convert the input value to a correct service name. This converts + * the input string to PascalCase. + */ +export const getServiceName = (value: string): string => { + const clean = sanitizeNamespaceIdentifier(value).trim(); + return camelCase(clean, { pascalCase: true }); +}; diff --git a/tools/openapi-ts/openApi/common/parser/sort.ts b/tools/openapi-ts/openApi/common/parser/sort.ts new file mode 100644 index 0000000000000000000000000000000000000000..a4195eab4f22b448d1215b921faa3a84ec7e4e5c --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/sort.ts @@ -0,0 +1,13 @@ +/** + * Sort list of values and ensure that required parameters are first so that we do not generate + * invalid types. Optional parameters cannot be positioned after required ones. + */ +export function toSortedByRequired<T extends { isRequired: boolean; default?: unknown }>(values: T[]): T[] { + return values.sort((a, b) => { + const aNeedsValue = a.isRequired && a.default === undefined; + const bNeedsValue = b.isRequired && b.default === undefined; + if (aNeedsValue && !bNeedsValue) return -1; + if (bNeedsValue && !aNeedsValue) return 1; + return 0; + }); +} diff --git a/tools/openapi-ts/openApi/common/parser/stripNamespace.ts b/tools/openapi-ts/openApi/common/parser/stripNamespace.ts new file mode 100644 index 0000000000000000000000000000000000000000..75b01df5ae61749592cd649600df76e941a038f0 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/stripNamespace.ts @@ -0,0 +1,20 @@ +/** + * Strip (OpenAPI) namespaces fom values. + * @param value + */ +export const stripNamespace = (value: string): string => + value + .trim() + .replace(/^#\/definitions\//, "") + .replace(/^#\/parameters\//, "") + .replace(/^#\/responses\//, "") + .replace(/^#\/securityDefinitions\//, "") + .replace(/^#\/components\/schemas\//, "") + .replace(/^#\/components\/responses\//, "") + .replace(/^#\/components\/parameters\//, "") + .replace(/^#\/components\/examples\//, "") + .replace(/^#\/components\/requestBodies\//, "") + .replace(/^#\/components\/headers\//, "") + .replace(/^#\/components\/securitySchemes\//, "") + .replace(/^#\/components\/links\//, "") + .replace(/^#\/components\/callbacks\//, ""); diff --git a/tools/openapi-ts/openApi/common/parser/type.ts b/tools/openapi-ts/openApi/common/parser/type.ts new file mode 100644 index 0000000000000000000000000000000000000000..b56d0c3c04dceffd9e9974fcf1b949264ec09d52 --- /dev/null +++ b/tools/openapi-ts/openApi/common/parser/type.ts @@ -0,0 +1,122 @@ +import type { Type } from "../interfaces/Type"; +import { ensureValidTypeScriptJavaScriptIdentifier } from "./sanitize"; +import { stripNamespace } from "./stripNamespace"; + +/** + * Get mapped type for given type to basic Typescript/Javascript type. + */ +export const getMappedType = (type: string, format?: string): string | undefined => { + if (format === "binary") { + return "binary"; + } + switch (type) { + case "any": + case "object": + return "unknown"; + case "array": + return "unknown[]"; + case "boolean": + return "boolean"; + case "byte": + case "double": + case "float": + case "int": + case "integer": + case "long": + case "number": + case "short": + return "number"; + case "char": + case "date": + case "date-time": + case "password": + case "string": + return "string"; + case "file": + return "binary"; + case "null": + return "null"; + case "void": + return "void"; + } + throw new Error(); +}; + +/** + * Parse any string value into a type object. + * @param type String or String[] value like "integer", "Link[Model]" or ["string", "null"]. + * @param format String value like "binary" or "date". + */ +export const getType = (type: string | string[] = "unknown", format?: string): Type => { + const result: Type = { + $refs: [], + base: "unknown", + imports: [], + isNullable: false, + template: null, + type: "unknown", + }; + + // Special case for JSON Schema spec (december 2020, page 17), + // that allows type to be an array of primitive types... + if (Array.isArray(type)) { + const joinedType = type + .filter((value) => value !== "null") + .map((value) => getMappedType(value, format)) + .filter(Boolean) + .join(" | "); + result.type = joinedType; + result.base = joinedType; + result.isNullable = type.includes("null"); + return result; + } + + const mapped = getMappedType(type, format); + if (mapped) { + result.type = mapped; + result.base = mapped; + return result; + } + + const typeWithoutNamespace = decodeURIComponent(stripNamespace(type)); + + if (/\[.*\]$/g.test(typeWithoutNamespace)) { + const matches = typeWithoutNamespace.match(/(.*?)\[(.*)\]$/); + if (matches?.length) { + const match1 = getType(ensureValidTypeScriptJavaScriptIdentifier(matches[1])); + const match2 = getType(ensureValidTypeScriptJavaScriptIdentifier(matches[2])); + + if (match1.type === "unknown[]") { + result.type = `${match2.type}[]`; + result.base = `${match2.type}`; + match1.$refs = []; + match1.imports = []; + } else if (match2.type) { + result.type = `${match1.type}<${match2.type}>`; + result.base = match1.type; + result.template = match2.type; + } else { + result.type = match1.type; + result.base = match1.type; + result.template = match1.type; + } + + result.$refs = [...result.$refs, ...match1.$refs, ...match2.$refs]; + result.imports = [...result.imports, ...match1.imports, ...match2.imports]; + return result; + } + } + + if (typeWithoutNamespace) { + const encodedType = ensureValidTypeScriptJavaScriptIdentifier(typeWithoutNamespace); + result.type = encodedType; + result.base = encodedType; + if (type.startsWith("#")) { + result.$refs = [...result.$refs, type]; + } + result.imports = [...result.imports, encodedType]; + return result; + } + + return result; +}; diff --git a/tools/openapi-ts/openApi/index.ts b/tools/openapi-ts/openApi/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..86eba8c2b1c584d33ee51596a43e9aa3a2aff485 --- /dev/null +++ b/tools/openapi-ts/openApi/index.ts @@ -0,0 +1,24 @@ +import type { Client } from "../types/client"; +import { OpenApi } from "./common/interfaces/OpenApi"; +import { parse as parseV2 } from "./v2/index"; +import { parse as parseV3 } from "./v3/index"; + +export type { Enum, Model, Operation, OperationParameter, Service } from "./common/interfaces/client"; +export type { OpenApi } from "./common/interfaces/OpenApi"; + +/** + * Parse the OpenAPI specification to a Client model that contains + * all the models, services and schema's we should output. + * @param openApi The OpenAPI spec that we have loaded from disk. + */ +export function parse(openApi: OpenApi): Client { + if ("openapi" in openApi) { + return parseV3(openApi); + } + + if ("swagger" in openApi) { + return parseV2(openApi); + } + + throw new Error(`Unsupported Open API specification: ${JSON.stringify(openApi, null, 2)}`); +} diff --git a/tools/openapi-ts/openApi/v2/index.ts b/tools/openapi-ts/openApi/v2/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..bfac1489a5b75f840901db3fc41b1f1ce727c72d --- /dev/null +++ b/tools/openapi-ts/openApi/v2/index.ts @@ -0,0 +1,26 @@ +import type { Client } from "../../types/client"; +import { getServiceVersion } from "../common/parser/service"; +import type { OpenApi } from "./interfaces/OpenApi"; +import { getModels } from "./parser/getModels"; +import { getServer } from "./parser/getServer"; +import { getServices } from "./parser/getServices"; + +/** + * Parse the OpenAPI specification to a Client model that contains + * all the models, services and schema's we should output. + * @param openApi The OpenAPI spec that we have loaded from disk. + */ +export const parse = (openApi: OpenApi): Client => { + const version = getServiceVersion(openApi.info.version); + const server = getServer(openApi); + const models = getModels(openApi); + const services = getServices(openApi); + + return { + enumNames: [], + models, + server, + services, + version, + }; +}; diff --git a/tools/openapi-ts/openApi/v2/interfaces/Extensions/WithNullableExtension.ts b/tools/openapi-ts/openApi/v2/interfaces/Extensions/WithNullableExtension.ts new file mode 100644 index 0000000000000000000000000000000000000000..8e8d930b7341c36d92be11b24626f244d236b0ec --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/Extensions/WithNullableExtension.ts @@ -0,0 +1,3 @@ +export interface WithNullableExtension { + "x-nullable"?: boolean; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApi.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApi.ts new file mode 100644 index 0000000000000000000000000000000000000000..7354081afbec1d38edbd4a868627d32e07f68fec --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApi.ts @@ -0,0 +1,31 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; +import type { OpenApiInfo } from "./OpenApiInfo"; +import type { OpenApiParameter } from "./OpenApiParameter"; +import type { OpenApiPath } from "./OpenApiPath"; +import type { OpenApiResponse } from "./OpenApiResponse"; +import type { OpenApiSchema } from "./OpenApiSchema"; +import type { OpenApiSecurityRequirement } from "./OpenApiSecurityRequirement"; +import type { OpenApiSecurityScheme } from "./OpenApiSecurityScheme"; +import type { OpenApiTag } from "./OpenApiTag"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md + */ +export interface OpenApi { + basePath?: string; + consumes?: string[]; + definitions?: Dictionary<OpenApiSchema>; + externalDocs?: OpenApiExternalDocs; + host?: string; + info: OpenApiInfo; + parameters?: Dictionary<OpenApiParameter>; + paths: Dictionary<OpenApiPath>; + produces?: string[]; + responses?: Dictionary<OpenApiResponse>; + schemes?: string[]; + security?: OpenApiSecurityRequirement[]; + securityDefinitions?: Dictionary<OpenApiSecurityScheme>; + swagger: string; + tags?: OpenApiTag[]; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiContact.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiContact.ts new file mode 100644 index 0000000000000000000000000000000000000000..6f4e9ea083742e103287918bb75eec1389ea2d0d --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiContact.ts @@ -0,0 +1,8 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#contact-object + */ +export interface OpenApiContact { + name?: string; + url?: string; + email?: string; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiExample.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiExample.ts new file mode 100644 index 0000000000000000000000000000000000000000..992d12a6039619e7ddc3ef40e39aa5aee8619b30 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiExample.ts @@ -0,0 +1,6 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#example-object + */ +export interface OpenApiExample { + [mimetype: string]: unknown; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiExternalDocs.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiExternalDocs.ts new file mode 100644 index 0000000000000000000000000000000000000000..d43c532b5010bee825db3b32c369448ebbbbd745 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiExternalDocs.ts @@ -0,0 +1,7 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#external-documentation-object + */ +export interface OpenApiExternalDocs { + description?: string; + url: string; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiHeader.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiHeader.ts new file mode 100644 index 0000000000000000000000000000000000000000..4b2dba99a202599ac38605a83c55ff88cb06e4a6 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiHeader.ts @@ -0,0 +1,37 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiItems } from "./OpenApiItems"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#header-object + */ +export interface OpenApiHeader { + description?: string; + type: "string" | "number" | "integer" | "boolean" | "array"; + format?: + | "int32" + | "int64" + | "float" + | "double" + | "string" + | "boolean" + | "byte" + | "binary" + | "date" + | "date-time" + | "password"; + items?: Dictionary<OpenApiItems>; + collectionFormat?: "csv" | "ssv" | "tsv" | "pipes"; + default?: unknown; + maximum?: number; + exclusiveMaximum?: boolean; + minimum?: number; + exclusiveMinimum?: boolean; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + enum?: (string | number)[]; + multipleOf?: number; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiInfo.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..fb7360befc1a6d89f5ae2d5a0c00c18ab12dc203 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiInfo.ts @@ -0,0 +1,14 @@ +import type { OpenApiContact } from "./OpenApiContact"; +import type { OpenApiLicense } from "./OpenApiLicense"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#info-object + */ +export interface OpenApiInfo { + title: string; + description?: string; + termsOfService?: string; + contact?: OpenApiContact; + license?: OpenApiLicense; + version: string; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiItems.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiItems.ts new file mode 100644 index 0000000000000000000000000000000000000000..c63dd17dc43e23880d749e3b1d3703c59bc71cf9 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiItems.ts @@ -0,0 +1,35 @@ +import type { WithEnumExtension } from "../../common/interfaces/WithEnumExtension"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#items-object) + */ +export interface OpenApiItems extends WithEnumExtension { + type?: string; + format?: + | "int32" + | "int64" + | "float" + | "double" + | "string" + | "boolean" + | "byte" + | "binary" + | "date" + | "date-time" + | "password"; + items?: OpenApiItems; + collectionFormat?: "csv" | "ssv" | "tsv" | "pipes"; + default?: unknown; + maximum?: number; + exclusiveMaximum?: number; + minimum?: number; + exclusiveMinimum?: number; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + enum?: (string | number)[]; + multipleOf?: number; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiLicense.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiLicense.ts new file mode 100644 index 0000000000000000000000000000000000000000..71cc714fbcd7d4ad51cb6d7e4f73dea5fa2d671e --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiLicense.ts @@ -0,0 +1,7 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#license-object + */ +export interface OpenApiLicense { + name: string; + url?: string; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiOperation.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiOperation.ts new file mode 100644 index 0000000000000000000000000000000000000000..8159a0ccf6a070a320edb25052673f35d5fba4c0 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiOperation.ts @@ -0,0 +1,22 @@ +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; +import type { OpenApiParameter } from "./OpenApiParameter"; +import type { OpenApiResponses } from "./OpenApiResponses"; +import type { OpenApiSecurityRequirement } from "./OpenApiSecurityRequirement"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#operation-object + */ +export interface OpenApiOperation { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: OpenApiExternalDocs; + operationId?: string; + consumes?: string[]; + produces?: string[]; + parameters?: OpenApiParameter[]; + responses: OpenApiResponses; + schemes?: ("http" | "https" | "ws" | "wss")[]; + deprecated?: boolean; + security?: OpenApiSecurityRequirement[]; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiParameter.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiParameter.ts new file mode 100644 index 0000000000000000000000000000000000000000..9a6a1adeaf9acdb40d18e4ef5badbe5126ef0cbb --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiParameter.ts @@ -0,0 +1,45 @@ +import type { WithEnumExtension } from "../../common/interfaces/WithEnumExtension"; +import type { WithNullableExtension } from "./Extensions/WithNullableExtension"; +import type { OpenApiItems } from "./OpenApiItems"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiSchema } from "./OpenApiSchema"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#parameter-object + */ +export interface OpenApiParameter extends OpenApiReference, WithEnumExtension, WithNullableExtension { + name: string; + in: "path" | "query" | "header" | "formData" | "body"; + description?: string; + required?: boolean; + schema?: OpenApiSchema; + type?: string; + format?: + | "int32" + | "int64" + | "float" + | "double" + | "string" + | "boolean" + | "byte" + | "binary" + | "date" + | "date-time" + | "password"; + allowEmptyValue?: boolean; + items?: OpenApiItems; + collectionFormat?: "csv" | "ssv" | "tsv" | "pipes" | "multi"; + default?: unknown; + maximum?: number; + exclusiveMaximum?: boolean; + minimum?: number; + exclusiveMinimum?: boolean; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + enum?: (string | number)[]; + multipleOf?: number; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiPath.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiPath.ts new file mode 100644 index 0000000000000000000000000000000000000000..43ff05fc0a931760805a1b40bc0888f83ea4a419 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiPath.ts @@ -0,0 +1,17 @@ +import type { OpenApiOperation } from "./OpenApiOperation"; +import type { OpenApiParameter } from "./OpenApiParameter"; +import type { OpenApiReference } from "./OpenApiReference"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#path-item-object + */ +export interface OpenApiPath extends OpenApiReference { + get?: OpenApiOperation; + put?: OpenApiOperation; + post?: OpenApiOperation; + delete?: OpenApiOperation; + options?: OpenApiOperation; + head?: OpenApiOperation; + patch?: OpenApiOperation; + parameters?: OpenApiParameter[]; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiReference.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiReference.ts new file mode 100644 index 0000000000000000000000000000000000000000..8d2ffb9e339ee348337e2e4c8f194a81e3da19cb --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiReference.ts @@ -0,0 +1,6 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#reference-object + */ +export interface OpenApiReference { + $ref?: string; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiResponse.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiResponse.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f25d7ede81b2bf1bdf3cd6fbb23294f705a0d83 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiResponse.ts @@ -0,0 +1,15 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiExample } from "./OpenApiExample"; +import type { OpenApiHeader } from "./OpenApiHeader"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiSchema } from "./OpenApiSchema"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#response-object + */ +export interface OpenApiResponse extends OpenApiReference { + description: string; + schema?: OpenApiSchema & OpenApiReference; + headers?: Dictionary<OpenApiHeader>; + examples?: OpenApiExample; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiResponses.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiResponses.ts new file mode 100644 index 0000000000000000000000000000000000000000..815066499bf21a9a71c33c5ac3d35698ed29ae47 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiResponses.ts @@ -0,0 +1,12 @@ +import type { OpenApiResponse } from "./OpenApiResponse"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#responses-object + */ +interface Response { + [httpcode: string]: OpenApiResponse; +} + +export type OpenApiResponses = Response & { + default?: OpenApiResponse; +}; diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiSchema.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiSchema.ts new file mode 100644 index 0000000000000000000000000000000000000000..48d47b9ff86f85e027c15a40d76d50b8267b47ec --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiSchema.ts @@ -0,0 +1,52 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { WithEnumExtension } from "../../common/interfaces/WithEnumExtension"; +import type { WithNullableExtension } from "./Extensions/WithNullableExtension"; +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiXml } from "./OpenApiXml"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#schema-object + */ +export interface OpenApiSchema extends OpenApiReference, WithEnumExtension, WithNullableExtension { + title?: string; + description?: string; + default?: unknown; + multipleOf?: number; + maximum?: number; + exclusiveMaximum?: boolean; + minimum?: number; + exclusiveMinimum?: boolean; + maxLength?: number; + minLength?: number; + pattern?: string; + maxItems?: number; + minItems?: number; + uniqueItems?: boolean; + maxProperties?: number; + minProperties?: number; + required?: string[]; + enum?: (string | number)[]; + type?: string; + format?: + | "int32" + | "int64" + | "float" + | "double" + | "string" + | "boolean" + | "byte" + | "binary" + | "date" + | "date-time" + | "password"; + items?: OpenApiSchema; + allOf?: OpenApiSchema[]; + properties?: Dictionary<OpenApiSchema>; + additionalProperties?: boolean | OpenApiSchema; + discriminator?: string; + readOnly?: boolean; + xml?: OpenApiXml; + externalDocs?: OpenApiExternalDocs; + example?: unknown; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiSecurityRequirement.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiSecurityRequirement.ts new file mode 100644 index 0000000000000000000000000000000000000000..f1719be6709d66b4074d041928191ec32718a459 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiSecurityRequirement.ts @@ -0,0 +1,6 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-requirement-object + */ +export interface OpenApiSecurityRequirement { + [key: string]: string; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiSecurityScheme.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiSecurityScheme.ts new file mode 100644 index 0000000000000000000000000000000000000000..0b9a102194a0b8fe0b839c793ee9a1d45e3f3cbe --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiSecurityScheme.ts @@ -0,0 +1,15 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-scheme-object + */ +export interface OpenApiSecurityScheme { + type: "basic" | "apiKey" | "oauth2"; + description?: string; + name?: string; + in?: "query" | "header"; + flow?: "implicit" | "password" | "application" | "accessCode"; + authorizationUrl?: string; + tokenUrl?: string; + scopes: Dictionary<string>; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiTag.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiTag.ts new file mode 100644 index 0000000000000000000000000000000000000000..debf2a92afa5bc5302de0465ccd05b793e2cc6f7 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiTag.ts @@ -0,0 +1,10 @@ +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#tag-object + */ +export interface OpenApiTag { + name: string; + description?: string; + externalDocs?: OpenApiExternalDocs; +} diff --git a/tools/openapi-ts/openApi/v2/interfaces/OpenApiXml.ts b/tools/openapi-ts/openApi/v2/interfaces/OpenApiXml.ts new file mode 100644 index 0000000000000000000000000000000000000000..521b337a4dd3bfa1a521e6cea3f468d5cfd74d39 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/interfaces/OpenApiXml.ts @@ -0,0 +1,10 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#xml-object + */ +export interface OpenApiXml { + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +} diff --git a/tools/openapi-ts/openApi/v2/parser/getModel.ts b/tools/openapi-ts/openApi/v2/parser/getModel.ts new file mode 100644 index 0000000000000000000000000000000000000000..834c0db11b18caf08d40e504086229076ebc2de7 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getModel.ts @@ -0,0 +1,152 @@ +import type { Model } from "../../common/interfaces/client"; +import { getEnums } from "../../common/parser/getEnums"; +import { getPattern } from "../../common/parser/getPattern"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import { getModelComposition } from "./getModelComposition"; +import { getModelProperties } from "./getModelProperties"; + +export const getModel = ( + openApi: OpenApi, + definition: OpenApiSchema, + isDefinition: boolean = false, + name: string = "", +): Model => { + const model: Model = { + $refs: [], + base: "unknown", + description: definition.description || null, + enum: [], + enums: [], + exclusiveMaximum: definition.exclusiveMaximum, + exclusiveMinimum: definition.exclusiveMinimum, + export: "interface", + format: definition.format, + imports: [], + isDefinition, + isNullable: definition["x-nullable"] === true, + isReadOnly: definition.readOnly === true, + isRequired: false, + link: null, + maxItems: definition.maxItems, + maxLength: definition.maxLength, + maxProperties: definition.maxProperties, + maximum: definition.maximum, + minItems: definition.minItems, + minLength: definition.minLength, + minProperties: definition.minProperties, + minimum: definition.minimum, + multipleOf: definition.multipleOf, + name, + pattern: getPattern(definition.pattern), + properties: [], + template: null, + type: "unknown", + uniqueItems: definition.uniqueItems, + }; + + if (definition.$ref) { + const definitionRef = getType(definition.$ref); + model.export = "reference"; + model.type = definitionRef.type; + model.base = definitionRef.base; + model.template = definitionRef.template; + model.imports.push(...definitionRef.imports); + return model; + } + + if (definition.enum && definition.type !== "boolean") { + const enums = getEnums(definition, definition.enum); + if (enums.length) { + model.base = "string"; + model.enum = [...model.enum, ...enums]; + model.export = "enum"; + model.type = "string"; + return model; + } + } + + if (definition.type === "array" && definition.items) { + if (definition.items.$ref) { + const arrayItems = getType(definition.items.$ref); + model.export = "array"; + model.type = arrayItems.type; + model.base = arrayItems.base; + model.template = arrayItems.template; + model.imports.push(...arrayItems.imports); + return model; + } else { + const arrayItems = getModel(openApi, definition.items); + model.export = "array"; + model.type = arrayItems.type; + model.base = arrayItems.base; + model.template = arrayItems.template; + model.link = arrayItems; + model.imports.push(...arrayItems.imports); + return model; + } + } + + if (definition.type === "object" && typeof definition.additionalProperties === "object") { + if (definition.additionalProperties.$ref) { + const additionalProperties = getType(definition.additionalProperties.$ref); + model.export = "dictionary"; + model.type = additionalProperties.type; + model.base = additionalProperties.base; + model.template = additionalProperties.template; + model.imports.push(...additionalProperties.imports); + return model; + } else { + const additionalProperties = getModel(openApi, definition.additionalProperties); + model.export = "dictionary"; + model.type = additionalProperties.type; + model.base = additionalProperties.base; + model.template = additionalProperties.template; + model.link = additionalProperties; + model.imports.push(...additionalProperties.imports); + return model; + } + } + + if (definition.allOf?.length) { + const composition = getModelComposition(openApi, definition, definition.allOf, "all-of", getModel); + model.export = composition.export; + model.imports.push(...composition.imports); + model.properties.push(...composition.properties); + model.enums = [...model.enums, ...composition.enums]; + return model; + } + + if (definition.type === "object") { + model.export = "interface"; + model.type = "unknown"; + model.base = "unknown"; + + if (definition.properties) { + const modelProperties = getModelProperties(openApi, definition, getModel); + modelProperties.forEach((modelProperty) => { + model.imports.push(...modelProperty.imports); + model.enums = [...model.enums, ...modelProperty.enums]; + model.properties.push(modelProperty); + if (modelProperty.export === "enum") { + model.enums = [...model.enums, modelProperty]; + } + }); + } + return model; + } + + // If the schema has a type than it can be a basic or generic type. + if (definition.type) { + const definitionType = getType(definition.type, definition.format); + model.export = "generic"; + model.type = definitionType.type; + model.base = definitionType.base; + model.template = definitionType.template; + model.imports.push(...definitionType.imports); + return model; + } + + return model; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getModelComposition.ts b/tools/openapi-ts/openApi/v2/parser/getModelComposition.ts new file mode 100644 index 0000000000000000000000000000000000000000..754d164219241352cc9046f536b9b19b9ada5fe1 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getModelComposition.ts @@ -0,0 +1,91 @@ +import type { Model, ModelComposition } from "../../common/interfaces/client"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import type { getModel } from "./getModel"; +import { getModelProperties } from "./getModelProperties"; +import { getRequiredPropertiesFromComposition } from "./getRequiredPropertiesFromComposition"; + +// Fix for circular dependency +export type GetModelFn = typeof getModel; + +export const getModelComposition = ( + openApi: OpenApi, + definition: OpenApiSchema, + definitions: OpenApiSchema[], + type: "one-of" | "any-of" | "all-of", + getModel: GetModelFn, +): ModelComposition => { + const composition: ModelComposition = { + $refs: [], + enums: [], + export: type, + imports: [], + properties: [], + }; + + const properties: Model[] = []; + + definitions + .map((definition) => getModel(openApi, definition)) + .filter((model) => { + const hasProperties = model.properties.length; + const hasEnums = model.enums.length; + const isObject = model.type === "unknown"; + const isEmpty = isObject && !hasProperties && !hasEnums; + return !isEmpty; + }) + .forEach((model) => { + composition.imports.push(...model.imports); + composition.enums.push(...model.enums); + composition.properties.push(model); + }); + + if (definition.required) { + const requiredProperties = getRequiredPropertiesFromComposition( + openApi, + definition.required, + definitions, + getModel, + ); + requiredProperties.forEach((requiredProperty) => { + composition.imports.push(...requiredProperty.imports); + composition.enums.push(...requiredProperty.enums); + }); + properties.push(...requiredProperties); + } + + if (definition.properties) { + const modelProperties = getModelProperties(openApi, definition, getModel); + modelProperties.forEach((modelProperty) => { + composition.imports.push(...modelProperty.imports); + composition.enums.push(...modelProperty.enums); + if (modelProperty.export === "enum") { + composition.enums.push(modelProperty); + } + }); + properties.push(...modelProperties); + } + + if (properties.length) { + composition.properties.push({ + $refs: [], + base: "unknown", + description: "", + enum: [], + enums: [], + export: "interface", + imports: [], + isDefinition: false, + isNullable: false, + isReadOnly: false, + isRequired: false, + link: null, + name: "properties", + properties, + template: null, + type: "unknown", + }); + } + + return composition; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getModelProperties.ts b/tools/openapi-ts/openApi/v2/parser/getModelProperties.ts new file mode 100644 index 0000000000000000000000000000000000000000..5599ddfd6782d73c72bbceef9f67f3a2d38819c9 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getModelProperties.ts @@ -0,0 +1,90 @@ +import { escapeName } from "../../../utils/escape"; +import type { Model } from "../../common/interfaces/client"; +import { getPattern } from "../../common/parser/getPattern"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import type { getModel } from "./getModel"; + +// Fix for circular dependency +export type GetModelFn = typeof getModel; + +export const getModelProperties = (openApi: OpenApi, definition: OpenApiSchema, getModel: GetModelFn): Model[] => { + const models: Model[] = []; + for (const propertyName in definition.properties) { + if (definition.properties.hasOwnProperty(propertyName)) { + const property = definition.properties[propertyName]; + const propertyRequired = !!definition.required?.includes(propertyName); + if (property.$ref) { + const model = getType(property.$ref); + models.push({ + $refs: [], + base: model.base, + description: property.description || null, + enum: [], + enums: [], + exclusiveMaximum: property.exclusiveMaximum, + exclusiveMinimum: property.exclusiveMinimum, + export: "reference", + format: property.format, + imports: model.imports, + isDefinition: false, + isNullable: property["x-nullable"] === true, + isReadOnly: property.readOnly === true, + isRequired: propertyRequired, + link: null, + maxItems: property.maxItems, + maxLength: property.maxLength, + maxProperties: property.maxProperties, + maximum: property.maximum, + minItems: property.minItems, + minLength: property.minLength, + minProperties: property.minProperties, + minimum: property.minimum, + multipleOf: property.multipleOf, + name: escapeName(propertyName), + pattern: getPattern(property.pattern), + properties: [], + template: model.template, + type: model.type, + uniqueItems: property.uniqueItems, + }); + } else { + const model = getModel(openApi, property); + models.push({ + $refs: [], + base: model.base, + description: property.description || null, + enum: model.enum, + enums: model.enums, + exclusiveMaximum: property.exclusiveMaximum, + exclusiveMinimum: property.exclusiveMinimum, + export: model.export, + format: property.format, + imports: model.imports, + isDefinition: false, + isNullable: property["x-nullable"] === true, + isReadOnly: property.readOnly === true, + isRequired: propertyRequired, + link: model.link, + maxItems: property.maxItems, + maxLength: property.maxLength, + maxProperties: property.maxProperties, + maximum: property.maximum, + minItems: property.minItems, + minLength: property.minLength, + minProperties: property.minProperties, + minimum: property.minimum, + multipleOf: property.multipleOf, + name: escapeName(propertyName), + pattern: getPattern(property.pattern), + properties: model.properties, + template: model.template, + type: model.type, + uniqueItems: property.uniqueItems, + }); + } + } + } + return models; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getModels.ts b/tools/openapi-ts/openApi/v2/parser/getModels.ts new file mode 100644 index 0000000000000000000000000000000000000000..380bc069e32c8524324856d71faf6c0d4906f35b --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getModels.ts @@ -0,0 +1,18 @@ +import type { Model } from "../../common/interfaces/client"; +import { reservedWords } from "../../common/parser/reservedWords"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import { getModel } from "./getModel"; + +export const getModels = (openApi: OpenApi): Model[] => { + const models: Model[] = []; + for (const definitionName in openApi.definitions) { + if (openApi.definitions.hasOwnProperty(definitionName)) { + const definition = openApi.definitions[definitionName]; + const definitionType = getType(definitionName); + const model = getModel(openApi, definition, true, definitionType.base.replace(reservedWords, "_$1")); + models.push(model); + } + } + return models; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getOperation.ts b/tools/openapi-ts/openApi/v2/parser/getOperation.ts new file mode 100644 index 0000000000000000000000000000000000000000..9748017d9cbdd5e4cee41cc102be0c6a5092ebc5 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getOperation.ts @@ -0,0 +1,74 @@ +import type { Operation, OperationParameters } from "../../common/interfaces/client"; +import { getOperationErrors, getOperationName, getOperationResponseHeader } from "../../common/parser/operation"; +import { getServiceName } from "../../common/parser/service"; +import { toSortedByRequired } from "../../common/parser/sort"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiOperation } from "../interfaces/OpenApiOperation"; +import { getOperationParameters } from "./getOperationParameters"; +import { getOperationResponses } from "./getOperationResponses"; +import { getOperationResults } from "./getOperationResults"; + +export const getOperation = ( + openApi: OpenApi, + url: string, + method: Lowercase<Operation["method"]>, + tag: string, + op: OpenApiOperation, + pathParams: OperationParameters, +): Operation => { + const serviceName = getServiceName(tag); + const name = getOperationName(url, method, op.operationId); + + // Create a new operation object for this method. + const operation: Operation = { + $refs: [], + deprecated: op.deprecated === true, + description: op.description || null, + errors: [], + imports: [], + method: method.toUpperCase() as Operation["method"], + name, + parameters: [...pathParams.parameters], + parametersBody: pathParams.parametersBody, + parametersCookie: [...pathParams.parametersCookie], + parametersForm: [...pathParams.parametersForm], + parametersHeader: [...pathParams.parametersHeader], + parametersPath: [...pathParams.parametersPath], + parametersQuery: [...pathParams.parametersQuery], + path: url, + responseHeader: null, + results: [], + service: serviceName, + summary: op.summary || null, + }; + + // Parse the operation parameters (path, query, body, etc). + if (op.parameters) { + const parameters = getOperationParameters(openApi, op.parameters); + operation.imports.push(...parameters.imports); + operation.parameters.push(...parameters.parameters); + operation.parametersPath.push(...parameters.parametersPath); + operation.parametersQuery.push(...parameters.parametersQuery); + operation.parametersForm.push(...parameters.parametersForm); + operation.parametersHeader.push(...parameters.parametersHeader); + operation.parametersCookie.push(...parameters.parametersCookie); + operation.parametersBody = parameters.parametersBody; + } + + // Parse the operation responses. + if (op.responses) { + const operationResponses = getOperationResponses(openApi, op.responses); + const operationResults = getOperationResults(operationResponses); + operation.errors = getOperationErrors(operationResponses); + operation.responseHeader = getOperationResponseHeader(operationResults); + + operationResults.forEach((operationResult) => { + operation.results.push(operationResult); + operation.imports.push(...operationResult.imports); + }); + } + + operation.parameters = toSortedByRequired(operation.parameters); + + return operation; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getOperationParameter.ts b/tools/openapi-ts/openApi/v2/parser/getOperationParameter.ts new file mode 100644 index 0000000000000000000000000000000000000000..4a7324a04a9beca7a47b67c01015d6bd10730f48 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getOperationParameter.ts @@ -0,0 +1,136 @@ +import type { OperationParameter } from "../../common/interfaces/client"; +import { getDefault } from "../../common/parser/getDefault"; +import { getEnums } from "../../common/parser/getEnums"; +import { getPattern } from "../../common/parser/getPattern"; +import { getRef } from "../../common/parser/getRef"; +import { getOperationParameterName } from "../../common/parser/operation"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiParameter } from "../interfaces/OpenApiParameter"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import { getModel } from "./getModel"; + +export const getOperationParameter = (openApi: OpenApi, parameter: OpenApiParameter): OperationParameter => { + const operationParameter: OperationParameter = { + $refs: [], + base: "unknown", + description: parameter.description || null, + enum: [], + enums: [], + exclusiveMaximum: parameter.exclusiveMaximum, + exclusiveMinimum: parameter.exclusiveMinimum, + export: "interface", + format: parameter.format, + imports: [], + in: parameter.in, + isDefinition: false, + isNullable: parameter["x-nullable"] === true, + isReadOnly: false, + isRequired: parameter.required === true, + link: null, + maxItems: parameter.maxItems, + maxLength: parameter.maxLength, + maximum: parameter.maximum, + mediaType: null, + minItems: parameter.minItems, + minLength: parameter.minLength, + minimum: parameter.minimum, + multipleOf: parameter.multipleOf, + name: getOperationParameterName(parameter.name), + pattern: getPattern(parameter.pattern), + prop: parameter.name, + properties: [], + template: null, + type: "unknown", + uniqueItems: parameter.uniqueItems, + }; + + if (parameter.$ref) { + const definitionRef = getType(parameter.$ref); + operationParameter.export = "reference"; + operationParameter.type = definitionRef.type; + operationParameter.base = definitionRef.base; + operationParameter.template = definitionRef.template; + operationParameter.imports.push(...definitionRef.imports); + operationParameter.default = getDefault(parameter, operationParameter); + return operationParameter; + } + + if (parameter.enum) { + const enums = getEnums(parameter, parameter.enum); + if (enums.length) { + operationParameter.base = "string"; + operationParameter.enum.push(...enums); + operationParameter.export = "enum"; + operationParameter.type = "string"; + operationParameter.default = getDefault(parameter, operationParameter); + return operationParameter; + } + } + + if (parameter.type === "array" && parameter.items) { + const items = getType(parameter.items.type, parameter.items.format); + operationParameter.export = "array"; + operationParameter.type = items.type; + operationParameter.base = items.base; + operationParameter.template = items.template; + operationParameter.imports.push(...items.imports); + operationParameter.default = getDefault(parameter, operationParameter); + return operationParameter; + } + + if (parameter.type === "object" && parameter.items) { + const items = getType(parameter.items.type, parameter.items.format); + operationParameter.export = "dictionary"; + operationParameter.type = items.type; + operationParameter.base = items.base; + operationParameter.template = items.template; + operationParameter.imports.push(...items.imports); + operationParameter.default = getDefault(parameter, operationParameter); + return operationParameter; + } + + let schema = parameter.schema; + if (schema) { + if (schema.$ref?.startsWith("#/parameters/")) { + schema = getRef<OpenApiSchema>(openApi, schema); + } + if (schema.$ref) { + const model = getType(schema.$ref); + operationParameter.export = "reference"; + operationParameter.type = model.type; + operationParameter.base = model.base; + operationParameter.template = model.template; + operationParameter.imports.push(...model.imports); + operationParameter.default = getDefault(parameter, operationParameter); + return operationParameter; + } else { + const model = getModel(openApi, schema); + operationParameter.export = model.export; + operationParameter.type = model.type; + operationParameter.base = model.base; + operationParameter.template = model.template; + operationParameter.link = model.link; + operationParameter.imports.push(...model.imports); + operationParameter.enum.push(...model.enum); + operationParameter.enums.push(...model.enums); + operationParameter.properties.push(...model.properties); + operationParameter.default = getDefault(parameter, operationParameter); + return operationParameter; + } + } + + // If the parameter has a type than it can be a basic or generic type. + if (parameter.type) { + const definitionType = getType(parameter.type, parameter.format); + operationParameter.export = "generic"; + operationParameter.type = definitionType.type; + operationParameter.base = definitionType.base; + operationParameter.template = definitionType.template; + operationParameter.imports.push(...definitionType.imports); + operationParameter.default = getDefault(parameter, operationParameter); + return operationParameter; + } + + return operationParameter; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getOperationParameters.ts b/tools/openapi-ts/openApi/v2/parser/getOperationParameters.ts new file mode 100644 index 0000000000000000000000000000000000000000..683d95eb42eb07c57b4c60ac665612f7f2f1e65f --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getOperationParameters.ts @@ -0,0 +1,62 @@ +import type { OperationParameters } from "../../common/interfaces/client"; +import { getRef } from "../../common/parser/getRef"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiParameter } from "../interfaces/OpenApiParameter"; +import { getOperationParameter } from "./getOperationParameter"; + +export const getOperationParameters = (openApi: OpenApi, parameters: OpenApiParameter[]): OperationParameters => { + const operationParameters: OperationParameters = { + $refs: [], + imports: [], + parameters: [], + parametersBody: null, + parametersCookie: [], + parametersForm: [], + parametersHeader: [], + parametersPath: [], + parametersQuery: [], + }; + + // Iterate over the parameters + parameters.forEach((parameterOrReference) => { + const parameterDef = getRef<OpenApiParameter>(openApi, parameterOrReference); + const parameter = getOperationParameter(openApi, parameterDef); + + // We ignore the "api-version" param, since we do not want to add this + // as the first / default parameter for each of the service calls. + if (parameter.prop !== "api-version") { + switch (parameter.in) { + case "path": + operationParameters.parametersPath.push(parameter); + operationParameters.parameters.push(parameter); + operationParameters.imports.push(...parameter.imports); + break; + + case "query": + operationParameters.parametersQuery.push(parameter); + operationParameters.parameters.push(parameter); + operationParameters.imports.push(...parameter.imports); + break; + + case "header": + operationParameters.parametersHeader.push(parameter); + operationParameters.parameters.push(parameter); + operationParameters.imports.push(...parameter.imports); + break; + + case "formData": + operationParameters.parametersForm.push(parameter); + operationParameters.parameters.push(parameter); + operationParameters.imports.push(...parameter.imports); + break; + + case "body": + operationParameters.parametersBody = parameter; + operationParameters.parameters.push(parameter); + operationParameters.imports.push(...parameter.imports); + break; + } + } + }); + return operationParameters; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getOperationResponse.ts b/tools/openapi-ts/openApi/v2/parser/getOperationResponse.ts new file mode 100644 index 0000000000000000000000000000000000000000..2cf725f3ee05805daf17d393283d03931b0d1510 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getOperationResponse.ts @@ -0,0 +1,100 @@ +import type { OperationResponse } from "../../common/interfaces/client"; +import { getPattern } from "../../common/parser/getPattern"; +import { getRef } from "../../common/parser/getRef"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiResponse } from "../interfaces/OpenApiResponse"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import { getModel } from "./getModel"; + +export const getOperationResponse = ( + openApi: OpenApi, + response: OpenApiResponse, + responseCode: number, +): OperationResponse => { + const operationResponse: OperationResponse = { + $refs: [], + base: responseCode !== 204 ? "unknown" : "void", + code: responseCode, + description: response.description || null, + enum: [], + enums: [], + export: "generic", + imports: [], + in: "response", + isDefinition: false, + isNullable: false, + isReadOnly: false, + isRequired: false, + link: null, + name: "", + properties: [], + template: null, + type: responseCode !== 204 ? "unknown" : "void", + }; + + // If this response has a schema, then we need to check two things: + // if this is a reference then the parameter is just the 'name' of + // this reference type. Otherwise, it might be a complex schema, + // and then we need to parse the schema! + let schema = response.schema; + if (schema) { + if (schema.$ref?.startsWith("#/responses/")) { + schema = getRef<OpenApiSchema>(openApi, schema); + } + if (schema.$ref) { + const model = getType(schema.$ref); + operationResponse.export = "reference"; + operationResponse.type = model.type; + operationResponse.base = model.base; + operationResponse.template = model.template; + operationResponse.imports.push(...model.imports); + return operationResponse; + } else { + const model = getModel(openApi, schema); + operationResponse.export = model.export; + operationResponse.type = model.type; + operationResponse.base = model.base; + operationResponse.template = model.template; + operationResponse.link = model.link; + operationResponse.isReadOnly = model.isReadOnly; + operationResponse.isRequired = model.isRequired; + operationResponse.isNullable = model.isNullable; + operationResponse.format = model.format; + operationResponse.maximum = model.maximum; + operationResponse.exclusiveMaximum = model.exclusiveMaximum; + operationResponse.minimum = model.minimum; + operationResponse.exclusiveMinimum = model.exclusiveMinimum; + operationResponse.multipleOf = model.multipleOf; + operationResponse.maxLength = model.maxLength; + operationResponse.minLength = model.minLength; + operationResponse.maxItems = model.maxItems; + operationResponse.minItems = model.minItems; + operationResponse.uniqueItems = model.uniqueItems; + operationResponse.maxProperties = model.maxProperties; + operationResponse.minProperties = model.minProperties; + operationResponse.pattern = getPattern(model.pattern); + operationResponse.imports.push(...model.imports); + operationResponse.enum.push(...model.enum); + operationResponse.enums.push(...model.enums); + operationResponse.properties.push(...model.properties); + return operationResponse; + } + } + + // We support basic properties from response headers, since both + // fetch and XHR client just support string types. + if (response.headers) { + for (const name in response.headers) { + if (response.headers.hasOwnProperty(name)) { + operationResponse.in = "header"; + operationResponse.name = name; + operationResponse.type = "string"; + operationResponse.base = "string"; + return operationResponse; + } + } + } + + return operationResponse; +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getOperationResponses.ts b/tools/openapi-ts/openApi/v2/parser/getOperationResponses.ts new file mode 100644 index 0000000000000000000000000000000000000000..92626fc470027c1d9859b2f25e7421d38e480dbe --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getOperationResponses.ts @@ -0,0 +1,29 @@ +import type { OperationResponse } from "../../common/interfaces/client"; +import { getRef } from "../../common/parser/getRef"; +import { getOperationResponseCode } from "../../common/parser/operation"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiResponse } from "../interfaces/OpenApiResponse"; +import type { OpenApiResponses } from "../interfaces/OpenApiResponses"; +import { getOperationResponse } from "./getOperationResponse"; + +export const getOperationResponses = (openApi: OpenApi, responses: OpenApiResponses): OperationResponse[] => { + const operationResponses: OperationResponse[] = []; + + // Iterate over each response code and get the + // status code and response message + for (const code in responses) { + if (responses.hasOwnProperty(code)) { + const responseOrReference = responses[code]; + const response = getRef<OpenApiResponse>(openApi, responseOrReference); + const responseCode = getOperationResponseCode(code); + + if (responseCode) { + const operationResponse = getOperationResponse(openApi, response, responseCode); + operationResponses.push(operationResponse); + } + } + } + + // Sort the responses to 2XX success codes come before 4XX and 5XX error codes. + return operationResponses.sort((a, b): number => (a.code < b.code ? -1 : a.code > b.code ? 1 : 0)); +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getOperationResults.ts b/tools/openapi-ts/openApi/v2/parser/getOperationResults.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f50d1c7078bd6355617cb5ffefb1f5a5d6d8709 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getOperationResults.ts @@ -0,0 +1,25 @@ +import type { Model, OperationResponse } from "../../common/interfaces/client"; + +const areEqual = (a: Model, b: Model): boolean => { + const equal = a.type === b.type && a.base === b.base && a.template === b.template; + if (equal && a.link && b.link) { + return areEqual(a.link, b.link); + } + return equal; +}; + +export const getOperationResults = (operationResponses: OperationResponse[]): OperationResponse[] => { + const operationResults: OperationResponse[] = []; + + // Filter out success response codes + operationResponses.forEach((operationResponse) => { + const { code } = operationResponse; + if (code && code >= 200 && code < 300) { + operationResults.push(operationResponse); + } + }); + + return operationResults.filter( + (operationResult, index, arr) => arr.findIndex((item) => areEqual(item, operationResult)) === index, + ); +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getRequiredPropertiesFromComposition.ts b/tools/openapi-ts/openApi/v2/parser/getRequiredPropertiesFromComposition.ts new file mode 100644 index 0000000000000000000000000000000000000000..0441039445d3b215856b78b76b5f47040a049437 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getRequiredPropertiesFromComposition.ts @@ -0,0 +1,28 @@ +import type { Model } from "../../common/interfaces/client"; +import { getRef } from "../../common/parser/getRef"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import type { getModel } from "./getModel"; + +// Fix for circular dependency +export type GetModelFn = typeof getModel; + +export const getRequiredPropertiesFromComposition = ( + openApi: OpenApi, + required: string[], + definitions: OpenApiSchema[], + getModel: GetModelFn, +): Model[] => + definitions + .reduce((properties, definition) => { + if (definition.$ref) { + const schema = getRef<OpenApiSchema>(openApi, definition); + return [...properties, ...getModel(openApi, schema).properties]; + } + return [...properties, ...getModel(openApi, definition).properties]; + }, [] as Model[]) + .filter((property) => !property.isRequired && required.includes(property.name)) + .map((property) => ({ + ...property, + isRequired: true, + })); diff --git a/tools/openapi-ts/openApi/v2/parser/getServer.ts b/tools/openapi-ts/openApi/v2/parser/getServer.ts new file mode 100644 index 0000000000000000000000000000000000000000..b3bed0c859fc1154b6a61952e0c2dba936f8d16a --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getServer.ts @@ -0,0 +1,13 @@ +import type { OpenApi } from "../interfaces/OpenApi"; + +/** + * Get the base server url. + * @param openApi + */ +export const getServer = (openApi: OpenApi): string => { + const scheme = openApi.schemes?.[0] || "http"; + const host = openApi.host; + const basePath = openApi.basePath || ""; + const url = host ? `${scheme}://${host}${basePath}` : basePath; + return url.replace(/\/$/g, ""); +}; diff --git a/tools/openapi-ts/openApi/v2/parser/getServices.ts b/tools/openapi-ts/openApi/v2/parser/getServices.ts new file mode 100644 index 0000000000000000000000000000000000000000..c4bdeba098f0a2d0c0b01d6a8f65a9574dcfdfc3 --- /dev/null +++ b/tools/openapi-ts/openApi/v2/parser/getServices.ts @@ -0,0 +1,57 @@ +import { unique } from "../../../utils/unique"; +import type { Service } from "../../common/interfaces/client"; +import type { OpenApi } from "../interfaces/OpenApi"; +import { getOperation } from "./getOperation"; +import { getOperationParameters } from "./getOperationParameters"; + +/** + * Get the OpenAPI services + */ +export const getServices = (openApi: OpenApi): Service[] => { + const services = new Map<string, Service>(); + for (const url in openApi.paths) { + if (openApi.paths.hasOwnProperty(url)) { + // Grab path and parse any global path parameters + const path = openApi.paths[url]; + const pathParams = getOperationParameters(openApi, path.parameters || []); + + // Parse all the methods for this path + for (const method in path) { + if (path.hasOwnProperty(method)) { + switch (method) { + case "get": + case "put": + case "post": + case "delete": + case "options": + case "head": + case "patch": { + // Each method contains an OpenAPI operation, we parse the operation + const op = path[method]!; + const tags = op.tags?.length ? op.tags.filter(unique) : ["Default"]; + tags.forEach((tag) => { + const operation = getOperation(openApi, url, method, tag, op, pathParams); + + // If we have already declared a service, then we should fetch that and + // append the new method to it. Otherwise we should create a new service object. + const service: Service = services.get(operation.service) || { + $refs: [], + imports: [], + name: operation.service, + operations: [], + }; + + // Push the operation in the service + service.operations.push(operation); + service.imports.push(...operation.imports); + services.set(operation.service, service); + }); + break; + } + } + } + } + } + } + return Array.from(services.values()); +}; diff --git a/tools/openapi-ts/openApi/v3/index.ts b/tools/openapi-ts/openApi/v3/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..bfac1489a5b75f840901db3fc41b1f1ce727c72d --- /dev/null +++ b/tools/openapi-ts/openApi/v3/index.ts @@ -0,0 +1,26 @@ +import type { Client } from "../../types/client"; +import { getServiceVersion } from "../common/parser/service"; +import type { OpenApi } from "./interfaces/OpenApi"; +import { getModels } from "./parser/getModels"; +import { getServer } from "./parser/getServer"; +import { getServices } from "./parser/getServices"; + +/** + * Parse the OpenAPI specification to a Client model that contains + * all the models, services and schema's we should output. + * @param openApi The OpenAPI spec that we have loaded from disk. + */ +export const parse = (openApi: OpenApi): Client => { + const version = getServiceVersion(openApi.info.version); + const server = getServer(openApi); + const models = getModels(openApi); + const services = getServices(openApi); + + return { + enumNames: [], + models, + server, + services, + version, + }; +}; diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApi.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApi.ts new file mode 100644 index 0000000000000000000000000000000000000000..e6663e15fa1c9183ba195a023cc3461367c0a6d5 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApi.ts @@ -0,0 +1,21 @@ +import type { OpenApiComponents } from "./OpenApiComponents"; +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; +import type { OpenApiInfo } from "./OpenApiInfo"; +import type { OpenApiPaths } from "./OpenApiPaths"; +import type { OpenApiSecurityRequirement } from "./OpenApiSecurityRequirement"; +import type { OpenApiServer } from "./OpenApiServer"; +import type { OpenApiTag } from "./OpenApiTag"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md + */ +export interface OpenApi { + components?: OpenApiComponents; + externalDocs?: OpenApiExternalDocs; + info: OpenApiInfo; + openapi: string; + paths: OpenApiPaths; + security?: OpenApiSecurityRequirement[]; + servers?: OpenApiServer[]; + tags?: OpenApiTag[]; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiCallback.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiCallback.ts new file mode 100644 index 0000000000000000000000000000000000000000..83cc07af543318d538e6bade0301acf3d8e353a7 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiCallback.ts @@ -0,0 +1,11 @@ +import type { OpenApiPath } from "./OpenApiPath"; +import type { OpenApiReference } from "./OpenApiReference"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#callback-object + */ +interface Callback { + [key: string]: OpenApiPath; +} + +export type OpenApiCallback = OpenApiReference & Callback; diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiComponents.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiComponents.ts new file mode 100644 index 0000000000000000000000000000000000000000..39d368a0665dd053d5e00b586a269e910c384b0e --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiComponents.ts @@ -0,0 +1,25 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiCallback } from "./OpenApiCallback"; +import type { OpenApiExample } from "./OpenApiExample"; +import type { OpenApiHeader } from "./OpenApiHeader"; +import type { OpenApiLink } from "./OpenApiLink"; +import type { OpenApiParameter } from "./OpenApiParameter"; +import type { OpenApiRequestBody } from "./OpenApiRequestBody"; +import type { OpenApiResponses } from "./OpenApiResponses"; +import type { OpenApiSchema } from "./OpenApiSchema"; +import type { OpenApiSecurityScheme } from "./OpenApiSecurityScheme"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#components-object + */ +export interface OpenApiComponents { + schemas?: Dictionary<OpenApiSchema>; + responses?: Dictionary<OpenApiResponses>; + parameters?: Dictionary<OpenApiParameter>; + examples?: Dictionary<OpenApiExample>; + requestBodies?: Dictionary<OpenApiRequestBody>; + headers?: Dictionary<OpenApiHeader>; + securitySchemes?: Dictionary<OpenApiSecurityScheme>; + links?: Dictionary<OpenApiLink>; + callbacks?: Dictionary<OpenApiCallback>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiContact.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiContact.ts new file mode 100644 index 0000000000000000000000000000000000000000..4e778ef8bc413dd4f41024597819fa1ecc7f558e --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiContact.ts @@ -0,0 +1,8 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#contact-object + */ +export interface OpenApiContact { + name?: string; + url?: string; + email?: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiDiscriminator.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiDiscriminator.ts new file mode 100644 index 0000000000000000000000000000000000000000..22cadc075575d76a3c503f56ca06a23bca1ff16f --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiDiscriminator.ts @@ -0,0 +1,9 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#discriminator-object + */ +export interface OpenApiDiscriminator { + propertyName: string; + mapping?: Dictionary<string>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiEncoding.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiEncoding.ts new file mode 100644 index 0000000000000000000000000000000000000000..6e20d4ab3e3fe0e252b85f27236856b87410b04e --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiEncoding.ts @@ -0,0 +1,13 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiHeader } from "./OpenApiHeader"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#encoding-object + */ +export interface OpenApiEncoding { + contentType?: string; + headers?: Dictionary<OpenApiHeader>; + style?: string; + explode?: boolean; + allowReserved?: boolean; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiExample.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiExample.ts new file mode 100644 index 0000000000000000000000000000000000000000..e7eacb0859b6bb2189646ec4bf3e3bd7d6e829ad --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiExample.ts @@ -0,0 +1,11 @@ +import type { OpenApiReference } from "./OpenApiReference"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#example-object + */ +export interface OpenApiExample extends OpenApiReference { + summary?: string; + description?: string; + value?: unknown; + externalValue?: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiExternalDocs.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiExternalDocs.ts new file mode 100644 index 0000000000000000000000000000000000000000..49ad5217efffe5ad62106f626bc6ff7064bb0e81 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiExternalDocs.ts @@ -0,0 +1,7 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#external-documentation-object + */ +export interface OpenApiExternalDocs { + description?: string; + url: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiHeader.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiHeader.ts new file mode 100644 index 0000000000000000000000000000000000000000..150c3d69dd7d09d30ea0d0d692932df6a7133c68 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiHeader.ts @@ -0,0 +1,20 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiExample } from "./OpenApiExample"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiSchema } from "./OpenApiSchema"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#header-object + */ +export interface OpenApiHeader extends OpenApiReference { + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; + style?: string; + explode?: boolean; + allowReserved?: boolean; + schema?: OpenApiSchema; + example?: unknown; + examples?: Dictionary<OpenApiExample>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiInfo.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..7997439586c38314aecd30eb296a31bcc3b2b8a9 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiInfo.ts @@ -0,0 +1,14 @@ +import type { OpenApiContact } from "./OpenApiContact"; +import type { OpenApiLicense } from "./OpenApiLicense"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#info-object + */ +export interface OpenApiInfo { + title: string; + description?: string; + termsOfService?: string; + contact?: OpenApiContact; + license?: OpenApiLicense; + version: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiLicense.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiLicense.ts new file mode 100644 index 0000000000000000000000000000000000000000..4ef387399b09c2d48abe174443c0a7e53ad95d2f --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiLicense.ts @@ -0,0 +1,7 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#license-object + */ +export interface OpenApiLicense { + name: string; + url?: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiLink.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiLink.ts new file mode 100644 index 0000000000000000000000000000000000000000..0948d8307983e5f7fd694f01b302fd326ca6fa7a --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiLink.ts @@ -0,0 +1,15 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiServer } from "./OpenApiServer"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#link-object + */ +export interface OpenApiLink extends OpenApiReference { + operationRef?: string; + operationId?: string; + parameters?: Dictionary<unknown>; + requestBody?: unknown; + description?: string; + server?: OpenApiServer; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiMediaType.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiMediaType.ts new file mode 100644 index 0000000000000000000000000000000000000000..38cd34ea23c0062aa288ee712d7f02c764ecc1c0 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiMediaType.ts @@ -0,0 +1,15 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiEncoding } from "./OpenApiEncoding"; +import type { OpenApiExample } from "./OpenApiExample"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiSchema } from "./OpenApiSchema"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#media-type-object + */ +export interface OpenApiMediaType extends OpenApiReference { + schema?: OpenApiSchema; + example?: unknown; + examples?: Dictionary<OpenApiExample>; + encoding?: Dictionary<OpenApiEncoding>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiOAuthFlow.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiOAuthFlow.ts new file mode 100644 index 0000000000000000000000000000000000000000..61e2ad995e2540ffe22f7afff84a2273690929b0 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiOAuthFlow.ts @@ -0,0 +1,11 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#oauth-flow-object + */ +export interface OpenApiOAuthFlow { + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Dictionary<string>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiOAuthFlows.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiOAuthFlows.ts new file mode 100644 index 0000000000000000000000000000000000000000..dcc832a378a12b4b5dc44892993c61bcd05d5738 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiOAuthFlows.ts @@ -0,0 +1,11 @@ +import type { OpenApiOAuthFlow } from "./OpenApiOAuthFlow"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#oauth-flows-object + */ +export interface OpenApiOAuthFlows { + implicit?: OpenApiOAuthFlow; + password?: OpenApiOAuthFlow; + clientCredentials?: OpenApiOAuthFlow; + authorizationCode?: OpenApiOAuthFlow; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiOperation.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiOperation.ts new file mode 100644 index 0000000000000000000000000000000000000000..c80a143f91928838319877c0a285f33846193ac8 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiOperation.ts @@ -0,0 +1,26 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiCallback } from "./OpenApiCallback"; +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; +import type { OpenApiParameter } from "./OpenApiParameter"; +import type { OpenApiRequestBody } from "./OpenApiRequestBody"; +import type { OpenApiResponses } from "./OpenApiResponses"; +import type { OpenApiSecurityRequirement } from "./OpenApiSecurityRequirement"; +import type { OpenApiServer } from "./OpenApiServer"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#operation-object + */ +export interface OpenApiOperation { + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: OpenApiExternalDocs; + operationId?: string; + parameters?: OpenApiParameter[]; + requestBody?: OpenApiRequestBody; + responses: OpenApiResponses; + callbacks?: Dictionary<OpenApiCallback>; + deprecated?: boolean; + security?: OpenApiSecurityRequirement[]; + servers?: OpenApiServer[]; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiParameter.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiParameter.ts new file mode 100644 index 0000000000000000000000000000000000000000..7b5b801b6ed4123a47e9811056911803e46a9402 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiParameter.ts @@ -0,0 +1,23 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiExample } from "./OpenApiExample"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiSchema } from "./OpenApiSchema"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#parameter-object + */ +export interface OpenApiParameter extends OpenApiReference { + name: string; + in: "path" | "query" | "header" | "formData" | "cookie"; + description?: string; + required?: boolean; + nullable?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; + style?: string; + explode?: boolean; + allowReserved?: boolean; + schema?: OpenApiSchema; + example?: unknown; + examples?: Dictionary<OpenApiExample>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiPath.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiPath.ts new file mode 100644 index 0000000000000000000000000000000000000000..64d019fda7f64a7c01cd60029a03cb2d68de2516 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiPath.ts @@ -0,0 +1,21 @@ +import type { OpenApiOperation } from "./OpenApiOperation"; +import type { OpenApiParameter } from "./OpenApiParameter"; +import type { OpenApiServer } from "./OpenApiServer"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#path-item-object + */ +export interface OpenApiPath { + delete?: OpenApiOperation; + description?: string; + get?: OpenApiOperation; + head?: OpenApiOperation; + options?: OpenApiOperation; + parameters?: OpenApiParameter[]; + patch?: OpenApiOperation; + post?: OpenApiOperation; + put?: OpenApiOperation; + servers?: OpenApiServer[]; + summary?: string; + trace?: OpenApiOperation; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiPaths.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiPaths.ts new file mode 100644 index 0000000000000000000000000000000000000000..01d8cfdee67a182240677c1901a39ff4598d6a51 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiPaths.ts @@ -0,0 +1,8 @@ +import type { OpenApiPath } from "./OpenApiPath"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#paths-object + */ +export interface OpenApiPaths { + [path: string]: OpenApiPath; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiReference.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiReference.ts new file mode 100644 index 0000000000000000000000000000000000000000..63d3a4617ae61cde1e0253982033763927823a42 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiReference.ts @@ -0,0 +1,6 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#reference-object + */ +export interface OpenApiReference { + $ref?: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiRequestBody.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiRequestBody.ts new file mode 100644 index 0000000000000000000000000000000000000000..5cc10018f58872138cf0a49054b2edf5ff59a3b2 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiRequestBody.ts @@ -0,0 +1,14 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiMediaType } from "./OpenApiMediaType"; +import type { OpenApiReference } from "./OpenApiReference"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#request-body-object + */ +export interface OpenApiRequestBody extends OpenApiReference { + "x-body-name"?: string; + content: Dictionary<OpenApiMediaType>; + description?: string; + nullable?: boolean; + required?: boolean; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiResponse.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiResponse.ts new file mode 100644 index 0000000000000000000000000000000000000000..6b4ebbf48ad5c21cc53a0106116bb2889d390796 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiResponse.ts @@ -0,0 +1,15 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiHeader } from "./OpenApiHeader"; +import type { OpenApiLink } from "./OpenApiLink"; +import type { OpenApiMediaType } from "./OpenApiMediaType"; +import type { OpenApiReference } from "./OpenApiReference"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#response-object + */ +export interface OpenApiResponse extends OpenApiReference { + description: string; + headers?: Dictionary<OpenApiHeader>; + content?: Dictionary<OpenApiMediaType>; + links?: Dictionary<OpenApiLink>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiResponses.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiResponses.ts new file mode 100644 index 0000000000000000000000000000000000000000..580b3748067222d4a627d76f923d481615e24e8a --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiResponses.ts @@ -0,0 +1,14 @@ +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiResponse } from "./OpenApiResponse"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#responses-object + */ +interface Response { + [httpcode: string]: OpenApiResponse; +} + +export type OpenApiResponses = OpenApiReference & + Response & { + default: OpenApiResponse; + }; diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiSchema.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiSchema.ts new file mode 100644 index 0000000000000000000000000000000000000000..2a72b817e36600997e2c36c7b29e2b7129dd7c59 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiSchema.ts @@ -0,0 +1,59 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { WithEnumExtension } from "../../common/interfaces/WithEnumExtension"; +import type { OpenApiDiscriminator } from "./OpenApiDiscriminator"; +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; +import type { OpenApiReference } from "./OpenApiReference"; +import type { OpenApiXml } from "./OpenApiXml"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schema-object + */ +export interface OpenApiSchema extends OpenApiReference, WithEnumExtension { + additionalProperties?: boolean | OpenApiSchema; + allOf?: OpenApiSchema[]; + anyOf?: OpenApiSchema[]; + const?: string | number | boolean | null; + default?: unknown; + deprecated?: boolean; + description?: string; + discriminator?: OpenApiDiscriminator; + enum?: (string | number)[]; + example?: unknown; + exclusiveMaximum?: boolean; + exclusiveMinimum?: boolean; + externalDocs?: OpenApiExternalDocs; + format?: + | "binary" + | "boolean" + | "byte" + | "date-time" + | "date" + | "double" + | "float" + | "int32" + | "int64" + | "password" + | "string"; + items?: OpenApiSchema; + maximum?: number; + maxItems?: number; + maxLength?: number; + maxProperties?: number; + minimum?: number; + minItems?: number; + minLength?: number; + minProperties?: number; + multipleOf?: number; + not?: OpenApiSchema[]; + nullable?: boolean; + oneOf?: OpenApiSchema[]; + pattern?: string; + properties?: Dictionary<OpenApiSchema>; + readOnly?: boolean; + required?: string[]; + title?: string; + type?: string | string[]; + uniqueItems?: boolean; + writeOnly?: boolean; + xml?: OpenApiXml; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiSecurityRequirement.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiSecurityRequirement.ts new file mode 100644 index 0000000000000000000000000000000000000000..9d083556eb3fc1ffb425cd6a2c14fe26e4941357 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiSecurityRequirement.ts @@ -0,0 +1,6 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-requirement-object + */ +export interface OpenApiSecurityRequirement { + [name: string]: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiSecurityScheme.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiSecurityScheme.ts new file mode 100644 index 0000000000000000000000000000000000000000..2d00b44a52fc84969ba13656555ebab26c96447d --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiSecurityScheme.ts @@ -0,0 +1,16 @@ +import type { OpenApiOAuthFlows } from "./OpenApiOAuthFlows"; +import type { OpenApiReference } from "./OpenApiReference"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-scheme-object + */ +export interface OpenApiSecurityScheme extends OpenApiReference { + type: "apiKey" | "http" | "oauth2" | "openIdConnect"; + description?: string; + name?: string; + in?: "query" | "header" | "cookie"; + scheme?: string; + bearerFormat?: string; + flows?: OpenApiOAuthFlows; + openIdConnectUrl?: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiServer.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiServer.ts new file mode 100644 index 0000000000000000000000000000000000000000..0de23918106bfa8478d0e2949d1ddeffc49e1e8e --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiServer.ts @@ -0,0 +1,11 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApiServerVariable } from "./OpenApiServerVariable"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#server-object + */ +export interface OpenApiServer { + url: string; + description?: string; + variables?: Dictionary<OpenApiServerVariable>; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiServerVariable.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiServerVariable.ts new file mode 100644 index 0000000000000000000000000000000000000000..4022d7e77139f06079fe832fb3d7ebf87c9e2880 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiServerVariable.ts @@ -0,0 +1,10 @@ +import type { WithEnumExtension } from "../../common/interfaces/WithEnumExtension"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#server-variable-object + */ +export interface OpenApiServerVariable extends WithEnumExtension { + enum?: (string | number)[]; + default: string; + description?: string; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiTag.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiTag.ts new file mode 100644 index 0000000000000000000000000000000000000000..620d60cc0319510c6645400d11b6cf67d4450caf --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiTag.ts @@ -0,0 +1,10 @@ +import type { OpenApiExternalDocs } from "./OpenApiExternalDocs"; + +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#tag-object + */ +export interface OpenApiTag { + name: string; + description?: string; + externalDocs?: OpenApiExternalDocs; +} diff --git a/tools/openapi-ts/openApi/v3/interfaces/OpenApiXml.ts b/tools/openapi-ts/openApi/v3/interfaces/OpenApiXml.ts new file mode 100644 index 0000000000000000000000000000000000000000..597b0d68d491c1b8642923a147ea20c09ec7489a --- /dev/null +++ b/tools/openapi-ts/openApi/v3/interfaces/OpenApiXml.ts @@ -0,0 +1,10 @@ +/** + * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#xml-object + */ +export interface OpenApiXml { + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; +} diff --git a/tools/openapi-ts/openApi/v3/parser/discriminator.ts b/tools/openapi-ts/openApi/v3/parser/discriminator.ts new file mode 100644 index 0000000000000000000000000000000000000000..6826c98782385b41a38cb2ecd6fe66968f4d477b --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/discriminator.ts @@ -0,0 +1,42 @@ +import type { Model } from "../../common/interfaces/client"; +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import { stripNamespace } from "../../common/parser/stripNamespace"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiDiscriminator } from "../interfaces/OpenApiDiscriminator"; + +const inverseDictionary = (map: Dictionary<string>): Dictionary<string> => { + const m2: Dictionary<string> = {}; + for (const key in map) { + m2[map[key]] = key; + } + return m2; +}; + +export const findOneOfParentDiscriminator = (openApi: OpenApi, parent?: Model): OpenApiDiscriminator | undefined => { + if (openApi.components && parent) { + for (const definitionName in openApi.components.schemas) { + if (openApi.components.schemas.hasOwnProperty(definitionName)) { + const schema = openApi.components.schemas[definitionName]; + if ( + schema.discriminator && + schema.oneOf?.length && + schema.oneOf.some((definition) => definition.$ref && stripNamespace(definition.$ref) == parent.name) + ) { + return schema.discriminator; + } + } + } + } + return undefined; +}; + +export const mapPropertyValue = (discriminator: OpenApiDiscriminator, parent: Model): string => { + if (discriminator.mapping) { + const mapping = inverseDictionary(discriminator.mapping); + const key = Object.keys(mapping).find((item) => stripNamespace(item) == parent.name); + if (key && mapping[key]) { + return mapping[key]; + } + } + return parent.name; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getContent.ts b/tools/openapi-ts/openApi/v3/parser/getContent.ts new file mode 100644 index 0000000000000000000000000000000000000000..4e5d3f5d2b47f53625a7778b90d17664b9348525 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getContent.ts @@ -0,0 +1,46 @@ +import type { Dictionary } from "../../common/interfaces/Dictionary"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiMediaType } from "../interfaces/OpenApiMediaType"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; + +export interface Content { + mediaType: string; + schema: OpenApiSchema; +} + +const BASIC_MEDIA_TYPES = [ + "application/json-patch+json", + "application/json", + "application/ld+json", + "application/x-www-form-urlencoded", + "text/json", + "text/plain", + "multipart/form-data", + "multipart/mixed", + "multipart/related", + "multipart/batch", +]; + +export const getContent = (openApi: OpenApi, content: Dictionary<OpenApiMediaType>): Content | null => { + const basicMediaTypeWithSchema = Object.keys(content) + .filter((mediaType) => { + const cleanMediaType = mediaType.split(";")[0].trim(); + return BASIC_MEDIA_TYPES.includes(cleanMediaType); + }) + .find((mediaType) => Boolean(content[mediaType]?.schema)); + if (basicMediaTypeWithSchema) { + return { + mediaType: basicMediaTypeWithSchema, + schema: content[basicMediaTypeWithSchema].schema as OpenApiSchema, + }; + } + + const firstMediaTypeWithSchema = Object.keys(content).find((mediaType) => Boolean(content[mediaType]?.schema)); + if (firstMediaTypeWithSchema) { + return { + mediaType: firstMediaTypeWithSchema, + schema: content[firstMediaTypeWithSchema].schema as OpenApiSchema, + }; + } + return null; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getModel.ts b/tools/openapi-ts/openApi/v3/parser/getModel.ts new file mode 100644 index 0000000000000000000000000000000000000000..f7b818056158f089aa687eeeb3e29d720b0f0fd9 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getModel.ts @@ -0,0 +1,184 @@ +import type { Model } from "../../common/interfaces/client"; +import { getDefault } from "../../common/parser/getDefault"; +import { getEnums } from "../../common/parser/getEnums"; +import { getPattern } from "../../common/parser/getPattern"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import { findModelComposition, getModelComposition } from "./getModelComposition"; +import { getAdditionalPropertiesModel, getModelProperties } from "./getModelProperties"; +import { inferType } from "./inferType"; + +export const getModel = ( + openApi: OpenApi, + definition: OpenApiSchema, + isDefinition: boolean = false, + name: string = "", + parentDefinition: OpenApiSchema | null = null, +): Model => { + const inferredType = inferType(definition); + const model: Model = { + $refs: [], + base: "unknown", + deprecated: Boolean(definition.deprecated), + description: definition.description || null, + enum: [], + enums: [], + exclusiveMaximum: definition.exclusiveMaximum, + exclusiveMinimum: definition.exclusiveMinimum, + export: "interface", + format: definition.format, + imports: [], + isDefinition, + isNullable: definition.nullable === true, + isReadOnly: definition.readOnly === true, + isRequired: false, + link: null, + maxItems: definition.maxItems, + maxLength: definition.maxLength, + maxProperties: definition.maxProperties, + maximum: definition.maximum, + minItems: definition.minItems, + minLength: definition.minLength, + minProperties: definition.minProperties, + minimum: definition.minimum, + multipleOf: definition.multipleOf, + name, + pattern: getPattern(definition.pattern), + properties: [], + template: null, + type: "unknown", + uniqueItems: definition.uniqueItems, + }; + + if (definition.$ref) { + const definitionRef = getType(definition.$ref); + model.$refs = [...model.$refs, definition.$ref]; + model.base = definitionRef.base; + model.export = "reference"; + model.imports = [...model.imports, ...definitionRef.imports]; + model.template = definitionRef.template; + model.type = definitionRef.type; + model.default = getDefault(definition, model); + return model; + } + + if (inferredType === "enum") { + const enums = getEnums(definition, definition.enum); + if (enums.length) { + model.base = "string"; + model.enum = [...model.enum, ...enums]; + model.export = "enum"; + model.type = "string"; + model.default = getDefault(definition, model); + return model; + } + } + + if (definition.type === "array" && definition.items) { + if (definition.items.$ref) { + const arrayItems = getType(definition.items.$ref); + model.$refs = [...model.$refs, definition.items.$ref]; + model.base = arrayItems.base; + model.export = "array"; + model.imports = [...model.imports, ...arrayItems.imports]; + model.template = arrayItems.template; + model.type = arrayItems.type; + model.default = getDefault(definition, model); + return model; + } + + if (definition.items.anyOf && parentDefinition && parentDefinition.type) { + const foundComposition = findModelComposition(parentDefinition); + if (foundComposition && foundComposition.definitions.some((definition) => definition.type !== "array")) { + return getModel(openApi, definition.items); + } + } + + /** + * if items are a plain array, infer any-of composition + * {@link} https://github.com/ferdikoomen/openapi-typescript-codegen/issues/2062 + */ + const arrayItemsDefinition: OpenApiSchema = Array.isArray(definition.items) + ? { + anyOf: definition.items, + } + : definition.items; + const arrayItems = getModel(openApi, arrayItemsDefinition); + model.base = arrayItems.base; + model.export = "array"; + model.$refs = [...model.$refs, ...arrayItems.$refs]; + model.imports = [...model.imports, ...arrayItems.imports]; + model.link = arrayItems; + model.template = arrayItems.template; + model.type = arrayItems.type; + model.default = getDefault(definition, model); + return model; + } + + const foundComposition = findModelComposition(definition); + if (foundComposition) { + const composition = getModelComposition({ + ...foundComposition, + definition, + getModel, + model, + openApi, + }); + return { ...model, ...composition }; + } + + if (definition.type === "object" || definition.properties) { + if (definition.properties) { + model.base = "unknown"; + model.export = "interface"; + model.type = "unknown"; + model.default = getDefault(definition, model); + + const modelProperties = getModelProperties(openApi, definition, getModel, model); + modelProperties.forEach((modelProperty) => { + model.$refs = [...model.$refs, ...modelProperty.$refs]; + model.enums = [...model.enums, ...modelProperty.enums]; + model.imports = [...model.imports, ...modelProperty.imports]; + model.properties.push(modelProperty); + if (modelProperty.export === "enum") { + model.enums = [...model.enums, modelProperty]; + } + }); + + if (definition.additionalProperties) { + const modelProperty = getAdditionalPropertiesModel(openApi, definition, getModel, model); + model.properties.push(modelProperty); + } + + return model; + } + + return getAdditionalPropertiesModel(openApi, definition, getModel, model); + } + + if (definition.const !== undefined) { + const definitionConst = definition.const; + const modelConst = typeof definitionConst === "string" ? `"${definitionConst}"` : `${definitionConst}`; + model.base = modelConst; + model.export = "const"; + model.type = modelConst; + return model; + } + + // If the schema has a type than it can be a basic or generic type. + if (definition.type) { + const definitionType = getType(definition.type, definition.format); + model.base = definitionType.base; + model.export = "generic"; + model.$refs = [...model.$refs, ...definitionType.$refs]; + model.imports = [...model.imports, ...definitionType.imports]; + model.isNullable = definitionType.isNullable || model.isNullable; + model.template = definitionType.template; + model.type = definitionType.type; + model.default = getDefault(definition, model); + return model; + } + + return model; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getModelComposition.ts b/tools/openapi-ts/openApi/v3/parser/getModelComposition.ts new file mode 100644 index 0000000000000000000000000000000000000000..2fef6a418fdc7c5b1df059d78924cad75a2142af --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getModelComposition.ts @@ -0,0 +1,126 @@ +import type { Model, ModelComposition } from "../../common/interfaces/client"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import type { getModel } from "./getModel"; +import { getModelProperties } from "./getModelProperties"; +import { getRequiredPropertiesFromComposition } from "./getRequiredPropertiesFromComposition"; + +// Fix for circular dependency +export type GetModelFn = typeof getModel; + +type Composition = { + definitions: OpenApiSchema[]; + type: ModelComposition["export"]; +}; + +export const findModelComposition = (definition: OpenApiSchema): Composition | undefined => { + const compositions: ReadonlyArray<{ + definitions: Composition["definitions"] | undefined; + type: Composition["type"]; + }> = [ + { + definitions: definition.allOf, + type: "all-of", + }, + { + definitions: definition.anyOf, + type: "any-of", + }, + { + definitions: definition.oneOf, + type: "one-of", + }, + ]; + return compositions.find((composition) => composition.definitions?.length) as ReturnType<typeof findModelComposition>; +}; + +export const getModelComposition = ({ + definition, + definitions, + getModel, + model, + openApi, + type, +}: Composition & { + definition: OpenApiSchema; + getModel: GetModelFn; + model: Model; + openApi: OpenApi; +}): ModelComposition => { + const composition: ModelComposition = { + $refs: model.$refs, + enums: model.enums, + export: type, + imports: model.imports, + properties: model.properties, + }; + + const properties: Model[] = []; + + definitions + .map((def) => getModel(openApi, def, undefined, undefined, definition)) + .forEach((model) => { + composition.$refs = [...composition.$refs, ...model.$refs]; + composition.imports = [...composition.imports, ...model.imports]; + composition.enums.push(...model.enums); + composition.properties.push(model); + }); + + if (definition.required) { + const requiredProperties = getRequiredPropertiesFromComposition( + openApi, + definition.required, + definitions, + getModel, + ); + requiredProperties.forEach((requiredProperty) => { + composition.$refs = [...composition.$refs, ...requiredProperty.$refs]; + composition.imports = [...composition.imports, ...requiredProperty.imports]; + composition.enums.push(...requiredProperty.enums); + }); + properties.push(...requiredProperties); + } + + if (definition.properties) { + const modelProperties = getModelProperties(openApi, definition, getModel); + modelProperties.forEach((modelProperty) => { + composition.$refs = [...composition.$refs, ...modelProperty.$refs]; + composition.imports = [...composition.imports, ...modelProperty.imports]; + composition.enums.push(...modelProperty.enums); + if (modelProperty.export === "enum") { + composition.enums.push(modelProperty); + } + }); + properties.push(...modelProperties); + } + + if (properties.length) { + const foundComposition = findModelComposition(definition); + if (foundComposition?.type === "one-of") { + composition.properties.forEach((property) => { + property.properties.push(...properties); + }); + } else { + composition.properties.push({ + $refs: [], + base: "unknown", + description: "", + enum: [], + enums: [], + export: "interface", + imports: [], + isDefinition: false, + isNullable: false, + isReadOnly: false, + isRequired: false, + link: null, + name: "properties", + properties, + template: null, + type: "unknown", + }); + } + } + + return composition; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getModelProperties.ts b/tools/openapi-ts/openApi/v3/parser/getModelProperties.ts new file mode 100644 index 0000000000000000000000000000000000000000..8b04e0b2e64c53731497e9be1bb4d1dabae217fb --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getModelProperties.ts @@ -0,0 +1,155 @@ +import { escapeName } from "../../../utils/escape"; +import type { Model } from "../../common/interfaces/client"; +import { getDefault } from "../../common/parser/getDefault"; +import { getPattern } from "../../common/parser/getPattern"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import { findOneOfParentDiscriminator, mapPropertyValue } from "./discriminator"; +import type { getModel } from "./getModel"; + +// Fix for circular dependency +export type GetModelFn = typeof getModel; + +export const getAdditionalPropertiesModel = ( + openApi: OpenApi, + definition: OpenApiSchema, + getModel: GetModelFn, + model: Model, +): Model => { + const ap = typeof definition.additionalProperties === "object" ? definition.additionalProperties : {}; + const apModel = getModel(openApi, ap); + + if (ap.$ref) { + const apType = getType(ap.$ref); + model.base = apType.base; + model.default = getDefault(definition, model); + model.export = "dictionary"; + model.imports.push(...apType.imports); + model.template = apType.template; + model.type = apType.type; + return model; + } + + if (definition.additionalProperties && definition.properties) { + apModel.default = getDefault(definition, model); + apModel.export = "generic"; + apModel.isRequired = definition.additionalProperties === true; + apModel.name = "[key: string]"; + return apModel; + } + + model.base = apModel.base; + model.default = getDefault(definition, model); + model.export = "dictionary"; + model.imports.push(...apModel.imports); + model.link = apModel; + model.template = apModel.template; + model.type = apModel.type; + return model; +}; + +export const getModelProperties = ( + openApi: OpenApi, + definition: OpenApiSchema, + getModel: GetModelFn, + parent?: Model, +): Model[] => { + const models: Model[] = []; + const discriminator = findOneOfParentDiscriminator(openApi, parent); + + for (const propertyName in definition.properties) { + if (definition.properties.hasOwnProperty(propertyName)) { + const property = definition.properties[propertyName]; + const propertyRequired = !!definition.required?.includes(propertyName); + const propertyValues: Omit< + Model, + | "$refs" + | "base" + | "enum" + | "enums" + | "export" + | "imports" + | "isNullable" + | "link" + | "properties" + | "template" + | "type" + > = { + default: property.default, + deprecated: property.deprecated === true, + description: property.description || null, + exclusiveMaximum: property.exclusiveMaximum, + exclusiveMinimum: property.exclusiveMinimum, + format: property.format, + isDefinition: false, + isReadOnly: property.readOnly === true, + isRequired: propertyRequired, + maxItems: property.maxItems, + maxLength: property.maxLength, + maxProperties: property.maxProperties, + maximum: property.maximum, + minItems: property.minItems, + minLength: property.minLength, + minProperties: property.minProperties, + minimum: property.minimum, + multipleOf: property.multipleOf, + name: escapeName(propertyName), + pattern: getPattern(property.pattern), + uniqueItems: property.uniqueItems, + }; + + if (parent && discriminator?.propertyName == propertyName) { + models.push({ + ...propertyValues, + $refs: [], + base: `'${mapPropertyValue(discriminator, parent)}'`, + enum: [], + enums: [], + export: "reference", + imports: [], + isNullable: property.nullable === true, + link: null, + properties: [], + template: null, + type: "string", + }); + } else if (property.$ref) { + const model = getType(property.$ref); + models.push({ + ...propertyValues, + $refs: model.$refs, + base: model.base, + enum: [], + enums: [], + export: "reference", + imports: model.imports, + isNullable: model.isNullable || property.nullable === true, + link: null, + properties: [], + template: model.template, + type: model.type, + }); + } else { + const model = getModel(openApi, property); + models.push({ + ...propertyValues, + $refs: model.$refs, + base: model.base, + default: model.default, + enum: model.enum, + enums: model.enums, + export: model.export, + imports: model.imports, + isNullable: model.isNullable || property.nullable === true, + link: model.link, + properties: model.properties, + template: model.template, + type: model.type, + }); + } + } + } + + return models; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getModels.ts b/tools/openapi-ts/openApi/v3/parser/getModels.ts new file mode 100644 index 0000000000000000000000000000000000000000..035d1ed23f6f43d512bd5d540ebda8861a6b91a3 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getModels.ts @@ -0,0 +1,33 @@ +import type { Model } from "../../common/interfaces/client"; +import { reservedWords } from "../../common/parser/reservedWords"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import { getModel } from "./getModel"; + +export const getModels = (openApi: OpenApi): Model[] => { + const models: Model[] = []; + if (openApi.components) { + for (const definitionName in openApi.components.schemas) { + if (openApi.components.schemas.hasOwnProperty(definitionName)) { + const definition = openApi.components.schemas[definitionName]; + const definitionType = getType(definitionName); + const model = getModel(openApi, definition, true, definitionType.base.replace(reservedWords, "_$1")); + models.push(model); + } + } + for (const definitionName in openApi.components.parameters) { + if (openApi.components.parameters.hasOwnProperty(definitionName)) { + const definition = openApi.components.parameters[definitionName]; + const definitionType = getType(definitionName); + const schema = definition.schema; + if (schema) { + const model = getModel(openApi, schema, true, definitionType.base.replace(reservedWords, "_$1")); + model.description = definition.description || null; + model.deprecated = definition.deprecated; + models.push(model); + } + } + } + } + return models; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getOperationParameter.ts b/tools/openapi-ts/openApi/v3/parser/getOperationParameter.ts new file mode 100644 index 0000000000000000000000000000000000000000..d63a4260f3d6f82c7a0fdb6c3865599255c2b2b1 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getOperationParameter.ts @@ -0,0 +1,97 @@ +import type { OperationParameter } from "../../common/interfaces/client"; +import { getDefault } from "../../common/parser/getDefault"; +import { getPattern } from "../../common/parser/getPattern"; +import { getRef } from "../../common/parser/getRef"; +import { getOperationParameterName } from "../../common/parser/operation"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiParameter } from "../interfaces/OpenApiParameter"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import { getModel } from "./getModel"; + +export const getOperationParameter = (openApi: OpenApi, parameter: OpenApiParameter): OperationParameter => { + const operationParameter: OperationParameter = { + $refs: [], + base: "unknown", + deprecated: parameter.deprecated === true, + description: parameter.description || null, + enum: [], + enums: [], + export: "interface", + imports: [], + in: parameter.in, + isDefinition: false, + isNullable: parameter.nullable === true, + isReadOnly: false, + isRequired: parameter.required === true, + link: null, + mediaType: null, + name: getOperationParameterName(parameter.name), + prop: parameter.name, + properties: [], + template: null, + type: "unknown", + }; + + if (parameter.$ref) { + const definitionRef = getType(parameter.$ref); + operationParameter.export = "reference"; + operationParameter.type = definitionRef.type; + operationParameter.base = definitionRef.base; + operationParameter.template = definitionRef.template; + operationParameter.$refs = [...operationParameter.$refs, ...definitionRef.$refs]; + operationParameter.imports = [...operationParameter.imports, ...definitionRef.imports]; + return operationParameter; + } + + let schema = parameter.schema; + if (schema) { + if (schema.$ref?.startsWith("#/components/parameters/")) { + schema = getRef<OpenApiSchema>(openApi, schema); + } + if (schema.$ref) { + const model = getType(schema.$ref); + operationParameter.export = "reference"; + operationParameter.type = model.type; + operationParameter.base = model.base; + operationParameter.template = model.template; + operationParameter.$refs = [...operationParameter.$refs, ...model.$refs]; + operationParameter.imports = [...operationParameter.imports, ...model.imports]; + operationParameter.default = getDefault(schema); + return operationParameter; + } else { + const model = getModel(openApi, schema); + operationParameter.export = model.export; + operationParameter.type = model.type; + operationParameter.base = model.base; + operationParameter.template = model.template; + operationParameter.link = model.link; + operationParameter.isReadOnly = model.isReadOnly; + operationParameter.isRequired = operationParameter.isRequired || model.isRequired; + operationParameter.isNullable = operationParameter.isNullable || model.isNullable; + operationParameter.format = model.format; + operationParameter.maximum = model.maximum; + operationParameter.exclusiveMaximum = model.exclusiveMaximum; + operationParameter.minimum = model.minimum; + operationParameter.exclusiveMinimum = model.exclusiveMinimum; + operationParameter.multipleOf = model.multipleOf; + operationParameter.maxLength = model.maxLength; + operationParameter.minLength = model.minLength; + operationParameter.maxItems = model.maxItems; + operationParameter.minItems = model.minItems; + operationParameter.uniqueItems = model.uniqueItems; + operationParameter.maxProperties = model.maxProperties; + operationParameter.minProperties = model.minProperties; + operationParameter.pattern = getPattern(model.pattern); + operationParameter.default = model.default; + operationParameter.$refs = [...operationParameter.$refs, ...model.$refs]; + operationParameter.imports = [...operationParameter.imports, ...model.imports]; + operationParameter.enum.push(...model.enum); + operationParameter.enums.push(...model.enums); + operationParameter.properties.push(...model.properties); + return operationParameter; + } + } + + return operationParameter; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getOperationParameters.ts b/tools/openapi-ts/openApi/v3/parser/getOperationParameters.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff6f3851b75e183c1bbe907bb75a99d595f2cebf --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getOperationParameters.ts @@ -0,0 +1,58 @@ +import type { OperationParameters } from "../../common/interfaces/client"; +import { getRef } from "../../common/parser/getRef"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiParameter } from "../interfaces/OpenApiParameter"; +import { getOperationParameter } from "./getOperationParameter"; + +const allowedIn = ["cookie", "formData", "header", "path", "query"] as const; + +export const getOperationParameters = (openApi: OpenApi, parameters: OpenApiParameter[]): OperationParameters => { + const operationParameters: OperationParameters = { + $refs: [], + imports: [], + parameters: [], + parametersBody: null, + parametersCookie: [], + parametersForm: [], + parametersHeader: [], + parametersPath: [], + parametersQuery: [], // Not used in v3 -> @see requestBody + }; + + parameters.forEach((parameterOrReference) => { + const parameterDef = getRef<OpenApiParameter>(openApi, parameterOrReference); + const parameter = getOperationParameter(openApi, parameterDef); + + const defIn = parameterDef.in as (typeof allowedIn)[number]; + + // ignore the "api-version" param since we do not want to add it + // as the first/default parameter for each of the service calls + if (parameter.prop === "api-version" || !allowedIn.includes(defIn)) { + return; + } + + switch (defIn) { + case "cookie": + operationParameters.parametersCookie = [...operationParameters.parametersCookie, parameter]; + break; + case "formData": + operationParameters.parametersForm = [...operationParameters.parametersForm, parameter]; + break; + case "header": + operationParameters.parametersHeader = [...operationParameters.parametersHeader, parameter]; + break; + case "path": + operationParameters.parametersPath = [...operationParameters.parametersPath, parameter]; + break; + case "query": + operationParameters.parametersQuery = [...operationParameters.parametersQuery, parameter]; + break; + } + + operationParameters.$refs = [...operationParameters.$refs, ...parameter.$refs]; + operationParameters.imports = [...operationParameters.imports, ...parameter.imports]; + operationParameters.parameters = [...operationParameters.parameters, parameter]; + }); + + return operationParameters; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getOperationRequestBody.ts b/tools/openapi-ts/openApi/v3/parser/getOperationRequestBody.ts new file mode 100644 index 0000000000000000000000000000000000000000..75e8d372276e05d7ece0a833ec3ef2da8eb21302 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getOperationRequestBody.ts @@ -0,0 +1,89 @@ +import type { OperationParameter } from "../../common/interfaces/client"; +import { getPattern } from "../../common/parser/getPattern"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiRequestBody } from "../interfaces/OpenApiRequestBody"; +import { getContent } from "./getContent"; +import { getModel } from "./getModel"; + +export const getOperationRequestBody = (openApi: OpenApi, body: OpenApiRequestBody): OperationParameter => { + const requestBody: OperationParameter = { + $refs: [], + base: "unknown", + default: undefined, + description: body.description || null, + enum: [], + enums: [], + export: "interface", + imports: [], + in: "body", + isDefinition: false, + isNullable: body.nullable === true, + isReadOnly: false, + isRequired: body.required === true, + link: null, + mediaType: null, + name: body["x-body-name"] ?? "requestBody", + prop: body["x-body-name"] ?? "requestBody", + properties: [], + template: null, + type: "unknown", + }; + + if (body.content) { + const content = getContent(openApi, body.content); + if (content) { + requestBody.mediaType = content.mediaType; + switch (requestBody.mediaType) { + case "application/x-www-form-urlencoded": + case "multipart/form-data": + requestBody.in = "formData"; + requestBody.name = "formData"; + requestBody.prop = "formData"; + break; + } + if (content.schema.$ref) { + const model = getType(content.schema.$ref); + requestBody.export = "reference"; + requestBody.type = model.type; + requestBody.base = model.base; + requestBody.template = model.template; + requestBody.$refs = [...requestBody.$refs, ...model.$refs]; + requestBody.imports = [...requestBody.imports, ...model.imports]; + return requestBody; + } else { + const model = getModel(openApi, content.schema); + requestBody.export = model.export; + requestBody.type = model.type; + requestBody.base = model.base; + requestBody.template = model.template; + requestBody.link = model.link; + requestBody.isReadOnly = model.isReadOnly; + requestBody.isRequired = requestBody.isRequired || model.isRequired; + requestBody.isNullable = requestBody.isNullable || model.isNullable; + requestBody.format = model.format; + requestBody.maximum = model.maximum; + requestBody.exclusiveMaximum = model.exclusiveMaximum; + requestBody.minimum = model.minimum; + requestBody.exclusiveMinimum = model.exclusiveMinimum; + requestBody.multipleOf = model.multipleOf; + requestBody.maxLength = model.maxLength; + requestBody.minLength = model.minLength; + requestBody.maxItems = model.maxItems; + requestBody.minItems = model.minItems; + requestBody.uniqueItems = model.uniqueItems; + requestBody.maxProperties = model.maxProperties; + requestBody.minProperties = model.minProperties; + requestBody.pattern = getPattern(model.pattern); + requestBody.$refs = [...requestBody.$refs, ...model.$refs]; + requestBody.imports = [...requestBody.imports, ...model.imports]; + requestBody.enum.push(...model.enum); + requestBody.enums.push(...model.enums); + requestBody.properties.push(...model.properties); + return requestBody; + } + } + } + + return requestBody; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getOperationResponse.ts b/tools/openapi-ts/openApi/v3/parser/getOperationResponse.ts new file mode 100644 index 0000000000000000000000000000000000000000..a8fd1cf01a2a696dda9817977576541a140dcc20 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getOperationResponse.ts @@ -0,0 +1,101 @@ +import type { OperationResponse } from "../../common/interfaces/client"; +import { getPattern } from "../../common/parser/getPattern"; +import { getRef } from "../../common/parser/getRef"; +import { getType } from "../../common/parser/type"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiResponse } from "../interfaces/OpenApiResponse"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import { getContent } from "./getContent"; +import { getModel } from "./getModel"; + +export const getOperationResponse = ( + openApi: OpenApi, + response: OpenApiResponse, + responseCode: number, +): OperationResponse => { + const operationResponse: OperationResponse = { + $refs: [], + base: responseCode !== 204 ? "unknown" : "void", + code: responseCode, + description: response.description || null, + enum: [], + enums: [], + export: "generic", + imports: [], + in: "response", + isDefinition: false, + isNullable: false, + isReadOnly: false, + isRequired: false, + link: null, + name: "", + properties: [], + template: null, + type: responseCode !== 204 ? "unknown" : "void", + }; + + if (response.content) { + const content = getContent(openApi, response.content); + if (content) { + if (content.schema.$ref?.startsWith("#/components/responses/")) { + content.schema = getRef<OpenApiSchema>(openApi, content.schema); + } + if (content.schema.$ref) { + const model = getType(content.schema.$ref); + operationResponse.base = model.base; + operationResponse.export = "reference"; + operationResponse.$refs = [...operationResponse.$refs, ...model.$refs]; + operationResponse.imports = [...operationResponse.imports, ...model.imports]; + operationResponse.template = model.template; + operationResponse.type = model.type; + return operationResponse; + } else { + const model = getModel(openApi, content.schema); + operationResponse.export = model.export; + operationResponse.type = model.type; + operationResponse.base = model.base; + operationResponse.template = model.template; + operationResponse.link = model.link; + operationResponse.isReadOnly = model.isReadOnly; + operationResponse.isRequired = model.isRequired; + operationResponse.isNullable = model.isNullable; + operationResponse.format = model.format; + operationResponse.maximum = model.maximum; + operationResponse.exclusiveMaximum = model.exclusiveMaximum; + operationResponse.minimum = model.minimum; + operationResponse.exclusiveMinimum = model.exclusiveMinimum; + operationResponse.multipleOf = model.multipleOf; + operationResponse.maxLength = model.maxLength; + operationResponse.minLength = model.minLength; + operationResponse.maxItems = model.maxItems; + operationResponse.minItems = model.minItems; + operationResponse.uniqueItems = model.uniqueItems; + operationResponse.maxProperties = model.maxProperties; + operationResponse.minProperties = model.minProperties; + operationResponse.pattern = getPattern(model.pattern); + operationResponse.$refs = [...operationResponse.$refs, ...model.$refs]; + operationResponse.imports = [...operationResponse.imports, ...model.imports]; + operationResponse.enum.push(...model.enum); + operationResponse.enums.push(...model.enums); + operationResponse.properties.push(...model.properties); + return operationResponse; + } + } + } + + // We support basic properties from response headers, since both + // fetch and XHR client just support string types. + if (response.headers) { + for (const name in response.headers) { + if (response.headers.hasOwnProperty(name)) { + operationResponse.in = "header"; + operationResponse.name = name; + operationResponse.type = "string"; + operationResponse.base = "string"; + return operationResponse; + } + } + } + + return operationResponse; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getOperationResponses.ts b/tools/openapi-ts/openApi/v3/parser/getOperationResponses.ts new file mode 100644 index 0000000000000000000000000000000000000000..92626fc470027c1d9859b2f25e7421d38e480dbe --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getOperationResponses.ts @@ -0,0 +1,29 @@ +import type { OperationResponse } from "../../common/interfaces/client"; +import { getRef } from "../../common/parser/getRef"; +import { getOperationResponseCode } from "../../common/parser/operation"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiResponse } from "../interfaces/OpenApiResponse"; +import type { OpenApiResponses } from "../interfaces/OpenApiResponses"; +import { getOperationResponse } from "./getOperationResponse"; + +export const getOperationResponses = (openApi: OpenApi, responses: OpenApiResponses): OperationResponse[] => { + const operationResponses: OperationResponse[] = []; + + // Iterate over each response code and get the + // status code and response message + for (const code in responses) { + if (responses.hasOwnProperty(code)) { + const responseOrReference = responses[code]; + const response = getRef<OpenApiResponse>(openApi, responseOrReference); + const responseCode = getOperationResponseCode(code); + + if (responseCode) { + const operationResponse = getOperationResponse(openApi, response, responseCode); + operationResponses.push(operationResponse); + } + } + } + + // Sort the responses to 2XX success codes come before 4XX and 5XX error codes. + return operationResponses.sort((a, b): number => (a.code < b.code ? -1 : a.code > b.code ? 1 : 0)); +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getOperationResults.ts b/tools/openapi-ts/openApi/v3/parser/getOperationResults.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f50d1c7078bd6355617cb5ffefb1f5a5d6d8709 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getOperationResults.ts @@ -0,0 +1,25 @@ +import type { Model, OperationResponse } from "../../common/interfaces/client"; + +const areEqual = (a: Model, b: Model): boolean => { + const equal = a.type === b.type && a.base === b.base && a.template === b.template; + if (equal && a.link && b.link) { + return areEqual(a.link, b.link); + } + return equal; +}; + +export const getOperationResults = (operationResponses: OperationResponse[]): OperationResponse[] => { + const operationResults: OperationResponse[] = []; + + // Filter out success response codes + operationResponses.forEach((operationResponse) => { + const { code } = operationResponse; + if (code && code >= 200 && code < 300) { + operationResults.push(operationResponse); + } + }); + + return operationResults.filter( + (operationResult, index, arr) => arr.findIndex((item) => areEqual(item, operationResult)) === index, + ); +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getRequiredPropertiesFromComposition.ts b/tools/openapi-ts/openApi/v3/parser/getRequiredPropertiesFromComposition.ts new file mode 100644 index 0000000000000000000000000000000000000000..0441039445d3b215856b78b76b5f47040a049437 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getRequiredPropertiesFromComposition.ts @@ -0,0 +1,28 @@ +import type { Model } from "../../common/interfaces/client"; +import { getRef } from "../../common/parser/getRef"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; +import type { getModel } from "./getModel"; + +// Fix for circular dependency +export type GetModelFn = typeof getModel; + +export const getRequiredPropertiesFromComposition = ( + openApi: OpenApi, + required: string[], + definitions: OpenApiSchema[], + getModel: GetModelFn, +): Model[] => + definitions + .reduce((properties, definition) => { + if (definition.$ref) { + const schema = getRef<OpenApiSchema>(openApi, definition); + return [...properties, ...getModel(openApi, schema).properties]; + } + return [...properties, ...getModel(openApi, definition).properties]; + }, [] as Model[]) + .filter((property) => !property.isRequired && required.includes(property.name)) + .map((property) => ({ + ...property, + isRequired: true, + })); diff --git a/tools/openapi-ts/openApi/v3/parser/getServer.ts b/tools/openapi-ts/openApi/v3/parser/getServer.ts new file mode 100644 index 0000000000000000000000000000000000000000..3518da7a17555f0467225afe254e3955113524df --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getServer.ts @@ -0,0 +1,13 @@ +import type { OpenApi } from "../interfaces/OpenApi"; + +export const getServer = (openApi: OpenApi): string => { + const server = openApi.servers?.[0]; + const variables = server?.variables || {}; + let url = server?.url || ""; + for (const variable in variables) { + if (variables.hasOwnProperty(variable)) { + url = url.replace(`{${variable}}`, variables[variable].default); + } + } + return url.replace(/\/$/g, ""); +}; diff --git a/tools/openapi-ts/openApi/v3/parser/getServices.ts b/tools/openapi-ts/openApi/v3/parser/getServices.ts new file mode 100644 index 0000000000000000000000000000000000000000..2f9fe62edb82c055205020712bc217c33c169cdd --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/getServices.ts @@ -0,0 +1,47 @@ +import { unique } from "../../../utils/unique"; +import type { Operation, Service } from "../../common/interfaces/client"; +import type { OpenApi } from "../interfaces/OpenApi"; +import { getOperationParameters } from "./getOperationParameters"; +import { getOperation } from "./operation"; + +const allowedServiceMethods = ["delete", "get", "head", "options", "patch", "post", "put"] as const; + +const getNewService = (operation: Operation): Service => ({ + $refs: [], + imports: [], + name: operation.service, + operations: [], +}); + +export const getServices = (openApi: OpenApi): Service[] => { + const services = new Map<string, Service>(); + + for (const url in openApi.paths) { + const path = openApi.paths[url]; + const pathParams = getOperationParameters(openApi, path.parameters ?? []); + + for (const key in path) { + const method = key as Lowercase<Operation["method"]>; + if (allowedServiceMethods.includes(method)) { + const op = path[method]!; + const tags = op.tags?.length ? op.tags.filter(unique) : ["Default"]; + tags.forEach((tag) => { + const operation = getOperation(openApi, { + method, + op, + pathParams, + tag, + url, + }); + const service = services.get(operation.service) || getNewService(operation); + service.$refs = [...service.$refs, ...operation.$refs]; + service.imports = [...service.imports, ...operation.imports]; + service.operations = [...service.operations, operation]; + services.set(operation.service, service); + }); + } + } + } + + return Array.from(services.values()); +}; diff --git a/tools/openapi-ts/openApi/v3/parser/inferType.ts b/tools/openapi-ts/openApi/v3/parser/inferType.ts new file mode 100644 index 0000000000000000000000000000000000000000..e41ed0f2cff643b3df6d5d171e96f32862814cbc --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/inferType.ts @@ -0,0 +1,8 @@ +import type { OpenApiSchema } from "../interfaces/OpenApiSchema"; + +export const inferType = (definition: OpenApiSchema) => { + if (definition.enum && definition.type !== "boolean") { + return "enum"; + } + return undefined; +}; diff --git a/tools/openapi-ts/openApi/v3/parser/operation.ts b/tools/openapi-ts/openApi/v3/parser/operation.ts new file mode 100644 index 0000000000000000000000000000000000000000..dced7a80b9bfb6d2b20dae3dee0e06baf5a09bd8 --- /dev/null +++ b/tools/openapi-ts/openApi/v3/parser/operation.ts @@ -0,0 +1,113 @@ +import type { Operation, OperationParameter, OperationParameters } from "../../common/interfaces/client"; +import { getRef } from "../../common/parser/getRef"; +import { getOperationErrors, getOperationName, getOperationResponseHeader } from "../../common/parser/operation"; +import { getServiceName } from "../../common/parser/service"; +import { toSortedByRequired } from "../../common/parser/sort"; +import type { OpenApi } from "../interfaces/OpenApi"; +import type { OpenApiOperation } from "../interfaces/OpenApiOperation"; +import type { OpenApiRequestBody } from "../interfaces/OpenApiRequestBody"; +import { getOperationParameters } from "./getOperationParameters"; +import { getOperationRequestBody } from "./getOperationRequestBody"; +import { getOperationResponses } from "./getOperationResponses"; +import { getOperationResults } from "./getOperationResults"; + +// add global path parameters, skip duplicate names +const mergeParameters = (opParams: OperationParameter[], globalParams: OperationParameter[]): OperationParameter[] => { + let mergedParameters = [...opParams]; + let pendingParameters = [...globalParams]; + while (pendingParameters.length > 0) { + const pendingParam = pendingParameters[0]; + pendingParameters = pendingParameters.slice(1); + const canMerge = mergedParameters.every( + (param) => param.in !== pendingParam.in || param.name !== pendingParam.name, + ); + if (canMerge) { + mergedParameters = [...mergedParameters, pendingParam]; + } + } + return mergedParameters; +}; + +export const getOperation = ( + openApi: OpenApi, + data: { + method: Lowercase<Operation["method"]>; + op: OpenApiOperation; + pathParams: OperationParameters; + tag: string; + url: string; + }, +): Operation => { + const { method, op, pathParams, tag, url } = data; + const service = getServiceName(tag); + const name = getOperationName(url, method, op.operationId); + + const operation: Operation = { + $refs: [], + deprecated: Boolean(op.deprecated), + description: op.description || null, + errors: [], + imports: [], + method: method.toUpperCase() as Operation["method"], + name, + parameters: [], + parametersBody: pathParams.parametersBody, + parametersCookie: [], + parametersForm: [], + parametersHeader: [], + parametersPath: [], + parametersQuery: [], + path: url, + responseHeader: null, + results: [], + service, + summary: op.summary || null, + }; + + if (op.parameters) { + const parameters = getOperationParameters(openApi, op.parameters); + operation.$refs = [...operation.$refs, ...parameters.$refs]; + operation.imports = [...operation.imports, ...parameters.imports]; + operation.parameters = [...operation.parameters, ...parameters.parameters]; + operation.parametersBody = parameters.parametersBody; + operation.parametersCookie = [...operation.parametersCookie, ...parameters.parametersCookie]; + operation.parametersForm = [...operation.parametersForm, ...parameters.parametersForm]; + operation.parametersHeader = [...operation.parametersHeader, ...parameters.parametersHeader]; + operation.parametersPath = [...operation.parametersPath, ...parameters.parametersPath]; + operation.parametersQuery = [...operation.parametersQuery, ...parameters.parametersQuery]; + } + + if (op.requestBody) { + const requestBodyDef = getRef<OpenApiRequestBody>(openApi, op.requestBody); + const requestBody = getOperationRequestBody(openApi, requestBodyDef); + operation.$refs = [...operation.$refs, ...requestBody.$refs]; + operation.imports = [...operation.imports, ...requestBody.imports]; + operation.parameters = [...operation.parameters, requestBody]; + operation.parametersBody = requestBody; + } + + if (op.responses) { + const operationResponses = getOperationResponses(openApi, op.responses); + const operationResults = getOperationResults(operationResponses); + operation.errors = getOperationErrors(operationResponses); + operation.responseHeader = getOperationResponseHeader(operationResults); + + operationResults.forEach((operationResult) => { + operation.$refs = [...operation.$refs, ...operationResult.$refs]; + operation.imports = [...operation.imports, ...operationResult.imports]; + operation.results = [...operation.results, operationResult]; + }); + } + + operation.parameters = mergeParameters(operation.parameters, pathParams.parameters); + operation.parametersCookie = mergeParameters(operation.parametersCookie, pathParams.parametersCookie); + operation.parametersForm = mergeParameters(operation.parametersForm, pathParams.parametersForm); + operation.parametersHeader = mergeParameters(operation.parametersHeader, pathParams.parametersHeader); + operation.parametersPath = mergeParameters(operation.parametersPath, pathParams.parametersPath); + operation.parametersQuery = mergeParameters(operation.parametersQuery, pathParams.parametersQuery); + + // Sort by required + operation.parameters = toSortedByRequired(operation.parameters); + + return operation; +}; diff --git a/tools/openapi-ts/tsconfig.json b/tools/openapi-ts/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..0b174a3a5f2577e6b8223f4c224a7ad64b9271bc --- /dev/null +++ b/tools/openapi-ts/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "lib": [ + "ESNext", + "DOM" + ], + "stripInternal": true, + "module": "esnext", + "target": "esnext" + }, + "module": "ESNext", + "target": "ESNext", + "extends": "../../tsconfig.node.json", + "include": [ + ".", + ] +} diff --git a/tools/openapi-ts/types/client.ts b/tools/openapi-ts/types/client.ts new file mode 100644 index 0000000000000000000000000000000000000000..032ef399cd1e78772ea4374a82d183a7e0b2b223 --- /dev/null +++ b/tools/openapi-ts/types/client.ts @@ -0,0 +1,9 @@ +import { Model, Service } from "../openApi"; + +export interface Client { + enumNames: string[]; + models: Model[]; + server: string; + services: Service[]; + version: string; +} diff --git a/tools/openapi-ts/types/config.ts b/tools/openapi-ts/types/config.ts new file mode 100644 index 0000000000000000000000000000000000000000..aa36be08977fca9d6ea889a66e7241a9285ca409 --- /dev/null +++ b/tools/openapi-ts/types/config.ts @@ -0,0 +1,150 @@ +export interface UserConfig { + /** + * Manually set base in OpenAPI config instead of inferring from server value + */ + base?: string; + /** + * The selected HTTP client (fetch, xhr, node or axios) + * @default 'fetch' + */ + client?: "angular" | "axios" | "fetch" | "node" | "xhr"; + /** + * Run in debug mode? + * @default false + */ + debug?: boolean; + /** + * Skip writing files to disk? + * @default false + */ + dryRun?: boolean; + /** + * Generate enum definitions? + * @default false + */ + enums?: "javascript" | "typescript" | false; + /** + * Generate core client classes? + * @default true + */ + exportCore?: boolean; + /** + * Process output folder with formatter? + * @default true + */ + format?: boolean; + /** + * The relative location of the OpenAPI spec + */ + input: string | Record<string, unknown>; + /** + * Process output folder with linter? + * @default false + */ + lint?: boolean; + /** + * Custom client class name + */ + name?: string; + /** + * The relative location of the output directory + */ + output: string; + /** + * Path to custom request file + */ + request?: string; + /** + * Generate JSON schemas? + * @default true + */ + schemas?: + | boolean + | { + /** + * Generate JSON schemas? + * @default true + */ + export?: boolean; + /** + * Choose schema type to generate. Select 'form' if you don't want + * descriptions to reduce bundle size and you plan to use schemas + * for form validation + * @default 'json' + */ + type?: "form" | "json"; + }; + /** + * Generate services? + * @default true + */ + services?: + | boolean + | string + | { + /** + * Generate services? + * @default true + */ + export?: boolean; + /** + * Include only services matching regular expression + */ + include?: string; + /** + * Use your preferred naming pattern + * @default '{{name}}Service' + */ + name?: string; + /** + * Use operation ID to generate operation names? + * @default true + */ + operationId?: boolean; + /** + * Define shape of returned value from service calls + * @default 'body' + */ + response?: "body" | "response"; + }; + /** + * Generate types? + * @default true + */ + types?: + | boolean + | string + | { + /** + * Output Date instead of string for format "date-time" + * @default false + */ + dates?: boolean; + /** + * Generate types? + * @default true + */ + export?: boolean; + /** + * Include only types matching regular expression + */ + include?: string; + /** + * Use your preferred naming pattern + * @default 'preserve' + */ + name?: "PascalCase" | "preserve"; + }; + /** + * Use options or arguments functions + * @default true + */ + useOptions?: boolean; +} + +export type Config = Omit<Required<UserConfig>, "base" | "name" | "request" | "schemas" | "services" | "types"> & + Pick<UserConfig, "base" | "name" | "request"> & { + schemas: Extract<Required<UserConfig>["schemas"], object>; + services: Extract<Required<UserConfig>["services"], object>; + types: Extract<Required<UserConfig>["types"], object>; + }; diff --git a/tools/openapi-ts/types/hbs.d.ts b/tools/openapi-ts/types/hbs.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..52a8d978f1c5681c4535f08c31fc5449df6667a3 --- /dev/null +++ b/tools/openapi-ts/types/hbs.d.ts @@ -0,0 +1,16 @@ +/** + * We precompile the handlebar templates during the build process, + * however in the source code we want to reference these templates + * by importing the hbs files directly. Of course this is not allowed + * by Typescript, so we need to provide some declaration for these + * types. + * @see: build.js for more information + */ +declare module "*.hbs" { + const template: { + compiler: [number, string]; + useData: true; + main: () => void; + }; + export default template; +} diff --git a/tools/openapi-ts/utils/config.ts b/tools/openapi-ts/utils/config.ts new file mode 100644 index 0000000000000000000000000000000000000000..4cf623a1dcda0a6350e55d25886d00a0b617c5ce --- /dev/null +++ b/tools/openapi-ts/utils/config.ts @@ -0,0 +1,10 @@ +import type { Config } from "../types/config"; + +let _config: Config; + +export const getConfig = () => _config; + +export const setConfig = (config: Config) => { + _config = config; + return getConfig(); +}; diff --git a/tools/openapi-ts/utils/enum.ts b/tools/openapi-ts/utils/enum.ts new file mode 100644 index 0000000000000000000000000000000000000000..814dd30d998b5f9eaa80870f7256d9a8d3a49c3d --- /dev/null +++ b/tools/openapi-ts/utils/enum.ts @@ -0,0 +1,69 @@ +import type { Enum } from "../openApi"; +import type { Client } from "../types/client"; +import { unescapeName } from "./escape"; +import { unique } from "./unique"; + +/** + * Sanitizes names of enums, so they are valid typescript identifiers of a certain form. + * + * 1: Replace all characters not legal as part of identifier with '_' + * 2: Add '_' prefix if first character of enum name has character not legal for start of identifier + * 3: Add '_' where the string transitions from lowercase to uppercase + * 4: Transform the whole string to uppercase + * + * Javascript identifier regexp pattern retrieved from + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers + */ +export const enumKey = (value?: string | number, customName?: string) => { + if (customName) { + return customName; + } + // prefix numbers with underscore + if (typeof value === "number") { + return `'_${value}'`; + } + + let key = ""; + if (typeof value === "string") { + key = value + .replace(/[^$\u200c\u200d\p{ID_Continue}]/gu, "_") + .replace(/^([^$_\p{ID_Start}])/u, "_$1") + .replace(/(\p{Lowercase})(\p{Uppercase}+)/gu, "$1_$2"); + } + key = key.trim(); + if (!key) { + key = "empty_string"; + } + return key.toUpperCase(); +}; + +/** + * Enums can't contain hyphens in their name. Additionally, name might've been + * already escaped, so we need to remove quotes around it. + * {@link https://github.com/ferdikoomen/openapi-typescript-codegen/issues/1969} + */ +export const enumName = (client: Client, name?: string) => { + if (!name) { + return null; + } + const escapedName = unescapeName(name).replace(/[-_]([a-z])/gi, ($0, $1: string) => $1.toLocaleUpperCase()); + const result = `${escapedName.charAt(0).toLocaleUpperCase() + escapedName.slice(1)}Enum`; + if (client.enumNames.includes(result)) { + return null; + } + client.enumNames = [...client.enumNames, result]; + return result; +}; + +export const enumUnionType = (enums: Enum[]) => + enums + .map((enumerator) => enumValue(enumerator.value)) + .filter(unique) + .join(" | "); + +export const enumValue = (value?: string | number) => { + if (typeof value === "string") { + return `'${value.replace(/'/g, "\\'")}'`; + } + return value; +}; diff --git a/tools/openapi-ts/utils/escape.ts b/tools/openapi-ts/utils/escape.ts new file mode 100644 index 0000000000000000000000000000000000000000..6922dda51a4e4548019469df8c5021c22b02bcdf --- /dev/null +++ b/tools/openapi-ts/utils/escape.ts @@ -0,0 +1,38 @@ +import { EOL } from "os"; + +/** + * Javascript identifier regexp pattern retrieved from + * {@link} https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers + */ +const validTypescriptIdentifierRegex = /^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u; + +export const escapeName = (value: string): string => { + if (value || value === "") { + const validName = validTypescriptIdentifierRegex.test(value); + if (!validName) { + return `'${value}'`; + } + } + return value; +}; + +export const unescapeName = (value: string): string => { + if (value && value.startsWith("'") && value.endsWith("'")) { + return value.slice(1, value.length - 1); + } + return value; +}; + +export const escapeComment = (value: string, insertAsterisk = true) => + value + .replace(/\*\//g, "*") + .replace(/\/\*/g, "*") + .replace(/\r?\n(.*)/g, (_, w) => { + if (insertAsterisk) { + return `${EOL} * ${w.trim()}`; + } + return EOL + w.trim(); + }); + +export const escapeDescription = (value: string) => + value.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\${/g, "\\${"); diff --git a/tools/openapi-ts/utils/getHttpRequestName.ts b/tools/openapi-ts/utils/getHttpRequestName.ts new file mode 100644 index 0000000000000000000000000000000000000000..e91ac359fe0124fccda2a27f29f2c98da3176a44 --- /dev/null +++ b/tools/openapi-ts/utils/getHttpRequestName.ts @@ -0,0 +1,21 @@ +import type { Config } from "../types/config"; + +/** + * Generate the HttpRequest filename based on the selected client + * @param client The selected HTTP client (fetch, xhr, node or axios) + */ +export const getHttpRequestName = (client: Config["client"]): string => { + switch (client) { + case "angular": + return "AngularHttpRequest"; + case "axios": + return "AxiosHttpRequest"; + case "fetch": + return "FetchHttpRequest"; + case "node": + return "NodeHttpRequest"; + case "xhr": + return "XHRHttpRequest"; + } + throw new Error(); +}; diff --git a/tools/openapi-ts/utils/getOpenApiSpec.ts b/tools/openapi-ts/utils/getOpenApiSpec.ts new file mode 100644 index 0000000000000000000000000000000000000000..ccb0863d8df02ee1cf7e95d2f59670a0f6333826 --- /dev/null +++ b/tools/openapi-ts/utils/getOpenApiSpec.ts @@ -0,0 +1,18 @@ +import { existsSync } from "node:fs"; +import path from "node:path"; + +import $RefParser from "@apidevtools/json-schema-ref-parser"; + +import type { OpenApi } from "../openApi"; + +/** + * Load and parse te open api spec. If the file extension is ".yml" or ".yaml" + * we will try to parse the file as a YAML spec, otherwise we will fall back + * on parsing the file as JSON. + * @param location: Path or url + */ +export const getOpenApiSpec = async (location: string) => { + const absolutePathOrUrl = existsSync(location) ? path.resolve(location) : location; + const schema = (await $RefParser.bundle(absolutePathOrUrl, absolutePathOrUrl, {})) as OpenApi; + return schema; +}; diff --git a/tools/openapi-ts/utils/postprocess.ts b/tools/openapi-ts/utils/postprocess.ts new file mode 100644 index 0000000000000000000000000000000000000000..e4079abaffd96a4dd0ec07c9b60d008844d26484 --- /dev/null +++ b/tools/openapi-ts/utils/postprocess.ts @@ -0,0 +1,99 @@ +import type { Enum, Model, Operation, Service } from "../openApi"; +import type { Client } from "../types/client"; +import { sort } from "./sort"; +import { unique } from "./unique"; + +/** + * Post process client + * @param client Client object with all the models, services, etc. + */ +export function postProcessClient(client: Client): Client { + return { + ...client, + enumNames: [], + models: client.models.map((model) => postProcessModel(model)), + services: client.services.map((service) => postProcessService(service)), + }; +} + +/** + * Post processes the model. + * This will clean up any double imports or enum values. + * @param model + */ +export function postProcessModel(model: Model): Model { + return { + ...model, + enum: postProcessModelEnum(model), + enums: postProcessModelEnums(model), + imports: postProcessModelImports(model), + }; +} + +/** + * Set unique enum values for the model + * @param model + */ +export function postProcessModelEnum(model: Model): Enum[] { + return model.enum.filter((property, index, arr) => arr.findIndex((item) => item.value === property.value) === index); +} + +/** + * Set unique enum values for the model + * @param model The model that is post-processed + */ +export function postProcessModelEnums(model: Model): Model[] { + return model.enums.filter((property, index, arr) => arr.findIndex((item) => item.name === property.name) === index); +} + +/** + * Set unique imports, sorted by name + * @param model The model that is post-processed + */ +export function postProcessModelImports(model: Model): string[] { + return model.imports + .filter(unique) + .sort(sort) + .filter((name) => model.name !== name); +} + +export function postProcessService(service: Service): Service { + const clone = { ...service }; + clone.operations = postProcessServiceOperations(clone); + clone.operations.forEach((operation) => { + clone.imports.push(...operation.imports); + }); + clone.imports = postProcessServiceImports(clone); + return clone; +} + +/** + * Set unique imports, sorted by name + * @param service + */ +export function postProcessServiceImports(service: Service): string[] { + return service.imports.filter(unique).sort(sort); +} + +export function postProcessServiceOperations(service: Service): Operation[] { + const names = new Map<string, number>(); + + return service.operations.map((operation) => { + const clone = { ...operation }; + + // Parse the service parameters and results, very similar to how we parse + // properties of models. These methods will extend the type if needed. + clone.imports.push(...clone.parameters.flatMap((parameter) => parameter.imports)); + clone.imports.push(...clone.results.flatMap((result) => result.imports)); + + // Check if the operation name is unique, if not then prefix this with a number + const name = clone.name; + const index = names.get(name) || 0; + if (index > 0) { + clone.name = `${name}${index}`; + } + names.set(name, index + 1); + + return clone; + }); +} diff --git a/tools/openapi-ts/utils/required.ts b/tools/openapi-ts/utils/required.ts new file mode 100644 index 0000000000000000000000000000000000000000..b145ed02f135be854b5e4c134f322d55bed861ee --- /dev/null +++ b/tools/openapi-ts/utils/required.ts @@ -0,0 +1,17 @@ +import { Model, OperationParameter } from "../openApi"; +import { getConfig } from "./config"; + +export const getDefaultPrintable = (p: OperationParameter | Model): string | undefined => { + if (p.default === undefined) { + return undefined; + } + return JSON.stringify(p.default, null, 4); +}; + +export const modelIsRequired = (model: Model) => { + const config = getConfig(); + if (config?.useOptions) { + return model.isRequired ? "" : "?"; + } + return !model.isRequired && !getDefaultPrintable(model) ? "?" : ""; +}; diff --git a/tools/openapi-ts/utils/sort.ts b/tools/openapi-ts/utils/sort.ts new file mode 100644 index 0000000000000000000000000000000000000000..a9f0375d0b3ca017fdff74a55e6248020f6329aa --- /dev/null +++ b/tools/openapi-ts/utils/sort.ts @@ -0,0 +1,9 @@ +export function sort(a: string, b: string): number { + const nameA = a.toLocaleLowerCase(); + const nameB = b.toLocaleLowerCase(); + return nameA.localeCompare(nameB, "en"); +} + +export function sortByName<T extends { name: string }>(items: T[]): T[] { + return items.sort((a, b) => sort(a.name, b.name)); +} diff --git a/tools/openapi-ts/utils/transform.ts b/tools/openapi-ts/utils/transform.ts new file mode 100644 index 0000000000000000000000000000000000000000..63e827967a3d7e865fbec2193d244fb4634efcd6 --- /dev/null +++ b/tools/openapi-ts/utils/transform.ts @@ -0,0 +1,19 @@ +import camelcase from "camelcase"; + +import { getConfig } from "./config"; + +export const transformServiceName = (name: string) => { + const config = getConfig(); + if (config.services.name) { + return config.services.name.replace("{{name}}", name); + } + return name; +}; + +export const transformTypeName = (name: string) => { + const config = getConfig(); + if (config.types.name === "PascalCase") { + return camelcase(name, { pascalCase: true }); + } + return name; +}; diff --git a/tools/openapi-ts/utils/unique.ts b/tools/openapi-ts/utils/unique.ts new file mode 100644 index 0000000000000000000000000000000000000000..2e02e59eee28c7c23d250df44cbf0666a1275f4c --- /dev/null +++ b/tools/openapi-ts/utils/unique.ts @@ -0,0 +1,3 @@ +export function unique<T>(value: T, index: number, arr: T[]): boolean { + return arr.indexOf(value) === index; +} diff --git a/tools/openapi-ts/utils/write/client.ts b/tools/openapi-ts/utils/write/client.ts new file mode 100644 index 0000000000000000000000000000000000000000..a04ad2105bf4bbf6360847907624086bfe86d2f1 --- /dev/null +++ b/tools/openapi-ts/utils/write/client.ts @@ -0,0 +1,79 @@ +import { existsSync, mkdirSync } from "node:fs"; +import path from "node:path"; + +import { TypeScriptFile } from "../../compiler"; +import type { OpenApi } from "../../openApi"; +import type { Client } from "../../types/client"; +import { getConfig } from "../config"; +import { processIndex } from "./index"; +import { processTypesAndEnums } from "./models"; +import { processSchemas } from "./schemas"; +import { processServices } from "./services"; + +/** + * Write our OpenAPI client, using the given templates at the given output + * @param openApi {@link OpenApi} Dereferenced OpenAPI specification + * @param client Client containing models, schemas, and services + */ +export const writeClient = async (openApi: OpenApi, client: Client): Promise<void> => { + const config = getConfig(); + + if (config.services.include) { + const regexp = new RegExp(config.services.include); + client.services = client.services.filter((service) => regexp.test(service.name)); + } + + if (config.types.include) { + const regexp = new RegExp(config.types.include); + client.models = client.models.filter((model) => regexp.test(model.name)); + } + + const outputPath = path.resolve(config.output); + + if (!existsSync(outputPath)) { + mkdirSync(outputPath, { recursive: true }); + } + + const files: Record<string, TypeScriptFile> = { + index: new TypeScriptFile({ + dir: config.output, + name: "index.ts", + }), + }; + if (config.enums) { + files.enums = new TypeScriptFile({ + dir: config.output, + name: "enums.ts", + }); + } + if (config.schemas.export) { + files.schemas = new TypeScriptFile({ + dir: config.output, + name: "schemas.ts", + }); + } + if (config.services.export) { + files.services = new TypeScriptFile({ + dir: config.output, + name: "services.ts", + }); + } + if (config.types.export) { + files.types = new TypeScriptFile({ + dir: config.output, + name: "types.ts", + }); + } + + await processSchemas({ file: files.schemas, openApi }); + await processTypesAndEnums({ client, files }); + await processServices({ client, files }); + + await processIndex({ files }); + + files.enums?.write("\n\n"); + files.schemas?.write("\n\n"); + files.services?.write("\n\n"); + files.types?.write("\n\n"); + files.index.write(); +}; diff --git a/tools/openapi-ts/utils/write/index.ts b/tools/openapi-ts/utils/write/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..59cbe59ad186f7577b9985bf701ae6d9f0e4c991 --- /dev/null +++ b/tools/openapi-ts/utils/write/index.ts @@ -0,0 +1,22 @@ +import { compiler, TypeScriptFile } from "../../compiler"; +import { getConfig } from "../config"; + +export const processIndex = async ({ files }: { files: Record<string, TypeScriptFile> }): Promise<void> => { + const config = getConfig(); + + if (config.name) { + files.index.add(compiler.export.named([config.name], `./${config.name}`)); + } + if (files.enums && !files.enums.isEmpty()) { + files.index.add(compiler.export.all(`./${files.enums.getName(false)}`)); + } + if (files.schemas && !files.schemas.isEmpty()) { + files.index.add(compiler.export.all(`./${files.schemas.getName(false)}`)); + } + if (files.services && !files.services.isEmpty()) { + files.index.add(compiler.export.all(`./${files.services.getName(false)}`)); + } + if (files.types && !files.types.isEmpty()) { + files.index.add(compiler.export.all(`./${files.types.getName(false)}`)); + } +}; diff --git a/tools/openapi-ts/utils/write/models.ts b/tools/openapi-ts/utils/write/models.ts new file mode 100644 index 0000000000000000000000000000000000000000..12ac1cce4ea5e295b873af073850edf7212ed6f4 --- /dev/null +++ b/tools/openapi-ts/utils/write/models.ts @@ -0,0 +1,257 @@ +import { type Comments, compiler, type Node, TypeScriptFile } from "../../compiler"; +import { addLeadingComment } from "../../compiler/utils"; +import type { Model, OperationParameter, Service } from "../../openApi"; +import { ensureValidTypeScriptJavaScriptIdentifier } from "../../openApi/common/parser/sanitize"; +import type { Client } from "../../types/client"; +import { getConfig } from "../config"; +import { enumKey, enumName, enumUnionType, enumValue } from "../enum"; +import { escapeComment } from "../escape"; +import { sortByName } from "../sort"; +import { transformTypeName } from "../transform"; +import { serviceExportedNamespace } from "./services"; +import { toType } from "./type"; + +type OnNode = (node: Node, type?: "enum") => void; + +const emptyModel: Model = { + $refs: [], + base: "", + description: null, + enum: [], + enums: [], + export: "interface", + imports: [], + isDefinition: false, + isNullable: false, + isReadOnly: false, + isRequired: false, + link: null, + name: "", + properties: [], + template: null, + type: "", +}; + +const processComposition = (client: Client, model: Model, onNode: OnNode) => { + processType(client, model, onNode); + model.enums.forEach((enumerator) => processEnum(client, enumerator, onNode)); +}; + +const processEnum = (client: Client, model: Model, onNode: OnNode, exportType = false) => { + const config = getConfig(); + + const properties: Record<string | number, unknown> = {}; + const comments: Record<string | number, Comments> = {}; + model.enum.forEach((enumerator) => { + const key = enumKey(enumerator.value, enumerator.customName); + const value = enumValue(enumerator.value); + properties[key] = value; + const comment = enumerator.customDescription || enumerator.description; + if (comment) { + comments[key] = [escapeComment(comment)]; + } + }); + + // ignore duplicate enum names + const name = enumName(client, model.name)!; + if (name === null) { + return; + } + + const comment = [model.description && escapeComment(model.description), model.deprecated && "@deprecated"]; + + if (exportType) { + const node = compiler.typedef.alias( + ensureValidTypeScriptJavaScriptIdentifier(model.name), + enumUnionType(model.enum), + comment, + ); + onNode(node); + } + + if (config.enums === "typescript") { + const node = compiler.types.enum({ + comments, + leadingComment: comment, + name, + obj: properties, + }); + onNode(node, "enum"); + } + + if (config.enums === "javascript") { + const expression = compiler.types.object({ + comments, + multiLine: true, + obj: properties, + unescape: true, + }); + const node = compiler.export.asConst(name, expression); + addLeadingComment(node, comment); + onNode(node, "enum"); + } +}; + +const processType = (client: Client, model: Model, onNode: OnNode) => { + const comment = [model.description && escapeComment(model.description), model.deprecated && "@deprecated"]; + const node = compiler.typedef.alias(transformTypeName(model.name), toType(model), comment); + onNode(node); +}; + +const processModel = (client: Client, model: Model, onNode: OnNode) => { + switch (model.export) { + case "all-of": + case "any-of": + case "one-of": + case "interface": + return processComposition(client, model, onNode); + case "enum": + return processEnum(client, model, onNode, true); + default: + return processType(client, model, onNode); + } +}; + +const processServiceTypes = (services: Service[], onNode: OnNode) => { + type ResMap = Map<number, Model>; + type MethodMap = Map<"req" | "res", ResMap | OperationParameter[]>; + type MethodKey = Service["operations"][number]["method"]; + type PathMap = Map<MethodKey, MethodMap>; + + const pathsMap = new Map<string, PathMap>(); + + services.forEach((service) => { + service.operations.forEach((operation) => { + const hasReq = operation.parameters.length; + const hasRes = operation.results.length; + const hasErr = operation.errors.length; + + if (hasReq || hasRes || hasErr) { + let pathMap = pathsMap.get(operation.path); + if (!pathMap) { + pathsMap.set(operation.path, new Map()); + pathMap = pathsMap.get(operation.path)!; + } + + let methodMap = pathMap.get(operation.method); + if (!methodMap) { + pathMap.set(operation.method, new Map()); + methodMap = pathMap.get(operation.method)!; + } + + if (hasReq) { + methodMap.set("req", sortByName([...operation.parameters])); + } + + if (hasRes) { + let resMap = methodMap.get("res"); + if (!resMap) { + methodMap.set("res", new Map()); + resMap = methodMap.get("res")!; + } + + if (Array.isArray(resMap)) { + return; + } + + operation.results.forEach((result) => { + resMap.set(result.code, result); + }); + } + + if (hasErr) { + let resMap = methodMap.get("res"); + if (!resMap) { + methodMap.set("res", new Map()); + resMap = methodMap.get("res")!; + } + + if (Array.isArray(resMap)) { + return; + } + + operation.errors.forEach((error) => { + resMap.set(error.code, error); + }); + } + } + }); + }); + + const properties = Array.from(pathsMap).map(([path, pathMap]) => { + const pathParameters = Array.from(pathMap).map(([method, methodMap]) => { + const methodParameters = Array.from(methodMap).map(([name, baseOrResMap]) => { + const reqResParameters = Array.isArray(baseOrResMap) + ? baseOrResMap + : Array.from(baseOrResMap).map(([code, base]) => { + // TODO: move query params into separate query key + const value: Model = { + ...emptyModel, + ...base, + isRequired: true, + name: String(code), + }; + return value; + }); + + const reqResKey: Model = { + ...emptyModel, + export: "interface", + isRequired: true, + name, + properties: reqResParameters, + }; + return reqResKey; + }); + const methodKey: Model = { + ...emptyModel, + export: "interface", + isRequired: true, + name: method.toLocaleLowerCase(), + properties: methodParameters, + }; + return methodKey; + }); + const pathKey: Model = { + ...emptyModel, + export: "interface", + isRequired: true, + name: `'${path}'`, + properties: pathParameters, + }; + return pathKey; + }); + + const type = toType({ + ...emptyModel, + export: "interface", + properties, + }); + const namespace = serviceExportedNamespace(); + const node = compiler.typedef.alias(namespace, type); + onNode(node); +}; + +export const processTypesAndEnums = async ({ + client, + files, +}: { + client: Client; + files: Record<string, TypeScriptFile>; +}): Promise<void> => { + for (const model of client.models) { + processModel(client, model, (node, type) => { + if (type === "enum") { + files.enums?.add(node); + } else { + files.types?.add(node); + } + }); + } + + if (files.services && client.services.length) { + processServiceTypes(client.services, (node) => { + files.types?.add(node); + }); + } +}; diff --git a/tools/openapi-ts/utils/write/schemas.ts b/tools/openapi-ts/utils/write/schemas.ts new file mode 100644 index 0000000000000000000000000000000000000000..d260097bb136ab7c080d4dfd51d3eaabeb12ebff --- /dev/null +++ b/tools/openapi-ts/utils/write/schemas.ts @@ -0,0 +1,67 @@ +import { compiler, TypeScriptFile } from "../../compiler"; +import type { OpenApi } from "../../openApi"; +import { ensureValidTypeScriptJavaScriptIdentifier } from "../../openApi/common/parser/sanitize"; +import { getConfig } from "../config"; + +const schemaToFormSchema = (schema: unknown): object => { + if (Array.isArray(schema)) { + return schema.map((item) => schemaToFormSchema(item)); + } + + if (typeof schema !== "object" || schema === null) { + return schema as object; + } + + const result = { ...schema }; + Object.entries(result).forEach(([key, value]) => { + if (["description", "x-enum-descriptions", "x-enum-varnames", "x-enumNames"].includes(key)) { + // @ts-ignore + delete result[key]; + return; + } + + if (value && typeof value === "object") { + // @ts-ignore + result[key] = schemaToFormSchema(value); + } + }); + return result; +}; + +export const processSchemas = async ({ file, openApi }: { file?: TypeScriptFile; openApi: OpenApi }): Promise<void> => { + if (!file) { + return; + } + + const config = getConfig(); + + const addSchema = (name: string, schema: object) => { + const validName = `$${ensureValidTypeScriptJavaScriptIdentifier(name)}`; + const obj = config.schemas.type === "form" ? schemaToFormSchema(schema) : schema; + const expression = compiler.types.object({ obj }); + const statement = compiler.export.asConst(validName, expression); + file.add(statement); + }; + + // OpenAPI 2.0 + if ("swagger" in openApi) { + for (const name in openApi.definitions) { + if (openApi.definitions.hasOwnProperty(name)) { + const definition = openApi.definitions[name]; + addSchema(name, definition); + } + } + } + + // OpenAPI 3.x + if ("openapi" in openApi) { + if (openApi.components) { + for (const name in openApi.components.schemas) { + if (openApi.components.schemas.hasOwnProperty(name)) { + const schema = openApi.components.schemas[name]; + addSchema(name, schema); + } + } + } + } +}; diff --git a/tools/openapi-ts/utils/write/services.ts b/tools/openapi-ts/utils/write/services.ts new file mode 100644 index 0000000000000000000000000000000000000000..cbee90f23771da4ef2915bf10ad6c41fe6ac2a78 --- /dev/null +++ b/tools/openapi-ts/utils/write/services.ts @@ -0,0 +1,323 @@ +import { ClassElement, compiler, FunctionParameter, TypeScriptFile } from "../../compiler"; +import type { Operation, OperationParameter, Service } from "../../openApi"; +import type { Client } from "../../types/client"; +import { getConfig } from "../config"; +import { escapeComment, escapeDescription, escapeName } from "../escape"; +import { modelIsRequired } from "../required"; +import { transformServiceName } from "../transform"; +import { unique } from "../unique"; + +export const serviceExportedNamespace = () => "$OpenApiTs"; + +const toOperationParamType = (operation: Operation): FunctionParameter[] => { + const config = getConfig(); + const baseTypePath = `${serviceExportedNamespace()}['${operation.path}']['${operation.method.toLocaleLowerCase()}']['req']`; + if (!operation.parameters.length) { + return [ + { + name: "options", + default: undefined, + isRequired: false, + type: "Partial<AxiosRequestConfig>", + }, + ]; + } + + if (config.useOptions) { + const isOptional = operation.parameters.every((p) => !p.isRequired); + return [ + { + default: isOptional ? {} : undefined, + name: "data", + type: baseTypePath, + }, + { + name: "options", + default: undefined, + isRequired: false, + type: "Partial<AxiosRequestConfig>", + }, + ]; + } + + return operation.parameters.map((p) => { + const typePath = `${baseTypePath}['${p.name}']`; + return { + default: p?.default, + isRequired: modelIsRequired(p) === "", + name: p.name, + type: typePath, + }; + }); +}; + +const toOperationReturnType = (operation: Operation) => { + const config = getConfig(); + const baseTypePath = `${serviceExportedNamespace()}['${operation.path}']['${operation.method.toLocaleLowerCase()}']['res']`; + const results = operation.results; + // TODO: we should return nothing when results don't exist + // can't remove this logic without removing request/name config + // as it complicates things + let returnType = compiler.typedef.basic("void"); + if (results.length) { + const types = results.map((result) => `${baseTypePath}[${String(result.code)}]`); + returnType = compiler.typedef.union(types); + } + if (config.useOptions && config.services.response === "response") { + returnType = compiler.typedef.basic("ApiResult", [returnType]); + } + if (config.client === "angular") { + returnType = compiler.typedef.basic("Observable", [returnType]); + } else { + returnType = compiler.typedef.basic("CancelablePromise", [returnType]); + } + return returnType; +}; + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const toOperationComment = (operation: Operation) => { + const config = getConfig(); + let params: string[] = []; + if (operation.parameters.length) { + if (config.useOptions) { + params = [ + "@param data The data for the request.", + ...operation.parameters.map( + (p) => `@param data.${p.name} ${p.description ? escapeComment(p.description) : ""}`, + ), + ]; + } else { + params = operation.parameters.map((p) => `@param ${p.name} ${p.description ? escapeComment(p.description) : ""}`); + } + } + const comment = [ + operation.deprecated && "@deprecated", + operation.summary && escapeComment(operation.summary), + operation.description && escapeComment(operation.description), + ...params, + ...operation.results.map((r) => `@returns ${r.type} ${r.description ? escapeComment(r.description) : ""}`), + "@throws ApiError", + ]; + return comment; +}; + +const toRequestOptions = (operation: Operation) => { + const toObj = (parameters: OperationParameter[]) => + parameters.reduce( + (prev, curr) => { + const key = curr.prop; + const value = curr.name; + if (key === value) { + prev[key] = key; + } else if (escapeName(key) === key) { + prev[key] = value; + } else { + prev[`'${key}'`] = value; + } + return prev; + }, + {} as Record<string, unknown>, + ); + + const obj: Record<string, any> = { + method: operation.method, + url: operation.path, + }; + if (operation.parametersPath.length) { + obj.path = toObj(operation.parametersPath); + } + if (operation.parametersCookie.length) { + obj.cookies = toObj(operation.parametersCookie); + } + if (operation.parametersHeader.length) { + obj.headers = toObj(operation.parametersHeader); + } + if (operation.parametersQuery.length) { + obj.query = toObj(operation.parametersQuery); + } + if (operation.parametersForm.length) { + obj.formData = toObj(operation.parametersForm); + } + if (operation.parametersBody) { + if (operation.parametersBody.in === "formData") { + obj.formData = operation.parametersBody.name; + } + if (operation.parametersBody.in === "body") { + obj.body = operation.parametersBody.name; + } + } + if (operation.parametersBody?.mediaType) { + obj.mediaType = operation.parametersBody?.mediaType; + } + if (operation.responseHeader) { + obj.responseHeader = operation.responseHeader; + } + if (operation.errors.length) { + const errors: Record<number, string> = {}; + operation.errors.forEach((err) => { + errors[err.code] = escapeDescription(err.description ?? ""); + }); + obj.errors = errors; + } + obj.customRequestConfig = "options"; + return compiler.types.object({ + identifiers: ["body", "headers", "formData", "cookies", "path", "query", "customRequestConfig"], + obj, + shorthand: true, + }); +}; + +export const toDestructuredData = (operation: Operation) => { + const config = getConfig(); + if (!config.useOptions || !operation.parameters.length) { + return ""; + } + const obj: Record<string, unknown> = {}; + operation.parameters.forEach((p) => { + obj[p.name] = p.name; + }); + const node = compiler.types.object({ + identifiers: Object.keys(obj), + obj, + shorthand: true, + }); + return `const ${compiler.utils.toString(node)} = data;`; +}; + +const toOperationStatements = (operation: Operation) => { + const config = getConfig(); + const statements: any[] = []; + // If using options we destructor the parameter + if (config.useOptions && operation.parameters.length) { + statements.push(compiler.utils.toNode(toDestructuredData(operation))); + } + + const requestOptions = compiler.utils.toString(toRequestOptions(operation)); + if (config.name) { + statements.push( + compiler.class.return({ + args: [requestOptions], + name: "this.httpRequest.request", + }), + ); + } else { + if (config.client === "angular") { + statements.push( + compiler.class.return({ + args: ["OpenAPI", "this.http", requestOptions], + name: "__request", + }), + ); + } else { + statements.push( + compiler.class.return({ + args: ["OpenAPI", requestOptions], + name: "__request", + }), + ); + } + } + return statements; +}; + +export const processService = (service: Service) => { + const config = getConfig(); + const members: ClassElement[] = service.operations.map((operation) => { + const node = compiler.class.method({ + accessLevel: "public", + comment: undefined, // toOperationComment(operation), + isStatic: config.name === undefined && config.client !== "angular", + name: operation.name, + parameters: toOperationParamType(operation), + returnType: toOperationReturnType(operation), + statements: toOperationStatements(operation), + }); + return node; + }); + + // Push to front constructor if needed + if (config.name) { + members.unshift( + compiler.class.constructor({ + parameters: [ + { + accessLevel: "public", + isReadOnly: true, + name: "httpRequest", + type: "BaseHttpRequest", + }, + ], + }), + ); + } else if (config.client === "angular") { + members.unshift( + compiler.class.constructor({ + parameters: [ + { + accessLevel: "public", + isReadOnly: true, + name: "http", + type: "HttpClient", + }, + ], + }), + ); + } + + return compiler.class.create({ + decorator: config.client === "angular" ? { args: [{ providedIn: "root" }], name: "Injectable" } : undefined, + members, + name: transformServiceName(service.name), + }); +}; + +export const processServices = async ({ + client, + files, +}: { + client: Client; + files: Record<string, TypeScriptFile>; +}): Promise<void> => { + const file = files.services; + + if (!file) { + return; + } + + const config = getConfig(); + + let imports: string[] = []; + + for (const service of client.services) { + file.add(processService(service)); + const exported = serviceExportedNamespace(); + imports = [...imports, exported]; + } + + // Import required packages and core files. + if (config.client === "angular") { + file.addNamedImport("Injectable", "@angular/core"); + if (config.name === undefined) { + file.addNamedImport("HttpClient", "@angular/common/http"); + } + file.addNamedImport({ isTypeOnly: true, name: "Observable" }, "rxjs"); + } else { + file.addNamedImport({ isTypeOnly: true, name: "CancelablePromise" }, "./core/CancelablePromise"); + } + if (config.services.response === "response") { + file.addNamedImport({ isTypeOnly: true, name: "ApiResult" }, "./core/ApiResult"); + } + if (config.name) { + file.addNamedImport({ isTypeOnly: config.client !== "angular", name: "BaseHttpRequest" }, "./core/BaseHttpRequest"); + } else { + file.addNamedImport("OpenAPI", "./core/OpenAPI"); + file.addNamedImport({ alias: "__request", name: "request" }, "./core/request"); + } + file.addNamedImport({ isTypeOnly: true, name: "AxiosRequestConfig" }, "axios"); + + // Import all models required by the services. + if (files.types && !files.types.isEmpty()) { + const models = imports.filter(unique).map((name) => ({ isTypeOnly: true, name })); + file.addNamedImport(models, `./${files.types.getName(false)}`); + } +}; diff --git a/tools/openapi-ts/utils/write/type.ts b/tools/openapi-ts/utils/write/type.ts new file mode 100644 index 0000000000000000000000000000000000000000..b6bb03ae337d8025c340d1a1140e3b13d20fbb1d --- /dev/null +++ b/tools/openapi-ts/utils/write/type.ts @@ -0,0 +1,116 @@ +import { compiler, type Property, type TypeNode } from "../../compiler"; +import { Model } from "../../openApi"; +import { getConfig } from "../config"; +import { enumValue } from "../enum"; +import { escapeComment } from "../escape"; +import { modelIsRequired } from "../required"; +import { transformTypeName } from "../transform"; +import { unique } from "../unique"; + +const base = (model: Model) => { + const config = getConfig(); + if (model.base === "binary") { + return compiler.typedef.union(["Blob", "File"]); + } + if (config.types.dates && model.format === "date-time") { + return compiler.typedef.basic("Date"); + } + // transform root level model names + if (model.base === model.type && model.$refs.length) { + if (model.$refs.some((ref) => ref.endsWith(model.base))) { + return compiler.typedef.basic(transformTypeName(model.base)); + } + } + return compiler.typedef.basic(model.base); +}; + +const typeReference = (model: Model) => compiler.typedef.union([base(model)], model.isNullable); + +const typeArray = (model: Model) => { + // Special case where we use tuple to define constant size array. + if ( + model.export === "array" && + model.link && + model.maxItems && + model.minItems && + model.maxItems === model.minItems && + model.maxItems <= 100 + ) { + const types = Array(model.maxItems).fill(toType(model.link)); + const tuple = compiler.typedef.tuple(types, model.isNullable); + return tuple; + } + + if (model.link) { + return compiler.typedef.array([toType(model.link)], model.isNullable); + } + + return compiler.typedef.array([base(model)], model.isNullable); +}; + +const typeEnum = (model: Model) => { + const values = model.enum.map((enumerator) => enumValue(enumerator.value)); + return compiler.typedef.union(values, model.isNullable); +}; + +const typeDict = (model: Model) => { + const type = model.link ? toType(model.link) : base(model); + return compiler.typedef.record(["string"], [type], model.isNullable); +}; + +const typeUnion = (model: Model) => { + const models = model.properties; + const types = models.map((m) => compiler.utils.toString(toType(m))).filter(unique); + return compiler.typedef.union(types, model.isNullable); +}; + +const typeIntersect = (model: Model) => { + const types = model.properties.map((m) => compiler.utils.toString(toType(m))).filter(unique); + return compiler.typedef.intersect(types, model.isNullable); +}; + +const typeInterface = (model: Model) => { + if (!model.properties.length) { + return compiler.typedef.basic("unknown"); + } + + const properties: Property[] = model.properties.map((property) => { + let maybeRequired = modelIsRequired(property); + let value = toType(property); + // special case for additional properties type + if (property.name === "[key: string]" && maybeRequired) { + maybeRequired = ""; + value = compiler.typedef.union([value, "undefined"]); + } + return { + comment: [property.description && escapeComment(property.description), property.deprecated && "@deprecated"], + isReadOnly: property.isReadOnly, + isRequired: maybeRequired === "", + name: property.name, + type: value, + }; + }); + + return compiler.typedef.interface(properties, model.isNullable); +}; + +export const toType = (model: Model): TypeNode => { + switch (model.export) { + case "all-of": + return typeIntersect(model); + case "any-of": + case "one-of": + return typeUnion(model); + case "array": + return typeArray(model); + case "dictionary": + return typeDict(model); + case "enum": + return typeEnum(model); + case "interface": + return typeInterface(model); + case "reference": + default: + return typeReference(model); + } +}; diff --git a/tsconfig.app.json b/tsconfig.app.json deleted file mode 100644 index b3312ad85df0bed4a8eaf33ca64c69ff857546bd..0000000000000000000000000000000000000000 --- a/tsconfig.app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "@vue/tsconfig/tsconfig.dom.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], - "exclude": ["src/**/__tests__/*"], - "compilerOptions": { - "composite": true, - "baseUrl": ".", - "paths": { - "@/*": ["src/*"] - } - } -} \ No newline at end of file diff --git a/tsconfig.config.json b/tsconfig.config.json deleted file mode 100644 index 34f37a3c7b2f1b71a2aed2e9cec04fd173950dcc..0000000000000000000000000000000000000000 --- a/tsconfig.config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"], - "compilerOptions": { - "composite": true, - "types": ["node"] - } -} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 99c2dfee0ca49f06431f2543210050f5d924518a..87605c1596239b26fdf46bc4b2288717708c959c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,48 @@ { - "files": [], - "references": [ - { - "path": "./tsconfig.config.json" + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "useDefineForClassFields": true, + "lib": ["esnext", "esnext.Array", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + "baseUrl": ".", + "paths": { + "@/*": ["src/*"] }, - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.vitest.json" - } - ] -} \ No newline at end of file + "composite": false, + "types": [ + "node", + "jsdom", + "vite/client" + ], + + /* Bundler mode */ + "moduleResolution": "node", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "preserve", + "ignoreDeprecations": "5.0", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + + "strictNullChecks": true, + "esModuleInterop": true, + "noImplicitAny": true, + "noImplicitThis": false, + "noImplicitReturns": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "sourceMap": true, + }, + "include": ["env.d.ts", "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], + "references": [{ "path": "./tsconfig.node.json" }], + "vueCompilerOptions": { + "skipTemplateCodegen": true + } +} diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 0000000000000000000000000000000000000000..9173f34ed9750a29468a29befd3e3fd9786e884c --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "target": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true, + "esModuleInterop": true, + }, + "include": ["vite.config.ts"] +} diff --git a/tsconfig.vitest.json b/tsconfig.vitest.json index 111ee3a6fab05caf980ab0400ddeeb629ba9bc1c..a5680e6f43d2f81d9d662f8d6b5279a68e4fc069 100644 --- a/tsconfig.vitest.json +++ b/tsconfig.vitest.json @@ -1,14 +1,17 @@ { - "extends": "./tsconfig.app.json", "exclude": [ - "node_modules" + "node_modules", + "src/**/__tests__/*" ], "include": [ "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", - "tests/**/*.tsx" + "tests/**/*.tsx", + "env.d.ts", + "src/**/*", + "src/**/*.vue" ], "compilerOptions": { "composite": false, @@ -49,4 +52,4 @@ "vueCompilerOptions": { "skipTemplateCodegen": true } -} \ No newline at end of file +}