diff --git a/.prettierignore b/.prettierignore index 40ed52fd9..9759c21a4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,5 +3,7 @@ **/templates **/dist **/.vitepress +**/test/e2e **/CHANGELOG.md +pnpm-lock.yaml diff --git a/docs/openapi-ts/configuration.md b/docs/openapi-ts/configuration.md index 2e8bcdbe1..a468c8699 100644 --- a/docs/openapi-ts/configuration.md +++ b/docs/openapi-ts/configuration.md @@ -10,28 +10,28 @@ description: Configure openapi-ts. ::: code-group ```js [openapi-ts.config.ts] -import { defineConfig } from '@hey-api/openapi-ts' +import { defineConfig } from '@hey-api/openapi-ts'; export default defineConfig({ input: 'path/to/openapi.json', - output: 'src/client' -}) + output: 'src/client', +}); ``` ```js [openapi-ts.config.cjs] /** @type {import('@hey-api/openapi-ts').UserConfig} */ module.exports = { input: 'path/to/openapi.json', - output: 'src/client' -} + output: 'src/client', +}; ``` ```js [openapi-ts.config.mjs] /** @type {import('@hey-api/openapi-ts').UserConfig} */ export default { input: 'path/to/openapi.json', - output: 'src/client' -} + output: 'src/client', +}; ``` ::: @@ -165,12 +165,12 @@ export default { By default, `openapi-ts` exports schemas from your OpenAPI specification as plain JavaScript objects. A great use case for schemas is client-side form input validation. ```ts -import { $Schema } from 'client/schemas' +import { $Schema } from 'client/schemas'; -const maxInputLength = $Schema.properties.text.maxLength +const maxInputLength = $Schema.properties.text.maxLength; if (userInput.length > maxInputLength) { - throw new Error(`String length cannot exceed ${maxInputLength} characters!`) + throw new Error(`String length cannot exceed ${maxInputLength} characters!`); } ``` diff --git a/docs/openapi-ts/get-started.md b/docs/openapi-ts/get-started.md index 5010c4d15..0364b840b 100644 --- a/docs/openapi-ts/get-started.md +++ b/docs/openapi-ts/get-started.md @@ -60,12 +60,12 @@ If you want to use `openapi-ts` with CLI, add a script to your `package.json` fi You can also generate your client programmatically by importing `openapi-ts` in a `.ts` file. ```ts -import { createClient } from '@hey-api/openapi-ts' +import { createClient } from '@hey-api/openapi-ts'; createClient({ input: 'path/to/openapi.json', - output: 'src/client' -}) + output: 'src/client', +}); ``` ::: warning diff --git a/docs/openapi-ts/interceptors.md b/docs/openapi-ts/interceptors.md index e757437f4..c17f4cc4f 100644 --- a/docs/openapi-ts/interceptors.md +++ b/docs/openapi-ts/interceptors.md @@ -10,17 +10,17 @@ Interceptors (middleware) can be used to modify requests before they're sent or ::: code-group ```ts [use] -OpenAPI.interceptors.request.use(request => { - doSomethingWithRequest(request) - return request // <-- must return request -}) +OpenAPI.interceptors.request.use((request) => { + doSomethingWithRequest(request); + return request; // <-- must return request +}); ``` ```ts [eject] -OpenAPI.interceptors.request.eject(request => { - doSomethingWithRequest(request) - return request // <-- must return request -}) +OpenAPI.interceptors.request.eject((request) => { + doSomethingWithRequest(request); + return request; // <-- must return request +}); ``` ::: @@ -30,17 +30,17 @@ and an example response interceptor ::: code-group ```ts [use] -OpenAPI.interceptors.response.use(async response => { - await doSomethingWithResponse(response) // async - return response // <-- must return response -}) +OpenAPI.interceptors.response.use(async (response) => { + await doSomethingWithResponse(response); // async + return response; // <-- must return response +}); ``` ```ts [eject] -OpenAPI.interceptors.response.eject(async response => { - await doSomethingWithResponse(response) // async - return response // <-- must return response -}) +OpenAPI.interceptors.response.eject(async (response) => { + await doSomethingWithResponse(response); // async + return response; // <-- must return response +}); ``` ::: diff --git a/docs/openapi-ts/migrating.md b/docs/openapi-ts/migrating.md index 368880113..b47bb5a07 100644 --- a/docs/openapi-ts/migrating.md +++ b/docs/openapi-ts/migrating.md @@ -92,8 +92,8 @@ Enums are now re-exported from the main `index.ts` file. Enums are now exported from a separate file. If you use imports from `models.ts`, you can change them to `enums.gen.ts`. ```js -import { Enum } from 'client/models' // [!code --] -import { Enum } from 'client/enums.gen' // [!code ++] +import { Enum } from 'client/models'; // [!code --] +import { Enum } from 'client/enums.gen'; // [!code ++] ``` ### Renamed `models.ts` file @@ -110,8 +110,8 @@ import type { Model } from 'client/models.gen' // [!code ++] `schemas.ts` is now called `schemas.gen.ts`. If you use imports from `schemas.ts`, you should be able to easily find and replace all instances. ```js -import { $Schema } from 'client/schemas' // [!code --] -import { $Schema } from 'client/schemas.gen' // [!code ++] +import { $Schema } from 'client/schemas'; // [!code --] +import { $Schema } from 'client/schemas.gen'; // [!code ++] ``` ### Renamed `services.ts` file @@ -119,8 +119,8 @@ import { $Schema } from 'client/schemas.gen' // [!code ++] `services.ts` is now called `services.gen.ts`. If you use imports from `services.ts`, you should be able to easily find and replace all instances. ```js -import { DefaultService } from 'client/services' // [!code --] -import { DefaultService } from 'client/services.gen' // [!code ++] +import { DefaultService } from 'client/services'; // [!code --] +import { DefaultService } from 'client/services.gen'; // [!code ++] ``` ### Deprecated exports from `index.ts` @@ -194,9 +194,9 @@ Schemas are now exported from a single file. If you used imports from individual By default, generated clients will use a single object argument to pass values to API calls. This is a significant change from the previous default of unspecified array of arguments. If migrating your application in one go isn't feasible, we recommend deprecating your old client and generating a new client. ```ts -import { DefaultService } from 'client/services' // <-- old client with array arguments +import { DefaultService } from 'client/services'; // <-- old client with array arguments -import { DefaultService } from 'client_v2/services' // <-- new client with options argument +import { DefaultService } from 'client_v2/services'; // <-- new client with options argument ``` This way, you can gradually switch over to the new syntax as you update parts of your code. Once you've removed all instances of `client` imports, you can safely delete the old `client` folder and find and replace all `client_v2` calls to `client`. diff --git a/package.json b/package.json index 2c12d149d..a806fe535 100644 --- a/package.json +++ b/package.json @@ -34,5 +34,6 @@ "@changesets/cli": "2.27.1", "@svitejs/changesets-changelog-github-compact": "1.1.0", "prettier": "3.2.5" - } + }, + "packageManager": "pnpm@8.15.7+sha256.50783dd0fa303852de2dd1557cd4b9f07cb5b018154a6e76d0f40635d6cee019" } diff --git a/packages/openapi-ts/bin/index.cjs b/packages/openapi-ts/bin/index.cjs index 8970e3dc8..057167f0b 100755 --- a/packages/openapi-ts/bin/index.cjs +++ b/packages/openapi-ts/bin/index.cjs @@ -1,12 +1,12 @@ #!/usr/bin/env node -'use strict' +'use strict'; -const { writeFileSync } = require('fs') -const { resolve } = require('path') +const { writeFileSync } = require('fs'); +const { resolve } = require('path'); -const { program } = require('commander') -const pkg = require('../package.json') +const { program } = require('commander'); +const pkg = require('../package.json'); const params = program .name(Object.keys(pkg.bin)[0]) @@ -14,17 +14,17 @@ const params = program .version(pkg.version) .option( '-i, --input ', - 'OpenAPI specification (path, url, or string content)' + 'OpenAPI specification (path, url, or string content)', ) .option('-o, --output ', 'Output directory') .option( '-c, --client ', - 'HTTP client to generate [angular, axios, fetch, node, xhr]' + 'HTTP client to generate [angular, axios, fetch, node, xhr]', ) .option('-d, --debug', 'Run in debug mode?') .option( '--base [value]', - 'Manually set base in OpenAPI config instead of inferring from server value' + 'Manually set base in OpenAPI config instead of inferring from server value', ) .option('--dry-run [value]', 'Skip writing files to disk?') .option('--enums ', 'Export enum definitions (javascript, typescript)') @@ -39,45 +39,45 @@ const params = program .option('--schemas [value]', 'Write schemas to disk') .option( '--serviceResponse [value]', - 'Define shape of returned value from service calls' + 'Define shape of returned value from service calls', ) .option('--types [value]', 'Write types to disk') .option( '--useDateType [value]', - 'Output Date instead of string for the format "date-time" in the models' + 'Output Date instead of string for the format "date-time" in the models', ) .option('--useOptions [value]', 'Use options instead of arguments') .parse(process.argv) - .opts() + .opts(); -const stringToBoolean = value => { +const stringToBoolean = (value) => { if (value === 'true') { - return true + return true; } if (value === 'false') { - return false + return false; } - return value -} + return value; +}; const processParams = (obj, booleanKeys) => { for (const key of booleanKeys) { - const value = obj[key] + const value = obj[key]; if (typeof value === 'string') { - const parsedValue = stringToBoolean(value) - delete obj[key] - obj[key] = parsedValue + const parsedValue = stringToBoolean(value); + delete obj[key]; + obj[key] = parsedValue; } } - return obj -} + return obj; +}; async function start() { - let userConfig + let userConfig; try { const { createClient } = require( - resolve(__dirname, '../dist/node/index.cjs') - ) + resolve(__dirname, '../dist/node/index.cjs'), + ); userConfig = processParams(params, [ 'dryRun', 'exportCore', @@ -88,20 +88,20 @@ async function start() { 'schemas', 'types', 'useDateType', - 'useOptions' - ]) - await createClient(userConfig) - process.exit(0) + 'useOptions', + ]); + await createClient(userConfig); + process.exit(0); } catch (error) { if (!userConfig.dryRun) { - const logName = `openapi-ts-error-${Date.now()}.log` - const logPath = resolve(process.cwd(), logName) - writeFileSync(logPath, `${error.message}\n${error.stack}`) - console.error(`🔥 Unexpected error occurred. Log saved to ${logPath}`) + const logName = `openapi-ts-error-${Date.now()}.log`; + const logPath = resolve(process.cwd(), logName); + writeFileSync(logPath, `${error.message}\n${error.stack}`); + console.error(`🔥 Unexpected error occurred. Log saved to ${logPath}`); } - console.error(`🔥 Unexpected error occurred. ${error.message}`) - process.exit(1) + console.error(`🔥 Unexpected error occurred. ${error.message}`); + process.exit(1); } } -start() +start(); diff --git a/packages/openapi-ts/eslint.config.js b/packages/openapi-ts/eslint.config.js index dcd475647..d9e6aa5bd 100644 --- a/packages/openapi-ts/eslint.config.js +++ b/packages/openapi-ts/eslint.config.js @@ -1,9 +1,9 @@ -import eslint from '@eslint/js' -import eslintConfigPrettier from 'eslint-config-prettier' -import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort' -import eslintPluginSortKeysFix from 'eslint-plugin-sort-keys-fix' -import globals from 'globals' -import tseslint from 'typescript-eslint' +import eslint from '@eslint/js'; +import eslintConfigPrettier from 'eslint-config-prettier'; +import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort'; +import eslintPluginSortKeysFix from 'eslint-plugin-sort-keys-fix'; +import globals from 'globals'; +import tseslint from 'typescript-eslint'; export default tseslint.config( eslint.configs.recommended, @@ -12,12 +12,12 @@ export default tseslint.config( languageOptions: { ecmaVersion: 'latest', globals: { - ...globals.node - } + ...globals.node, + }, }, plugins: { 'simple-import-sort': eslintPluginSimpleImportSort, - 'sort-keys-fix': eslintPluginSortKeysFix + 'sort-keys-fix': eslintPluginSortKeysFix, }, rules: { '@typescript-eslint/ban-ts-comment': 'off', @@ -35,8 +35,8 @@ export default tseslint.config( 'simple-import-sort/exports': 'error', 'simple-import-sort/imports': 'error', 'sort-imports': 'off', - 'sort-keys-fix/sort-keys-fix': 'warn' - } + 'sort-keys-fix/sort-keys-fix': 'warn', + }, }, eslintConfigPrettier, { @@ -45,7 +45,7 @@ export default tseslint.config( '**/node_modules/', 'temp/', '**/test/e2e/generated/', - '**/test/generated/' - ] - } -) + '**/test/generated/', + ], + }, +); diff --git a/packages/openapi-ts/package.json b/packages/openapi-ts/package.json index a39ae7808..b2a1a18e4 100644 --- a/packages/openapi-ts/package.json +++ b/packages/openapi-ts/package.json @@ -1,115 +1,115 @@ { - "name": "@hey-api/openapi-ts", - "version": "0.40.2", - "type": "module", - "description": "Turn your OpenAPI specification into a beautiful TypeScript client", - "homepage": "https://heyapi.vercel.app/", - "repository": { - "type": "git", - "url": "git+https://github.com/hey-api/openapi-ts.git" - }, - "bugs": { - "url": "https://github.com/hey-api/openapi-ts/issues" - }, - "license": "MIT", - "keywords": [ - "openapi", - "swagger", - "generator", - "typescript", - "javascript", - "codegen", - "yaml", - "json", - "fetch", - "xhr", - "axios", - "angular", - "node" - ], - "main": "./dist/node/index.cjs", - "types": "./dist/node/index.d.ts", - "bin": { - "openapi-ts": "bin/index.cjs" - }, - "files": [ - "bin", - "dist" - ], - "scripts": { - "build-bundle": "rollup --config rollup.config.ts --configPlugin typescript", - "build-types-check": "tsc --project tsconfig.check.json", - "build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp", - "build-types-temp": "tsc --emitDeclarationOnly --outDir temp -p src/node", - "build-types": "pnpm build-types-temp && pnpm build-types-roll && pnpm build-types-check", - "build": "pnpm clean && pnpm build-bundle && pnpm build-types", - "clean": "rimraf dist test/generated test/e2e/generated coverage node_modules/.cache", - "dev": "rimraf dist && pnpm build-bundle --watch", - "lint:fix": "eslint . --fix", - "lint": "eslint .", - "prepublishOnly": "pnpm build", - "test:coverage": "vitest run --config vitest.config.unit.ts --coverage", - "test:e2e": "vitest run --config vitest.config.e2e.ts", - "test:sample": "node test/sample.cjs", - "test:update": "vitest watch --config vitest.config.unit.ts --update", - "test:watch": "vitest watch --config vitest.config.unit.ts", - "test": "vitest run --config vitest.config.unit.ts", - "typecheck": "tsc --noEmit" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "dependencies": { - "@apidevtools/json-schema-ref-parser": "11.5.4", - "c12": "1.10.0", - "camelcase": "8.0.0", - "commander": "12.0.0", - "handlebars": "4.7.8" - }, - "peerDependencies": { - "typescript": "^5.x" - }, - "devDependencies": { - "@angular-devkit/build-angular": "17.3.4", - "@angular/animations": "17.3.4", - "@angular/cli": "17.3.4", - "@angular/common": "17.3.4", - "@angular/compiler": "17.3.4", - "@angular/compiler-cli": "17.3.4", - "@angular/core": "17.3.4", - "@angular/forms": "17.3.4", - "@angular/platform-browser": "17.3.4", - "@angular/platform-browser-dynamic": "17.3.4", - "@angular/router": "17.3.4", - "@rollup/plugin-commonjs": "25.0.7", - "@rollup/plugin-json": "6.1.0", - "@rollup/plugin-node-resolve": "15.2.3", - "@rollup/plugin-terser": "0.4.4", - "@rollup/plugin-typescript": "11.1.6", - "@types/cross-spawn": "6.0.6", - "@types/express": "4.17.21", - "@types/node": "20.12.7", - "@vitest/coverage-v8": "1.5.0", - "axios": "1.6.8", - "cross-spawn": "7.0.3", - "eslint": "9.0.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-simple-import-sort": "12.1.0", - "eslint-plugin-sort-keys-fix": "1.1.2", - "express": "4.19.2", - "glob": "10.3.12", - "globals": "15.0.0", - "node-fetch": "3.3.2", - "prettier": "3.2.5", - "puppeteer": "22.6.4", - "rimraf": "5.0.5", - "rollup": "4.14.2", - "rollup-plugin-dts": "6.1.0", - "rxjs": "7.8.1", - "ts-node": "10.9.2", - "tslib": "2.6.2", - "typescript": "5.4.5", - "typescript-eslint": "7.6.0", - "vitest": "1.5.0" - } + "name": "@hey-api/openapi-ts", + "version": "0.40.2", + "type": "module", + "description": "Turn your OpenAPI specification into a beautiful TypeScript client", + "homepage": "https://heyapi.vercel.app/", + "repository": { + "type": "git", + "url": "git+https://github.com/hey-api/openapi-ts.git" + }, + "bugs": { + "url": "https://github.com/hey-api/openapi-ts/issues" + }, + "license": "MIT", + "keywords": [ + "openapi", + "swagger", + "generator", + "typescript", + "javascript", + "codegen", + "yaml", + "json", + "fetch", + "xhr", + "axios", + "angular", + "node" + ], + "main": "./dist/node/index.cjs", + "types": "./dist/node/index.d.ts", + "bin": { + "openapi-ts": "bin/index.cjs" + }, + "files": [ + "bin", + "dist" + ], + "scripts": { + "build-bundle": "rollup --config rollup.config.ts --configPlugin typescript", + "build-types-check": "tsc --project tsconfig.check.json", + "build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp", + "build-types-temp": "tsc --emitDeclarationOnly --outDir temp -p src/node", + "build-types": "pnpm build-types-temp && pnpm build-types-roll && pnpm build-types-check", + "build": "pnpm clean && pnpm build-bundle && pnpm build-types", + "clean": "rimraf dist test/generated test/e2e/generated coverage node_modules/.cache", + "dev": "rimraf dist && pnpm build-bundle --watch", + "lint:fix": "eslint . --fix", + "lint": "eslint .", + "prepublishOnly": "pnpm build", + "test:coverage": "vitest run --config vitest.config.unit.ts --coverage", + "test:e2e": "vitest run --config vitest.config.e2e.ts", + "test:sample": "node test/sample.cjs", + "test:update": "vitest watch --config vitest.config.unit.ts --update", + "test:watch": "vitest watch --config vitest.config.unit.ts", + "test": "vitest run --config vitest.config.unit.ts", + "typecheck": "tsc --noEmit" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "11.5.4", + "c12": "1.10.0", + "camelcase": "8.0.0", + "commander": "12.0.0", + "handlebars": "4.7.8" + }, + "peerDependencies": { + "typescript": "^5.x" + }, + "devDependencies": { + "@angular-devkit/build-angular": "17.3.4", + "@angular/animations": "17.3.4", + "@angular/cli": "17.3.4", + "@angular/common": "17.3.4", + "@angular/compiler": "17.3.4", + "@angular/compiler-cli": "17.3.4", + "@angular/core": "17.3.4", + "@angular/forms": "17.3.4", + "@angular/platform-browser": "17.3.4", + "@angular/platform-browser-dynamic": "17.3.4", + "@angular/router": "17.3.4", + "@rollup/plugin-commonjs": "25.0.7", + "@rollup/plugin-json": "6.1.0", + "@rollup/plugin-node-resolve": "15.2.3", + "@rollup/plugin-terser": "0.4.4", + "@rollup/plugin-typescript": "11.1.6", + "@types/cross-spawn": "6.0.6", + "@types/express": "4.17.21", + "@types/node": "20.12.7", + "@vitest/coverage-v8": "1.5.0", + "axios": "1.6.8", + "cross-spawn": "7.0.3", + "eslint": "9.0.0", + "eslint-config-prettier": "9.1.0", + "eslint-plugin-simple-import-sort": "12.1.0", + "eslint-plugin-sort-keys-fix": "1.1.2", + "express": "4.19.2", + "glob": "10.3.12", + "globals": "15.0.0", + "node-fetch": "3.3.2", + "prettier": "3.2.5", + "puppeteer": "22.6.4", + "rimraf": "5.0.5", + "rollup": "4.14.2", + "rollup-plugin-dts": "6.1.0", + "rxjs": "7.8.1", + "ts-node": "10.9.2", + "tslib": "2.6.2", + "typescript": "5.4.5", + "typescript-eslint": "7.6.0", + "vitest": "1.5.0" + } } diff --git a/packages/openapi-ts/rollup.config.ts b/packages/openapi-ts/rollup.config.ts index e867ca415..60dc13c04 100644 --- a/packages/openapi-ts/rollup.config.ts +++ b/packages/openapi-ts/rollup.config.ts @@ -1,15 +1,15 @@ -import { readFileSync } from 'node:fs' -import path from 'node:path' -import { fileURLToPath } from 'node:url' +import { readFileSync } from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; -import commonjs from '@rollup/plugin-commonjs' -import json from '@rollup/plugin-json' -import { nodeResolve } from '@rollup/plugin-node-resolve' -import terser from '@rollup/plugin-terser' -import typescript from '@rollup/plugin-typescript' -import handlebars from 'handlebars' -import type { Plugin, RollupOptions } from 'rollup' -import { defineConfig } from 'rollup' +import commonjs from '@rollup/plugin-commonjs'; +import json from '@rollup/plugin-json'; +import { nodeResolve } from '@rollup/plugin-node-resolve'; +import terser from '@rollup/plugin-terser'; +import typescript from '@rollup/plugin-typescript'; +import handlebars from 'handlebars'; +import type { Plugin, RollupOptions } from 'rollup'; +import { defineConfig } from 'rollup'; /** * Custom plugin to parse handlebar imports and precompile @@ -20,47 +20,47 @@ export function handlebarsPlugin(): Plugin { return { load: (file: any) => { if (path.extname(file) === '.hbs') { - const template = readFileSync(file, 'utf8').toString().trim() + const template = readFileSync(file, 'utf8').toString().trim(); const templateSpec = handlebars.precompile(template, { knownHelpers: { camelCase: true, equals: true, ifdef: true, notEquals: true, - useDateType: true + useDateType: true, }, knownHelpersOnly: true, noEscape: true, preventIndent: true, - strict: true - }) - return `export default ${templateSpec};` + strict: true, + }); + return `export default ${templateSpec};`; } - return null + return null; }, name: 'handlebars', resolveId: (file: any, importer: any) => { if (path.extname(file) === '.hbs') { - return path.resolve(path.dirname(importer), file) + return path.resolve(path.dirname(importer), file); } - return null - } - } + return null; + }, + }; } -const __dirname = fileURLToPath(new URL('.', import.meta.url)) +const __dirname = fileURLToPath(new URL('.', import.meta.url)); const pkg = JSON.parse( - readFileSync(new URL('./package.json', import.meta.url)).toString() -) + readFileSync(new URL('./package.json', import.meta.url)).toString(), +); // ESM only dependencies are not treated as external so that we can fully support CommonJS and ESM -const esmDependencies = ['camelcase'] +const esmDependencies = ['camelcase']; export const externalDependencies = [ ...Object.keys(pkg.dependencies), - ...Object.keys(pkg.peerDependencies) -].filter(dependency => !esmDependencies.includes(dependency)) + ...Object.keys(pkg.peerDependencies), +].filter((dependency) => !esmDependencies.includes(dependency)); function createConfig(isProduction: boolean) { return defineConfig({ @@ -68,26 +68,26 @@ function createConfig(isProduction: boolean) { input: path.resolve(__dirname, 'src/node/index.ts'), output: { file: path.resolve(__dirname, 'dist/node/index.cjs'), - format: 'cjs' + format: 'cjs', }, plugins: [ nodeResolve({ preferBuiltins: true }), typescript({ declaration: false, - tsconfig: path.resolve(__dirname, 'src/node/tsconfig.json') + tsconfig: path.resolve(__dirname, 'src/node/tsconfig.json'), }), commonjs({ - sourceMap: false + sourceMap: false, }), json(), handlebarsPlugin(), - isProduction && terser() - ] - }) + isProduction && terser(), + ], + }); } export default (commandLineArgs: any): RollupOptions[] => { - const isDev = commandLineArgs.watch - const isProduction = !isDev - return defineConfig([createConfig(isProduction)]) -} + const isDev = commandLineArgs.watch; + const isProduction = !isDev; + return defineConfig([createConfig(isProduction)]); +}; diff --git a/packages/openapi-ts/rollup.dts.config.ts b/packages/openapi-ts/rollup.dts.config.ts index f3c71476a..ebb285d54 100644 --- a/packages/openapi-ts/rollup.dts.config.ts +++ b/packages/openapi-ts/rollup.dts.config.ts @@ -1,16 +1,16 @@ -import { defineConfig } from 'rollup' -import dts from 'rollup-plugin-dts' +import { defineConfig } from 'rollup'; +import dts from 'rollup-plugin-dts'; -import { externalDependencies } from './rollup.config' +import { externalDependencies } from './rollup.config'; export default defineConfig({ external: externalDependencies, input: { - index: './temp/node/index.d.ts' + index: './temp/node/index.d.ts', }, output: { dir: './dist/node', - format: 'cjs' + format: 'cjs', }, - plugins: [dts({ respectExternal: true })] -}) + plugins: [dts({ respectExternal: true })], +}); diff --git a/packages/openapi-ts/src/compiler/classes.ts b/packages/openapi-ts/src/compiler/classes.ts index 9796d5043..2b5586991 100644 --- a/packages/openapi-ts/src/compiler/classes.ts +++ b/packages/openapi-ts/src/compiler/classes.ts @@ -1,19 +1,19 @@ -import ts from 'typescript' +import ts from 'typescript'; -import { createTypeNode } from './typedef' -import { toExpression } from './types' -import { addLeadingComment, Comments, isType } from './utils' +import { createTypeNode } from './typedef'; +import { toExpression } from './types'; +import { addLeadingComment, Comments, isType } from './utils'; -type AccessLevel = 'public' | 'protected' | 'private' +type AccessLevel = 'public' | 'protected' | 'private'; export type FunctionParameter = { - accessLevel?: AccessLevel - default?: any - isReadOnly?: boolean - isRequired?: boolean - name: string - type: any | ts.TypeNode -} + accessLevel?: AccessLevel; + default?: any; + isReadOnly?: boolean; + isRequired?: boolean; + name: string; + type: any | ts.TypeNode; +}; /** * Convert AccessLevel to proper TypeScript compiler API modifier. @@ -28,13 +28,13 @@ const toAccessLevelModifiers = (access?: AccessLevel): ts.ModifierLike[] => { ? ts.SyntaxKind.ProtectedKeyword : access === 'private' ? ts.SyntaxKind.PrivateKeyword - : undefined - const modifiers: ts.ModifierLike[] = [] + : undefined; + const modifiers: ts.ModifierLike[] = []; if (keyword) { - modifiers.push(ts.factory.createModifier(keyword)) + modifiers.push(ts.factory.createModifier(keyword)); } - return modifiers -} + return modifiers; +}; /** * Convert parameters to the declaration array expected by compiler API. @@ -42,10 +42,10 @@ const toAccessLevelModifiers = (access?: AccessLevel): ts.ModifierLike[] => { * @returns ts.ParameterDeclaration[] */ const toParameterDeclarations = (parameters: FunctionParameter[]) => - parameters.map(p => { - const modifiers = toAccessLevelModifiers(p.accessLevel) + parameters.map((p) => { + const modifiers = toAccessLevelModifiers(p.accessLevel); if (p.isReadOnly) { - modifiers.push(ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)) + modifiers.push(ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)); } return ts.factory.createParameterDeclaration( modifiers, @@ -55,9 +55,9 @@ const toParameterDeclarations = (parameters: FunctionParameter[]) => ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : undefined, p.type !== undefined ? createTypeNode(p.type) : undefined, - p.default !== undefined ? toExpression({ value: p.default }) : undefined - ) - }) + p.default !== undefined ? toExpression({ value: p.default }) : undefined, + ); + }); /** * Create a class constructor declaration. @@ -73,24 +73,24 @@ export const createConstructorDeclaration = ({ comment = undefined, multiLine = true, parameters = [], - statements = [] + statements = [], }: { - accessLevel?: AccessLevel - comment?: Comments - multiLine?: boolean - parameters?: FunctionParameter[] - statements?: ts.Statement[] + 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) - ) + ts.factory.createBlock(statements, multiLine), + ); if (comment?.length) { - addLeadingComment(node, comment) + addLeadingComment(node, comment); } - return node -} + return node; +}; /** * Create a class method declaration. @@ -112,20 +112,20 @@ export const createMethodDeclaration = ({ name, parameters = [], returnType = undefined, - statements = [] + statements = [], }: { - accessLevel?: AccessLevel - comment?: Comments - isStatic?: boolean - multiLine?: boolean - name: string - parameters?: FunctionParameter[] - returnType?: string | ts.TypeNode - statements?: ts.Statement[] + accessLevel?: AccessLevel; + comment?: Comments; + isStatic?: boolean; + multiLine?: boolean; + name: string; + parameters?: FunctionParameter[]; + returnType?: string | ts.TypeNode; + statements?: ts.Statement[]; }) => { - const modifiers = toAccessLevelModifiers(accessLevel) + const modifiers = toAccessLevelModifiers(accessLevel); if (isStatic) { - modifiers.push(ts.factory.createModifier(ts.SyntaxKind.StaticKeyword)) + modifiers.push(ts.factory.createModifier(ts.SyntaxKind.StaticKeyword)); } const node = ts.factory.createMethodDeclaration( modifiers, @@ -135,18 +135,18 @@ export const createMethodDeclaration = ({ [], toParameterDeclarations(parameters), returnType ? createTypeNode(returnType) : undefined, - ts.factory.createBlock(statements, multiLine) - ) + ts.factory.createBlock(statements, multiLine), + ); if (comment?.length) { - addLeadingComment(node, comment) + addLeadingComment(node, comment); } - return node -} + return node; +}; type ClassDecorator = { - name: string - args: any[] -} + name: string; + args: any[]; +}; /** * Create a class declaration. @@ -158,15 +158,15 @@ type ClassDecorator = { export const createClassDeclaration = ({ decorator = undefined, members = [], - name + name, }: { - decorator?: ClassDecorator - members?: ts.ClassElement[] - name: string + decorator?: ClassDecorator; + members?: ts.ClassElement[]; + name: string; }) => { const modifiers: ts.ModifierLike[] = [ - ts.factory.createModifier(ts.SyntaxKind.ExportKeyword) - ] + ts.factory.createModifier(ts.SyntaxKind.ExportKeyword), + ]; if (decorator) { modifiers.unshift( ts.factory.createDecorator( @@ -174,27 +174,27 @@ export const createClassDeclaration = ({ ts.factory.createIdentifier(decorator.name), undefined, decorator.args - .map(arg => toExpression({ value: arg })) - .filter(isType) - ) - ) - ) + .map((arg) => toExpression({ value: arg })) + .filter(isType), + ), + ), + ); } // Add newline between each class member. - const m: ts.ClassElement[] = [] - members.forEach(member => { - m.push(member) + const m: ts.ClassElement[] = []; + members.forEach((member) => { + m.push(member); // @ts-ignore - m.push(ts.factory.createIdentifier('\n')) - }) + m.push(ts.factory.createIdentifier('\n')); + }); return ts.factory.createClassDeclaration( modifiers, ts.factory.createIdentifier(name), [], [], - m - ) -} + m, + ); +}; /** * Create a return function call. Example `return call(param);`. @@ -204,17 +204,17 @@ export const createClassDeclaration = ({ */ export const createReturnFunctionCall = ({ args = [], - name + name, }: { - args: any[] - name: string + args: any[]; + name: string; }) => ts.factory.createReturnStatement( ts.factory.createCallExpression( ts.factory.createIdentifier(name), undefined, args - .map(arg => ts.factory.createIdentifier(arg)) - .filter(isType) - ) - ) + .map((arg) => ts.factory.createIdentifier(arg)) + .filter(isType), + ), + ); diff --git a/packages/openapi-ts/src/compiler/index.ts b/packages/openapi-ts/src/compiler/index.ts index 3d94f2f0f..0d2be1a99 100644 --- a/packages/openapi-ts/src/compiler/index.ts +++ b/packages/openapi-ts/src/compiler/index.ts @@ -1,112 +1,117 @@ -import { PathLike, rmSync, writeFileSync } from 'node:fs' -import path from 'node:path' +import { PathLike, rmSync, writeFileSync } from 'node:fs'; +import path from 'node:path'; -import ts from 'typescript' +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' +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' +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 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 } -} + fileName.length - (extension ? extension.length + 1 : 0), + ); + return { extension, name }; +}; export class TypeScriptFile { - private _headers: Array = [] - private _imports: Array = [] - private _items: Array = [] - private _name: string - private _path: PathLike + private _headers: Array = []; + private _imports: Array = []; + private _items: Array = []; + private _name: string; + private _path: PathLike; public constructor({ dir, name, - header = true + header = true, }: { - dir: string - name: string - header?: boolean + dir: string; + name: string; + header?: boolean; }) { - this._name = this._setName(name) - this._path = path.resolve(dir, this.getName()) + 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' - const comment = addLeadingComment(undefined, [text], true, false) - this._headers = [...this._headers, comment] + const text = 'This file is auto-generated by @hey-api/openapi-ts'; + const comment = addLeadingComment(undefined, [text], true, false); + this._headers = [...this._headers, comment]; } } public add(...nodes: Array): void { - this._items = [...this._items, ...nodes] + this._items = [...this._items, ...nodes]; } public addNamedImport( ...params: Parameters ): void { - this._imports = [...this._imports, compiler.import.named(...params)] + this._imports = [...this._imports, compiler.import.named(...params)]; } public getName(withExtension = true) { if (withExtension) { - return this._name + return this._name; } - const { name } = splitNameAndExtension(this._name) - return name + const { name } = splitNameAndExtension(this._name); + return name; } public isEmpty() { - return !this._items.length + return !this._items.length; } public remove(options?: Parameters[1]) { - rmSync(this._path, options) + rmSync(this._path, options); } private _setName(fileName: string) { if (fileName.includes('index')) { - return fileName + return fileName; } - const { extension, name } = splitNameAndExtension(fileName) - return [name, 'gen', extension].filter(Boolean).join('.') + const { extension, name } = splitNameAndExtension(fileName); + return [name, 'gen', extension].filter(Boolean).join('.'); } public toString(seperator: string = '\n') { - let output: string[] = [] + let output: string[] = []; if (this._headers.length) { - output = [...output, this._headers.join('\n')] + output = [...output, this._headers.join('\n')]; } if (this._imports.length) { - output = [...output, this._imports.map(v => tsNodeToString(v)).join('\n')] + 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) + ...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 + this.remove({ force: true }); + return; } - writeFileSync(this._path, this.toString(seperator)) + writeFileSync(this._path, this.toString(seperator)); } } @@ -115,15 +120,15 @@ export const compiler = { constructor: classes.createConstructorDeclaration, create: classes.createClassDeclaration, method: classes.createMethodDeclaration, - return: classes.createReturnFunctionCall + return: classes.createReturnFunctionCall, }, export: { all: module.createExportAllDeclaration, asConst: module.createExportVariableAsConst, - named: module.createNamedExportDeclarations + named: module.createNamedExportDeclarations, }, import: { - named: module.createNamedImportDeclarations + named: module.createNamedImportDeclarations, }, typedef: { alias: typedef.createTypeAliasDeclaration, @@ -133,15 +138,15 @@ export const compiler = { intersect: typedef.createTypeIntersectNode, record: typedef.createTypeRecordNode, tuple: typedef.createTypeTupleNode, - union: typedef.createTypeUnionNode + union: typedef.createTypeUnionNode, }, types: { array: types.createArrayType, enum: types.createEnumDeclaration, - object: types.createObjectType + object: types.createObjectType, }, utils: { toNode: stringToTsNodes, - toString: tsNodeToString - } -} + toString: tsNodeToString, + }, +}; diff --git a/packages/openapi-ts/src/compiler/module.ts b/packages/openapi-ts/src/compiler/module.ts index 7232f88df..dfa62f03e 100644 --- a/packages/openapi-ts/src/compiler/module.ts +++ b/packages/openapi-ts/src/compiler/module.ts @@ -1,6 +1,6 @@ -import ts from 'typescript' +import ts from 'typescript'; -import { ots } from './utils' +import { ots } from './utils'; /** * Create export all declaration. Example: `export * from './y'`. @@ -12,12 +12,12 @@ export const createExportAllDeclaration = (module: string) => undefined, false, undefined, - ots.string(module) - ) + ots.string(module), + ); type ImportItem = | { name: string; isTypeOnly?: boolean; alias?: string } - | string + | string; /** * Create a named export declaration. Example: `export { X } from './y'`. @@ -27,26 +27,30 @@ type ImportItem = */ export const createNamedExportDeclarations = ( items: Array | ImportItem, - module: string + module: string, ): ts.ExportDeclaration => { - items = Array.isArray(items) ? items : [items] - const isAllTypes = items.every(i => typeof i === 'object' && i.isTypeOnly) + 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 => { + items.map((item) => { const { name, isTypeOnly = undefined, - alias = undefined - } = typeof item === 'string' ? { name: item } : item - return ots.export(name, isAllTypes ? false : Boolean(isTypeOnly), alias) - }) + alias = undefined, + } = typeof item === 'string' ? { name: item } : item; + return ots.export( + name, + isAllTypes ? false : Boolean(isTypeOnly), + alias, + ); + }), ), - ots.string(module) - ) -} + ots.string(module), + ); +}; /** * Create an export variable as const statement. Example: `export x = {} as const`. @@ -56,7 +60,7 @@ export const createNamedExportDeclarations = ( */ export const createExportVariableAsConst = ( name: string, - expression: ts.Expression + expression: ts.Expression, ): ts.VariableStatement => ts.factory.createVariableStatement( [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], @@ -68,13 +72,13 @@ export const createExportVariableAsConst = ( undefined, ts.factory.createAsExpression( expression, - ts.factory.createTypeReferenceNode('const') - ) - ) + ts.factory.createTypeReferenceNode('const'), + ), + ), ], - ts.NodeFlags.Const - ) - ) + ts.NodeFlags.Const, + ), + ); /** * Create a named import declaration. Example: `import { X } from './y'`. @@ -84,30 +88,30 @@ export const createExportVariableAsConst = ( */ export const createNamedImportDeclarations = ( items: Array | ImportItem, - module: string + module: string, ): ts.ImportDeclaration => { - items = Array.isArray(items) ? items : [items] - const isAllTypes = items.every(i => typeof i === 'object' && i.isTypeOnly) + 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 => { + items.map((item) => { const { name, isTypeOnly = undefined, - alias = undefined - } = typeof item === 'string' ? { name: item } : item + alias = undefined, + } = typeof item === 'string' ? { name: item } : item; return ots.import( name, isAllTypes ? false : Boolean(isTypeOnly), - alias - ) - }) - ) + alias, + ); + }), + ), ), - ots.string(module) - ) -} + ots.string(module), + ); +}; diff --git a/packages/openapi-ts/src/compiler/typedef.ts b/packages/openapi-ts/src/compiler/typedef.ts index f59a32f95..85917bfd7 100644 --- a/packages/openapi-ts/src/compiler/typedef.ts +++ b/packages/openapi-ts/src/compiler/typedef.ts @@ -1,20 +1,25 @@ -import ts from 'typescript' +import ts from 'typescript'; -import { addLeadingComment, type Comments, tsNodeToString } from './utils' +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)); - } +export const createTypeNode = ( + base: any | ts.TypeNode, + args?: (any | ts.TypeNode)[], +): ts.TypeNode => { + if (ts.isTypeNode(base)) { + return base; + } - return ts.factory.createTypeReferenceNode( - base, - args?.map(arg => createTypeNode(arg)) + if (typeof base === 'number') { + return ts.factory.createLiteralTypeNode( + ts.factory.createNumericLiteral(base), ); + } + + return ts.factory.createTypeReferenceNode( + base, + args?.map((arg) => createTypeNode(arg)), + ); }; /** @@ -27,28 +32,28 @@ export const createTypeNode = (base: any | ts.TypeNode, args?: (any | ts.TypeNod export const createTypeAliasDeclaration = ( name: string, type: string | ts.TypeNode, - comments?: Comments + comments?: Comments, ): ts.TypeAliasDeclaration => { const node = ts.factory.createTypeAliasDeclaration( [ts.factory.createModifier(ts.SyntaxKind.ExportKeyword)], ts.factory.createIdentifier(name), [], - createTypeNode(type) - ) + createTypeNode(type), + ); if (comments?.length) { - addLeadingComment(node, comments) + addLeadingComment(node, comments); } - return node -} + return node; +}; // Property of a interface type node. export type Property = { - name: string - type: any | ts.TypeNode - isRequired?: boolean - isReadOnly?: boolean - comment?: Comments -} + name: string; + type: any | ts.TypeNode; + isRequired?: boolean; + isReadOnly?: boolean; + comment?: Comments; +}; /** * Create a interface type node. Example `{ readonly x: string, y?: number }` @@ -58,10 +63,10 @@ export type Property = { */ export const createTypeInterfaceNode = ( properties: Property[], - isNullable: boolean = false + isNullable: boolean = false, ) => { const node = ts.factory.createTypeLiteralNode( - properties.map(property => { + properties.map((property) => { const signature = ts.factory.createPropertySignature( property.isReadOnly ? [ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)] @@ -70,23 +75,23 @@ export const createTypeInterfaceNode = ( property.isRequired ? undefined : ts.factory.createToken(ts.SyntaxKind.QuestionToken), - createTypeNode(property.type) - ) - const comment = property.comment + createTypeNode(property.type), + ); + const comment = property.comment; if (comment) { - addLeadingComment(signature, comment) + addLeadingComment(signature, comment); } - return signature - }) - ) + return signature; + }), + ); if (!isNullable) { - return node + return node; } return ts.factory.createUnionTypeNode([ node, - ts.factory.createTypeReferenceNode('null') - ]) -} + ts.factory.createTypeReferenceNode('null'), + ]); +}; /** * Create type union node. Example `string | number | boolean` @@ -96,14 +101,14 @@ export const createTypeInterfaceNode = ( */ export const createTypeUnionNode = ( types: (any | ts.TypeNode)[], - isNullable: boolean = false + isNullable: boolean = false, ) => { - const nodes = types.map(t => createTypeNode(t)) + const nodes = types.map((t) => createTypeNode(t)); if (isNullable) { - nodes.push(ts.factory.createTypeReferenceNode('null')) + nodes.push(ts.factory.createTypeReferenceNode('null')); } - return ts.factory.createUnionTypeNode(nodes) -} + return ts.factory.createUnionTypeNode(nodes); +}; /** * Create type intersect node. Example `string & number & boolean` @@ -113,18 +118,18 @@ export const createTypeUnionNode = ( */ export const createTypeIntersectNode = ( types: (any | ts.TypeNode)[], - isNullable: boolean = false + isNullable: boolean = false, ) => { - const nodes = types.map(t => createTypeNode(t)) - const intersect = ts.factory.createIntersectionTypeNode(nodes) + const nodes = types.map((t) => createTypeNode(t)); + const intersect = ts.factory.createIntersectionTypeNode(nodes); if (isNullable) { return ts.factory.createUnionTypeNode([ intersect, - ts.factory.createTypeReferenceNode('null') - ]) + ts.factory.createTypeReferenceNode('null'), + ]); } - return intersect -} + return intersect; +}; /** * Create type tuple node. Example `string, number, boolean` @@ -134,14 +139,14 @@ export const createTypeIntersectNode = ( */ export const createTypeTupleNode = ( types: (any | ts.TypeNode)[], - isNullable: boolean = false + isNullable: boolean = false, ) => { - const nodes = types.map(t => createTypeNode(t)) + const nodes = types.map((t) => createTypeNode(t)); if (isNullable) { - nodes.push(ts.factory.createTypeReferenceNode('null')) + nodes.push(ts.factory.createTypeReferenceNode('null')); } - return ts.factory.createTupleTypeNode(nodes) -} + return ts.factory.createTupleTypeNode(nodes); +}; /** * Create type record node. Example `{ [key: string]: string }` @@ -153,10 +158,10 @@ export const createTypeTupleNode = ( export const createTypeRecordNode = ( keys: (any | ts.TypeNode)[], values: (any | ts.TypeNode)[], - isNullable: boolean = false + isNullable: boolean = false, ) => { - const keyNode = createTypeUnionNode(keys) - const valueNode = createTypeUnionNode(values) + 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 @@ -164,17 +169,17 @@ export const createTypeRecordNode = ( { isRequired: true, name: `[key: ${tsNodeToString(keyNode)}]`, - type: valueNode - } - ]) + type: valueNode, + }, + ]); if (!isNullable) { - return node + return node; } return ts.factory.createUnionTypeNode([ node, - ts.factory.createTypeReferenceNode('null') - ]) -} + ts.factory.createTypeReferenceNode('null'), + ]); +}; /** * Create type array node. Example `Array` @@ -184,16 +189,16 @@ export const createTypeRecordNode = ( */ export const createTypeArrayNode = ( types: (any | ts.TypeNode)[], - isNullable: boolean = false + isNullable: boolean = false, ) => { const node = ts.factory.createTypeReferenceNode('Array', [ - createTypeUnionNode(types) - ]) + createTypeUnionNode(types), + ]); if (!isNullable) { - return node + return node; } return ts.factory.createUnionTypeNode([ node, - ts.factory.createTypeReferenceNode('null') - ]) -} + ts.factory.createTypeReferenceNode('null'), + ]); +}; diff --git a/packages/openapi-ts/src/compiler/types.ts b/packages/openapi-ts/src/compiler/types.ts index 66943615b..5fc911cfd 100644 --- a/packages/openapi-ts/src/compiler/types.ts +++ b/packages/openapi-ts/src/compiler/types.ts @@ -1,6 +1,6 @@ -import ts from 'typescript' +import ts from 'typescript'; -import { addLeadingComment, type Comments, isType, ots } from './utils' +import { addLeadingComment, type Comments, isType, ots } from './utils'; /** * Convert an unknown value to an expression. @@ -14,37 +14,37 @@ export const toExpression = ({ value, unescape = false, shorthand = false, - identifiers = [] + identifiers = [], }: { - value: T - unescape?: boolean - shorthand?: boolean - identifiers?: string[] + value: T; + unescape?: boolean; + shorthand?: boolean; + identifiers?: string[]; }): ts.Expression | undefined => { if (value === null) { - return ts.factory.createNull() + return ts.factory.createNull(); } if (Array.isArray(value)) { - return createArrayType({ arr: value }) + return createArrayType({ arr: value }); } if (typeof value === 'object') { - return createObjectType({ identifiers, obj: value, shorthand }) + return createObjectType({ identifiers, obj: value, shorthand }); } if (typeof value === 'number') { - return ots.number(value) + return ots.number(value); } if (typeof value === 'boolean') { - return ots.boolean(value) + return ots.boolean(value); } if (typeof value === 'string') { - return ots.string(value, unescape) + return ots.string(value, unescape); } -} +}; /** * Create Array type expression. @@ -54,16 +54,16 @@ export const toExpression = ({ */ export const createArrayType = ({ arr, - multiLine = false + multiLine = false, }: { - arr: T[] - multiLine?: boolean + arr: T[]; + multiLine?: boolean; }): ts.ArrayLiteralExpression => ts.factory.createArrayLiteralExpression( - arr.map(value => toExpression({ value })).filter(isType), + arr.map((value) => toExpression({ value })).filter(isType), // Multiline if the array contains objects, or if specified by the user. - (!Array.isArray(arr[0]) && typeof arr[0] === 'object') || multiLine - ) + (!Array.isArray(arr[0]) && typeof arr[0] === 'object') || multiLine, + ); /** * Create Object type expression. @@ -81,14 +81,14 @@ export const createObjectType = ({ multiLine = true, obj, shorthand = false, - unescape = false + unescape = false, }: { - obj: T - comments?: Record - identifiers?: string[] - multiLine?: boolean - shorthand?: boolean - unescape?: boolean + obj: T; + comments?: Record; + identifiers?: string[]; + multiLine?: boolean; + shorthand?: boolean; + unescape?: boolean; }): ts.ObjectLiteralExpression => { const properties = Object.entries(obj) .map(([key, value]) => { @@ -97,39 +97,39 @@ export const createObjectType = ({ identifiers: identifiers.includes(key) ? Object.keys(value) : [], shorthand, unescape, - value - }) + value, + }); if (!initializer) { - return undefined + 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) + initializer = ts.factory.createIdentifier(value as string); } // Check key value equality before possibly modifying it - const hasShorthandSupport = key === value + const hasShorthandSupport = key === value; if (key.match(/\W/g) && !key.startsWith("'") && !key.endsWith("'")) { - key = `'${key}'` + key = `'${key}'`; } const assignment = shorthand && hasShorthandSupport ? ts.factory.createShorthandPropertyAssignment(value) - : ts.factory.createPropertyAssignment(key, initializer) - const c = comments?.[key] + : ts.factory.createPropertyAssignment(key, initializer); + const c = comments?.[key]; if (c?.length) { - addLeadingComment(assignment, c) + addLeadingComment(assignment, c); } - return assignment + return assignment; }) - .filter(isType) + .filter(isType); return ts.factory.createObjectLiteralExpression( properties as any[], - multiLine - ) -} + multiLine, + ); +}; /** * Create enum declaration. Example `export enum T = { X, Y };` @@ -143,28 +143,28 @@ export const createEnumDeclaration = ({ name, obj, leadingComment = [], - comments = {} + comments = {}, }: { - name: string - obj: T - leadingComment: Comments - comments: Record + name: string; + obj: T; + leadingComment: Comments; + comments: Record; }): 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] + const initializer = toExpression({ unescape: true, value }); + const assignment = ts.factory.createEnumMember(key, initializer); + const c = comments?.[key]; if (c) { - addLeadingComment(assignment, c) + addLeadingComment(assignment, c); } - return assignment - }) - ) + return assignment; + }), + ); if (leadingComment.length) { - addLeadingComment(declaration, leadingComment) + addLeadingComment(declaration, leadingComment); } - return declaration -} + return declaration; +}; diff --git a/packages/openapi-ts/src/compiler/utils.ts b/packages/openapi-ts/src/compiler/utils.ts index a0f694cf2..47cad1fb7 100644 --- a/packages/openapi-ts/src/compiler/utils.ts +++ b/packages/openapi-ts/src/compiler/utils.ts @@ -1,16 +1,16 @@ -import ts from 'typescript' +import ts from 'typescript'; -import { getConfig } from '../utils/config' -import { unescapeName } from '../utils/escape' +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 -} + useSingleQuotes: true, +}; -const printer = ts.createPrinter({ newLine: CONFIG.newLine }) +const printer = ts.createPrinter({ newLine: CONFIG.newLine }); export const createSourceFile = (sourceText: string) => ts.createSourceFile( @@ -18,10 +18,10 @@ export const createSourceFile = (sourceText: string) => sourceText, CONFIG.scriptTarget, undefined, - CONFIG.scriptKind - ) + CONFIG.scriptKind, + ); -const blankSourceFile = createSourceFile('') +const blankSourceFile = createSourceFile(''); /** * Print a typescript node to a string. @@ -32,15 +32,15 @@ export function tsNodeToString(node: ts.Node): string { const result = printer.printNode( ts.EmitHint.Unspecified, node, - blankSourceFile - ) + blankSourceFile, + ); try { - return decodeURIComponent(result) + return decodeURIComponent(result); } catch { if (getConfig().debug) { - console.warn('Could not decode value:', result) + console.warn('Could not decode value:', result); } - return result + return result; } } @@ -50,8 +50,8 @@ export function tsNodeToString(node: ts.Node): string { * @returns ts.Node */ export function stringToTsNodes(s: string): ts.Node { - const file = createSourceFile(s) - return file.statements[0] + const file = createSourceFile(s); + return file.statements[0]; } // ots for openapi-ts is helpers to reduce repetition of basic ts factory functions. @@ -60,94 +60,94 @@ export const ots = { boolean: (value: boolean) => value ? ts.factory.createTrue() : ts.factory.createFalse(), export: (name: string, isTypeOnly?: boolean, alias?: string) => { - const n = ts.factory.createIdentifier(encodeURIComponent(name)) + const n = ts.factory.createIdentifier(encodeURIComponent(name)); return ts.factory.createExportSpecifier( isTypeOnly ?? false, alias ? n : undefined, - alias ? ts.factory.createIdentifier(encodeURIComponent(alias)) : n - ) + alias ? ts.factory.createIdentifier(encodeURIComponent(alias)) : n, + ); }, import: (name: string, isTypeOnly?: boolean, alias?: string) => { - const n = ts.factory.createIdentifier(encodeURIComponent(name)) + const n = ts.factory.createIdentifier(encodeURIComponent(name)); return ts.factory.createImportSpecifier( isTypeOnly ?? false, alias ? n : undefined, - alias ? ts.factory.createIdentifier(encodeURIComponent(alias)) : n - ) + 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)) - ) + ts.factory.createNumericLiteral(Math.abs(value)), + ); } - return ts.factory.createNumericLiteral(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) + value = unescapeName(value); } - const hasBothQuotes = value.includes("'") && value.includes('"') - const hasNewlines = value.includes('\n') - const hasUnescapedBackticks = value.startsWith('`') - const isBacktickEscaped = value.startsWith('\\`') && value.endsWith('\\`') + 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, '\\`')}\`` + value = `\`${value.replace(/`/g, '\\`')}\``; } - const text = encodeURIComponent(value) + const text = encodeURIComponent(value); if (value.startsWith('`')) { - return ts.factory.createIdentifier(text) + return ts.factory.createIdentifier(text); } return ts.factory.createStringLiteral( text, - value.includes("'") ? false : CONFIG.useSingleQuotes - ) - } -} + value.includes("'") ? false : CONFIG.useSingleQuotes, + ); + }, +}; export const isType = (value: T | undefined): value is T => - value !== undefined + value !== undefined; -export type Comments = Array +export type Comments = Array; export const addLeadingComment = ( node: ts.Node | undefined, text: Comments, hasTrailingNewLine: boolean = true, - useJSDocStyle = true + useJSDocStyle = true, ): string => { - const comments = text.filter(Boolean) + const comments = text.filter(Boolean); if (!comments.length) { - return '' + 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; } - 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') + ['*', ...comments.map((row) => ` * ${row}`), ' '].join('\n'), ), - hasTrailingNewLine - ) - return '' -} + hasTrailingNewLine, + ); + return ''; +}; diff --git a/packages/openapi-ts/src/index.spec.ts b/packages/openapi-ts/src/index.spec.ts index 4d0b52df9..0aa7b2f0d 100644 --- a/packages/openapi-ts/src/index.spec.ts +++ b/packages/openapi-ts/src/index.spec.ts @@ -1,39 +1,39 @@ -import { describe, it } from 'vitest' +import { describe, it } from 'vitest'; -import { createClient } from './index' +import { createClient } from './index'; describe('index', () => { it('parses v2 without issues', async () => { await createClient({ dryRun: true, input: './test/spec/v2.json', - output: './generated/v2/' - }) - }) + output: './generated/v2/', + }); + }); it('parses v3 without issues', async () => { await createClient({ dryRun: true, input: './test/spec/v3.json', - output: './generated/v3/' - }) - }) + output: './generated/v3/', + }); + }); it('downloads and parses v2 without issues', async () => { await createClient({ dryRun: true, input: 'https://raw.githubusercontent.com/hey-api/openapi-ts/main/packages/openapi-ts/test/spec/v2.json', - output: './generated/v2-downloaded/' - }) - }) + output: './generated/v2-downloaded/', + }); + }); it('downloads and parses v3 without issues', async () => { await createClient({ dryRun: true, input: 'https://raw.githubusercontent.com/hey-api/openapi-ts/main/packages/openapi-ts/test/spec/v3.json', - output: './generated/v3-downloaded/' - }) - }) -}) + output: './generated/v3-downloaded/', + }); + }); +}); diff --git a/packages/openapi-ts/src/index.ts b/packages/openapi-ts/src/index.ts index fbd235ef2..256e5cb73 100644 --- a/packages/openapi-ts/src/index.ts +++ b/packages/openapi-ts/src/index.ts @@ -1,19 +1,19 @@ -import { readFileSync } from 'node:fs' -import path from 'node:path' +import { readFileSync } from 'node:fs'; +import path from 'node:path'; -import { loadConfig } from 'c12' -import { sync } from 'cross-spawn' +import { loadConfig } from 'c12'; +import { sync } from 'cross-spawn'; -import { parse } from './openApi' -import type { Client } from './types/client' -import type { Config, UserConfig } from './types/config' -import { getConfig, setConfig } from './utils/config' -import { getOpenApiSpec } from './utils/getOpenApiSpec' -import { registerHandlebarTemplates } from './utils/handlebars' -import { postProcessClient } from './utils/postprocess' -import { writeClient } from './utils/write/client' +import { parse } from './openApi'; +import type { Client } from './types/client'; +import type { Config, UserConfig } from './types/config'; +import { getConfig, setConfig } from './utils/config'; +import { getOpenApiSpec } from './utils/getOpenApiSpec'; +import { registerHandlebarTemplates } from './utils/handlebars'; +import { postProcessClient } from './utils/postprocess'; +import { writeClient } from './utils/write/client'; -type Dependencies = Record +type Dependencies = Record; // Dependencies used in each client. User must have installed these to use the generated client const clientDependencies: Record = { @@ -21,105 +21,105 @@ const clientDependencies: Record = { axios: ['axios'], fetch: [], node: ['node-fetch'], - xhr: [] -} + xhr: [], +}; const processOutput = (dependencies: Dependencies) => { - const config = getConfig() + const config = getConfig(); if (config.format) { if (dependencies.prettier) { - console.log('✨ Running Prettier') + console.log('✨ Running Prettier'); sync('prettier', [ '--ignore-unknown', config.output, '--write', '--ignore-path', - './.prettierignore' - ]) + './.prettierignore', + ]); } } if (config.lint && dependencies.eslint) { - console.log('✨ Running ESLint') - sync('eslint', [config.output, '--fix']) + console.log('✨ Running ESLint'); + sync('eslint', [config.output, '--fix']); } -} +}; const inferClient = (dependencies: Dependencies): Config['client'] => { - if (Object.keys(dependencies).some(d => d.startsWith('@angular'))) { - return 'angular' + if (Object.keys(dependencies).some((d) => d.startsWith('@angular'))) { + return 'angular'; } if (dependencies.axios) { - return 'axios' + return 'axios'; } if (dependencies['node-fetch']) { - return 'node' + return 'node'; } - return 'fetch' -} + return 'fetch'; +}; const logClientMessage = () => { - const { client } = getConfig() + const { client } = getConfig(); switch (client) { case 'angular': - return console.log('✨ Creating Angular client') + return console.log('✨ Creating Angular client'); case 'axios': - return console.log('✨ Creating Axios client') + return console.log('✨ Creating Axios client'); case 'fetch': - return console.log('✨ Creating Fetch client') + return console.log('✨ Creating Fetch client'); case 'node': - return console.log('✨ Creating Node.js client') + return console.log('✨ Creating Node.js client'); case 'xhr': - return console.log('✨ Creating XHR client') + return console.log('✨ Creating XHR client'); } -} +}; const logMissingDependenciesWarning = (dependencies: Dependencies) => { - const { client } = getConfig() + const { client } = getConfig(); const missing = clientDependencies[client].filter( - d => dependencies[d] === undefined - ) + (d) => dependencies[d] === undefined, + ); if (missing.length > 0) { console.log( '⚠️ Dependencies used in generated client are missing: ' + - missing.join(' ') - ) + missing.join(' '), + ); } -} +}; const getTypes = (userConfig: UserConfig): Config['types'] => { let types: Config['types'] = { export: true, - name: 'preserve' - } + name: 'preserve', + }; if (typeof userConfig.types === 'boolean') { - types.export = userConfig.types + types.export = userConfig.types; } else if (typeof userConfig.types === 'string') { - types.include = userConfig.types + types.include = userConfig.types; } else { types = { ...types, - ...userConfig.types - } + ...userConfig.types, + }; } - return types -} + return types; +}; const initConfig = async ( userConfig: UserConfig, - dependencies: Dependencies + dependencies: Dependencies, ) => { const { config: userConfigFromFile } = await loadConfig({ jitiOptions: { - esmResolve: true + esmResolve: true, }, name: 'openapi-ts', - overrides: userConfig - }) + overrides: userConfig, + }); if (userConfigFromFile) { - userConfig = { ...userConfigFromFile, ...userConfig } + userConfig = { ...userConfigFromFile, ...userConfig }; } const { @@ -139,40 +139,40 @@ const initConfig = async ( schemas = true, serviceResponse = 'body', useDateType = false, - useOptions = true - } = userConfig + useOptions = true, + } = userConfig; if (debug) { - console.warn('userConfig:', userConfig) + console.warn('userConfig:', userConfig); } if (!input) { throw new Error( - '🚫 input not provided - provide path to OpenAPI specification' - ) + '🚫 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' - ) + '🚫 output not provided - provide path where we should generate your client', + ); } if (postfixServices && postfixServices !== 'Service') { console.warn( - '⚠️ Deprecation warning: postfixServices. This setting will be removed in future versions. Please create an issue wih your use case if you need this option https://github.com/hey-api/openapi-ts/issues' - ) + '⚠️ Deprecation warning: postfixServices. This setting will be removed in future versions. Please create an issue wih your use case if you need this option https://github.com/hey-api/openapi-ts/issues', + ); } 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' - ) + '⚠️ 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 client = userConfig.client || inferClient(dependencies) - const output = path.resolve(process.cwd(), userConfig.output) - const types = getTypes(userConfig) + const client = userConfig.client || inferClient(dependencies); + const output = path.resolve(process.cwd(), userConfig.output); + const types = getTypes(userConfig); return setConfig({ base, @@ -194,9 +194,9 @@ const initConfig = async ( serviceResponse, types, useDateType, - useOptions - }) -} + useOptions, + }); +}; /** * Generate the OpenAPI client. This method will read the OpenAPI specification and based on the @@ -206,51 +206,51 @@ const initConfig = async ( */ export async function createClient(userConfig: UserConfig): Promise { const pkg = JSON.parse( - readFileSync(path.resolve(process.cwd(), 'package.json')).toString() - ) + readFileSync(path.resolve(process.cwd(), 'package.json')).toString(), + ); const dependencies = [pkg.dependencies, pkg.devDependencies].reduce( (res, deps) => ({ ...res, - ...deps + ...deps, }), - {} - ) + {}, + ); if (!dependencies.typescript) { - throw new Error('🚫 dependency missing - TypeScript must be installed') + throw new Error('🚫 dependency missing - TypeScript must be installed'); } - const config = await initConfig(userConfig, dependencies) + const config = await initConfig(userConfig, dependencies); const openApi = typeof config.input === 'string' ? await getOpenApiSpec(config.input) - : (config.input as unknown as Awaited>) + : (config.input as unknown as Awaited>); - const client = postProcessClient(parse(openApi)) - const templates = registerHandlebarTemplates() + const client = postProcessClient(parse(openApi)); + const templates = registerHandlebarTemplates(); if (!config.dryRun) { - logClientMessage() - logMissingDependenciesWarning(dependencies) - await writeClient(openApi, client, templates) - processOutput(dependencies) + logClientMessage(); + logMissingDependenciesWarning(dependencies); + await writeClient(openApi, client, templates); + processOutput(dependencies); } - console.log('✨ Done! Your client is located in:', config.output) + console.log('✨ Done! Your client is located in:', config.output); - return client + return client; } /** * Type helper for openapi-ts.config.ts, returns {@link UserConfig} object */ export function defineConfig(config: UserConfig): UserConfig { - return config + return config; } export default { createClient, - defineConfig -} + defineConfig, +}; diff --git a/packages/openapi-ts/src/node/index.ts b/packages/openapi-ts/src/node/index.ts index 696865a19..b59ae1e31 100644 --- a/packages/openapi-ts/src/node/index.ts +++ b/packages/openapi-ts/src/node/index.ts @@ -1,2 +1,2 @@ -export { createClient, defineConfig } from '../' -export type { UserConfig } from '../types/config' +export { createClient, defineConfig } from '../'; +export type { UserConfig } from '../types/config'; diff --git a/packages/openapi-ts/src/openApi/__tests__/index.spec.ts b/packages/openapi-ts/src/openApi/__tests__/index.spec.ts index 9396bc9f7..c7a684198 100644 --- a/packages/openapi-ts/src/openApi/__tests__/index.spec.ts +++ b/packages/openapi-ts/src/openApi/__tests__/index.spec.ts @@ -1,81 +1,81 @@ -import { afterEach, describe, expect, it, vi } from 'vitest' +import { afterEach, describe, expect, it, vi } from 'vitest'; -import { parse } from '..' -import * as parseV2 from '../v2' -import * as parseV3 from '../v3' +import { parse } from '..'; +import * as parseV2 from '../v2'; +import * as parseV3 from '../v3'; describe('parse', () => { afterEach(() => { - vi.restoreAllMocks() - }) + vi.restoreAllMocks(); + }); it('uses v2 parser', () => { - const spy = vi.spyOn(parseV2, 'parse') + const spy = vi.spyOn(parseV2, 'parse'); const spec: Parameters[0] = { info: { title: 'dummy', - version: '1.0' + version: '1.0', }, paths: {}, - swagger: '2' - } - parse(spec) - expect(spy).toHaveBeenCalledWith(spec) + swagger: '2', + }; + parse(spec); + expect(spy).toHaveBeenCalledWith(spec); const spec2: Parameters[0] = { info: { title: 'dummy', - version: '1.0' + version: '1.0', }, paths: {}, - swagger: '2.0' - } - parse(spec2) - expect(spy).toHaveBeenCalledWith(spec2) - }) + swagger: '2.0', + }; + parse(spec2); + expect(spy).toHaveBeenCalledWith(spec2); + }); it('uses v3 parser', () => { - const spy = vi.spyOn(parseV3, 'parse') + const spy = vi.spyOn(parseV3, 'parse'); const spec: Parameters[0] = { info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3', - paths: {} - } - parse(spec) - expect(spy).toHaveBeenCalledWith(spec) + paths: {}, + }; + parse(spec); + expect(spy).toHaveBeenCalledWith(spec); const spec2: Parameters[0] = { info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3.0', - paths: {} - } - parse(spec2) - expect(spy).toHaveBeenCalledWith(spec2) + paths: {}, + }; + parse(spec2); + expect(spy).toHaveBeenCalledWith(spec2); const spec3: Parameters[0] = { info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3.1.0', - paths: {} - } - parse(spec3) - expect(spy).toHaveBeenCalledWith(spec3) - }) + paths: {}, + }; + parse(spec3); + expect(spy).toHaveBeenCalledWith(spec3); + }); it('throws on unknown version', () => { // @ts-ignore expect(() => parse({ foo: 'bar' })).toThrow( - `Unsupported Open API specification: ${JSON.stringify({ foo: 'bar' }, null, 2)}` - ) - }) -}) + `Unsupported Open API specification: ${JSON.stringify({ foo: 'bar' }, null, 2)}`, + ); + }); +}); diff --git a/packages/openapi-ts/src/openApi/common/interfaces/Dictionary.ts b/packages/openapi-ts/src/openApi/common/interfaces/Dictionary.ts index f77ec686e..829f225db 100644 --- a/packages/openapi-ts/src/openApi/common/interfaces/Dictionary.ts +++ b/packages/openapi-ts/src/openApi/common/interfaces/Dictionary.ts @@ -1,3 +1,3 @@ export interface Dictionary { - [key: string]: T + [key: string]: T; } diff --git a/packages/openapi-ts/src/openApi/common/interfaces/OpenApi.ts b/packages/openapi-ts/src/openApi/common/interfaces/OpenApi.ts index cc5bce744..41a9fe08d 100644 --- a/packages/openapi-ts/src/openApi/common/interfaces/OpenApi.ts +++ b/packages/openapi-ts/src/openApi/common/interfaces/OpenApi.ts @@ -1,4 +1,4 @@ -import type { OpenApi as OpenApiV2 } from '../../v2/interfaces/OpenApi' -import type { OpenApi as OpenApiV3 } from '../../v3/interfaces/OpenApi' +import type { OpenApi as OpenApiV2 } from '../../v2/interfaces/OpenApi'; +import type { OpenApi as OpenApiV3 } from '../../v3/interfaces/OpenApi'; -export type OpenApi = OpenApiV2 | OpenApiV3 +export type OpenApi = OpenApiV2 | OpenApiV3; diff --git a/packages/openapi-ts/src/openApi/common/interfaces/Type.ts b/packages/openapi-ts/src/openApi/common/interfaces/Type.ts index b6925ec4e..1feeb5dd6 100644 --- a/packages/openapi-ts/src/openApi/common/interfaces/Type.ts +++ b/packages/openapi-ts/src/openApi/common/interfaces/Type.ts @@ -1,8 +1,8 @@ export interface Type { - $refs: string[] - base: string - imports: string[] - isNullable: boolean - template: string | null - type: string + $refs: string[]; + base: string; + imports: string[]; + isNullable: boolean; + template: string | null; + type: string; } diff --git a/packages/openapi-ts/src/openApi/common/interfaces/WithEnumExtension.ts b/packages/openapi-ts/src/openApi/common/interfaces/WithEnumExtension.ts index 01b59bc80..785d3d40e 100644 --- a/packages/openapi-ts/src/openApi/common/interfaces/WithEnumExtension.ts +++ b/packages/openapi-ts/src/openApi/common/interfaces/WithEnumExtension.ts @@ -1,6 +1,6 @@ export interface WithEnumExtension { // NSwag uses x-enumNames for custom enum names - 'x-enumNames'?: ReadonlyArray - 'x-enum-descriptions'?: ReadonlyArray - 'x-enum-varnames'?: ReadonlyArray + 'x-enumNames'?: ReadonlyArray; + 'x-enum-descriptions'?: ReadonlyArray; + 'x-enum-varnames'?: ReadonlyArray; } diff --git a/packages/openapi-ts/src/openApi/common/interfaces/client.ts b/packages/openapi-ts/src/openApi/common/interfaces/client.ts index 5ce209a9b..962facdc7 100644 --- a/packages/openapi-ts/src/openApi/common/interfaces/client.ts +++ b/packages/openapi-ts/src/openApi/common/interfaces/client.ts @@ -1,65 +1,65 @@ export interface ModelComposition extends Pick { - export: Extract + export: Extract; } export interface Enum { - customDescription?: string - customName?: string - description?: string - value: string | number + customDescription?: string; + customName?: string; + description?: string; + value: string | number; } export interface OperationError { - code: number - description: string + code: number; + description: string; } export interface OperationParameter extends Model { - in: 'path' | 'query' | 'header' | 'formData' | 'body' | 'cookie' - prop: string - mediaType: string | null + in: 'path' | 'query' | 'header' | 'formData' | 'body' | 'cookie'; + prop: string; + mediaType: string | null; } export interface OperationParameters extends Pick { - parameters: OperationParameter[] - parametersBody: OperationParameter | null - parametersCookie: OperationParameter[] - parametersForm: OperationParameter[] - parametersHeader: OperationParameter[] - parametersPath: OperationParameter[] - parametersQuery: OperationParameter[] + 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 + in: 'response' | 'header'; + code: number; } export interface Operation extends OperationParameters { - deprecated: boolean - description: string | null - errors: OperationError[] - method: 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' + deprecated: boolean; + description: string | null; + errors: OperationError[]; + method: 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT'; /** * Method name. Methods contain the request logic. */ - name: string - path: string - responseHeader: string | null - results: OperationResponse[] + 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 + service: string; + summary: string | null; } export interface Schema { - default?: unknown - exclusiveMaximum?: boolean - exclusiveMinimum?: boolean + default?: unknown; + exclusiveMaximum?: boolean; + exclusiveMinimum?: boolean; format?: | 'binary' | 'boolean' @@ -71,22 +71,22 @@ export interface Schema { | '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 + | '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 { @@ -95,12 +95,12 @@ export interface Model extends Schema { * 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[] + $refs: string[]; + base: string; + deprecated?: boolean; + description: string | null; + enum: Enum[]; + enums: Model[]; export: | 'all-of' | 'any-of' @@ -111,15 +111,15 @@ export interface Model extends Schema { | 'generic' | 'interface' | 'one-of' - | 'reference' - imports: string[] - link: Model | null - name: string - properties: Model[] - template: string | null - type: string + | 'reference'; + imports: string[]; + link: Model | null; + name: string; + properties: Model[]; + template: string | null; + type: string; } export interface Service extends Pick { - operations: Operation[] + operations: Operation[]; } diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/getPattern.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/getPattern.spec.ts index 5e09597c7..1fa398143 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/getPattern.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/getPattern.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { getPattern } from '../getPattern' +import { getPattern } from '../getPattern'; describe('getPattern', () => { it.each([ @@ -10,13 +10,13 @@ describe('getPattern', () => { { expected: '^\\\\w+$', pattern: '^\\w+$' }, { expected: '^\\\\d{3}-\\\\d{2}-\\\\d{4}$', - pattern: '^\\d{3}-\\d{2}-\\d{4}$' + pattern: '^\\d{3}-\\d{2}-\\d{4}$', }, { expected: '\\\\', pattern: '\\' }, { expected: '\\\\/', pattern: '\\/' }, { expected: '\\\\/\\\\/', pattern: '\\/\\/' }, - { expected: "\\'", pattern: "'" } + { expected: "\\'", pattern: "'" }, ])('getPattern($pattern) -> $expected', ({ pattern, expected }) => { - expect(getPattern(pattern)).toEqual(expected) - }) -}) + expect(getPattern(pattern)).toEqual(expected); + }); +}); diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/getRef.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/getRef.spec.ts index 198cc64ae..413d03f68 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/getRef.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/getRef.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { getRef } from '../getRef' +import { getRef } from '../getRef'; describe('getRef (v2)', () => { it('should produce correct result', () => { @@ -11,28 +11,28 @@ describe('getRef (v2)', () => { definitions: { Example: { description: 'This is an Example model ', - type: 'integer' - } + type: 'integer', + }, }, host: 'localhost:8080', info: { title: 'dummy', - version: '1.0' + version: '1.0', }, paths: {}, schemes: ['http', 'https'], - swagger: '2.0' + swagger: '2.0', }, { - $ref: '#/definitions/Example' - } - ) + $ref: '#/definitions/Example', + }, + ), ).toEqual({ description: 'This is an Example model ', - type: 'integer' - }) - }) -}) + type: 'integer', + }); + }); +}); describe('getRef (v3)', () => { it('should produce correct result', () => { @@ -43,31 +43,31 @@ describe('getRef (v3)', () => { schemas: { Example: { description: 'This is an Example model ', - type: 'integer' - } - } + type: 'integer', + }, + }, }, info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3.0', paths: {}, servers: [ { - url: 'https://localhost:8080/api' - } - ] + url: 'https://localhost:8080/api', + }, + ], }, { - $ref: '#/components/schemas/Example' - } - ) + $ref: '#/components/schemas/Example', + }, + ), ).toEqual({ description: 'This is an Example model ', - type: 'integer' - }) - }) + type: 'integer', + }); + }); it('should produce correct result for encoded ref path', () => { expect( @@ -75,21 +75,21 @@ describe('getRef (v3)', () => { { info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3.0', paths: { '/api/user/{id}': { - description: 'This is an Example path' - } - } + description: 'This is an Example path', + }, + }, }, { - $ref: '#/paths/~1api~1user~1%7Bid%7D' - } - ) + $ref: '#/paths/~1api~1user~1%7Bid%7D', + }, + ), ).toEqual({ - description: 'This is an Example path' - }) - }) -}) + description: 'This is an Example path', + }); + }); +}); diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/operation.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/operation.spec.ts index 2532ad2c2..a851b7261 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/operation.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/operation.spec.ts @@ -1,11 +1,11 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { setConfig } from '../../../../utils/config' +import { setConfig } from '../../../../utils/config'; import { getOperationName, getOperationParameterName, - getOperationResponseCode -} from '../operation' + getOperationResponseCode, +} from '../operation'; describe('getOperationName', () => { const options1: Parameters[0] = { @@ -24,11 +24,11 @@ describe('getOperationName', () => { schemas: false, serviceResponse: 'body', types: { - export: false + export: false, }, useDateType: false, - useOptions: false - } + useOptions: false, + }; const options2: Parameters[0] = { client: 'fetch', @@ -46,11 +46,11 @@ describe('getOperationName', () => { schemas: false, serviceResponse: 'body', types: { - export: false + export: false, }, useDateType: false, - useOptions: false - } + useOptions: false, + }; it.each([ { @@ -58,170 +58,170 @@ describe('getOperationName', () => { method: 'GET', operationId: 'GetAllUsers', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'getApiUsers', method: 'GET', operationId: undefined, options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'postApiUsers', method: 'POST', operationId: undefined, options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'getAllUsers', method: 'GET', operationId: 'GetAllUsers', options: options1, - url: '/api/v1/users' + url: '/api/v1/users', }, { expected: 'getApiV1Users', method: 'GET', operationId: undefined, options: options1, - url: '/api/v1/users' + url: '/api/v1/users', }, { expected: 'postApiV1Users', method: 'POST', operationId: undefined, options: options1, - url: '/api/v1/users' + url: '/api/v1/users', }, { expected: 'getApiV1UsersById', method: 'GET', operationId: undefined, options: options1, - url: '/api/v1/users/{id}' + url: '/api/v1/users/{id}', }, { expected: 'postApiV1UsersById', method: 'POST', operationId: undefined, options: options1, - url: '/api/v1/users/{id}' + url: '/api/v1/users/{id}', }, { expected: 'fooBar', method: 'GET', operationId: 'fooBar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: 'FooBar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: 'Foo Bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: 'foo bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: 'foo-bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: 'foo_bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: 'foo.bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: '@foo.bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: '$foo.bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: '_foo.bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: '-foo.bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'fooBar', method: 'GET', operationId: '123.foo.bar', options: options1, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'getApiV1Users', method: 'GET', operationId: 'GetAllUsers', options: options2, - url: '/api/v1/users' + url: '/api/v1/users', }, { expected: 'getApiUsers', method: 'GET', operationId: 'fooBar', options: options2, - url: '/api/v{api-version}/users' + url: '/api/v{api-version}/users', }, { expected: 'getApiUsersByUserIdLocationByLocationId', method: 'GET', operationId: 'fooBar', options: options2, - url: '/api/v{api-version}/users/{userId}/location/{locationId}' - } + 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) - } - ) -}) + setConfig(options); + expect(getOperationName(url, method, operationId)).toBe(expected); + }, + ); +}); describe('getOperationParameterName', () => { it.each([ @@ -237,14 +237,14 @@ describe('getOperationParameterName', () => { { expected: 'fooBar', input: 'Foo-Bar' }, { expected: 'fooBar', input: 'FOO-BAR' }, { expected: 'fooBar', input: 'foo[bar]' }, - { expected: 'fooBarArray', input: 'foo.bar[]' } + { expected: 'fooBarArray', input: 'foo.bar[]' }, ])( 'getOperationParameterName($input) -> $expected', ({ input, expected }) => { - expect(getOperationParameterName(input)).toBe(expected) - } - ) -}) + expect(getOperationParameterName(input)).toBe(expected); + }, + ); +}); describe('getOperationResponseCode', () => { it.each([ @@ -254,8 +254,8 @@ describe('getOperationResponseCode', () => { { expected: 300, input: '300' }, { expected: 400, input: '400' }, { expected: null, input: 'abc' }, - { expected: 100, input: '-100' } + { expected: 100, input: '-100' }, ])('getOperationResponseCode($input) -> $expected', ({ input, expected }) => { - expect(getOperationResponseCode(input)).toBe(expected) - }) -}) + expect(getOperationResponseCode(input)).toBe(expected); + }); +}); diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/sanitize.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/sanitize.spec.ts index adc218ca8..426982ca0 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/sanitize.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/sanitize.spec.ts @@ -1,10 +1,10 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; import { ensureValidTypeScriptJavaScriptIdentifier, sanitizeNamespaceIdentifier, - sanitizeOperationParameterName -} from '../sanitize' + sanitizeOperationParameterName, +} from '../sanitize'; describe('sanitizeOperationParameterName', () => { it.each([ @@ -12,14 +12,14 @@ describe('sanitizeOperationParameterName', () => { { expected: 'æbc', input: 'æbc' }, { expected: 'æb-c', input: 'æb.c' }, { expected: 'æb-c', input: '1æb.c' }, - { expected: 'unknownArray', input: 'unknown[]' } + { expected: 'unknownArray', input: 'unknown[]' }, ])( 'sanitizeOperationParameterName($input) -> $expected', ({ input, expected }) => { - expect(sanitizeOperationParameterName(input)).toEqual(expected) - } - ) -}) + expect(sanitizeOperationParameterName(input)).toEqual(expected); + }, + ); +}); describe('sanitizeNamespaceIdentifier', () => { it.each([ @@ -27,25 +27,27 @@ describe('sanitizeNamespaceIdentifier', () => { { 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' } + { expected: 'a-b-c--d--e', input: 'a/b{c}/d/$e' }, ])( 'sanitizeNamespaceIdentifier($input) -> $expected', ({ input, expected }) => { - expect(sanitizeNamespaceIdentifier(input)).toEqual(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' } + { expected: 'æb_c', input: '1æb.c' }, ])( 'ensureValidTypeScriptJavaScriptIdentifier($input) -> $expected', ({ input, expected }) => { - expect(ensureValidTypeScriptJavaScriptIdentifier(input)).toEqual(expected) - } - ) -}) + expect(ensureValidTypeScriptJavaScriptIdentifier(input)).toEqual( + expected, + ); + }, + ); +}); diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/service.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/service.spec.ts index 8cf9007a8..e553a2f25 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/service.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/service.spec.ts @@ -1,16 +1,16 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { getServiceName, getServiceVersion } from '../service' +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' } + { expected: '2.4', input: 'V2.4' }, ])('should get $expected when version is $input', ({ input, expected }) => { - expect(getServiceVersion(input)).toEqual(expected) - }) -}) + expect(getServiceVersion(input)).toEqual(expected); + }); +}); describe('getServiceName', () => { it.each([ @@ -23,9 +23,9 @@ describe('getServiceName', () => { { expected: 'FooBar', input: '123fooBar' }, { expected: 'NonAsciiÆøåÆøÅöôêÊ字符串', - input: 'non-ascii-æøåÆØÅöôêÊ字符串' - } + input: 'non-ascii-æøåÆØÅöôêÊ字符串', + }, ])('getServiceName($input) -> $expected', ({ input, expected }) => { - expect(getServiceName(input)).toEqual(expected) - }) -}) + expect(getServiceName(input)).toEqual(expected); + }); +}); diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/sort.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/sort.spec.ts index 1a1886597..7cdac069d 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/sort.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/sort.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { toSortedByRequired } from '../sort' +import { toSortedByRequired } from '../sort'; describe('sort', () => { it.each([ @@ -8,30 +8,30 @@ describe('sort', () => { expected: [ { id: 'test2', isRequired: true }, { id: 'test3', isRequired: true }, - { id: 'test', isRequired: false } + { id: 'test', isRequired: false }, ], input: [ { id: 'test', isRequired: false }, { id: 'test2', isRequired: true }, - { id: 'test3', isRequired: true } - ] + { id: 'test3', isRequired: true }, + ], }, { expected: [ { id: 'test', isRequired: false }, { id: 'test2', isRequired: false }, - { default: 'something', id: 'test3', isRequired: true } + { default: 'something', id: 'test3', isRequired: true }, ], input: [ { id: 'test', isRequired: false }, { id: 'test2', isRequired: false }, - { default: 'something', id: 'test3', isRequired: true } - ] - } + { default: 'something', id: 'test3', isRequired: true }, + ], + }, ])( 'should sort $input by required to produce $expected', ({ input, expected }) => { - expect(toSortedByRequired(input)).toEqual(expected) - } - ) -}) + expect(toSortedByRequired(input)).toEqual(expected); + }, + ); +}); diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/stripNamespace.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/stripNamespace.spec.ts index c21d8eef0..80dbc8dc7 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/stripNamespace.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/stripNamespace.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { stripNamespace } from '../stripNamespace' +import { stripNamespace } from '../stripNamespace'; describe('stripNamespace', () => { it.each([ @@ -16,8 +16,8 @@ describe('stripNamespace', () => { { expected: 'Item', input: '#/components/headers/Item' }, { expected: 'Item', input: '#/components/securitySchemes/Item' }, { expected: 'Item', input: '#/components/links/Item' }, - { expected: 'Item', input: '#/components/callbacks/Item' } + { expected: 'Item', input: '#/components/callbacks/Item' }, ])('stripNamespace($input) -> $expected', ({ input, expected }) => { - expect(stripNamespace(input)).toEqual(expected) - }) -}) + expect(stripNamespace(input)).toEqual(expected); + }); +}); diff --git a/packages/openapi-ts/src/openApi/common/parser/__tests__/type.spec.ts b/packages/openapi-ts/src/openApi/common/parser/__tests__/type.spec.ts index cced2bb05..e62077043 100644 --- a/packages/openapi-ts/src/openApi/common/parser/__tests__/type.spec.ts +++ b/packages/openapi-ts/src/openApi/common/parser/__tests__/type.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { getMappedType, getType } from '../type' +import { getMappedType, getType } from '../type'; describe('getMappedType', () => { it.each([ @@ -24,109 +24,109 @@ describe('getMappedType', () => { { expected: 'string', type: 'password' }, { expected: 'number', type: 'short' }, { expected: 'string', type: 'string' }, - { expected: 'void', type: 'void' } + { expected: 'void', type: 'void' }, ])('should map type $type to $expected', ({ type, expected }) => { - expect(getMappedType(type)).toEqual(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) - }) + 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) - }) + 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) - }) + 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') - expect(type.base).toEqual('Link') - expect(type.template).toEqual('string') - expect(type.imports).toEqual(['Link']) - expect(type.isNullable).toEqual(false) - }) + const type = getType('#/components/schemas/Link[string]'); + expect(type.type).toEqual('Link'); + 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') - expect(type.base).toEqual('Link') - expect(type.template).toEqual('Model') - expect(type.imports).toEqual(['Link', 'Model']) - expect(type.isNullable).toEqual(false) - }) + const type = getType('#/components/schemas/Link[Model]'); + expect(type.type).toEqual('Link'); + 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') - expect(type.base).toEqual('Link') - expect(type.template).toEqual('Link') - expect(type.imports).toEqual(['Link', 'Link']) - expect(type.isNullable).toEqual(false) - }) + const type = getType('#/components/schemas/Link[Link]'); + expect(type.type).toEqual('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) - }) + 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) - }) + 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) - }) + 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) - }) + 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) - }) -}) + 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/packages/openapi-ts/src/openApi/common/parser/getDefault.ts b/packages/openapi-ts/src/openApi/common/parser/getDefault.ts index b07c37e10..5eef923fd 100644 --- a/packages/openapi-ts/src/openApi/common/parser/getDefault.ts +++ b/packages/openapi-ts/src/openApi/common/parser/getDefault.ts @@ -1,17 +1,17 @@ -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' +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 + model?: Model | OperationParameter, ): unknown | undefined => { if (definition.default === undefined || definition.default === null) { - return definition.default + return definition.default; } - const type = definition.type || typeof definition.default + const type = definition.type || typeof definition.default; switch (type) { case 'int': @@ -21,16 +21,16 @@ export const getDefault = ( model?.export === 'enum' && model.enum?.[definition.default as number] ) { - const { value } = model.enum[definition.default as number] - return value + const { value } = model.enum[definition.default as number]; + return value; } - return definition.default + return definition.default; case 'string': - return definition.default + return definition.default; case 'array': case 'boolean': case 'object': - return definition.default + return definition.default; } - return undefined -} + return undefined; +}; diff --git a/packages/openapi-ts/src/openApi/common/parser/getEnums.ts b/packages/openapi-ts/src/openApi/common/parser/getEnums.ts index 69829dfbd..ac835a40d 100644 --- a/packages/openapi-ts/src/openApi/common/parser/getEnums.ts +++ b/packages/openapi-ts/src/openApi/common/parser/getEnums.ts @@ -1,31 +1,31 @@ -import { unique } from '../../../utils/unique' -import type { Enum } from '../interfaces/client' -import type { WithEnumExtension } from '../interfaces/WithEnumExtension' +import { unique } from '../../../utils/unique'; +import type { Enum } from '../interfaces/client'; +import type { WithEnumExtension } from '../interfaces/WithEnumExtension'; export const getEnums = ( definition: WithEnumExtension, - values?: ReadonlyArray + values?: ReadonlyArray, ): Enum[] => { if (!Array.isArray(values)) { - return [] + return []; } const descriptions = (definition['x-enum-descriptions'] ?? []).filter( - value => typeof value === 'string' - ) + (value) => typeof value === 'string', + ); const names = ( definition['x-enum-varnames'] ?? definition['x-enumNames'] ?? [] - ).filter(value => typeof value === 'string') + ).filter((value) => typeof value === 'string'); return values .filter(unique) - .filter(value => typeof value === 'number' || typeof value === 'string') + .filter((value) => typeof value === 'number' || typeof value === 'string') .map((value, index) => ({ customDescription: descriptions[index], customName: names[index], description: undefined, - value - })) -} + value, + })); +}; diff --git a/packages/openapi-ts/src/openApi/common/parser/getPattern.ts b/packages/openapi-ts/src/openApi/common/parser/getPattern.ts index 0234efb73..3cdc85320 100644 --- a/packages/openapi-ts/src/openApi/common/parser/getPattern.ts +++ b/packages/openapi-ts/src/openApi/common/parser/getPattern.ts @@ -9,4 +9,4 @@ * @param pattern */ export const getPattern = (pattern?: string): string | undefined => - pattern?.replace(/\\/g, '\\\\').replace(/'/g, "\\'") + pattern?.replace(/\\/g, '\\\\').replace(/'/g, "\\'"); diff --git a/packages/openapi-ts/src/openApi/common/parser/getRef.ts b/packages/openapi-ts/src/openApi/common/parser/getRef.ts index df6ad5f2d..835f9532c 100644 --- a/packages/openapi-ts/src/openApi/common/parser/getRef.ts +++ b/packages/openapi-ts/src/openApi/common/parser/getRef.ts @@ -1,13 +1,13 @@ -import type { OpenApiReference as OpenApiReferenceV2 } from '../../v2/interfaces/OpenApiReference' -import type { OpenApiReference as OpenApiReferenceV3 } from '../../v3/interfaces/OpenApiReference' -import { OpenApi } from '../interfaces/OpenApi' +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 +const ESCAPED_REF_SLASH = /~1/g; +const ESCAPED_REF_TILDE = /~0/g; export function getRef( openApi: OpenApi, - item: T & (OpenApiReferenceV2 | OpenApiReferenceV3) + item: T & (OpenApiReferenceV2 | OpenApiReferenceV3), ): T { if (item.$ref) { // Fetch the paths to the definitions, this converts: @@ -15,23 +15,23 @@ export function getRef( const paths = item.$ref .replace(/^#/g, '') .split('/') - .filter(item => item) + .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 => { + let result = openApi; + paths.forEach((path) => { const decodedPath = decodeURIComponent( - path.replace(ESCAPED_REF_SLASH, '/').replace(ESCAPED_REF_TILDE, '~') - ) + path.replace(ESCAPED_REF_SLASH, '/').replace(ESCAPED_REF_TILDE, '~'), + ); if (result.hasOwnProperty(decodedPath)) { // @ts-ignore - result = result[decodedPath] + result = result[decodedPath]; } else { - throw new Error(`Could not find reference: "${item.$ref}"`) + throw new Error(`Could not find reference: "${item.$ref}"`); } - }) - return result as T + }); + return result as T; } - return item as T + return item as T; } diff --git a/packages/openapi-ts/src/openApi/common/parser/operation.ts b/packages/openapi-ts/src/openApi/common/parser/operation.ts index 7fc40e8c2..df84e8363 100644 --- a/packages/openapi-ts/src/openApi/common/parser/operation.ts +++ b/packages/openapi-ts/src/openApi/common/parser/operation.ts @@ -1,12 +1,12 @@ -import camelCase from 'camelcase' +import camelCase from 'camelcase'; -import { getConfig } from '../../../utils/config' -import type { OperationError, OperationResponse } from '../interfaces/client' -import { reservedWords } from './reservedWords' +import { getConfig } from '../../../utils/config'; +import type { OperationError, OperationResponse } from '../interfaces/client'; +import { reservedWords } from './reservedWords'; import { sanitizeNamespaceIdentifier, - sanitizeOperationParameterName -} from './sanitize' + sanitizeOperationParameterName, +} from './sanitize'; /** * Convert the input value to a correct operation (method) class name. @@ -16,71 +16,71 @@ import { export const getOperationName = ( url: string, method: string, - operationId?: string + operationId?: string, ): string => { - const config = getConfig() + const config = getConfig(); if (config.operationId && operationId) { - return camelCase(sanitizeNamespaceIdentifier(operationId).trim()) + return camelCase(sanitizeNamespaceIdentifier(operationId).trim()); } const urlWithoutPlaceholders = url .replace(/[^/]*?{api-version}.*?\//g, '') .replace(/{(.*?)}/g, 'by-$1') - .replace(/\//g, '-') + .replace(/\//g, '-'); - return camelCase(`${method}-${urlWithoutPlaceholders}`) -} + 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') -} + const clean = sanitizeOperationParameterName(value).trim(); + return camelCase(clean).replace(reservedWords, '_$1'); +}; export const getOperationResponseHeader = ( - operationResponses: OperationResponse[] + operationResponses: OperationResponse[], ): string | null => { const header = operationResponses.find( - operationResponses => operationResponses.in === 'header' - ) + (operationResponses) => operationResponses.in === 'header', + ); if (header) { - return header.name + return header.name; } - return null -} + return null; +}; export const getOperationResponseCode = ( - value: string | 'default' + value: string | 'default', ): number | null => { // You can specify a "default" response, this is treated as HTTP code 200 if (value === 'default') { - return 200 + return 200; } // Check if we can parse the code and return of successful. if (/[0-9]+/g.test(value)) { - const code = parseInt(value) + const code = parseInt(value); if (Number.isInteger(code)) { - return Math.abs(code) + return Math.abs(code); } } - return null -} + return null; +}; export const getOperationErrors = ( - operationResponses: OperationResponse[] + operationResponses: OperationResponse[], ): OperationError[] => operationResponses .filter( - operationResponse => - operationResponse.code >= 300 && operationResponse.description + (operationResponse) => + operationResponse.code >= 300 && operationResponse.description, ) - .map(response => ({ + .map((response) => ({ code: response.code, - description: response.description! - })) + description: response.description!, + })); diff --git a/packages/openapi-ts/src/openApi/common/parser/reservedWords.ts b/packages/openapi-ts/src/openApi/common/parser/reservedWords.ts index 789a3b449..d94f14cb2 100644 --- a/packages/openapi-ts/src/openApi/common/parser/reservedWords.ts +++ b/packages/openapi-ts/src/openApi/common/parser/reservedWords.ts @@ -1,2 +1,2 @@ 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 + /^(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/packages/openapi-ts/src/openApi/common/parser/sanitize.ts b/packages/openapi-ts/src/openApi/common/parser/sanitize.ts index 9f2d8896f..b627d0e8b 100644 --- a/packages/openapi-ts/src/openApi/common/parser/sanitize.ts +++ b/packages/openapi-ts/src/openApi/common/parser/sanitize.ts @@ -13,7 +13,7 @@ export const ensureValidTypeScriptJavaScriptIdentifier = (name: string) => name .replace(/^[^$_\p{ID_Start}]+/u, '') - .replace(/[^$\u200c\u200d\p{ID_Continue}]/gu, '_') + .replace(/[^$\u200c\u200d\p{ID_Continue}]/gu, '_'); /** * Sanitizes namespace identifiers so they are valid TypeScript identifiers of a certain form. @@ -33,9 +33,9 @@ export const sanitizeNamespaceIdentifier = (name: string) => name .replace(/^[^\p{ID_Start}]+/u, '') .replace(/[^$\u200c\u200d\p{ID_Continue}]/gu, '-') - .replace(/\$/g, '-') + .replace(/\$/g, '-'); export const sanitizeOperationParameterName = (name: string) => { - const withoutBrackets = name.replace('[]', 'Array') - return sanitizeNamespaceIdentifier(withoutBrackets) -} + const withoutBrackets = name.replace('[]', 'Array'); + return sanitizeNamespaceIdentifier(withoutBrackets); +}; diff --git a/packages/openapi-ts/src/openApi/common/parser/service.ts b/packages/openapi-ts/src/openApi/common/parser/service.ts index d5f509fd5..6209ffa7b 100644 --- a/packages/openapi-ts/src/openApi/common/parser/service.ts +++ b/packages/openapi-ts/src/openApi/common/parser/service.ts @@ -1,6 +1,6 @@ -import camelCase from 'camelcase' +import camelCase from 'camelcase'; -import { sanitizeNamespaceIdentifier } from './sanitize' +import { sanitizeNamespaceIdentifier } from './sanitize'; /** * Convert the service version to 'normal' version. @@ -8,7 +8,7 @@ import { sanitizeNamespaceIdentifier } from './sanitize' * @param version */ export function getServiceVersion(version = '1.0'): string { - return String(version).replace(/^v/gi, '') + return String(version).replace(/^v/gi, ''); } /** @@ -16,6 +16,6 @@ export function getServiceVersion(version = '1.0'): string { * the input string to PascalCase. */ export const getServiceName = (value: string): string => { - const clean = sanitizeNamespaceIdentifier(value).trim() - return camelCase(clean, { pascalCase: true }) -} + const clean = sanitizeNamespaceIdentifier(value).trim(); + return camelCase(clean, { pascalCase: true }); +}; diff --git a/packages/openapi-ts/src/openApi/common/parser/sort.ts b/packages/openapi-ts/src/openApi/common/parser/sort.ts index cd1109c1a..f4eb89681 100644 --- a/packages/openapi-ts/src/openApi/common/parser/sort.ts +++ b/packages/openapi-ts/src/openApi/common/parser/sort.ts @@ -3,13 +3,13 @@ * invalid types. Optional parameters cannot be positioned after required ones. */ export function toSortedByRequired< - T extends { isRequired: boolean; default?: unknown } + 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 - }) + 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/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts b/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts index 73e85fc0b..07ac78cb9 100644 --- a/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts +++ b/packages/openapi-ts/src/openApi/common/parser/stripNamespace.ts @@ -17,4 +17,4 @@ export const stripNamespace = (value: string): string => .replace(/^#\/components\/headers\//, '') .replace(/^#\/components\/securitySchemes\//, '') .replace(/^#\/components\/links\//, '') - .replace(/^#\/components\/callbacks\//, '') + .replace(/^#\/components\/callbacks\//, ''); diff --git a/packages/openapi-ts/src/openApi/common/parser/type.ts b/packages/openapi-ts/src/openApi/common/parser/type.ts index 4e2314487..5681bf079 100644 --- a/packages/openapi-ts/src/openApi/common/parser/type.ts +++ b/packages/openapi-ts/src/openApi/common/parser/type.ts @@ -1,25 +1,25 @@ -import type { Type } from '../interfaces/Type' -import { ensureValidTypeScriptJavaScriptIdentifier } from './sanitize' -import { stripNamespace } from './stripNamespace' +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 + format?: string, ): string | undefined => { if (format === 'binary') { - return 'binary' + return 'binary'; } switch (type) { case 'any': case 'object': - return 'unknown' + return 'unknown'; case 'array': - return 'unknown[]' + return 'unknown[]'; case 'boolean': - return 'boolean' + return 'boolean'; case 'byte': case 'double': case 'float': @@ -28,21 +28,21 @@ export const getMappedType = ( case 'long': case 'number': case 'short': - return 'number' + return 'number'; case 'char': case 'date': case 'date-time': case 'password': case 'string': - return 'string' + return 'string'; case 'file': - return 'binary' + return 'binary'; case 'null': - return 'null' + return 'null'; case 'void': - return 'void' + return 'void'; } -} +}; /** * Parse any string value into a type object. @@ -51,7 +51,7 @@ export const getMappedType = ( */ export const getType = ( type: string | string[] = 'unknown', - format?: string + format?: string, ): Type => { const result: Type = { $refs: [], @@ -59,74 +59,78 @@ export const getType = ( imports: [], isNullable: false, template: null, - type: 'unknown' - } + 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((value) => value !== 'null') + .map((value) => getMappedType(value, format)) .filter(Boolean) - .join(' | ') - result.type = joinedType - result.base = joinedType - result.isNullable = type.includes('null') - return result + .join(' | '); + result.type = joinedType; + result.base = joinedType; + result.isNullable = type.includes('null'); + return result; } - const mapped = getMappedType(type, format) + const mapped = getMappedType(type, format); if (mapped) { - result.type = mapped - result.base = mapped - return result + result.type = mapped; + result.base = mapped; + return result; } - const typeWithoutNamespace = decodeURIComponent(stripNamespace(type)) + const typeWithoutNamespace = decodeURIComponent(stripNamespace(type)); if (/\[.*\]$/g.test(typeWithoutNamespace)) { - const matches = typeWithoutNamespace.match(/(.*?)\[(.*)\]$/) + const matches = typeWithoutNamespace.match(/(.*?)\[(.*)\]$/); if (matches?.length) { const match1 = getType( - ensureValidTypeScriptJavaScriptIdentifier(matches[1]) - ) + ensureValidTypeScriptJavaScriptIdentifier(matches[1]), + ); const match2 = getType( - ensureValidTypeScriptJavaScriptIdentifier(matches[2]) - ) + ensureValidTypeScriptJavaScriptIdentifier(matches[2]), + ); if (match1.type === 'unknown[]') { - result.type = `${match2.type}[]` - result.base = `${match2.type}` - match1.$refs = [] - match1.imports = [] + 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 + 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.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 + 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 + ensureValidTypeScriptJavaScriptIdentifier(typeWithoutNamespace); + result.type = encodedType; + result.base = encodedType; if (type.startsWith('#')) { - result.$refs = [...result.$refs, type] + result.$refs = [...result.$refs, type]; } - result.imports = [...result.imports, encodedType] - return result + result.imports = [...result.imports, encodedType]; + return result; } - return result -} + return result; +}; diff --git a/packages/openapi-ts/src/openApi/index.ts b/packages/openapi-ts/src/openApi/index.ts index 5dd24a6ee..15b3a78ef 100644 --- a/packages/openapi-ts/src/openApi/index.ts +++ b/packages/openapi-ts/src/openApi/index.ts @@ -1,16 +1,16 @@ -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' +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 { Enum, Model, Operation, OperationParameter, - Service -} from './common/interfaces/client' -export { OpenApi } from './common/interfaces/OpenApi' + Service, +} from './common/interfaces/client'; +export { OpenApi } from './common/interfaces/OpenApi'; /** * Parse the OpenAPI specification to a Client model that contains @@ -19,14 +19,14 @@ export { OpenApi } from './common/interfaces/OpenApi' */ export function parse(openApi: OpenApi): Client { if ('openapi' in openApi) { - return parseV3(openApi) + return parseV3(openApi); } if ('swagger' in openApi) { - return parseV2(openApi) + return parseV2(openApi); } throw new Error( - `Unsupported Open API specification: ${JSON.stringify(openApi, null, 2)}` - ) + `Unsupported Open API specification: ${JSON.stringify(openApi, null, 2)}`, + ); } diff --git a/packages/openapi-ts/src/openApi/v2/index.ts b/packages/openapi-ts/src/openApi/v2/index.ts index b42b956a1..464fa989e 100644 --- a/packages/openapi-ts/src/openApi/v2/index.ts +++ b/packages/openapi-ts/src/openApi/v2/index.ts @@ -1,9 +1,9 @@ -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' +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 @@ -11,16 +11,16 @@ import { getServices } from './parser/getServices' * @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) + const version = getServiceVersion(openApi.info.version); + const server = getServer(openApi); + const models = getModels(openApi); + const services = getServices(openApi); return { enumNames: [], models, server, services, - version - } -} + version, + }; +}; diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/Extensions/WithNullableExtension.ts b/packages/openapi-ts/src/openApi/v2/interfaces/Extensions/WithNullableExtension.ts index 8b153faa9..4912b2c21 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/Extensions/WithNullableExtension.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/Extensions/WithNullableExtension.ts @@ -1,3 +1,3 @@ export interface WithNullableExtension { - 'x-nullable'?: boolean + 'x-nullable'?: boolean; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApi.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApi.ts index ee40c915e..f9f1b1b24 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApi.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApi.ts @@ -1,31 +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' +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 - externalDocs?: OpenApiExternalDocs - host?: string - info: OpenApiInfo - parameters?: Dictionary - paths: Dictionary - produces?: string[] - responses?: Dictionary - schemes?: string[] - security?: OpenApiSecurityRequirement[] - securityDefinitions?: Dictionary - swagger: string - tags?: OpenApiTag[] + basePath?: string; + consumes?: string[]; + definitions?: Dictionary; + externalDocs?: OpenApiExternalDocs; + host?: string; + info: OpenApiInfo; + parameters?: Dictionary; + paths: Dictionary; + produces?: string[]; + responses?: Dictionary; + schemes?: string[]; + security?: OpenApiSecurityRequirement[]; + securityDefinitions?: Dictionary; + swagger: string; + tags?: OpenApiTag[]; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiContact.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiContact.ts index cbfc98993..6f4e9ea08 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiContact.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiContact.ts @@ -2,7 +2,7 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#contact-object */ export interface OpenApiContact { - name?: string - url?: string - email?: string + name?: string; + url?: string; + email?: string; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExample.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExample.ts index 6cee13dfa..992d12a60 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExample.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExample.ts @@ -2,5 +2,5 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#example-object */ export interface OpenApiExample { - [mimetype: string]: unknown + [mimetype: string]: unknown; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExternalDocs.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExternalDocs.ts index df169f656..d43c532b5 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExternalDocs.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiExternalDocs.ts @@ -2,6 +2,6 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#external-documentation-object */ export interface OpenApiExternalDocs { - description?: string - url: string + description?: string; + url: string; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiHeader.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiHeader.ts index 3a8182064..9a94824b5 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiHeader.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiHeader.ts @@ -1,12 +1,12 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' -import type { OpenApiItems } from './OpenApiItems' +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' + description?: string; + type: 'string' | 'number' | 'integer' | 'boolean' | 'array'; format?: | 'int32' | 'int64' @@ -18,20 +18,20 @@ export interface OpenApiHeader { | 'binary' | 'date' | 'date-time' - | 'password' - items?: Dictionary - 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 + | 'password'; + items?: Dictionary; + 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/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiInfo.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiInfo.ts index ff3e857a1..df5eadec9 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiInfo.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiInfo.ts @@ -1,14 +1,14 @@ -import type { OpenApiContact } from './OpenApiContact' -import type { OpenApiLicense } from './OpenApiLicense' +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 + title: string; + description?: string; + termsOfService?: string; + contact?: OpenApiContact; + license?: OpenApiLicense; + version: string; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiItems.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiItems.ts index 23b2df716..6dab19304 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiItems.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiItems.ts @@ -1,10 +1,10 @@ -import type { WithEnumExtension } from '../../common/interfaces/WithEnumExtension' +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 + type?: string; format?: | 'int32' | 'int64' @@ -16,20 +16,20 @@ export interface OpenApiItems extends WithEnumExtension { | '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 + | '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/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiLicense.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiLicense.ts index 512c6de21..71cc714fb 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiLicense.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiLicense.ts @@ -2,6 +2,6 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#license-object */ export interface OpenApiLicense { - name: string - url?: string + name: string; + url?: string; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiOperation.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiOperation.ts index 8aaada331..73bdf8404 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiOperation.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiOperation.ts @@ -1,22 +1,22 @@ -import type { OpenApiExternalDocs } from './OpenApiExternalDocs' -import type { OpenApiParameter } from './OpenApiParameter' -import type { OpenApiResponses } from './OpenApiResponses' -import type { OpenApiSecurityRequirement } from './OpenApiSecurityRequirement' +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[] + 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/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiParameter.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiParameter.ts index 40aa3c611..d47127521 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiParameter.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiParameter.ts @@ -1,8 +1,8 @@ -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' +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 @@ -11,12 +11,12 @@ export interface OpenApiParameter extends OpenApiReference, WithEnumExtension, WithNullableExtension { - name: string - in: 'path' | 'query' | 'header' | 'formData' | 'body' - description?: string - required?: boolean - schema?: OpenApiSchema - type?: string + name: string; + in: 'path' | 'query' | 'header' | 'formData' | 'body'; + description?: string; + required?: boolean; + schema?: OpenApiSchema; + type?: string; format?: | 'int32' | 'int64' @@ -28,21 +28,21 @@ export interface OpenApiParameter | '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 + | '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/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiPath.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiPath.ts index 69ca959be..fe1365964 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiPath.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiPath.ts @@ -1,17 +1,17 @@ -import type { OpenApiOperation } from './OpenApiOperation' -import type { OpenApiParameter } from './OpenApiParameter' -import type { OpenApiReference } from './OpenApiReference' +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[] + get?: OpenApiOperation; + put?: OpenApiOperation; + post?: OpenApiOperation; + delete?: OpenApiOperation; + options?: OpenApiOperation; + head?: OpenApiOperation; + patch?: OpenApiOperation; + parameters?: OpenApiParameter[]; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiReference.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiReference.ts index 308b856c6..8d2ffb9e3 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiReference.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiReference.ts @@ -2,5 +2,5 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#reference-object */ export interface OpenApiReference { - $ref?: string + $ref?: string; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponse.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponse.ts index fa5829e88..413cd4cf0 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponse.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponse.ts @@ -1,15 +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' +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 - examples?: OpenApiExample + description: string; + schema?: OpenApiSchema & OpenApiReference; + headers?: Dictionary; + examples?: OpenApiExample; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponses.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponses.ts index a265effac..0d494856a 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponses.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiResponses.ts @@ -1,12 +1,12 @@ -import type { OpenApiResponse } from './OpenApiResponse' +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 + [httpcode: string]: OpenApiResponse; } export type OpenApiResponses = Response & { - default?: OpenApiResponse -} + default?: OpenApiResponse; +}; diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSchema.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSchema.ts index 09cec4ae7..94c1bb6de 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSchema.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSchema.ts @@ -1,9 +1,9 @@ -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' +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 @@ -12,25 +12,25 @@ 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 + 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' @@ -42,14 +42,14 @@ export interface OpenApiSchema | 'binary' | 'date' | 'date-time' - | 'password' - items?: OpenApiSchema - allOf?: OpenApiSchema[] - properties?: Dictionary - additionalProperties?: boolean | OpenApiSchema - discriminator?: string - readOnly?: boolean - xml?: OpenApiXml - externalDocs?: OpenApiExternalDocs - example?: unknown + | 'password'; + items?: OpenApiSchema; + allOf?: OpenApiSchema[]; + properties?: Dictionary; + additionalProperties?: boolean | OpenApiSchema; + discriminator?: string; + readOnly?: boolean; + xml?: OpenApiXml; + externalDocs?: OpenApiExternalDocs; + example?: unknown; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityRequirement.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityRequirement.ts index efb51b429..f1719be67 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityRequirement.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityRequirement.ts @@ -2,5 +2,5 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-requirement-object */ export interface OpenApiSecurityRequirement { - [key: string]: string + [key: string]: string; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityScheme.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityScheme.ts index c931d9555..fddfdd967 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityScheme.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiSecurityScheme.ts @@ -1,15 +1,15 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' +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 + type: 'basic' | 'apiKey' | 'oauth2'; + description?: string; + name?: string; + in?: 'query' | 'header'; + flow?: 'implicit' | 'password' | 'application' | 'accessCode'; + authorizationUrl?: string; + tokenUrl?: string; + scopes: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiTag.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiTag.ts index 7f9a32926..5996f25a9 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiTag.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiTag.ts @@ -1,10 +1,10 @@ -import type { OpenApiExternalDocs } from './OpenApiExternalDocs' +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 + name: string; + description?: string; + externalDocs?: OpenApiExternalDocs; } diff --git a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiXml.ts b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiXml.ts index b31a399b3..521b337a4 100644 --- a/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiXml.ts +++ b/packages/openapi-ts/src/openApi/v2/interfaces/OpenApiXml.ts @@ -2,9 +2,9 @@ * {@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 + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; } diff --git a/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServer.spec.ts b/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServer.spec.ts index 01a4f2887..926f51ccd 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServer.spec.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServer.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { getServer } from '../getServer' +import { getServer } from '../getServer'; describe('getServer', () => { it('should produce correct result', () => { @@ -10,12 +10,12 @@ describe('getServer', () => { host: 'localhost:8080', info: { title: 'dummy', - version: '1.0' + version: '1.0', }, paths: {}, schemes: ['http', 'https'], - swagger: '2.0' - }) - ).toEqual('http://localhost:8080/api') - }) -}) + swagger: '2.0', + }), + ).toEqual('http://localhost:8080/api'); + }); +}); diff --git a/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServices.spec.ts b/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServices.spec.ts index 53594ace4..165572806 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServices.spec.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/__tests__/getServices.spec.ts @@ -1,7 +1,7 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { setConfig } from '../../../../utils/config' -import { getServices } from '../getServices' +import { setConfig } from '../../../../utils/config'; +import { getServices } from '../getServices'; describe('getServices', () => { it('should create a unnamed service if tags are empty', () => { @@ -22,33 +22,33 @@ describe('getServices', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); const services = getServices({ info: { title: 'x', - version: '1' + version: '1', }, paths: { '/api/trips': { get: { responses: { 200: { - description: 'x' + description: 'x', }, default: { - description: 'default' - } + description: 'default', + }, }, - tags: [] - } - } + tags: [], + }, + }, }, - swagger: '2.0' - }) + swagger: '2.0', + }); - expect(services).toHaveLength(1) - expect(services[0].name).toEqual('Default') - }) -}) + expect(services).toHaveLength(1); + expect(services[0].name).toEqual('Default'); + }); +}); diff --git a/packages/openapi-ts/src/openApi/v2/parser/getModel.ts b/packages/openapi-ts/src/openApi/v2/parser/getModel.ts index 39c5ae418..8e645c98b 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getModel.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getModel.ts @@ -1,17 +1,17 @@ -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' +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 = '' + name: string = '', ): Model => { const model: Model = { $refs: [], @@ -43,48 +43,48 @@ export const getModel = ( properties: [], template: null, type: 'unknown', - uniqueItems: definition.uniqueItems - } + 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 + 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) + 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 + 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 + 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 + 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; } } @@ -93,25 +93,27 @@ export const getModel = ( 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 + 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 + 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; } } @@ -121,44 +123,44 @@ export const getModel = ( 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 + 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' + 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) + 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] + model.enums = [...model.enums, modelProperty]; } - }) + }); } - return model + 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 + 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 -} + return model; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getModelComposition.ts b/packages/openapi-ts/src/openApi/v2/parser/getModelComposition.ts index 79d2fbfe5..25e971a26 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getModelComposition.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getModelComposition.ts @@ -1,69 +1,69 @@ -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' +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 type GetModelFn = typeof getModel; export const getModelComposition = ( openApi: OpenApi, definition: OpenApiSchema, definitions: OpenApiSchema[], type: 'one-of' | 'any-of' | 'all-of', - getModel: GetModelFn + getModel: GetModelFn, ): ModelComposition => { const composition: ModelComposition = { $refs: [], enums: [], export: type, imports: [], - properties: [] - } + properties: [], + }; - const properties: Model[] = [] + 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) + .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) + 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) + 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) + composition.enums.push(modelProperty); } - }) - properties.push(...modelProperties) + }); + properties.push(...modelProperties); } if (properties.length) { @@ -83,9 +83,9 @@ export const getModelComposition = ( name: 'properties', properties, template: null, - type: 'unknown' - }) + type: 'unknown', + }); } - return composition -} + return composition; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getModelProperties.ts b/packages/openapi-ts/src/openApi/v2/parser/getModelProperties.ts index 3123fabe3..14b63e8fd 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getModelProperties.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getModelProperties.ts @@ -1,26 +1,26 @@ -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' +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 type GetModelFn = typeof getModel; export const getModelProperties = ( openApi: OpenApi, definition: OpenApiSchema, - getModel: GetModelFn + getModel: GetModelFn, ): Model[] => { - const models: 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) + const property = definition.properties[propertyName]; + const propertyRequired = !!definition.required?.includes(propertyName); if (property.$ref) { - const model = getType(property.$ref) + const model = getType(property.$ref); models.push({ $refs: [], base: model.base, @@ -51,10 +51,10 @@ export const getModelProperties = ( properties: [], template: model.template, type: model.type, - uniqueItems: property.uniqueItems - }) + uniqueItems: property.uniqueItems, + }); } else { - const model = getModel(openApi, property) + const model = getModel(openApi, property); models.push({ $refs: [], base: model.base, @@ -85,10 +85,10 @@ export const getModelProperties = ( properties: model.properties, template: model.template, type: model.type, - uniqueItems: property.uniqueItems - }) + uniqueItems: property.uniqueItems, + }); } } } - return models -} + return models; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getModels.ts b/packages/openapi-ts/src/openApi/v2/parser/getModels.ts index c15b575c8..d9462adca 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getModels.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getModels.ts @@ -1,23 +1,23 @@ -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' +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[] = [] + const models: Model[] = []; for (const definitionName in openApi.definitions) { if (openApi.definitions.hasOwnProperty(definitionName)) { - const definition = openApi.definitions[definitionName] - const definitionType = getType(definitionName) + const definition = openApi.definitions[definitionName]; + const definitionType = getType(definitionName); const model = getModel( openApi, definition, true, - definitionType.base.replace(reservedWords, '_$1') - ) - models.push(model) + definitionType.base.replace(reservedWords, '_$1'), + ); + models.push(model); } } - return models -} + return models; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getOperation.ts b/packages/openapi-ts/src/openApi/v2/parser/getOperation.ts index 080c3b4b8..ee5c7fa0f 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getOperation.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getOperation.ts @@ -1,19 +1,19 @@ import type { Operation, - OperationParameters -} from '../../common/interfaces/client' + 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' + 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, @@ -21,10 +21,10 @@ export const getOperation = ( method: Lowercase, tag: string, op: OpenApiOperation, - pathParams: OperationParameters + pathParams: OperationParameters, ): Operation => { - const serviceName = getServiceName(tag) - const name = getOperationName(url, method, op.operationId) + const serviceName = getServiceName(tag); + const name = getOperationName(url, method, op.operationId); // Create a new operation object for this method. const operation: Operation = { @@ -46,36 +46,36 @@ export const getOperation = ( responseHeader: null, results: [], service: serviceName, - summary: op.summary || null - } + 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 + 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) + 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) - }) + operationResults.forEach((operationResult) => { + operation.results.push(operationResult); + operation.imports.push(...operationResult.imports); + }); } - operation.parameters = toSortedByRequired(operation.parameters) + operation.parameters = toSortedByRequired(operation.parameters); - return operation -} + return operation; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getOperationParameter.ts b/packages/openapi-ts/src/openApi/v2/parser/getOperationParameter.ts index fb1607c1b..5671d1b4d 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getOperationParameter.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getOperationParameter.ts @@ -1,18 +1,18 @@ -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' +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 + parameter: OpenApiParameter, ): OperationParameter => { const operationParameter: OperationParameter = { $refs: [], @@ -45,95 +45,95 @@ export const getOperationParameter = ( properties: [], template: null, type: 'unknown', - uniqueItems: parameter.uniqueItems - } + 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 + 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) + 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 + 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 + 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 + 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 + let schema = parameter.schema; if (schema) { if (schema.$ref?.startsWith('#/parameters/')) { - schema = getRef(openApi, schema) + schema = getRef(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 + 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 + 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 + 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 -} + return operationParameter; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getOperationParameters.ts b/packages/openapi-ts/src/openApi/v2/parser/getOperationParameters.ts index 3b77b4500..79a2e981e 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getOperationParameters.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getOperationParameters.ts @@ -1,12 +1,12 @@ -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' +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[] + parameters: OpenApiParameter[], ): OperationParameters => { const operationParameters: OperationParameters = { $refs: [], @@ -17,49 +17,52 @@ export const getOperationParameters = ( parametersForm: [], parametersHeader: [], parametersPath: [], - parametersQuery: [] - } + parametersQuery: [], + }; // Iterate over the parameters - parameters.forEach(parameterOrReference => { - const parameterDef = getRef(openApi, parameterOrReference) - const parameter = getOperationParameter(openApi, parameterDef) + parameters.forEach((parameterOrReference) => { + const parameterDef = getRef( + 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 + 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 + 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 + 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 + 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 + operationParameters.parametersBody = parameter; + operationParameters.parameters.push(parameter); + operationParameters.imports.push(...parameter.imports); + break; } } - }) - return operationParameters -} + }); + return operationParameters; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getOperationResponse.ts b/packages/openapi-ts/src/openApi/v2/parser/getOperationResponse.ts index b0357ade3..48eca8636 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getOperationResponse.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getOperationResponse.ts @@ -1,16 +1,16 @@ -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' +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 + responseCode: number, ): OperationResponse => { const operationResponse: OperationResponse = { $refs: [], @@ -30,55 +30,55 @@ export const getOperationResponse = ( name: '', properties: [], template: null, - type: responseCode !== 204 ? 'unknown' : 'void' - } + 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 + let schema = response.schema; if (schema) { if (schema.$ref?.startsWith('#/responses/')) { - schema = getRef(openApi, schema) + schema = getRef(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 + 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 + 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; } } @@ -87,14 +87,14 @@ export const getOperationResponse = ( 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 + operationResponse.in = 'header'; + operationResponse.name = name; + operationResponse.type = 'string'; + operationResponse.base = 'string'; + return operationResponse; } } } - return operationResponse -} + return operationResponse; +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getOperationResponses.ts b/packages/openapi-ts/src/openApi/v2/parser/getOperationResponses.ts index c498b35eb..d55f8ef3e 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getOperationResponses.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getOperationResponses.ts @@ -1,38 +1,38 @@ -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' +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 + responses: OpenApiResponses, ): OperationResponse[] => { - const operationResponses: 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(openApi, responseOrReference) - const responseCode = getOperationResponseCode(code) + const responseOrReference = responses[code]; + const response = getRef(openApi, responseOrReference); + const responseCode = getOperationResponseCode(code); if (responseCode) { const operationResponse = getOperationResponse( openApi, response, - responseCode - ) - operationResponses.push(operationResponse) + 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 - ) -} + a.code < b.code ? -1 : a.code > b.code ? 1 : 0, + ); +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getOperationResults.ts b/packages/openapi-ts/src/openApi/v2/parser/getOperationResults.ts index b09f1288a..f48c83e29 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getOperationResults.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getOperationResults.ts @@ -1,29 +1,29 @@ -import type { Model, OperationResponse } from '../../common/interfaces/client' +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 + 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 areEqual(a.link, b.link); } - return equal -} + return equal; +}; export const getOperationResults = ( - operationResponses: OperationResponse[] + operationResponses: OperationResponse[], ): OperationResponse[] => { - const operationResults: OperationResponse[] = [] + const operationResults: OperationResponse[] = []; // Filter out success response codes - operationResponses.forEach(operationResponse => { - const { code } = operationResponse + operationResponses.forEach((operationResponse) => { + const { code } = operationResponse; if (code && code >= 200 && code < 300) { - operationResults.push(operationResponse) + operationResults.push(operationResponse); } - }) + }); return operationResults.filter( (operationResult, index, arr) => - arr.findIndex(item => areEqual(item, operationResult)) === index - ) -} + arr.findIndex((item) => areEqual(item, operationResult)) === index, + ); +}; diff --git a/packages/openapi-ts/src/openApi/v2/parser/getRequiredPropertiesFromComposition.ts b/packages/openapi-ts/src/openApi/v2/parser/getRequiredPropertiesFromComposition.ts index c8b9e8f12..477906b26 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getRequiredPropertiesFromComposition.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getRequiredPropertiesFromComposition.ts @@ -1,30 +1,30 @@ -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' +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 type GetModelFn = typeof getModel; export const getRequiredPropertiesFromComposition = ( openApi: OpenApi, required: string[], definitions: OpenApiSchema[], - getModel: GetModelFn + getModel: GetModelFn, ): Model[] => definitions .reduce((properties, definition) => { if (definition.$ref) { - const schema = getRef(openApi, definition) - return [...properties, ...getModel(openApi, schema).properties] + const schema = getRef(openApi, definition); + return [...properties, ...getModel(openApi, schema).properties]; } - return [...properties, ...getModel(openApi, definition).properties] + return [...properties, ...getModel(openApi, definition).properties]; }, [] as Model[]) .filter( - property => !property.isRequired && required.includes(property.name) + (property) => !property.isRequired && required.includes(property.name), ) - .map(property => ({ + .map((property) => ({ ...property, - isRequired: true - })) + isRequired: true, + })); diff --git a/packages/openapi-ts/src/openApi/v2/parser/getServer.ts b/packages/openapi-ts/src/openApi/v2/parser/getServer.ts index 056b3e13f..e148543e8 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getServer.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getServer.ts @@ -1,13 +1,13 @@ -import type { OpenApi } from '../interfaces/OpenApi' +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, '') -} + 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/packages/openapi-ts/src/openApi/v2/parser/getServices.ts b/packages/openapi-ts/src/openApi/v2/parser/getServices.ts index 4e8e53a7f..b5db31ed3 100644 --- a/packages/openapi-ts/src/openApi/v2/parser/getServices.ts +++ b/packages/openapi-ts/src/openApi/v2/parser/getServices.ts @@ -1,19 +1,19 @@ -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' +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() + const services = new Map(); 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 || []) + const path = openApi.paths[url]; + const pathParams = getOperationParameters(openApi, path.parameters || []); // Parse all the methods for this path for (const method in path) { @@ -27,19 +27,19 @@ export const getServices = (openApi: OpenApi): Service[] => { case 'head': case 'patch': { // Each method contains an OpenAPI operation, we parse the operation - const op = path[method]! + const op = path[method]!; const tags = op.tags?.length ? op.tags.filter(unique) - : ['Default'] - tags.forEach(tag => { + : ['Default']; + tags.forEach((tag) => { const operation = getOperation( openApi, url, method, tag, op, - pathParams - ) + 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. @@ -47,20 +47,20 @@ export const getServices = (openApi: OpenApi): Service[] => { $refs: [], imports: [], name: operation.service, - operations: [] - } + operations: [], + }; // Push the operation in the service - service.operations.push(operation) - service.imports.push(...operation.imports) - services.set(operation.service, service) - }) - break + service.operations.push(operation); + service.imports.push(...operation.imports); + services.set(operation.service, service); + }); + break; } } } } } } - return Array.from(services.values()) -} + return Array.from(services.values()); +}; diff --git a/packages/openapi-ts/src/openApi/v3/index.ts b/packages/openapi-ts/src/openApi/v3/index.ts index b42b956a1..464fa989e 100644 --- a/packages/openapi-ts/src/openApi/v3/index.ts +++ b/packages/openapi-ts/src/openApi/v3/index.ts @@ -1,9 +1,9 @@ -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' +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 @@ -11,16 +11,16 @@ import { getServices } from './parser/getServices' * @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) + const version = getServiceVersion(openApi.info.version); + const server = getServer(openApi); + const models = getModels(openApi); + const services = getServices(openApi); return { enumNames: [], models, server, services, - version - } -} + version, + }; +}; diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApi.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApi.ts index 621237cb7..067909f98 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApi.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApi.ts @@ -1,21 +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' +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[] + components?: OpenApiComponents; + externalDocs?: OpenApiExternalDocs; + info: OpenApiInfo; + openapi: string; + paths: OpenApiPaths; + security?: OpenApiSecurityRequirement[]; + servers?: OpenApiServer[]; + tags?: OpenApiTag[]; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiCallback.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiCallback.ts index 5ca8a3477..747f25a7c 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiCallback.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiCallback.ts @@ -1,11 +1,11 @@ -import type { OpenApiPath } from './OpenApiPath' -import type { OpenApiReference } from './OpenApiReference' +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 + [key: string]: OpenApiPath; } -export type OpenApiCallback = OpenApiReference & Callback +export type OpenApiCallback = OpenApiReference & Callback; diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiComponents.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiComponents.ts index c5b188418..049c1d178 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiComponents.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiComponents.ts @@ -1,25 +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' +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 - responses?: Dictionary - parameters?: Dictionary - examples?: Dictionary - requestBodies?: Dictionary - headers?: Dictionary - securitySchemes?: Dictionary - links?: Dictionary - callbacks?: Dictionary + schemas?: Dictionary; + responses?: Dictionary; + parameters?: Dictionary; + examples?: Dictionary; + requestBodies?: Dictionary; + headers?: Dictionary; + securitySchemes?: Dictionary; + links?: Dictionary; + callbacks?: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiContact.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiContact.ts index 73a91b8ea..4e778ef8b 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiContact.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiContact.ts @@ -2,7 +2,7 @@ * {@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 + name?: string; + url?: string; + email?: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiDiscriminator.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiDiscriminator.ts index 55dc11bf0..2e2941fa7 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiDiscriminator.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiDiscriminator.ts @@ -1,9 +1,9 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' +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 + propertyName: string; + mapping?: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiEncoding.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiEncoding.ts index 3d356a00e..69b22adc9 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiEncoding.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiEncoding.ts @@ -1,13 +1,13 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' -import type { OpenApiHeader } from './OpenApiHeader' +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 - style?: string - explode?: boolean - allowReserved?: boolean + contentType?: string; + headers?: Dictionary; + style?: string; + explode?: boolean; + allowReserved?: boolean; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExample.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExample.ts index 764bdf79d..5066f0b1a 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExample.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExample.ts @@ -1,11 +1,11 @@ -import type { OpenApiReference } from './OpenApiReference' +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 + summary?: string; + description?: string; + value?: unknown; + externalValue?: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExternalDocs.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExternalDocs.ts index 05c952e58..49ad5217e 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExternalDocs.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiExternalDocs.ts @@ -2,6 +2,6 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#external-documentation-object */ export interface OpenApiExternalDocs { - description?: string - url: string + description?: string; + url: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiHeader.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiHeader.ts index 8080a2ff2..0845ab571 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiHeader.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiHeader.ts @@ -1,20 +1,20 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' -import type { OpenApiExample } from './OpenApiExample' -import type { OpenApiReference } from './OpenApiReference' -import type { OpenApiSchema } from './OpenApiSchema' +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 + description?: string; + required?: boolean; + deprecated?: boolean; + allowEmptyValue?: boolean; + style?: string; + explode?: boolean; + allowReserved?: boolean; + schema?: OpenApiSchema; + example?: unknown; + examples?: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiInfo.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiInfo.ts index 84008a3fe..7d9196a96 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiInfo.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiInfo.ts @@ -1,14 +1,14 @@ -import type { OpenApiContact } from './OpenApiContact' -import type { OpenApiLicense } from './OpenApiLicense' +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 + title: string; + description?: string; + termsOfService?: string; + contact?: OpenApiContact; + license?: OpenApiLicense; + version: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLicense.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLicense.ts index 0ddcc85a8..4ef387399 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLicense.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLicense.ts @@ -2,6 +2,6 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#license-object */ export interface OpenApiLicense { - name: string - url?: string + name: string; + url?: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLink.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLink.ts index 9c7e96ddf..6943a0f9a 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLink.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiLink.ts @@ -1,15 +1,15 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' -import type { OpenApiReference } from './OpenApiReference' -import type { OpenApiServer } from './OpenApiServer' +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 - requestBody?: unknown - description?: string - server?: OpenApiServer + operationRef?: string; + operationId?: string; + parameters?: Dictionary; + requestBody?: unknown; + description?: string; + server?: OpenApiServer; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiMediaType.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiMediaType.ts index 2cc587292..cc0b08bc1 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiMediaType.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiMediaType.ts @@ -1,15 +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' +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 - encoding?: Dictionary + schema?: OpenApiSchema; + example?: unknown; + examples?: Dictionary; + encoding?: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlow.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlow.ts index a55d2d49a..26e3a1e55 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlow.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlow.ts @@ -1,11 +1,11 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' +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 + authorizationUrl: string; + tokenUrl: string; + refreshUrl?: string; + scopes: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlows.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlows.ts index cc4526033..f052aeabe 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlows.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOAuthFlows.ts @@ -1,11 +1,11 @@ -import type { OpenApiOAuthFlow } from './OpenApiOAuthFlow' +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 + implicit?: OpenApiOAuthFlow; + password?: OpenApiOAuthFlow; + clientCredentials?: OpenApiOAuthFlow; + authorizationCode?: OpenApiOAuthFlow; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOperation.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOperation.ts index 705628c36..2e206c207 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOperation.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiOperation.ts @@ -1,26 +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' +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 - deprecated?: boolean - security?: OpenApiSecurityRequirement[] - servers?: OpenApiServer[] + tags?: string[]; + summary?: string; + description?: string; + externalDocs?: OpenApiExternalDocs; + operationId?: string; + parameters?: OpenApiParameter[]; + requestBody?: OpenApiRequestBody; + responses: OpenApiResponses; + callbacks?: Dictionary; + deprecated?: boolean; + security?: OpenApiSecurityRequirement[]; + servers?: OpenApiServer[]; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiParameter.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiParameter.ts index 786767010..f8b6b5222 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiParameter.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiParameter.ts @@ -1,23 +1,23 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' -import type { OpenApiExample } from './OpenApiExample' -import type { OpenApiReference } from './OpenApiReference' -import type { OpenApiSchema } from './OpenApiSchema' +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 + 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; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPath.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPath.ts index c5c7020f2..09d5447de 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPath.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPath.ts @@ -1,21 +1,21 @@ -import type { OpenApiOperation } from './OpenApiOperation' -import type { OpenApiParameter } from './OpenApiParameter' -import type { OpenApiServer } from './OpenApiServer' +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 + 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/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPaths.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPaths.ts index a99c51844..05e214d77 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPaths.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiPaths.ts @@ -1,8 +1,8 @@ -import type { OpenApiPath } from './OpenApiPath' +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 + [path: string]: OpenApiPath; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiReference.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiReference.ts index 598d7e50d..63d3a4617 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiReference.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiReference.ts @@ -2,5 +2,5 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#reference-object */ export interface OpenApiReference { - $ref?: string + $ref?: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiRequestBody.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiRequestBody.ts index f08bc25d9..d94f7b1c0 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiRequestBody.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiRequestBody.ts @@ -1,14 +1,14 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' -import type { OpenApiMediaType } from './OpenApiMediaType' -import type { OpenApiReference } from './OpenApiReference' +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 - description?: string - nullable?: boolean - required?: boolean + 'x-body-name'?: string; + content: Dictionary; + description?: string; + nullable?: boolean; + required?: boolean; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponse.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponse.ts index 139b19919..ce123e10c 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponse.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponse.ts @@ -1,15 +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' +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 - content?: Dictionary - links?: Dictionary + description: string; + headers?: Dictionary; + content?: Dictionary; + links?: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponses.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponses.ts index bfdd9f5d3..dc912779d 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponses.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiResponses.ts @@ -1,14 +1,14 @@ -import type { OpenApiReference } from './OpenApiReference' -import type { OpenApiResponse } from './OpenApiResponse' +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 + [httpcode: string]: OpenApiResponse; } export type OpenApiResponses = OpenApiReference & Response & { - default: OpenApiResponse - } + default: OpenApiResponse; + }; diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSchema.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSchema.ts index 450809af7..1da13559e 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSchema.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSchema.ts @@ -1,27 +1,27 @@ -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' +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 + 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' @@ -33,27 +33,27 @@ export interface OpenApiSchema extends OpenApiReference, WithEnumExtension { | '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 - readOnly?: boolean - required?: string[] - title?: string - type?: string | string[] - uniqueItems?: boolean - writeOnly?: boolean - xml?: OpenApiXml + | '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; + readOnly?: boolean; + required?: string[]; + title?: string; + type?: string | string[]; + uniqueItems?: boolean; + writeOnly?: boolean; + xml?: OpenApiXml; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityRequirement.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityRequirement.ts index 713316ce0..9d083556e 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityRequirement.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityRequirement.ts @@ -2,5 +2,5 @@ * {@link} https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#security-requirement-object */ export interface OpenApiSecurityRequirement { - [name: string]: string + [name: string]: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityScheme.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityScheme.ts index c84d12ece..3fc7d40f5 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityScheme.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiSecurityScheme.ts @@ -1,16 +1,16 @@ -import type { OpenApiOAuthFlows } from './OpenApiOAuthFlows' -import type { OpenApiReference } from './OpenApiReference' +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 + type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect'; + description?: string; + name?: string; + in?: 'query' | 'header' | 'cookie'; + scheme?: string; + bearerFormat?: string; + flows?: OpenApiOAuthFlows; + openIdConnectUrl?: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServer.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServer.ts index 4c0f38292..36432a80b 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServer.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServer.ts @@ -1,11 +1,11 @@ -import type { Dictionary } from '../../common/interfaces/Dictionary' -import type { OpenApiServerVariable } from './OpenApiServerVariable' +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 + url: string; + description?: string; + variables?: Dictionary; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServerVariable.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServerVariable.ts index d24aed2d1..18dd50753 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServerVariable.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiServerVariable.ts @@ -1,10 +1,10 @@ -import type { WithEnumExtension } from '../../common/interfaces/WithEnumExtension' +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 + enum?: (string | number)[]; + default: string; + description?: string; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiTag.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiTag.ts index 0f2e9ae30..7c3daca61 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiTag.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiTag.ts @@ -1,10 +1,10 @@ -import type { OpenApiExternalDocs } from './OpenApiExternalDocs' +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 + name: string; + description?: string; + externalDocs?: OpenApiExternalDocs; } diff --git a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiXml.ts b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiXml.ts index 7bb92b71a..597b0d68d 100644 --- a/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiXml.ts +++ b/packages/openapi-ts/src/openApi/v3/interfaces/OpenApiXml.ts @@ -2,9 +2,9 @@ * {@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 + name?: string; + namespace?: string; + prefix?: string; + attribute?: boolean; + wrapped?: boolean; } diff --git a/packages/openapi-ts/src/openApi/v3/parser/__tests__/getModel.spec.ts b/packages/openapi-ts/src/openApi/v3/parser/__tests__/getModel.spec.ts index ece2805f9..d13814f52 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/__tests__/getModel.spec.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/__tests__/getModel.spec.ts @@ -1,8 +1,8 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { reservedWords } from '../../../common/parser/reservedWords' -import { getType } from '../../../common/parser/type' -import { getModel } from '../getModel' +import { reservedWords } from '../../../common/parser/reservedWords'; +import { getType } from '../../../common/parser/type'; +import { getModel } from '../getModel'; const openApi = { components: { @@ -14,18 +14,18 @@ const openApi = { propA: { anyOf: [ { - $ref: '#/components/schemas/Enum1' + $ref: '#/components/schemas/Enum1', }, { - $ref: '#/components/schemas/ConstValue' + $ref: '#/components/schemas/ConstValue', }, { - type: 'null' - } - ] - } + type: 'null', + }, + ], + }, }, - type: 'object' + type: 'object', }, CompositionWithAnyOfAndNull: { description: @@ -37,68 +37,68 @@ const openApi = { items: { anyOf: [ { - $ref: '#/components/schemas/Enum1' + $ref: '#/components/schemas/Enum1', }, { - $ref: '#/components/schemas/ConstValue' - } - ] + $ref: '#/components/schemas/ConstValue', + }, + ], }, - type: 'array' + type: 'array', }, { - type: 'null' - } - ] - } + type: 'null', + }, + ], + }, }, - type: 'object' + type: 'object', }, ConstValue: { const: 'ConstValue', - type: 'string' + type: 'string', }, Enum1: { enum: ['Bird', 'Dog'], - type: 'string' - } - } + type: 'string', + }, + }, }, info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3.0', paths: {}, servers: [ { - url: 'https://localhost:8080/api' - } - ] -} + url: 'https://localhost:8080/api', + }, + ], +}; describe('getModel', () => { it('Parses any of', () => { - const definition = openApi.components.schemas.CompositionWithAnyOfAndNull - const definitionType = getType('CompositionWithAnyOfAndNull') + const definition = openApi.components.schemas.CompositionWithAnyOfAndNull; + const definitionType = getType('CompositionWithAnyOfAndNull'); const model = getModel( openApi, definition, true, - definitionType.base.replace(reservedWords, '_$1') - ) - expect(model.properties[0].properties.length).toBe(2) - }) + definitionType.base.replace(reservedWords, '_$1'), + ); + expect(model.properties[0].properties.length).toBe(2); + }); it('Parses any of 2', () => { - const definition = openApi.components.schemas.CompositionWithAny - const definitionType = getType('CompositionWithAny') + const definition = openApi.components.schemas.CompositionWithAny; + const definitionType = getType('CompositionWithAny'); const model = getModel( openApi, definition, true, - definitionType.base.replace(reservedWords, '_$1') - ) - expect(model.properties[0].properties.length).toBe(3) - }) -}) + definitionType.base.replace(reservedWords, '_$1'), + ); + expect(model.properties[0].properties.length).toBe(3); + }); +}); diff --git a/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServer.spec.ts b/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServer.spec.ts index 42f51a030..41cf40726 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServer.spec.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServer.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { getServer } from '../getServer' +import { getServer } from '../getServer'; describe('getServer', () => { it('should produce correct result', () => { @@ -8,25 +8,25 @@ describe('getServer', () => { getServer({ info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3.0', paths: {}, servers: [ { - url: 'https://localhost:8080/api' - } - ] - }) - ).toEqual('https://localhost:8080/api') - }) + url: 'https://localhost:8080/api', + }, + ], + }), + ).toEqual('https://localhost:8080/api'); + }); it('should produce correct result with variables', () => { expect( getServer({ info: { title: 'dummy', - version: '1.0' + version: '1.0', }, openapi: '3.0', paths: {}, @@ -35,15 +35,15 @@ describe('getServer', () => { url: '{scheme}://localhost:{port}/api', variables: { port: { - default: '8080' + default: '8080', }, scheme: { - default: 'https' - } - } - } - ] - }) - ).toEqual('https://localhost:8080/api') - }) -}) + default: 'https', + }, + }, + }, + ], + }), + ).toEqual('https://localhost:8080/api'); + }); +}); diff --git a/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServices.spec.ts b/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServices.spec.ts index 5b207af55..4b745a813 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServices.spec.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/__tests__/getServices.spec.ts @@ -1,7 +1,7 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { setConfig } from '../../../../utils/config' -import { getServices } from '../getServices' +import { setConfig } from '../../../../utils/config'; +import { getServices } from '../getServices'; describe('getServices', () => { it('should create a unnamed service if tags are empty', () => { @@ -22,13 +22,13 @@ describe('getServices', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); const services = getServices({ info: { title: 'x', - version: '1' + version: '1', }, openapi: '3.0.0', paths: { @@ -36,19 +36,19 @@ describe('getServices', () => { get: { responses: { 200: { - description: 'x' + description: 'x', }, default: { - description: 'default' - } + description: 'default', + }, }, - tags: [] - } - } - } - }) + tags: [], + }, + }, + }, + }); - expect(services).toHaveLength(1) - expect(services[0].name).toEqual('Default') - }) -}) + expect(services).toHaveLength(1); + expect(services[0].name).toEqual('Default'); + }); +}); diff --git a/packages/openapi-ts/src/openApi/v3/parser/discriminator.ts b/packages/openapi-ts/src/openApi/v3/parser/discriminator.ts index ff8c0a0d2..6e1f81180 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/discriminator.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/discriminator.ts @@ -1,53 +1,53 @@ -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' +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): Dictionary => { - const m2: Dictionary = {} + const m2: Dictionary = {}; for (const key in map) { - m2[map[key]] = key + m2[map[key]] = key; } - return m2 -} + return m2; +}; export const findOneOfParentDiscriminator = ( openApi: OpenApi, - parent?: Model + 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] + const schema = openApi.components.schemas[definitionName]; if ( schema.discriminator && schema.oneOf?.length && schema.oneOf.some( - definition => - definition.$ref && stripNamespace(definition.$ref) == parent.name + (definition) => + definition.$ref && stripNamespace(definition.$ref) == parent.name, ) ) { - return schema.discriminator + return schema.discriminator; } } } } - return undefined -} + return undefined; +}; export const mapPropertyValue = ( discriminator: OpenApiDiscriminator, - parent: Model + parent: Model, ): string => { if (discriminator.mapping) { - const mapping = inverseDictionary(discriminator.mapping) + const mapping = inverseDictionary(discriminator.mapping); const key = Object.keys(mapping).find( - item => stripNamespace(item) == parent.name - ) + (item) => stripNamespace(item) == parent.name, + ); if (key && mapping[key]) { - return mapping[key] + return mapping[key]; } } - return parent.name -} + return parent.name; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getContent.ts b/packages/openapi-ts/src/openApi/v3/parser/getContent.ts index 3d4e19b41..3cb411abc 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getContent.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getContent.ts @@ -1,11 +1,11 @@ -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' +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 + mediaType: string; + schema: OpenApiSchema; } const BASIC_MEDIA_TYPES = [ @@ -18,34 +18,34 @@ const BASIC_MEDIA_TYPES = [ 'multipart/form-data', 'multipart/mixed', 'multipart/related', - 'multipart/batch' -] + 'multipart/batch', +]; export const getContent = ( openApi: OpenApi, - content: Dictionary + content: Dictionary, ): Content | null => { const basicMediaTypeWithSchema = Object.keys(content) - .filter(mediaType => { - const cleanMediaType = mediaType.split(';')[0].trim() - return BASIC_MEDIA_TYPES.includes(cleanMediaType) + .filter((mediaType) => { + const cleanMediaType = mediaType.split(';')[0].trim(); + return BASIC_MEDIA_TYPES.includes(cleanMediaType); }) - .find(mediaType => Boolean(content[mediaType]?.schema)) + .find((mediaType) => Boolean(content[mediaType]?.schema)); if (basicMediaTypeWithSchema) { return { mediaType: basicMediaTypeWithSchema, - schema: content[basicMediaTypeWithSchema].schema as OpenApiSchema - } + schema: content[basicMediaTypeWithSchema].schema as OpenApiSchema, + }; } - const firstMediaTypeWithSchema = Object.keys(content).find(mediaType => - Boolean(content[mediaType]?.schema) - ) + const firstMediaTypeWithSchema = Object.keys(content).find((mediaType) => + Boolean(content[mediaType]?.schema), + ); if (firstMediaTypeWithSchema) { return { mediaType: firstMediaTypeWithSchema, - schema: content[firstMediaTypeWithSchema].schema as OpenApiSchema - } + schema: content[firstMediaTypeWithSchema].schema as OpenApiSchema, + }; } - return null -} + return null; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getModel.ts b/packages/openapi-ts/src/openApi/v3/parser/getModel.ts index 530a52ada..aae9847a8 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getModel.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getModel.ts @@ -1,28 +1,28 @@ -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 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' + getModelComposition, +} from './getModelComposition'; import { getAdditionalPropertiesModel, - getModelProperties -} from './getModelProperties' -import { inferType } from './inferType' + getModelProperties, +} from './getModelProperties'; +import { inferType } from './inferType'; export const getModel = ( openApi: OpenApi, definition: OpenApiSchema, isDefinition: boolean = false, name: string = '', - parentDefinition: OpenApiSchema | null = null + parentDefinition: OpenApiSchema | null = null, ): Model => { - const inferredType = inferType(definition) + const inferredType = inferType(definition); const model: Model = { $refs: [], base: 'unknown', @@ -54,55 +54,55 @@ export const getModel = ( properties: [], template: null, type: 'unknown', - uniqueItems: definition.uniqueItems - } + 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 + 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) + 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 + 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 + 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) + const foundComposition = findModelComposition(parentDefinition); if ( foundComposition && foundComposition.definitions.some( - definition => definition.type !== 'array' + (definition) => definition.type !== 'array', ) ) { - return getModel(openApi, definition.items) + return getModel(openApi, definition.items); } } @@ -112,97 +112,97 @@ export const getModel = ( */ const arrayItemsDefinition: OpenApiSchema = Array.isArray(definition.items) ? { - anyOf: 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 + : 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) + const foundComposition = findModelComposition(definition); if (foundComposition) { const composition = getModelComposition({ ...foundComposition, definition, getModel, model, - openApi - }) - return { ...model, ...composition } + 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) + 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) + 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] + model.enums = [...model.enums, modelProperty]; } - }) + }); if (definition.additionalProperties) { const modelProperty = getAdditionalPropertiesModel( openApi, definition, getModel, - model - ) - model.properties.push(modelProperty) + model, + ); + model.properties.push(modelProperty); } - return model + return model; } - return getAdditionalPropertiesModel(openApi, definition, getModel, model) + return getAdditionalPropertiesModel(openApi, definition, getModel, model); } if (definition.const !== undefined) { - const definitionConst = definition.const + const definitionConst = definition.const; const modelConst = typeof definitionConst === 'string' ? `"${definitionConst}"` - : `${definitionConst}` - model.base = modelConst - model.export = 'const' - model.type = modelConst - return model + : `${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 + 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 -} + return model; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getModelComposition.ts b/packages/openapi-ts/src/openApi/v3/parser/getModelComposition.ts index 32fcb6330..86f7d8488 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getModelComposition.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getModelComposition.ts @@ -1,42 +1,42 @@ -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' +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 type GetModelFn = typeof getModel; type Composition = { - definitions: OpenApiSchema[] - type: ModelComposition['export'] -} + definitions: OpenApiSchema[]; + type: ModelComposition['export']; +}; export const findModelComposition = ( - definition: OpenApiSchema + definition: OpenApiSchema, ): Composition | undefined => { const compositions: ReadonlyArray<{ - definitions: Composition['definitions'] | undefined - type: Composition['type'] + definitions: Composition['definitions'] | undefined; + type: Composition['type']; }> = [ { definitions: definition.allOf, - type: 'all-of' + type: 'all-of', }, { definitions: definition.anyOf, - type: 'any-of' + type: 'any-of', }, { definitions: definition.oneOf, - type: 'one-of' - } - ] + type: 'one-of', + }, + ]; return compositions.find( - composition => composition.definitions?.length - ) as ReturnType -} + (composition) => composition.definitions?.length, + ) as ReturnType; +}; export const getModelComposition = ({ definition, @@ -44,69 +44,69 @@ export const getModelComposition = ({ getModel, model, openApi, - type + type, }: Composition & { - definition: OpenApiSchema - getModel: GetModelFn - model: Model - openApi: OpenApi + 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 - } + properties: model.properties, + }; - const properties: Model[] = [] + 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) - }) + .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] + getModel, + ); + requiredProperties.forEach((requiredProperty) => { + composition.$refs = [...composition.$refs, ...requiredProperty.$refs]; composition.imports = [ ...composition.imports, - ...requiredProperty.imports - ] - composition.enums.push(...requiredProperty.enums) - }) - properties.push(...requiredProperties) + ...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) + 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) + composition.enums.push(modelProperty); } - }) - properties.push(...modelProperties) + }); + properties.push(...modelProperties); } if (properties.length) { - const foundComposition = findModelComposition(definition) + const foundComposition = findModelComposition(definition); if (foundComposition?.type === 'one-of') { - composition.properties.forEach(property => { - property.properties.push(...properties) - }) + composition.properties.forEach((property) => { + property.properties.push(...properties); + }); } else { composition.properties.push({ $refs: [], @@ -124,10 +124,10 @@ export const getModelComposition = ({ name: 'properties', properties, template: null, - type: 'unknown' - }) + type: 'unknown', + }); } } - return composition -} + return composition; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getModelProperties.ts b/packages/openapi-ts/src/openApi/v3/parser/getModelProperties.ts index 889a3bcbe..94a523116 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getModelProperties.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getModelProperties.ts @@ -1,70 +1,73 @@ -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' +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 type GetModelFn = typeof getModel; export const getAdditionalPropertiesModel = ( openApi: OpenApi, definition: OpenApiSchema, getModel: GetModelFn, - model: Model + model: Model, ): Model => { const ap = typeof definition.additionalProperties === 'object' ? definition.additionalProperties - : {} - const apModel = getModel(openApi, ap) + : {}; + 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 + 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 + 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 -} + 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 + parent?: Model, ): Model[] => { - const models: Model[] = [] - const discriminator = findOneOfParentDiscriminator(openApi, parent) + 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 property = definition.properties[propertyName]; + const propertyRequired = !!definition.required?.includes(propertyName); const propertyValues: Omit< Model, | '$refs' @@ -99,8 +102,8 @@ export const getModelProperties = ( multipleOf: property.multipleOf, name: escapeName(propertyName), pattern: getPattern(property.pattern), - uniqueItems: property.uniqueItems - } + uniqueItems: property.uniqueItems, + }; if (parent && discriminator?.propertyName == propertyName) { models.push({ @@ -115,10 +118,10 @@ export const getModelProperties = ( link: null, properties: [], template: null, - type: 'string' - }) + type: 'string', + }); } else if (property.$ref) { - const model = getType(property.$ref) + const model = getType(property.$ref); models.push({ ...propertyValues, $refs: model.$refs, @@ -131,10 +134,10 @@ export const getModelProperties = ( link: null, properties: [], template: model.template, - type: model.type - }) + type: model.type, + }); } else { - const model = getModel(openApi, property) + const model = getModel(openApi, property); models.push({ ...propertyValues, $refs: model.$refs, @@ -148,11 +151,11 @@ export const getModelProperties = ( link: model.link, properties: model.properties, template: model.template, - type: model.type - }) + type: model.type, + }); } } } - return models -} + return models; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getModels.ts b/packages/openapi-ts/src/openApi/v3/parser/getModels.ts index 156a711d2..5f9f1b4e5 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getModels.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getModels.ts @@ -1,43 +1,43 @@ -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' +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[] = [] + 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 definition = openApi.components.schemas[definitionName]; + const definitionType = getType(definitionName); const model = getModel( openApi, definition, true, - definitionType.base.replace(reservedWords, '_$1') - ) - models.push(model) + 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 + 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) + definitionType.base.replace(reservedWords, '_$1'), + ); + model.description = definition.description || null; + model.deprecated = definition.deprecated; + models.push(model); } } } } - return models -} + return models; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getOperationParameter.ts b/packages/openapi-ts/src/openApi/v3/parser/getOperationParameter.ts index dd66e0aef..429537e51 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getOperationParameter.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getOperationParameter.ts @@ -1,17 +1,17 @@ -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' +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 + parameter: OpenApiParameter, ): OperationParameter => { const operationParameter: OperationParameter = { $refs: [], @@ -33,82 +33,82 @@ export const getOperationParameter = ( prop: parameter.name, properties: [], template: null, - type: 'unknown' - } + 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 + 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 - ] + ...definitionRef.$refs, + ]; operationParameter.imports = [ ...operationParameter.imports, - ...definitionRef.imports - ] - return operationParameter + ...definitionRef.imports, + ]; + return operationParameter; } - let schema = parameter.schema + let schema = parameter.schema; if (schema) { if (schema.$ref?.startsWith('#/components/parameters/')) { - schema = getRef(openApi, schema) + schema = getRef(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] + 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 + ...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 + 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.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.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 + ...model.imports, + ]; + operationParameter.enum.push(...model.enum); + operationParameter.enums.push(...model.enums); + operationParameter.properties.push(...model.properties); + return operationParameter; } } - return operationParameter -} + return operationParameter; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getOperationParameters.ts b/packages/openapi-ts/src/openApi/v3/parser/getOperationParameters.ts index 50f857961..3e9df2ded 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getOperationParameters.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getOperationParameters.ts @@ -1,14 +1,14 @@ -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' +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 +const allowedIn = ['cookie', 'formData', 'header', 'path', 'query'] as const; export const getOperationParameters = ( openApi: OpenApi, - parameters: OpenApiParameter[] + parameters: OpenApiParameter[], ): OperationParameters => { const operationParameters: OperationParameters = { $refs: [], @@ -19,67 +19,70 @@ export const getOperationParameters = ( parametersForm: [], parametersHeader: [], parametersPath: [], - parametersQuery: [] // Not used in v3 -> @see requestBody - } + parametersQuery: [], // Not used in v3 -> @see requestBody + }; - parameters.forEach(parameterOrReference => { - const parameterDef = getRef(openApi, parameterOrReference) - const parameter = getOperationParameter(openApi, parameterDef) + parameters.forEach((parameterOrReference) => { + const parameterDef = getRef( + openApi, + parameterOrReference, + ); + const parameter = getOperationParameter(openApi, parameterDef); - const defIn = parameterDef.in as (typeof allowedIn)[number] + 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 + return; } switch (defIn) { case 'cookie': operationParameters.parametersCookie = [ ...operationParameters.parametersCookie, - parameter - ] - break + parameter, + ]; + break; case 'formData': operationParameters.parametersForm = [ ...operationParameters.parametersForm, - parameter - ] - break + parameter, + ]; + break; case 'header': operationParameters.parametersHeader = [ ...operationParameters.parametersHeader, - parameter - ] - break + parameter, + ]; + break; case 'path': operationParameters.parametersPath = [ ...operationParameters.parametersPath, - parameter - ] - break + parameter, + ]; + break; case 'query': operationParameters.parametersQuery = [ ...operationParameters.parametersQuery, - parameter - ] - break + parameter, + ]; + break; } operationParameters.$refs = [ ...operationParameters.$refs, - ...parameter.$refs - ] + ...parameter.$refs, + ]; operationParameters.imports = [ ...operationParameters.imports, - ...parameter.imports - ] + ...parameter.imports, + ]; operationParameters.parameters = [ ...operationParameters.parameters, - parameter - ] - }) + parameter, + ]; + }); - return operationParameters -} + return operationParameters; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getOperationRequestBody.ts b/packages/openapi-ts/src/openApi/v3/parser/getOperationRequestBody.ts index 99fe0c879..e21605f8e 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getOperationRequestBody.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getOperationRequestBody.ts @@ -1,14 +1,14 @@ -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' +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 + body: OpenApiRequestBody, ): OperationParameter => { const requestBody: OperationParameter = { $refs: [], @@ -30,63 +30,63 @@ export const getOperationRequestBody = ( prop: body['x-body-name'] ?? 'requestBody', properties: [], template: null, - type: 'unknown' - } + type: 'unknown', + }; if (body.content) { - const content = getContent(openApi, body.content) + const content = getContent(openApi, body.content); if (content) { - requestBody.mediaType = content.mediaType + 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 + 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 + 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 + 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 -} + return requestBody; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getOperationResponse.ts b/packages/openapi-ts/src/openApi/v3/parser/getOperationResponse.ts index 398488108..10096a45e 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getOperationResponse.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getOperationResponse.ts @@ -1,17 +1,17 @@ -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' +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 + responseCode: number, ): OperationResponse => { const operationResponse: OperationResponse = { $refs: [], @@ -31,60 +31,60 @@ export const getOperationResponse = ( name: '', properties: [], template: null, - type: responseCode !== 204 ? 'unknown' : 'void' - } + type: responseCode !== 204 ? 'unknown' : 'void', + }; if (response.content) { - const content = getContent(openApi, response.content) + const content = getContent(openApi, response.content); if (content) { if (content.schema.$ref?.startsWith('#/components/responses/')) { - content.schema = getRef(openApi, content.schema) + content.schema = getRef(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] + 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 + ...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] + 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 + ...model.imports, + ]; + operationResponse.enum.push(...model.enum); + operationResponse.enums.push(...model.enums); + operationResponse.properties.push(...model.properties); + return operationResponse; } } } @@ -94,14 +94,14 @@ export const getOperationResponse = ( 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 + operationResponse.in = 'header'; + operationResponse.name = name; + operationResponse.type = 'string'; + operationResponse.base = 'string'; + return operationResponse; } } } - return operationResponse -} + return operationResponse; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getOperationResponses.ts b/packages/openapi-ts/src/openApi/v3/parser/getOperationResponses.ts index c498b35eb..d55f8ef3e 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getOperationResponses.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getOperationResponses.ts @@ -1,38 +1,38 @@ -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' +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 + responses: OpenApiResponses, ): OperationResponse[] => { - const operationResponses: 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(openApi, responseOrReference) - const responseCode = getOperationResponseCode(code) + const responseOrReference = responses[code]; + const response = getRef(openApi, responseOrReference); + const responseCode = getOperationResponseCode(code); if (responseCode) { const operationResponse = getOperationResponse( openApi, response, - responseCode - ) - operationResponses.push(operationResponse) + 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 - ) -} + a.code < b.code ? -1 : a.code > b.code ? 1 : 0, + ); +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getOperationResults.ts b/packages/openapi-ts/src/openApi/v3/parser/getOperationResults.ts index b09f1288a..f48c83e29 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getOperationResults.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getOperationResults.ts @@ -1,29 +1,29 @@ -import type { Model, OperationResponse } from '../../common/interfaces/client' +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 + 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 areEqual(a.link, b.link); } - return equal -} + return equal; +}; export const getOperationResults = ( - operationResponses: OperationResponse[] + operationResponses: OperationResponse[], ): OperationResponse[] => { - const operationResults: OperationResponse[] = [] + const operationResults: OperationResponse[] = []; // Filter out success response codes - operationResponses.forEach(operationResponse => { - const { code } = operationResponse + operationResponses.forEach((operationResponse) => { + const { code } = operationResponse; if (code && code >= 200 && code < 300) { - operationResults.push(operationResponse) + operationResults.push(operationResponse); } - }) + }); return operationResults.filter( (operationResult, index, arr) => - arr.findIndex(item => areEqual(item, operationResult)) === index - ) -} + arr.findIndex((item) => areEqual(item, operationResult)) === index, + ); +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getRequiredPropertiesFromComposition.ts b/packages/openapi-ts/src/openApi/v3/parser/getRequiredPropertiesFromComposition.ts index c8b9e8f12..477906b26 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getRequiredPropertiesFromComposition.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getRequiredPropertiesFromComposition.ts @@ -1,30 +1,30 @@ -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' +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 type GetModelFn = typeof getModel; export const getRequiredPropertiesFromComposition = ( openApi: OpenApi, required: string[], definitions: OpenApiSchema[], - getModel: GetModelFn + getModel: GetModelFn, ): Model[] => definitions .reduce((properties, definition) => { if (definition.$ref) { - const schema = getRef(openApi, definition) - return [...properties, ...getModel(openApi, schema).properties] + const schema = getRef(openApi, definition); + return [...properties, ...getModel(openApi, schema).properties]; } - return [...properties, ...getModel(openApi, definition).properties] + return [...properties, ...getModel(openApi, definition).properties]; }, [] as Model[]) .filter( - property => !property.isRequired && required.includes(property.name) + (property) => !property.isRequired && required.includes(property.name), ) - .map(property => ({ + .map((property) => ({ ...property, - isRequired: true - })) + isRequired: true, + })); diff --git a/packages/openapi-ts/src/openApi/v3/parser/getServer.ts b/packages/openapi-ts/src/openApi/v3/parser/getServer.ts index e714ac51b..950ac7005 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getServer.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getServer.ts @@ -1,13 +1,13 @@ -import type { OpenApi } from '../interfaces/OpenApi' +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 || '' + 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) + url = url.replace(`{${variable}}`, variables[variable].default); } } - return url.replace(/\/$/g, '') -} + return url.replace(/\/$/g, ''); +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/getServices.ts b/packages/openapi-ts/src/openApi/v3/parser/getServices.ts index 57b5be6fc..e9dd082c2 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/getServices.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/getServices.ts @@ -1,8 +1,8 @@ -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' +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', @@ -11,46 +11,46 @@ const allowedServiceMethods = [ 'options', 'patch', 'post', - 'put' -] as const + 'put', +] as const; const getNewService = (operation: Operation): Service => ({ $refs: [], imports: [], name: operation.service, - operations: [] -}) + operations: [], +}); export const getServices = (openApi: OpenApi): Service[] => { - const services = new Map() + const services = new Map(); for (const url in openApi.paths) { - const path = openApi.paths[url] - const pathParams = getOperationParameters(openApi, path.parameters ?? []) + const path = openApi.paths[url]; + const pathParams = getOperationParameters(openApi, path.parameters ?? []); for (const key in path) { - const method = key as Lowercase + const method = key as Lowercase; if (allowedServiceMethods.includes(method)) { - const op = path[method]! - const tags = op.tags?.length ? op.tags.filter(unique) : ['Default'] - tags.forEach(tag => { + 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 - }) + 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) - }) + 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()) -} + return Array.from(services.values()); +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/inferType.ts b/packages/openapi-ts/src/openApi/v3/parser/inferType.ts index b4acb90af..56e1445d4 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/inferType.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/inferType.ts @@ -1,8 +1,8 @@ -import type { OpenApiSchema } from '../interfaces/OpenApiSchema' +import type { OpenApiSchema } from '../interfaces/OpenApiSchema'; export const inferType = (definition: OpenApiSchema) => { if (definition.enum && definition.type !== 'boolean') { - return 'enum' + return 'enum'; } - return undefined -} + return undefined; +}; diff --git a/packages/openapi-ts/src/openApi/v3/parser/operation.ts b/packages/openapi-ts/src/openApi/v3/parser/operation.ts index f675a1d28..821359f30 100644 --- a/packages/openapi-ts/src/openApi/v3/parser/operation.ts +++ b/packages/openapi-ts/src/openApi/v3/parser/operation.ts @@ -1,57 +1,58 @@ import type { Operation, OperationParameter, - OperationParameters -} from '../../common/interfaces/client' -import { getRef } from '../../common/parser/getRef' + 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' + 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[] + globalParams: OperationParameter[], ): OperationParameter[] => { - let mergedParameters = [...opParams] - let pendingParameters = [...globalParams] + let mergedParameters = [...opParams]; + let pendingParameters = [...globalParams]; while (pendingParameters.length > 0) { - const pendingParam = pendingParameters[0] - pendingParameters = pendingParameters.slice(1) + const pendingParam = pendingParameters[0]; + pendingParameters = pendingParameters.slice(1); const canMerge = mergedParameters.every( - param => param.in !== pendingParam.in || param.name !== pendingParam.name - ) + (param) => + param.in !== pendingParam.in || param.name !== pendingParam.name, + ); if (canMerge) { - mergedParameters = [...mergedParameters, pendingParam] + mergedParameters = [...mergedParameters, pendingParam]; } } - return mergedParameters -} + return mergedParameters; +}; export const getOperation = ( openApi: OpenApi, data: { - method: Lowercase - op: OpenApiOperation - pathParams: OperationParameters - tag: string - url: string - } + method: Lowercase; + 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 { method, op, pathParams, tag, url } = data; + const service = getServiceName(tag); + const name = getOperationName(url, method, op.operationId); const operation: Operation = { $refs: [], @@ -72,86 +73,86 @@ export const getOperation = ( responseHeader: null, results: [], service, - summary: op.summary || null - } + 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 + 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 - ] + ...parameters.parametersCookie, + ]; operation.parametersForm = [ ...operation.parametersForm, - ...parameters.parametersForm - ] + ...parameters.parametersForm, + ]; operation.parametersHeader = [ ...operation.parametersHeader, - ...parameters.parametersHeader - ] + ...parameters.parametersHeader, + ]; operation.parametersPath = [ ...operation.parametersPath, - ...parameters.parametersPath - ] + ...parameters.parametersPath, + ]; operation.parametersQuery = [ ...operation.parametersQuery, - ...parameters.parametersQuery - ] + ...parameters.parametersQuery, + ]; } if (op.requestBody) { - const requestBodyDef = getRef(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 + const requestBodyDef = getRef(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) + 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] - }) + 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 - ) + pathParams.parameters, + ); operation.parametersCookie = mergeParameters( operation.parametersCookie, - pathParams.parametersCookie - ) + pathParams.parametersCookie, + ); operation.parametersForm = mergeParameters( operation.parametersForm, - pathParams.parametersForm - ) + pathParams.parametersForm, + ); operation.parametersHeader = mergeParameters( operation.parametersHeader, - pathParams.parametersHeader - ) + pathParams.parametersHeader, + ); operation.parametersPath = mergeParameters( operation.parametersPath, - pathParams.parametersPath - ) + pathParams.parametersPath, + ); operation.parametersQuery = mergeParameters( operation.parametersQuery, - pathParams.parametersQuery - ) + pathParams.parametersQuery, + ); // Sort by required - operation.parameters = toSortedByRequired(operation.parameters) + operation.parameters = toSortedByRequired(operation.parameters); - return operation -} + return operation; +}; diff --git a/packages/openapi-ts/src/types/client.ts b/packages/openapi-ts/src/types/client.ts index 2b2f06985..d786e81d8 100644 --- a/packages/openapi-ts/src/types/client.ts +++ b/packages/openapi-ts/src/types/client.ts @@ -1,9 +1,9 @@ -import { Model, Service } from '../openApi' +import { Model, Service } from '../openApi'; export interface Client { - enumNames: string[] - models: Model[] - server: string - services: Service[] - version: string + enumNames: string[]; + models: Model[]; + server: string; + services: Service[]; + version: string; } diff --git a/packages/openapi-ts/src/types/config.ts b/packages/openapi-ts/src/types/config.ts index 3f6375f8b..5d68fcc24 100644 --- a/packages/openapi-ts/src/types/config.ts +++ b/packages/openapi-ts/src/types/config.ts @@ -2,83 +2,83 @@ export interface UserConfig { /** * Manually set base in OpenAPI config instead of inferring from server value */ - base?: string + base?: string; /** * The selected HTTP client (fetch, xhr, node or axios) * @default 'fetch' */ - client?: 'angular' | 'axios' | 'fetch' | 'node' | 'xhr' + client?: 'angular' | 'axios' | 'fetch' | 'node' | 'xhr'; /** * Run in debug mode? * @default false */ - debug?: boolean + debug?: boolean; /** * Skip writing files to disk? * @default false */ - dryRun?: boolean + dryRun?: boolean; /** * Export enum definitions? * @default false */ - enums?: 'javascript' | 'typescript' | false + enums?: 'javascript' | 'typescript' | false; /** * Generate core client classes? * @default true */ - exportCore?: boolean + exportCore?: boolean; /** * Generate services? * @default true */ - exportServices?: boolean | string + exportServices?: boolean | string; /** * Process output folder with formatter? * @default true */ - format?: boolean + format?: boolean; /** * The relative location of the OpenAPI spec */ - input: string | Record + input: string | Record; /** * Process output folder with linter? * @default false */ - lint?: boolean + lint?: boolean; /** * Custom client class name */ - name?: string + name?: string; /** * Use operation ID to generate operation names? * @default true */ - operationId?: boolean + operationId?: boolean; /** * The relative location of the output directory */ - output: string + output: string; /** * Service name postfix * @default 'Service' */ - postfixServices?: string + postfixServices?: string; /** * Path to custom request file */ - request?: string + request?: string; /** * Export JSON schemas? * @default true */ - schemas?: boolean + schemas?: boolean; /** * Define shape of returned value from service calls * @default 'body' */ - serviceResponse?: 'body' | 'response' + serviceResponse?: 'body' | 'response'; /** * Generate types? * @default true @@ -91,27 +91,27 @@ export interface UserConfig { * Generate types? * @default true */ - export?: boolean + export?: boolean; /** * Include only types matching regular expression */ - include?: string + include?: string; /** * Use your preferred naming pattern * @default 'preserve' */ - name?: 'PascalCase' | 'preserve' - } + name?: 'PascalCase' | 'preserve'; + }; /** * Output Date instead of string for the format "date-time" in the models * @default false */ - useDateType?: boolean + useDateType?: boolean; /** * Use options or arguments functions * @default true */ - useOptions?: boolean + useOptions?: boolean; } export type Config = Omit< @@ -119,5 +119,5 @@ export type Config = Omit< 'base' | 'name' | 'request' | 'types' > & Pick & { - types: Extract['types'], object> - } + types: Extract['types'], object>; + }; diff --git a/packages/openapi-ts/src/types/hbs.d.ts b/packages/openapi-ts/src/types/hbs.d.ts index 428f6c0af..55d75f9cc 100644 --- a/packages/openapi-ts/src/types/hbs.d.ts +++ b/packages/openapi-ts/src/types/hbs.d.ts @@ -8,9 +8,9 @@ */ declare module '*.hbs' { const template: { - compiler: [number, string] - useData: true - main: () => void - } - export default template + compiler: [number, string]; + useData: true; + main: () => void; + }; + export default template; } diff --git a/packages/openapi-ts/src/utils/__tests__/enum.spec.ts b/packages/openapi-ts/src/utils/__tests__/enum.spec.ts index d4ce11b51..39b85169e 100644 --- a/packages/openapi-ts/src/utils/__tests__/enum.spec.ts +++ b/packages/openapi-ts/src/utils/__tests__/enum.spec.ts @@ -1,25 +1,25 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { enumKey } from '../enum' +import { enumKey } from '../enum'; describe('enumKey', () => { it('returns custom name', () => { - expect(enumKey('foo', 'bar')).toBe('bar') - }) + expect(enumKey('foo', 'bar')).toBe('bar'); + }); it('returns number prefixed with underscore', () => { - expect(enumKey(100)).toBe("'_100'") - }) + expect(enumKey(100)).toBe("'_100'"); + }); it('returns empty string', () => { - expect(enumKey('')).toBe('EMPTY_STRING') - }) + expect(enumKey('')).toBe('EMPTY_STRING'); + }); it('returns uppercased value', () => { - expect(enumKey('abc')).toEqual('ABC') - expect(enumKey('æbc')).toEqual('ÆBC') - expect(enumKey('æb.c')).toEqual('ÆB_C') - expect(enumKey('1æb.c')).toEqual('_1ÆB_C') - expect(enumKey("'quoted'")).toEqual('_QUOTED_') - }) -}) + expect(enumKey('abc')).toEqual('ABC'); + expect(enumKey('æbc')).toEqual('ÆBC'); + expect(enumKey('æb.c')).toEqual('ÆB_C'); + expect(enumKey('1æb.c')).toEqual('_1ÆB_C'); + expect(enumKey("'quoted'")).toEqual('_QUOTED_'); + }); +}); diff --git a/packages/openapi-ts/src/utils/__tests__/escape.spec.ts b/packages/openapi-ts/src/utils/__tests__/escape.spec.ts index 72367b7d1..6f12ae724 100644 --- a/packages/openapi-ts/src/utils/__tests__/escape.spec.ts +++ b/packages/openapi-ts/src/utils/__tests__/escape.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { escapeName, unescapeName } from '../escape' +import { escapeName, unescapeName } from '../escape'; const toCheck: { unescaped: string; escaped: string }[] = [ { escaped: "''", unescaped: '' }, @@ -17,23 +17,23 @@ const toCheck: { unescaped: string; escaped: string }[] = [ { escaped: `'123foobar'`, unescaped: '123foobar' }, { escaped: `'@foobar'`, unescaped: '@foobar' }, { escaped: '$foobar', unescaped: '$foobar' }, - { escaped: '_foobar', unescaped: '_foobar' } -] + { escaped: '_foobar', unescaped: '_foobar' }, +]; describe('escapeName', () => { it.each(toCheck)( 'should escape $unescaped to $escaped', ({ unescaped, escaped }) => { - expect(escapeName(unescaped)).toBe(escaped) - } - ) -}) + expect(escapeName(unescaped)).toBe(escaped); + }, + ); +}); describe('unescapeName', () => { it.each(toCheck)( 'should unescape $escaped to $unescaped', ({ unescaped, escaped }) => { - expect(unescapeName(escaped)).toBe(unescaped) - } - ) -}) + expect(unescapeName(escaped)).toBe(unescaped); + }, + ); +}); diff --git a/packages/openapi-ts/src/utils/__tests__/handlebars.spec.ts b/packages/openapi-ts/src/utils/__tests__/handlebars.spec.ts index 789b93330..518f45867 100644 --- a/packages/openapi-ts/src/utils/__tests__/handlebars.spec.ts +++ b/packages/openapi-ts/src/utils/__tests__/handlebars.spec.ts @@ -1,11 +1,11 @@ -import Handlebars from 'handlebars/runtime' -import { describe, expect, it } from 'vitest' +import Handlebars from 'handlebars/runtime'; +import { describe, expect, it } from 'vitest'; -import { setConfig } from '../config' +import { setConfig } from '../config'; import { registerHandlebarHelpers, - registerHandlebarTemplates -} from '../handlebars' + registerHandlebarTemplates, +} from '../handlebars'; describe('registerHandlebarHelpers', () => { it('should register the helpers', () => { @@ -26,16 +26,16 @@ describe('registerHandlebarHelpers', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: false - }) - registerHandlebarHelpers() - const helpers = Object.keys(Handlebars.helpers) - expect(helpers).toContain('camelCase') - expect(helpers).toContain('equals') - expect(helpers).toContain('ifdef') - expect(helpers).toContain('notEquals') - }) -}) + useOptions: false, + }); + registerHandlebarHelpers(); + const helpers = Object.keys(Handlebars.helpers); + expect(helpers).toContain('camelCase'); + expect(helpers).toContain('equals'); + expect(helpers).toContain('ifdef'); + expect(helpers).toContain('notEquals'); + }); +}); describe('registerHandlebarTemplates', () => { it('should return correct templates', () => { @@ -56,13 +56,13 @@ describe('registerHandlebarTemplates', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: false - }) - const templates = registerHandlebarTemplates() - expect(templates.core.settings).toBeDefined() - expect(templates.core.apiError).toBeDefined() - expect(templates.core.apiRequestOptions).toBeDefined() - expect(templates.core.apiResult).toBeDefined() - expect(templates.core.request).toBeDefined() - }) -}) + useOptions: false, + }); + const templates = registerHandlebarTemplates(); + expect(templates.core.settings).toBeDefined(); + expect(templates.core.apiError).toBeDefined(); + expect(templates.core.apiRequestOptions).toBeDefined(); + expect(templates.core.apiResult).toBeDefined(); + expect(templates.core.request).toBeDefined(); + }); +}); diff --git a/packages/openapi-ts/src/utils/__tests__/sort.spec.ts b/packages/openapi-ts/src/utils/__tests__/sort.spec.ts index 8b3a72f9a..7eb64959f 100644 --- a/packages/openapi-ts/src/utils/__tests__/sort.spec.ts +++ b/packages/openapi-ts/src/utils/__tests__/sort.spec.ts @@ -1,21 +1,21 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import type { Model, Service } from '../../openApi' -import { sort, sortByName } from '../sort' +import type { Model, Service } from '../../openApi'; +import { sort, sortByName } from '../sort'; describe('sort', () => { it('should return correct index', () => { - expect(sort('a', 'b')).toEqual(-1) - expect(sort('b', 'a')).toEqual(1) - expect(sort('a', 'a')).toEqual(0) - expect(sort('', '')).toEqual(0) - }) -}) + expect(sort('a', 'b')).toEqual(-1); + expect(sort('b', 'a')).toEqual(1); + expect(sort('a', 'a')).toEqual(0); + expect(sort('', '')).toEqual(0); + }); +}); describe('sortByName', () => { it('should handle empty lists', () => { - expect(sortByName([])).toEqual([]) - }) + expect(sortByName([])).toEqual([]); + }); it('should return sorted list of models', () => { const john: Model = { @@ -34,8 +34,8 @@ describe('sortByName', () => { name: 'John', properties: [], template: null, - type: 'John' - } + type: 'John', + }; const jane: Model = { $refs: [], base: 'Jane', @@ -52,8 +52,8 @@ describe('sortByName', () => { name: 'Jane', properties: [], template: null, - type: 'Jane' - } + type: 'Jane', + }; const doe: Model = { $refs: [], base: 'Doe', @@ -70,38 +70,38 @@ describe('sortByName', () => { name: 'Doe', properties: [], template: null, - type: 'Doe' - } - const models: Model[] = [john, jane, doe] - expect(sortByName(models)).toEqual([doe, jane, john]) - }) + type: 'Doe', + }; + const models: Model[] = [john, jane, doe]; + expect(sortByName(models)).toEqual([doe, jane, john]); + }); it('should return sorted list of services', () => { const john: Service = { $refs: [], imports: [], name: 'John', - operations: [] - } + operations: [], + }; const jane: Service = { $refs: [], imports: [], name: 'Jane', - operations: [] - } + operations: [], + }; const doe: Service = { $refs: [], imports: [], name: 'Doe', - operations: [] - } - const services: Service[] = [john, jane, doe] - expect(sortByName(services)).toEqual([doe, jane, john]) - }) + operations: [], + }; + const services: Service[] = [john, jane, doe]; + expect(sortByName(services)).toEqual([doe, jane, john]); + }); it('should throw errors when trying to sort without a name entry', () => { - const values = ['some', 'string', 'array'] + const values = ['some', 'string', 'array']; // @ts-ignore - expect(() => sortByName(values)).toThrow(TypeError) - }) -}) + expect(() => sortByName(values)).toThrow(TypeError); + }); +}); diff --git a/packages/openapi-ts/src/utils/__tests__/unique.spec.ts b/packages/openapi-ts/src/utils/__tests__/unique.spec.ts index 7fceba30e..7ed3cd6a1 100644 --- a/packages/openapi-ts/src/utils/__tests__/unique.spec.ts +++ b/packages/openapi-ts/src/utils/__tests__/unique.spec.ts @@ -1,6 +1,6 @@ -import { describe, expect, it } from 'vitest' +import { describe, expect, it } from 'vitest'; -import { unique } from '../unique' +import { unique } from '../unique'; describe('unique', () => { it.each([ @@ -8,21 +8,21 @@ describe('unique', () => { { arr: ['a', 'b', 'c'], index: 1, result: false, value: 'a' }, { arr: ['a', 'b', 'c'], index: 2, result: false, value: 'a' }, { arr: ['z', 'a', 'b'], index: 1, result: true, value: 'a' }, - { arr: ['y', 'z', 'a'], index: 2, result: true, value: 'a' } + { arr: ['y', 'z', 'a'], index: 2, result: true, value: 'a' }, ])( 'unique($value, $index, $arr) -> $result', ({ value, index, arr, result }) => { - expect(unique(value, index, arr)).toEqual(result) - } - ) + expect(unique(value, index, arr)).toEqual(result); + }, + ); it.each([ { expected: ['a', 'b', 'c'], input: ['a', 'a', 'b', 'c', 'b', 'b'] }, - { expected: [1, 2, 3, 4, 5, 6], input: [1, 2, 3, 4, 4, 5, 6, 3] } + { expected: [1, 2, 3, 4, 5, 6], input: [1, 2, 3, 4, 4, 5, 6, 3] }, ])( 'should filter: $input to the unique array: $expected', ({ input, expected }) => { - expect(input.filter(unique)).toEqual(expected) - } - ) -}) + expect(input.filter(unique)).toEqual(expected); + }, + ); +}); diff --git a/packages/openapi-ts/src/utils/config.ts b/packages/openapi-ts/src/utils/config.ts index e24966494..e7b0a41dd 100644 --- a/packages/openapi-ts/src/utils/config.ts +++ b/packages/openapi-ts/src/utils/config.ts @@ -1,10 +1,10 @@ -import type { Config } from '../types/config' +import type { Config } from '../types/config'; -let _config: Config +let _config: Config; -export const getConfig = () => _config +export const getConfig = () => _config; export const setConfig = (config: Config) => { - _config = config - return getConfig() -} + _config = config; + return getConfig(); +}; diff --git a/packages/openapi-ts/src/utils/enum.ts b/packages/openapi-ts/src/utils/enum.ts index b10e4c7de..bd80e485f 100644 --- a/packages/openapi-ts/src/utils/enum.ts +++ b/packages/openapi-ts/src/utils/enum.ts @@ -1,7 +1,7 @@ -import type { Enum } from '../openApi' -import type { Client } from '../types/client' -import { unescapeName } from './escape' -import { unique } from './unique' +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. @@ -15,26 +15,26 @@ import { unique } from './unique' */ export const enumKey = (value?: string | number, customName?: string) => { if (customName) { - return customName + return customName; } // prefix numbers with underscore if (typeof value === 'number') { - return `'_${value}'` + return `'_${value}'`; } - let key = '' + 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') + .replace(/(\p{Lowercase})(\p{Uppercase}+)/gu, '$1_$2'); } - key = key.trim() + key = key.trim(); if (!key) { - key = 'empty_string' + key = 'empty_string'; } - return key.toUpperCase() -} + return key.toUpperCase(); +}; /** * Enums can't contain hyphens in their name. Additionally, name might've been @@ -43,29 +43,29 @@ export const enumKey = (value?: string | number, customName?: string) => { */ export const enumName = (client: Client, name?: string) => { if (!name) { - return null + 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` + ($0, $1: string) => $1.toLocaleUpperCase(), + ); + const result = `${escapedName.charAt(0).toLocaleUpperCase() + escapedName.slice(1)}Enum`; if (client.enumNames.includes(result)) { - return null + return null; } - client.enumNames = [...client.enumNames, result] - return result -} + client.enumNames = [...client.enumNames, result]; + return result; +}; export const enumUnionType = (enums: Enum[]) => enums - .map(enumerator => enumValue(enumerator.value)) + .map((enumerator) => enumValue(enumerator.value)) .filter(unique) - .join(' | ') + .join(' | '); export const enumValue = (value?: string | number) => { if (typeof value === 'string') { - return `'${value.replace(/'/g, "\\'")}'` + return `'${value.replace(/'/g, "\\'")}'`; } - return value -} + return value; +}; diff --git a/packages/openapi-ts/src/utils/escape.ts b/packages/openapi-ts/src/utils/escape.ts index 6aafc3279..1e72f76a2 100644 --- a/packages/openapi-ts/src/utils/escape.ts +++ b/packages/openapi-ts/src/utils/escape.ts @@ -1,28 +1,28 @@ -import { EOL } from 'os' +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 + /^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u; export const escapeName = (value: string): string => { if (value || value === '') { - const validName = validTypescriptIdentifierRegex.test(value) + const validName = validTypescriptIdentifierRegex.test(value); if (!validName) { - return `'${value}'` + return `'${value}'`; } } - 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.slice(1, value.length - 1); } - return value -} + return value; +}; export const escapeComment = (value: string, insertAsterisk = true) => value @@ -30,10 +30,10 @@ export const escapeComment = (value: string, insertAsterisk = true) => .replace(/\/\*/g, '*') .replace(/\r?\n(.*)/g, (_, w) => { if (insertAsterisk) { - return `${EOL} * ${w.trim()}` + return `${EOL} * ${w.trim()}`; } - return EOL + w.trim() - }) + return EOL + w.trim(); + }); export const escapeDescription = (value: string) => - value.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\${/g, '\\${') + value.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\${/g, '\\${'); diff --git a/packages/openapi-ts/src/utils/getHttpRequestName.ts b/packages/openapi-ts/src/utils/getHttpRequestName.ts index f10ef6ad7..680a64a47 100644 --- a/packages/openapi-ts/src/utils/getHttpRequestName.ts +++ b/packages/openapi-ts/src/utils/getHttpRequestName.ts @@ -1,4 +1,4 @@ -import type { Config } from '../types/config' +import type { Config } from '../types/config'; /** * Generate the HttpRequest filename based on the selected client @@ -7,14 +7,14 @@ import type { Config } from '../types/config' export const getHttpRequestName = (client: Config['client']): string => { switch (client) { case 'angular': - return 'AngularHttpRequest' + return 'AngularHttpRequest'; case 'axios': - return 'AxiosHttpRequest' + return 'AxiosHttpRequest'; case 'fetch': - return 'FetchHttpRequest' + return 'FetchHttpRequest'; case 'node': - return 'NodeHttpRequest' + return 'NodeHttpRequest'; case 'xhr': - return 'XHRHttpRequest' + return 'XHRHttpRequest'; } -} +}; diff --git a/packages/openapi-ts/src/utils/getOpenApiSpec.ts b/packages/openapi-ts/src/utils/getOpenApiSpec.ts index b03d6dc9c..099ad67bc 100644 --- a/packages/openapi-ts/src/utils/getOpenApiSpec.ts +++ b/packages/openapi-ts/src/utils/getOpenApiSpec.ts @@ -1,9 +1,9 @@ -import { existsSync } from 'node:fs' -import path from 'node:path' +import { existsSync } from 'node:fs'; +import path from 'node:path'; -import $RefParser from '@apidevtools/json-schema-ref-parser' +import $RefParser from '@apidevtools/json-schema-ref-parser'; -import type { OpenApi } from '../openApi' +import type { OpenApi } from '../openApi'; /** * Load and parse te open api spec. If the file extension is ".yml" or ".yaml" @@ -14,11 +14,11 @@ import type { OpenApi } from '../openApi' export const getOpenApiSpec = async (location: string) => { const absolutePathOrUrl = existsSync(location) ? path.resolve(location) - : location + : location; const schema = (await $RefParser.bundle( absolutePathOrUrl, absolutePathOrUrl, - {} - )) as OpenApi - return schema -} + {}, + )) as OpenApi; + return schema; +}; diff --git a/packages/openapi-ts/src/utils/handlebars.ts b/packages/openapi-ts/src/utils/handlebars.ts index c084dd712..e7953e282 100644 --- a/packages/openapi-ts/src/utils/handlebars.ts +++ b/packages/openapi-ts/src/utils/handlebars.ts @@ -1,53 +1,53 @@ -import camelCase from 'camelcase' -import Handlebars from 'handlebars/runtime' +import camelCase from 'camelcase'; +import Handlebars from 'handlebars/runtime'; -import templateClient from '../templates/client.hbs' -import angularGetHeaders from '../templates/core/angular/getHeaders.hbs' -import angularGetRequestBody from '../templates/core/angular/getRequestBody.hbs' -import angularGetResponseBody from '../templates/core/angular/getResponseBody.hbs' -import angularGetResponseHeader from '../templates/core/angular/getResponseHeader.hbs' -import angularRequest from '../templates/core/angular/request.hbs' -import angularSendRequest from '../templates/core/angular/sendRequest.hbs' -import templateCoreApiError from '../templates/core/ApiError.hbs' -import templateCoreApiRequestOptions from '../templates/core/ApiRequestOptions.hbs' -import templateCoreApiResult from '../templates/core/ApiResult.hbs' -import axiosGetHeaders from '../templates/core/axios/getHeaders.hbs' -import axiosGetRequestBody from '../templates/core/axios/getRequestBody.hbs' -import axiosGetResponseBody from '../templates/core/axios/getResponseBody.hbs' -import axiosGetResponseHeader from '../templates/core/axios/getResponseHeader.hbs' -import axiosRequest from '../templates/core/axios/request.hbs' -import axiosSendRequest from '../templates/core/axios/sendRequest.hbs' -import templateCoreBaseHttpRequest from '../templates/core/BaseHttpRequest.hbs' -import templateCancelablePromise from '../templates/core/CancelablePromise.hbs' -import fetchGetHeaders from '../templates/core/fetch/getHeaders.hbs' -import fetchGetRequestBody from '../templates/core/fetch/getRequestBody.hbs' -import fetchGetResponseBody from '../templates/core/fetch/getResponseBody.hbs' -import fetchGetResponseHeader from '../templates/core/fetch/getResponseHeader.hbs' -import fetchRequest from '../templates/core/fetch/request.hbs' -import fetchSendRequest from '../templates/core/fetch/sendRequest.hbs' -import functionBase64 from '../templates/core/functions/base64.hbs' -import functionCatchErrorCodes from '../templates/core/functions/catchErrorCodes.hbs' -import functionGetFormData from '../templates/core/functions/getFormData.hbs' -import functionGetQueryString from '../templates/core/functions/getQueryString.hbs' -import functionGetUrl from '../templates/core/functions/getUrl.hbs' -import functionIsBlob from '../templates/core/functions/isBlob.hbs' -import functionIsFormData from '../templates/core/functions/isFormData.hbs' -import functionIsString from '../templates/core/functions/isString.hbs' -import functionIsStringWithValue from '../templates/core/functions/isStringWithValue.hbs' -import functionIsSuccess from '../templates/core/functions/isSuccess.hbs' -import functionResolve from '../templates/core/functions/resolve.hbs' -import templateCoreHttpRequest from '../templates/core/HttpRequest.hbs' -import templateCoreSettings from '../templates/core/OpenAPI.hbs' -import templateCoreRequest from '../templates/core/request.hbs' -import xhrGetHeaders from '../templates/core/xhr/getHeaders.hbs' -import xhrGetRequestBody from '../templates/core/xhr/getRequestBody.hbs' -import xhrGetResponseBody from '../templates/core/xhr/getResponseBody.hbs' -import xhrGetResponseHeader from '../templates/core/xhr/getResponseHeader.hbs' -import xhrRequest from '../templates/core/xhr/request.hbs' -import xhrSendRequest from '../templates/core/xhr/sendRequest.hbs' +import templateClient from '../templates/client.hbs'; +import angularGetHeaders from '../templates/core/angular/getHeaders.hbs'; +import angularGetRequestBody from '../templates/core/angular/getRequestBody.hbs'; +import angularGetResponseBody from '../templates/core/angular/getResponseBody.hbs'; +import angularGetResponseHeader from '../templates/core/angular/getResponseHeader.hbs'; +import angularRequest from '../templates/core/angular/request.hbs'; +import angularSendRequest from '../templates/core/angular/sendRequest.hbs'; +import templateCoreApiError from '../templates/core/ApiError.hbs'; +import templateCoreApiRequestOptions from '../templates/core/ApiRequestOptions.hbs'; +import templateCoreApiResult from '../templates/core/ApiResult.hbs'; +import axiosGetHeaders from '../templates/core/axios/getHeaders.hbs'; +import axiosGetRequestBody from '../templates/core/axios/getRequestBody.hbs'; +import axiosGetResponseBody from '../templates/core/axios/getResponseBody.hbs'; +import axiosGetResponseHeader from '../templates/core/axios/getResponseHeader.hbs'; +import axiosRequest from '../templates/core/axios/request.hbs'; +import axiosSendRequest from '../templates/core/axios/sendRequest.hbs'; +import templateCoreBaseHttpRequest from '../templates/core/BaseHttpRequest.hbs'; +import templateCancelablePromise from '../templates/core/CancelablePromise.hbs'; +import fetchGetHeaders from '../templates/core/fetch/getHeaders.hbs'; +import fetchGetRequestBody from '../templates/core/fetch/getRequestBody.hbs'; +import fetchGetResponseBody from '../templates/core/fetch/getResponseBody.hbs'; +import fetchGetResponseHeader from '../templates/core/fetch/getResponseHeader.hbs'; +import fetchRequest from '../templates/core/fetch/request.hbs'; +import fetchSendRequest from '../templates/core/fetch/sendRequest.hbs'; +import functionBase64 from '../templates/core/functions/base64.hbs'; +import functionCatchErrorCodes from '../templates/core/functions/catchErrorCodes.hbs'; +import functionGetFormData from '../templates/core/functions/getFormData.hbs'; +import functionGetQueryString from '../templates/core/functions/getQueryString.hbs'; +import functionGetUrl from '../templates/core/functions/getUrl.hbs'; +import functionIsBlob from '../templates/core/functions/isBlob.hbs'; +import functionIsFormData from '../templates/core/functions/isFormData.hbs'; +import functionIsString from '../templates/core/functions/isString.hbs'; +import functionIsStringWithValue from '../templates/core/functions/isStringWithValue.hbs'; +import functionIsSuccess from '../templates/core/functions/isSuccess.hbs'; +import functionResolve from '../templates/core/functions/resolve.hbs'; +import templateCoreHttpRequest from '../templates/core/HttpRequest.hbs'; +import templateCoreSettings from '../templates/core/OpenAPI.hbs'; +import templateCoreRequest from '../templates/core/request.hbs'; +import xhrGetHeaders from '../templates/core/xhr/getHeaders.hbs'; +import xhrGetRequestBody from '../templates/core/xhr/getRequestBody.hbs'; +import xhrGetResponseBody from '../templates/core/xhr/getResponseBody.hbs'; +import xhrGetResponseHeader from '../templates/core/xhr/getResponseHeader.hbs'; +import xhrRequest from '../templates/core/xhr/request.hbs'; +import xhrSendRequest from '../templates/core/xhr/sendRequest.hbs'; export const registerHandlebarHelpers = (): void => { - Handlebars.registerHelper('camelCase', camelCase) + Handlebars.registerHelper('camelCase', camelCase); Handlebars.registerHelper( 'equals', @@ -55,19 +55,19 @@ export const registerHandlebarHelpers = (): void => { this: unknown, a: string, b: string, - options: Handlebars.HelperOptions + options: Handlebars.HelperOptions, ) { - return a === b ? options.fn(this) : options.inverse(this) - } - ) + return a === b ? options.fn(this) : options.inverse(this); + }, + ); Handlebars.registerHelper('ifdef', function (this: unknown, ...args): string { - const options = args.pop() - if (!args.every(value => !value)) { - return options.fn(this) + const options = args.pop(); + if (!args.every((value) => !value)) { + return options.fn(this); } - return options.inverse(this) - }) + return options.inverse(this); + }); Handlebars.registerHelper( 'notEquals', @@ -75,25 +75,25 @@ export const registerHandlebarHelpers = (): void => { this: unknown, a: string, b: string, - options: Handlebars.HelperOptions + options: Handlebars.HelperOptions, ) { - return a !== b ? options.fn(this) : options.inverse(this) - } - ) -} + return a !== b ? options.fn(this) : options.inverse(this); + }, + ); +}; export interface Templates { - client: Handlebars.TemplateDelegate + client: Handlebars.TemplateDelegate; core: { - apiError: Handlebars.TemplateDelegate - apiRequestOptions: Handlebars.TemplateDelegate - apiResult: Handlebars.TemplateDelegate - baseHttpRequest: Handlebars.TemplateDelegate - cancelablePromise: Handlebars.TemplateDelegate - httpRequest: Handlebars.TemplateDelegate - request: Handlebars.TemplateDelegate - settings: Handlebars.TemplateDelegate - } + apiError: Handlebars.TemplateDelegate; + apiRequestOptions: Handlebars.TemplateDelegate; + apiResult: Handlebars.TemplateDelegate; + baseHttpRequest: Handlebars.TemplateDelegate; + cancelablePromise: Handlebars.TemplateDelegate; + httpRequest: Handlebars.TemplateDelegate; + request: Handlebars.TemplateDelegate; + settings: Handlebars.TemplateDelegate; + }; } /** @@ -101,7 +101,7 @@ export interface Templates { * so we can easily access the templates in our generator/write functions. */ export const registerHandlebarTemplates = (): Templates => { - registerHandlebarHelpers() + registerHandlebarHelpers(); // Main templates (entry points for the files we write to disk) const templates: Templates = { @@ -114,150 +114,156 @@ export const registerHandlebarTemplates = (): Templates => { cancelablePromise: Handlebars.template(templateCancelablePromise), httpRequest: Handlebars.template(templateCoreHttpRequest), request: Handlebars.template(templateCoreRequest), - settings: Handlebars.template(templateCoreSettings) - } - } + settings: Handlebars.template(templateCoreSettings), + }, + }; // Generic functions used in 'request' file @see src/templates/core/request.hbs for more info Handlebars.registerPartial( 'functions/base64', - Handlebars.template(functionBase64) - ) + Handlebars.template(functionBase64), + ); Handlebars.registerPartial( 'functions/catchErrorCodes', - Handlebars.template(functionCatchErrorCodes) - ) + Handlebars.template(functionCatchErrorCodes), + ); Handlebars.registerPartial( 'functions/getFormData', - Handlebars.template(functionGetFormData) - ) + Handlebars.template(functionGetFormData), + ); Handlebars.registerPartial( 'functions/getQueryString', - Handlebars.template(functionGetQueryString) - ) + Handlebars.template(functionGetQueryString), + ); Handlebars.registerPartial( 'functions/getUrl', - Handlebars.template(functionGetUrl) - ) + Handlebars.template(functionGetUrl), + ); Handlebars.registerPartial( 'functions/isBlob', - Handlebars.template(functionIsBlob) - ) + Handlebars.template(functionIsBlob), + ); Handlebars.registerPartial( 'functions/isFormData', - Handlebars.template(functionIsFormData) - ) + Handlebars.template(functionIsFormData), + ); Handlebars.registerPartial( 'functions/isString', - Handlebars.template(functionIsString) - ) + Handlebars.template(functionIsString), + ); Handlebars.registerPartial( 'functions/isStringWithValue', - Handlebars.template(functionIsStringWithValue) - ) + Handlebars.template(functionIsStringWithValue), + ); Handlebars.registerPartial( 'functions/isSuccess', - Handlebars.template(functionIsSuccess) - ) + Handlebars.template(functionIsSuccess), + ); Handlebars.registerPartial( 'functions/resolve', - Handlebars.template(functionResolve) - ) + Handlebars.template(functionResolve), + ); // Specific files for the fetch client implementation Handlebars.registerPartial( 'fetch/getHeaders', - Handlebars.template(fetchGetHeaders) - ) + Handlebars.template(fetchGetHeaders), + ); Handlebars.registerPartial( 'fetch/getRequestBody', - Handlebars.template(fetchGetRequestBody) - ) + Handlebars.template(fetchGetRequestBody), + ); Handlebars.registerPartial( 'fetch/getResponseBody', - Handlebars.template(fetchGetResponseBody) - ) + Handlebars.template(fetchGetResponseBody), + ); Handlebars.registerPartial( 'fetch/getResponseHeader', - Handlebars.template(fetchGetResponseHeader) - ) - Handlebars.registerPartial('fetch/request', Handlebars.template(fetchRequest)) + Handlebars.template(fetchGetResponseHeader), + ); + Handlebars.registerPartial( + 'fetch/request', + Handlebars.template(fetchRequest), + ); Handlebars.registerPartial( 'fetch/sendRequest', - Handlebars.template(fetchSendRequest) - ) + Handlebars.template(fetchSendRequest), + ); // Specific files for the xhr client implementation Handlebars.registerPartial( 'xhr/getHeaders', - Handlebars.template(xhrGetHeaders) - ) + Handlebars.template(xhrGetHeaders), + ); Handlebars.registerPartial( 'xhr/getRequestBody', - Handlebars.template(xhrGetRequestBody) - ) + Handlebars.template(xhrGetRequestBody), + ); Handlebars.registerPartial( 'xhr/getResponseBody', - Handlebars.template(xhrGetResponseBody) - ) + Handlebars.template(xhrGetResponseBody), + ); Handlebars.registerPartial( 'xhr/getResponseHeader', - Handlebars.template(xhrGetResponseHeader) - ) - Handlebars.registerPartial('xhr/request', Handlebars.template(xhrRequest)) + Handlebars.template(xhrGetResponseHeader), + ); + Handlebars.registerPartial('xhr/request', Handlebars.template(xhrRequest)); Handlebars.registerPartial( 'xhr/sendRequest', - Handlebars.template(xhrSendRequest) - ) + Handlebars.template(xhrSendRequest), + ); // Specific files for the axios client implementation Handlebars.registerPartial( 'axios/getHeaders', - Handlebars.template(axiosGetHeaders) - ) + Handlebars.template(axiosGetHeaders), + ); Handlebars.registerPartial( 'axios/getRequestBody', - Handlebars.template(axiosGetRequestBody) - ) + Handlebars.template(axiosGetRequestBody), + ); Handlebars.registerPartial( 'axios/getResponseBody', - Handlebars.template(axiosGetResponseBody) - ) + Handlebars.template(axiosGetResponseBody), + ); Handlebars.registerPartial( 'axios/getResponseHeader', - Handlebars.template(axiosGetResponseHeader) - ) - Handlebars.registerPartial('axios/request', Handlebars.template(axiosRequest)) + Handlebars.template(axiosGetResponseHeader), + ); + Handlebars.registerPartial( + 'axios/request', + Handlebars.template(axiosRequest), + ); Handlebars.registerPartial( 'axios/sendRequest', - Handlebars.template(axiosSendRequest) - ) + Handlebars.template(axiosSendRequest), + ); // Specific files for the angular client implementation Handlebars.registerPartial( 'angular/getHeaders', - Handlebars.template(angularGetHeaders) - ) + Handlebars.template(angularGetHeaders), + ); Handlebars.registerPartial( 'angular/getRequestBody', - Handlebars.template(angularGetRequestBody) - ) + Handlebars.template(angularGetRequestBody), + ); Handlebars.registerPartial( 'angular/getResponseBody', - Handlebars.template(angularGetResponseBody) - ) + Handlebars.template(angularGetResponseBody), + ); Handlebars.registerPartial( 'angular/getResponseHeader', - Handlebars.template(angularGetResponseHeader) - ) + Handlebars.template(angularGetResponseHeader), + ); Handlebars.registerPartial( 'angular/request', - Handlebars.template(angularRequest) - ) + Handlebars.template(angularRequest), + ); Handlebars.registerPartial( 'angular/sendRequest', - Handlebars.template(angularSendRequest) - ) + Handlebars.template(angularSendRequest), + ); - return templates -} + return templates; +}; diff --git a/packages/openapi-ts/src/utils/postprocess.ts b/packages/openapi-ts/src/utils/postprocess.ts index 208a0db54..919bbccc2 100644 --- a/packages/openapi-ts/src/utils/postprocess.ts +++ b/packages/openapi-ts/src/utils/postprocess.ts @@ -1,7 +1,7 @@ -import type { Enum, Model, Operation, Service } from '../openApi' -import type { Client } from '../types/client' -import { sort } from './sort' -import { unique } from './unique' +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 @@ -11,9 +11,9 @@ export function postProcessClient(client: Client): Client { return { ...client, enumNames: [], - models: client.models.map(model => postProcessModel(model)), - services: client.services.map(service => postProcessService(service)) - } + models: client.models.map((model) => postProcessModel(model)), + services: client.services.map((service) => postProcessService(service)), + }; } /** @@ -26,8 +26,8 @@ export function postProcessModel(model: Model): Model { ...model, enum: postProcessModelEnum(model), enums: postProcessModelEnums(model), - imports: postProcessModelImports(model) - } + imports: postProcessModelImports(model), + }; } /** @@ -37,8 +37,8 @@ export function postProcessModel(model: Model): Model { export function postProcessModelEnum(model: Model): Enum[] { return model.enum.filter( (property, index, arr) => - arr.findIndex(item => item.value === property.value) === index - ) + arr.findIndex((item) => item.value === property.value) === index, + ); } /** @@ -48,8 +48,8 @@ export function postProcessModelEnum(model: Model): Enum[] { export function postProcessModelEnums(model: Model): Model[] { return model.enums.filter( (property, index, arr) => - arr.findIndex(item => item.name === property.name) === index - ) + arr.findIndex((item) => item.name === property.name) === index, + ); } /** @@ -60,17 +60,17 @@ export function postProcessModelImports(model: Model): string[] { return model.imports .filter(unique) .sort(sort) - .filter(name => model.name !== name) + .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 + const clone = { ...service }; + clone.operations = postProcessServiceOperations(clone); + clone.operations.forEach((operation) => { + clone.imports.push(...operation.imports); + }); + clone.imports = postProcessServiceImports(clone); + return clone; } /** @@ -78,30 +78,30 @@ export function postProcessService(service: Service): Service { * @param service */ export function postProcessServiceImports(service: Service): string[] { - return service.imports.filter(unique).sort(sort) + return service.imports.filter(unique).sort(sort); } export function postProcessServiceOperations(service: Service): Operation[] { - const names = new Map() + const names = new Map(); - return service.operations.map(operation => { - const clone = { ...operation } + 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)) + ...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 + const name = clone.name; + const index = names.get(name) || 0; if (index > 0) { - clone.name = `${name}${index}` + clone.name = `${name}${index}`; } - names.set(name, index + 1) + names.set(name, index + 1); - return clone - }) + return clone; + }); } diff --git a/packages/openapi-ts/src/utils/required.ts b/packages/openapi-ts/src/utils/required.ts index 8561d401b..6b4a983f5 100644 --- a/packages/openapi-ts/src/utils/required.ts +++ b/packages/openapi-ts/src/utils/required.ts @@ -1,19 +1,19 @@ -import { Model, OperationParameter } from '../openApi' -import { getConfig } from './config' +import { Model, OperationParameter } from '../openApi'; +import { getConfig } from './config'; export const getDefaultPrintable = ( - p: OperationParameter | Model + p: OperationParameter | Model, ): string | undefined => { if (p.default === undefined) { - return undefined + return undefined; } - return JSON.stringify(p.default, null, 4) -} + return JSON.stringify(p.default, null, 4); +}; export const modelIsRequired = (model: Model) => { - const config = getConfig() + const config = getConfig(); if (config?.useOptions) { - return model.isRequired ? '' : '?' + return model.isRequired ? '' : '?'; } - return !model.isRequired && !getDefaultPrintable(model) ? '?' : '' -} + return !model.isRequired && !getDefaultPrintable(model) ? '?' : ''; +}; diff --git a/packages/openapi-ts/src/utils/sort.ts b/packages/openapi-ts/src/utils/sort.ts index 55fadda08..51a13b18f 100644 --- a/packages/openapi-ts/src/utils/sort.ts +++ b/packages/openapi-ts/src/utils/sort.ts @@ -1,9 +1,9 @@ export function sort(a: string, b: string): number { - const nameA = a.toLocaleLowerCase() - const nameB = b.toLocaleLowerCase() - return nameA.localeCompare(nameB, 'en') + const nameA = a.toLocaleLowerCase(); + const nameB = b.toLocaleLowerCase(); + return nameA.localeCompare(nameB, 'en'); } export function sortByName(items: T[]): T[] { - return items.sort((a, b) => sort(a.name, b.name)) + return items.sort((a, b) => sort(a.name, b.name)); } diff --git a/packages/openapi-ts/src/utils/transform.ts b/packages/openapi-ts/src/utils/transform.ts index 258b83ce8..8659ecbcc 100644 --- a/packages/openapi-ts/src/utils/transform.ts +++ b/packages/openapi-ts/src/utils/transform.ts @@ -3,9 +3,9 @@ import camelcase from 'camelcase'; import { getConfig } from './config'; export const transformName = (name: string) => { - const config = getConfig(); - if (config.types.name === 'PascalCase') { - return camelcase(name, { pascalCase: true }); - } - return name; + const config = getConfig(); + if (config.types.name === 'PascalCase') { + return camelcase(name, { pascalCase: true }); + } + return name; }; diff --git a/packages/openapi-ts/src/utils/unique.ts b/packages/openapi-ts/src/utils/unique.ts index 0c8155f87..2e02e59ee 100644 --- a/packages/openapi-ts/src/utils/unique.ts +++ b/packages/openapi-ts/src/utils/unique.ts @@ -1,3 +1,3 @@ export function unique(value: T, index: number, arr: T[]): boolean { - return arr.indexOf(value) === index + return arr.indexOf(value) === index; } diff --git a/packages/openapi-ts/src/utils/write/__tests__/class.spec.ts b/packages/openapi-ts/src/utils/write/__tests__/class.spec.ts index 91e44d9cc..e1bbd6311 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/class.spec.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/class.spec.ts @@ -1,13 +1,13 @@ -import { writeFileSync } from 'node:fs' +import { writeFileSync } from 'node:fs'; -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, it, vi } from 'vitest'; -import { setConfig } from '../../config' -import { writeClientClass } from '../class' -import { mockTemplates } from './mocks' -import { openApi } from './models' +import { setConfig } from '../../config'; +import { writeClientClass } from '../class'; +import { mockTemplates } from './mocks'; +import { openApi } from './models'; -vi.mock('node:fs') +vi.mock('node:fs'); describe('writeClientClass', () => { it('writes to filesystem', async () => { @@ -29,19 +29,19 @@ describe('writeClientClass', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); const client: Parameters[2] = { enumNames: [], models: [], server: 'http://localhost:8080', services: [], - version: 'v1' - } + version: 'v1', + }; - await writeClientClass(openApi, './dist', client, mockTemplates) + await writeClientClass(openApi, './dist', client, mockTemplates); - expect(writeFileSync).toHaveBeenCalled() - }) -}) + expect(writeFileSync).toHaveBeenCalled(); + }); +}); diff --git a/packages/openapi-ts/src/utils/write/__tests__/client.spec.ts b/packages/openapi-ts/src/utils/write/__tests__/client.spec.ts index 82705abef..33cb0d5f7 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/client.spec.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/client.spec.ts @@ -1,13 +1,13 @@ -import { mkdirSync, rmSync, writeFileSync } from 'node:fs' +import { mkdirSync, rmSync, writeFileSync } from 'node:fs'; -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, it, vi } from 'vitest'; -import { setConfig } from '../../config' -import { writeClient } from '../client' -import { mockTemplates } from './mocks' -import { openApi } from './models' +import { setConfig } from '../../config'; +import { writeClient } from '../client'; +import { mockTemplates } from './mocks'; +import { openApi } from './models'; -vi.mock('node:fs') +vi.mock('node:fs'); describe('writeClient', () => { it('writes to filesystem', async () => { @@ -28,21 +28,21 @@ describe('writeClient', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: false - }) + useOptions: false, + }); const client: Parameters[1] = { enumNames: [], models: [], server: 'http://localhost:8080', services: [], - version: 'v1' - } + version: 'v1', + }; - await writeClient(openApi, client, mockTemplates) + await writeClient(openApi, client, mockTemplates); - expect(rmSync).toHaveBeenCalled() - expect(mkdirSync).toHaveBeenCalled() - expect(writeFileSync).toHaveBeenCalled() - }) -}) + expect(rmSync).toHaveBeenCalled(); + expect(mkdirSync).toHaveBeenCalled(); + expect(writeFileSync).toHaveBeenCalled(); + }); +}); diff --git a/packages/openapi-ts/src/utils/write/__tests__/core.spec.ts b/packages/openapi-ts/src/utils/write/__tests__/core.spec.ts index d67e3c45d..d70571428 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/core.spec.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/core.spec.ts @@ -1,20 +1,20 @@ -import { writeFileSync } from 'node:fs' -import path from 'node:path' +import { writeFileSync } from 'node:fs'; +import path from 'node:path'; -import { beforeEach, describe, expect, it, vi } from 'vitest' +import { beforeEach, describe, expect, it, vi } from 'vitest'; -import { setConfig } from '../../config' -import { writeCore } from '../core' -import { mockTemplates } from './mocks' -import { openApi } from './models' +import { setConfig } from '../../config'; +import { writeCore } from '../core'; +import { mockTemplates } from './mocks'; +import { openApi } from './models'; -vi.mock('node:fs') +vi.mock('node:fs'); describe('writeCore', () => { - let templates: Parameters[3] + let templates: Parameters[3]; beforeEach(() => { - templates = mockTemplates - }) + templates = mockTemplates; + }); it('writes to filesystem', async () => { const client: Parameters[2] = { @@ -22,8 +22,8 @@ describe('writeCore', () => { models: [], server: 'http://localhost:8080', services: [], - version: '1.0' - } + version: '1.0', + }; setConfig({ client: 'fetch', @@ -43,36 +43,36 @@ describe('writeCore', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); - await writeCore(openApi, '/', client, templates) + await writeCore(openApi, '/', client, templates); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/', '/OpenAPI.ts'), - 'settings' - ) + 'settings', + ); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/', '/ApiError.ts'), - 'apiError' - ) + 'apiError', + ); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/', '/ApiRequestOptions.ts'), - 'apiRequestOptions' - ) + 'apiRequestOptions', + ); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/', '/ApiResult.ts'), - 'apiResult' - ) + 'apiResult', + ); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/', '/CancelablePromise.ts'), - 'cancelablePromise' - ) + 'cancelablePromise', + ); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/', '/request.ts'), - 'request' - ) - }) + 'request', + ); + }); it('uses client server value for base', async () => { const client: Parameters[2] = { @@ -80,8 +80,8 @@ describe('writeCore', () => { models: [], server: 'http://localhost:8080', services: [], - version: '1.0' - } + version: '1.0', + }; const config = setConfig({ client: 'fetch', @@ -101,18 +101,18 @@ describe('writeCore', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); - await writeCore(openApi, '/', client, templates) + await writeCore(openApi, '/', client, templates); expect(templates.core.settings).toHaveBeenCalledWith({ $config: config, httpRequest: 'FetchHttpRequest', server: 'http://localhost:8080', - version: '1.0' - }) - }) + version: '1.0', + }); + }); it('uses custom value for base', async () => { const client: Parameters[2] = { @@ -120,8 +120,8 @@ describe('writeCore', () => { models: [], server: 'http://localhost:8080', services: [], - version: '1.0' - } + version: '1.0', + }; const config = setConfig({ base: 'foo', @@ -142,16 +142,16 @@ describe('writeCore', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); - await writeCore(openApi, '/', client, templates) + await writeCore(openApi, '/', client, templates); expect(templates.core.settings).toHaveBeenCalledWith({ $config: config, httpRequest: 'FetchHttpRequest', server: 'foo', - version: '1.0' - }) - }) -}) + version: '1.0', + }); + }); +}); diff --git a/packages/openapi-ts/src/utils/write/__tests__/index.spec.ts b/packages/openapi-ts/src/utils/write/__tests__/index.spec.ts index 2fcd2977d..4b3cea174 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/index.spec.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/index.spec.ts @@ -1,13 +1,13 @@ -import { writeFileSync } from 'node:fs' -import path from 'node:path' +import { writeFileSync } from 'node:fs'; +import path from 'node:path'; -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, it, vi } from 'vitest'; -import { TypeScriptFile } from '../../../compiler' -import { setConfig } from '../../config' -import { processIndex } from '../index' +import { TypeScriptFile } from '../../../compiler'; +import { setConfig } from '../../config'; +import { processIndex } from '../index'; -vi.mock('node:fs') +vi.mock('node:fs'); describe('processIndex', () => { it('writes to filesystem', async () => { @@ -28,39 +28,39 @@ describe('processIndex', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); const files: Parameters[0]['files'] = { enums: new TypeScriptFile({ dir: '/', - name: 'enums.ts' + name: 'enums.ts', }), index: new TypeScriptFile({ dir: '/', - name: 'index.ts' + name: 'index.ts', }), schemas: new TypeScriptFile({ dir: '/', - name: 'schemas.ts' + name: 'schemas.ts', }), services: new TypeScriptFile({ dir: '/', - name: 'services.ts' + name: 'services.ts', }), types: new TypeScriptFile({ dir: '/', - name: 'models.ts' - }) - } + name: 'models.ts', + }), + }; - await processIndex({ files }) + await processIndex({ files }); - files.index.write() + files.index.write(); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/', '/index.ts'), - expect.anything() - ) - }) -}) + expect.anything(), + ); + }); +}); diff --git a/packages/openapi-ts/src/utils/write/__tests__/mocks.ts b/packages/openapi-ts/src/utils/write/__tests__/mocks.ts index 828b9c7b8..e363dc95d 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/mocks.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/mocks.ts @@ -1,6 +1,6 @@ -import { vi } from 'vitest' +import { vi } from 'vitest'; -import type { Templates } from '../../handlebars' +import type { Templates } from '../../handlebars'; export const mockTemplates: Templates = { client: vi.fn().mockReturnValue('client'), @@ -12,6 +12,6 @@ export const mockTemplates: Templates = { cancelablePromise: vi.fn().mockReturnValue('cancelablePromise'), httpRequest: vi.fn().mockReturnValue('httpRequest'), request: vi.fn().mockReturnValue('request'), - settings: vi.fn().mockReturnValue('settings') - } -} + settings: vi.fn().mockReturnValue('settings'), + }, +}; diff --git a/packages/openapi-ts/src/utils/write/__tests__/models.spec.ts b/packages/openapi-ts/src/utils/write/__tests__/models.spec.ts index e6a065a38..790a0e093 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/models.spec.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/models.spec.ts @@ -1,13 +1,13 @@ -import { writeFileSync } from 'node:fs' -import path from 'node:path' +import { writeFileSync } from 'node:fs'; +import path from 'node:path'; -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, it, vi } from 'vitest'; -import { TypeScriptFile } from '../../../compiler' -import { setConfig } from '../../config' -import { processTypesAndEnums } from '../models' +import { TypeScriptFile } from '../../../compiler'; +import { setConfig } from '../../config'; +import { processTypesAndEnums } from '../models'; -vi.mock('node:fs') +vi.mock('node:fs'); describe('processTypesAndEnums', () => { it('writes to filesystem', async () => { @@ -29,8 +29,8 @@ describe('processTypesAndEnums', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); const client: Parameters[0]['client'] = { enumNames: [], @@ -51,36 +51,36 @@ describe('processTypesAndEnums', () => { name: 'User', properties: [], template: null, - type: 'User' - } + type: 'User', + }, ], server: 'http://localhost:8080', services: [], - version: 'v1' - } + version: 'v1', + }; const files = { enums: new TypeScriptFile({ dir: '/', - name: 'enums.ts' + name: 'enums.ts', }), types: new TypeScriptFile({ dir: '/', - name: 'models.ts' - }) - } + name: 'models.ts', + }), + }; await processTypesAndEnums({ client, - files - }) + files, + }); - files.enums.write() - files.types.write() + files.enums.write(); + files.types.write(); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/models.gen.ts'), - expect.anything() - ) - }) -}) + expect.anything(), + ); + }); +}); diff --git a/packages/openapi-ts/src/utils/write/__tests__/models.ts b/packages/openapi-ts/src/utils/write/__tests__/models.ts index c8ed81e8c..068f916d6 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/models.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/models.ts @@ -1,11 +1,11 @@ -import type { OpenApi } from '../../../openApi' +import type { OpenApi } from '../../../openApi'; export const openApi: OpenApi = { info: { title: '', - version: '' + version: '', }, openapi: '', paths: {}, - swagger: '' -} + swagger: '', +}; diff --git a/packages/openapi-ts/src/utils/write/__tests__/schemas.spec.ts b/packages/openapi-ts/src/utils/write/__tests__/schemas.spec.ts index d0dbe2ad0..625386a9c 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/schemas.spec.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/schemas.spec.ts @@ -1,14 +1,14 @@ -import { writeFileSync } from 'node:fs' -import path from 'node:path' +import { writeFileSync } from 'node:fs'; +import path from 'node:path'; -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, it, vi } from 'vitest'; -import { TypeScriptFile } from '../../../compiler' -import { setConfig } from '../../config' -import { processSchemas } from '../schemas' -import { openApi } from './models' +import { TypeScriptFile } from '../../../compiler'; +import { setConfig } from '../../config'; +import { processSchemas } from '../schemas'; +import { openApi } from './models'; -vi.mock('node:fs') +vi.mock('node:fs'); describe('processSchemas', () => { it('writes to filesystem', async () => { @@ -30,31 +30,31 @@ describe('processSchemas', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: true - }) + useOptions: true, + }); if ('openapi' in openApi) { openApi.components = { schemas: { foo: { - type: 'object' - } - } - } + type: 'object', + }, + }, + }; } const file = new TypeScriptFile({ dir: '/', - name: 'schemas.ts' - }) + name: 'schemas.ts', + }); - await processSchemas({ file, openApi }) + await processSchemas({ file, openApi }); - file.write() + file.write(); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/schemas.gen.ts'), - expect.anything() - ) - }) -}) + expect.anything(), + ); + }); +}); diff --git a/packages/openapi-ts/src/utils/write/__tests__/services.spec.ts b/packages/openapi-ts/src/utils/write/__tests__/services.spec.ts index a2e8ccc0d..2893f7153 100644 --- a/packages/openapi-ts/src/utils/write/__tests__/services.spec.ts +++ b/packages/openapi-ts/src/utils/write/__tests__/services.spec.ts @@ -1,13 +1,13 @@ -import { writeFileSync } from 'node:fs' -import path from 'node:path' +import { writeFileSync } from 'node:fs'; +import path from 'node:path'; -import { describe, expect, it, vi } from 'vitest' +import { describe, expect, it, vi } from 'vitest'; -import { TypeScriptFile } from '../../../compiler' -import { setConfig } from '../../config' -import { processServices } from '../services' +import { TypeScriptFile } from '../../../compiler'; +import { setConfig } from '../../config'; +import { processServices } from '../services'; -vi.mock('node:fs') +vi.mock('node:fs'); describe('processServices', () => { it('writes to filesystem', async () => { @@ -28,8 +28,8 @@ describe('processServices', () => { serviceResponse: 'body', types: {}, useDateType: false, - useOptions: false - }) + useOptions: false, + }); const client: Parameters[0]['client'] = { enumNames: [], @@ -40,27 +40,27 @@ describe('processServices', () => { $refs: [], imports: [], name: 'User', - operations: [] - } + operations: [], + }, ], - version: 'v1' - } + version: 'v1', + }; const file = new TypeScriptFile({ dir: '/', - name: 'services.ts' - }) + name: 'services.ts', + }); const files = { - services: file - } + services: file, + }; - await processServices({ client, files }) + await processServices({ client, files }); - file.write() + file.write(); expect(writeFileSync).toHaveBeenCalledWith( path.resolve('/services.gen.ts'), - expect.anything() - ) - }) -}) + expect.anything(), + ); + }); +}); diff --git a/packages/openapi-ts/src/utils/write/class.ts b/packages/openapi-ts/src/utils/write/class.ts index 82b07e232..6ae94d3fd 100644 --- a/packages/openapi-ts/src/utils/write/class.ts +++ b/packages/openapi-ts/src/utils/write/class.ts @@ -1,12 +1,12 @@ -import { writeFileSync } from 'node:fs' -import path from 'node:path' +import { writeFileSync } from 'node:fs'; +import path from 'node:path'; -import type { OpenApi } from '../../openApi' -import type { Client } from '../../types/client' -import { getConfig } from '../config' -import { getHttpRequestName } from '../getHttpRequestName' -import type { Templates } from '../handlebars' -import { sortByName } from '../sort' +import type { OpenApi } from '../../openApi'; +import type { Client } from '../../types/client'; +import { getConfig } from '../config'; +import { getHttpRequestName } from '../getHttpRequestName'; +import type { Templates } from '../handlebars'; +import { sortByName } from '../sort'; /** * Generate the OpenAPI client index file using the Handlebar template and write it to disk. @@ -21,22 +21,22 @@ export const writeClientClass = async ( openApi: OpenApi, outputPath: string, client: Client, - templates: Templates + templates: Templates, ): Promise => { - const config = getConfig() + const config = getConfig(); const templateResult = templates.client({ $config: config, ...client, httpRequest: getHttpRequestName(config.client), models: sortByName(client.models), - services: sortByName(client.services) - }) + services: sortByName(client.services), + }); if (config.name) { await writeFileSync( path.resolve(outputPath, `${config.name}.ts`), - templateResult - ) + templateResult, + ); } -} +}; diff --git a/packages/openapi-ts/src/utils/write/client.ts b/packages/openapi-ts/src/utils/write/client.ts index 56020b738..42fdea80e 100644 --- a/packages/openapi-ts/src/utils/write/client.ts +++ b/packages/openapi-ts/src/utils/write/client.ts @@ -1,17 +1,17 @@ -import { existsSync, mkdirSync } from 'node:fs' -import path from 'node:path' +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 type { Templates } from '../handlebars' -import { writeClientClass } from './class' -import { writeCore } from './core' -import { processIndex } from './index' -import { processTypesAndEnums } from './models' -import { processSchemas } from './schemas' -import { processServices } from './services' +import { TypeScriptFile } from '../../compiler'; +import type { OpenApi } from '../../openApi'; +import type { Client } from '../../types/client'; +import { getConfig } from '../config'; +import type { Templates } from '../handlebars'; +import { writeClientClass } from './class'; +import { writeCore } from './core'; +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 @@ -22,77 +22,77 @@ import { processServices } from './services' export const writeClient = async ( openApi: OpenApi, client: Client, - templates: Templates + templates: Templates, ): Promise => { - const config = getConfig() + const config = getConfig(); if (typeof config.exportServices === 'string') { - const regexp = new RegExp(config.exportServices) - client.services = client.services.filter(service => - regexp.test(service.name) - ) + const regexp = new RegExp(config.exportServices); + 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 regexp = new RegExp(config.types.include); + client.models = client.models.filter((model) => regexp.test(model.name)); } - const outputPath = path.resolve(config.output) + const outputPath = path.resolve(config.output); if (!existsSync(outputPath)) { - mkdirSync(outputPath, { recursive: true }) + mkdirSync(outputPath, { recursive: true }); } const files: Record = { index: new TypeScriptFile({ dir: config.output, - name: 'index.ts' - }) - } + name: 'index.ts', + }), + }; if (config.enums) { files.enums = new TypeScriptFile({ dir: config.output, - name: 'enums.ts' - }) + name: 'enums.ts', + }); } if (config.schemas) { files.schemas = new TypeScriptFile({ dir: config.output, - name: 'schemas.ts' - }) + name: 'schemas.ts', + }); } if (config.exportServices) { files.services = new TypeScriptFile({ dir: config.output, - name: 'services.ts' - }) + name: 'services.ts', + }); } if (config.types.export) { files.types = new TypeScriptFile({ dir: config.output, - name: 'types.ts' - }) + name: 'types.ts', + }); } - await processSchemas({ file: files.schemas, openApi }) - await processTypesAndEnums({ client, files }) - await processServices({ client, files }) + await processSchemas({ file: files.schemas, openApi }); + await processTypesAndEnums({ client, files }); + await processServices({ client, files }); // deprecated files - await writeClientClass(openApi, outputPath, client, templates) + await writeClientClass(openApi, outputPath, client, templates); await writeCore( openApi, path.resolve(config.output, 'core'), client, - templates - ) + templates, + ); - await processIndex({ 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() -} + 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/packages/openapi-ts/src/utils/write/core.ts b/packages/openapi-ts/src/utils/write/core.ts index 0c141e192..55ae957a4 100644 --- a/packages/openapi-ts/src/utils/write/core.ts +++ b/packages/openapi-ts/src/utils/write/core.ts @@ -3,15 +3,15 @@ import { existsSync, mkdirSync, rmSync, - writeFileSync -} from 'node:fs' -import path from 'node:path' + writeFileSync, +} from 'node:fs'; +import path from 'node:path'; -import type { OpenApi } from '../../openApi' -import type { Client } from '../../types/client' -import { getConfig } from '../config' -import { getHttpRequestName } from '../getHttpRequestName' -import type { Templates } from '../handlebars' +import type { OpenApi } from '../../openApi'; +import type { Client } from '../../types/client'; +import { getConfig } from '../config'; +import { getHttpRequestName } from '../getHttpRequestName'; +import type { Templates } from '../handlebars'; /** * Generate OpenAPI core files, this includes the basic boilerplate code to handle requests. @@ -24,94 +24,94 @@ export const writeCore = async ( openApi: OpenApi, outputPath: string, client: Client, - templates: Templates + templates: Templates, ): Promise => { - const config = getConfig() + const config = getConfig(); const context = { httpRequest: getHttpRequestName(config.client), server: config.base !== undefined ? config.base : client.server, - version: client.version - } + version: client.version, + }; rmSync(path.resolve(outputPath), { force: true, - recursive: true - }) + recursive: true, + }); mkdirSync(path.resolve(outputPath), { - recursive: true - }) + recursive: true, + }); if (config.exportCore) { await writeFileSync( path.resolve(outputPath, 'OpenAPI.ts'), templates.core.settings({ $config: config, - ...context - }) - ) + ...context, + }), + ); await writeFileSync( path.resolve(outputPath, 'ApiError.ts'), templates.core.apiError({ $config: config, - ...context - }) - ) + ...context, + }), + ); await writeFileSync( path.resolve(outputPath, 'ApiRequestOptions.ts'), templates.core.apiRequestOptions({ $config: config, - ...context - }) - ) + ...context, + }), + ); await writeFileSync( path.resolve(outputPath, 'ApiResult.ts'), templates.core.apiResult({ $config: config, - ...context - }) - ) + ...context, + }), + ); if (config.client !== 'angular') { await writeFileSync( path.resolve(outputPath, 'CancelablePromise.ts'), templates.core.cancelablePromise({ $config: config, - ...context - }) - ) + ...context, + }), + ); } await writeFileSync( path.resolve(outputPath, 'request.ts'), templates.core.request({ $config: config, - ...context - }) - ) + ...context, + }), + ); if (config.name) { await writeFileSync( path.resolve(outputPath, 'BaseHttpRequest.ts'), templates.core.baseHttpRequest({ $config: config, - ...context - }) - ) + ...context, + }), + ); await writeFileSync( path.resolve(outputPath, `${context.httpRequest}.ts`), templates.core.httpRequest({ $config: config, - ...context - }) - ) + ...context, + }), + ); } if (config.request) { - const requestFile = path.resolve(process.cwd(), config.request) - const requestFileExists = await existsSync(requestFile) + const requestFile = path.resolve(process.cwd(), config.request); + const requestFileExists = await existsSync(requestFile); if (!requestFileExists) { - throw new Error(`Custom request file "${requestFile}" does not exists`) + throw new Error(`Custom request file "${requestFile}" does not exists`); } - await copyFileSync(requestFile, path.resolve(outputPath, 'request.ts')) + await copyFileSync(requestFile, path.resolve(outputPath, 'request.ts')); } } -} +}; diff --git a/packages/openapi-ts/src/utils/write/index.ts b/packages/openapi-ts/src/utils/write/index.ts index 64578c3a8..786d08d0a 100644 --- a/packages/openapi-ts/src/utils/write/index.ts +++ b/packages/openapi-ts/src/utils/write/index.ts @@ -1,58 +1,58 @@ -import { compiler, TypeScriptFile } from '../../compiler' -import { getConfig } from '../config' +import { compiler, TypeScriptFile } from '../../compiler'; +import { getConfig } from '../config'; export const processIndex = async ({ - files + files, }: { - files: Record + files: Record; }): Promise => { - const config = getConfig() + const config = getConfig(); if (config.name) { - files.index.add(compiler.export.named([config.name], `./${config.name}`)) + files.index.add(compiler.export.named([config.name], `./${config.name}`)); } if (config.exportCore) { - files.index.add(compiler.export.named('ApiError', './core/ApiError')) + files.index.add(compiler.export.named('ApiError', './core/ApiError')); if (config.serviceResponse === 'response') { files.index.add( compiler.export.named( { isTypeOnly: true, name: 'ApiResult' }, - './core/ApiResult' - ) - ) + './core/ApiResult', + ), + ); } if (config.name) { files.index.add( - compiler.export.named('BaseHttpRequest', './core/BaseHttpRequest') - ) + compiler.export.named('BaseHttpRequest', './core/BaseHttpRequest'), + ); } if (config.client !== 'angular') { files.index.add( compiler.export.named( ['CancelablePromise', 'CancelError'], - './core/CancelablePromise' - ) - ) + './core/CancelablePromise', + ), + ); } files.index.add( compiler.export.named( ['OpenAPI', { isTypeOnly: true, name: 'OpenAPIConfig' }], - './core/OpenAPI' - ) - ) + './core/OpenAPI', + ), + ); } if (files.enums && !files.enums.isEmpty()) { - files.index.add(compiler.export.all(`./${files.enums.getName(false)}`)) + 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)}`)) + 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)}`)) + 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)}`)) + files.index.add(compiler.export.all(`./${files.types.getName(false)}`)); } -} +}; diff --git a/packages/openapi-ts/src/utils/write/models.ts b/packages/openapi-ts/src/utils/write/models.ts index e1a62509a..5e738e448 100644 --- a/packages/openapi-ts/src/utils/write/models.ts +++ b/packages/openapi-ts/src/utils/write/models.ts @@ -1,4 +1,9 @@ -import { type Comments, compiler, type Node, TypeScriptFile } from '../../compiler'; +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'; @@ -11,7 +16,7 @@ import { transformName } from '../transform'; import { serviceExportedNamespace } from './services'; import { toType } from './type'; -type OnNode = (node: Node, type?: 'enum') => void +type OnNode = (node: Node, type?: 'enum') => void; const emptyModel: Model = { $refs: [], @@ -29,52 +34,52 @@ const emptyModel: Model = { name: '', properties: [], template: null, - type: '' -} + type: '', +}; const processComposition = (client: Client, model: Model, onNode: OnNode) => { - processType(client, model, onNode) - model.enums.forEach(enumerator => processEnum(client, enumerator, onNode)) -} + processType(client, model, onNode); + model.enums.forEach((enumerator) => processEnum(client, enumerator, onNode)); +}; const processEnum = ( client: Client, model: Model, onNode: OnNode, - exportType = false + exportType = false, ) => { - const config = getConfig() + const config = getConfig(); - const properties: Record = {} - const comments: Record = {} - 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 + const properties: Record = {}; + const comments: Record = {}; + 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)] + comments[key] = [escapeComment(comment)]; } - }) + }); // ignore duplicate enum names - const name = enumName(client, model.name)! + const name = enumName(client, model.name)!; if (name === null) { - return + return; } const comment = [ model.description && escapeComment(model.description), - model.deprecated && '@deprecated' - ] + model.deprecated && '@deprecated', + ]; if (exportType) { const node = compiler.typedef.alias( ensureValidTypeScriptJavaScriptIdentifier(model.name), enumUnionType(model.enum), - comment - ) - onNode(node) + comment, + ); + onNode(node); } if (config.enums === 'typescript') { @@ -82,9 +87,9 @@ const processEnum = ( comments, leadingComment: comment, name, - obj: properties - }) - onNode(node, 'enum') + obj: properties, + }); + onNode(node, 'enum'); } if (config.enums === 'javascript') { @@ -92,26 +97,26 @@ const processEnum = ( comments, multiLine: true, obj: properties, - unescape: true - }) - const node = compiler.export.asConst(name, expression) - addLeadingComment(node, comment) - onNode(node, 'enum') + 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' - ] + model.deprecated && '@deprecated', + ]; const node = compiler.typedef.alias( transformName(model.name), toType(model), - comment - ) - onNode(node) -} + comment, + ); + onNode(node); +}; const processModel = (client: Client, model: Model, onNode: OnNode) => { switch (model.export) { @@ -119,62 +124,62 @@ const processModel = (client: Client, model: Model, onNode: OnNode) => { case 'any-of': case 'one-of': case 'interface': - return processComposition(client, model, onNode) + return processComposition(client, model, onNode); case 'enum': - return processEnum(client, model, onNode, true) + return processEnum(client, model, onNode, true); default: - return processType(client, model, onNode) + return processType(client, model, onNode); } -} +}; const processServiceTypes = (services: Service[], onNode: OnNode) => { - type ResMap = Map - type MethodMap = Map<'req' | 'res', ResMap | OperationParameter[]> - type MethodKey = Service['operations'][number]['method'] - type PathMap = Map + type ResMap = Map; + type MethodMap = Map<'req' | 'res', ResMap | OperationParameter[]>; + type MethodKey = Service['operations'][number]['method']; + type PathMap = Map; - const pathsMap = new Map() + const pathsMap = new Map(); - services.forEach(service => { - service.operations.forEach(operation => { - const hasReq = operation.parameters.length - const hasRes = operation.results.length + services.forEach((service) => { + service.operations.forEach((operation) => { + const hasReq = operation.parameters.length; + const hasRes = operation.results.length; if (hasReq || hasRes) { - let pathMap = pathsMap.get(operation.path) + let pathMap = pathsMap.get(operation.path); if (!pathMap) { - pathsMap.set(operation.path, new Map()) - pathMap = pathsMap.get(operation.path)! + pathsMap.set(operation.path, new Map()); + pathMap = pathsMap.get(operation.path)!; } - let methodMap = pathMap.get(operation.method) + let methodMap = pathMap.get(operation.method); if (!methodMap) { - pathMap.set(operation.method, new Map()) - methodMap = pathMap.get(operation.method)! + pathMap.set(operation.method, new Map()); + methodMap = pathMap.get(operation.method)!; } if (hasReq) { - methodMap.set('req', sortByName([...operation.parameters])) + methodMap.set('req', sortByName([...operation.parameters])); } if (hasRes) { - let resMap = methodMap.get('res') + let resMap = methodMap.get('res'); if (!resMap) { - methodMap.set('res', new Map()) - resMap = methodMap.get('res')! + methodMap.set('res', new Map()); + resMap = methodMap.get('res')!; } if (Array.isArray(resMap)) { - return + return; } - operation.results.forEach(result => { - resMap.set(result.code, result) - }) + operation.results.forEach((result) => { + resMap.set(result.code, result); + }); } } - }) - }) + }); + }); const properties = Array.from(pathsMap).map(([path, pathMap]) => { const pathParameters = Array.from(pathMap).map(([method, methodMap]) => { @@ -188,70 +193,70 @@ const processServiceTypes = (services: Service[], onNode: OnNode) => { ...emptyModel, ...base, isRequired: true, - name: String(code) - } - return value - }) + name: String(code), + }; + return value; + }); const reqResKey: Model = { ...emptyModel, export: 'interface', isRequired: true, name, - properties: reqResParameters - } - return reqResKey - } - ) + properties: reqResParameters, + }; + return reqResKey; + }, + ); const methodKey: Model = { ...emptyModel, export: 'interface', isRequired: true, name: method.toLocaleLowerCase(), - properties: methodParameters - } - return methodKey - }) + properties: methodParameters, + }; + return methodKey; + }); const pathKey: Model = { ...emptyModel, export: 'interface', isRequired: true, name: `'${path}'`, - properties: pathParameters - } - return pathKey - }) + properties: pathParameters, + }; + return pathKey; + }); const type = toType({ ...emptyModel, export: 'interface', - properties - }) - const namespace = serviceExportedNamespace() - const node = compiler.typedef.alias(namespace, type) - onNode(node) -} + properties, + }); + const namespace = serviceExportedNamespace(); + const node = compiler.typedef.alias(namespace, type); + onNode(node); +}; export const processTypesAndEnums = async ({ client, - files + files, }: { - client: Client - files: Record + client: Client; + files: Record; }): Promise => { for (const model of client.models) { processModel(client, model, (node, type) => { if (type === 'enum') { - files.enums?.add(node) + files.enums?.add(node); } else { - files.types?.add(node) + files.types?.add(node); } - }) + }); } if (files.services && client.services.length) { - processServiceTypes(client.services, node => { - files.types?.add(node) - }) + processServiceTypes(client.services, (node) => { + files.types?.add(node); + }); } -} +}; diff --git a/packages/openapi-ts/src/utils/write/schemas.ts b/packages/openapi-ts/src/utils/write/schemas.ts index 0c7fcda1d..c13f88238 100644 --- a/packages/openapi-ts/src/utils/write/schemas.ts +++ b/packages/openapi-ts/src/utils/write/schemas.ts @@ -1,31 +1,31 @@ -import { compiler, TypeScriptFile } from '../../compiler' -import type { OpenApi } from '../../openApi' -import { ensureValidTypeScriptJavaScriptIdentifier } from '../../openApi/common/parser/sanitize' +import { compiler, TypeScriptFile } from '../../compiler'; +import type { OpenApi } from '../../openApi'; +import { ensureValidTypeScriptJavaScriptIdentifier } from '../../openApi/common/parser/sanitize'; export const processSchemas = async ({ file, - openApi + openApi, }: { - file?: TypeScriptFile - openApi: OpenApi + file?: TypeScriptFile; + openApi: OpenApi; }): Promise => { if (!file) { - return + return; } const addSchema = (name: string, obj: any) => { - const validName = `$${ensureValidTypeScriptJavaScriptIdentifier(name)}` - const expression = compiler.types.object({ obj }) - const statement = compiler.export.asConst(validName, expression) - file.add(statement) - } + const validName = `$${ensureValidTypeScriptJavaScriptIdentifier(name)}`; + 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) + const definition = openApi.definitions[name]; + addSchema(name, definition); } } } @@ -35,22 +35,10 @@ export const processSchemas = async ({ 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) - } - } - - // 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); - } - } + const schema = openApi.components.schemas[name]; + addSchema(name, schema); } } } } -} +}; diff --git a/packages/openapi-ts/src/utils/write/services.ts b/packages/openapi-ts/src/utils/write/services.ts index 17957fee7..35ce272cc 100644 --- a/packages/openapi-ts/src/utils/write/services.ts +++ b/packages/openapi-ts/src/utils/write/services.ts @@ -2,77 +2,81 @@ 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 { unique } from '../unique' + 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 { unique } from '../unique'; -export const serviceExportedNamespace = () => '$OpenApiTs' +export const serviceExportedNamespace = () => '$OpenApiTs'; const toOperationParamType = (operation: Operation): FunctionParameter[] => { - const config = getConfig() - const baseTypePath = `${serviceExportedNamespace()}['${operation.path}']['${operation.method.toLocaleLowerCase()}']['req']` + const config = getConfig(); + const baseTypePath = `${serviceExportedNamespace()}['${operation.path}']['${operation.method.toLocaleLowerCase()}']['req']`; if (!operation.parameters.length) { - return [] + return []; } if (config.useOptions) { - const isOptional = operation.parameters.every(p => !p.isRequired) + const isOptional = operation.parameters.every((p) => !p.isRequired); return [ - { default: isOptional ? {} : undefined, name: 'data', type: baseTypePath } - ] + { + default: isOptional ? {} : undefined, + name: 'data', + type: baseTypePath, + }, + ]; } - return operation.parameters.map(p => { - const typePath = `${baseTypePath}['${p.name}']` + return operation.parameters.map((p) => { + const typePath = `${baseTypePath}['${p.name}']`; return { default: p?.default, isRequired: modelIsRequired(p) === '', name: p.name, - type: typePath - } - }) -} + type: typePath, + }; + }); +}; const toOperationReturnType = (operation: Operation) => { - const config = getConfig() - const baseTypePath = `${serviceExportedNamespace()}['${operation.path}']['${operation.method.toLocaleLowerCase()}']['res']` + const config = getConfig(); + const baseTypePath = `${serviceExportedNamespace()}['${operation.path}']['${operation.method.toLocaleLowerCase()}']['res']`; const results = operation.results.filter( - result => result.code >= 200 && result.code < 300 - ) + (result) => result.code >= 200 && result.code < 300, + ); // 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') + let returnType = compiler.typedef.basic('void'); if (results.length) { const types = results.map( - result => `${baseTypePath}[${String(result.code)}]` - ) - returnType = compiler.typedef.union(types) + (result) => `${baseTypePath}[${String(result.code)}]`, + ); + returnType = compiler.typedef.union(types); } if (config.useOptions && config.serviceResponse === 'response') { - returnType = compiler.typedef.basic('ApiResult', [returnType]) + returnType = compiler.typedef.basic('ApiResult', [returnType]); } if (config.client === 'angular') { - returnType = compiler.typedef.basic('Observable', [returnType]) + returnType = compiler.typedef.basic('Observable', [returnType]); } else { - returnType = compiler.typedef.basic('CancelablePromise', [returnType]) + returnType = compiler.typedef.basic('CancelablePromise', [returnType]); } - return returnType -} + return returnType; +}; const toOperationComment = (operation: Operation) => { - const config = getConfig() - let params: string[] = [] + const config = getConfig(); + let params: string[] = []; if (!config.useOptions && operation.parameters.length) { params = operation.parameters.map( - p => - `@param ${p.name} ${p.description ? escapeComment(p.description) : ''}` - ) + (p) => + `@param ${p.name} ${p.description ? escapeComment(p.description) : ''}`, + ); } const comment = [ operation.deprecated && '@deprecated', @@ -80,135 +84,135 @@ const toOperationComment = (operation: Operation) => { operation.description && escapeComment(operation.description), ...params, ...operation.results.map( - r => - `@returns ${r.type} ${r.description ? escapeComment(r.description) : ''}` + (r) => + `@returns ${r.type} ${r.description ? escapeComment(r.description) : ''}`, ), - '@throws ApiError' - ] - return comment -} + '@throws ApiError', + ]; + return comment; +}; const toRequestOptions = (operation: Operation) => { const toObj = (parameters: OperationParameter[]) => parameters.reduce( (prev, curr) => { - const key = curr.prop - const value = curr.name + const key = curr.prop; + const value = curr.name; if (key === value) { - prev[key] = key + prev[key] = key; } else if (escapeName(key) === key) { - prev[key] = value + prev[key] = value; } else { - prev[`'${key}'`] = value + prev[`'${key}'`] = value; } - return prev + return prev; }, - {} as Record - ) + {} as Record, + ); const obj: Record = { method: operation.method, - url: operation.path - } + url: operation.path, + }; if (operation.parametersPath.length) { - obj.path = toObj(operation.parametersPath) + obj.path = toObj(operation.parametersPath); } if (operation.parametersCookie.length) { - obj.cookies = toObj(operation.parametersCookie) + obj.cookies = toObj(operation.parametersCookie); } if (operation.parametersHeader.length) { - obj.headers = toObj(operation.parametersHeader) + obj.headers = toObj(operation.parametersHeader); } if (operation.parametersQuery.length) { - obj.query = toObj(operation.parametersQuery) + obj.query = toObj(operation.parametersQuery); } if (operation.parametersForm.length) { - obj.formData = toObj(operation.parametersForm) + obj.formData = toObj(operation.parametersForm); } if (operation.parametersBody) { if (operation.parametersBody.in === 'formData') { - obj.formData = operation.parametersBody.name + obj.formData = operation.parametersBody.name; } if (operation.parametersBody.in === 'body') { - obj.body = operation.parametersBody.name + obj.body = operation.parametersBody.name; } } if (operation.parametersBody?.mediaType) { - obj.mediaType = operation.parametersBody?.mediaType + obj.mediaType = operation.parametersBody?.mediaType; } if (operation.responseHeader) { - obj.responseHeader = operation.responseHeader + obj.responseHeader = operation.responseHeader; } if (operation.errors.length) { - const errors: Record = {} - operation.errors.forEach(err => { - errors[err.code] = escapeDescription(err.description) - }) - obj.errors = errors + const errors: Record = {}; + operation.errors.forEach((err) => { + errors[err.code] = escapeDescription(err.description); + }); + obj.errors = errors; } return compiler.types.object({ identifiers: ['body', 'headers', 'formData', 'cookies', 'path', 'query'], obj, - shorthand: true - }) -} + shorthand: true, + }); +}; export const toDestructuredData = (operation: Operation) => { - const config = getConfig() + const config = getConfig(); if (!config.useOptions || !operation.parameters.length) { - return '' + return ''; } - const obj: Record = {} - operation.parameters.forEach(p => { - obj[p.name] = p.name - }) + const obj: Record = {}; + 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;` -} + shorthand: true, + }); + return `const ${compiler.utils.toString(node)} = data;`; +}; const toOperationStatements = (operation: Operation) => { - const config = getConfig() - const statements: any[] = [] + 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))) + statements.push(compiler.utils.toNode(toDestructuredData(operation))); } - const requestOptions = compiler.utils.toString(toRequestOptions(operation)) + const requestOptions = compiler.utils.toString(toRequestOptions(operation)); if (config.name) { statements.push( compiler.class.return({ args: [requestOptions], - name: 'this.httpRequest.request' - }) - ) + name: 'this.httpRequest.request', + }), + ); } else { if (config.client === 'angular') { statements.push( compiler.class.return({ args: ['OpenAPI', 'this.http', requestOptions], - name: '__request' - }) - ) + name: '__request', + }), + ); } else { statements.push( compiler.class.return({ args: ['OpenAPI', requestOptions], - name: '__request' - }) - ) + name: '__request', + }), + ); } } - return statements -} + return statements; +}; export const processService = (service: Service) => { - const config = getConfig() - const members: ClassElement[] = service.operations.map(operation => { + const config = getConfig(); + const members: ClassElement[] = service.operations.map((operation) => { const node = compiler.class.method({ accessLevel: 'public', comment: toOperationComment(operation), @@ -216,10 +220,10 @@ export const processService = (service: Service) => { name: operation.name, parameters: toOperationParamType(operation), returnType: toOperationReturnType(operation), - statements: toOperationStatements(operation) - }) - return node - }) + statements: toOperationStatements(operation), + }); + return node; + }); // Push to front constructor if needed if (config.name) { @@ -230,11 +234,11 @@ export const processService = (service: Service) => { accessLevel: 'public', isReadOnly: true, name: 'httpRequest', - type: 'BaseHttpRequest' - } - ] - }) - ) + type: 'BaseHttpRequest', + }, + ], + }), + ); } else if (config.client === 'angular') { members.unshift( compiler.class.constructor({ @@ -243,11 +247,11 @@ export const processService = (service: Service) => { accessLevel: 'public', isReadOnly: true, name: 'http', - type: 'HttpClient' - } - ] - }) - ) + type: 'HttpClient', + }, + ], + }), + ); } return compiler.class.create({ @@ -256,70 +260,70 @@ export const processService = (service: Service) => { ? { args: [{ providedIn: 'root' }], name: 'Injectable' } : undefined, members, - name: `${service.name}${config.postfixServices}` - }) -} + name: `${service.name}${config.postfixServices}`, + }); +}; export const processServices = async ({ client, - files + files, }: { - client: Client - files: Record + client: Client; + files: Record; }): Promise => { - const file = files.services + const file = files.services; if (!file) { - return + return; } - const config = getConfig() + const config = getConfig(); - let imports: string[] = [] + let imports: string[] = []; for (const service of client.services) { - file.add(processService(service)) - const exported = serviceExportedNamespace() - imports = [...imports, exported] + 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') + file.addNamedImport('Injectable', '@angular/core'); if (config.name === undefined) { - file.addNamedImport('HttpClient', '@angular/common/http') + file.addNamedImport('HttpClient', '@angular/common/http'); } - file.addNamedImport({ isTypeOnly: true, name: 'Observable' }, 'rxjs') + file.addNamedImport({ isTypeOnly: true, name: 'Observable' }, 'rxjs'); } else { file.addNamedImport( { isTypeOnly: true, name: 'CancelablePromise' }, - './core/CancelablePromise' - ) + './core/CancelablePromise', + ); } if (config.serviceResponse === 'response') { file.addNamedImport( { isTypeOnly: true, name: 'ApiResult' }, - './core/ApiResult' - ) + './core/ApiResult', + ); } if (config.name) { file.addNamedImport( { isTypeOnly: config.client !== 'angular', name: 'BaseHttpRequest' }, - './core/BaseHttpRequest' - ) + './core/BaseHttpRequest', + ); } else { - file.addNamedImport('OpenAPI', './core/OpenAPI') + file.addNamedImport('OpenAPI', './core/OpenAPI'); file.addNamedImport( { alias: '__request', name: 'request' }, - './core/request' - ) + './core/request', + ); } // 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)}`) + .map((name) => ({ isTypeOnly: true, name })); + file.addNamedImport(models, `./${files.types.getName(false)}`); } -} +}; diff --git a/packages/openapi-ts/src/utils/write/type.ts b/packages/openapi-ts/src/utils/write/type.ts index 1570c5dbb..e676c24ba 100644 --- a/packages/openapi-ts/src/utils/write/type.ts +++ b/packages/openapi-ts/src/utils/write/type.ts @@ -8,24 +8,24 @@ import { transformName } 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.useDateType && 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(transformName(model.base)); - } + const config = getConfig(); + if (model.base === 'binary') { + return compiler.typedef.union(['Blob', 'File']); + } + if (config.useDateType && 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(transformName(model.base)); } - return compiler.typedef.basic(model.base); + } + return compiler.typedef.basic(model.base); }; const typeReference = (model: Model) => - compiler.typedef.union([base(model)], model.isNullable) + compiler.typedef.union([base(model)], model.isNullable); const typeArray = (model: Model) => { // Special case where we use tuple to define constant size array. @@ -37,88 +37,88 @@ const typeArray = (model: Model) => { 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 + 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([toType(model.link)], model.isNullable); } - return compiler.typedef.array([base(model)], 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 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 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 models = model.properties; const types = models - .map(m => compiler.utils.toString(toType(m))) - .filter(unique) - return compiler.typedef.union(types, model.isNullable) -} + .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) -} + .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') + return compiler.typedef.basic('unknown'); } - const properties: Property[] = model.properties.map(property => { - let maybeRequired = modelIsRequired(property) - let value = toType(property) + 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']) + maybeRequired = ''; + value = compiler.typedef.union([value, 'undefined']); } return { comment: [ property.description && escapeComment(property.description), - property.deprecated && '@deprecated' + property.deprecated && '@deprecated', ], isReadOnly: property.isReadOnly, isRequired: maybeRequired === '', name: property.name, - type: value - } - }) + type: value, + }; + }); - return compiler.typedef.interface(properties, model.isNullable) -} + return compiler.typedef.interface(properties, model.isNullable); +}; export const toType = (model: Model): TypeNode => { switch (model.export) { case 'all-of': - return typeIntersect(model) + return typeIntersect(model); case 'any-of': case 'one-of': - return typeUnion(model) + return typeUnion(model); case 'array': - return typeArray(model) + return typeArray(model); case 'dictionary': - return typeDict(model) + return typeDict(model); case 'enum': - return typeEnum(model) + return typeEnum(model); case 'interface': - return typeInterface(model) + return typeInterface(model); case 'reference': default: - return typeReference(model) + return typeReference(model); } -} +}; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/OpenAPI.ts.snap index 64be05544..5c1459c6b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/OpenAPI.ts.snap @@ -5,46 +5,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/request.ts.snap index bee3d3694..eb8aae7f7 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/core/request.ts.snap @@ -6,305 +6,329 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + let request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } + for (const fn of config.interceptors.request._fns) { + request = await fn(request); + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = [ - 'application/octet-stream', - 'application/pdf', - 'application/zip', - 'audio/', - 'image/', - 'video/', - ]; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const binaryTypes = [ + 'application/octet-stream', + 'application/pdf', + 'application/zip', + 'audio/', + 'image/', + 'video/', + ]; + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return await response.json(); + } else if (binaryTypes.some((type) => contentType.includes(type))) { + return await response.blob(); + } else if (contentType.includes('multipart/form-data')) { + return await response.formData(); + } else if (contentType.includes('text/')) { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -314,38 +338,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/enums.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/enums.gen.ts.snap index 0e939b049..a803e72b8 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/enums.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/enums.gen.ts.snap @@ -4,71 +4,71 @@ * This is a simple enum with strings */ export const EnumWithStringsEnum = { - SUCCESS: 'Success', - WARNING: 'Warning', - ERROR: 'Error', - _SINGLE_QUOTE_: "'Single Quote'", - _DOUBLE_QUOTES_: '"Double Quotes"', - NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串: 'Non-ascii: øæåôöØÆÅÔÖ字符串', + SUCCESS: 'Success', + WARNING: 'Warning', + ERROR: 'Error', + _SINGLE_QUOTE_: "'Single Quote'", + _DOUBLE_QUOTES_: '"Double Quotes"', + NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串: 'Non-ascii: øæåôöØÆÅÔÖ字符串', } as const; /** * This is a simple enum with numbers */ export const EnumWithNumbersEnum = { - _1: 1, - _2: 2, - _3: 3, - '_1.1': 1.1, - '_1.2': 1.2, - '_1.3': 1.3, - _100: 100, - _200: 200, - _300: 300, - '_-100': -100, - '_-200': -200, - '_-300': -300, - '_-1.1': -1.1, - '_-1.2': -1.2, - '_-1.3': -1.3, + _1: 1, + _2: 2, + _3: 3, + '_1.1': 1.1, + '_1.2': 1.2, + '_1.3': 1.3, + _100: 100, + _200: 200, + _300: 300, + '_-100': -100, + '_-200': -200, + '_-300': -300, + '_-1.1': -1.1, + '_-1.2': -1.2, + '_-1.3': -1.3, } as const; /** * This is a simple enum with numbers */ export const EnumWithExtensionsEnum = { - /** - * Used when the status of something is successful - */ - CUSTOM_SUCCESS: 200, - /** - * Used when the status of something has a warning - */ - CUSTOM_WARNING: 400, - /** - * Used when the status of something has an error - */ - CUSTOM_ERROR: 500, + /** + * Used when the status of something is successful + */ + CUSTOM_SUCCESS: 200, + /** + * Used when the status of something has a warning + */ + CUSTOM_WARNING: 400, + /** + * Used when the status of something has an error + */ + CUSTOM_ERROR: 500, } as const; /** * This is a simple enum with strings */ export const TestEnum = { - SUCCESS: 'Success', - WARNING: 'Warning', - ERROR: 'Error', - ØÆÅ字符串: 'ØÆÅ字符串', + SUCCESS: 'Success', + WARNING: 'Warning', + ERROR: 'Error', + ØÆÅ字符串: 'ØÆÅ字符串', } as const; /** * These are the HTTP error code enums */ export const StatusCodeEnum = { - _100: '100', - _200_FOO: '200 FOO', - _300_FOO_BAR: '300 FOO_BAR', - _400_FOO_BAR: '400 foo-bar', - _500_FOO_BAR: '500 foo.bar', - _600_FOO_BAR: '600 foo&bar', + _100: '100', + _200_FOO: '200 FOO', + _300_FOO_BAR: '300 FOO_BAR', + _400_FOO_BAR: '400 foo-bar', + _500_FOO_BAR: '500 foo.bar', + _600_FOO_BAR: '600 foo&bar', } as const; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/schemas.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/schemas.gen.ts.snap index dad60c490..345aeb3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/schemas.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/schemas.gen.ts.snap @@ -1,606 +1,628 @@ // This file is auto-generated by @hey-api/openapi-ts export const $CommentWithBreaks = { - description: `Testing multiline comments in string: First line + description: `Testing multiline comments in string: First line Second line Fourth line`, - type: 'integer', + type: 'integer', } as const; export const $CommentWithBackticks = { - description: 'Testing backticks in string: `backticks` and ```multiple backticks``` should work', - type: 'integer', + description: + 'Testing backticks in string: `backticks` and ```multiple backticks``` should work', + type: 'integer', } as const; export const $CommentWithBackticksAndQuotes = { - description: `Testing backticks and quotes in string: \`backticks\`, 'quotes', "double quotes" and \`\`\`multiple backticks\`\`\` should work`, - type: 'integer', + description: `Testing backticks and quotes in string: \`backticks\`, 'quotes', "double quotes" and \`\`\`multiple backticks\`\`\` should work`, + type: 'integer', } as const; export const $CommentWithSlashes = { - description: 'Testing slashes in string: \backwards\\ and /forwards/// should work', - type: 'integer', + description: + 'Testing slashes in string: \backwards\\ and /forwards/// should work', + type: 'integer', } as const; export const $CommentWithExpressionPlaceholders = { - description: 'Testing expression placeholders in string: ${expression} should work', - type: 'integer', + description: + 'Testing expression placeholders in string: ${expression} should work', + type: 'integer', } as const; export const $CommentWithQuotes = { - description: `Testing quotes in string: 'single quote''' and "double quotes""" should work`, - type: 'integer', + description: `Testing quotes in string: 'single quote''' and "double quotes""" should work`, + type: 'integer', } as const; export const $CommentWithReservedCharacters = { - description: 'Testing reserved characters in string: /* inline */ and /** inline **/ should work', - type: 'integer', + description: + 'Testing reserved characters in string: /* inline */ and /** inline **/ should work', + type: 'integer', } as const; export const $SimpleInteger = { - description: 'This is a simple number', - type: 'integer', + description: 'This is a simple number', + type: 'integer', } as const; export const $SimpleBoolean = { - description: 'This is a simple boolean', - type: 'boolean', + description: 'This is a simple boolean', + type: 'boolean', } as const; export const $SimpleString = { - description: 'This is a simple string', - type: 'string', + description: 'This is a simple string', + type: 'string', } as const; export const $NonAsciiStringæøåÆØÅöôêÊ字符串 = { - description: 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)', - type: 'string', + description: + 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)', + type: 'string', } as const; export const $SimpleFile = { - description: 'This is a simple file', - type: 'file', + description: 'This is a simple file', + type: 'file', } as const; export const $SimpleReference = { - description: 'This is a simple reference', - $ref: '#/definitions/ModelWithString', + description: 'This is a simple reference', + $ref: '#/definitions/ModelWithString', } as const; export const $SimpleStringWithPattern = { - description: 'This is a simple string', - type: 'string', - maxLength: 64, - pattern: '^[a-zA-Z0-9_]*$', + description: 'This is a simple string', + type: 'string', + maxLength: 64, + pattern: '^[a-zA-Z0-9_]*$', } as const; export const $EnumWithStrings = { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', "'Single Quote'", '"Double Quotes"', 'Non-ascii: øæåôöØÆÅÔÖ字符串'], + description: 'This is a simple enum with strings', + enum: [ + 'Success', + 'Warning', + 'Error', + "'Single Quote'", + '"Double Quotes"', + 'Non-ascii: øæåôöØÆÅÔÖ字符串', + ], } as const; export const $EnumWithNumbers = { - description: 'This is a simple enum with numbers', - enum: [1, 2, 3, 1.1, 1.2, 1.3, 100, 200, 300, -100, -200, -300, -1.1, -1.2, -1.3], + description: 'This is a simple enum with numbers', + enum: [ + 1, 2, 3, 1.1, 1.2, 1.3, 100, 200, 300, -100, -200, -300, -1.1, -1.2, -1.3, + ], } as const; export const $EnumFromDescription = { - description: 'Success=1,Warning=2,Error=3', - type: 'number', + description: 'Success=1,Warning=2,Error=3', + type: 'number', } as const; export const $EnumWithExtensions = { - description: 'This is a simple enum with numbers', - enum: [200, 400, 500], - 'x-enum-varnames': ['CUSTOM_SUCCESS', 'CUSTOM_WARNING', 'CUSTOM_ERROR'], - 'x-enum-descriptions': [ - 'Used when the status of something is successful', - 'Used when the status of something has a warning', - 'Used when the status of something has an error', - ], + description: 'This is a simple enum with numbers', + enum: [200, 400, 500], + 'x-enum-varnames': ['CUSTOM_SUCCESS', 'CUSTOM_WARNING', 'CUSTOM_ERROR'], + 'x-enum-descriptions': [ + 'Used when the status of something is successful', + 'Used when the status of something has a warning', + 'Used when the status of something has an error', + ], } as const; export const $ArrayWithNumbers = { - description: 'This is a simple array with numbers', - type: 'array', - items: { - type: 'integer', - }, + description: 'This is a simple array with numbers', + type: 'array', + items: { + type: 'integer', + }, } as const; export const $ArrayWithBooleans = { - description: 'This is a simple array with booleans', - type: 'array', - items: { - type: 'boolean', - }, + description: 'This is a simple array with booleans', + type: 'array', + items: { + type: 'boolean', + }, } as const; export const $ArrayWithStrings = { - description: 'This is a simple array with strings', - type: 'array', - items: { - type: 'string', - }, + description: 'This is a simple array with strings', + type: 'array', + items: { + type: 'string', + }, } as const; export const $ArrayWithReferences = { - description: 'This is a simple array with references', - type: 'array', - items: { - $ref: '#/definitions/ModelWithString', - }, + description: 'This is a simple array with references', + type: 'array', + items: { + $ref: '#/definitions/ModelWithString', + }, } as const; export const $ArrayWithArray = { - description: 'This is a simple array containing an array', + description: 'This is a simple array containing an array', + type: 'array', + items: { type: 'array', items: { - type: 'array', - items: { - $ref: '#/definitions/ModelWithString', - }, + $ref: '#/definitions/ModelWithString', }, + }, } as const; export const $ArrayWithProperties = { - description: 'This is a simple array with properties', - type: 'array', - items: { - type: 'object', - properties: { - foo: { - type: 'string', - }, - bar: { - type: 'string', - }, - }, + description: 'This is a simple array with properties', + type: 'array', + items: { + type: 'object', + properties: { + foo: { + type: 'string', + }, + bar: { + type: 'string', + }, }, + }, } as const; export const $DictionaryWithString = { - description: 'This is a string dictionary', - type: 'object', - additionalProperties: { - type: 'string', - }, + description: 'This is a string dictionary', + type: 'object', + additionalProperties: { + type: 'string', + }, } as const; export const $DictionaryWithReference = { - description: 'This is a string reference', - type: 'object', - additionalProperties: { - $ref: '#/definitions/ModelWithString', - }, + description: 'This is a string reference', + type: 'object', + additionalProperties: { + $ref: '#/definitions/ModelWithString', + }, } as const; export const $DictionaryWithArray = { - description: 'This is a complex dictionary', - type: 'object', - additionalProperties: { - type: 'array', - items: { - $ref: '#/definitions/ModelWithString', - }, + description: 'This is a complex dictionary', + type: 'object', + additionalProperties: { + type: 'array', + items: { + $ref: '#/definitions/ModelWithString', }, + }, } as const; export const $DictionaryWithDictionary = { - description: 'This is a string dictionary', + description: 'This is a string dictionary', + type: 'object', + additionalProperties: { type: 'object', additionalProperties: { - type: 'object', - additionalProperties: { - type: 'string', - }, + type: 'string', }, + }, } as const; export const $DictionaryWithProperties = { - description: 'This is a complex dictionary', + description: 'This is a complex dictionary', + type: 'object', + additionalProperties: { type: 'object', - additionalProperties: { - type: 'object', - properties: { - foo: { - type: 'string', - }, - bar: { - type: 'string', - }, - }, + properties: { + foo: { + type: 'string', + }, + bar: { + type: 'string', + }, }, + }, } as const; export const $Date = { - description: 'This is a type-only model that defines Date as a string', - type: 'string', + description: 'This is a type-only model that defines Date as a string', + type: 'string', } as const; export const $ModelWithInteger = { - description: 'This is a model with one number property', - type: 'object', - properties: { - prop: { - description: 'This is a simple number property', - type: 'integer', - }, + description: 'This is a model with one number property', + type: 'object', + properties: { + prop: { + description: 'This is a simple number property', + type: 'integer', }, + }, } as const; export const $ModelWithBoolean = { - description: 'This is a model with one boolean property', - type: 'object', - properties: { - prop: { - description: 'This is a simple boolean property', - type: 'boolean', - }, + description: 'This is a model with one boolean property', + type: 'object', + properties: { + prop: { + description: 'This is a simple boolean property', + type: 'boolean', }, + }, } as const; export const $ModelWithString = { - description: 'This is a model with one string property', - type: 'object', - properties: { - prop: { - description: 'This is a simple string property', - type: 'string', - }, + description: 'This is a model with one string property', + type: 'object', + properties: { + prop: { + description: 'This is a simple string property', + type: 'string', }, + }, } as const; export const $ModelWithNullableString = { - description: 'This is a model with one string property', - type: 'object', - required: ['nullableRequiredProp'], - properties: { - nullableProp: { - description: 'This is a simple string property', - type: 'string', - 'x-nullable': true, - }, - nullableRequiredProp: { - description: 'This is a simple string property', - type: 'string', - 'x-nullable': true, - }, + description: 'This is a model with one string property', + type: 'object', + required: ['nullableRequiredProp'], + properties: { + nullableProp: { + description: 'This is a simple string property', + type: 'string', + 'x-nullable': true, + }, + nullableRequiredProp: { + description: 'This is a simple string property', + type: 'string', + 'x-nullable': true, }, + }, } as const; export const $ModelWithEnum = { - description: 'This is a model with one enum', - type: 'object', - properties: { - test: { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], - }, - statusCode: { - description: 'These are the HTTP error code enums', - enum: ['100', '200 FOO', '300 FOO_BAR', '400 foo-bar', '500 foo.bar', '600 foo&bar'], - }, - bool: { - description: 'Simple boolean enum', - type: 'boolean', - enum: [true], - }, + description: 'This is a model with one enum', + type: 'object', + properties: { + test: { + description: 'This is a simple enum with strings', + enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], + }, + statusCode: { + description: 'These are the HTTP error code enums', + enum: [ + '100', + '200 FOO', + '300 FOO_BAR', + '400 foo-bar', + '500 foo.bar', + '600 foo&bar', + ], }, + bool: { + description: 'Simple boolean enum', + type: 'boolean', + enum: [true], + }, + }, } as const; export const $ModelWithEnumFromDescription = { - description: 'This is a model with one enum', - type: 'object', - properties: { - test: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, + description: 'This is a model with one enum', + type: 'object', + properties: { + test: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', }, + }, } as const; export const $ModelWithNestedEnums = { - description: 'This is a model with nested enums', - type: 'object', - properties: { - dictionaryWithEnum: { - type: 'object', - additionalProperties: { - enum: ['Success', 'Warning', 'Error'], - }, - }, - dictionaryWithEnumFromDescription: { - type: 'object', - additionalProperties: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, - }, - arrayWithEnum: { - type: 'array', - items: { - enum: ['Success', 'Warning', 'Error'], - }, - }, - arrayWithDescription: { - type: 'array', - items: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, - }, + description: 'This is a model with nested enums', + type: 'object', + properties: { + dictionaryWithEnum: { + type: 'object', + additionalProperties: { + enum: ['Success', 'Warning', 'Error'], + }, }, + dictionaryWithEnumFromDescription: { + type: 'object', + additionalProperties: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', + }, + }, + arrayWithEnum: { + type: 'array', + items: { + enum: ['Success', 'Warning', 'Error'], + }, + }, + arrayWithDescription: { + type: 'array', + items: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', + }, + }, + }, } as const; export const $ModelWithReference = { - description: 'This is a model with one property containing a reference', - type: 'object', - properties: { - prop: { - $ref: '#/definitions/ModelWithProperties', - }, + description: 'This is a model with one property containing a reference', + type: 'object', + properties: { + prop: { + $ref: '#/definitions/ModelWithProperties', }, + }, } as const; export const $ModelWithArray = { - description: 'This is a model with one property containing an array', - type: 'object', - properties: { - prop: { - type: 'array', - items: { - $ref: '#/definitions/ModelWithString', - }, - }, - propWithFile: { - type: 'array', - items: { - type: 'file', - }, - }, - propWithNumber: { - type: 'array', - items: { - type: 'number', - }, - }, + description: 'This is a model with one property containing an array', + type: 'object', + properties: { + prop: { + type: 'array', + items: { + $ref: '#/definitions/ModelWithString', + }, }, + propWithFile: { + type: 'array', + items: { + type: 'file', + }, + }, + propWithNumber: { + type: 'array', + items: { + type: 'number', + }, + }, + }, } as const; export const $ModelWithDictionary = { - description: 'This is a model with one property containing a dictionary', - type: 'object', - properties: { - prop: { - type: 'object', - additionalProperties: { - type: 'string', - }, - }, + description: 'This is a model with one property containing a dictionary', + type: 'object', + properties: { + prop: { + type: 'object', + additionalProperties: { + type: 'string', + }, }, + }, } as const; export const $ModelWithCircularReference = { - description: 'This is a model with one property containing a circular reference', - type: 'object', - properties: { - prop: { - $ref: '#/definitions/ModelWithCircularReference', - }, + description: + 'This is a model with one property containing a circular reference', + type: 'object', + properties: { + prop: { + $ref: '#/definitions/ModelWithCircularReference', }, + }, } as const; export const $ModelWithProperties = { - description: 'This is a model with one nested property', - type: 'object', - required: ['required', 'requiredAndReadOnly'], - properties: { - required: { - type: 'string', - }, - requiredAndReadOnly: { - type: 'string', - readOnly: true, - }, - string: { - type: 'string', - }, - number: { - type: 'number', - }, - boolean: { - type: 'boolean', - }, - reference: { - $ref: '#/definitions/ModelWithString', - }, - 'property with space': { - type: 'string', - }, - default: { - type: 'string', - }, - try: { - type: 'string', - }, - '@namespace.string': { - type: 'string', - readOnly: true, - }, - '@namespace.integer': { - type: 'integer', - readOnly: true, - }, + description: 'This is a model with one nested property', + type: 'object', + required: ['required', 'requiredAndReadOnly'], + properties: { + required: { + type: 'string', + }, + requiredAndReadOnly: { + type: 'string', + readOnly: true, + }, + string: { + type: 'string', + }, + number: { + type: 'number', + }, + boolean: { + type: 'boolean', + }, + reference: { + $ref: '#/definitions/ModelWithString', }, + 'property with space': { + type: 'string', + }, + default: { + type: 'string', + }, + try: { + type: 'string', + }, + '@namespace.string': { + type: 'string', + readOnly: true, + }, + '@namespace.integer': { + type: 'integer', + readOnly: true, + }, + }, } as const; export const $ModelWithNestedProperties = { - description: 'This is a model with one nested property', - type: 'object', - required: ['first'], - properties: { - first: { - type: 'object', - required: ['second'], - readOnly: true, - properties: { - second: { - type: 'object', - required: ['third'], - readOnly: true, - properties: { - third: { - type: 'string', - readOnly: true, - }, - }, - }, + description: 'This is a model with one nested property', + type: 'object', + required: ['first'], + properties: { + first: { + type: 'object', + required: ['second'], + readOnly: true, + properties: { + second: { + type: 'object', + required: ['third'], + readOnly: true, + properties: { + third: { + type: 'string', + readOnly: true, }, + }, }, + }, }, + }, } as const; export const $ModelWithDuplicateProperties = { - description: 'This is a model with duplicated properties', - type: 'object', - properties: { - prop: { - $ref: '#/definitions/ModelWithString', - }, + description: 'This is a model with duplicated properties', + type: 'object', + properties: { + prop: { + $ref: '#/definitions/ModelWithString', }, + }, } as const; export const $ModelWithOrderedProperties = { - description: 'This is a model with ordered properties', - type: 'object', - properties: { - zebra: { - type: 'string', - }, - apple: { - type: 'string', - }, - hawaii: { - type: 'string', - }, + description: 'This is a model with ordered properties', + type: 'object', + properties: { + zebra: { + type: 'string', + }, + apple: { + type: 'string', }, + hawaii: { + type: 'string', + }, + }, } as const; export const $ModelWithDuplicateImports = { - description: 'This is a model with duplicated imports', - type: 'object', - properties: { - propA: { - $ref: '#/definitions/ModelWithString', - }, - propB: { - $ref: '#/definitions/ModelWithString', - }, - propC: { - $ref: '#/definitions/ModelWithString', - }, + description: 'This is a model with duplicated imports', + type: 'object', + properties: { + propA: { + $ref: '#/definitions/ModelWithString', }, + propB: { + $ref: '#/definitions/ModelWithString', + }, + propC: { + $ref: '#/definitions/ModelWithString', + }, + }, } as const; export const $ModelThatExtends = { - description: 'This is a model that extends another model', - type: 'object', - allOf: [ - { - $ref: '#/definitions/ModelWithString', + description: 'This is a model that extends another model', + type: 'object', + allOf: [ + { + $ref: '#/definitions/ModelWithString', + }, + { + type: 'object', + properties: { + propExtendsA: { + type: 'string', }, - { - type: 'object', - properties: { - propExtendsA: { - type: 'string', - }, - propExtendsB: { - $ref: '#/definitions/ModelWithString', - }, - }, + propExtendsB: { + $ref: '#/definitions/ModelWithString', }, - ], + }, + }, + ], } as const; export const $ModelThatExtendsExtends = { - description: 'This is a model that extends another model', - type: 'object', - allOf: [ - { - $ref: '#/definitions/ModelWithString', - }, - { - $ref: '#/definitions/ModelThatExtends', + description: 'This is a model that extends another model', + type: 'object', + allOf: [ + { + $ref: '#/definitions/ModelWithString', + }, + { + $ref: '#/definitions/ModelThatExtends', + }, + { + type: 'object', + properties: { + propExtendsC: { + type: 'string', }, - { - type: 'object', - properties: { - propExtendsC: { - type: 'string', - }, - propExtendsD: { - $ref: '#/definitions/ModelWithString', - }, - }, + propExtendsD: { + $ref: '#/definitions/ModelWithString', }, - ], + }, + }, + ], } as const; export const $default = { - type: 'object', - properties: { - name: { - type: 'string', - }, + type: 'object', + properties: { + name: { + type: 'string', }, + }, } as const; export const $ModelWithPattern = { - description: 'This is a model that contains a some patterns', - type: 'object', - required: ['key', 'name'], - properties: { - key: { - maxLength: 64, - pattern: '^[a-zA-Z0-9_]*$', - type: 'string', - }, - name: { - maxLength: 255, - type: 'string', - }, - enabled: { - type: 'boolean', - readOnly: true, - }, - modified: { - type: 'string', - format: 'date-time', - readOnly: true, - }, - id: { - type: 'string', - pattern: '^d{2}-d{3}-d{4}$', - }, - text: { - type: 'string', - pattern: '^w+$', - }, - patternWithSingleQuotes: { - type: 'string', - pattern: "^[a-zA-Z0-9']*$", - }, - patternWithNewline: { - type: 'string', - pattern: `aaa + description: 'This is a model that contains a some patterns', + type: 'object', + required: ['key', 'name'], + properties: { + key: { + maxLength: 64, + pattern: '^[a-zA-Z0-9_]*$', + type: 'string', + }, + name: { + maxLength: 255, + type: 'string', + }, + enabled: { + type: 'boolean', + readOnly: true, + }, + modified: { + type: 'string', + format: 'date-time', + readOnly: true, + }, + id: { + type: 'string', + pattern: '^d{2}-d{3}-d{4}$', + }, + text: { + type: 'string', + pattern: '^w+$', + }, + patternWithSingleQuotes: { + type: 'string', + pattern: "^[a-zA-Z0-9']*$", + }, + patternWithNewline: { + type: 'string', + pattern: `aaa bbb`, - }, - patternWithBacktick: { - type: 'string', - pattern: 'aaa`bbb', - }, }, + patternWithBacktick: { + type: 'string', + pattern: 'aaa`bbb', + }, + }, } as const; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/services.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/services.gen.ts.snap index 0731e4637..e5c119fd7 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/services.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/services.gen.ts.snap @@ -6,614 +6,655 @@ import { request as __request } from './core/request'; import type { $OpenApiTs } from './types.gen'; export class DefaultService { - /** - * @throws ApiError - */ - public static serviceWithEmptyTag(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/no-tag', - }); - } + /** + * @throws ApiError + */ + public static serviceWithEmptyTag(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/no-tag', + }); + } } export class SimpleService { - /** - * @throws ApiError - */ - public static getCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static putCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static postCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static deleteCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static optionsCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'OPTIONS', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static headCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'HEAD', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static patchCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'PATCH', - url: '/api/v{api-version}/simple', - }); - } + /** + * @throws ApiError + */ + public static getCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static putCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static postCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static deleteCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static optionsCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'OPTIONS', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static headCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'HEAD', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static patchCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/api/v{api-version}/simple', + }); + } } export class DescriptionsService { - /** - * @throws ApiError - */ - public static callWithDescriptions( - data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {} - ): CancelablePromise { - const { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/descriptions/', - query: { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDescriptions( + data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/descriptions/', + query: { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + }, + }); + } } export class ParametersService { - /** - * @throws ApiError - */ - public static callWithParameters( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'] - ): CancelablePromise { - const { parameterHeader, parameterQuery, parameterForm, parameterBody, parameterPath } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameterPath}', - path: { - parameterPath, - }, - headers: { - parameterHeader, - }, - query: { - parameterQuery, - }, - formData: { - parameterForm, - }, - body: parameterBody, - }); - } - - /** - * @throws ApiError - */ - public static callWithWeirdParameterNames( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'] - ): CancelablePromise { - const { - parameterHeader, - parameterQuery, - parameterForm, - parameterBody, - parameterPath1, - parameterPath2, - parameterPath3, - _default, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', - path: { - 'parameter.path.1': parameterPath1, - 'parameter-path-2': parameterPath2, - 'PARAMETER-PATH-3': parameterPath3, - }, - headers: { - 'parameter.header': parameterHeader, - }, - query: { - default: _default, - 'parameter-query': parameterQuery, - }, - formData: { - parameter_form: parameterForm, - }, - body: parameterBody, - }); - } + /** + * @throws ApiError + */ + public static callWithParameters( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + parameterQuery, + parameterForm, + parameterBody, + parameterPath, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameterPath}', + path: { + parameterPath, + }, + headers: { + parameterHeader, + }, + query: { + parameterQuery, + }, + formData: { + parameterForm, + }, + body: parameterBody, + }); + } + + /** + * @throws ApiError + */ + public static callWithWeirdParameterNames( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + parameterQuery, + parameterForm, + parameterBody, + parameterPath1, + parameterPath2, + parameterPath3, + _default, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + path: { + 'parameter.path.1': parameterPath1, + 'parameter-path-2': parameterPath2, + 'PARAMETER-PATH-3': parameterPath3, + }, + headers: { + 'parameter.header': parameterHeader, + }, + query: { + default: _default, + 'parameter-query': parameterQuery, + }, + formData: { + parameter_form: parameterForm, + }, + body: parameterBody, + }); + } } export class DefaultsService { - /** - * @throws ApiError - */ - public static callWithDefaultParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public static callWithDefaultOptionalParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public static callToTestOrderOfParams( - data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'] - ): CancelablePromise { - const { - parameterStringWithNoDefault, - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - } = data; - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/defaults', - query: { - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringWithNoDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDefaultParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'], + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public static callWithDefaultOptionalParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public static callToTestOrderOfParams( + data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'], + ): CancelablePromise { + const { + parameterStringWithNoDefault, + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + } = data; + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/defaults', + query: { + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringWithNoDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + }, + }); + } } export class DuplicateService { - /** - * @throws ApiError - */ - public static duplicateName(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName1(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName2(): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName3(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/duplicate', - }); - } + /** + * @throws ApiError + */ + public static duplicateName(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName1(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName2(): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName3(): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/duplicate', + }); + } } export class NoContentService { - /** - * @returns void Success - * @throws ApiError - */ - public static callWithNoContentResponse(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/no-content', - }); - } - - /** - * @returns unknown Response is a simple number - * @returns void Success - * @throws ApiError - */ - public static callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static callWithNoContentResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/no-content', + }); + } + + /** + * @returns unknown Response is a simple number + * @returns void Success + * @throws ApiError + */ + public static callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } } export class ResponseService { - /** - * @returns unknown Response is a simple number - * @returns void Success - * @throws ApiError - */ - public static callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } - - /** - * @returns ModelWithString Message for default response - * @throws ApiError - */ - public static callWithResponse(): CancelablePromise<$OpenApiTs['/api/v{api-version}/response']['get']['res'][200]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/response', - }); - } - - /** - * @returns ModelWithString Message for default response - * @throws ApiError - */ - public static callWithDuplicateResponses(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] - > { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } - - /** - * @returns unknown Message for 200 response - * @returns ModelWithString Message for default response - * @returns ModelThatExtends Message for 201 response - * @returns ModelThatExtendsExtends Message for 202 response - * @throws ApiError - */ - public static callWithResponses(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] - > { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } + /** + * @returns unknown Response is a simple number + * @returns void Success + * @throws ApiError + */ + public static callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } + + /** + * @returns ModelWithString Message for default response + * @throws ApiError + */ + public static callWithResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['get']['res'][200] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/response', + }); + } + + /** + * @returns ModelWithString Message for default response + * @throws ApiError + */ + public static callWithDuplicateResponses(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] + > { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } + + /** + * @returns unknown Message for 200 response + * @returns ModelWithString Message for default response + * @returns ModelThatExtends Message for 201 response + * @returns ModelThatExtendsExtends Message for 202 response + * @throws ApiError + */ + public static callWithResponses(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] + > { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } } export class MultipleTags1Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags2Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags3Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class CollectionFormatService { - /** - * @throws ApiError - */ - public static collectionFormat( - data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'] - ): CancelablePromise { - const { parameterArrayCsv, parameterArraySsv, parameterArrayTsv, parameterArrayPipes, parameterArrayMulti } = - data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/collectionFormat', - query: { - parameterArrayCSV: parameterArrayCsv, - parameterArraySSV: parameterArraySsv, - parameterArrayTSV: parameterArrayTsv, - parameterArrayPipes, - parameterArrayMulti, - }, - }); - } + /** + * @throws ApiError + */ + public static collectionFormat( + data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'], + ): CancelablePromise { + const { + parameterArrayCsv, + parameterArraySsv, + parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/collectionFormat', + query: { + parameterArrayCSV: parameterArrayCsv, + parameterArraySSV: parameterArraySsv, + parameterArrayTSV: parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + }, + }); + } } export class TypesService { - /** - * @returns number Response is a simple number - * @returns string Response is a simple string - * @returns boolean Response is a simple boolean - * @returns unknown Response is a simple object - * @throws ApiError - */ - public static types( - data: $OpenApiTs['/api/v{api-version}/types']['get']['req'] - ): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] - > { - const { - parameterArray, - parameterDictionary, - parameterEnum, - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - id, - } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/types', - path: { - id, - }, - query: { - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - parameterArray, - parameterDictionary, - parameterEnum, - }, - }); - } + /** + * @returns number Response is a simple number + * @returns string Response is a simple string + * @returns boolean Response is a simple boolean + * @returns unknown Response is a simple object + * @throws ApiError + */ + public static types( + data: $OpenApiTs['/api/v{api-version}/types']['get']['req'], + ): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] + > { + const { + parameterArray, + parameterDictionary, + parameterEnum, + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + id, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/types', + path: { + id, + }, + query: { + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + parameterArray, + parameterDictionary, + parameterEnum, + }, + }); + } } export class ComplexService { - /** - * @returns ModelWithString Successful response - * @throws ApiError - */ - public static complexTypes( - data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/complex']['get']['res'][200]> { - const { parameterObject, parameterReference } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/complex', - query: { - parameterObject, - parameterReference, - }, - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } + /** + * @returns ModelWithString Successful response + * @throws ApiError + */ + public static complexTypes( + data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/complex']['get']['res'][200] + > { + const { parameterObject, parameterReference } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/complex', + query: { + parameterObject, + parameterReference, + }, + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } } export class HeaderService { - /** - * @returns string Successful response - * @throws ApiError - */ - public static callWithResultFromHeader(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] - > { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/header', - responseHeader: 'operation-location', - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } + /** + * @returns string Successful response + * @throws ApiError + */ + public static callWithResultFromHeader(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] + > { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/header', + responseHeader: 'operation-location', + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } } export class ErrorService { - /** - * @returns unknown Custom message: Successful response - * @throws ApiError - */ - public static testErrorCode( - data: $OpenApiTs['/api/v{api-version}/error']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/error']['post']['res'][200]> { - const { status } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/error', - query: { - status, - }, - errors: { - 500: 'Custom message: Internal Server Error', - 501: 'Custom message: Not Implemented', - 502: 'Custom message: Bad Gateway', - 503: 'Custom message: Service Unavailable', - }, - }); - } + /** + * @returns unknown Custom message: Successful response + * @throws ApiError + */ + public static testErrorCode( + data: $OpenApiTs['/api/v{api-version}/error']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/error']['post']['res'][200] + > { + const { status } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/error', + query: { + status, + }, + errors: { + 500: 'Custom message: Internal Server Error', + 501: 'Custom message: Not Implemented', + 502: 'Custom message: Bad Gateway', + 503: 'Custom message: Service Unavailable', + }, + }); + } } export class NonAsciiÆøåÆøÅöôêÊService { - /** - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response - * @throws ApiError - */ - public static nonAsciiæøåÆøÅöôêÊ字符串( - data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200]> { - const { nonAsciiParamæøåÆøÅöôêÊ } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', - query: { - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, - }, - }); - } + /** + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response + * @throws ApiError + */ + public static nonAsciiæøåÆøÅöôêÊ字符串( + data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200] + > { + const { nonAsciiParamæøåÆøÅöôêÊ } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + query: { + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, + }, + }); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v2/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v2/types.gen.ts.snap index 7af5469c2..a7ed2c02e 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v2/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v2/types.gen.ts.snap @@ -77,17 +77,32 @@ export type SimpleStringWithPattern = string; * This is a simple enum with strings */ export type EnumWithStrings = - | 'Success' - | 'Warning' - | 'Error' - | "'Single Quote'" - | '"Double Quotes"' - | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + | 'Success' + | 'Warning' + | 'Error' + | "'Single Quote'" + | '"Double Quotes"' + | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; /** * This is a simple enum with numbers */ -export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; +export type EnumWithNumbers = + | 1 + | 2 + | 3 + | 1.1 + | 1.2 + | 1.3 + | 100 + | 200 + | 300 + | -100 + | -200 + | -300 + | -1.1 + | -1.2 + | -1.3; /** * Success=1,Warning=2,Error=3 @@ -128,48 +143,48 @@ export type ArrayWithArray = Array>; * This is a simple array with properties */ export type ArrayWithProperties = Array<{ - foo?: string; - bar?: string; + foo?: string; + bar?: string; }>; /** * This is a string dictionary */ export type DictionaryWithString = { - [key: string]: string; + [key: string]: string; }; /** * This is a string reference */ export type DictionaryWithReference = { - [key: string]: ModelWithString; + [key: string]: ModelWithString; }; /** * This is a complex dictionary */ export type DictionaryWithArray = { - [key: string]: Array; + [key: string]: Array; }; /** * This is a string dictionary */ export type DictionaryWithDictionary = { - [key: string]: { - [key: string]: string; - }; + [key: string]: { + [key: string]: string; + }; }; /** * This is a complex dictionary */ export type DictionaryWithProperties = { - [key: string]: { - foo?: string; - bar?: string; - }; + [key: string]: { + foo?: string; + bar?: string; + }; }; /** @@ -181,621 +196,627 @@ export type Date = string; * This is a model with one number property */ export type ModelWithInteger = { - /** - * This is a simple number property - */ - prop?: number; + /** + * This is a simple number property + */ + prop?: number; }; /** * This is a model with one boolean property */ export type ModelWithBoolean = { - /** - * This is a simple boolean property - */ - prop?: boolean; + /** + * This is a simple boolean property + */ + prop?: boolean; }; /** * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; /** * This is a model with one string property */ export type ModelWithNullableString = { - /** - * This is a simple string property - */ - nullableProp?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp: string | null; + /** + * This is a simple string property + */ + nullableProp?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp: string | null; }; /** * This is a model with one enum */ export type ModelWithEnum = { - /** - * This is a simple enum with strings - */ - test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; - /** - * These are the HTTP error code enums - */ - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; - /** - * Simple boolean enum - */ - bool?: boolean; + /** + * This is a simple enum with strings + */ + test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: + | '100' + | '200 FOO' + | '300 FOO_BAR' + | '400 foo-bar' + | '500 foo.bar' + | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: boolean; }; /** * This is a model with one enum */ export type ModelWithEnumFromDescription = { - /** - * Success=1,Warning=2,Error=3 - */ - test?: number; + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; }; /** * This is a model with nested enums */ export type ModelWithNestedEnums = { - dictionaryWithEnum?: { - [key: string]: 'Success' | 'Warning' | 'Error'; - }; - dictionaryWithEnumFromDescription?: { - [key: string]: number; - }; - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; - arrayWithDescription?: Array; + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; }; /** * This is a model with one property containing a reference */ export type ModelWithReference = { - prop?: ModelWithProperties; + prop?: ModelWithProperties; }; /** * This is a model with one property containing an array */ export type ModelWithArray = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing a dictionary */ export type ModelWithDictionary = { - prop?: { - [key: string]: string; - }; + prop?: { + [key: string]: string; + }; }; /** * This is a model with one property containing a circular reference */ export type ModelWithCircularReference = { - prop?: ModelWithCircularReference; + prop?: ModelWithCircularReference; }; /** * This is a model with one nested property */ export type ModelWithProperties = { - required: string; - readonly requiredAndReadOnly: string; - string?: string; - number?: number; - boolean?: boolean; - reference?: ModelWithString; - 'property with space'?: string; - default?: string; - try?: string; - readonly '@namespace.string'?: string; - readonly '@namespace.integer'?: number; + required: string; + readonly requiredAndReadOnly: string; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; }; /** * This is a model with one nested property */ export type ModelWithNestedProperties = { - readonly first: { - readonly second: { - readonly third: string; - }; + readonly first: { + readonly second: { + readonly third: string; }; + }; }; /** * This is a model with duplicated properties */ export type ModelWithDuplicateProperties = { - prop?: ModelWithString; + prop?: ModelWithString; }; /** * This is a model with ordered properties */ export type ModelWithOrderedProperties = { - zebra?: string; - apple?: string; - hawaii?: string; + zebra?: string; + apple?: string; + hawaii?: string; }; /** * This is a model with duplicated imports */ export type ModelWithDuplicateImports = { - propA?: ModelWithString; - propB?: ModelWithString; - propC?: ModelWithString; + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtends = ModelWithString & { - propExtendsA?: string; - propExtendsB?: ModelWithString; + propExtendsA?: string; + propExtendsB?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtendsExtends = ModelWithString & - ModelThatExtends & { - propExtendsC?: string; - propExtendsD?: ModelWithString; - }; + ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; + }; export type _default = { - name?: string; + name?: string; }; /** * This is a model that contains a some patterns */ export type ModelWithPattern = { - key: string; - name: string; - readonly enabled?: boolean; - readonly modified?: string; - id?: string; - text?: string; - patternWithSingleQuotes?: string; - patternWithNewline?: string; - patternWithBacktick?: string; + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; }; export type $OpenApiTs = { - '/api/v{api-version}/descriptions/': { - post: { - req: { - /** - * Testing backticks in string: `backticks` and ```multiple backticks``` should work - */ - parameterWithBackticks?: string; - /** - * Testing multiline comments in string: First line - * Second line - * - * Fourth line - */ - parameterWithBreaks?: string; - /** - * Testing expression placeholders in string: ${expression} should work - */ - parameterWithExpressionPlaceholders?: string; - /** - * Testing quotes in string: 'single quote''' and "double quotes""" should work - */ - parameterWithQuotes?: string; - /** - * Testing reserved characters in string: * inline * and ** inline ** should work - */ - parameterWithReservedCharacters?: string; - /** - * Testing slashes in string: \backwards\\\ and /forwards/// should work - */ - parameterWithSlashes?: string; - }; - }; + '/api/v{api-version}/descriptions/': { + post: { + req: { + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: string; + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: string; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: string; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: string; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: string; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: string; + }; }; - '/api/v{api-version}/parameters/{parameterPath}': { - post: { - req: { - /** - * This is the parameter that is sent as request body - */ - parameterBody: string; - /** - * This is the parameter that goes into the form data - */ - parameterForm: string; - /** - * This is the parameter that goes into the header - */ - parameterHeader: string; - /** - * This is the parameter that goes into the path - */ - parameterPath: string; - /** - * This is the parameter that goes into the query params - */ - parameterQuery: string; - }; - }; + }; + '/api/v{api-version}/parameters/{parameterPath}': { + post: { + req: { + /** + * This is the parameter that is sent as request body + */ + parameterBody: string; + /** + * This is the parameter that goes into the form data + */ + parameterForm: string; + /** + * This is the parameter that goes into the header + */ + parameterHeader: string; + /** + * This is the parameter that goes into the path + */ + parameterPath: string; + /** + * This is the parameter that goes into the query params + */ + parameterQuery: string; + }; }; - '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { - post: { - req: { - /** - * This is the parameter with a reserved keyword - */ - _default?: string; - /** - * This is the parameter that is sent as request body - */ - parameterBody: string; - /** - * This is the parameter that goes into the request form data - */ - parameterForm: string; - /** - * This is the parameter that goes into the request header - */ - parameterHeader: string; - /** - * This is the parameter that goes into the path - */ - parameterPath1?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath2?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath3?: string; - /** - * This is the parameter that goes into the request query params - */ - parameterQuery: string; - }; - }; + }; + '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { + post: { + req: { + /** + * This is the parameter with a reserved keyword + */ + _default?: string; + /** + * This is the parameter that is sent as request body + */ + parameterBody: string; + /** + * This is the parameter that goes into the request form data + */ + parameterForm: string; + /** + * This is the parameter that goes into the request header + */ + parameterHeader: string; + /** + * This is the parameter that goes into the path + */ + parameterPath1?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath2?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath3?: string; + /** + * This is the parameter that goes into the request query params + */ + parameterQuery: string; + }; }; - '/api/v{api-version}/defaults': { - get: { - req: { - /** - * This is a simple boolean with default value - */ - parameterBoolean: boolean; - /** - * This is a simple enum with default value - */ - parameterEnum: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model with default value - */ - parameterModel: ModelWithString; - /** - * This is a simple number with default value - */ - parameterNumber: number; - /** - * This is a simple string with default value - */ - parameterString: string; - }; - }; - post: { - req: { - /** - * This is a simple boolean that is optional with default value - */ - parameterBoolean?: boolean; - /** - * This is a simple enum that is optional with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model that is optional with default value - */ - parameterModel?: ModelWithString; - /** - * This is a simple number that is optional with default value - */ - parameterNumber?: number; - /** - * This is a simple string that is optional with default value - */ - parameterString?: string; - }; - }; - put: { - req: { - /** - * This is a optional string with default - */ - parameterOptionalStringWithDefault?: string; - /** - * This is a optional string with empty default - */ - parameterOptionalStringWithEmptyDefault?: string; - /** - * This is a optional string with no default - */ - parameterOptionalStringWithNoDefault?: string; - /** - * This is a string that can be null with default - */ - parameterStringNullableWithDefault?: string | null; - /** - * This is a string that can be null with no default - */ - parameterStringNullableWithNoDefault?: string | null; - /** - * This is a string with default - */ - parameterStringWithDefault: string; - /** - * This is a string with empty default - */ - parameterStringWithEmptyDefault: string; - /** - * This is a string with no default - */ - parameterStringWithNoDefault: string; - }; - }; + }; + '/api/v{api-version}/defaults': { + get: { + req: { + /** + * This is a simple boolean with default value + */ + parameterBoolean: boolean; + /** + * This is a simple enum with default value + */ + parameterEnum: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel: ModelWithString; + /** + * This is a simple number with default value + */ + parameterNumber: number; + /** + * This is a simple string with default value + */ + parameterString: string; + }; }; - '/api/v{api-version}/no-content': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + post: { + req: { + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + }; }; - '/api/v{api-version}/multiple-tags/response-and-no-content': { - get: { - res: { - /** - * Response is a simple number - */ - 200: unknown; - /** - * Success - */ - 204: void; - }; - }; + put: { + req: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + }; }; - '/api/v{api-version}/response': { - get: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - }; - }; - post: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - }; - }; - put: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - /** - * Message for 201 response - */ - 201: ModelThatExtends; - /** - * Message for 202 response - */ - 202: ModelThatExtendsExtends; - }; - }; + }; + '/api/v{api-version}/no-content': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/multiple-tags/a': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/multiple-tags/response-and-no-content': { + get: { + res: { + /** + * Response is a simple number + */ + 200: unknown; + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/multiple-tags/b': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/response': { + get: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/collectionFormat': { - get: { - req: { - /** - * This is an array parameter that is sent as csv format (comma-separated values) - */ - parameterArrayCsv: Array; - /** - * This is an array parameter that is sent as multi format (multiple parameter instances) - */ - parameterArrayMulti: Array; - /** - * This is an array parameter that is sent as pipes format (pipe-separated values) - */ - parameterArrayPipes: Array; - /** - * This is an array parameter that is sent as ssv format (space-separated values) - */ - parameterArraySsv: Array; - /** - * This is an array parameter that is sent as tsv format (tab-separated values) - */ - parameterArrayTsv: Array; - }; - }; + post: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/types': { - get: { - req: { - /** - * This is a number parameter - */ - id?: number; - /** - * This is an array parameter - */ - parameterArray: Array; - /** - * This is a boolean parameter - */ - parameterBoolean: boolean; - /** - * This is a dictionary parameter - */ - parameterDictionary: { - [key: string]: string; - }; - /** - * This is an enum parameter - */ - parameterEnum: 'Success' | 'Warning' | 'Error'; - /** - * This is a number parameter - */ - parameterNumber: number; - /** - * This is an object parameter - */ - parameterObject: unknown; - /** - * This is a string parameter - */ - parameterString: string; - }; - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Response is a simple string - */ - 201: string; - /** - * Response is a simple boolean - */ - 202: boolean; - /** - * Response is a simple object - */ - 203: unknown; - }; - }; + put: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; + }; }; - '/api/v{api-version}/complex': { - get: { - req: { - /** - * Parameter containing object - */ - parameterObject: { - first?: { - second?: { - third?: string; - }; - }; - }; - /** - * Parameter containing reference - */ - parameterReference: ModelWithString; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; - }; + }; + '/api/v{api-version}/multiple-tags/a': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/header': { - post: { - res: { - /** - * Successful response - */ - 200: string; - }; - }; + }; + '/api/v{api-version}/multiple-tags/b': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/error': { - post: { - req: { - /** - * Status code to return - */ - status: string; - }; - res: { - /** - * Custom message: Successful response - */ - 200: unknown; - }; + }; + '/api/v{api-version}/collectionFormat': { + get: { + req: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCsv: Array; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySsv: Array; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTsv: Array; + }; + }; + }; + '/api/v{api-version}/types': { + get: { + req: { + /** + * This is a number parameter + */ + id?: number; + /** + * This is an array parameter + */ + parameterArray: Array; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: string; }; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error'; + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is an object parameter + */ + parameterObject: unknown; + /** + * This is a string parameter + */ + parameterString: string; + }; + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: unknown; + }; }; - '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { - post: { - req: { - /** - * Dummy input param - */ - nonAsciiParamæøåÆøÅöôêÊ: number; - }; - res: { - /** - * Successful response - */ - 200: NonAsciiStringæøåÆØÅöôêÊ字符串; + }; + '/api/v{api-version}/complex': { + get: { + req: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; }; + }; }; + /** + * Parameter containing reference + */ + parameterReference: ModelWithString; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; + }; + }; + '/api/v{api-version}/header': { + post: { + res: { + /** + * Successful response + */ + 200: string; + }; + }; + }; + '/api/v{api-version}/error': { + post: { + req: { + /** + * Status code to return + */ + status: string; + }; + res: { + /** + * Custom message: Successful response + */ + 200: unknown; + }; + }; + }; + '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { + post: { + req: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆøÅöôêÊ: number; + }; + res: { + /** + * Successful response + */ + 200: NonAsciiStringæøåÆØÅöôêÊ字符串; + }; }; + }; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/OpenAPI.ts.snap index 64be05544..5c1459c6b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/OpenAPI.ts.snap @@ -5,46 +5,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/request.ts.snap index bee3d3694..eb8aae7f7 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/core/request.ts.snap @@ -6,305 +6,329 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + let request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } + for (const fn of config.interceptors.request._fns) { + request = await fn(request); + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = [ - 'application/octet-stream', - 'application/pdf', - 'application/zip', - 'audio/', - 'image/', - 'video/', - ]; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const binaryTypes = [ + 'application/octet-stream', + 'application/pdf', + 'application/zip', + 'audio/', + 'image/', + 'video/', + ]; + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return await response.json(); + } else if (binaryTypes.some((type) => contentType.includes(type))) { + return await response.blob(); + } else if (contentType.includes('multipart/form-data')) { + return await response.formData(); + } else if (contentType.includes('text/')) { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -314,38 +338,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/enums.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/enums.gen.ts.snap index a1c7b9290..e3117fd1b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/enums.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/enums.gen.ts.snap @@ -4,118 +4,118 @@ * This is a simple enum with strings */ export const EnumWithStringsEnum = { - SUCCESS: 'Success', - WARNING: 'Warning', - ERROR: 'Error', - _SINGLE_QUOTE_: "'Single Quote'", - _DOUBLE_QUOTES_: '"Double Quotes"', - NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串: 'Non-ascii: øæåôöØÆÅÔÖ字符串', + SUCCESS: 'Success', + WARNING: 'Warning', + ERROR: 'Error', + _SINGLE_QUOTE_: "'Single Quote'", + _DOUBLE_QUOTES_: '"Double Quotes"', + NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串: 'Non-ascii: øæåôöØÆÅÔÖ字符串', } as const; export const EnumWithReplacedCharactersEnum = { - _SINGLE_QUOTE_: "'Single Quote'", - _DOUBLE_QUOTES_: '"Double Quotes"', - ØÆÅÔÖ_ØÆÅÔÖ字符串: 'øæåôöØÆÅÔÖ字符串', - '_3.1': 3.1, - EMPTY_STRING: '', + _SINGLE_QUOTE_: "'Single Quote'", + _DOUBLE_QUOTES_: '"Double Quotes"', + ØÆÅÔÖ_ØÆÅÔÖ字符串: 'øæåôöØÆÅÔÖ字符串', + '_3.1': 3.1, + EMPTY_STRING: '', } as const; /** * This is a simple enum with numbers */ export const EnumWithNumbersEnum = { - _1: 1, - _2: 2, - _3: 3, - '_1.1': 1.1, - '_1.2': 1.2, - '_1.3': 1.3, - _100: 100, - _200: 200, - _300: 300, - '_-100': -100, - '_-200': -200, - '_-300': -300, - '_-1.1': -1.1, - '_-1.2': -1.2, - '_-1.3': -1.3, + _1: 1, + _2: 2, + _3: 3, + '_1.1': 1.1, + '_1.2': 1.2, + '_1.3': 1.3, + _100: 100, + _200: 200, + _300: 300, + '_-100': -100, + '_-200': -200, + '_-300': -300, + '_-1.1': -1.1, + '_-1.2': -1.2, + '_-1.3': -1.3, } as const; /** * This is a simple enum with numbers */ export const EnumWithExtensionsEnum = { - /** - * Used when the status of something is successful - */ - CUSTOM_SUCCESS: 200, - /** - * Used when the status of something has a warning - */ - CUSTOM_WARNING: 400, - /** - * Used when the status of something has an error - */ - CUSTOM_ERROR: 500, + /** + * Used when the status of something is successful + */ + CUSTOM_SUCCESS: 200, + /** + * Used when the status of something has a warning + */ + CUSTOM_WARNING: 400, + /** + * Used when the status of something has an error + */ + CUSTOM_ERROR: 500, } as const; export const EnumWithXEnumNamesEnum = { - zero: 0, - one: 1, - two: 2, + zero: 0, + one: 1, + two: 2, } as const; /** * This is a simple enum with strings */ export const FooBarEnumEnum = { - SUCCESS: 'Success', - WARNING: 'Warning', - ERROR: 'Error', - ØÆÅ字符串: 'ØÆÅ字符串', + SUCCESS: 'Success', + WARNING: 'Warning', + ERROR: 'Error', + ØÆÅ字符串: 'ØÆÅ字符串', } as const; /** * These are the HTTP error code enums */ export const StatusCodeEnum = { - _100: '100', - _200_FOO: '200 FOO', - _300_FOO_BAR: '300 FOO_BAR', - _400_FOO_BAR: '400 foo-bar', - _500_FOO_BAR: '500 foo.bar', - _600_FOO_BAR: '600 foo&bar', + _100: '100', + _200_FOO: '200 FOO', + _300_FOO_BAR: '300 FOO_BAR', + _400_FOO_BAR: '400 foo-bar', + _500_FOO_BAR: '500 foo.bar', + _600_FOO_BAR: '600 foo&bar', } as const; export const FooBarBazQuxEnum = { - _3_0: '3.0', + _3_0: '3.0', } as const; export const Enum1Enum = { - BIRD: 'Bird', - DOG: 'Dog', + BIRD: 'Bird', + DOG: 'Dog', } as const; export const FooEnum = { - BAR: 'Bar', + BAR: 'Bar', } as const; export const ModelWithNestedArrayEnumsDataFooEnum = { - FOO: 'foo', - BAR: 'bar', + FOO: 'foo', + BAR: 'bar', } as const; export const ModelWithNestedArrayEnumsDataBarEnum = { - BAZ: 'baz', - QUX: 'qux', + BAZ: 'baz', + QUX: 'qux', } as const; /** * Период */ export const ValueEnum = { - _1: 1, - _3: 3, - _6: 6, - _12: 12, + _1: 1, + _3: 3, + _6: 6, + _12: 12, } as const; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/schemas.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/schemas.gen.ts.snap index 3c14bc9a9..89d119987 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/schemas.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/schemas.gen.ts.snap @@ -1,1642 +1,1672 @@ // This file is auto-generated by @hey-api/openapi-ts export const $camelCaseCommentWithBreaks = { - description: `Testing multiline comments in string: First line + description: `Testing multiline comments in string: First line Second line Fourth line`, - type: 'integer', + type: 'integer', } as const; export const $CommentWithBreaks = { - description: `Testing multiline comments in string: First line + description: `Testing multiline comments in string: First line Second line Fourth line`, - type: 'integer', + type: 'integer', } as const; export const $CommentWithBackticks = { - description: 'Testing backticks in string: `backticks` and ```multiple backticks``` should work', - type: 'integer', + description: + 'Testing backticks in string: `backticks` and ```multiple backticks``` should work', + type: 'integer', } as const; export const $CommentWithBackticksAndQuotes = { - description: `Testing backticks and quotes in string: \`backticks\`, 'quotes', "double quotes" and \`\`\`multiple backticks\`\`\` should work`, - type: 'integer', + description: `Testing backticks and quotes in string: \`backticks\`, 'quotes', "double quotes" and \`\`\`multiple backticks\`\`\` should work`, + type: 'integer', } as const; export const $CommentWithSlashes = { - description: 'Testing slashes in string: \backwards\\ and /forwards/// should work', - type: 'integer', + description: + 'Testing slashes in string: \backwards\\ and /forwards/// should work', + type: 'integer', } as const; export const $CommentWithExpressionPlaceholders = { - description: 'Testing expression placeholders in string: ${expression} should work', - type: 'integer', + description: + 'Testing expression placeholders in string: ${expression} should work', + type: 'integer', } as const; export const $CommentWithQuotes = { - description: `Testing quotes in string: 'single quote''' and "double quotes""" should work`, - type: 'integer', + description: `Testing quotes in string: 'single quote''' and "double quotes""" should work`, + type: 'integer', } as const; export const $CommentWithReservedCharacters = { - description: 'Testing reserved characters in string: /* inline */ and /** inline **/ should work', - type: 'integer', + description: + 'Testing reserved characters in string: /* inline */ and /** inline **/ should work', + type: 'integer', } as const; export const $SimpleInteger = { - description: 'This is a simple number', - type: 'integer', + description: 'This is a simple number', + type: 'integer', } as const; export const $SimpleBoolean = { - description: 'This is a simple boolean', - type: 'boolean', + description: 'This is a simple boolean', + type: 'boolean', } as const; export const $SimpleString = { - description: 'This is a simple string', - type: 'string', + description: 'This is a simple string', + type: 'string', } as const; export const $NonAsciiStringæøåÆØÅöôêÊ字符串 = { - description: 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)', - type: 'string', + description: + 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)', + type: 'string', } as const; export const $SimpleFile = { - description: 'This is a simple file', - type: 'file', + description: 'This is a simple file', + type: 'file', } as const; export const $SimpleReference = { - description: 'This is a simple reference', - $ref: '#/components/schemas/ModelWithString', + description: 'This is a simple reference', + $ref: '#/components/schemas/ModelWithString', } as const; export const $SimpleStringWithPattern = { - description: 'This is a simple string', - type: 'string', - nullable: true, - maxLength: 64, - pattern: '^[a-zA-Z0-9_]*$', + description: 'This is a simple string', + type: 'string', + nullable: true, + maxLength: 64, + pattern: '^[a-zA-Z0-9_]*$', } as const; export const $EnumWithStrings = { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', "'Single Quote'", '"Double Quotes"', 'Non-ascii: øæåôöØÆÅÔÖ字符串'], + description: 'This is a simple enum with strings', + enum: [ + 'Success', + 'Warning', + 'Error', + "'Single Quote'", + '"Double Quotes"', + 'Non-ascii: øæåôöØÆÅÔÖ字符串', + ], } as const; export const $EnumWithReplacedCharacters = { - enum: ["'Single Quote'", '"Double Quotes"', 'øæåôöØÆÅÔÖ字符串', 3.1, ''], - type: 'string', + enum: ["'Single Quote'", '"Double Quotes"', 'øæåôöØÆÅÔÖ字符串', 3.1, ''], + type: 'string', } as const; export const $EnumWithNumbers = { - description: 'This is a simple enum with numbers', - enum: [1, 2, 3, 1.1, 1.2, 1.3, 100, 200, 300, -100, -200, -300, -1.1, -1.2, -1.3], - default: 200, + description: 'This is a simple enum with numbers', + enum: [ + 1, 2, 3, 1.1, 1.2, 1.3, 100, 200, 300, -100, -200, -300, -1.1, -1.2, -1.3, + ], + default: 200, } as const; export const $EnumFromDescription = { - description: 'Success=1,Warning=2,Error=3', - type: 'number', + description: 'Success=1,Warning=2,Error=3', + type: 'number', } as const; export const $EnumWithExtensions = { - description: 'This is a simple enum with numbers', - enum: [200, 400, 500], - 'x-enum-varnames': ['CUSTOM_SUCCESS', 'CUSTOM_WARNING', 'CUSTOM_ERROR'], - 'x-enum-descriptions': [ - 'Used when the status of something is successful', - 'Used when the status of something has a warning', - 'Used when the status of something has an error', - ], + description: 'This is a simple enum with numbers', + enum: [200, 400, 500], + 'x-enum-varnames': ['CUSTOM_SUCCESS', 'CUSTOM_WARNING', 'CUSTOM_ERROR'], + 'x-enum-descriptions': [ + 'Used when the status of something is successful', + 'Used when the status of something has a warning', + 'Used when the status of something has an error', + ], } as const; export const $EnumWithXEnumNames = { - enum: [0, 1, 2], - 'x-enumNames': ['zero', 'one', 'two'], + enum: [0, 1, 2], + 'x-enumNames': ['zero', 'one', 'two'], } as const; export const $ArrayWithNumbers = { - description: 'This is a simple array with numbers', - type: 'array', - items: { - type: 'integer', - }, + description: 'This is a simple array with numbers', + type: 'array', + items: { + type: 'integer', + }, } as const; export const $ArrayWithBooleans = { - description: 'This is a simple array with booleans', - type: 'array', - items: { - type: 'boolean', - }, + description: 'This is a simple array with booleans', + type: 'array', + items: { + type: 'boolean', + }, } as const; export const $ArrayWithStrings = { - description: 'This is a simple array with strings', - type: 'array', - items: { - type: 'string', - }, - default: ['test'], + description: 'This is a simple array with strings', + type: 'array', + items: { + type: 'string', + }, + default: ['test'], } as const; export const $ArrayWithReferences = { - description: 'This is a simple array with references', - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a simple array with references', + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithString', + }, } as const; export const $ArrayWithArray = { - description: 'This is a simple array containing an array', + description: 'This is a simple array containing an array', + type: 'array', + items: { type: 'array', items: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, + $ref: '#/components/schemas/ModelWithString', }, + }, } as const; export const $ArrayWithProperties = { - description: 'This is a simple array with properties', - type: 'array', - items: { - type: 'object', - properties: { - foo: { - $ref: '#/components/schemas/camelCaseCommentWithBreaks', - }, - bar: { - type: 'string', - }, - }, + description: 'This is a simple array with properties', + type: 'array', + items: { + type: 'object', + properties: { + foo: { + $ref: '#/components/schemas/camelCaseCommentWithBreaks', + }, + bar: { + type: 'string', + }, }, + }, } as const; export const $ArrayWithAnyOfProperties = { - description: 'This is a simple array with any of properties', - type: 'array', - items: { - anyOf: [ - { - type: 'object', - properties: { - foo: { - type: 'string', - default: 'test', - }, - }, - }, - { - type: 'object', - properties: { - bar: { - type: 'string', - }, - }, - }, - ], - }, + description: 'This is a simple array with any of properties', + type: 'array', + items: { + anyOf: [ + { + type: 'object', + properties: { + foo: { + type: 'string', + default: 'test', + }, + }, + }, + { + type: 'object', + properties: { + bar: { + type: 'string', + }, + }, + }, + ], + }, } as const; export const $AnyOfAnyAndNull = { - type: 'object', - properties: { - data: { - anyOf: [ - {}, - { - type: 'null', - }, - ], + type: 'object', + properties: { + data: { + anyOf: [ + {}, + { + type: 'null', }, + ], }, + }, } as const; export const $AnyOfArrays = { - description: 'This is a simple array with any of properties', - type: 'object', - properties: { - results: { - items: { - anyOf: [ - { - type: 'object', - properties: { - foo: { - type: 'string', - }, - }, - }, - { - type: 'object', - properties: { - bar: { - type: 'string', - }, - }, - }, - ], + description: 'This is a simple array with any of properties', + type: 'object', + properties: { + results: { + items: { + anyOf: [ + { + type: 'object', + properties: { + foo: { + type: 'string', + }, }, - type: 'array', - }, + }, + { + type: 'object', + properties: { + bar: { + type: 'string', + }, + }, + }, + ], + }, + type: 'array', }, + }, } as const; export const $DictionaryWithString = { - description: 'This is a string dictionary', - type: 'object', - additionalProperties: { - type: 'string', - }, + description: 'This is a string dictionary', + type: 'object', + additionalProperties: { + type: 'string', + }, } as const; export const $DictionaryWithPropertiesAndAdditionalProperties = { - type: 'object', - properties: { - foo: { - type: 'string', - }, - }, - additionalProperties: { - type: 'string', + type: 'object', + properties: { + foo: { + type: 'string', }, + }, + additionalProperties: { + type: 'string', + }, } as const; export const $DictionaryWithReference = { - description: 'This is a string reference', - type: 'object', - additionalProperties: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a string reference', + type: 'object', + additionalProperties: { + $ref: '#/components/schemas/ModelWithString', + }, } as const; export const $DictionaryWithArray = { - description: 'This is a complex dictionary', - type: 'object', - additionalProperties: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a complex dictionary', + type: 'object', + additionalProperties: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithString', }, + }, } as const; export const $DictionaryWithDictionary = { - description: 'This is a string dictionary', + description: 'This is a string dictionary', + type: 'object', + additionalProperties: { type: 'object', additionalProperties: { - type: 'object', - additionalProperties: { - type: 'string', - }, + type: 'string', }, + }, } as const; export const $DictionaryWithProperties = { - description: 'This is a complex dictionary', + description: 'This is a complex dictionary', + type: 'object', + additionalProperties: { type: 'object', - additionalProperties: { - type: 'object', - properties: { - foo: { - type: 'string', - }, - bar: { - type: 'string', - }, - }, + properties: { + foo: { + type: 'string', + }, + bar: { + type: 'string', + }, }, + }, } as const; export const $ModelWithInteger = { - description: 'This is a model with one number property', - type: 'object', - properties: { - prop: { - description: 'This is a simple number property', - type: 'integer', - }, + description: 'This is a model with one number property', + type: 'object', + properties: { + prop: { + description: 'This is a simple number property', + type: 'integer', }, + }, } as const; export const $ModelWithBoolean = { - description: 'This is a model with one boolean property', - type: 'object', - properties: { - prop: { - description: 'This is a simple boolean property', - type: 'boolean', - }, + description: 'This is a model with one boolean property', + type: 'object', + properties: { + prop: { + description: 'This is a simple boolean property', + type: 'boolean', }, + }, } as const; export const $ModelWithString = { - description: 'This is a model with one string property', - type: 'object', - properties: { - prop: { - description: 'This is a simple string property', - type: 'string', - }, + description: 'This is a model with one string property', + type: 'object', + properties: { + prop: { + description: 'This is a simple string property', + type: 'string', }, + }, } as const; export const $Model_From_Zendesk = { - description: `\`Comment\` or \`VoiceComment\`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)`, - type: 'string', + description: `\`Comment\` or \`VoiceComment\`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)`, + type: 'string', } as const; export const $ModelWithNullableString = { - description: 'This is a model with one string property', - type: 'object', - required: ['nullableRequiredProp1', 'nullableRequiredProp2'], - properties: { - nullableProp1: { - description: 'This is a simple string property', - type: 'string', - nullable: true, - }, - nullableRequiredProp1: { - description: 'This is a simple string property', - type: 'string', - nullable: true, - }, - nullableProp2: { - description: 'This is a simple string property', - type: ['string', 'null'], - }, - nullableRequiredProp2: { - description: 'This is a simple string property', - type: ['string', 'null'], - }, - 'foo_bar-enum': { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], - }, + description: 'This is a model with one string property', + type: 'object', + required: ['nullableRequiredProp1', 'nullableRequiredProp2'], + properties: { + nullableProp1: { + description: 'This is a simple string property', + type: 'string', + nullable: true, + }, + nullableRequiredProp1: { + description: 'This is a simple string property', + type: 'string', + nullable: true, }, + nullableProp2: { + description: 'This is a simple string property', + type: ['string', 'null'], + }, + nullableRequiredProp2: { + description: 'This is a simple string property', + type: ['string', 'null'], + }, + 'foo_bar-enum': { + description: 'This is a simple enum with strings', + enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], + }, + }, } as const; export const $ModelWithEnum = { - description: 'This is a model with one enum', - type: 'object', - properties: { - 'foo_bar-enum': { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], - }, - statusCode: { - description: 'These are the HTTP error code enums', - enum: ['100', '200 FOO', '300 FOO_BAR', '400 foo-bar', '500 foo.bar', '600 foo&bar'], - }, - bool: { - description: 'Simple boolean enum', - type: 'boolean', - enum: [true], - }, - }, + description: 'This is a model with one enum', + type: 'object', + properties: { + 'foo_bar-enum': { + description: 'This is a simple enum with strings', + enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], + }, + statusCode: { + description: 'These are the HTTP error code enums', + enum: [ + '100', + '200 FOO', + '300 FOO_BAR', + '400 foo-bar', + '500 foo.bar', + '600 foo&bar', + ], + }, + bool: { + description: 'Simple boolean enum', + type: 'boolean', + enum: [true], + }, + }, } as const; export const $ModelWithEnumWithHyphen = { - description: 'This is a model with one enum with escaped name', - type: 'object', - properties: { - 'foo-bar-baz-qux': { - type: 'string', - enum: ['3.0'], - title: 'Foo-Bar-Baz-Qux', - default: '3.0', - }, + description: 'This is a model with one enum with escaped name', + type: 'object', + properties: { + 'foo-bar-baz-qux': { + type: 'string', + enum: ['3.0'], + title: 'Foo-Bar-Baz-Qux', + default: '3.0', }, + }, } as const; export const $ModelWithEnumFromDescription = { - description: 'This is a model with one enum', - type: 'object', - properties: { - test: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, + description: 'This is a model with one enum', + type: 'object', + properties: { + test: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', }, + }, } as const; export const $ModelWithNestedEnums = { - description: 'This is a model with nested enums', - type: 'object', - properties: { - dictionaryWithEnum: { - type: 'object', - additionalProperties: { - enum: ['Success', 'Warning', 'Error'], - }, - }, - dictionaryWithEnumFromDescription: { - type: 'object', - additionalProperties: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, - }, - arrayWithEnum: { - type: 'array', - items: { - enum: ['Success', 'Warning', 'Error'], - }, - }, - arrayWithDescription: { - type: 'array', - items: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, - }, - 'foo_bar-enum': { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], - }, + description: 'This is a model with nested enums', + type: 'object', + properties: { + dictionaryWithEnum: { + type: 'object', + additionalProperties: { + enum: ['Success', 'Warning', 'Error'], + }, + }, + dictionaryWithEnumFromDescription: { + type: 'object', + additionalProperties: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', + }, + }, + arrayWithEnum: { + type: 'array', + items: { + enum: ['Success', 'Warning', 'Error'], + }, + }, + arrayWithDescription: { + type: 'array', + items: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', + }, + }, + 'foo_bar-enum': { + description: 'This is a simple enum with strings', + enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], }, + }, } as const; export const $ModelWithReference = { - description: 'This is a model with one property containing a reference', - type: 'object', - properties: { - prop: { - $ref: '#/components/schemas/ModelWithProperties', - }, + description: 'This is a model with one property containing a reference', + type: 'object', + properties: { + prop: { + $ref: '#/components/schemas/ModelWithProperties', }, + }, } as const; export const $ModelWithArrayReadOnlyAndWriteOnly = { - description: 'This is a model with one property containing an array', - type: 'object', - properties: { - prop: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly', - }, - }, - propWithFile: { - type: 'array', - items: { - type: 'file', - }, - }, - propWithNumber: { - type: 'array', - items: { - type: 'number', - }, - }, + description: 'This is a model with one property containing an array', + type: 'object', + properties: { + prop: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly', + }, + }, + propWithFile: { + type: 'array', + items: { + type: 'file', + }, + }, + propWithNumber: { + type: 'array', + items: { + type: 'number', + }, }, + }, } as const; export const $ModelWithArray = { - description: 'This is a model with one property containing an array', - type: 'object', - properties: { - prop: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, - }, - propWithFile: { - type: 'array', - items: { - type: 'file', - }, - }, - propWithNumber: { - type: 'array', - items: { - type: 'number', - }, - }, + description: 'This is a model with one property containing an array', + type: 'object', + properties: { + prop: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithString', + }, + }, + propWithFile: { + type: 'array', + items: { + type: 'file', + }, + }, + propWithNumber: { + type: 'array', + items: { + type: 'number', + }, }, + }, } as const; export const $ModelWithDictionary = { - description: 'This is a model with one property containing a dictionary', - type: 'object', - properties: { - prop: { - type: 'object', - additionalProperties: { - type: 'string', - }, - }, + description: 'This is a model with one property containing a dictionary', + type: 'object', + properties: { + prop: { + type: 'object', + additionalProperties: { + type: 'string', + }, }, + }, } as const; export const $DeprecatedModel = { - deprecated: true, - description: 'This is a deprecated model with a deprecated property', - type: 'object', - properties: { - prop: { - deprecated: true, - description: 'This is a deprecated property', - type: 'string', - }, + deprecated: true, + description: 'This is a deprecated model with a deprecated property', + type: 'object', + properties: { + prop: { + deprecated: true, + description: 'This is a deprecated property', + type: 'string', }, + }, } as const; export const $ModelWithCircularReference = { - description: 'This is a model with one property containing a circular reference', - type: 'object', - properties: { - prop: { - $ref: '#/components/schemas/ModelWithCircularReference', - }, + description: + 'This is a model with one property containing a circular reference', + type: 'object', + properties: { + prop: { + $ref: '#/components/schemas/ModelWithCircularReference', }, + }, } as const; export const $CompositionWithOneOf = { - description: "This is a model with one property with a 'one of' relationship", - type: 'object', - properties: { - propA: { - type: 'object', - oneOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'one of' relationship", + type: 'object', + properties: { + propA: { + type: 'object', + oneOf: [ + { + $ref: '#/components/schemas/ModelWithString', + }, + { + $ref: '#/components/schemas/ModelWithEnum', + }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', }, + ], }, + }, } as const; export const $CompositionWithOneOfAnonymous = { - description: "This is a model with one property with a 'one of' relationship where the options are not $ref", - type: 'object', - properties: { - propA: { - type: 'object', - oneOf: [ - { - description: 'Anonymous object type', - type: 'object', - properties: { - propA: { - type: 'string', - }, - }, - }, - { - description: 'Anonymous string type', - type: 'string', - }, - { - description: 'Anonymous integer type', - type: 'integer', - }, - ], + description: + "This is a model with one property with a 'one of' relationship where the options are not $ref", + type: 'object', + properties: { + propA: { + type: 'object', + oneOf: [ + { + description: 'Anonymous object type', + type: 'object', + properties: { + propA: { + type: 'string', + }, + }, + }, + { + description: 'Anonymous string type', + type: 'string', + }, + { + description: 'Anonymous integer type', + type: 'integer', }, + ], }, + }, } as const; export const $ModelCircle = { - description: 'Circle', - type: 'object', - required: ['kind'], - properties: { - kind: { - type: 'string', - }, - radius: { - type: 'number', - }, + description: 'Circle', + type: 'object', + required: ['kind'], + properties: { + kind: { + type: 'string', + }, + radius: { + type: 'number', }, + }, } as const; export const $ModelSquare = { - description: 'Square', - type: 'object', - required: ['kind'], - properties: { - kind: { - type: 'string', - }, - sideLength: { - type: 'number', - }, + description: 'Square', + type: 'object', + required: ['kind'], + properties: { + kind: { + type: 'string', + }, + sideLength: { + type: 'number', }, + }, } as const; export const $CompositionWithOneOfDiscriminator = { - description: "This is a model with one property with a 'one of' relationship where the options are not $ref", - type: 'object', - oneOf: [ + description: + "This is a model with one property with a 'one of' relationship where the options are not $ref", + type: 'object', + oneOf: [ + { + $ref: '#/components/schemas/ModelCircle', + }, + { + $ref: '#/components/schemas/ModelSquare', + }, + ], + discriminator: { + propertyName: 'kind', + mapping: { + circle: '#/components/schemas/ModelCircle', + square: '#/components/schemas/ModelSquare', + }, + }, +} as const; + +export const $CompositionWithAnyOf = { + description: "This is a model with one property with a 'any of' relationship", + type: 'object', + properties: { + propA: { + type: 'object', + anyOf: [ { - $ref: '#/components/schemas/ModelCircle', + $ref: '#/components/schemas/ModelWithString', }, { - $ref: '#/components/schemas/ModelSquare', + $ref: '#/components/schemas/ModelWithEnum', }, - ], - discriminator: { - propertyName: 'kind', - mapping: { - circle: '#/components/schemas/ModelCircle', - square: '#/components/schemas/ModelSquare', + { + $ref: '#/components/schemas/ModelWithArray', }, - }, -} as const; - -export const $CompositionWithAnyOf = { - description: "This is a model with one property with a 'any of' relationship", - type: 'object', - properties: { - propA: { - type: 'object', - anyOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + { + $ref: '#/components/schemas/ModelWithDictionary', }, + ], }, + }, } as const; export const $CompositionWithAnyOfAnonymous = { - description: "This is a model with one property with a 'any of' relationship where the options are not $ref", - type: 'object', - properties: { - propA: { - type: 'object', - anyOf: [ - { - description: 'Anonymous object type', - type: 'object', - properties: { - propA: { - type: 'string', - }, - }, - }, - { - description: 'Anonymous string type', - type: 'string', - }, - { - description: 'Anonymous integer type', - type: 'integer', - }, - ], + description: + "This is a model with one property with a 'any of' relationship where the options are not $ref", + type: 'object', + properties: { + propA: { + type: 'object', + anyOf: [ + { + description: 'Anonymous object type', + type: 'object', + properties: { + propA: { + type: 'string', + }, + }, }, + { + description: 'Anonymous string type', + type: 'string', + }, + { + description: 'Anonymous integer type', + type: 'integer', + }, + ], }, + }, } as const; export const $CompositionWithNestedAnyAndTypeNull = { - description: "This is a model with nested 'any of' property with a type null", - type: 'object', - properties: { - propA: { - type: 'object', + description: "This is a model with nested 'any of' property with a type null", + type: 'object', + properties: { + propA: { + type: 'object', + anyOf: [ + { + items: { anyOf: [ - { - items: { - anyOf: [ - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - { - type: 'null', - }, - ], - }, - type: 'array', - }, - { - items: { - anyOf: [ - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - type: 'null', - }, - ], - }, - type: 'array', - }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + { + type: 'null', + }, + ], + }, + type: 'array', + }, + { + items: { + anyOf: [ + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + type: 'null', + }, ], + }, + type: 'array', }, + ], }, + }, } as const; export const $Enum1 = { - enum: ['Bird', 'Dog'], - type: 'string', + enum: ['Bird', 'Dog'], + type: 'string', } as const; export const $ConstValue = { - type: 'string', - const: 'ConstValue', + type: 'string', + const: 'ConstValue', } as const; export const $CompositionWithNestedAnyOfAndNull = { - description: "This is a model with one property with a 'any of' relationship where the options are not $ref", - type: 'object', - properties: { - propA: { + description: + "This is a model with one property with a 'any of' relationship where the options are not $ref", + type: 'object', + properties: { + propA: { + anyOf: [ + { + items: { anyOf: [ - { - items: { - anyOf: [ - { - $ref: '#/components/schemas/Enum1', - }, - { - $ref: '#/components/schemas/ConstValue', - }, - ], - }, - type: 'array', - }, - { - type: 'null', - }, + { + $ref: '#/components/schemas/Enum1', + }, + { + $ref: '#/components/schemas/ConstValue', + }, ], - title: 'Scopes', + }, + type: 'array', + }, + { + type: 'null', }, + ], + title: 'Scopes', }, + }, } as const; export const $CompositionWithOneOfAndNullable = { - description: "This is a model with one property with a 'one of' relationship", - type: 'object', - properties: { - propA: { - nullable: true, - type: 'object', - oneOf: [ - { - type: 'object', - properties: { - boolean: { - type: 'boolean', - }, - }, - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'one of' relationship", + type: 'object', + properties: { + propA: { + nullable: true, + type: 'object', + oneOf: [ + { + type: 'object', + properties: { + boolean: { + type: 'boolean', + }, + }, }, + { + $ref: '#/components/schemas/ModelWithEnum', + }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + ], }, + }, } as const; export const $CompositionWithOneOfAndSimpleDictionary = { - description: 'This is a model that contains a simple dictionary within composition', - type: 'object', - properties: { - propA: { - oneOf: [ - { - type: 'boolean', - }, - { - type: 'object', - additionalProperties: { - type: 'number', - }, - }, - ], + description: + 'This is a model that contains a simple dictionary within composition', + type: 'object', + properties: { + propA: { + oneOf: [ + { + type: 'boolean', + }, + { + type: 'object', + additionalProperties: { + type: 'number', + }, }, + ], }, + }, } as const; export const $CompositionWithOneOfAndSimpleArrayDictionary = { - description: 'This is a model that contains a dictionary of simple arrays within composition', - type: 'object', - properties: { - propA: { - oneOf: [ - { - type: 'boolean', - }, - { - type: 'object', - additionalProperties: { - type: 'array', - items: { - type: 'boolean', - }, - }, - }, - ], + description: + 'This is a model that contains a dictionary of simple arrays within composition', + type: 'object', + properties: { + propA: { + oneOf: [ + { + type: 'boolean', + }, + { + type: 'object', + additionalProperties: { + type: 'array', + items: { + type: 'boolean', + }, + }, }, + ], }, + }, } as const; export const $CompositionWithOneOfAndComplexArrayDictionary = { - description: 'This is a model that contains a dictionary of complex arrays (composited) within composition', - type: 'object', - properties: { - propA: { - oneOf: [ + description: + 'This is a model that contains a dictionary of complex arrays (composited) within composition', + type: 'object', + properties: { + propA: { + oneOf: [ + { + type: 'boolean', + }, + { + type: 'object', + additionalProperties: { + type: 'array', + items: { + oneOf: [ { - type: 'boolean', + type: 'number', }, { - type: 'object', - additionalProperties: { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - }, + type: 'string', }, - ], + ], + }, + }, }, + ], }, + }, } as const; export const $CompositionWithAllOfAndNullable = { - description: "This is a model with one property with a 'all of' relationship", - type: 'object', - properties: { - propA: { - nullable: true, - type: 'object', - allOf: [ - { - type: 'object', - properties: { - boolean: { - type: 'boolean', - }, - }, - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'all of' relationship", + type: 'object', + properties: { + propA: { + nullable: true, + type: 'object', + allOf: [ + { + type: 'object', + properties: { + boolean: { + type: 'boolean', + }, + }, + }, + { + $ref: '#/components/schemas/ModelWithEnum', }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + ], }, + }, } as const; export const $CompositionWithAnyOfAndNullable = { - description: "This is a model with one property with a 'any of' relationship", - type: 'object', - properties: { - propA: { - nullable: true, - type: 'object', - anyOf: [ - { - type: 'object', - properties: { - boolean: { - type: 'boolean', - }, - }, - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'any of' relationship", + type: 'object', + properties: { + propA: { + nullable: true, + type: 'object', + anyOf: [ + { + type: 'object', + properties: { + boolean: { + type: 'boolean', + }, + }, }, + { + $ref: '#/components/schemas/ModelWithEnum', + }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + ], }, + }, } as const; export const $CompositionBaseModel = { - description: 'This is a base model with two simple optional properties', - type: 'object', - properties: { - firstName: { - type: 'string', - }, - lastname: { - type: 'string', - }, + description: 'This is a base model with two simple optional properties', + type: 'object', + properties: { + firstName: { + type: 'string', + }, + lastname: { + type: 'string', }, + }, } as const; export const $CompositionExtendedModel = { - description: 'This is a model that extends the base model', - type: 'object', - allOf: [ - { - $ref: '#/components/schemas/CompositionBaseModel', - }, - ], - properties: { - age: { - type: 'number', - }, + description: 'This is a model that extends the base model', + type: 'object', + allOf: [ + { + $ref: '#/components/schemas/CompositionBaseModel', + }, + ], + properties: { + age: { + type: 'number', }, - required: ['firstName', 'lastname', 'age'], + }, + required: ['firstName', 'lastname', 'age'], } as const; export const $ModelWithProperties = { - description: 'This is a model with one nested property', - type: 'object', - required: ['required', 'requiredAndReadOnly', 'requiredAndNullable'], - properties: { - required: { - type: 'string', - }, - requiredAndReadOnly: { - type: 'string', - readOnly: true, - }, - requiredAndNullable: { - type: 'string', - nullable: true, - }, - string: { - type: 'string', - }, - number: { - type: 'number', - }, - boolean: { - type: 'boolean', - }, - reference: { - $ref: '#/components/schemas/ModelWithString', - }, - 'property with space': { - type: 'string', - }, - default: { - type: 'string', - }, - try: { - type: 'string', - }, - '@namespace.string': { - type: 'string', - readOnly: true, - }, - '@namespace.integer': { - type: 'integer', - readOnly: true, - }, + description: 'This is a model with one nested property', + type: 'object', + required: ['required', 'requiredAndReadOnly', 'requiredAndNullable'], + properties: { + required: { + type: 'string', + }, + requiredAndReadOnly: { + type: 'string', + readOnly: true, + }, + requiredAndNullable: { + type: 'string', + nullable: true, + }, + string: { + type: 'string', }, + number: { + type: 'number', + }, + boolean: { + type: 'boolean', + }, + reference: { + $ref: '#/components/schemas/ModelWithString', + }, + 'property with space': { + type: 'string', + }, + default: { + type: 'string', + }, + try: { + type: 'string', + }, + '@namespace.string': { + type: 'string', + readOnly: true, + }, + '@namespace.integer': { + type: 'integer', + readOnly: true, + }, + }, } as const; export const $ModelWithNestedProperties = { - description: 'This is a model with one nested property', - type: 'object', - required: ['first'], - properties: { - first: { - type: 'object', - required: ['second'], - readOnly: true, - nullable: true, - properties: { - second: { - type: 'object', - required: ['third'], - readOnly: true, - nullable: true, - properties: { - third: { - type: 'string', - required: true, - readOnly: true, - nullable: true, - }, - }, - }, + description: 'This is a model with one nested property', + type: 'object', + required: ['first'], + properties: { + first: { + type: 'object', + required: ['second'], + readOnly: true, + nullable: true, + properties: { + second: { + type: 'object', + required: ['third'], + readOnly: true, + nullable: true, + properties: { + third: { + type: 'string', + required: true, + readOnly: true, + nullable: true, }, + }, }, + }, }, + }, } as const; export const $ModelWithDuplicateProperties = { - description: 'This is a model with duplicated properties', - type: 'object', - properties: { - prop: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a model with duplicated properties', + type: 'object', + properties: { + prop: { + $ref: '#/components/schemas/ModelWithString', }, + }, } as const; export const $ModelWithOrderedProperties = { - description: 'This is a model with ordered properties', - type: 'object', - properties: { - zebra: { - type: 'string', - }, - apple: { - type: 'string', - }, - hawaii: { - type: 'string', - }, + description: 'This is a model with ordered properties', + type: 'object', + properties: { + zebra: { + type: 'string', }, + apple: { + type: 'string', + }, + hawaii: { + type: 'string', + }, + }, } as const; export const $ModelWithDuplicateImports = { - description: 'This is a model with duplicated imports', - type: 'object', - properties: { - propA: { - $ref: '#/components/schemas/ModelWithString', - }, - propB: { - $ref: '#/components/schemas/ModelWithString', - }, - propC: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a model with duplicated imports', + type: 'object', + properties: { + propA: { + $ref: '#/components/schemas/ModelWithString', }, -} as const; - -export const $ModelThatExtends = { - description: 'This is a model that extends another model', - type: 'object', - allOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - type: 'object', - properties: { - propExtendsA: { - type: 'string', - }, - propExtendsB: { - $ref: '#/components/schemas/ModelWithString', - }, - }, - }, - ], -} as const; - -export const $ModelThatExtendsExtends = { - description: 'This is a model that extends another model', - type: 'object', - allOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - $ref: '#/components/schemas/ModelThatExtends', - }, - { - type: 'object', - properties: { - propExtendsC: { - type: 'string', - }, - propExtendsD: { - $ref: '#/components/schemas/ModelWithString', - }, - }, - }, - ], -} as const; - -export const $ModelWithPattern = { - description: 'This is a model that contains a some patterns', - type: 'object', - required: ['key', 'name'], - properties: { - key: { - maxLength: 64, - pattern: '^[a-zA-Z0-9_]*$', - type: 'string', - }, - name: { - maxLength: 255, - type: 'string', - }, - enabled: { - type: 'boolean', - readOnly: true, - }, - modified: { - type: 'string', - format: 'date-time', - readOnly: true, + propB: { + $ref: '#/components/schemas/ModelWithString', + }, + propC: { + $ref: '#/components/schemas/ModelWithString', + }, + }, +} as const; + +export const $ModelThatExtends = { + description: 'This is a model that extends another model', + type: 'object', + allOf: [ + { + $ref: '#/components/schemas/ModelWithString', + }, + { + type: 'object', + properties: { + propExtendsA: { + type: 'string', }, - id: { - type: 'string', - pattern: '^d{2}-d{3}-d{4}$', + propExtendsB: { + $ref: '#/components/schemas/ModelWithString', }, - text: { - type: 'string', - pattern: '^w+$', + }, + }, + ], +} as const; + +export const $ModelThatExtendsExtends = { + description: 'This is a model that extends another model', + type: 'object', + allOf: [ + { + $ref: '#/components/schemas/ModelWithString', + }, + { + $ref: '#/components/schemas/ModelThatExtends', + }, + { + type: 'object', + properties: { + propExtendsC: { + type: 'string', }, - patternWithSingleQuotes: { - type: 'string', - pattern: "^[a-zA-Z0-9']*$", + propExtendsD: { + $ref: '#/components/schemas/ModelWithString', }, - patternWithNewline: { - type: 'string', - pattern: `aaa + }, + }, + ], +} as const; + +export const $ModelWithPattern = { + description: 'This is a model that contains a some patterns', + type: 'object', + required: ['key', 'name'], + properties: { + key: { + maxLength: 64, + pattern: '^[a-zA-Z0-9_]*$', + type: 'string', + }, + name: { + maxLength: 255, + type: 'string', + }, + enabled: { + type: 'boolean', + readOnly: true, + }, + modified: { + type: 'string', + format: 'date-time', + readOnly: true, + }, + id: { + type: 'string', + pattern: '^d{2}-d{3}-d{4}$', + }, + text: { + type: 'string', + pattern: '^w+$', + }, + patternWithSingleQuotes: { + type: 'string', + pattern: "^[a-zA-Z0-9']*$", + }, + patternWithNewline: { + type: 'string', + pattern: `aaa bbb`, - }, - patternWithBacktick: { - type: 'string', - pattern: 'aaa`bbb', - }, }, + patternWithBacktick: { + type: 'string', + pattern: 'aaa`bbb', + }, + }, } as const; export const $File = { - required: ['mime'], - type: 'object', - properties: { - id: { - title: 'Id', - type: 'string', - readOnly: true, - minLength: 1, - }, - updated_at: { - title: 'Updated at', - type: 'string', - format: 'date-time', - readOnly: true, - }, - created_at: { - title: 'Created at', - type: 'string', - format: 'date-time', - readOnly: true, - }, - mime: { - title: 'Mime', - type: 'string', - maxLength: 24, - minLength: 1, - }, - file: { - title: 'File', - type: 'string', - readOnly: true, - format: 'uri', - }, - }, + required: ['mime'], + type: 'object', + properties: { + id: { + title: 'Id', + type: 'string', + readOnly: true, + minLength: 1, + }, + updated_at: { + title: 'Updated at', + type: 'string', + format: 'date-time', + readOnly: true, + }, + created_at: { + title: 'Created at', + type: 'string', + format: 'date-time', + readOnly: true, + }, + mime: { + title: 'Mime', + type: 'string', + maxLength: 24, + minLength: 1, + }, + file: { + title: 'File', + type: 'string', + readOnly: true, + format: 'uri', + }, + }, } as const; export const $default = { - type: 'object', - properties: { - name: { - type: 'string', - }, + type: 'object', + properties: { + name: { + type: 'string', }, + }, } as const; export const $Pageable = { - type: 'object', - properties: { - page: { - minimum: 0, - type: 'integer', - format: 'int32', - default: 0, - }, - size: { - minimum: 1, - type: 'integer', - format: 'int32', - }, - sort: { - type: 'array', - items: { - type: 'string', - }, - }, + type: 'object', + properties: { + page: { + minimum: 0, + type: 'integer', + format: 'int32', + default: 0, + }, + size: { + minimum: 1, + type: 'integer', + format: 'int32', + }, + sort: { + type: 'array', + items: { + type: 'string', + }, }, + }, } as const; export const $FreeFormObjectWithoutAdditionalProperties = { - description: 'This is a free-form object without additionalProperties.', - type: 'object', + description: 'This is a free-form object without additionalProperties.', + type: 'object', } as const; export const $FreeFormObjectWithAdditionalPropertiesEqTrue = { - description: 'This is a free-form object with additionalProperties: true.', - type: 'object', - additionalProperties: true, + description: 'This is a free-form object with additionalProperties: true.', + type: 'object', + additionalProperties: true, } as const; export const $FreeFormObjectWithAdditionalPropertiesEqEmptyObject = { - description: 'This is a free-form object with additionalProperties: {}.', - type: 'object', - additionalProperties: {}, + description: 'This is a free-form object with additionalProperties: {}.', + type: 'object', + additionalProperties: {}, } as const; export const $ModelWithConst = { - type: 'object', - properties: { - String: { - const: 'String', - }, - number: { - const: 0, - }, - null: { - const: null, - }, - withType: { - type: 'string', - const: 'Some string', - }, + type: 'object', + properties: { + String: { + const: 'String', + }, + number: { + const: 0, }, + null: { + const: null, + }, + withType: { + type: 'string', + const: 'Some string', + }, + }, } as const; export const $ModelWithAdditionalPropertiesEqTrue = { - description: 'This is a model with one property and additionalProperties: true', - type: 'object', - properties: { - prop: { - description: 'This is a simple string property', - type: 'string', - }, + description: + 'This is a model with one property and additionalProperties: true', + type: 'object', + properties: { + prop: { + description: 'This is a simple string property', + type: 'string', }, - additionalProperties: true, + }, + additionalProperties: true, } as const; export const $NestedAnyOfArraysNullable = { - properties: { - nullableArray: { + properties: { + nullableArray: { + anyOf: [ + { + items: { anyOf: [ - { - items: { - anyOf: [ - { - type: 'string', - }, - { - type: 'boolean', - }, - ], - }, - type: 'array', - }, - { - type: 'null', - }, + { + type: 'string', + }, + { + type: 'boolean', + }, ], + }, + type: 'array', + }, + { + type: 'null', }, + ], }, - type: 'object', + }, + type: 'object', } as const; export const $CompositionWithOneOfAndProperties = { - type: 'object', - oneOf: [ - { - type: 'object', - required: ['foo'], - properties: { - foo: { - $ref: '#/components/parameters/SimpleParameter', - }, - }, - additionalProperties: false, - }, - { - type: 'object', - required: ['bar'], - properties: { - bar: { - $ref: '#/components/schemas/NonAsciiString%C3%A6%C3%B8%C3%A5%C3%86%C3%98%C3%85%C3%B6%C3%B4%C3%AA%C3%8A%E5%AD%97%E7%AC%A6%E4%B8%B2', - }, - }, - additionalProperties: false, - }, - ], - required: ['baz', 'qux'], - properties: { - baz: { - type: 'integer', - format: 'uint16', - minimum: 0, - nullable: true, + type: 'object', + oneOf: [ + { + type: 'object', + required: ['foo'], + properties: { + foo: { + $ref: '#/components/parameters/SimpleParameter', }, - qux: { - type: 'integer', - format: 'uint8', - minimum: 0, + }, + additionalProperties: false, + }, + { + type: 'object', + required: ['bar'], + properties: { + bar: { + $ref: '#/components/schemas/NonAsciiString%C3%A6%C3%B8%C3%A5%C3%86%C3%98%C3%85%C3%B6%C3%B4%C3%AA%C3%8A%E5%AD%97%E7%AC%A6%E4%B8%B2', }, + }, + additionalProperties: false, + }, + ], + required: ['baz', 'qux'], + properties: { + baz: { + type: 'integer', + format: 'uint16', + minimum: 0, + nullable: true, }, + qux: { + type: 'integer', + format: 'uint8', + minimum: 0, + }, + }, } as const; export const $NullableObject = { - type: 'object', - nullable: true, - description: 'An object that can be null', - properties: { - foo: { - type: 'string', - }, + type: 'object', + nullable: true, + description: 'An object that can be null', + properties: { + foo: { + type: 'string', }, - default: null, + }, + default: null, } as const; export const $CharactersInDescription = { - type: 'string', - description: 'Some % character', + type: 'string', + description: 'Some % character', } as const; export const $ModelWithNullableObject = { - type: 'object', - properties: { - data: { - $ref: '#/components/schemas/NullableObject', - }, + type: 'object', + properties: { + data: { + $ref: '#/components/schemas/NullableObject', }, + }, } as const; export const $ModelWithOneOfEnum = { - oneOf: [ - { - type: 'object', - required: ['foo'], - properties: { - foo: { - type: 'string', - enum: ['Bar'], - }, - }, + oneOf: [ + { + type: 'object', + required: ['foo'], + properties: { + foo: { + type: 'string', + enum: ['Bar'], }, - { - type: 'object', - required: ['foo'], - properties: { - foo: { - type: 'string', - enum: ['Baz'], - }, - }, + }, + }, + { + type: 'object', + required: ['foo'], + properties: { + foo: { + type: 'string', + enum: ['Baz'], }, - { - type: 'object', - required: ['foo'], - properties: { - foo: { - type: 'string', - enum: ['Qux'], - }, - }, + }, + }, + { + type: 'object', + required: ['foo'], + properties: { + foo: { + type: 'string', + enum: ['Qux'], }, - { - type: 'object', - required: ['content', 'foo'], - properties: { - content: { - type: 'string', - format: 'date-time', - }, - foo: { - type: 'string', - enum: ['Quux'], - }, - }, + }, + }, + { + type: 'object', + required: ['content', 'foo'], + properties: { + content: { + type: 'string', + format: 'date-time', }, - { - type: 'object', - required: ['content', 'foo'], - properties: { - content: { - type: 'array', - items: [ - { - type: 'string', - format: 'date-time', - }, - { - type: 'string', - }, - ], - maxItems: 2, - minItems: 2, - }, - foo: { - type: 'string', - enum: ['Corge'], - }, + foo: { + type: 'string', + enum: ['Quux'], + }, + }, + }, + { + type: 'object', + required: ['content', 'foo'], + properties: { + content: { + type: 'array', + items: [ + { + type: 'string', + format: 'date-time', + }, + { + type: 'string', }, + ], + maxItems: 2, + minItems: 2, }, - ], + foo: { + type: 'string', + enum: ['Corge'], + }, + }, + }, + ], } as const; export const $ModelWithNestedArrayEnumsDataFoo = { - enum: ['foo', 'bar'], - type: 'string', + enum: ['foo', 'bar'], + type: 'string', } as const; export const $ModelWithNestedArrayEnumsDataBar = { - enum: ['baz', 'qux'], - type: 'string', + enum: ['baz', 'qux'], + type: 'string', } as const; export const $ModelWithNestedArrayEnumsData = { - type: 'object', - properties: { - foo: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', - }, - }, - bar: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar', - }, - }, + type: 'object', + properties: { + foo: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', + }, + }, + bar: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar', + }, }, + }, } as const; export const $ModelWithNestedArrayEnums = { - type: 'object', - properties: { - array_strings: { - type: 'array', - items: { - type: 'string', - }, - }, - data: { - allOf: [ - { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsData', - }, - ], + type: 'object', + properties: { + array_strings: { + type: 'array', + items: { + type: 'string', + }, + }, + data: { + allOf: [ + { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsData', }, + ], }, + }, } as const; export const $ModelWithNestedCompositionEnums = { - type: 'object', - properties: { - foo: { - allOf: [ - { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', - }, - ], + type: 'object', + properties: { + foo: { + allOf: [ + { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', }, + ], }, + }, } as const; export const $ModelWithReadOnlyAndWriteOnly = { - type: 'object', - required: ['foo', 'bar', 'baz'], - properties: { - foo: { - type: 'string', - }, - bar: { - readOnly: true, - type: 'string', - }, - baz: { - type: 'string', - writeOnly: true, - }, + type: 'object', + required: ['foo', 'bar', 'baz'], + properties: { + foo: { + type: 'string', }, + bar: { + readOnly: true, + type: 'string', + }, + baz: { + type: 'string', + writeOnly: true, + }, + }, } as const; export const $ModelWithConstantSizeArray = { - type: 'array', - items: { - type: 'number', - }, - minItems: 2, - maxItems: 2, + type: 'array', + items: { + type: 'number', + }, + minItems: 2, + maxItems: 2, } as const; export const $ModelWithAnyOfConstantSizeArray = { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - minItems: 3, - maxItems: 3, + type: 'array', + items: { + oneOf: [ + { + type: 'number', + }, + { + type: 'string', + }, + ], + }, + minItems: 3, + maxItems: 3, } as const; export const $ModelWithAnyOfConstantSizeArrayNullable = { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - nullable: true, - }, - { - type: 'string', - }, - ], - }, - minItems: 3, - maxItems: 3, + type: 'array', + items: { + oneOf: [ + { + type: 'number', + nullable: true, + }, + { + type: 'string', + }, + ], + }, + minItems: 3, + maxItems: 3, } as const; export const $ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - minItems: 2, - maxItems: 2, + type: 'array', + items: { + oneOf: [ + { + type: 'number', + }, + { + type: 'string', + }, + ], + }, + minItems: 2, + maxItems: 2, } as const; export const $ModelWithAnyOfConstantSizeArrayAndIntersect = { - type: 'array', - items: { - allOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - minItems: 2, - maxItems: 2, + type: 'array', + items: { + allOf: [ + { + type: 'number', + }, + { + type: 'string', + }, + ], + }, + minItems: 2, + maxItems: 2, } as const; export const $ModelWithNumericEnumUnion = { - type: 'object', - properties: { - value: { - type: 'number', - description: 'Период', - enum: [1, 3, 6, 12], - }, - }, + type: 'object', + properties: { + value: { + type: 'number', + description: 'Период', + enum: [1, 3, 6, 12], + }, + }, } as const; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/services.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/services.gen.ts.snap index 1b354cf5f..582366ab6 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/services.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/services.gen.ts.snap @@ -6,862 +6,905 @@ import { request as __request } from './core/request'; import type { $OpenApiTs } from './types.gen'; export class DefaultService { - /** - * @throws ApiError - */ - public static serviceWithEmptyTag(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/no-tag', - }); - } - - /** - * @returns ModelWithReadOnlyAndWriteOnly - * @throws ApiError - */ - public static postServiceWithEmptyTag( - data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200]> { - const { requestBody } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/no-tag', - body: requestBody, - mediaType: 'application/json', - }); - } + /** + * @throws ApiError + */ + public static serviceWithEmptyTag(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/no-tag', + }); + } + + /** + * @returns ModelWithReadOnlyAndWriteOnly + * @throws ApiError + */ + public static postServiceWithEmptyTag( + data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200] + > { + const { requestBody } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/no-tag', + body: requestBody, + mediaType: 'application/json', + }); + } } export class SimpleService { - /** - * @returns Model_From_Zendesk Success - * @throws ApiError - */ - public static apiVVersionOdataControllerCount(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/simple/$count', - }); - } - - /** - * @throws ApiError - */ - public static getCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static putCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static postCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static deleteCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static optionsCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'OPTIONS', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static headCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'HEAD', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static patchCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'PATCH', - url: '/api/v{api-version}/simple', - }); - } + /** + * @returns Model_From_Zendesk Success + * @throws ApiError + */ + public static apiVVersionOdataControllerCount(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/simple/$count', + }); + } + + /** + * @throws ApiError + */ + public static getCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static putCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static postCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static deleteCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static optionsCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'OPTIONS', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static headCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'HEAD', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static patchCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/api/v{api-version}/simple', + }); + } } export class ParametersService { - /** - * @throws ApiError - */ - public static deleteFoo( - data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req'] - ): CancelablePromise { - const { foo, bar } = data; - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', - path: { - foo, - bar, - }, - }); - } - - /** - * @throws ApiError - */ - public static callWithParameters( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'] - ): CancelablePromise { - const { - parameterHeader, - fooAllOfEnum, - parameterQuery, - parameterForm, - parameterCookie, - parameterPath, - requestBody, - fooRefEnum, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameterPath}', - path: { - parameterPath, - }, - cookies: { - parameterCookie, - }, - headers: { - parameterHeader, - }, - query: { - foo_ref_enum: fooRefEnum, - foo_all_of_enum: fooAllOfEnum, - parameterQuery, - }, - formData: { - parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public static callWithWeirdParameterNames( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'] - ): CancelablePromise { - const { - parameterHeader, - parameterQuery, - parameterForm, - parameterCookie, - requestBody, - parameterPath1, - parameterPath2, - parameterPath3, - _default, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', - path: { - 'parameter.path.1': parameterPath1, - 'parameter-path-2': parameterPath2, - 'PARAMETER-PATH-3': parameterPath3, - }, - cookies: { - 'PARAMETER-COOKIE': parameterCookie, - }, - headers: { - 'parameter.header': parameterHeader, - }, - query: { - default: _default, - 'parameter-query': parameterQuery, - }, - formData: { - parameter_form: parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public static getCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'] - ): CancelablePromise { - const { requestBody, parameter } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public static postCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'] - ): CancelablePromise { - const { parameter, requestBody } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } + /** + * @throws ApiError + */ + public static deleteFoo( + data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req'], + ): CancelablePromise { + const { foo, bar } = data; + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', + path: { + foo, + bar, + }, + }); + } + + /** + * @throws ApiError + */ + public static callWithParameters( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + fooAllOfEnum, + parameterQuery, + parameterForm, + parameterCookie, + parameterPath, + requestBody, + fooRefEnum, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameterPath}', + path: { + parameterPath, + }, + cookies: { + parameterCookie, + }, + headers: { + parameterHeader, + }, + query: { + foo_ref_enum: fooRefEnum, + foo_all_of_enum: fooAllOfEnum, + parameterQuery, + }, + formData: { + parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public static callWithWeirdParameterNames( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + parameterQuery, + parameterForm, + parameterCookie, + requestBody, + parameterPath1, + parameterPath2, + parameterPath3, + _default, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + path: { + 'parameter.path.1': parameterPath1, + 'parameter-path-2': parameterPath2, + 'PARAMETER-PATH-3': parameterPath3, + }, + cookies: { + 'PARAMETER-COOKIE': parameterCookie, + }, + headers: { + 'parameter.header': parameterHeader, + }, + query: { + default: _default, + 'parameter-query': parameterQuery, + }, + formData: { + parameter_form: parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public static getCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'], + ): CancelablePromise { + const { requestBody, parameter } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public static postCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'], + ): CancelablePromise { + const { parameter, requestBody } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } } export class DescriptionsService { - /** - * @throws ApiError - */ - public static callWithDescriptions( - data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {} - ): CancelablePromise { - const { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/descriptions/', - query: { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDescriptions( + data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/descriptions/', + query: { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + }, + }); + } } export class DeprecatedService { - /** - * @deprecated - * @throws ApiError - */ - public static deprecatedCall( - data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'] - ): CancelablePromise { - const { parameter } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/deprecated', - headers: { - parameter, - }, - }); - } + /** + * @deprecated + * @throws ApiError + */ + public static deprecatedCall( + data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'], + ): CancelablePromise { + const { parameter } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/deprecated', + headers: { + parameter, + }, + }); + } } export class RequestBodyService { - /** - * @throws ApiError - */ - public static postApiRequestBody( - data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {} - ): CancelablePromise { - const { parameter, foo } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/requestBody/', - query: { - parameter, - }, - body: foo, - mediaType: 'application/json', - }); - } + /** + * @throws ApiError + */ + public static postApiRequestBody( + data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {}, + ): CancelablePromise { + const { parameter, foo } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/requestBody/', + query: { + parameter, + }, + body: foo, + mediaType: 'application/json', + }); + } } export class FormDataService { - /** - * @throws ApiError - */ - public static postApiFormData( - data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {} - ): CancelablePromise { - const { parameter, formData } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/formData/', - query: { - parameter, - }, - formData, - mediaType: 'multipart/form-data', - }); - } + /** + * @throws ApiError + */ + public static postApiFormData( + data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {}, + ): CancelablePromise { + const { parameter, formData } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/formData/', + query: { + parameter, + }, + formData, + mediaType: 'multipart/form-data', + }); + } } export class DefaultsService { - /** - * @throws ApiError - */ - public static callWithDefaultParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public static callWithDefaultOptionalParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public static callToTestOrderOfParams( - data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'] - ): CancelablePromise { - const { - parameterStringWithNoDefault, - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - } = data; - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/defaults', - query: { - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringWithNoDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDefaultParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public static callWithDefaultOptionalParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public static callToTestOrderOfParams( + data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'], + ): CancelablePromise { + const { + parameterStringWithNoDefault, + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + } = data; + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/defaults', + query: { + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringWithNoDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + }, + }); + } } export class DuplicateService { - /** - * @throws ApiError - */ - public static duplicateName(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName1(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName2(): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName3(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/duplicate', - }); - } + /** + * @throws ApiError + */ + public static duplicateName(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName1(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName2(): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName3(): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/duplicate', + }); + } } export class NoContentService { - /** - * @returns void Success - * @throws ApiError - */ - public static callWithNoContentResponse(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/no-content', - }); - } - - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public static callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static callWithNoContentResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/no-content', + }); + } + + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public static callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } } export class ResponseService { - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public static callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } - - /** - * @returns ModelWithString - * @throws ApiError - */ - public static callWithResponse(): CancelablePromise<$OpenApiTs['/api/v{api-version}/response']['get']['res'][200]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/response', - }); - } - - /** - * @returns ModelWithString Message for default response - * @throws ApiError - */ - public static callWithDuplicateResponses(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] - > { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } - - /** - * @returns unknown Message for 200 response - * @returns ModelWithString Message for default response - * @returns ModelThatExtends Message for 201 response - * @returns ModelThatExtendsExtends Message for 202 response - * @throws ApiError - */ - public static callWithResponses(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] - > { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public static callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } + + /** + * @returns ModelWithString + * @throws ApiError + */ + public static callWithResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['get']['res'][200] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/response', + }); + } + + /** + * @returns ModelWithString Message for default response + * @throws ApiError + */ + public static callWithDuplicateResponses(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] + > { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } + + /** + * @returns unknown Message for 200 response + * @returns ModelWithString Message for default response + * @returns ModelThatExtends Message for 201 response + * @returns ModelThatExtendsExtends Message for 202 response + * @throws ApiError + */ + public static callWithResponses(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] + > { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } } export class MultipleTags1Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags2Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags3Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class CollectionFormatService { - /** - * @throws ApiError - */ - public static collectionFormat( - data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'] - ): CancelablePromise { - const { parameterArrayCsv, parameterArraySsv, parameterArrayTsv, parameterArrayPipes, parameterArrayMulti } = - data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/collectionFormat', - query: { - parameterArrayCSV: parameterArrayCsv, - parameterArraySSV: parameterArraySsv, - parameterArrayTSV: parameterArrayTsv, - parameterArrayPipes, - parameterArrayMulti, - }, - }); - } + /** + * @throws ApiError + */ + public static collectionFormat( + data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'], + ): CancelablePromise { + const { + parameterArrayCsv, + parameterArraySsv, + parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/collectionFormat', + query: { + parameterArrayCSV: parameterArrayCsv, + parameterArraySSV: parameterArraySsv, + parameterArrayTSV: parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + }, + }); + } } export class TypesService { - /** - * @returns number Response is a simple number - * @returns string Response is a simple string - * @returns boolean Response is a simple boolean - * @returns unknown Response is a simple object - * @throws ApiError - */ - public static types( - data: $OpenApiTs['/api/v{api-version}/types']['get']['req'] - ): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] - > { - const { - parameterArray, - parameterDictionary, - parameterEnum, - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - id, - } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/types', - path: { - id, - }, - query: { - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - parameterArray, - parameterDictionary, - parameterEnum, - }, - }); - } + /** + * @returns number Response is a simple number + * @returns string Response is a simple string + * @returns boolean Response is a simple boolean + * @returns unknown Response is a simple object + * @throws ApiError + */ + public static types( + data: $OpenApiTs['/api/v{api-version}/types']['get']['req'], + ): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] + > { + const { + parameterArray, + parameterDictionary, + parameterEnum, + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + id, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/types', + path: { + id, + }, + query: { + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + parameterArray, + parameterDictionary, + parameterEnum, + }, + }); + } } export class UploadService { - /** - * @returns boolean - * @throws ApiError - */ - public static uploadFile( - data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/upload']['post']['res'][200]> { - const { file } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/upload', - formData: { - file, - }, - }); - } + /** + * @returns boolean + * @throws ApiError + */ + public static uploadFile( + data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/upload']['post']['res'][200] + > { + const { file } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/upload', + formData: { + file, + }, + }); + } } export class FileResponseService { - /** - * @returns binary Success - * @throws ApiError - */ - public static fileResponse( - data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200]> { - const { id } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/file/{id}', - path: { - id, - }, - }); - } + /** + * @returns binary Success + * @throws ApiError + */ + public static fileResponse( + data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200] + > { + const { id } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/file/{id}', + path: { + id, + }, + }); + } } export class ComplexService { - /** - * @returns ModelWithString Successful response - * @throws ApiError - */ - public static complexTypes( - data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/complex']['get']['res'][200]> { - const { parameterObject, parameterReference } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/complex', - query: { - parameterObject, - parameterReference, - }, - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } - - /** - * @returns ModelWithString Success - * @throws ApiError - */ - public static complexParams( - data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200]> { - const { id, requestBody } = data; - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/complex/{id}', - path: { - id, - }, - body: requestBody, - mediaType: 'application/json-patch+json', - }); - } + /** + * @returns ModelWithString Successful response + * @throws ApiError + */ + public static complexTypes( + data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/complex']['get']['res'][200] + > { + const { parameterObject, parameterReference } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/complex', + query: { + parameterObject, + parameterReference, + }, + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } + + /** + * @returns ModelWithString Success + * @throws ApiError + */ + public static complexParams( + data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200] + > { + const { id, requestBody } = data; + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/complex/{id}', + path: { + id, + }, + body: requestBody, + mediaType: 'application/json-patch+json', + }); + } } export class MultipartService { - /** - * @throws ApiError - */ - public static multipartRequest( - data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {} - ): CancelablePromise { - const { formData } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/multipart', - formData, - mediaType: 'multipart/form-data', - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static multipartResponse(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multipart', - }); - } + /** + * @throws ApiError + */ + public static multipartRequest( + data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {}, + ): CancelablePromise { + const { formData } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/multipart', + formData, + mediaType: 'multipart/form-data', + }); + } + + /** + * @returns unknown OK + * @throws ApiError + */ + public static multipartResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multipart', + }); + } } export class HeaderService { - /** - * @returns string Successful response - * @throws ApiError - */ - public static callWithResultFromHeader(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] - > { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/header', - responseHeader: 'operation-location', - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } + /** + * @returns string Successful response + * @throws ApiError + */ + public static callWithResultFromHeader(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] + > { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/header', + responseHeader: 'operation-location', + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } } export class ErrorService { - /** - * @returns unknown Custom message: Successful response - * @throws ApiError - */ - public static testErrorCode( - data: $OpenApiTs['/api/v{api-version}/error']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/error']['post']['res'][200]> { - const { status } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/error', - query: { - status, - }, - errors: { - 500: 'Custom message: Internal Server Error', - 501: 'Custom message: Not Implemented', - 502: 'Custom message: Bad Gateway', - 503: 'Custom message: Service Unavailable', - }, - }); - } + /** + * @returns unknown Custom message: Successful response + * @throws ApiError + */ + public static testErrorCode( + data: $OpenApiTs['/api/v{api-version}/error']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/error']['post']['res'][200] + > { + const { status } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/error', + query: { + status, + }, + errors: { + 500: 'Custom message: Internal Server Error', + 501: 'Custom message: Not Implemented', + 502: 'Custom message: Bad Gateway', + 503: 'Custom message: Service Unavailable', + }, + }); + } } export class NonAsciiÆøåÆøÅöôêÊService { - /** - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response - * @throws ApiError - */ - public static nonAsciiæøåÆøÅöôêÊ字符串( - data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200]> { - const { nonAsciiParamæøåÆøÅöôêÊ } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', - query: { - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, - }, - }); - } + /** + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response + * @throws ApiError + */ + public static nonAsciiæøåÆøÅöôêÊ字符串( + data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200] + > { + const { nonAsciiParamæøåÆøÅöôêÊ } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + query: { + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, + }, + }); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3/types.gen.ts.snap index 8878b1994..ee3cf2769 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3/types.gen.ts.snap @@ -85,19 +85,39 @@ export type SimpleStringWithPattern = string | null; * This is a simple enum with strings */ export type EnumWithStrings = - | 'Success' - | 'Warning' - | 'Error' - | "'Single Quote'" - | '"Double Quotes"' - | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + | 'Success' + | 'Warning' + | 'Error' + | "'Single Quote'" + | '"Double Quotes"' + | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; -export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; +export type EnumWithReplacedCharacters = + | "'Single Quote'" + | '"Double Quotes"' + | 'øæåôöØÆÅÔÖ字符串' + | 3.1 + | ''; /** * This is a simple enum with numbers */ -export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; +export type EnumWithNumbers = + | 1 + | 2 + | 3 + | 1.1 + | 1.2 + | 1.3 + | 100 + | 200 + | 300 + | -100 + | -200 + | -300 + | -1.1 + | -1.2 + | -1.3; /** * Success=1,Warning=2,Error=3 @@ -140,113 +160,113 @@ export type ArrayWithArray = Array>; * This is a simple array with properties */ export type ArrayWithProperties = Array<{ - foo?: camelCaseCommentWithBreaks; - bar?: string; + foo?: camelCaseCommentWithBreaks; + bar?: string; }>; /** * This is a simple array with any of properties */ export type ArrayWithAnyOfProperties = Array< - | { - foo?: string; - } - | { - bar?: string; - } + | { + foo?: string; + } + | { + bar?: string; + } >; export type AnyOfAnyAndNull = { - data?: unknown | null; + data?: unknown | null; }; /** * This is a simple array with any of properties */ export type AnyOfArrays = { - results?: Array< - | { - foo?: string; - } - | { - bar?: string; - } - >; + results?: Array< + | { + foo?: string; + } + | { + bar?: string; + } + >; }; /** * This is a string dictionary */ export type DictionaryWithString = { - [key: string]: string; + [key: string]: string; }; export type DictionaryWithPropertiesAndAdditionalProperties = { - foo?: string; - [key: string]: string | undefined; + foo?: string; + [key: string]: string | undefined; }; /** * This is a string reference */ export type DictionaryWithReference = { - [key: string]: ModelWithString; + [key: string]: ModelWithString; }; /** * This is a complex dictionary */ export type DictionaryWithArray = { - [key: string]: Array; + [key: string]: Array; }; /** * This is a string dictionary */ export type DictionaryWithDictionary = { - [key: string]: { - [key: string]: string; - }; + [key: string]: { + [key: string]: string; + }; }; /** * This is a complex dictionary */ export type DictionaryWithProperties = { - [key: string]: { - foo?: string; - bar?: string; - }; + [key: string]: { + foo?: string; + bar?: string; + }; }; /** * This is a model with one number property */ export type ModelWithInteger = { - /** - * This is a simple number property - */ - prop?: number; + /** + * This is a simple number property + */ + prop?: number; }; /** * This is a model with one boolean property */ export type ModelWithBoolean = { - /** - * This is a simple boolean property - */ - prop?: boolean; + /** + * This is a simple boolean property + */ + prop?: boolean; }; /** * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; /** @@ -258,113 +278,119 @@ export type Model_From_Zendesk = string; * This is a model with one string property */ export type ModelWithNullableString = { - /** - * This is a simple string property - */ - nullableProp1?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp1: string | null; - /** - * This is a simple string property - */ - nullableProp2?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp2: string | null; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * This is a simple string property + */ + nullableProp1?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp1: string | null; + /** + * This is a simple string property + */ + nullableProp2?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp2: string | null; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one enum */ export type ModelWithEnum = { - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; - /** - * These are the HTTP error code enums - */ - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; - /** - * Simple boolean enum - */ - bool?: boolean; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: + | '100' + | '200 FOO' + | '300 FOO_BAR' + | '400 foo-bar' + | '500 foo.bar' + | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: boolean; }; /** * This is a model with one enum with escaped name */ export type ModelWithEnumWithHyphen = { - 'foo-bar-baz-qux'?: '3.0'; + 'foo-bar-baz-qux'?: '3.0'; }; /** * This is a model with one enum */ export type ModelWithEnumFromDescription = { - /** - * Success=1,Warning=2,Error=3 - */ - test?: number; + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; }; /** * This is a model with nested enums */ export type ModelWithNestedEnums = { - dictionaryWithEnum?: { - [key: string]: 'Success' | 'Warning' | 'Error'; - }; - dictionaryWithEnumFromDescription?: { - [key: string]: number; - }; - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; - arrayWithDescription?: Array; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one property containing a reference */ export type ModelWithReference = { - prop?: ModelWithProperties; + prop?: ModelWithProperties; }; /** * This is a model with one property containing an array */ export type ModelWithArrayReadOnlyAndWriteOnly = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing an array */ export type ModelWithArray = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing a dictionary */ export type ModelWithDictionary = { - prop?: { - [key: string]: string; - }; + prop?: { + [key: string]: string; + }; }; /** @@ -372,53 +398,57 @@ export type ModelWithDictionary = { * @deprecated */ export type DeprecatedModel = { - /** - * This is a deprecated property - * @deprecated - */ - prop?: string; + /** + * This is a deprecated property + * @deprecated + */ + prop?: string; }; /** * This is a model with one property containing a circular reference */ export type ModelWithCircularReference = { - prop?: ModelWithCircularReference; + prop?: ModelWithCircularReference; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'one of' relationship where the options are not $ref */ export type CompositionWithOneOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * Circle */ export type ModelCircle = { - kind: 'circle'; - radius?: number; + kind: 'circle'; + radius?: number; }; /** * Square */ export type ModelSquare = { - kind: 'square'; - sideLength?: number; + kind: 'square'; + sideLength?: number; }; /** @@ -430,26 +460,30 @@ export type CompositionWithOneOfDiscriminator = ModelCircle | ModelSquare; * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithAnyOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * This is a model with nested 'any of' property with a type null */ export type CompositionWithNestedAnyAndTypeNull = { - propA?: Array | Array; + propA?: Array | Array; }; export type Enum1 = 'Bird' | 'Dog'; @@ -460,264 +494,264 @@ export type ConstValue = 'ConstValue'; * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithNestedAnyOfAndNull = { - propA?: Array | null; + propA?: Array | null; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a model that contains a simple dictionary within composition */ export type CompositionWithOneOfAndSimpleDictionary = { - propA?: - | boolean - | { - [key: string]: number; - }; + propA?: + | boolean + | { + [key: string]: number; + }; }; /** * This is a model that contains a dictionary of simple arrays within composition */ export type CompositionWithOneOfAndSimpleArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model that contains a dictionary of complex arrays (composited) within composition */ export type CompositionWithOneOfAndComplexArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model with one property with a 'all of' relationship */ export type CompositionWithAllOfAndNullable = { - propA?: - | ({ - boolean?: boolean; - } & ModelWithEnum & - ModelWithArray & - ModelWithDictionary) - | null; + propA?: + | ({ + boolean?: boolean; + } & ModelWithEnum & + ModelWithArray & + ModelWithDictionary) + | null; }; /** * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a base model with two simple optional properties */ export type CompositionBaseModel = { - firstName?: string; - lastname?: string; + firstName?: string; + lastname?: string; }; /** * This is a model that extends the base model */ export type CompositionExtendedModel = CompositionBaseModel & { - firstName: string; - lastname: string; - age: number; + firstName: string; + lastname: string; + age: number; }; /** * This is a model with one nested property */ export type ModelWithProperties = { - required: string; - readonly requiredAndReadOnly: string; - requiredAndNullable: string | null; - string?: string; - number?: number; - boolean?: boolean; - reference?: ModelWithString; - 'property with space'?: string; - default?: string; - try?: string; - readonly '@namespace.string'?: string; - readonly '@namespace.integer'?: number; + required: string; + readonly requiredAndReadOnly: string; + requiredAndNullable: string | null; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; }; /** * This is a model with one nested property */ export type ModelWithNestedProperties = { - readonly first: { - readonly second: { - readonly third: string | null; - } | null; + readonly first: { + readonly second: { + readonly third: string | null; } | null; + } | null; }; /** * This is a model with duplicated properties */ export type ModelWithDuplicateProperties = { - prop?: ModelWithString; + prop?: ModelWithString; }; /** * This is a model with ordered properties */ export type ModelWithOrderedProperties = { - zebra?: string; - apple?: string; - hawaii?: string; + zebra?: string; + apple?: string; + hawaii?: string; }; /** * This is a model with duplicated imports */ export type ModelWithDuplicateImports = { - propA?: ModelWithString; - propB?: ModelWithString; - propC?: ModelWithString; + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtends = ModelWithString & { - propExtendsA?: string; - propExtendsB?: ModelWithString; + propExtendsA?: string; + propExtendsB?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtendsExtends = ModelWithString & - ModelThatExtends & { - propExtendsC?: string; - propExtendsD?: ModelWithString; - }; + ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; + }; /** * This is a model that contains a some patterns */ export type ModelWithPattern = { - key: string; - name: string; - readonly enabled?: boolean; - readonly modified?: string; - id?: string; - text?: string; - patternWithSingleQuotes?: string; - patternWithNewline?: string; - patternWithBacktick?: string; + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; }; export type File = { - readonly id?: string; - readonly updated_at?: string; - readonly created_at?: string; - mime: string; - readonly file?: string; + readonly id?: string; + readonly updated_at?: string; + readonly created_at?: string; + mime: string; + readonly file?: string; }; export type _default = { - name?: string; + name?: string; }; export type Pageable = { - page?: number; - size?: number; - sort?: Array; + page?: number; + size?: number; + sort?: Array; }; /** * This is a free-form object without additionalProperties. */ export type FreeFormObjectWithoutAdditionalProperties = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: true. */ export type FreeFormObjectWithAdditionalPropertiesEqTrue = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: {}. */ export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = { - [key: string]: unknown; + [key: string]: unknown; }; export type ModelWithConst = { - String?: 'String'; - number?: 0; - null?: null; - withType?: 'Some string'; + String?: 'String'; + number?: 0; + null?: null; + withType?: 'Some string'; }; /** * This is a model with one property and additionalProperties: true */ export type ModelWithAdditionalPropertiesEqTrue = { - /** - * This is a simple string property - */ - prop?: string; - [key: string]: unknown; + /** + * This is a simple string property + */ + prop?: string; + [key: string]: unknown; }; export type NestedAnyOfArraysNullable = { - nullableArray?: Array | null; + nullableArray?: Array | null; }; export type CompositionWithOneOfAndProperties = - | { - foo: SimpleParameter; - baz: number | null; - qux: number; - } - | { - bar: NonAsciiStringæøåÆØÅöôêÊ字符串; - baz: number | null; - qux: number; - }; + | { + foo: SimpleParameter; + baz: number | null; + qux: number; + } + | { + bar: NonAsciiStringæøåÆØÅöôêÊ字符串; + baz: number | null; + qux: number; + }; /** * An object that can be null */ export type NullableObject = { - foo?: string; + foo?: string; } | null; /** @@ -726,71 +760,81 @@ export type NullableObject = { export type CharactersInDescription = string; export type ModelWithNullableObject = { - data?: NullableObject; + data?: NullableObject; }; export type ModelWithOneOfEnum = - | { - foo: 'Bar'; - } - | { - foo: 'Baz'; - } - | { - foo: 'Qux'; - } - | { - content: string; - foo: 'Quux'; - } - | { - content: [string, string]; - foo: 'Corge'; - }; + | { + foo: 'Bar'; + } + | { + foo: 'Baz'; + } + | { + foo: 'Qux'; + } + | { + content: string; + foo: 'Quux'; + } + | { + content: [string, string]; + foo: 'Corge'; + }; export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; export type ModelWithNestedArrayEnumsData = { - foo?: Array; - bar?: Array; + foo?: Array; + bar?: Array; }; export type ModelWithNestedArrayEnums = { - array_strings?: Array; - data?: ModelWithNestedArrayEnumsData; + array_strings?: Array; + data?: ModelWithNestedArrayEnumsData; }; export type ModelWithNestedCompositionEnums = { - foo?: ModelWithNestedArrayEnumsDataFoo; + foo?: ModelWithNestedArrayEnumsDataFoo; }; export type ModelWithReadOnlyAndWriteOnly = { - foo: string; - readonly bar: string; - baz: string; + foo: string; + readonly bar: string; + baz: string; }; export type ModelWithConstantSizeArray = [number, number]; -export type ModelWithAnyOfConstantSizeArray = [number | string, number | string, number | string]; +export type ModelWithAnyOfConstantSizeArray = [ + number | string, + number | string, + number | string, +]; export type ModelWithAnyOfConstantSizeArrayNullable = [ - number | null | string, - number | null | string, - number | null | string, + number | null | string, + number | null | string, + number | null | string, ]; -export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [number | string, number | string]; +export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ + number | string, + number | string, +]; -export type ModelWithAnyOfConstantSizeArrayAndIntersect = [number & string, number & string]; +export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ + number & string, + number & string, +]; export type ModelWithNumericEnumUnion = { - /** - * Период - */ - value?: 1 | 3 | 6 | 12; + /** + * Период + */ + value?: 1 | 3 | 6 | 12; }; /** @@ -804,603 +848,609 @@ export type SimpleParameter = string; export type x_Foo_Bar = string; export type $OpenApiTs = { - '/api/v{api-version}/no-tag': { - post: { - req: { - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; - }; - res: { - 200: ModelWithReadOnlyAndWriteOnly; - }; - }; + '/api/v{api-version}/no-tag': { + post: { + req: { + requestBody: + | ModelWithReadOnlyAndWriteOnly + | ModelWithArrayReadOnlyAndWriteOnly; + }; + res: { + 200: ModelWithReadOnlyAndWriteOnly; + }; }; - '/api/v{api-version}/simple/$count': { - get: { - res: { - /** - * Success - */ - 200: Model_From_Zendesk; - }; - }; + }; + '/api/v{api-version}/simple/$count': { + get: { + res: { + /** + * Success + */ + 200: Model_From_Zendesk; + }; }; - '/api/v{api-version}/foo/{foo}/bar/{bar}': { - delete: { - req: { - /** - * bar in method - */ - bar: string; - /** - * foo in method - */ - foo: string; - }; - }; + }; + '/api/v{api-version}/foo/{foo}/bar/{bar}': { + delete: { + req: { + /** + * bar in method + */ + bar: string; + /** + * foo in method + */ + foo: string; + }; }; - '/api/v{api-version}/parameters/{parameterPath}': { - post: { - req: { - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath: string | null; - /** - * This is the parameter that goes into the query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameterPath}': { + post: { + req: { + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath: string | null; + /** + * This is the parameter that goes into the query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { - post: { - req: { - /** - * This is the parameter with a reserved keyword - */ - _default?: string; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the request form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the request header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath1?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath2?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath3?: string; - /** - * This is the parameter that goes into the request query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { + post: { + req: { + /** + * This is the parameter with a reserved keyword + */ + _default?: string; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the request form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the request header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath1?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath2?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath3?: string; + /** + * This is the parameter that goes into the request query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/': { - get: { - req: { - /** - * This is an optional parameter - */ - parameter?: string; - /** - * This is a required parameter - */ - requestBody: ModelWithOneOfEnum; - }; - }; - post: { - req: { - /** - * This is a required parameter - */ - parameter: Pageable; - /** - * This is an optional parameter - */ - requestBody?: ModelWithString; - }; - }; + }; + '/api/v{api-version}/parameters/': { + get: { + req: { + /** + * This is an optional parameter + */ + parameter?: string; + /** + * This is a required parameter + */ + requestBody: ModelWithOneOfEnum; + }; }; - '/api/v{api-version}/descriptions/': { - post: { - req: { - /** - * Testing backticks in string: `backticks` and ```multiple backticks``` should work - */ - parameterWithBackticks?: unknown; - /** - * Testing multiline comments in string: First line - * Second line - * - * Fourth line - */ - parameterWithBreaks?: unknown; - /** - * Testing expression placeholders in string: ${expression} should work - */ - parameterWithExpressionPlaceholders?: unknown; - /** - * Testing quotes in string: 'single quote''' and "double quotes""" should work - */ - parameterWithQuotes?: unknown; - /** - * Testing reserved characters in string: * inline * and ** inline ** should work - */ - parameterWithReservedCharacters?: unknown; - /** - * Testing slashes in string: \backwards\\\ and /forwards/// should work - */ - parameterWithSlashes?: unknown; - }; - }; + post: { + req: { + /** + * This is a required parameter + */ + parameter: Pageable; + /** + * This is an optional parameter + */ + requestBody?: ModelWithString; + }; }; - '/api/v{api-version}/parameters/deprecated': { - post: { - req: { - /** - * This parameter is deprecated - * @deprecated - */ - parameter: DeprecatedModel | null; - }; - }; + }; + '/api/v{api-version}/descriptions/': { + post: { + req: { + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: unknown; + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: unknown; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: unknown; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: unknown; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: unknown; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: unknown; + }; }; - '/api/v{api-version}/requestBody/': { - post: { - req: { - /** - * A reusable request body - */ - foo?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/parameters/deprecated': { + post: { + req: { + /** + * This parameter is deprecated + * @deprecated + */ + parameter: DeprecatedModel | null; + }; }; - '/api/v{api-version}/formData/': { - post: { - req: { - /** - * A reusable request body - */ - formData?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/requestBody/': { + post: { + req: { + /** + * A reusable request body + */ + foo?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/defaults': { - get: { - req: { - /** - * This is a simple boolean with default value - */ - parameterBoolean?: boolean | null; - /** - * This is a simple enum with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model with default value - */ - parameterModel?: ModelWithString | null; - /** - * This is a simple number with default value - */ - parameterNumber?: number | null; - /** - * This is a simple string with default value - */ - parameterString?: string | null; - }; - }; - post: { - req: { - /** - * This is a simple boolean that is optional with default value - */ - parameterBoolean?: boolean; - /** - * This is a simple enum that is optional with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model that is optional with default value - */ - parameterModel?: ModelWithString; - /** - * This is a simple number that is optional with default value - */ - parameterNumber?: number; - /** - * This is a simple string that is optional with default value - */ - parameterString?: string; - }; - }; - put: { - req: { - /** - * This is a optional string with default - */ - parameterOptionalStringWithDefault?: string; - /** - * This is a optional string with empty default - */ - parameterOptionalStringWithEmptyDefault?: string; - /** - * This is a optional string with no default - */ - parameterOptionalStringWithNoDefault?: string; - /** - * This is a string that can be null with default - */ - parameterStringNullableWithDefault?: string | null; - /** - * This is a string that can be null with no default - */ - parameterStringNullableWithNoDefault?: string | null; - /** - * This is a string with default - */ - parameterStringWithDefault: string; - /** - * This is a string with empty default - */ - parameterStringWithEmptyDefault: string; - /** - * This is a string with no default - */ - parameterStringWithNoDefault: string; - }; - }; + }; + '/api/v{api-version}/formData/': { + post: { + req: { + /** + * A reusable request body + */ + formData?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/no-content': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/defaults': { + get: { + req: { + /** + * This is a simple boolean with default value + */ + parameterBoolean?: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel?: ModelWithString | null; + /** + * This is a simple number with default value + */ + parameterNumber?: number | null; + /** + * This is a simple string with default value + */ + parameterString?: string | null; + }; }; - '/api/v{api-version}/multiple-tags/response-and-no-content': { - get: { - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Success - */ - 204: void; - }; - }; + post: { + req: { + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + }; }; - '/api/v{api-version}/response': { - get: { - res: { - 200: ModelWithString; - }; - }; - post: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - }; - }; - put: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - /** - * Message for 201 response - */ - 201: ModelThatExtends; - /** - * Message for 202 response - */ - 202: ModelThatExtendsExtends; - }; - }; + put: { + req: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + }; }; - '/api/v{api-version}/multiple-tags/a': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/no-content': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/multiple-tags/b': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/multiple-tags/response-and-no-content': { + get: { + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/collectionFormat': { - get: { - req: { - /** - * This is an array parameter that is sent as csv format (comma-separated values) - */ - parameterArrayCsv: Array | null; - /** - * This is an array parameter that is sent as multi format (multiple parameter instances) - */ - parameterArrayMulti: Array | null; - /** - * This is an array parameter that is sent as pipes format (pipe-separated values) - */ - parameterArrayPipes: Array | null; - /** - * This is an array parameter that is sent as ssv format (space-separated values) - */ - parameterArraySsv: Array | null; - /** - * This is an array parameter that is sent as tsv format (tab-separated values) - */ - parameterArrayTsv: Array | null; - }; - }; + }; + '/api/v{api-version}/response': { + get: { + res: { + 200: ModelWithString; + }; }; - '/api/v{api-version}/types': { - get: { - req: { - /** - * This is a number parameter - */ - id?: number; - /** - * This is an array parameter - */ - parameterArray: Array | null; - /** - * This is a boolean parameter - */ - parameterBoolean: boolean | null; - /** - * This is a dictionary parameter - */ - parameterDictionary: { - [key: string]: unknown; - } | null; - /** - * This is an enum parameter - */ - parameterEnum: 'Success' | 'Warning' | 'Error' | null; - /** - * This is a number parameter - */ - parameterNumber: number; - /** - * This is an object parameter - */ - parameterObject: { - [key: string]: unknown; - } | null; - /** - * This is a string parameter - */ - parameterString: string | null; - }; - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Response is a simple string - */ - 201: string; - /** - * Response is a simple boolean - */ - 202: boolean; - /** - * Response is a simple object - */ - 203: { - [key: string]: unknown; - }; - }; - }; + post: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/upload': { - post: { - req: { - /** - * Supply a file reference for upload - */ - file: Blob | File; - }; - res: { - 200: boolean; - }; - }; + put: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; + }; }; - '/api/v{api-version}/file/{id}': { - get: { - req: { - id: string; - }; - res: { - /** - * Success - */ - 200: Blob | File; - }; - }; + }; + '/api/v{api-version}/multiple-tags/a': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex': { - get: { - req: { - /** - * Parameter containing object - */ - parameterObject: { - first?: { - second?: { - third?: string; - }; - }; - }; - /** - * Parameter containing reference - */ - parameterReference: ModelWithString; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; - }; + }; + '/api/v{api-version}/multiple-tags/b': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex/{id}': { - put: { - req: { - id: number; - requestBody?: { - readonly key: string | null; - name: string | null; - enabled?: boolean; - readonly type: 'Monkey' | 'Horse' | 'Bird'; - listOfModels?: Array | null; - listOfStrings?: Array | null; - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; - readonly user?: { - readonly id?: number; - readonly name?: string | null; - }; - }; - }; - res: { - /** - * Success - */ - 200: ModelWithString; - }; - }; + }; + '/api/v{api-version}/collectionFormat': { + get: { + req: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCsv: Array | null; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array | null; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array | null; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySsv: Array | null; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTsv: Array | null; + }; }; - '/api/v{api-version}/multipart': { - post: { - req: { - formData?: { - content?: Blob | File; - data?: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/types': { + get: { + req: { + /** + * This is a number parameter + */ + id?: number; + /** + * This is an array parameter + */ + parameterArray: Array | null; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean | null; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: unknown; + } | null; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error' | null; + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is an object parameter + */ + parameterObject: { + [key: string]: unknown; + } | null; + /** + * This is a string parameter + */ + parameterString: string | null; + }; + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: { + [key: string]: unknown; }; - get: { - res: { - /** - * OK - */ - 200: { - file?: Blob | File; - metadata?: { - foo?: string; - bar?: string; - }; - }; + }; + }; + }; + '/api/v{api-version}/upload': { + post: { + req: { + /** + * Supply a file reference for upload + */ + file: Blob | File; + }; + res: { + 200: boolean; + }; + }; + }; + '/api/v{api-version}/file/{id}': { + get: { + req: { + id: string; + }; + res: { + /** + * Success + */ + 200: Blob | File; + }; + }; + }; + '/api/v{api-version}/complex': { + get: { + req: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; }; + }; }; + /** + * Parameter containing reference + */ + parameterReference: ModelWithString; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; - '/api/v{api-version}/header': { - post: { - res: { - /** - * Successful response - */ - 200: string; - }; + }; + '/api/v{api-version}/complex/{id}': { + put: { + req: { + id: number; + requestBody?: { + readonly key: string | null; + name: string | null; + enabled?: boolean; + readonly type: 'Monkey' | 'Horse' | 'Bird'; + listOfModels?: Array | null; + listOfStrings?: Array | null; + parameters: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; + readonly user?: { + readonly id?: number; + readonly name?: string | null; + }; }; + }; + res: { + /** + * Success + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/error': { - post: { - req: { - /** - * Status code to return - */ - status: number; - }; - res: { - /** - * Custom message: Successful response - */ - 200: unknown; - }; + }; + '/api/v{api-version}/multipart': { + post: { + req: { + formData?: { + content?: Blob | File; + data?: ModelWithString | null; }; + }; }; - '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { - post: { - req: { - /** - * Dummy input param - */ - nonAsciiParamæøåÆøÅöôêÊ: number; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; + get: { + res: { + /** + * OK + */ + 200: { + file?: Blob | File; + metadata?: { + foo?: string; + bar?: string; + }; }; + }; + }; + }; + '/api/v{api-version}/header': { + post: { + res: { + /** + * Successful response + */ + 200: string; + }; + }; + }; + '/api/v{api-version}/error': { + post: { + req: { + /** + * Status code to return + */ + status: number; + }; + res: { + /** + * Custom message: Successful response + */ + 200: unknown; + }; + }; + }; + '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { + post: { + req: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆøÅöôêÊ: number; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; + }; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/OpenAPI.ts.snap index 2011d7b55..48897c2af 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/OpenAPI.ts.snap @@ -6,46 +6,46 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { response: Interceptors> }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { response: Interceptors> }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/request.ts.snap index fc2a49e2d..18360ac84 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/request.ts.snap @@ -10,270 +10,294 @@ import type { ApiResult } from './ApiResult'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; - - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; + + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); + + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): Observable => { - return forkJoin({ - token: resolve(options, config.TOKEN), - username: resolve(options, config.USERNAME), - password: resolve(options, config.PASSWORD), - additionalHeaders: resolve(options, config.HEADERS), - }).pipe( - map(({ token, username, password, additionalHeaders }) => { - const headers = Object.entries({ - Accept: 'application/json', - ...additionalHeaders, - ...options.headers, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } - } - - return new HttpHeaders(headers); - }) - ); +export const getHeaders = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Observable => { + return forkJoin({ + token: resolve(options, config.TOKEN), + username: resolve(options, config.USERNAME), + password: resolve(options, config.PASSWORD), + additionalHeaders: resolve(options, config.HEADERS), + }).pipe( + map(({ token, username, password, additionalHeaders }) => { + const headers = Object.entries({ + Accept: 'application/json', + ...additionalHeaders, + ...options.headers, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = + options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; + } + } + + return new HttpHeaders(headers); + }), + ); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = ( - config: OpenAPIConfig, - options: ApiRequestOptions, - http: HttpClient, - url: string, - body: unknown, - formData: FormData | undefined, - headers: HttpHeaders + config: OpenAPIConfig, + options: ApiRequestOptions, + http: HttpClient, + url: string, + body: unknown, + formData: FormData | undefined, + headers: HttpHeaders, ): Observable> => { - return http.request(options.method, url, { - headers, - body: body ?? formData, - withCredentials: config.WITH_CREDENTIALS, - observe: 'response', - }); + return http.request(options.method, url, { + headers, + body: body ?? formData, + withCredentials: config.WITH_CREDENTIALS, + observe: 'response', + }); }; -export const getResponseHeader = (response: HttpResponse, responseHeader?: string): string | undefined => { - if (responseHeader) { - const value = response.headers.get(responseHeader); - if (isString(value)) { - return value; - } +export const getResponseHeader = ( + response: HttpResponse, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const value = response.headers.get(responseHeader); + if (isString(value)) { + return value; } - return undefined; + } + return undefined; }; -export const getResponseBody = (response: HttpResponse): T | undefined => { - if (response.status !== 204 && response.body !== null) { - return response.body; - } - return undefined; +export const getResponseBody = ( + response: HttpResponse, +): T | undefined => { + if (response.status !== 204 && response.body !== null) { + return response.body; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -284,47 +308,62 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns Observable * @throws ApiError */ -export const request = (config: OpenAPIConfig, http: HttpClient, options: ApiRequestOptions): Observable => { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - - return getHeaders(config, options).pipe( - switchMap(headers => { - return sendRequest(config, options, http, url, body, formData, headers); - }), - switchMap(async response => { - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - const responseBody = getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - return { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - } as ApiResult; - }), - catchError((error: HttpErrorResponse) => { - if (!error.status) { - return throwError(() => error); - } - return of({ - url, - ok: error.ok, - status: error.status, - statusText: error.statusText, - body: error.error ?? error.statusText, - } as ApiResult); - }), - map(result => { - catchErrorCodes(options, result); - return result.body as T; - }), - catchError((error: ApiError) => { - return throwError(() => error); - }) - ); +export const request = ( + config: OpenAPIConfig, + http: HttpClient, + options: ApiRequestOptions, +): Observable => { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + + return getHeaders(config, options).pipe( + switchMap((headers) => { + return sendRequest( + config, + options, + http, + url, + body, + formData, + headers, + ); + }), + switchMap(async (response) => { + for (const fn of config.interceptors.response._fns) { + response = await fn(response); + } + const responseBody = getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + return { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + } as ApiResult; + }), + catchError((error: HttpErrorResponse) => { + if (!error.status) { + return throwError(() => error); + } + return of({ + url, + ok: error.ok, + status: error.status, + statusText: error.statusText, + body: error.error ?? error.statusText, + } as ApiResult); + }), + map((result) => { + catchErrorCodes(options, result); + return result.body as T; + }), + catchError((error: ApiError) => { + return throwError(() => error); + }), + ); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/services.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/services.gen.ts.snap index e6d0720b9..e90439908 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/services.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/services.gen.ts.snap @@ -8,959 +8,1012 @@ import { request as __request } from './core/request'; import type { $OpenApiTs } from './types.gen'; @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class DefaultService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public serviceWithEmptyTag(): Observable { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/no-tag', - }); - } - - /** - * @returns ModelWithReadOnlyAndWriteOnly - * @throws ApiError - */ - public postServiceWithEmptyTag( - data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'] - ): Observable<$OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200]> { - const { requestBody } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/no-tag', - body: requestBody, - mediaType: 'application/json', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public serviceWithEmptyTag(): Observable { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/no-tag', + }); + } + + /** + * @returns ModelWithReadOnlyAndWriteOnly + * @throws ApiError + */ + public postServiceWithEmptyTag( + data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'], + ): Observable<$OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200]> { + const { requestBody } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/no-tag', + body: requestBody, + mediaType: 'application/json', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class SimpleService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns Model_From_Zendesk Success - * @throws ApiError - */ - public apiVVersionOdataControllerCount(): Observable< - $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] - > { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/simple/$count', - }); - } - - /** - * @throws ApiError - */ - public getCallWithoutParametersAndResponse(): Observable { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public putCallWithoutParametersAndResponse(): Observable { - return __request(OpenAPI, this.http, { - method: 'PUT', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public postCallWithoutParametersAndResponse(): Observable { - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public deleteCallWithoutParametersAndResponse(): Observable { - return __request(OpenAPI, this.http, { - method: 'DELETE', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public optionsCallWithoutParametersAndResponse(): Observable { - return __request(OpenAPI, this.http, { - method: 'OPTIONS', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public headCallWithoutParametersAndResponse(): Observable { - return __request(OpenAPI, this.http, { - method: 'HEAD', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public patchCallWithoutParametersAndResponse(): Observable { - return __request(OpenAPI, this.http, { - method: 'PATCH', - url: '/api/v{api-version}/simple', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns Model_From_Zendesk Success + * @throws ApiError + */ + public apiVVersionOdataControllerCount(): Observable< + $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/simple/$count', + }); + } + + /** + * @throws ApiError + */ + public getCallWithoutParametersAndResponse(): Observable { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public putCallWithoutParametersAndResponse(): Observable { + return __request(OpenAPI, this.http, { + method: 'PUT', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public postCallWithoutParametersAndResponse(): Observable { + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public deleteCallWithoutParametersAndResponse(): Observable { + return __request(OpenAPI, this.http, { + method: 'DELETE', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public optionsCallWithoutParametersAndResponse(): Observable { + return __request(OpenAPI, this.http, { + method: 'OPTIONS', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public headCallWithoutParametersAndResponse(): Observable { + return __request(OpenAPI, this.http, { + method: 'HEAD', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public patchCallWithoutParametersAndResponse(): Observable { + return __request(OpenAPI, this.http, { + method: 'PATCH', + url: '/api/v{api-version}/simple', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class ParametersService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public deleteFoo(data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req']): Observable { - const { foo, bar } = data; - return __request(OpenAPI, this.http, { - method: 'DELETE', - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', - path: { - foo, - bar, - }, - }); - } - - /** - * @throws ApiError - */ - public callWithParameters( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'] - ): Observable { - const { - parameterHeader, - fooAllOfEnum, - parameterQuery, - parameterForm, - parameterCookie, - parameterPath, - requestBody, - fooRefEnum, - } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameterPath}', - path: { - parameterPath, - }, - cookies: { - parameterCookie, - }, - headers: { - parameterHeader, - }, - query: { - foo_ref_enum: fooRefEnum, - foo_all_of_enum: fooAllOfEnum, - parameterQuery, - }, - formData: { - parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public callWithWeirdParameterNames( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'] - ): Observable { - const { - parameterHeader, - parameterQuery, - parameterForm, - parameterCookie, - requestBody, - parameterPath1, - parameterPath2, - parameterPath3, - _default, - } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', - path: { - 'parameter.path.1': parameterPath1, - 'parameter-path-2': parameterPath2, - 'PARAMETER-PATH-3': parameterPath3, - }, - cookies: { - 'PARAMETER-COOKIE': parameterCookie, - }, - headers: { - 'parameter.header': parameterHeader, - }, - query: { - default: _default, - 'parameter-query': parameterQuery, - }, - formData: { - parameter_form: parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public getCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'] - ): Observable { - const { requestBody, parameter } = data; - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public postCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'] - ): Observable { - const { parameter, requestBody } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public deleteFoo( + data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req'], + ): Observable { + const { foo, bar } = data; + return __request(OpenAPI, this.http, { + method: 'DELETE', + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', + path: { + foo, + bar, + }, + }); + } + + /** + * @throws ApiError + */ + public callWithParameters( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'], + ): Observable { + const { + parameterHeader, + fooAllOfEnum, + parameterQuery, + parameterForm, + parameterCookie, + parameterPath, + requestBody, + fooRefEnum, + } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameterPath}', + path: { + parameterPath, + }, + cookies: { + parameterCookie, + }, + headers: { + parameterHeader, + }, + query: { + foo_ref_enum: fooRefEnum, + foo_all_of_enum: fooAllOfEnum, + parameterQuery, + }, + formData: { + parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public callWithWeirdParameterNames( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'], + ): Observable { + const { + parameterHeader, + parameterQuery, + parameterForm, + parameterCookie, + requestBody, + parameterPath1, + parameterPath2, + parameterPath3, + _default, + } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + path: { + 'parameter.path.1': parameterPath1, + 'parameter-path-2': parameterPath2, + 'PARAMETER-PATH-3': parameterPath3, + }, + cookies: { + 'PARAMETER-COOKIE': parameterCookie, + }, + headers: { + 'parameter.header': parameterHeader, + }, + query: { + default: _default, + 'parameter-query': parameterQuery, + }, + formData: { + parameter_form: parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public getCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'], + ): Observable { + const { requestBody, parameter } = data; + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public postCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'], + ): Observable { + const { parameter, requestBody } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class DescriptionsService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public callWithDescriptions( - data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {} - ): Observable { - const { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/descriptions/', - query: { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public callWithDescriptions( + data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {}, + ): Observable { + const { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/descriptions/', + query: { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class DeprecatedService { - constructor(public readonly http: HttpClient) {} - - /** - * @deprecated - * @throws ApiError - */ - public deprecatedCall( - data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'] - ): Observable { - const { parameter } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/parameters/deprecated', - headers: { - parameter, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @deprecated + * @throws ApiError + */ + public deprecatedCall( + data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'], + ): Observable { + const { parameter } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/parameters/deprecated', + headers: { + parameter, + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class RequestBodyService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public postApiRequestBody( - data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {} - ): Observable { - const { parameter, foo } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/requestBody/', - query: { - parameter, - }, - body: foo, - mediaType: 'application/json', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public postApiRequestBody( + data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {}, + ): Observable { + const { parameter, foo } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/requestBody/', + query: { + parameter, + }, + body: foo, + mediaType: 'application/json', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class FormDataService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public postApiFormData(data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {}): Observable { - const { parameter, formData } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/formData/', - query: { - parameter, - }, - formData, - mediaType: 'multipart/form-data', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public postApiFormData( + data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {}, + ): Observable { + const { parameter, formData } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/formData/', + query: { + parameter, + }, + formData, + mediaType: 'multipart/form-data', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class DefaultsService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public callWithDefaultParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {} - ): Observable { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public callWithDefaultOptionalParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {} - ): Observable { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public callToTestOrderOfParams(data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']): Observable { - const { - parameterStringWithNoDefault, - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - } = data; - return __request(OpenAPI, this.http, { - method: 'PUT', - url: '/api/v{api-version}/defaults', - query: { - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringWithNoDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public callWithDefaultParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {}, + ): Observable { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public callWithDefaultOptionalParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {}, + ): Observable { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public callToTestOrderOfParams( + data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'], + ): Observable { + const { + parameterStringWithNoDefault, + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + } = data; + return __request(OpenAPI, this.http, { + method: 'PUT', + url: '/api/v{api-version}/defaults', + query: { + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringWithNoDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class DuplicateService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public duplicateName(): Observable { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public duplicateName1(): Observable { - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public duplicateName2(): Observable { - return __request(OpenAPI, this.http, { - method: 'PUT', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public duplicateName3(): Observable { - return __request(OpenAPI, this.http, { - method: 'DELETE', - url: '/api/v{api-version}/duplicate', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public duplicateName(): Observable { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public duplicateName1(): Observable { + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public duplicateName2(): Observable { + return __request(OpenAPI, this.http, { + method: 'PUT', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public duplicateName3(): Observable { + return __request(OpenAPI, this.http, { + method: 'DELETE', + url: '/api/v{api-version}/duplicate', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class NoContentService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns void Success - * @throws ApiError - */ - public callWithNoContentResponse(): Observable<$OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/no-content', - }); - } - - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public callWithResponseAndNoContentResponse(): Observable< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns void Success + * @throws ApiError + */ + public callWithNoContentResponse(): Observable< + $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/no-content', + }); + } + + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public callWithResponseAndNoContentResponse(): Observable< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class ResponseService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public callWithResponseAndNoContentResponse(): Observable< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } - - /** - * @returns ModelWithString - * @throws ApiError - */ - public callWithResponse(): Observable<$OpenApiTs['/api/v{api-version}/response']['get']['res'][200]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/response', - }); - } - - /** - * @returns ModelWithString Message for default response - * @throws ApiError - */ - public callWithDuplicateResponses(): Observable<$OpenApiTs['/api/v{api-version}/response']['post']['res'][200]> { - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } - - /** - * @returns unknown Message for 200 response - * @returns ModelWithString Message for default response - * @returns ModelThatExtends Message for 201 response - * @returns ModelThatExtendsExtends Message for 202 response - * @throws ApiError - */ - public callWithResponses(): Observable< - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] - > { - return __request(OpenAPI, this.http, { - method: 'PUT', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public callWithResponseAndNoContentResponse(): Observable< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } + + /** + * @returns ModelWithString + * @throws ApiError + */ + public callWithResponse(): Observable< + $OpenApiTs['/api/v{api-version}/response']['get']['res'][200] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/response', + }); + } + + /** + * @returns ModelWithString Message for default response + * @throws ApiError + */ + public callWithDuplicateResponses(): Observable< + $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] + > { + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } + + /** + * @returns unknown Message for 200 response + * @returns ModelWithString Message for default response + * @returns ModelThatExtends Message for 201 response + * @returns ModelThatExtendsExtends Message for 202 response + * @throws ApiError + */ + public callWithResponses(): Observable< + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] + > { + return __request(OpenAPI, this.http, { + method: 'PUT', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class MultipleTags1Service { - constructor(public readonly http: HttpClient) {} - - /** - * @returns void Success - * @throws ApiError - */ - public dummyA(): Observable<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public dummyB(): Observable<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns void Success + * @throws ApiError + */ + public dummyA(): Observable< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public dummyB(): Observable< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class MultipleTags2Service { - constructor(public readonly http: HttpClient) {} - - /** - * @returns void Success - * @throws ApiError - */ - public dummyA(): Observable<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public dummyB(): Observable<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns void Success + * @throws ApiError + */ + public dummyA(): Observable< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public dummyB(): Observable< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class MultipleTags3Service { - constructor(public readonly http: HttpClient) {} - - /** - * @returns void Success - * @throws ApiError - */ - public dummyB(): Observable<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns void Success + * @throws ApiError + */ + public dummyB(): Observable< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class CollectionFormatService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public collectionFormat(data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req']): Observable { - const { parameterArrayCsv, parameterArraySsv, parameterArrayTsv, parameterArrayPipes, parameterArrayMulti } = - data; - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/collectionFormat', - query: { - parameterArrayCSV: parameterArrayCsv, - parameterArraySSV: parameterArraySsv, - parameterArrayTSV: parameterArrayTsv, - parameterArrayPipes, - parameterArrayMulti, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public collectionFormat( + data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'], + ): Observable { + const { + parameterArrayCsv, + parameterArraySsv, + parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + } = data; + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/collectionFormat', + query: { + parameterArrayCSV: parameterArrayCsv, + parameterArraySSV: parameterArraySsv, + parameterArrayTSV: parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class TypesService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns number Response is a simple number - * @returns string Response is a simple string - * @returns boolean Response is a simple boolean - * @returns unknown Response is a simple object - * @throws ApiError - */ - public types( - data: $OpenApiTs['/api/v{api-version}/types']['get']['req'] - ): Observable< - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] - > { - const { - parameterArray, - parameterDictionary, - parameterEnum, - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - id, - } = data; - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/types', - path: { - id, - }, - query: { - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - parameterArray, - parameterDictionary, - parameterEnum, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns number Response is a simple number + * @returns string Response is a simple string + * @returns boolean Response is a simple boolean + * @returns unknown Response is a simple object + * @throws ApiError + */ + public types( + data: $OpenApiTs['/api/v{api-version}/types']['get']['req'], + ): Observable< + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] + > { + const { + parameterArray, + parameterDictionary, + parameterEnum, + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + id, + } = data; + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/types', + path: { + id, + }, + query: { + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + parameterArray, + parameterDictionary, + parameterEnum, + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class UploadService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns boolean - * @throws ApiError - */ - public uploadFile( - data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'] - ): Observable<$OpenApiTs['/api/v{api-version}/upload']['post']['res'][200]> { - const { file } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/upload', - formData: { - file, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns boolean + * @throws ApiError + */ + public uploadFile( + data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'], + ): Observable<$OpenApiTs['/api/v{api-version}/upload']['post']['res'][200]> { + const { file } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/upload', + formData: { + file, + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class FileResponseService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns binary Success - * @throws ApiError - */ - public fileResponse( - data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'] - ): Observable<$OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200]> { - const { id } = data; - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/file/{id}', - path: { - id, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns binary Success + * @throws ApiError + */ + public fileResponse( + data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'], + ): Observable< + $OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200] + > { + const { id } = data; + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/file/{id}', + path: { + id, + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class ComplexService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns ModelWithString Successful response - * @throws ApiError - */ - public complexTypes( - data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'] - ): Observable<$OpenApiTs['/api/v{api-version}/complex']['get']['res'][200]> { - const { parameterObject, parameterReference } = data; - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/complex', - query: { - parameterObject, - parameterReference, - }, - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } - - /** - * @returns ModelWithString Success - * @throws ApiError - */ - public complexParams( - data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'] - ): Observable<$OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200]> { - const { id, requestBody } = data; - return __request(OpenAPI, this.http, { - method: 'PUT', - url: '/api/v{api-version}/complex/{id}', - path: { - id, - }, - body: requestBody, - mediaType: 'application/json-patch+json', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns ModelWithString Successful response + * @throws ApiError + */ + public complexTypes( + data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'], + ): Observable<$OpenApiTs['/api/v{api-version}/complex']['get']['res'][200]> { + const { parameterObject, parameterReference } = data; + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/complex', + query: { + parameterObject, + parameterReference, + }, + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } + + /** + * @returns ModelWithString Success + * @throws ApiError + */ + public complexParams( + data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'], + ): Observable< + $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200] + > { + const { id, requestBody } = data; + return __request(OpenAPI, this.http, { + method: 'PUT', + url: '/api/v{api-version}/complex/{id}', + path: { + id, + }, + body: requestBody, + mediaType: 'application/json-patch+json', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class MultipartService { - constructor(public readonly http: HttpClient) {} - - /** - * @throws ApiError - */ - public multipartRequest(data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {}): Observable { - const { formData } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/multipart', - formData, - mediaType: 'multipart/form-data', - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public multipartResponse(): Observable<$OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200]> { - return __request(OpenAPI, this.http, { - method: 'GET', - url: '/api/v{api-version}/multipart', - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @throws ApiError + */ + public multipartRequest( + data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {}, + ): Observable { + const { formData } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/multipart', + formData, + mediaType: 'multipart/form-data', + }); + } + + /** + * @returns unknown OK + * @throws ApiError + */ + public multipartResponse(): Observable< + $OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200] + > { + return __request(OpenAPI, this.http, { + method: 'GET', + url: '/api/v{api-version}/multipart', + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class HeaderService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns string Successful response - * @throws ApiError - */ - public callWithResultFromHeader(): Observable<$OpenApiTs['/api/v{api-version}/header']['post']['res'][200]> { - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/header', - responseHeader: 'operation-location', - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns string Successful response + * @throws ApiError + */ + public callWithResultFromHeader(): Observable< + $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] + > { + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/header', + responseHeader: 'operation-location', + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class ErrorService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns unknown Custom message: Successful response - * @throws ApiError - */ - public testErrorCode( - data: $OpenApiTs['/api/v{api-version}/error']['post']['req'] - ): Observable<$OpenApiTs['/api/v{api-version}/error']['post']['res'][200]> { - const { status } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/error', - query: { - status, - }, - errors: { - 500: 'Custom message: Internal Server Error', - 501: 'Custom message: Not Implemented', - 502: 'Custom message: Bad Gateway', - 503: 'Custom message: Service Unavailable', - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns unknown Custom message: Successful response + * @throws ApiError + */ + public testErrorCode( + data: $OpenApiTs['/api/v{api-version}/error']['post']['req'], + ): Observable<$OpenApiTs['/api/v{api-version}/error']['post']['res'][200]> { + const { status } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/error', + query: { + status, + }, + errors: { + 500: 'Custom message: Internal Server Error', + 501: 'Custom message: Not Implemented', + 502: 'Custom message: Bad Gateway', + 503: 'Custom message: Service Unavailable', + }, + }); + } } @Injectable({ - providedIn: 'root', + providedIn: 'root', }) export class NonAsciiÆøåÆøÅöôêÊService { - constructor(public readonly http: HttpClient) {} - - /** - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response - * @throws ApiError - */ - public nonAsciiæøåÆøÅöôêÊ字符串( - data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'] - ): Observable<$OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200]> { - const { nonAsciiParamæøåÆøÅöôêÊ } = data; - return __request(OpenAPI, this.http, { - method: 'POST', - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', - query: { - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, - }, - }); - } + constructor(public readonly http: HttpClient) {} + + /** + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response + * @throws ApiError + */ + public nonAsciiæøåÆøÅöôêÊ字符串( + data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'], + ): Observable< + $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200] + > { + const { nonAsciiParamæøåÆøÅöôêÊ } = data; + return __request(OpenAPI, this.http, { + method: 'POST', + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + query: { + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, + }, + }); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/types.gen.ts.snap index 8878b1994..ee3cf2769 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_angular/types.gen.ts.snap @@ -85,19 +85,39 @@ export type SimpleStringWithPattern = string | null; * This is a simple enum with strings */ export type EnumWithStrings = - | 'Success' - | 'Warning' - | 'Error' - | "'Single Quote'" - | '"Double Quotes"' - | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + | 'Success' + | 'Warning' + | 'Error' + | "'Single Quote'" + | '"Double Quotes"' + | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; -export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; +export type EnumWithReplacedCharacters = + | "'Single Quote'" + | '"Double Quotes"' + | 'øæåôöØÆÅÔÖ字符串' + | 3.1 + | ''; /** * This is a simple enum with numbers */ -export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; +export type EnumWithNumbers = + | 1 + | 2 + | 3 + | 1.1 + | 1.2 + | 1.3 + | 100 + | 200 + | 300 + | -100 + | -200 + | -300 + | -1.1 + | -1.2 + | -1.3; /** * Success=1,Warning=2,Error=3 @@ -140,113 +160,113 @@ export type ArrayWithArray = Array>; * This is a simple array with properties */ export type ArrayWithProperties = Array<{ - foo?: camelCaseCommentWithBreaks; - bar?: string; + foo?: camelCaseCommentWithBreaks; + bar?: string; }>; /** * This is a simple array with any of properties */ export type ArrayWithAnyOfProperties = Array< - | { - foo?: string; - } - | { - bar?: string; - } + | { + foo?: string; + } + | { + bar?: string; + } >; export type AnyOfAnyAndNull = { - data?: unknown | null; + data?: unknown | null; }; /** * This is a simple array with any of properties */ export type AnyOfArrays = { - results?: Array< - | { - foo?: string; - } - | { - bar?: string; - } - >; + results?: Array< + | { + foo?: string; + } + | { + bar?: string; + } + >; }; /** * This is a string dictionary */ export type DictionaryWithString = { - [key: string]: string; + [key: string]: string; }; export type DictionaryWithPropertiesAndAdditionalProperties = { - foo?: string; - [key: string]: string | undefined; + foo?: string; + [key: string]: string | undefined; }; /** * This is a string reference */ export type DictionaryWithReference = { - [key: string]: ModelWithString; + [key: string]: ModelWithString; }; /** * This is a complex dictionary */ export type DictionaryWithArray = { - [key: string]: Array; + [key: string]: Array; }; /** * This is a string dictionary */ export type DictionaryWithDictionary = { - [key: string]: { - [key: string]: string; - }; + [key: string]: { + [key: string]: string; + }; }; /** * This is a complex dictionary */ export type DictionaryWithProperties = { - [key: string]: { - foo?: string; - bar?: string; - }; + [key: string]: { + foo?: string; + bar?: string; + }; }; /** * This is a model with one number property */ export type ModelWithInteger = { - /** - * This is a simple number property - */ - prop?: number; + /** + * This is a simple number property + */ + prop?: number; }; /** * This is a model with one boolean property */ export type ModelWithBoolean = { - /** - * This is a simple boolean property - */ - prop?: boolean; + /** + * This is a simple boolean property + */ + prop?: boolean; }; /** * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; /** @@ -258,113 +278,119 @@ export type Model_From_Zendesk = string; * This is a model with one string property */ export type ModelWithNullableString = { - /** - * This is a simple string property - */ - nullableProp1?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp1: string | null; - /** - * This is a simple string property - */ - nullableProp2?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp2: string | null; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * This is a simple string property + */ + nullableProp1?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp1: string | null; + /** + * This is a simple string property + */ + nullableProp2?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp2: string | null; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one enum */ export type ModelWithEnum = { - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; - /** - * These are the HTTP error code enums - */ - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; - /** - * Simple boolean enum - */ - bool?: boolean; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: + | '100' + | '200 FOO' + | '300 FOO_BAR' + | '400 foo-bar' + | '500 foo.bar' + | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: boolean; }; /** * This is a model with one enum with escaped name */ export type ModelWithEnumWithHyphen = { - 'foo-bar-baz-qux'?: '3.0'; + 'foo-bar-baz-qux'?: '3.0'; }; /** * This is a model with one enum */ export type ModelWithEnumFromDescription = { - /** - * Success=1,Warning=2,Error=3 - */ - test?: number; + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; }; /** * This is a model with nested enums */ export type ModelWithNestedEnums = { - dictionaryWithEnum?: { - [key: string]: 'Success' | 'Warning' | 'Error'; - }; - dictionaryWithEnumFromDescription?: { - [key: string]: number; - }; - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; - arrayWithDescription?: Array; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one property containing a reference */ export type ModelWithReference = { - prop?: ModelWithProperties; + prop?: ModelWithProperties; }; /** * This is a model with one property containing an array */ export type ModelWithArrayReadOnlyAndWriteOnly = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing an array */ export type ModelWithArray = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing a dictionary */ export type ModelWithDictionary = { - prop?: { - [key: string]: string; - }; + prop?: { + [key: string]: string; + }; }; /** @@ -372,53 +398,57 @@ export type ModelWithDictionary = { * @deprecated */ export type DeprecatedModel = { - /** - * This is a deprecated property - * @deprecated - */ - prop?: string; + /** + * This is a deprecated property + * @deprecated + */ + prop?: string; }; /** * This is a model with one property containing a circular reference */ export type ModelWithCircularReference = { - prop?: ModelWithCircularReference; + prop?: ModelWithCircularReference; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'one of' relationship where the options are not $ref */ export type CompositionWithOneOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * Circle */ export type ModelCircle = { - kind: 'circle'; - radius?: number; + kind: 'circle'; + radius?: number; }; /** * Square */ export type ModelSquare = { - kind: 'square'; - sideLength?: number; + kind: 'square'; + sideLength?: number; }; /** @@ -430,26 +460,30 @@ export type CompositionWithOneOfDiscriminator = ModelCircle | ModelSquare; * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithAnyOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * This is a model with nested 'any of' property with a type null */ export type CompositionWithNestedAnyAndTypeNull = { - propA?: Array | Array; + propA?: Array | Array; }; export type Enum1 = 'Bird' | 'Dog'; @@ -460,264 +494,264 @@ export type ConstValue = 'ConstValue'; * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithNestedAnyOfAndNull = { - propA?: Array | null; + propA?: Array | null; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a model that contains a simple dictionary within composition */ export type CompositionWithOneOfAndSimpleDictionary = { - propA?: - | boolean - | { - [key: string]: number; - }; + propA?: + | boolean + | { + [key: string]: number; + }; }; /** * This is a model that contains a dictionary of simple arrays within composition */ export type CompositionWithOneOfAndSimpleArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model that contains a dictionary of complex arrays (composited) within composition */ export type CompositionWithOneOfAndComplexArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model with one property with a 'all of' relationship */ export type CompositionWithAllOfAndNullable = { - propA?: - | ({ - boolean?: boolean; - } & ModelWithEnum & - ModelWithArray & - ModelWithDictionary) - | null; + propA?: + | ({ + boolean?: boolean; + } & ModelWithEnum & + ModelWithArray & + ModelWithDictionary) + | null; }; /** * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a base model with two simple optional properties */ export type CompositionBaseModel = { - firstName?: string; - lastname?: string; + firstName?: string; + lastname?: string; }; /** * This is a model that extends the base model */ export type CompositionExtendedModel = CompositionBaseModel & { - firstName: string; - lastname: string; - age: number; + firstName: string; + lastname: string; + age: number; }; /** * This is a model with one nested property */ export type ModelWithProperties = { - required: string; - readonly requiredAndReadOnly: string; - requiredAndNullable: string | null; - string?: string; - number?: number; - boolean?: boolean; - reference?: ModelWithString; - 'property with space'?: string; - default?: string; - try?: string; - readonly '@namespace.string'?: string; - readonly '@namespace.integer'?: number; + required: string; + readonly requiredAndReadOnly: string; + requiredAndNullable: string | null; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; }; /** * This is a model with one nested property */ export type ModelWithNestedProperties = { - readonly first: { - readonly second: { - readonly third: string | null; - } | null; + readonly first: { + readonly second: { + readonly third: string | null; } | null; + } | null; }; /** * This is a model with duplicated properties */ export type ModelWithDuplicateProperties = { - prop?: ModelWithString; + prop?: ModelWithString; }; /** * This is a model with ordered properties */ export type ModelWithOrderedProperties = { - zebra?: string; - apple?: string; - hawaii?: string; + zebra?: string; + apple?: string; + hawaii?: string; }; /** * This is a model with duplicated imports */ export type ModelWithDuplicateImports = { - propA?: ModelWithString; - propB?: ModelWithString; - propC?: ModelWithString; + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtends = ModelWithString & { - propExtendsA?: string; - propExtendsB?: ModelWithString; + propExtendsA?: string; + propExtendsB?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtendsExtends = ModelWithString & - ModelThatExtends & { - propExtendsC?: string; - propExtendsD?: ModelWithString; - }; + ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; + }; /** * This is a model that contains a some patterns */ export type ModelWithPattern = { - key: string; - name: string; - readonly enabled?: boolean; - readonly modified?: string; - id?: string; - text?: string; - patternWithSingleQuotes?: string; - patternWithNewline?: string; - patternWithBacktick?: string; + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; }; export type File = { - readonly id?: string; - readonly updated_at?: string; - readonly created_at?: string; - mime: string; - readonly file?: string; + readonly id?: string; + readonly updated_at?: string; + readonly created_at?: string; + mime: string; + readonly file?: string; }; export type _default = { - name?: string; + name?: string; }; export type Pageable = { - page?: number; - size?: number; - sort?: Array; + page?: number; + size?: number; + sort?: Array; }; /** * This is a free-form object without additionalProperties. */ export type FreeFormObjectWithoutAdditionalProperties = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: true. */ export type FreeFormObjectWithAdditionalPropertiesEqTrue = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: {}. */ export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = { - [key: string]: unknown; + [key: string]: unknown; }; export type ModelWithConst = { - String?: 'String'; - number?: 0; - null?: null; - withType?: 'Some string'; + String?: 'String'; + number?: 0; + null?: null; + withType?: 'Some string'; }; /** * This is a model with one property and additionalProperties: true */ export type ModelWithAdditionalPropertiesEqTrue = { - /** - * This is a simple string property - */ - prop?: string; - [key: string]: unknown; + /** + * This is a simple string property + */ + prop?: string; + [key: string]: unknown; }; export type NestedAnyOfArraysNullable = { - nullableArray?: Array | null; + nullableArray?: Array | null; }; export type CompositionWithOneOfAndProperties = - | { - foo: SimpleParameter; - baz: number | null; - qux: number; - } - | { - bar: NonAsciiStringæøåÆØÅöôêÊ字符串; - baz: number | null; - qux: number; - }; + | { + foo: SimpleParameter; + baz: number | null; + qux: number; + } + | { + bar: NonAsciiStringæøåÆØÅöôêÊ字符串; + baz: number | null; + qux: number; + }; /** * An object that can be null */ export type NullableObject = { - foo?: string; + foo?: string; } | null; /** @@ -726,71 +760,81 @@ export type NullableObject = { export type CharactersInDescription = string; export type ModelWithNullableObject = { - data?: NullableObject; + data?: NullableObject; }; export type ModelWithOneOfEnum = - | { - foo: 'Bar'; - } - | { - foo: 'Baz'; - } - | { - foo: 'Qux'; - } - | { - content: string; - foo: 'Quux'; - } - | { - content: [string, string]; - foo: 'Corge'; - }; + | { + foo: 'Bar'; + } + | { + foo: 'Baz'; + } + | { + foo: 'Qux'; + } + | { + content: string; + foo: 'Quux'; + } + | { + content: [string, string]; + foo: 'Corge'; + }; export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; export type ModelWithNestedArrayEnumsData = { - foo?: Array; - bar?: Array; + foo?: Array; + bar?: Array; }; export type ModelWithNestedArrayEnums = { - array_strings?: Array; - data?: ModelWithNestedArrayEnumsData; + array_strings?: Array; + data?: ModelWithNestedArrayEnumsData; }; export type ModelWithNestedCompositionEnums = { - foo?: ModelWithNestedArrayEnumsDataFoo; + foo?: ModelWithNestedArrayEnumsDataFoo; }; export type ModelWithReadOnlyAndWriteOnly = { - foo: string; - readonly bar: string; - baz: string; + foo: string; + readonly bar: string; + baz: string; }; export type ModelWithConstantSizeArray = [number, number]; -export type ModelWithAnyOfConstantSizeArray = [number | string, number | string, number | string]; +export type ModelWithAnyOfConstantSizeArray = [ + number | string, + number | string, + number | string, +]; export type ModelWithAnyOfConstantSizeArrayNullable = [ - number | null | string, - number | null | string, - number | null | string, + number | null | string, + number | null | string, + number | null | string, ]; -export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [number | string, number | string]; +export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ + number | string, + number | string, +]; -export type ModelWithAnyOfConstantSizeArrayAndIntersect = [number & string, number & string]; +export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ + number & string, + number & string, +]; export type ModelWithNumericEnumUnion = { - /** - * Период - */ - value?: 1 | 3 | 6 | 12; + /** + * Период + */ + value?: 1 | 3 | 6 | 12; }; /** @@ -804,603 +848,609 @@ export type SimpleParameter = string; export type x_Foo_Bar = string; export type $OpenApiTs = { - '/api/v{api-version}/no-tag': { - post: { - req: { - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; - }; - res: { - 200: ModelWithReadOnlyAndWriteOnly; - }; - }; + '/api/v{api-version}/no-tag': { + post: { + req: { + requestBody: + | ModelWithReadOnlyAndWriteOnly + | ModelWithArrayReadOnlyAndWriteOnly; + }; + res: { + 200: ModelWithReadOnlyAndWriteOnly; + }; }; - '/api/v{api-version}/simple/$count': { - get: { - res: { - /** - * Success - */ - 200: Model_From_Zendesk; - }; - }; + }; + '/api/v{api-version}/simple/$count': { + get: { + res: { + /** + * Success + */ + 200: Model_From_Zendesk; + }; }; - '/api/v{api-version}/foo/{foo}/bar/{bar}': { - delete: { - req: { - /** - * bar in method - */ - bar: string; - /** - * foo in method - */ - foo: string; - }; - }; + }; + '/api/v{api-version}/foo/{foo}/bar/{bar}': { + delete: { + req: { + /** + * bar in method + */ + bar: string; + /** + * foo in method + */ + foo: string; + }; }; - '/api/v{api-version}/parameters/{parameterPath}': { - post: { - req: { - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath: string | null; - /** - * This is the parameter that goes into the query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameterPath}': { + post: { + req: { + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath: string | null; + /** + * This is the parameter that goes into the query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { - post: { - req: { - /** - * This is the parameter with a reserved keyword - */ - _default?: string; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the request form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the request header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath1?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath2?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath3?: string; - /** - * This is the parameter that goes into the request query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { + post: { + req: { + /** + * This is the parameter with a reserved keyword + */ + _default?: string; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the request form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the request header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath1?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath2?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath3?: string; + /** + * This is the parameter that goes into the request query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/': { - get: { - req: { - /** - * This is an optional parameter - */ - parameter?: string; - /** - * This is a required parameter - */ - requestBody: ModelWithOneOfEnum; - }; - }; - post: { - req: { - /** - * This is a required parameter - */ - parameter: Pageable; - /** - * This is an optional parameter - */ - requestBody?: ModelWithString; - }; - }; + }; + '/api/v{api-version}/parameters/': { + get: { + req: { + /** + * This is an optional parameter + */ + parameter?: string; + /** + * This is a required parameter + */ + requestBody: ModelWithOneOfEnum; + }; }; - '/api/v{api-version}/descriptions/': { - post: { - req: { - /** - * Testing backticks in string: `backticks` and ```multiple backticks``` should work - */ - parameterWithBackticks?: unknown; - /** - * Testing multiline comments in string: First line - * Second line - * - * Fourth line - */ - parameterWithBreaks?: unknown; - /** - * Testing expression placeholders in string: ${expression} should work - */ - parameterWithExpressionPlaceholders?: unknown; - /** - * Testing quotes in string: 'single quote''' and "double quotes""" should work - */ - parameterWithQuotes?: unknown; - /** - * Testing reserved characters in string: * inline * and ** inline ** should work - */ - parameterWithReservedCharacters?: unknown; - /** - * Testing slashes in string: \backwards\\\ and /forwards/// should work - */ - parameterWithSlashes?: unknown; - }; - }; + post: { + req: { + /** + * This is a required parameter + */ + parameter: Pageable; + /** + * This is an optional parameter + */ + requestBody?: ModelWithString; + }; }; - '/api/v{api-version}/parameters/deprecated': { - post: { - req: { - /** - * This parameter is deprecated - * @deprecated - */ - parameter: DeprecatedModel | null; - }; - }; + }; + '/api/v{api-version}/descriptions/': { + post: { + req: { + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: unknown; + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: unknown; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: unknown; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: unknown; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: unknown; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: unknown; + }; }; - '/api/v{api-version}/requestBody/': { - post: { - req: { - /** - * A reusable request body - */ - foo?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/parameters/deprecated': { + post: { + req: { + /** + * This parameter is deprecated + * @deprecated + */ + parameter: DeprecatedModel | null; + }; }; - '/api/v{api-version}/formData/': { - post: { - req: { - /** - * A reusable request body - */ - formData?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/requestBody/': { + post: { + req: { + /** + * A reusable request body + */ + foo?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/defaults': { - get: { - req: { - /** - * This is a simple boolean with default value - */ - parameterBoolean?: boolean | null; - /** - * This is a simple enum with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model with default value - */ - parameterModel?: ModelWithString | null; - /** - * This is a simple number with default value - */ - parameterNumber?: number | null; - /** - * This is a simple string with default value - */ - parameterString?: string | null; - }; - }; - post: { - req: { - /** - * This is a simple boolean that is optional with default value - */ - parameterBoolean?: boolean; - /** - * This is a simple enum that is optional with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model that is optional with default value - */ - parameterModel?: ModelWithString; - /** - * This is a simple number that is optional with default value - */ - parameterNumber?: number; - /** - * This is a simple string that is optional with default value - */ - parameterString?: string; - }; - }; - put: { - req: { - /** - * This is a optional string with default - */ - parameterOptionalStringWithDefault?: string; - /** - * This is a optional string with empty default - */ - parameterOptionalStringWithEmptyDefault?: string; - /** - * This is a optional string with no default - */ - parameterOptionalStringWithNoDefault?: string; - /** - * This is a string that can be null with default - */ - parameterStringNullableWithDefault?: string | null; - /** - * This is a string that can be null with no default - */ - parameterStringNullableWithNoDefault?: string | null; - /** - * This is a string with default - */ - parameterStringWithDefault: string; - /** - * This is a string with empty default - */ - parameterStringWithEmptyDefault: string; - /** - * This is a string with no default - */ - parameterStringWithNoDefault: string; - }; - }; + }; + '/api/v{api-version}/formData/': { + post: { + req: { + /** + * A reusable request body + */ + formData?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/no-content': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/defaults': { + get: { + req: { + /** + * This is a simple boolean with default value + */ + parameterBoolean?: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel?: ModelWithString | null; + /** + * This is a simple number with default value + */ + parameterNumber?: number | null; + /** + * This is a simple string with default value + */ + parameterString?: string | null; + }; }; - '/api/v{api-version}/multiple-tags/response-and-no-content': { - get: { - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Success - */ - 204: void; - }; - }; + post: { + req: { + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + }; }; - '/api/v{api-version}/response': { - get: { - res: { - 200: ModelWithString; - }; - }; - post: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - }; - }; - put: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - /** - * Message for 201 response - */ - 201: ModelThatExtends; - /** - * Message for 202 response - */ - 202: ModelThatExtendsExtends; - }; - }; + put: { + req: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + }; }; - '/api/v{api-version}/multiple-tags/a': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/no-content': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/multiple-tags/b': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/multiple-tags/response-and-no-content': { + get: { + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/collectionFormat': { - get: { - req: { - /** - * This is an array parameter that is sent as csv format (comma-separated values) - */ - parameterArrayCsv: Array | null; - /** - * This is an array parameter that is sent as multi format (multiple parameter instances) - */ - parameterArrayMulti: Array | null; - /** - * This is an array parameter that is sent as pipes format (pipe-separated values) - */ - parameterArrayPipes: Array | null; - /** - * This is an array parameter that is sent as ssv format (space-separated values) - */ - parameterArraySsv: Array | null; - /** - * This is an array parameter that is sent as tsv format (tab-separated values) - */ - parameterArrayTsv: Array | null; - }; - }; + }; + '/api/v{api-version}/response': { + get: { + res: { + 200: ModelWithString; + }; }; - '/api/v{api-version}/types': { - get: { - req: { - /** - * This is a number parameter - */ - id?: number; - /** - * This is an array parameter - */ - parameterArray: Array | null; - /** - * This is a boolean parameter - */ - parameterBoolean: boolean | null; - /** - * This is a dictionary parameter - */ - parameterDictionary: { - [key: string]: unknown; - } | null; - /** - * This is an enum parameter - */ - parameterEnum: 'Success' | 'Warning' | 'Error' | null; - /** - * This is a number parameter - */ - parameterNumber: number; - /** - * This is an object parameter - */ - parameterObject: { - [key: string]: unknown; - } | null; - /** - * This is a string parameter - */ - parameterString: string | null; - }; - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Response is a simple string - */ - 201: string; - /** - * Response is a simple boolean - */ - 202: boolean; - /** - * Response is a simple object - */ - 203: { - [key: string]: unknown; - }; - }; - }; + post: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/upload': { - post: { - req: { - /** - * Supply a file reference for upload - */ - file: Blob | File; - }; - res: { - 200: boolean; - }; - }; + put: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; + }; }; - '/api/v{api-version}/file/{id}': { - get: { - req: { - id: string; - }; - res: { - /** - * Success - */ - 200: Blob | File; - }; - }; + }; + '/api/v{api-version}/multiple-tags/a': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex': { - get: { - req: { - /** - * Parameter containing object - */ - parameterObject: { - first?: { - second?: { - third?: string; - }; - }; - }; - /** - * Parameter containing reference - */ - parameterReference: ModelWithString; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; - }; + }; + '/api/v{api-version}/multiple-tags/b': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex/{id}': { - put: { - req: { - id: number; - requestBody?: { - readonly key: string | null; - name: string | null; - enabled?: boolean; - readonly type: 'Monkey' | 'Horse' | 'Bird'; - listOfModels?: Array | null; - listOfStrings?: Array | null; - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; - readonly user?: { - readonly id?: number; - readonly name?: string | null; - }; - }; - }; - res: { - /** - * Success - */ - 200: ModelWithString; - }; - }; + }; + '/api/v{api-version}/collectionFormat': { + get: { + req: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCsv: Array | null; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array | null; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array | null; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySsv: Array | null; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTsv: Array | null; + }; }; - '/api/v{api-version}/multipart': { - post: { - req: { - formData?: { - content?: Blob | File; - data?: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/types': { + get: { + req: { + /** + * This is a number parameter + */ + id?: number; + /** + * This is an array parameter + */ + parameterArray: Array | null; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean | null; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: unknown; + } | null; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error' | null; + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is an object parameter + */ + parameterObject: { + [key: string]: unknown; + } | null; + /** + * This is a string parameter + */ + parameterString: string | null; + }; + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: { + [key: string]: unknown; }; - get: { - res: { - /** - * OK - */ - 200: { - file?: Blob | File; - metadata?: { - foo?: string; - bar?: string; - }; - }; + }; + }; + }; + '/api/v{api-version}/upload': { + post: { + req: { + /** + * Supply a file reference for upload + */ + file: Blob | File; + }; + res: { + 200: boolean; + }; + }; + }; + '/api/v{api-version}/file/{id}': { + get: { + req: { + id: string; + }; + res: { + /** + * Success + */ + 200: Blob | File; + }; + }; + }; + '/api/v{api-version}/complex': { + get: { + req: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; }; + }; }; + /** + * Parameter containing reference + */ + parameterReference: ModelWithString; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; - '/api/v{api-version}/header': { - post: { - res: { - /** - * Successful response - */ - 200: string; - }; + }; + '/api/v{api-version}/complex/{id}': { + put: { + req: { + id: number; + requestBody?: { + readonly key: string | null; + name: string | null; + enabled?: boolean; + readonly type: 'Monkey' | 'Horse' | 'Bird'; + listOfModels?: Array | null; + listOfStrings?: Array | null; + parameters: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; + readonly user?: { + readonly id?: number; + readonly name?: string | null; + }; }; + }; + res: { + /** + * Success + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/error': { - post: { - req: { - /** - * Status code to return - */ - status: number; - }; - res: { - /** - * Custom message: Successful response - */ - 200: unknown; - }; + }; + '/api/v{api-version}/multipart': { + post: { + req: { + formData?: { + content?: Blob | File; + data?: ModelWithString | null; }; + }; }; - '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { - post: { - req: { - /** - * Dummy input param - */ - nonAsciiParamæøåÆøÅöôêÊ: number; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; + get: { + res: { + /** + * OK + */ + 200: { + file?: Blob | File; + metadata?: { + foo?: string; + bar?: string; + }; }; + }; + }; + }; + '/api/v{api-version}/header': { + post: { + res: { + /** + * Successful response + */ + 200: string; + }; + }; + }; + '/api/v{api-version}/error': { + post: { + req: { + /** + * Status code to return + */ + status: number; + }; + res: { + /** + * Custom message: Successful response + */ + 200: unknown; + }; + }; + }; + '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { + post: { + req: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆøÅöôêÊ: number; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; + }; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/OpenAPI.ts.snap index 053dcf0bb..a3de5a06e 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/OpenAPI.ts.snap @@ -6,46 +6,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/request.ts.snap index 4ad088eb5..e30237e48 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_axios/core/request.ts.snap @@ -1,5 +1,10 @@ import axios from 'axios'; -import type { AxiosError, AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios'; +import type { + AxiosError, + AxiosRequestConfig, + AxiosResponse, + AxiosInstance, +} from 'axios'; import { ApiError } from './ApiError'; import type { ApiRequestOptions } from './ApiRequestOptions'; @@ -9,294 +14,305 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const isSuccess = (status: number): boolean => { - return status >= 200 && status < 300; + return status >= 200 && status < 300; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; export const getHeaders = async ( - config: OpenAPIConfig, - options: ApiRequestOptions + config: OpenAPIConfig, + options: ApiRequestOptions, ): Promise> => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; + } else if (options.formData !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; } + } - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } 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; + return headers; }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body) { - return options.body; - } - return undefined; + if (options.body) { + return options.body; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: unknown, - formData: FormData | undefined, - headers: Record, - onCancel: OnCancel, - axiosClient: AxiosInstance + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: unknown, + formData: FormData | undefined, + headers: Record, + onCancel: OnCancel, + axiosClient: AxiosInstance, ): Promise> => { - const controller = new AbortController(); - - let requestConfig: AxiosRequestConfig = { - data: body ?? formData, - headers, - method: options.method, - signal: controller.signal, - url, - withCredentials: config.WITH_CREDENTIALS, - }; - - onCancel(() => controller.abort()); - - for (const fn of config.interceptors.request._fns) { - requestConfig = await fn(requestConfig); - } - - try { - return await axiosClient.request(requestConfig); - } catch (error) { - const axiosError = error as AxiosError; - if (axiosError.response) { - return axiosError.response; - } - throw error; + const controller = new AbortController(); + + let requestConfig: AxiosRequestConfig = { + data: body ?? formData, + headers, + method: options.method, + signal: controller.signal, + url, + withCredentials: config.WITH_CREDENTIALS, + }; + + onCancel(() => controller.abort()); + + for (const fn of config.interceptors.request._fns) { + requestConfig = await fn(requestConfig); + } + + try { + return await axiosClient.request(requestConfig); + } catch (error) { + const axiosError = error as AxiosError; + if (axiosError.response) { + return axiosError.response; } + throw error; + } }; -export const getResponseHeader = (response: AxiosResponse, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers[responseHeader]; - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: AxiosResponse, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers[responseHeader]; + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = (response: AxiosResponse): unknown => { - if (response.status !== 204) { - return response.data; - } - return undefined; + if (response.status !== 204) { + return response.data; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -308,50 +324,53 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @throws ApiError */ export const request = ( - config: OpenAPIConfig, - options: ApiRequestOptions, - axiosClient: AxiosInstance = axios + config: OpenAPIConfig, + options: ApiRequestOptions, + axiosClient: AxiosInstance = axios, ): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest( - 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); - - const result: ApiResult = { - url, - ok: isSuccess(response.status), - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + 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, + ); + + const result: ApiResult = { + url, + ok: isSuccess(response.status), + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/ApiClient.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/ApiClient.ts.snap index ebd309d84..b80fb5707 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/ApiClient.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/ApiClient.ts.snap @@ -30,71 +30,74 @@ import { UploadService } from './services.gen'; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; export class ApiClient { - public readonly collectionFormat: CollectionFormatService; - public readonly complex: ComplexService; - public readonly default: DefaultService; - public readonly defaults: DefaultsService; - public readonly deprecated: DeprecatedService; - public readonly descriptions: DescriptionsService; - public readonly duplicate: DuplicateService; - public readonly error: ErrorService; - public readonly fileResponse: FileResponseService; - public readonly formData: FormDataService; - public readonly header: HeaderService; - public readonly multipart: MultipartService; - public readonly multipleTags1: MultipleTags1Service; - public readonly multipleTags2: MultipleTags2Service; - public readonly multipleTags3: MultipleTags3Service; - public readonly noContent: NoContentService; - public readonly nonAsciiÆøåÆøÅöôêÊ: NonAsciiÆøåÆøÅöôêÊService; - public readonly parameters: ParametersService; - public readonly requestBody: RequestBodyService; - public readonly response: ResponseService; - public readonly simple: SimpleService; - public readonly types: TypesService; - public readonly upload: UploadService; + public readonly collectionFormat: CollectionFormatService; + public readonly complex: ComplexService; + public readonly default: DefaultService; + public readonly defaults: DefaultsService; + public readonly deprecated: DeprecatedService; + public readonly descriptions: DescriptionsService; + public readonly duplicate: DuplicateService; + public readonly error: ErrorService; + public readonly fileResponse: FileResponseService; + public readonly formData: FormDataService; + public readonly header: HeaderService; + public readonly multipart: MultipartService; + public readonly multipleTags1: MultipleTags1Service; + public readonly multipleTags2: MultipleTags2Service; + public readonly multipleTags3: MultipleTags3Service; + public readonly noContent: NoContentService; + public readonly nonAsciiÆøåÆøÅöôêÊ: NonAsciiÆøåÆøÅöôêÊService; + public readonly parameters: ParametersService; + public readonly requestBody: RequestBodyService; + public readonly response: ResponseService; + public readonly simple: SimpleService; + public readonly types: TypesService; + public readonly upload: UploadService; - public readonly request: BaseHttpRequest; + public readonly request: BaseHttpRequest; - constructor(config?: Partial, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { - this.request = new HttpRequest({ - BASE: config?.BASE ?? 'http://localhost:3000/base', - VERSION: config?.VERSION ?? '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, - interceptors: { - request: new Interceptors(), - response: new Interceptors(), - }, - }); + constructor( + config?: Partial, + HttpRequest: HttpRequestConstructor = FetchHttpRequest, + ) { + this.request = new HttpRequest({ + BASE: config?.BASE ?? 'http://localhost:3000/base', + VERSION: config?.VERSION ?? '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, + interceptors: { + request: new Interceptors(), + response: new Interceptors(), + }, + }); - this.collectionFormat = new CollectionFormatService(this.request); - this.complex = new ComplexService(this.request); - this.default = new DefaultService(this.request); - this.defaults = new DefaultsService(this.request); - this.deprecated = new DeprecatedService(this.request); - this.descriptions = new DescriptionsService(this.request); - this.duplicate = new DuplicateService(this.request); - this.error = new ErrorService(this.request); - this.fileResponse = new FileResponseService(this.request); - this.formData = new FormDataService(this.request); - this.header = new HeaderService(this.request); - this.multipart = new MultipartService(this.request); - this.multipleTags1 = new MultipleTags1Service(this.request); - this.multipleTags2 = new MultipleTags2Service(this.request); - this.multipleTags3 = new MultipleTags3Service(this.request); - this.noContent = new NoContentService(this.request); - this.nonAsciiÆøåÆøÅöôêÊ = new NonAsciiÆøåÆøÅöôêÊService(this.request); - this.parameters = new ParametersService(this.request); - this.requestBody = new RequestBodyService(this.request); - this.response = new ResponseService(this.request); - this.simple = new SimpleService(this.request); - this.types = new TypesService(this.request); - this.upload = new UploadService(this.request); - } + this.collectionFormat = new CollectionFormatService(this.request); + this.complex = new ComplexService(this.request); + this.default = new DefaultService(this.request); + this.defaults = new DefaultsService(this.request); + this.deprecated = new DeprecatedService(this.request); + this.descriptions = new DescriptionsService(this.request); + this.duplicate = new DuplicateService(this.request); + this.error = new ErrorService(this.request); + this.fileResponse = new FileResponseService(this.request); + this.formData = new FormDataService(this.request); + this.header = new HeaderService(this.request); + this.multipart = new MultipartService(this.request); + this.multipleTags1 = new MultipleTags1Service(this.request); + this.multipleTags2 = new MultipleTags2Service(this.request); + this.multipleTags3 = new MultipleTags3Service(this.request); + this.noContent = new NoContentService(this.request); + this.nonAsciiÆøåÆøÅöôêÊ = new NonAsciiÆøåÆøÅöôêÊService(this.request); + this.parameters = new ParametersService(this.request); + this.requestBody = new RequestBodyService(this.request); + this.response = new ResponseService(this.request); + this.simple = new SimpleService(this.request); + this.types = new TypesService(this.request); + this.upload = new UploadService(this.request); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/BaseHttpRequest.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/BaseHttpRequest.ts.snap index 934de716a..b5ce58da6 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/BaseHttpRequest.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/BaseHttpRequest.ts.snap @@ -3,7 +3,7 @@ import type { CancelablePromise } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export abstract class BaseHttpRequest { - constructor(public readonly config: OpenAPIConfig) {} + constructor(public readonly config: OpenAPIConfig) {} - public abstract request(options: ApiRequestOptions): CancelablePromise; + public abstract request(options: ApiRequestOptions): CancelablePromise; } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/FetchHttpRequest.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/FetchHttpRequest.ts.snap index e58e58780..48651871b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/FetchHttpRequest.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/FetchHttpRequest.ts.snap @@ -5,17 +5,17 @@ import type { OpenAPIConfig } from './OpenAPI'; import { request as __request } from './request'; export class FetchHttpRequest extends BaseHttpRequest { - constructor(config: OpenAPIConfig) { - super(config); - } + constructor(config: OpenAPIConfig) { + super(config); + } - /** - * Request method - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ - public override request(options: ApiRequestOptions): CancelablePromise { - return __request(this.config, options); - } + /** + * Request method + * @param options The request options from the service + * @returns CancelablePromise + * @throws ApiError + */ + public override request(options: ApiRequestOptions): CancelablePromise { + return __request(this.config, options); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/OpenAPI.ts.snap index 64be05544..5c1459c6b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/OpenAPI.ts.snap @@ -5,46 +5,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/request.ts.snap index bee3d3694..eb8aae7f7 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/core/request.ts.snap @@ -6,305 +6,329 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + let request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } + for (const fn of config.interceptors.request._fns) { + request = await fn(request); + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = [ - 'application/octet-stream', - 'application/pdf', - 'application/zip', - 'audio/', - 'image/', - 'video/', - ]; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const binaryTypes = [ + 'application/octet-stream', + 'application/pdf', + 'application/zip', + 'audio/', + 'image/', + 'video/', + ]; + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return await response.json(); + } else if (binaryTypes.some((type) => contentType.includes(type))) { + return await response.blob(); + } else if (contentType.includes('multipart/form-data')) { + return await response.formData(); + } else if (contentType.includes('text/')) { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -314,38 +338,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/enums.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/enums.gen.ts.snap index a1c7b9290..e3117fd1b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/enums.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/enums.gen.ts.snap @@ -4,118 +4,118 @@ * This is a simple enum with strings */ export const EnumWithStringsEnum = { - SUCCESS: 'Success', - WARNING: 'Warning', - ERROR: 'Error', - _SINGLE_QUOTE_: "'Single Quote'", - _DOUBLE_QUOTES_: '"Double Quotes"', - NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串: 'Non-ascii: øæåôöØÆÅÔÖ字符串', + SUCCESS: 'Success', + WARNING: 'Warning', + ERROR: 'Error', + _SINGLE_QUOTE_: "'Single Quote'", + _DOUBLE_QUOTES_: '"Double Quotes"', + NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串: 'Non-ascii: øæåôöØÆÅÔÖ字符串', } as const; export const EnumWithReplacedCharactersEnum = { - _SINGLE_QUOTE_: "'Single Quote'", - _DOUBLE_QUOTES_: '"Double Quotes"', - ØÆÅÔÖ_ØÆÅÔÖ字符串: 'øæåôöØÆÅÔÖ字符串', - '_3.1': 3.1, - EMPTY_STRING: '', + _SINGLE_QUOTE_: "'Single Quote'", + _DOUBLE_QUOTES_: '"Double Quotes"', + ØÆÅÔÖ_ØÆÅÔÖ字符串: 'øæåôöØÆÅÔÖ字符串', + '_3.1': 3.1, + EMPTY_STRING: '', } as const; /** * This is a simple enum with numbers */ export const EnumWithNumbersEnum = { - _1: 1, - _2: 2, - _3: 3, - '_1.1': 1.1, - '_1.2': 1.2, - '_1.3': 1.3, - _100: 100, - _200: 200, - _300: 300, - '_-100': -100, - '_-200': -200, - '_-300': -300, - '_-1.1': -1.1, - '_-1.2': -1.2, - '_-1.3': -1.3, + _1: 1, + _2: 2, + _3: 3, + '_1.1': 1.1, + '_1.2': 1.2, + '_1.3': 1.3, + _100: 100, + _200: 200, + _300: 300, + '_-100': -100, + '_-200': -200, + '_-300': -300, + '_-1.1': -1.1, + '_-1.2': -1.2, + '_-1.3': -1.3, } as const; /** * This is a simple enum with numbers */ export const EnumWithExtensionsEnum = { - /** - * Used when the status of something is successful - */ - CUSTOM_SUCCESS: 200, - /** - * Used when the status of something has a warning - */ - CUSTOM_WARNING: 400, - /** - * Used when the status of something has an error - */ - CUSTOM_ERROR: 500, + /** + * Used when the status of something is successful + */ + CUSTOM_SUCCESS: 200, + /** + * Used when the status of something has a warning + */ + CUSTOM_WARNING: 400, + /** + * Used when the status of something has an error + */ + CUSTOM_ERROR: 500, } as const; export const EnumWithXEnumNamesEnum = { - zero: 0, - one: 1, - two: 2, + zero: 0, + one: 1, + two: 2, } as const; /** * This is a simple enum with strings */ export const FooBarEnumEnum = { - SUCCESS: 'Success', - WARNING: 'Warning', - ERROR: 'Error', - ØÆÅ字符串: 'ØÆÅ字符串', + SUCCESS: 'Success', + WARNING: 'Warning', + ERROR: 'Error', + ØÆÅ字符串: 'ØÆÅ字符串', } as const; /** * These are the HTTP error code enums */ export const StatusCodeEnum = { - _100: '100', - _200_FOO: '200 FOO', - _300_FOO_BAR: '300 FOO_BAR', - _400_FOO_BAR: '400 foo-bar', - _500_FOO_BAR: '500 foo.bar', - _600_FOO_BAR: '600 foo&bar', + _100: '100', + _200_FOO: '200 FOO', + _300_FOO_BAR: '300 FOO_BAR', + _400_FOO_BAR: '400 foo-bar', + _500_FOO_BAR: '500 foo.bar', + _600_FOO_BAR: '600 foo&bar', } as const; export const FooBarBazQuxEnum = { - _3_0: '3.0', + _3_0: '3.0', } as const; export const Enum1Enum = { - BIRD: 'Bird', - DOG: 'Dog', + BIRD: 'Bird', + DOG: 'Dog', } as const; export const FooEnum = { - BAR: 'Bar', + BAR: 'Bar', } as const; export const ModelWithNestedArrayEnumsDataFooEnum = { - FOO: 'foo', - BAR: 'bar', + FOO: 'foo', + BAR: 'bar', } as const; export const ModelWithNestedArrayEnumsDataBarEnum = { - BAZ: 'baz', - QUX: 'qux', + BAZ: 'baz', + QUX: 'qux', } as const; /** * Период */ export const ValueEnum = { - _1: 1, - _3: 3, - _6: 6, - _12: 12, + _1: 1, + _3: 3, + _6: 6, + _12: 12, } as const; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/services.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/services.gen.ts.snap index 1d7a41bef..b15aa053e 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/services.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/services.gen.ts.snap @@ -5,904 +5,951 @@ import type { BaseHttpRequest } from './core/BaseHttpRequest'; import type { $OpenApiTs } from './types.gen'; export class DefaultService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public serviceWithEmptyTag(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/no-tag', - }); - } - - /** - * @returns ModelWithReadOnlyAndWriteOnly - * @throws ApiError - */ - public postServiceWithEmptyTag( - data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200]> { - const { requestBody } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/no-tag', - body: requestBody, - mediaType: 'application/json', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public serviceWithEmptyTag(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/no-tag', + }); + } + + /** + * @returns ModelWithReadOnlyAndWriteOnly + * @throws ApiError + */ + public postServiceWithEmptyTag( + data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200] + > { + const { requestBody } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/no-tag', + body: requestBody, + mediaType: 'application/json', + }); + } } export class SimpleService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns Model_From_Zendesk Success - * @throws ApiError - */ - public apiVVersionOdataControllerCount(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] - > { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/simple/$count', - }); - } - - /** - * @throws ApiError - */ - public getCallWithoutParametersAndResponse(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public putCallWithoutParametersAndResponse(): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public postCallWithoutParametersAndResponse(): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public deleteCallWithoutParametersAndResponse(): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public optionsCallWithoutParametersAndResponse(): CancelablePromise { - return this.httpRequest.request({ - method: 'OPTIONS', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public headCallWithoutParametersAndResponse(): CancelablePromise { - return this.httpRequest.request({ - method: 'HEAD', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public patchCallWithoutParametersAndResponse(): CancelablePromise { - return this.httpRequest.request({ - method: 'PATCH', - url: '/api/v{api-version}/simple', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns Model_From_Zendesk Success + * @throws ApiError + */ + public apiVVersionOdataControllerCount(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/simple/$count', + }); + } + + /** + * @throws ApiError + */ + public getCallWithoutParametersAndResponse(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public putCallWithoutParametersAndResponse(): CancelablePromise { + return this.httpRequest.request({ + method: 'PUT', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public postCallWithoutParametersAndResponse(): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public deleteCallWithoutParametersAndResponse(): CancelablePromise { + return this.httpRequest.request({ + method: 'DELETE', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public optionsCallWithoutParametersAndResponse(): CancelablePromise { + return this.httpRequest.request({ + method: 'OPTIONS', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public headCallWithoutParametersAndResponse(): CancelablePromise { + return this.httpRequest.request({ + method: 'HEAD', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public patchCallWithoutParametersAndResponse(): CancelablePromise { + return this.httpRequest.request({ + method: 'PATCH', + url: '/api/v{api-version}/simple', + }); + } } export class ParametersService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public deleteFoo( - data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req'] - ): CancelablePromise { - const { foo, bar } = data; - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', - path: { - foo, - bar, - }, - }); - } - - /** - * @throws ApiError - */ - public callWithParameters( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'] - ): CancelablePromise { - const { - parameterHeader, - fooAllOfEnum, - parameterQuery, - parameterForm, - parameterCookie, - parameterPath, - requestBody, - fooRefEnum, - } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/parameters/{parameterPath}', - path: { - parameterPath, - }, - cookies: { - parameterCookie, - }, - headers: { - parameterHeader, - }, - query: { - foo_ref_enum: fooRefEnum, - foo_all_of_enum: fooAllOfEnum, - parameterQuery, - }, - formData: { - parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public callWithWeirdParameterNames( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'] - ): CancelablePromise { - const { - parameterHeader, - parameterQuery, - parameterForm, - parameterCookie, - requestBody, - parameterPath1, - parameterPath2, - parameterPath3, - _default, - } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', - path: { - 'parameter.path.1': parameterPath1, - 'parameter-path-2': parameterPath2, - 'PARAMETER-PATH-3': parameterPath3, - }, - cookies: { - 'PARAMETER-COOKIE': parameterCookie, - }, - headers: { - 'parameter.header': parameterHeader, - }, - query: { - default: _default, - 'parameter-query': parameterQuery, - }, - formData: { - parameter_form: parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public getCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'] - ): CancelablePromise { - const { requestBody, parameter } = data; - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public postCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'] - ): CancelablePromise { - const { parameter, requestBody } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public deleteFoo( + data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req'], + ): CancelablePromise { + const { foo, bar } = data; + return this.httpRequest.request({ + method: 'DELETE', + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', + path: { + foo, + bar, + }, + }); + } + + /** + * @throws ApiError + */ + public callWithParameters( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + fooAllOfEnum, + parameterQuery, + parameterForm, + parameterCookie, + parameterPath, + requestBody, + fooRefEnum, + } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/parameters/{parameterPath}', + path: { + parameterPath, + }, + cookies: { + parameterCookie, + }, + headers: { + parameterHeader, + }, + query: { + foo_ref_enum: fooRefEnum, + foo_all_of_enum: fooAllOfEnum, + parameterQuery, + }, + formData: { + parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public callWithWeirdParameterNames( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + parameterQuery, + parameterForm, + parameterCookie, + requestBody, + parameterPath1, + parameterPath2, + parameterPath3, + _default, + } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + path: { + 'parameter.path.1': parameterPath1, + 'parameter-path-2': parameterPath2, + 'PARAMETER-PATH-3': parameterPath3, + }, + cookies: { + 'PARAMETER-COOKIE': parameterCookie, + }, + headers: { + 'parameter.header': parameterHeader, + }, + query: { + default: _default, + 'parameter-query': parameterQuery, + }, + formData: { + parameter_form: parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public getCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'], + ): CancelablePromise { + const { requestBody, parameter } = data; + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public postCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'], + ): CancelablePromise { + const { parameter, requestBody } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } } export class DescriptionsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public callWithDescriptions( - data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {} - ): CancelablePromise { - const { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/descriptions/', - query: { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public callWithDescriptions( + data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/descriptions/', + query: { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + }, + }); + } } export class DeprecatedService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @deprecated - * @throws ApiError - */ - public deprecatedCall( - data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'] - ): CancelablePromise { - const { parameter } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/parameters/deprecated', - headers: { - parameter, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @deprecated + * @throws ApiError + */ + public deprecatedCall( + data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'], + ): CancelablePromise { + const { parameter } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/parameters/deprecated', + headers: { + parameter, + }, + }); + } } export class RequestBodyService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public postApiRequestBody( - data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {} - ): CancelablePromise { - const { parameter, foo } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/requestBody/', - query: { - parameter, - }, - body: foo, - mediaType: 'application/json', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public postApiRequestBody( + data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {}, + ): CancelablePromise { + const { parameter, foo } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/requestBody/', + query: { + parameter, + }, + body: foo, + mediaType: 'application/json', + }); + } } export class FormDataService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public postApiFormData( - data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {} - ): CancelablePromise { - const { parameter, formData } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/formData/', - query: { - parameter, - }, - formData, - mediaType: 'multipart/form-data', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public postApiFormData( + data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {}, + ): CancelablePromise { + const { parameter, formData } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/formData/', + query: { + parameter, + }, + formData, + mediaType: 'multipart/form-data', + }); + } } export class DefaultsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public callWithDefaultParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public callWithDefaultOptionalParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public callToTestOrderOfParams( - data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'] - ): CancelablePromise { - const { - parameterStringWithNoDefault, - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - } = data; - return this.httpRequest.request({ - method: 'PUT', - url: '/api/v{api-version}/defaults', - query: { - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringWithNoDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public callWithDefaultParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public callWithDefaultOptionalParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public callToTestOrderOfParams( + data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'], + ): CancelablePromise { + const { + parameterStringWithNoDefault, + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + } = data; + return this.httpRequest.request({ + method: 'PUT', + url: '/api/v{api-version}/defaults', + query: { + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringWithNoDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + }, + }); + } } export class DuplicateService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public duplicateName(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public duplicateName1(): CancelablePromise { - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public duplicateName2(): CancelablePromise { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public duplicateName3(): CancelablePromise { - return this.httpRequest.request({ - method: 'DELETE', - url: '/api/v{api-version}/duplicate', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public duplicateName(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public duplicateName1(): CancelablePromise { + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public duplicateName2(): CancelablePromise { + return this.httpRequest.request({ + method: 'PUT', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public duplicateName3(): CancelablePromise { + return this.httpRequest.request({ + method: 'DELETE', + url: '/api/v{api-version}/duplicate', + }); + } } export class NoContentService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns void Success - * @throws ApiError - */ - public callWithNoContentResponse(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] - > { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/no-content', - }); - } - - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns void Success + * @throws ApiError + */ + public callWithNoContentResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/no-content', + }); + } + + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } } export class ResponseService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } - - /** - * @returns ModelWithString - * @throws ApiError - */ - public callWithResponse(): CancelablePromise<$OpenApiTs['/api/v{api-version}/response']['get']['res'][200]> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/response', - }); - } - - /** - * @returns ModelWithString Message for default response - * @throws ApiError - */ - public callWithDuplicateResponses(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] - > { - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } - - /** - * @returns unknown Message for 200 response - * @returns ModelWithString Message for default response - * @returns ModelThatExtends Message for 201 response - * @returns ModelThatExtendsExtends Message for 202 response - * @throws ApiError - */ - public callWithResponses(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] - > { - return this.httpRequest.request({ - method: 'PUT', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } + + /** + * @returns ModelWithString + * @throws ApiError + */ + public callWithResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['get']['res'][200] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/response', + }); + } + + /** + * @returns ModelWithString Message for default response + * @throws ApiError + */ + public callWithDuplicateResponses(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] + > { + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } + + /** + * @returns unknown Message for 200 response + * @returns ModelWithString Message for default response + * @returns ModelThatExtends Message for 201 response + * @returns ModelThatExtendsExtends Message for 202 response + * @throws ApiError + */ + public callWithResponses(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] + > { + return this.httpRequest.request({ + method: 'PUT', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } } export class MultipleTags1Service { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns void Success - * @throws ApiError - */ - public dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns void Success + * @throws ApiError + */ + public dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags2Service { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns void Success - * @throws ApiError - */ - public dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns void Success + * @throws ApiError + */ + public dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags3Service { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns void Success - * @throws ApiError - */ - public dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns void Success + * @throws ApiError + */ + public dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class CollectionFormatService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public collectionFormat( - data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'] - ): CancelablePromise { - const { parameterArrayCsv, parameterArraySsv, parameterArrayTsv, parameterArrayPipes, parameterArrayMulti } = - data; - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/collectionFormat', - query: { - parameterArrayCSV: parameterArrayCsv, - parameterArraySSV: parameterArraySsv, - parameterArrayTSV: parameterArrayTsv, - parameterArrayPipes, - parameterArrayMulti, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public collectionFormat( + data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'], + ): CancelablePromise { + const { + parameterArrayCsv, + parameterArraySsv, + parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + } = data; + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/collectionFormat', + query: { + parameterArrayCSV: parameterArrayCsv, + parameterArraySSV: parameterArraySsv, + parameterArrayTSV: parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + }, + }); + } } export class TypesService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns number Response is a simple number - * @returns string Response is a simple string - * @returns boolean Response is a simple boolean - * @returns unknown Response is a simple object - * @throws ApiError - */ - public types( - data: $OpenApiTs['/api/v{api-version}/types']['get']['req'] - ): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] - > { - const { - parameterArray, - parameterDictionary, - parameterEnum, - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - id, - } = data; - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/types', - path: { - id, - }, - query: { - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - parameterArray, - parameterDictionary, - parameterEnum, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns number Response is a simple number + * @returns string Response is a simple string + * @returns boolean Response is a simple boolean + * @returns unknown Response is a simple object + * @throws ApiError + */ + public types( + data: $OpenApiTs['/api/v{api-version}/types']['get']['req'], + ): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] + > { + const { + parameterArray, + parameterDictionary, + parameterEnum, + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + id, + } = data; + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/types', + path: { + id, + }, + query: { + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + parameterArray, + parameterDictionary, + parameterEnum, + }, + }); + } } export class UploadService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns boolean - * @throws ApiError - */ - public uploadFile( - data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/upload']['post']['res'][200]> { - const { file } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/upload', - formData: { - file, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns boolean + * @throws ApiError + */ + public uploadFile( + data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/upload']['post']['res'][200] + > { + const { file } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/upload', + formData: { + file, + }, + }); + } } export class FileResponseService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns binary Success - * @throws ApiError - */ - public fileResponse( - data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200]> { - const { id } = data; - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/file/{id}', - path: { - id, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns binary Success + * @throws ApiError + */ + public fileResponse( + data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200] + > { + const { id } = data; + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/file/{id}', + path: { + id, + }, + }); + } } export class ComplexService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns ModelWithString Successful response - * @throws ApiError - */ - public complexTypes( - data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/complex']['get']['res'][200]> { - const { parameterObject, parameterReference } = data; - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/complex', - query: { - parameterObject, - parameterReference, - }, - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } - - /** - * @returns ModelWithString Success - * @throws ApiError - */ - public complexParams( - data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200]> { - const { id, requestBody } = data; - return this.httpRequest.request({ - method: 'PUT', - url: '/api/v{api-version}/complex/{id}', - path: { - id, - }, - body: requestBody, - mediaType: 'application/json-patch+json', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns ModelWithString Successful response + * @throws ApiError + */ + public complexTypes( + data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/complex']['get']['res'][200] + > { + const { parameterObject, parameterReference } = data; + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/complex', + query: { + parameterObject, + parameterReference, + }, + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } + + /** + * @returns ModelWithString Success + * @throws ApiError + */ + public complexParams( + data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200] + > { + const { id, requestBody } = data; + return this.httpRequest.request({ + method: 'PUT', + url: '/api/v{api-version}/complex/{id}', + path: { + id, + }, + body: requestBody, + mediaType: 'application/json-patch+json', + }); + } } export class MultipartService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @throws ApiError - */ - public multipartRequest( - data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {} - ): CancelablePromise { - const { formData } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/multipart', - formData, - mediaType: 'multipart/form-data', - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public multipartResponse(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200]> { - return this.httpRequest.request({ - method: 'GET', - url: '/api/v{api-version}/multipart', - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @throws ApiError + */ + public multipartRequest( + data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {}, + ): CancelablePromise { + const { formData } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/multipart', + formData, + mediaType: 'multipart/form-data', + }); + } + + /** + * @returns unknown OK + * @throws ApiError + */ + public multipartResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200] + > { + return this.httpRequest.request({ + method: 'GET', + url: '/api/v{api-version}/multipart', + }); + } } export class HeaderService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns string Successful response - * @throws ApiError - */ - public callWithResultFromHeader(): CancelablePromise<$OpenApiTs['/api/v{api-version}/header']['post']['res'][200]> { - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/header', - responseHeader: 'operation-location', - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns string Successful response + * @throws ApiError + */ + public callWithResultFromHeader(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] + > { + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/header', + responseHeader: 'operation-location', + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } } export class ErrorService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns unknown Custom message: Successful response - * @throws ApiError - */ - public testErrorCode( - data: $OpenApiTs['/api/v{api-version}/error']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/error']['post']['res'][200]> { - const { status } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/error', - query: { - status, - }, - errors: { - 500: 'Custom message: Internal Server Error', - 501: 'Custom message: Not Implemented', - 502: 'Custom message: Bad Gateway', - 503: 'Custom message: Service Unavailable', - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns unknown Custom message: Successful response + * @throws ApiError + */ + public testErrorCode( + data: $OpenApiTs['/api/v{api-version}/error']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/error']['post']['res'][200] + > { + const { status } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/error', + query: { + status, + }, + errors: { + 500: 'Custom message: Internal Server Error', + 501: 'Custom message: Not Implemented', + 502: 'Custom message: Bad Gateway', + 503: 'Custom message: Service Unavailable', + }, + }); + } } export class NonAsciiÆøåÆøÅöôêÊService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response - * @throws ApiError - */ - public nonAsciiæøåÆøÅöôêÊ字符串( - data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200]> { - const { nonAsciiParamæøåÆøÅöôêÊ } = data; - return this.httpRequest.request({ - method: 'POST', - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', - query: { - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response + * @throws ApiError + */ + public nonAsciiæøåÆøÅöôêÊ字符串( + data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200] + > { + const { nonAsciiParamæøåÆøÅöôêÊ } = data; + return this.httpRequest.request({ + method: 'POST', + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + query: { + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, + }, + }); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/types.gen.ts.snap index 86e27092f..52d2d173c 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_client/types.gen.ts.snap @@ -85,19 +85,39 @@ export type SimpleStringWithPattern = string | null; * This is a simple enum with strings */ export type EnumWithStrings = - | 'Success' - | 'Warning' - | 'Error' - | "'Single Quote'" - | '"Double Quotes"' - | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + | 'Success' + | 'Warning' + | 'Error' + | "'Single Quote'" + | '"Double Quotes"' + | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; -export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; +export type EnumWithReplacedCharacters = + | "'Single Quote'" + | '"Double Quotes"' + | 'øæåôöØÆÅÔÖ字符串' + | 3.1 + | ''; /** * This is a simple enum with numbers */ -export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; +export type EnumWithNumbers = + | 1 + | 2 + | 3 + | 1.1 + | 1.2 + | 1.3 + | 100 + | 200 + | 300 + | -100 + | -200 + | -300 + | -1.1 + | -1.2 + | -1.3; /** * Success=1,Warning=2,Error=3 @@ -140,113 +160,113 @@ export type ArrayWithArray = Array>; * This is a simple array with properties */ export type ArrayWithProperties = Array<{ - foo?: camelCaseCommentWithBreaks; - bar?: string; + foo?: camelCaseCommentWithBreaks; + bar?: string; }>; /** * This is a simple array with any of properties */ export type ArrayWithAnyOfProperties = Array< - | { - foo?: string; - } - | { - bar?: string; - } + | { + foo?: string; + } + | { + bar?: string; + } >; export type AnyOfAnyAndNull = { - data?: unknown | null; + data?: unknown | null; }; /** * This is a simple array with any of properties */ export type AnyOfArrays = { - results?: Array< - | { - foo?: string; - } - | { - bar?: string; - } - >; + results?: Array< + | { + foo?: string; + } + | { + bar?: string; + } + >; }; /** * This is a string dictionary */ export type DictionaryWithString = { - [key: string]: string; + [key: string]: string; }; export type DictionaryWithPropertiesAndAdditionalProperties = { - foo?: string; - [key: string]: string | undefined; + foo?: string; + [key: string]: string | undefined; }; /** * This is a string reference */ export type DictionaryWithReference = { - [key: string]: ModelWithString; + [key: string]: ModelWithString; }; /** * This is a complex dictionary */ export type DictionaryWithArray = { - [key: string]: Array; + [key: string]: Array; }; /** * This is a string dictionary */ export type DictionaryWithDictionary = { - [key: string]: { - [key: string]: string; - }; + [key: string]: { + [key: string]: string; + }; }; /** * This is a complex dictionary */ export type DictionaryWithProperties = { - [key: string]: { - foo?: string; - bar?: string; - }; + [key: string]: { + foo?: string; + bar?: string; + }; }; /** * This is a model with one number property */ export type ModelWithInteger = { - /** - * This is a simple number property - */ - prop?: number; + /** + * This is a simple number property + */ + prop?: number; }; /** * This is a model with one boolean property */ export type ModelWithBoolean = { - /** - * This is a simple boolean property - */ - prop?: boolean; + /** + * This is a simple boolean property + */ + prop?: boolean; }; /** * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; /** @@ -258,113 +278,119 @@ export type Model_From_Zendesk = string; * This is a model with one string property */ export type ModelWithNullableString = { - /** - * This is a simple string property - */ - nullableProp1?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp1: string | null; - /** - * This is a simple string property - */ - nullableProp2?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp2: string | null; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * This is a simple string property + */ + nullableProp1?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp1: string | null; + /** + * This is a simple string property + */ + nullableProp2?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp2: string | null; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one enum */ export type ModelWithEnum = { - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; - /** - * These are the HTTP error code enums - */ - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; - /** - * Simple boolean enum - */ - bool?: boolean; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: + | '100' + | '200 FOO' + | '300 FOO_BAR' + | '400 foo-bar' + | '500 foo.bar' + | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: boolean; }; /** * This is a model with one enum with escaped name */ export type ModelWithEnumWithHyphen = { - 'foo-bar-baz-qux'?: '3.0'; + 'foo-bar-baz-qux'?: '3.0'; }; /** * This is a model with one enum */ export type ModelWithEnumFromDescription = { - /** - * Success=1,Warning=2,Error=3 - */ - test?: number; + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; }; /** * This is a model with nested enums */ export type ModelWithNestedEnums = { - dictionaryWithEnum?: { - [key: string]: 'Success' | 'Warning' | 'Error'; - }; - dictionaryWithEnumFromDescription?: { - [key: string]: number; - }; - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; - arrayWithDescription?: Array; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one property containing a reference */ export type ModelWithReference = { - prop?: ModelWithProperties; + prop?: ModelWithProperties; }; /** * This is a model with one property containing an array */ export type ModelWithArrayReadOnlyAndWriteOnly = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing an array */ export type ModelWithArray = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing a dictionary */ export type ModelWithDictionary = { - prop?: { - [key: string]: string; - }; + prop?: { + [key: string]: string; + }; }; /** @@ -372,53 +398,57 @@ export type ModelWithDictionary = { * @deprecated */ export type DeprecatedModel = { - /** - * This is a deprecated property - * @deprecated - */ - prop?: string; + /** + * This is a deprecated property + * @deprecated + */ + prop?: string; }; /** * This is a model with one property containing a circular reference */ export type ModelWithCircularReference = { - prop?: ModelWithCircularReference; + prop?: ModelWithCircularReference; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'one of' relationship where the options are not $ref */ export type CompositionWithOneOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * Circle */ export type ModelCircle = { - kind: 'circle'; - radius?: number; + kind: 'circle'; + radius?: number; }; /** * Square */ export type ModelSquare = { - kind: 'square'; - sideLength?: number; + kind: 'square'; + sideLength?: number; }; /** @@ -430,26 +460,30 @@ export type CompositionWithOneOfDiscriminator = ModelCircle | ModelSquare; * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithAnyOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * This is a model with nested 'any of' property with a type null */ export type CompositionWithNestedAnyAndTypeNull = { - propA?: Array | Array; + propA?: Array | Array; }; export type Enum1 = 'Bird' | 'Dog'; @@ -460,264 +494,264 @@ export type ConstValue = 'ConstValue'; * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithNestedAnyOfAndNull = { - propA?: Array | null; + propA?: Array | null; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a model that contains a simple dictionary within composition */ export type CompositionWithOneOfAndSimpleDictionary = { - propA?: - | boolean - | { - [key: string]: number; - }; + propA?: + | boolean + | { + [key: string]: number; + }; }; /** * This is a model that contains a dictionary of simple arrays within composition */ export type CompositionWithOneOfAndSimpleArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model that contains a dictionary of complex arrays (composited) within composition */ export type CompositionWithOneOfAndComplexArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model with one property with a 'all of' relationship */ export type CompositionWithAllOfAndNullable = { - propA?: - | ({ - boolean?: boolean; - } & ModelWithEnum & - ModelWithArray & - ModelWithDictionary) - | null; + propA?: + | ({ + boolean?: boolean; + } & ModelWithEnum & + ModelWithArray & + ModelWithDictionary) + | null; }; /** * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a base model with two simple optional properties */ export type CompositionBaseModel = { - firstName?: string; - lastname?: string; + firstName?: string; + lastname?: string; }; /** * This is a model that extends the base model */ export type CompositionExtendedModel = CompositionBaseModel & { - firstName: string; - lastname: string; - age: number; + firstName: string; + lastname: string; + age: number; }; /** * This is a model with one nested property */ export type ModelWithProperties = { - required: string; - readonly requiredAndReadOnly: string; - requiredAndNullable: string | null; - string?: string; - number?: number; - boolean?: boolean; - reference?: ModelWithString; - 'property with space'?: string; - default?: string; - try?: string; - readonly '@namespace.string'?: string; - readonly '@namespace.integer'?: number; + required: string; + readonly requiredAndReadOnly: string; + requiredAndNullable: string | null; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; }; /** * This is a model with one nested property */ export type ModelWithNestedProperties = { - readonly first: { - readonly second: { - readonly third: string | null; - } | null; + readonly first: { + readonly second: { + readonly third: string | null; } | null; + } | null; }; /** * This is a model with duplicated properties */ export type ModelWithDuplicateProperties = { - prop?: ModelWithString; + prop?: ModelWithString; }; /** * This is a model with ordered properties */ export type ModelWithOrderedProperties = { - zebra?: string; - apple?: string; - hawaii?: string; + zebra?: string; + apple?: string; + hawaii?: string; }; /** * This is a model with duplicated imports */ export type ModelWithDuplicateImports = { - propA?: ModelWithString; - propB?: ModelWithString; - propC?: ModelWithString; + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtends = ModelWithString & { - propExtendsA?: string; - propExtendsB?: ModelWithString; + propExtendsA?: string; + propExtendsB?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtendsExtends = ModelWithString & - ModelThatExtends & { - propExtendsC?: string; - propExtendsD?: ModelWithString; - }; + ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; + }; /** * This is a model that contains a some patterns */ export type ModelWithPattern = { - key: string; - name: string; - readonly enabled?: boolean; - readonly modified?: Date; - id?: string; - text?: string; - patternWithSingleQuotes?: string; - patternWithNewline?: string; - patternWithBacktick?: string; + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: Date; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; }; export type File = { - readonly id?: string; - readonly updated_at?: Date; - readonly created_at?: Date; - mime: string; - readonly file?: string; + readonly id?: string; + readonly updated_at?: Date; + readonly created_at?: Date; + mime: string; + readonly file?: string; }; export type _default = { - name?: string; + name?: string; }; export type Pageable = { - page?: number; - size?: number; - sort?: Array; + page?: number; + size?: number; + sort?: Array; }; /** * This is a free-form object without additionalProperties. */ export type FreeFormObjectWithoutAdditionalProperties = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: true. */ export type FreeFormObjectWithAdditionalPropertiesEqTrue = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: {}. */ export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = { - [key: string]: unknown; + [key: string]: unknown; }; export type ModelWithConst = { - String?: 'String'; - number?: 0; - null?: null; - withType?: 'Some string'; + String?: 'String'; + number?: 0; + null?: null; + withType?: 'Some string'; }; /** * This is a model with one property and additionalProperties: true */ export type ModelWithAdditionalPropertiesEqTrue = { - /** - * This is a simple string property - */ - prop?: string; - [key: string]: unknown; + /** + * This is a simple string property + */ + prop?: string; + [key: string]: unknown; }; export type NestedAnyOfArraysNullable = { - nullableArray?: Array | null; + nullableArray?: Array | null; }; export type CompositionWithOneOfAndProperties = - | { - foo: SimpleParameter; - baz: number | null; - qux: number; - } - | { - bar: NonAsciiStringæøåÆØÅöôêÊ字符串; - baz: number | null; - qux: number; - }; + | { + foo: SimpleParameter; + baz: number | null; + qux: number; + } + | { + bar: NonAsciiStringæøåÆØÅöôêÊ字符串; + baz: number | null; + qux: number; + }; /** * An object that can be null */ export type NullableObject = { - foo?: string; + foo?: string; } | null; /** @@ -726,71 +760,81 @@ export type NullableObject = { export type CharactersInDescription = string; export type ModelWithNullableObject = { - data?: NullableObject; + data?: NullableObject; }; export type ModelWithOneOfEnum = - | { - foo: 'Bar'; - } - | { - foo: 'Baz'; - } - | { - foo: 'Qux'; - } - | { - content: Date; - foo: 'Quux'; - } - | { - content: [Date | string, Date | string]; - foo: 'Corge'; - }; + | { + foo: 'Bar'; + } + | { + foo: 'Baz'; + } + | { + foo: 'Qux'; + } + | { + content: Date; + foo: 'Quux'; + } + | { + content: [Date | string, Date | string]; + foo: 'Corge'; + }; export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; export type ModelWithNestedArrayEnumsData = { - foo?: Array; - bar?: Array; + foo?: Array; + bar?: Array; }; export type ModelWithNestedArrayEnums = { - array_strings?: Array; - data?: ModelWithNestedArrayEnumsData; + array_strings?: Array; + data?: ModelWithNestedArrayEnumsData; }; export type ModelWithNestedCompositionEnums = { - foo?: ModelWithNestedArrayEnumsDataFoo; + foo?: ModelWithNestedArrayEnumsDataFoo; }; export type ModelWithReadOnlyAndWriteOnly = { - foo: string; - readonly bar: string; - baz: string; + foo: string; + readonly bar: string; + baz: string; }; export type ModelWithConstantSizeArray = [number, number]; -export type ModelWithAnyOfConstantSizeArray = [number | string, number | string, number | string]; +export type ModelWithAnyOfConstantSizeArray = [ + number | string, + number | string, + number | string, +]; export type ModelWithAnyOfConstantSizeArrayNullable = [ - number | null | string, - number | null | string, - number | null | string, + number | null | string, + number | null | string, + number | null | string, ]; -export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [number | string, number | string]; +export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ + number | string, + number | string, +]; -export type ModelWithAnyOfConstantSizeArrayAndIntersect = [number & string, number & string]; +export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ + number & string, + number & string, +]; export type ModelWithNumericEnumUnion = { - /** - * Период - */ - value?: 1 | 3 | 6 | 12; + /** + * Период + */ + value?: 1 | 3 | 6 | 12; }; /** @@ -804,603 +848,609 @@ export type SimpleParameter = string; export type x_Foo_Bar = string; export type $OpenApiTs = { - '/api/v{api-version}/no-tag': { - post: { - req: { - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; - }; - res: { - 200: ModelWithReadOnlyAndWriteOnly; - }; - }; + '/api/v{api-version}/no-tag': { + post: { + req: { + requestBody: + | ModelWithReadOnlyAndWriteOnly + | ModelWithArrayReadOnlyAndWriteOnly; + }; + res: { + 200: ModelWithReadOnlyAndWriteOnly; + }; }; - '/api/v{api-version}/simple/$count': { - get: { - res: { - /** - * Success - */ - 200: Model_From_Zendesk; - }; - }; + }; + '/api/v{api-version}/simple/$count': { + get: { + res: { + /** + * Success + */ + 200: Model_From_Zendesk; + }; }; - '/api/v{api-version}/foo/{foo}/bar/{bar}': { - delete: { - req: { - /** - * bar in method - */ - bar: string; - /** - * foo in method - */ - foo: string; - }; - }; + }; + '/api/v{api-version}/foo/{foo}/bar/{bar}': { + delete: { + req: { + /** + * bar in method + */ + bar: string; + /** + * foo in method + */ + foo: string; + }; }; - '/api/v{api-version}/parameters/{parameterPath}': { - post: { - req: { - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath: string | null; - /** - * This is the parameter that goes into the query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameterPath}': { + post: { + req: { + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath: string | null; + /** + * This is the parameter that goes into the query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { - post: { - req: { - /** - * This is the parameter with a reserved keyword - */ - _default?: string; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the request form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the request header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath1?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath2?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath3?: string; - /** - * This is the parameter that goes into the request query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { + post: { + req: { + /** + * This is the parameter with a reserved keyword + */ + _default?: string; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the request form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the request header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath1?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath2?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath3?: string; + /** + * This is the parameter that goes into the request query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/': { - get: { - req: { - /** - * This is an optional parameter - */ - parameter?: string; - /** - * This is a required parameter - */ - requestBody: ModelWithOneOfEnum; - }; - }; - post: { - req: { - /** - * This is a required parameter - */ - parameter: Pageable; - /** - * This is an optional parameter - */ - requestBody?: ModelWithString; - }; - }; + }; + '/api/v{api-version}/parameters/': { + get: { + req: { + /** + * This is an optional parameter + */ + parameter?: string; + /** + * This is a required parameter + */ + requestBody: ModelWithOneOfEnum; + }; }; - '/api/v{api-version}/descriptions/': { - post: { - req: { - /** - * Testing backticks in string: `backticks` and ```multiple backticks``` should work - */ - parameterWithBackticks?: unknown; - /** - * Testing multiline comments in string: First line - * Second line - * - * Fourth line - */ - parameterWithBreaks?: unknown; - /** - * Testing expression placeholders in string: ${expression} should work - */ - parameterWithExpressionPlaceholders?: unknown; - /** - * Testing quotes in string: 'single quote''' and "double quotes""" should work - */ - parameterWithQuotes?: unknown; - /** - * Testing reserved characters in string: * inline * and ** inline ** should work - */ - parameterWithReservedCharacters?: unknown; - /** - * Testing slashes in string: \backwards\\\ and /forwards/// should work - */ - parameterWithSlashes?: unknown; - }; - }; + post: { + req: { + /** + * This is a required parameter + */ + parameter: Pageable; + /** + * This is an optional parameter + */ + requestBody?: ModelWithString; + }; }; - '/api/v{api-version}/parameters/deprecated': { - post: { - req: { - /** - * This parameter is deprecated - * @deprecated - */ - parameter: DeprecatedModel | null; - }; - }; + }; + '/api/v{api-version}/descriptions/': { + post: { + req: { + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: unknown; + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: unknown; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: unknown; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: unknown; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: unknown; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: unknown; + }; }; - '/api/v{api-version}/requestBody/': { - post: { - req: { - /** - * A reusable request body - */ - foo?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/parameters/deprecated': { + post: { + req: { + /** + * This parameter is deprecated + * @deprecated + */ + parameter: DeprecatedModel | null; + }; }; - '/api/v{api-version}/formData/': { - post: { - req: { - /** - * A reusable request body - */ - formData?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/requestBody/': { + post: { + req: { + /** + * A reusable request body + */ + foo?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/defaults': { - get: { - req: { - /** - * This is a simple boolean with default value - */ - parameterBoolean?: boolean | null; - /** - * This is a simple enum with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model with default value - */ - parameterModel?: ModelWithString | null; - /** - * This is a simple number with default value - */ - parameterNumber?: number | null; - /** - * This is a simple string with default value - */ - parameterString?: string | null; - }; - }; - post: { - req: { - /** - * This is a simple boolean that is optional with default value - */ - parameterBoolean?: boolean; - /** - * This is a simple enum that is optional with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model that is optional with default value - */ - parameterModel?: ModelWithString; - /** - * This is a simple number that is optional with default value - */ - parameterNumber?: number; - /** - * This is a simple string that is optional with default value - */ - parameterString?: string; - }; - }; - put: { - req: { - /** - * This is a optional string with default - */ - parameterOptionalStringWithDefault?: string; - /** - * This is a optional string with empty default - */ - parameterOptionalStringWithEmptyDefault?: string; - /** - * This is a optional string with no default - */ - parameterOptionalStringWithNoDefault?: string; - /** - * This is a string that can be null with default - */ - parameterStringNullableWithDefault?: string | null; - /** - * This is a string that can be null with no default - */ - parameterStringNullableWithNoDefault?: string | null; - /** - * This is a string with default - */ - parameterStringWithDefault: string; - /** - * This is a string with empty default - */ - parameterStringWithEmptyDefault: string; - /** - * This is a string with no default - */ - parameterStringWithNoDefault: string; - }; - }; + }; + '/api/v{api-version}/formData/': { + post: { + req: { + /** + * A reusable request body + */ + formData?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/no-content': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/defaults': { + get: { + req: { + /** + * This is a simple boolean with default value + */ + parameterBoolean?: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel?: ModelWithString | null; + /** + * This is a simple number with default value + */ + parameterNumber?: number | null; + /** + * This is a simple string with default value + */ + parameterString?: string | null; + }; }; - '/api/v{api-version}/multiple-tags/response-and-no-content': { - get: { - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Success - */ - 204: void; - }; - }; + post: { + req: { + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + }; }; - '/api/v{api-version}/response': { - get: { - res: { - 200: ModelWithString; - }; - }; - post: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - }; - }; - put: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - /** - * Message for 201 response - */ - 201: ModelThatExtends; - /** - * Message for 202 response - */ - 202: ModelThatExtendsExtends; - }; - }; + put: { + req: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + }; }; - '/api/v{api-version}/multiple-tags/a': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/no-content': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/multiple-tags/b': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/multiple-tags/response-and-no-content': { + get: { + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/collectionFormat': { - get: { - req: { - /** - * This is an array parameter that is sent as csv format (comma-separated values) - */ - parameterArrayCsv: Array | null; - /** - * This is an array parameter that is sent as multi format (multiple parameter instances) - */ - parameterArrayMulti: Array | null; - /** - * This is an array parameter that is sent as pipes format (pipe-separated values) - */ - parameterArrayPipes: Array | null; - /** - * This is an array parameter that is sent as ssv format (space-separated values) - */ - parameterArraySsv: Array | null; - /** - * This is an array parameter that is sent as tsv format (tab-separated values) - */ - parameterArrayTsv: Array | null; - }; - }; + }; + '/api/v{api-version}/response': { + get: { + res: { + 200: ModelWithString; + }; }; - '/api/v{api-version}/types': { - get: { - req: { - /** - * This is a number parameter - */ - id?: number; - /** - * This is an array parameter - */ - parameterArray: Array | null; - /** - * This is a boolean parameter - */ - parameterBoolean: boolean | null; - /** - * This is a dictionary parameter - */ - parameterDictionary: { - [key: string]: unknown; - } | null; - /** - * This is an enum parameter - */ - parameterEnum: 'Success' | 'Warning' | 'Error' | null; - /** - * This is a number parameter - */ - parameterNumber: number; - /** - * This is an object parameter - */ - parameterObject: { - [key: string]: unknown; - } | null; - /** - * This is a string parameter - */ - parameterString: string | null; - }; - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Response is a simple string - */ - 201: string; - /** - * Response is a simple boolean - */ - 202: boolean; - /** - * Response is a simple object - */ - 203: { - [key: string]: unknown; - }; - }; - }; + post: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/upload': { - post: { - req: { - /** - * Supply a file reference for upload - */ - file: Blob | File; - }; - res: { - 200: boolean; - }; - }; + put: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; + }; }; - '/api/v{api-version}/file/{id}': { - get: { - req: { - id: string; - }; - res: { - /** - * Success - */ - 200: Blob | File; - }; - }; + }; + '/api/v{api-version}/multiple-tags/a': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex': { - get: { - req: { - /** - * Parameter containing object - */ - parameterObject: { - first?: { - second?: { - third?: string; - }; - }; - }; - /** - * Parameter containing reference - */ - parameterReference: ModelWithString; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; - }; + }; + '/api/v{api-version}/multiple-tags/b': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex/{id}': { - put: { - req: { - id: number; - requestBody?: { - readonly key: string | null; - name: string | null; - enabled?: boolean; - readonly type: 'Monkey' | 'Horse' | 'Bird'; - listOfModels?: Array | null; - listOfStrings?: Array | null; - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; - readonly user?: { - readonly id?: number; - readonly name?: string | null; - }; - }; - }; - res: { - /** - * Success - */ - 200: ModelWithString; - }; - }; + }; + '/api/v{api-version}/collectionFormat': { + get: { + req: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCsv: Array | null; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array | null; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array | null; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySsv: Array | null; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTsv: Array | null; + }; }; - '/api/v{api-version}/multipart': { - post: { - req: { - formData?: { - content?: Blob | File; - data?: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/types': { + get: { + req: { + /** + * This is a number parameter + */ + id?: number; + /** + * This is an array parameter + */ + parameterArray: Array | null; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean | null; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: unknown; + } | null; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error' | null; + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is an object parameter + */ + parameterObject: { + [key: string]: unknown; + } | null; + /** + * This is a string parameter + */ + parameterString: string | null; + }; + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: { + [key: string]: unknown; }; - get: { - res: { - /** - * OK - */ - 200: { - file?: Blob | File; - metadata?: { - foo?: string; - bar?: string; - }; - }; + }; + }; + }; + '/api/v{api-version}/upload': { + post: { + req: { + /** + * Supply a file reference for upload + */ + file: Blob | File; + }; + res: { + 200: boolean; + }; + }; + }; + '/api/v{api-version}/file/{id}': { + get: { + req: { + id: string; + }; + res: { + /** + * Success + */ + 200: Blob | File; + }; + }; + }; + '/api/v{api-version}/complex': { + get: { + req: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; }; + }; }; + /** + * Parameter containing reference + */ + parameterReference: ModelWithString; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; - '/api/v{api-version}/header': { - post: { - res: { - /** - * Successful response - */ - 200: string; - }; + }; + '/api/v{api-version}/complex/{id}': { + put: { + req: { + id: number; + requestBody?: { + readonly key: string | null; + name: string | null; + enabled?: boolean; + readonly type: 'Monkey' | 'Horse' | 'Bird'; + listOfModels?: Array | null; + listOfStrings?: Array | null; + parameters: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; + readonly user?: { + readonly id?: number; + readonly name?: string | null; + }; }; + }; + res: { + /** + * Success + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/error': { - post: { - req: { - /** - * Status code to return - */ - status: number; - }; - res: { - /** - * Custom message: Successful response - */ - 200: unknown; - }; + }; + '/api/v{api-version}/multipart': { + post: { + req: { + formData?: { + content?: Blob | File; + data?: ModelWithString | null; }; + }; }; - '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { - post: { - req: { - /** - * Dummy input param - */ - nonAsciiParamæøåÆøÅöôêÊ: number; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; + get: { + res: { + /** + * OK + */ + 200: { + file?: Blob | File; + metadata?: { + foo?: string; + bar?: string; + }; }; + }; + }; + }; + '/api/v{api-version}/header': { + post: { + res: { + /** + * Successful response + */ + 200: string; + }; + }; + }; + '/api/v{api-version}/error': { + post: { + req: { + /** + * Status code to return + */ + status: number; + }; + res: { + /** + * Custom message: Successful response + */ + 200: unknown; + }; + }; + }; + '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { + post: { + req: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆøÅöôêÊ: number; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; + }; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_date/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_date/types.gen.ts.snap index 07d87cfb3..76a30ee48 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_date/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_date/types.gen.ts.snap @@ -4,13 +4,13 @@ * This is a model that contains a some patterns */ export type ModelWithPattern = { - key: string; - name: string; - readonly enabled?: boolean; - readonly modified?: Date; - id?: string; - text?: string; - patternWithSingleQuotes?: string; - patternWithNewline?: string; - patternWithBacktick?: string; + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: Date; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/OpenAPI.ts.snap index 64be05544..5c1459c6b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/OpenAPI.ts.snap @@ -5,46 +5,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/request.ts.snap index bee3d3694..eb8aae7f7 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/core/request.ts.snap @@ -6,305 +6,329 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + let request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } + for (const fn of config.interceptors.request._fns) { + request = await fn(request); + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = [ - 'application/octet-stream', - 'application/pdf', - 'application/zip', - 'audio/', - 'image/', - 'video/', - ]; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const binaryTypes = [ + 'application/octet-stream', + 'application/pdf', + 'application/zip', + 'audio/', + 'image/', + 'video/', + ]; + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return await response.json(); + } else if (binaryTypes.some((type) => contentType.includes(type))) { + return await response.blob(); + } else if (contentType.includes('multipart/form-data')) { + return await response.formData(); + } else if (contentType.includes('text/')) { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -314,38 +338,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/enums.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/enums.gen.ts.snap index 12ff9012a..25d54e4cd 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/enums.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/enums.gen.ts.snap @@ -4,118 +4,118 @@ * This is a simple enum with strings */ export enum EnumWithStringsEnum { - SUCCESS = 'Success', - WARNING = 'Warning', - ERROR = 'Error', - _SINGLE_QUOTE_ = "'Single Quote'", - _DOUBLE_QUOTES_ = '"Double Quotes"', - NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串 = 'Non-ascii: øæåôöØÆÅÔÖ字符串', + SUCCESS = 'Success', + WARNING = 'Warning', + ERROR = 'Error', + _SINGLE_QUOTE_ = "'Single Quote'", + _DOUBLE_QUOTES_ = '"Double Quotes"', + NON_ASCII__ØÆÅÔÖ_ØÆÅÔÖ字符串 = 'Non-ascii: øæåôöØÆÅÔÖ字符串', } export enum EnumWithReplacedCharactersEnum { - _SINGLE_QUOTE_ = "'Single Quote'", - _DOUBLE_QUOTES_ = '"Double Quotes"', - ØÆÅÔÖ_ØÆÅÔÖ字符串 = 'øæåôöØÆÅÔÖ字符串', - '_3.1' = 3.1, - EMPTY_STRING = '', + _SINGLE_QUOTE_ = "'Single Quote'", + _DOUBLE_QUOTES_ = '"Double Quotes"', + ØÆÅÔÖ_ØÆÅÔÖ字符串 = 'øæåôöØÆÅÔÖ字符串', + '_3.1' = 3.1, + EMPTY_STRING = '', } /** * This is a simple enum with numbers */ export enum EnumWithNumbersEnum { - '_1' = 1, - '_2' = 2, - '_3' = 3, - '_1.1' = 1.1, - '_1.2' = 1.2, - '_1.3' = 1.3, - '_100' = 100, - '_200' = 200, - '_300' = 300, - '_-100' = -100, - '_-200' = -200, - '_-300' = -300, - '_-1.1' = -1.1, - '_-1.2' = -1.2, - '_-1.3' = -1.3, + '_1' = 1, + '_2' = 2, + '_3' = 3, + '_1.1' = 1.1, + '_1.2' = 1.2, + '_1.3' = 1.3, + '_100' = 100, + '_200' = 200, + '_300' = 300, + '_-100' = -100, + '_-200' = -200, + '_-300' = -300, + '_-1.1' = -1.1, + '_-1.2' = -1.2, + '_-1.3' = -1.3, } /** * This is a simple enum with numbers */ export enum EnumWithExtensionsEnum { - /** - * Used when the status of something is successful - */ - CUSTOM_SUCCESS = 200, - /** - * Used when the status of something has a warning - */ - CUSTOM_WARNING = 400, - /** - * Used when the status of something has an error - */ - CUSTOM_ERROR = 500, + /** + * Used when the status of something is successful + */ + CUSTOM_SUCCESS = 200, + /** + * Used when the status of something has a warning + */ + CUSTOM_WARNING = 400, + /** + * Used when the status of something has an error + */ + CUSTOM_ERROR = 500, } export enum EnumWithXEnumNamesEnum { - zero = 0, - one = 1, - two = 2, + zero = 0, + one = 1, + two = 2, } /** * This is a simple enum with strings */ export enum FooBarEnumEnum { - SUCCESS = 'Success', - WARNING = 'Warning', - ERROR = 'Error', - ØÆÅ字符串 = 'ØÆÅ字符串', + SUCCESS = 'Success', + WARNING = 'Warning', + ERROR = 'Error', + ØÆÅ字符串 = 'ØÆÅ字符串', } /** * These are the HTTP error code enums */ export enum StatusCodeEnum { - _100 = '100', - _200_FOO = '200 FOO', - _300_FOO_BAR = '300 FOO_BAR', - _400_FOO_BAR = '400 foo-bar', - _500_FOO_BAR = '500 foo.bar', - _600_FOO_BAR = '600 foo&bar', + _100 = '100', + _200_FOO = '200 FOO', + _300_FOO_BAR = '300 FOO_BAR', + _400_FOO_BAR = '400 foo-bar', + _500_FOO_BAR = '500 foo.bar', + _600_FOO_BAR = '600 foo&bar', } export enum FooBarBazQuxEnum { - _3_0 = '3.0', + _3_0 = '3.0', } export enum Enum1Enum { - BIRD = 'Bird', - DOG = 'Dog', + BIRD = 'Bird', + DOG = 'Dog', } export enum FooEnum { - BAR = 'Bar', + BAR = 'Bar', } export enum ModelWithNestedArrayEnumsDataFooEnum { - FOO = 'foo', - BAR = 'bar', + FOO = 'foo', + BAR = 'bar', } export enum ModelWithNestedArrayEnumsDataBarEnum { - BAZ = 'baz', - QUX = 'qux', + BAZ = 'baz', + QUX = 'qux', } /** * Период */ export enum ValueEnum { - '_1' = 1, - '_3' = 3, - '_6' = 6, - '_12' = 12, + '_1' = 1, + '_3' = 3, + '_6' = 6, + '_12' = 12, } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/services.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/services.gen.ts.snap index 1b354cf5f..582366ab6 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/services.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/services.gen.ts.snap @@ -6,862 +6,905 @@ import { request as __request } from './core/request'; import type { $OpenApiTs } from './types.gen'; export class DefaultService { - /** - * @throws ApiError - */ - public static serviceWithEmptyTag(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/no-tag', - }); - } - - /** - * @returns ModelWithReadOnlyAndWriteOnly - * @throws ApiError - */ - public static postServiceWithEmptyTag( - data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200]> { - const { requestBody } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/no-tag', - body: requestBody, - mediaType: 'application/json', - }); - } + /** + * @throws ApiError + */ + public static serviceWithEmptyTag(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/no-tag', + }); + } + + /** + * @returns ModelWithReadOnlyAndWriteOnly + * @throws ApiError + */ + public static postServiceWithEmptyTag( + data: $OpenApiTs['/api/v{api-version}/no-tag']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/no-tag']['post']['res'][200] + > { + const { requestBody } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/no-tag', + body: requestBody, + mediaType: 'application/json', + }); + } } export class SimpleService { - /** - * @returns Model_From_Zendesk Success - * @throws ApiError - */ - public static apiVVersionOdataControllerCount(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/simple/$count', - }); - } - - /** - * @throws ApiError - */ - public static getCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static putCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static postCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static deleteCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static optionsCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'OPTIONS', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static headCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'HEAD', - url: '/api/v{api-version}/simple', - }); - } - - /** - * @throws ApiError - */ - public static patchCallWithoutParametersAndResponse(): CancelablePromise { - return __request(OpenAPI, { - method: 'PATCH', - url: '/api/v{api-version}/simple', - }); - } + /** + * @returns Model_From_Zendesk Success + * @throws ApiError + */ + public static apiVVersionOdataControllerCount(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/simple/$count']['get']['res'][200] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/simple/$count', + }); + } + + /** + * @throws ApiError + */ + public static getCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static putCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static postCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static deleteCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static optionsCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'OPTIONS', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static headCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'HEAD', + url: '/api/v{api-version}/simple', + }); + } + + /** + * @throws ApiError + */ + public static patchCallWithoutParametersAndResponse(): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/api/v{api-version}/simple', + }); + } } export class ParametersService { - /** - * @throws ApiError - */ - public static deleteFoo( - data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req'] - ): CancelablePromise { - const { foo, bar } = data; - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/foo/{foo}/bar/{bar}', - path: { - foo, - bar, - }, - }); - } - - /** - * @throws ApiError - */ - public static callWithParameters( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'] - ): CancelablePromise { - const { - parameterHeader, - fooAllOfEnum, - parameterQuery, - parameterForm, - parameterCookie, - parameterPath, - requestBody, - fooRefEnum, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameterPath}', - path: { - parameterPath, - }, - cookies: { - parameterCookie, - }, - headers: { - parameterHeader, - }, - query: { - foo_ref_enum: fooRefEnum, - foo_all_of_enum: fooAllOfEnum, - parameterQuery, - }, - formData: { - parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public static callWithWeirdParameterNames( - data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'] - ): CancelablePromise { - const { - parameterHeader, - parameterQuery, - parameterForm, - parameterCookie, - requestBody, - parameterPath1, - parameterPath2, - parameterPath3, - _default, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', - path: { - 'parameter.path.1': parameterPath1, - 'parameter-path-2': parameterPath2, - 'PARAMETER-PATH-3': parameterPath3, - }, - cookies: { - 'PARAMETER-COOKIE': parameterCookie, - }, - headers: { - 'parameter.header': parameterHeader, - }, - query: { - default: _default, - 'parameter-query': parameterQuery, - }, - formData: { - parameter_form: parameterForm, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public static getCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'] - ): CancelablePromise { - const { requestBody, parameter } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } - - /** - * @throws ApiError - */ - public static postCallWithOptionalParam( - data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'] - ): CancelablePromise { - const { parameter, requestBody } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/', - query: { - parameter, - }, - body: requestBody, - mediaType: 'application/json', - }); - } + /** + * @throws ApiError + */ + public static deleteFoo( + data: $OpenApiTs['/api/v{api-version}/foo/{foo}/bar/{bar}']['delete']['req'], + ): CancelablePromise { + const { foo, bar } = data; + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/foo/{foo}/bar/{bar}', + path: { + foo, + bar, + }, + }); + } + + /** + * @throws ApiError + */ + public static callWithParameters( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameterPath}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + fooAllOfEnum, + parameterQuery, + parameterForm, + parameterCookie, + parameterPath, + requestBody, + fooRefEnum, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameterPath}', + path: { + parameterPath, + }, + cookies: { + parameterCookie, + }, + headers: { + parameterHeader, + }, + query: { + foo_ref_enum: fooRefEnum, + foo_all_of_enum: fooAllOfEnum, + parameterQuery, + }, + formData: { + parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public static callWithWeirdParameterNames( + data: $OpenApiTs['/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}']['post']['req'], + ): CancelablePromise { + const { + parameterHeader, + parameterQuery, + parameterForm, + parameterCookie, + requestBody, + parameterPath1, + parameterPath2, + parameterPath3, + _default, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + path: { + 'parameter.path.1': parameterPath1, + 'parameter-path-2': parameterPath2, + 'PARAMETER-PATH-3': parameterPath3, + }, + cookies: { + 'PARAMETER-COOKIE': parameterCookie, + }, + headers: { + 'parameter.header': parameterHeader, + }, + query: { + default: _default, + 'parameter-query': parameterQuery, + }, + formData: { + parameter_form: parameterForm, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public static getCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['get']['req'], + ): CancelablePromise { + const { requestBody, parameter } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } + + /** + * @throws ApiError + */ + public static postCallWithOptionalParam( + data: $OpenApiTs['/api/v{api-version}/parameters/']['post']['req'], + ): CancelablePromise { + const { parameter, requestBody } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/', + query: { + parameter, + }, + body: requestBody, + mediaType: 'application/json', + }); + } } export class DescriptionsService { - /** - * @throws ApiError - */ - public static callWithDescriptions( - data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {} - ): CancelablePromise { - const { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/descriptions/', - query: { - parameterWithBreaks, - parameterWithBackticks, - parameterWithSlashes, - parameterWithExpressionPlaceholders, - parameterWithQuotes, - parameterWithReservedCharacters, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDescriptions( + data: $OpenApiTs['/api/v{api-version}/descriptions/']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/descriptions/', + query: { + parameterWithBreaks, + parameterWithBackticks, + parameterWithSlashes, + parameterWithExpressionPlaceholders, + parameterWithQuotes, + parameterWithReservedCharacters, + }, + }); + } } export class DeprecatedService { - /** - * @deprecated - * @throws ApiError - */ - public static deprecatedCall( - data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'] - ): CancelablePromise { - const { parameter } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/parameters/deprecated', - headers: { - parameter, - }, - }); - } + /** + * @deprecated + * @throws ApiError + */ + public static deprecatedCall( + data: $OpenApiTs['/api/v{api-version}/parameters/deprecated']['post']['req'], + ): CancelablePromise { + const { parameter } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/parameters/deprecated', + headers: { + parameter, + }, + }); + } } export class RequestBodyService { - /** - * @throws ApiError - */ - public static postApiRequestBody( - data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {} - ): CancelablePromise { - const { parameter, foo } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/requestBody/', - query: { - parameter, - }, - body: foo, - mediaType: 'application/json', - }); - } + /** + * @throws ApiError + */ + public static postApiRequestBody( + data: $OpenApiTs['/api/v{api-version}/requestBody/']['post']['req'] = {}, + ): CancelablePromise { + const { parameter, foo } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/requestBody/', + query: { + parameter, + }, + body: foo, + mediaType: 'application/json', + }); + } } export class FormDataService { - /** - * @throws ApiError - */ - public static postApiFormData( - data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {} - ): CancelablePromise { - const { parameter, formData } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/formData/', - query: { - parameter, - }, - formData, - mediaType: 'multipart/form-data', - }); - } + /** + * @throws ApiError + */ + public static postApiFormData( + data: $OpenApiTs['/api/v{api-version}/formData/']['post']['req'] = {}, + ): CancelablePromise { + const { parameter, formData } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/formData/', + query: { + parameter, + }, + formData, + mediaType: 'multipart/form-data', + }); + } } export class DefaultsService { - /** - * @throws ApiError - */ - public static callWithDefaultParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public static callWithDefaultOptionalParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } - - /** - * @throws ApiError - */ - public static callToTestOrderOfParams( - data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'] - ): CancelablePromise { - const { - parameterStringWithNoDefault, - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - } = data; - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/defaults', - query: { - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringWithNoDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDefaultParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public static callWithDefaultOptionalParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } + + /** + * @throws ApiError + */ + public static callToTestOrderOfParams( + data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'], + ): CancelablePromise { + const { + parameterStringWithNoDefault, + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + } = data; + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/defaults', + query: { + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringWithNoDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + }, + }); + } } export class DuplicateService { - /** - * @throws ApiError - */ - public static duplicateName(): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName1(): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName2(): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/duplicate', - }); - } - - /** - * @throws ApiError - */ - public static duplicateName3(): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/api/v{api-version}/duplicate', - }); - } + /** + * @throws ApiError + */ + public static duplicateName(): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName1(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName2(): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/duplicate', + }); + } + + /** + * @throws ApiError + */ + public static duplicateName3(): CancelablePromise { + return __request(OpenAPI, { + method: 'DELETE', + url: '/api/v{api-version}/duplicate', + }); + } } export class NoContentService { - /** - * @returns void Success - * @throws ApiError - */ - public static callWithNoContentResponse(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/no-content', - }); - } - - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public static callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static callWithNoContentResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/no-content', + }); + } + + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public static callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } } export class ResponseService { - /** - * @returns number Response is a simple number - * @returns void Success - * @throws ApiError - */ - public static callWithResponseAndNoContentResponse(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/response-and-no-content', - }); - } - - /** - * @returns ModelWithString - * @throws ApiError - */ - public static callWithResponse(): CancelablePromise<$OpenApiTs['/api/v{api-version}/response']['get']['res'][200]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/response', - }); - } - - /** - * @returns ModelWithString Message for default response - * @throws ApiError - */ - public static callWithDuplicateResponses(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] - > { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } - - /** - * @returns unknown Message for 200 response - * @returns ModelWithString Message for default response - * @returns ModelThatExtends Message for 201 response - * @returns ModelThatExtendsExtends Message for 202 response - * @throws ApiError - */ - public static callWithResponses(): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] - | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] - > { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/response', - errors: { - 500: 'Message for 500 error', - 501: 'Message for 501 error', - 502: 'Message for 502 error', - }, - }); - } + /** + * @returns number Response is a simple number + * @returns void Success + * @throws ApiError + */ + public static callWithResponseAndNoContentResponse(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/multiple-tags/response-and-no-content']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + }); + } + + /** + * @returns ModelWithString + * @throws ApiError + */ + public static callWithResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['get']['res'][200] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/response', + }); + } + + /** + * @returns ModelWithString Message for default response + * @throws ApiError + */ + public static callWithDuplicateResponses(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/response']['post']['res'][200] + > { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } + + /** + * @returns unknown Message for 200 response + * @returns ModelWithString Message for default response + * @returns ModelThatExtends Message for 201 response + * @returns ModelThatExtendsExtends Message for 202 response + * @throws ApiError + */ + public static callWithResponses(): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][200] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][201] + | $OpenApiTs['/api/v{api-version}/response']['put']['res'][202] + > { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/response', + errors: { + 500: 'Message for 500 error', + 501: 'Message for 501 error', + 502: 'Message for 502 error', + }, + }); + } } export class MultipleTags1Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags2Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyA(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/a', - }); - } - - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyA(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/a']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/a', + }); + } + + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class MultipleTags3Service { - /** - * @returns void Success - * @throws ApiError - */ - public static dummyB(): CancelablePromise<$OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204]> { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multiple-tags/b', - }); - } + /** + * @returns void Success + * @throws ApiError + */ + public static dummyB(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multiple-tags/b']['get']['res'][204] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multiple-tags/b', + }); + } } export class CollectionFormatService { - /** - * @throws ApiError - */ - public static collectionFormat( - data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'] - ): CancelablePromise { - const { parameterArrayCsv, parameterArraySsv, parameterArrayTsv, parameterArrayPipes, parameterArrayMulti } = - data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/collectionFormat', - query: { - parameterArrayCSV: parameterArrayCsv, - parameterArraySSV: parameterArraySsv, - parameterArrayTSV: parameterArrayTsv, - parameterArrayPipes, - parameterArrayMulti, - }, - }); - } + /** + * @throws ApiError + */ + public static collectionFormat( + data: $OpenApiTs['/api/v{api-version}/collectionFormat']['get']['req'], + ): CancelablePromise { + const { + parameterArrayCsv, + parameterArraySsv, + parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/collectionFormat', + query: { + parameterArrayCSV: parameterArrayCsv, + parameterArraySSV: parameterArraySsv, + parameterArrayTSV: parameterArrayTsv, + parameterArrayPipes, + parameterArrayMulti, + }, + }); + } } export class TypesService { - /** - * @returns number Response is a simple number - * @returns string Response is a simple string - * @returns boolean Response is a simple boolean - * @returns unknown Response is a simple object - * @throws ApiError - */ - public static types( - data: $OpenApiTs['/api/v{api-version}/types']['get']['req'] - ): CancelablePromise< - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] - | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] - > { - const { - parameterArray, - parameterDictionary, - parameterEnum, - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - id, - } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/types', - path: { - id, - }, - query: { - parameterNumber, - parameterString, - parameterBoolean, - parameterObject, - parameterArray, - parameterDictionary, - parameterEnum, - }, - }); - } + /** + * @returns number Response is a simple number + * @returns string Response is a simple string + * @returns boolean Response is a simple boolean + * @returns unknown Response is a simple object + * @throws ApiError + */ + public static types( + data: $OpenApiTs['/api/v{api-version}/types']['get']['req'], + ): CancelablePromise< + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][200] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][201] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][202] + | $OpenApiTs['/api/v{api-version}/types']['get']['res'][203] + > { + const { + parameterArray, + parameterDictionary, + parameterEnum, + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + id, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/types', + path: { + id, + }, + query: { + parameterNumber, + parameterString, + parameterBoolean, + parameterObject, + parameterArray, + parameterDictionary, + parameterEnum, + }, + }); + } } export class UploadService { - /** - * @returns boolean - * @throws ApiError - */ - public static uploadFile( - data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/upload']['post']['res'][200]> { - const { file } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/upload', - formData: { - file, - }, - }); - } + /** + * @returns boolean + * @throws ApiError + */ + public static uploadFile( + data: $OpenApiTs['/api/v{api-version}/upload']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/upload']['post']['res'][200] + > { + const { file } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/upload', + formData: { + file, + }, + }); + } } export class FileResponseService { - /** - * @returns binary Success - * @throws ApiError - */ - public static fileResponse( - data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200]> { - const { id } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/file/{id}', - path: { - id, - }, - }); - } + /** + * @returns binary Success + * @throws ApiError + */ + public static fileResponse( + data: $OpenApiTs['/api/v{api-version}/file/{id}']['get']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/file/{id}']['get']['res'][200] + > { + const { id } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/file/{id}', + path: { + id, + }, + }); + } } export class ComplexService { - /** - * @returns ModelWithString Successful response - * @throws ApiError - */ - public static complexTypes( - data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/complex']['get']['res'][200]> { - const { parameterObject, parameterReference } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/complex', - query: { - parameterObject, - parameterReference, - }, - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } - - /** - * @returns ModelWithString Success - * @throws ApiError - */ - public static complexParams( - data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200]> { - const { id, requestBody } = data; - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/complex/{id}', - path: { - id, - }, - body: requestBody, - mediaType: 'application/json-patch+json', - }); - } + /** + * @returns ModelWithString Successful response + * @throws ApiError + */ + public static complexTypes( + data: $OpenApiTs['/api/v{api-version}/complex']['get']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/complex']['get']['res'][200] + > { + const { parameterObject, parameterReference } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/complex', + query: { + parameterObject, + parameterReference, + }, + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } + + /** + * @returns ModelWithString Success + * @throws ApiError + */ + public static complexParams( + data: $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/complex/{id}']['put']['res'][200] + > { + const { id, requestBody } = data; + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/complex/{id}', + path: { + id, + }, + body: requestBody, + mediaType: 'application/json-patch+json', + }); + } } export class MultipartService { - /** - * @throws ApiError - */ - public static multipartRequest( - data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {} - ): CancelablePromise { - const { formData } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/multipart', - formData, - mediaType: 'multipart/form-data', - }); - } - - /** - * @returns unknown OK - * @throws ApiError - */ - public static multipartResponse(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200] - > { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/multipart', - }); - } + /** + * @throws ApiError + */ + public static multipartRequest( + data: $OpenApiTs['/api/v{api-version}/multipart']['post']['req'] = {}, + ): CancelablePromise { + const { formData } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/multipart', + formData, + mediaType: 'multipart/form-data', + }); + } + + /** + * @returns unknown OK + * @throws ApiError + */ + public static multipartResponse(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/multipart']['get']['res'][200] + > { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/multipart', + }); + } } export class HeaderService { - /** - * @returns string Successful response - * @throws ApiError - */ - public static callWithResultFromHeader(): CancelablePromise< - $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] - > { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/header', - responseHeader: 'operation-location', - errors: { - 400: '400 server error', - 500: '500 server error', - }, - }); - } + /** + * @returns string Successful response + * @throws ApiError + */ + public static callWithResultFromHeader(): CancelablePromise< + $OpenApiTs['/api/v{api-version}/header']['post']['res'][200] + > { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/header', + responseHeader: 'operation-location', + errors: { + 400: '400 server error', + 500: '500 server error', + }, + }); + } } export class ErrorService { - /** - * @returns unknown Custom message: Successful response - * @throws ApiError - */ - public static testErrorCode( - data: $OpenApiTs['/api/v{api-version}/error']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/error']['post']['res'][200]> { - const { status } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/error', - query: { - status, - }, - errors: { - 500: 'Custom message: Internal Server Error', - 501: 'Custom message: Not Implemented', - 502: 'Custom message: Bad Gateway', - 503: 'Custom message: Service Unavailable', - }, - }); - } + /** + * @returns unknown Custom message: Successful response + * @throws ApiError + */ + public static testErrorCode( + data: $OpenApiTs['/api/v{api-version}/error']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/error']['post']['res'][200] + > { + const { status } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/error', + query: { + status, + }, + errors: { + 500: 'Custom message: Internal Server Error', + 501: 'Custom message: Not Implemented', + 502: 'Custom message: Bad Gateway', + 503: 'Custom message: Service Unavailable', + }, + }); + } } export class NonAsciiÆøåÆøÅöôêÊService { - /** - * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response - * @throws ApiError - */ - public static nonAsciiæøåÆøÅöôêÊ字符串( - data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'] - ): CancelablePromise<$OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200]> { - const { nonAsciiParamæøåÆøÅöôêÊ } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', - query: { - nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, - }, - }); - } + /** + * @returns NonAsciiStringæøåÆØÅöôêÊ字符串 Successful response + * @throws ApiError + */ + public static nonAsciiæøåÆøÅöôêÊ字符串( + data: $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['req'], + ): CancelablePromise< + $OpenApiTs['/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串']['post']['res'][200] + > { + const { nonAsciiParamæøåÆøÅöôêÊ } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + query: { + nonAsciiParamæøåÆØÅöôêÊ: nonAsciiParamæøåÆøÅöôêÊ, + }, + }); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/types.gen.ts.snap index 8878b1994..ee3cf2769 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_enums_typescript/types.gen.ts.snap @@ -85,19 +85,39 @@ export type SimpleStringWithPattern = string | null; * This is a simple enum with strings */ export type EnumWithStrings = - | 'Success' - | 'Warning' - | 'Error' - | "'Single Quote'" - | '"Double Quotes"' - | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + | 'Success' + | 'Warning' + | 'Error' + | "'Single Quote'" + | '"Double Quotes"' + | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; -export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; +export type EnumWithReplacedCharacters = + | "'Single Quote'" + | '"Double Quotes"' + | 'øæåôöØÆÅÔÖ字符串' + | 3.1 + | ''; /** * This is a simple enum with numbers */ -export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; +export type EnumWithNumbers = + | 1 + | 2 + | 3 + | 1.1 + | 1.2 + | 1.3 + | 100 + | 200 + | 300 + | -100 + | -200 + | -300 + | -1.1 + | -1.2 + | -1.3; /** * Success=1,Warning=2,Error=3 @@ -140,113 +160,113 @@ export type ArrayWithArray = Array>; * This is a simple array with properties */ export type ArrayWithProperties = Array<{ - foo?: camelCaseCommentWithBreaks; - bar?: string; + foo?: camelCaseCommentWithBreaks; + bar?: string; }>; /** * This is a simple array with any of properties */ export type ArrayWithAnyOfProperties = Array< - | { - foo?: string; - } - | { - bar?: string; - } + | { + foo?: string; + } + | { + bar?: string; + } >; export type AnyOfAnyAndNull = { - data?: unknown | null; + data?: unknown | null; }; /** * This is a simple array with any of properties */ export type AnyOfArrays = { - results?: Array< - | { - foo?: string; - } - | { - bar?: string; - } - >; + results?: Array< + | { + foo?: string; + } + | { + bar?: string; + } + >; }; /** * This is a string dictionary */ export type DictionaryWithString = { - [key: string]: string; + [key: string]: string; }; export type DictionaryWithPropertiesAndAdditionalProperties = { - foo?: string; - [key: string]: string | undefined; + foo?: string; + [key: string]: string | undefined; }; /** * This is a string reference */ export type DictionaryWithReference = { - [key: string]: ModelWithString; + [key: string]: ModelWithString; }; /** * This is a complex dictionary */ export type DictionaryWithArray = { - [key: string]: Array; + [key: string]: Array; }; /** * This is a string dictionary */ export type DictionaryWithDictionary = { - [key: string]: { - [key: string]: string; - }; + [key: string]: { + [key: string]: string; + }; }; /** * This is a complex dictionary */ export type DictionaryWithProperties = { - [key: string]: { - foo?: string; - bar?: string; - }; + [key: string]: { + foo?: string; + bar?: string; + }; }; /** * This is a model with one number property */ export type ModelWithInteger = { - /** - * This is a simple number property - */ - prop?: number; + /** + * This is a simple number property + */ + prop?: number; }; /** * This is a model with one boolean property */ export type ModelWithBoolean = { - /** - * This is a simple boolean property - */ - prop?: boolean; + /** + * This is a simple boolean property + */ + prop?: boolean; }; /** * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; /** @@ -258,113 +278,119 @@ export type Model_From_Zendesk = string; * This is a model with one string property */ export type ModelWithNullableString = { - /** - * This is a simple string property - */ - nullableProp1?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp1: string | null; - /** - * This is a simple string property - */ - nullableProp2?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp2: string | null; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * This is a simple string property + */ + nullableProp1?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp1: string | null; + /** + * This is a simple string property + */ + nullableProp2?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp2: string | null; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one enum */ export type ModelWithEnum = { - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; - /** - * These are the HTTP error code enums - */ - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; - /** - * Simple boolean enum - */ - bool?: boolean; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: + | '100' + | '200 FOO' + | '300 FOO_BAR' + | '400 foo-bar' + | '500 foo.bar' + | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: boolean; }; /** * This is a model with one enum with escaped name */ export type ModelWithEnumWithHyphen = { - 'foo-bar-baz-qux'?: '3.0'; + 'foo-bar-baz-qux'?: '3.0'; }; /** * This is a model with one enum */ export type ModelWithEnumFromDescription = { - /** - * Success=1,Warning=2,Error=3 - */ - test?: number; + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; }; /** * This is a model with nested enums */ export type ModelWithNestedEnums = { - dictionaryWithEnum?: { - [key: string]: 'Success' | 'Warning' | 'Error'; - }; - dictionaryWithEnumFromDescription?: { - [key: string]: number; - }; - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; - arrayWithDescription?: Array; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one property containing a reference */ export type ModelWithReference = { - prop?: ModelWithProperties; + prop?: ModelWithProperties; }; /** * This is a model with one property containing an array */ export type ModelWithArrayReadOnlyAndWriteOnly = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing an array */ export type ModelWithArray = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing a dictionary */ export type ModelWithDictionary = { - prop?: { - [key: string]: string; - }; + prop?: { + [key: string]: string; + }; }; /** @@ -372,53 +398,57 @@ export type ModelWithDictionary = { * @deprecated */ export type DeprecatedModel = { - /** - * This is a deprecated property - * @deprecated - */ - prop?: string; + /** + * This is a deprecated property + * @deprecated + */ + prop?: string; }; /** * This is a model with one property containing a circular reference */ export type ModelWithCircularReference = { - prop?: ModelWithCircularReference; + prop?: ModelWithCircularReference; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'one of' relationship where the options are not $ref */ export type CompositionWithOneOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * Circle */ export type ModelCircle = { - kind: 'circle'; - radius?: number; + kind: 'circle'; + radius?: number; }; /** * Square */ export type ModelSquare = { - kind: 'square'; - sideLength?: number; + kind: 'square'; + sideLength?: number; }; /** @@ -430,26 +460,30 @@ export type CompositionWithOneOfDiscriminator = ModelCircle | ModelSquare; * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithAnyOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * This is a model with nested 'any of' property with a type null */ export type CompositionWithNestedAnyAndTypeNull = { - propA?: Array | Array; + propA?: Array | Array; }; export type Enum1 = 'Bird' | 'Dog'; @@ -460,264 +494,264 @@ export type ConstValue = 'ConstValue'; * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithNestedAnyOfAndNull = { - propA?: Array | null; + propA?: Array | null; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a model that contains a simple dictionary within composition */ export type CompositionWithOneOfAndSimpleDictionary = { - propA?: - | boolean - | { - [key: string]: number; - }; + propA?: + | boolean + | { + [key: string]: number; + }; }; /** * This is a model that contains a dictionary of simple arrays within composition */ export type CompositionWithOneOfAndSimpleArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model that contains a dictionary of complex arrays (composited) within composition */ export type CompositionWithOneOfAndComplexArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model with one property with a 'all of' relationship */ export type CompositionWithAllOfAndNullable = { - propA?: - | ({ - boolean?: boolean; - } & ModelWithEnum & - ModelWithArray & - ModelWithDictionary) - | null; + propA?: + | ({ + boolean?: boolean; + } & ModelWithEnum & + ModelWithArray & + ModelWithDictionary) + | null; }; /** * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a base model with two simple optional properties */ export type CompositionBaseModel = { - firstName?: string; - lastname?: string; + firstName?: string; + lastname?: string; }; /** * This is a model that extends the base model */ export type CompositionExtendedModel = CompositionBaseModel & { - firstName: string; - lastname: string; - age: number; + firstName: string; + lastname: string; + age: number; }; /** * This is a model with one nested property */ export type ModelWithProperties = { - required: string; - readonly requiredAndReadOnly: string; - requiredAndNullable: string | null; - string?: string; - number?: number; - boolean?: boolean; - reference?: ModelWithString; - 'property with space'?: string; - default?: string; - try?: string; - readonly '@namespace.string'?: string; - readonly '@namespace.integer'?: number; + required: string; + readonly requiredAndReadOnly: string; + requiredAndNullable: string | null; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; }; /** * This is a model with one nested property */ export type ModelWithNestedProperties = { - readonly first: { - readonly second: { - readonly third: string | null; - } | null; + readonly first: { + readonly second: { + readonly third: string | null; } | null; + } | null; }; /** * This is a model with duplicated properties */ export type ModelWithDuplicateProperties = { - prop?: ModelWithString; + prop?: ModelWithString; }; /** * This is a model with ordered properties */ export type ModelWithOrderedProperties = { - zebra?: string; - apple?: string; - hawaii?: string; + zebra?: string; + apple?: string; + hawaii?: string; }; /** * This is a model with duplicated imports */ export type ModelWithDuplicateImports = { - propA?: ModelWithString; - propB?: ModelWithString; - propC?: ModelWithString; + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtends = ModelWithString & { - propExtendsA?: string; - propExtendsB?: ModelWithString; + propExtendsA?: string; + propExtendsB?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtendsExtends = ModelWithString & - ModelThatExtends & { - propExtendsC?: string; - propExtendsD?: ModelWithString; - }; + ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; + }; /** * This is a model that contains a some patterns */ export type ModelWithPattern = { - key: string; - name: string; - readonly enabled?: boolean; - readonly modified?: string; - id?: string; - text?: string; - patternWithSingleQuotes?: string; - patternWithNewline?: string; - patternWithBacktick?: string; + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; }; export type File = { - readonly id?: string; - readonly updated_at?: string; - readonly created_at?: string; - mime: string; - readonly file?: string; + readonly id?: string; + readonly updated_at?: string; + readonly created_at?: string; + mime: string; + readonly file?: string; }; export type _default = { - name?: string; + name?: string; }; export type Pageable = { - page?: number; - size?: number; - sort?: Array; + page?: number; + size?: number; + sort?: Array; }; /** * This is a free-form object without additionalProperties. */ export type FreeFormObjectWithoutAdditionalProperties = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: true. */ export type FreeFormObjectWithAdditionalPropertiesEqTrue = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: {}. */ export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = { - [key: string]: unknown; + [key: string]: unknown; }; export type ModelWithConst = { - String?: 'String'; - number?: 0; - null?: null; - withType?: 'Some string'; + String?: 'String'; + number?: 0; + null?: null; + withType?: 'Some string'; }; /** * This is a model with one property and additionalProperties: true */ export type ModelWithAdditionalPropertiesEqTrue = { - /** - * This is a simple string property - */ - prop?: string; - [key: string]: unknown; + /** + * This is a simple string property + */ + prop?: string; + [key: string]: unknown; }; export type NestedAnyOfArraysNullable = { - nullableArray?: Array | null; + nullableArray?: Array | null; }; export type CompositionWithOneOfAndProperties = - | { - foo: SimpleParameter; - baz: number | null; - qux: number; - } - | { - bar: NonAsciiStringæøåÆØÅöôêÊ字符串; - baz: number | null; - qux: number; - }; + | { + foo: SimpleParameter; + baz: number | null; + qux: number; + } + | { + bar: NonAsciiStringæøåÆØÅöôêÊ字符串; + baz: number | null; + qux: number; + }; /** * An object that can be null */ export type NullableObject = { - foo?: string; + foo?: string; } | null; /** @@ -726,71 +760,81 @@ export type NullableObject = { export type CharactersInDescription = string; export type ModelWithNullableObject = { - data?: NullableObject; + data?: NullableObject; }; export type ModelWithOneOfEnum = - | { - foo: 'Bar'; - } - | { - foo: 'Baz'; - } - | { - foo: 'Qux'; - } - | { - content: string; - foo: 'Quux'; - } - | { - content: [string, string]; - foo: 'Corge'; - }; + | { + foo: 'Bar'; + } + | { + foo: 'Baz'; + } + | { + foo: 'Qux'; + } + | { + content: string; + foo: 'Quux'; + } + | { + content: [string, string]; + foo: 'Corge'; + }; export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; export type ModelWithNestedArrayEnumsData = { - foo?: Array; - bar?: Array; + foo?: Array; + bar?: Array; }; export type ModelWithNestedArrayEnums = { - array_strings?: Array; - data?: ModelWithNestedArrayEnumsData; + array_strings?: Array; + data?: ModelWithNestedArrayEnumsData; }; export type ModelWithNestedCompositionEnums = { - foo?: ModelWithNestedArrayEnumsDataFoo; + foo?: ModelWithNestedArrayEnumsDataFoo; }; export type ModelWithReadOnlyAndWriteOnly = { - foo: string; - readonly bar: string; - baz: string; + foo: string; + readonly bar: string; + baz: string; }; export type ModelWithConstantSizeArray = [number, number]; -export type ModelWithAnyOfConstantSizeArray = [number | string, number | string, number | string]; +export type ModelWithAnyOfConstantSizeArray = [ + number | string, + number | string, + number | string, +]; export type ModelWithAnyOfConstantSizeArrayNullable = [ - number | null | string, - number | null | string, - number | null | string, + number | null | string, + number | null | string, + number | null | string, ]; -export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [number | string, number | string]; +export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ + number | string, + number | string, +]; -export type ModelWithAnyOfConstantSizeArrayAndIntersect = [number & string, number & string]; +export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ + number & string, + number & string, +]; export type ModelWithNumericEnumUnion = { - /** - * Период - */ - value?: 1 | 3 | 6 | 12; + /** + * Период + */ + value?: 1 | 3 | 6 | 12; }; /** @@ -804,603 +848,609 @@ export type SimpleParameter = string; export type x_Foo_Bar = string; export type $OpenApiTs = { - '/api/v{api-version}/no-tag': { - post: { - req: { - requestBody: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; - }; - res: { - 200: ModelWithReadOnlyAndWriteOnly; - }; - }; + '/api/v{api-version}/no-tag': { + post: { + req: { + requestBody: + | ModelWithReadOnlyAndWriteOnly + | ModelWithArrayReadOnlyAndWriteOnly; + }; + res: { + 200: ModelWithReadOnlyAndWriteOnly; + }; }; - '/api/v{api-version}/simple/$count': { - get: { - res: { - /** - * Success - */ - 200: Model_From_Zendesk; - }; - }; + }; + '/api/v{api-version}/simple/$count': { + get: { + res: { + /** + * Success + */ + 200: Model_From_Zendesk; + }; }; - '/api/v{api-version}/foo/{foo}/bar/{bar}': { - delete: { - req: { - /** - * bar in method - */ - bar: string; - /** - * foo in method - */ - foo: string; - }; - }; + }; + '/api/v{api-version}/foo/{foo}/bar/{bar}': { + delete: { + req: { + /** + * bar in method + */ + bar: string; + /** + * foo in method + */ + foo: string; + }; }; - '/api/v{api-version}/parameters/{parameterPath}': { - post: { - req: { - fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; - fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath: string | null; - /** - * This is the parameter that goes into the query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameterPath}': { + post: { + req: { + fooAllOfEnum: ModelWithNestedArrayEnumsDataFoo; + fooRefEnum?: ModelWithNestedArrayEnumsDataFoo; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath: string | null; + /** + * This is the parameter that goes into the query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { - post: { - req: { - /** - * This is the parameter with a reserved keyword - */ - _default?: string; - /** - * This is the parameter that goes into the cookie - */ - parameterCookie: string | null; - /** - * This is the parameter that goes into the request form data - */ - parameterForm: string | null; - /** - * This is the parameter that goes into the request header - */ - parameterHeader: string | null; - /** - * This is the parameter that goes into the path - */ - parameterPath1?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath2?: string; - /** - * This is the parameter that goes into the path - */ - parameterPath3?: string; - /** - * This is the parameter that goes into the request query params - */ - parameterQuery: string | null; - /** - * This is the parameter that goes into the body - */ - requestBody: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}': { + post: { + req: { + /** + * This is the parameter with a reserved keyword + */ + _default?: string; + /** + * This is the parameter that goes into the cookie + */ + parameterCookie: string | null; + /** + * This is the parameter that goes into the request form data + */ + parameterForm: string | null; + /** + * This is the parameter that goes into the request header + */ + parameterHeader: string | null; + /** + * This is the parameter that goes into the path + */ + parameterPath1?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath2?: string; + /** + * This is the parameter that goes into the path + */ + parameterPath3?: string; + /** + * This is the parameter that goes into the request query params + */ + parameterQuery: string | null; + /** + * This is the parameter that goes into the body + */ + requestBody: ModelWithString | null; + }; }; - '/api/v{api-version}/parameters/': { - get: { - req: { - /** - * This is an optional parameter - */ - parameter?: string; - /** - * This is a required parameter - */ - requestBody: ModelWithOneOfEnum; - }; - }; - post: { - req: { - /** - * This is a required parameter - */ - parameter: Pageable; - /** - * This is an optional parameter - */ - requestBody?: ModelWithString; - }; - }; + }; + '/api/v{api-version}/parameters/': { + get: { + req: { + /** + * This is an optional parameter + */ + parameter?: string; + /** + * This is a required parameter + */ + requestBody: ModelWithOneOfEnum; + }; }; - '/api/v{api-version}/descriptions/': { - post: { - req: { - /** - * Testing backticks in string: `backticks` and ```multiple backticks``` should work - */ - parameterWithBackticks?: unknown; - /** - * Testing multiline comments in string: First line - * Second line - * - * Fourth line - */ - parameterWithBreaks?: unknown; - /** - * Testing expression placeholders in string: ${expression} should work - */ - parameterWithExpressionPlaceholders?: unknown; - /** - * Testing quotes in string: 'single quote''' and "double quotes""" should work - */ - parameterWithQuotes?: unknown; - /** - * Testing reserved characters in string: * inline * and ** inline ** should work - */ - parameterWithReservedCharacters?: unknown; - /** - * Testing slashes in string: \backwards\\\ and /forwards/// should work - */ - parameterWithSlashes?: unknown; - }; - }; + post: { + req: { + /** + * This is a required parameter + */ + parameter: Pageable; + /** + * This is an optional parameter + */ + requestBody?: ModelWithString; + }; }; - '/api/v{api-version}/parameters/deprecated': { - post: { - req: { - /** - * This parameter is deprecated - * @deprecated - */ - parameter: DeprecatedModel | null; - }; - }; + }; + '/api/v{api-version}/descriptions/': { + post: { + req: { + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: unknown; + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: unknown; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: unknown; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: unknown; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: unknown; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: unknown; + }; }; - '/api/v{api-version}/requestBody/': { - post: { - req: { - /** - * A reusable request body - */ - foo?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/parameters/deprecated': { + post: { + req: { + /** + * This parameter is deprecated + * @deprecated + */ + parameter: DeprecatedModel | null; + }; }; - '/api/v{api-version}/formData/': { - post: { - req: { - /** - * A reusable request body - */ - formData?: ModelWithString; - /** - * This is a reusable parameter - */ - parameter?: string; - }; - }; + }; + '/api/v{api-version}/requestBody/': { + post: { + req: { + /** + * A reusable request body + */ + foo?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/defaults': { - get: { - req: { - /** - * This is a simple boolean with default value - */ - parameterBoolean?: boolean | null; - /** - * This is a simple enum with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model with default value - */ - parameterModel?: ModelWithString | null; - /** - * This is a simple number with default value - */ - parameterNumber?: number | null; - /** - * This is a simple string with default value - */ - parameterString?: string | null; - }; - }; - post: { - req: { - /** - * This is a simple boolean that is optional with default value - */ - parameterBoolean?: boolean; - /** - * This is a simple enum that is optional with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model that is optional with default value - */ - parameterModel?: ModelWithString; - /** - * This is a simple number that is optional with default value - */ - parameterNumber?: number; - /** - * This is a simple string that is optional with default value - */ - parameterString?: string; - }; - }; - put: { - req: { - /** - * This is a optional string with default - */ - parameterOptionalStringWithDefault?: string; - /** - * This is a optional string with empty default - */ - parameterOptionalStringWithEmptyDefault?: string; - /** - * This is a optional string with no default - */ - parameterOptionalStringWithNoDefault?: string; - /** - * This is a string that can be null with default - */ - parameterStringNullableWithDefault?: string | null; - /** - * This is a string that can be null with no default - */ - parameterStringNullableWithNoDefault?: string | null; - /** - * This is a string with default - */ - parameterStringWithDefault: string; - /** - * This is a string with empty default - */ - parameterStringWithEmptyDefault: string; - /** - * This is a string with no default - */ - parameterStringWithNoDefault: string; - }; - }; + }; + '/api/v{api-version}/formData/': { + post: { + req: { + /** + * A reusable request body + */ + formData?: ModelWithString; + /** + * This is a reusable parameter + */ + parameter?: string; + }; }; - '/api/v{api-version}/no-content': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/defaults': { + get: { + req: { + /** + * This is a simple boolean with default value + */ + parameterBoolean?: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel?: ModelWithString | null; + /** + * This is a simple number with default value + */ + parameterNumber?: number | null; + /** + * This is a simple string with default value + */ + parameterString?: string | null; + }; }; - '/api/v{api-version}/multiple-tags/response-and-no-content': { - get: { - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Success - */ - 204: void; - }; - }; + post: { + req: { + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + }; }; - '/api/v{api-version}/response': { - get: { - res: { - 200: ModelWithString; - }; - }; - post: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - }; - }; - put: { - res: { - /** - * Message for default response - */ - 200: ModelWithString; - /** - * Message for 201 response - */ - 201: ModelThatExtends; - /** - * Message for 202 response - */ - 202: ModelThatExtendsExtends; - }; - }; + put: { + req: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + }; }; - '/api/v{api-version}/multiple-tags/a': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/no-content': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/multiple-tags/b': { - get: { - res: { - /** - * Success - */ - 204: void; - }; - }; + }; + '/api/v{api-version}/multiple-tags/response-and-no-content': { + get: { + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/collectionFormat': { - get: { - req: { - /** - * This is an array parameter that is sent as csv format (comma-separated values) - */ - parameterArrayCsv: Array | null; - /** - * This is an array parameter that is sent as multi format (multiple parameter instances) - */ - parameterArrayMulti: Array | null; - /** - * This is an array parameter that is sent as pipes format (pipe-separated values) - */ - parameterArrayPipes: Array | null; - /** - * This is an array parameter that is sent as ssv format (space-separated values) - */ - parameterArraySsv: Array | null; - /** - * This is an array parameter that is sent as tsv format (tab-separated values) - */ - parameterArrayTsv: Array | null; - }; - }; + }; + '/api/v{api-version}/response': { + get: { + res: { + 200: ModelWithString; + }; }; - '/api/v{api-version}/types': { - get: { - req: { - /** - * This is a number parameter - */ - id?: number; - /** - * This is an array parameter - */ - parameterArray: Array | null; - /** - * This is a boolean parameter - */ - parameterBoolean: boolean | null; - /** - * This is a dictionary parameter - */ - parameterDictionary: { - [key: string]: unknown; - } | null; - /** - * This is an enum parameter - */ - parameterEnum: 'Success' | 'Warning' | 'Error' | null; - /** - * This is a number parameter - */ - parameterNumber: number; - /** - * This is an object parameter - */ - parameterObject: { - [key: string]: unknown; - } | null; - /** - * This is a string parameter - */ - parameterString: string | null; - }; - res: { - /** - * Response is a simple number - */ - 200: number; - /** - * Response is a simple string - */ - 201: string; - /** - * Response is a simple boolean - */ - 202: boolean; - /** - * Response is a simple object - */ - 203: { - [key: string]: unknown; - }; - }; - }; + post: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/upload': { - post: { - req: { - /** - * Supply a file reference for upload - */ - file: Blob | File; - }; - res: { - 200: boolean; - }; - }; + put: { + res: { + /** + * Message for default response + */ + 200: ModelWithString; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; + }; }; - '/api/v{api-version}/file/{id}': { - get: { - req: { - id: string; - }; - res: { - /** - * Success - */ - 200: Blob | File; - }; - }; + }; + '/api/v{api-version}/multiple-tags/a': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex': { - get: { - req: { - /** - * Parameter containing object - */ - parameterObject: { - first?: { - second?: { - third?: string; - }; - }; - }; - /** - * Parameter containing reference - */ - parameterReference: ModelWithString; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; - }; + }; + '/api/v{api-version}/multiple-tags/b': { + get: { + res: { + /** + * Success + */ + 204: void; + }; }; - '/api/v{api-version}/complex/{id}': { - put: { - req: { - id: number; - requestBody?: { - readonly key: string | null; - name: string | null; - enabled?: boolean; - readonly type: 'Monkey' | 'Horse' | 'Bird'; - listOfModels?: Array | null; - listOfStrings?: Array | null; - parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; - readonly user?: { - readonly id?: number; - readonly name?: string | null; - }; - }; - }; - res: { - /** - * Success - */ - 200: ModelWithString; - }; - }; + }; + '/api/v{api-version}/collectionFormat': { + get: { + req: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCsv: Array | null; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array | null; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array | null; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySsv: Array | null; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTsv: Array | null; + }; }; - '/api/v{api-version}/multipart': { - post: { - req: { - formData?: { - content?: Blob | File; - data?: ModelWithString | null; - }; - }; + }; + '/api/v{api-version}/types': { + get: { + req: { + /** + * This is a number parameter + */ + id?: number; + /** + * This is an array parameter + */ + parameterArray: Array | null; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean | null; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: unknown; + } | null; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error' | null; + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is an object parameter + */ + parameterObject: { + [key: string]: unknown; + } | null; + /** + * This is a string parameter + */ + parameterString: string | null; + }; + res: { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: { + [key: string]: unknown; }; - get: { - res: { - /** - * OK - */ - 200: { - file?: Blob | File; - metadata?: { - foo?: string; - bar?: string; - }; - }; + }; + }; + }; + '/api/v{api-version}/upload': { + post: { + req: { + /** + * Supply a file reference for upload + */ + file: Blob | File; + }; + res: { + 200: boolean; + }; + }; + }; + '/api/v{api-version}/file/{id}': { + get: { + req: { + id: string; + }; + res: { + /** + * Success + */ + 200: Blob | File; + }; + }; + }; + '/api/v{api-version}/complex': { + get: { + req: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; }; + }; }; + /** + * Parameter containing reference + */ + parameterReference: ModelWithString; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; - '/api/v{api-version}/header': { - post: { - res: { - /** - * Successful response - */ - 200: string; - }; + }; + '/api/v{api-version}/complex/{id}': { + put: { + req: { + id: number; + requestBody?: { + readonly key: string | null; + name: string | null; + enabled?: boolean; + readonly type: 'Monkey' | 'Horse' | 'Bird'; + listOfModels?: Array | null; + listOfStrings?: Array | null; + parameters: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; + readonly user?: { + readonly id?: number; + readonly name?: string | null; + }; }; + }; + res: { + /** + * Success + */ + 200: ModelWithString; + }; }; - '/api/v{api-version}/error': { - post: { - req: { - /** - * Status code to return - */ - status: number; - }; - res: { - /** - * Custom message: Successful response - */ - 200: unknown; - }; + }; + '/api/v{api-version}/multipart': { + post: { + req: { + formData?: { + content?: Blob | File; + data?: ModelWithString | null; }; + }; }; - '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { - post: { - req: { - /** - * Dummy input param - */ - nonAsciiParamæøåÆøÅöôêÊ: number; - }; - res: { - /** - * Successful response - */ - 200: Array; - }; + get: { + res: { + /** + * OK + */ + 200: { + file?: Blob | File; + metadata?: { + foo?: string; + bar?: string; + }; }; + }; + }; + }; + '/api/v{api-version}/header': { + post: { + res: { + /** + * Successful response + */ + 200: string; + }; + }; + }; + '/api/v{api-version}/error': { + post: { + req: { + /** + * Status code to return + */ + status: number; + }; + res: { + /** + * Custom message: Successful response + */ + 200: unknown; + }; + }; + }; + '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串': { + post: { + req: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆøÅöôêÊ: number; + }; + res: { + /** + * Successful response + */ + 200: Array; + }; }; + }; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/OpenAPI.ts.snap index 64be05544..5c1459c6b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/OpenAPI.ts.snap @@ -5,46 +5,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/request.ts.snap index bee3d3694..eb8aae7f7 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/core/request.ts.snap @@ -6,305 +6,329 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + let request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } + for (const fn of config.interceptors.request._fns) { + request = await fn(request); + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = [ - 'application/octet-stream', - 'application/pdf', - 'application/zip', - 'audio/', - 'image/', - 'video/', - ]; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const binaryTypes = [ + 'application/octet-stream', + 'application/pdf', + 'application/zip', + 'audio/', + 'image/', + 'video/', + ]; + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return await response.json(); + } else if (binaryTypes.some((type) => contentType.includes(type))) { + return await response.blob(); + } else if (contentType.includes('multipart/form-data')) { + return await response.formData(); + } else if (contentType.includes('text/')) { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -314,38 +338,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/services.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/services.gen.ts.snap index 8ae06bf86..4d65152d9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/services.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/services.gen.ts.snap @@ -6,100 +6,100 @@ import { request as __request } from './core/request'; import type { $OpenApiTs } from './types.gen'; export class DefaultsService { - /** - * @param parameterString This is a simple string with default value - * @param parameterNumber This is a simple number with default value - * @param parameterBoolean This is a simple boolean with default value - * @param parameterEnum This is a simple enum with default value - * @param parameterModel This is a simple model with default value - * @throws ApiError - */ - public static callWithDefaultParameters( - parameterString: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterString'] = 'Hello World!', - parameterNumber: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterNumber'] = 123, - parameterBoolean: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterBoolean'] = true, - parameterEnum: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterEnum'] = 'Success', - parameterModel: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterModel'] = { - prop: 'Hello World!', - } - ): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } + /** + * @param parameterString This is a simple string with default value + * @param parameterNumber This is a simple number with default value + * @param parameterBoolean This is a simple boolean with default value + * @param parameterEnum This is a simple enum with default value + * @param parameterModel This is a simple model with default value + * @throws ApiError + */ + public static callWithDefaultParameters( + parameterString: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterString'] = 'Hello World!', + parameterNumber: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterNumber'] = 123, + parameterBoolean: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterBoolean'] = true, + parameterEnum: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterEnum'] = 'Success', + parameterModel: $OpenApiTs['/api/v{api-version}/defaults']['get']['req']['parameterModel'] = { + prop: 'Hello World!', + }, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } - /** - * @param parameterString This is a simple string that is optional with default value - * @param parameterNumber This is a simple number that is optional with default value - * @param parameterBoolean This is a simple boolean that is optional with default value - * @param parameterEnum This is a simple enum that is optional with default value - * @param parameterModel This is a simple model that is optional with default value - * @throws ApiError - */ - public static callWithDefaultOptionalParameters( - parameterString: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterString'] = 'Hello World!', - parameterNumber: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterNumber'] = 123, - parameterBoolean: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterBoolean'] = true, - parameterEnum: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterEnum'] = 'Success', - parameterModel: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterModel'] = { - prop: 'Hello World!', - } - ): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } + /** + * @param parameterString This is a simple string that is optional with default value + * @param parameterNumber This is a simple number that is optional with default value + * @param parameterBoolean This is a simple boolean that is optional with default value + * @param parameterEnum This is a simple enum that is optional with default value + * @param parameterModel This is a simple model that is optional with default value + * @throws ApiError + */ + public static callWithDefaultOptionalParameters( + parameterString: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterString'] = 'Hello World!', + parameterNumber: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterNumber'] = 123, + parameterBoolean: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterBoolean'] = true, + parameterEnum: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterEnum'] = 'Success', + parameterModel: $OpenApiTs['/api/v{api-version}/defaults']['post']['req']['parameterModel'] = { + prop: 'Hello World!', + }, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } - /** - * @param parameterStringWithNoDefault This is a string with no default - * @param parameterOptionalStringWithDefault This is a optional string with default - * @param parameterOptionalStringWithEmptyDefault This is a optional string with empty default - * @param parameterOptionalStringWithNoDefault This is a optional string with no default - * @param parameterStringWithDefault This is a string with default - * @param parameterStringWithEmptyDefault This is a string with empty default - * @param parameterStringNullableWithNoDefault This is a string that can be null with no default - * @param parameterStringNullableWithDefault This is a string that can be null with default - * @throws ApiError - */ - public static callToTestOrderOfParams( - parameterStringWithNoDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringWithNoDefault'], - parameterOptionalStringWithDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterOptionalStringWithDefault'] = 'Hello World!', - parameterOptionalStringWithEmptyDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterOptionalStringWithEmptyDefault'] = '', - parameterOptionalStringWithNoDefault?: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterOptionalStringWithNoDefault'], - parameterStringWithDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringWithDefault'] = 'Hello World!', - parameterStringWithEmptyDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringWithEmptyDefault'] = '', - parameterStringNullableWithNoDefault?: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringNullableWithNoDefault'], - parameterStringNullableWithDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringNullableWithDefault'] = null - ): CancelablePromise { - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/defaults', - query: { - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringWithNoDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - }, - }); - } + /** + * @param parameterStringWithNoDefault This is a string with no default + * @param parameterOptionalStringWithDefault This is a optional string with default + * @param parameterOptionalStringWithEmptyDefault This is a optional string with empty default + * @param parameterOptionalStringWithNoDefault This is a optional string with no default + * @param parameterStringWithDefault This is a string with default + * @param parameterStringWithEmptyDefault This is a string with empty default + * @param parameterStringNullableWithNoDefault This is a string that can be null with no default + * @param parameterStringNullableWithDefault This is a string that can be null with default + * @throws ApiError + */ + public static callToTestOrderOfParams( + parameterStringWithNoDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringWithNoDefault'], + parameterOptionalStringWithDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterOptionalStringWithDefault'] = 'Hello World!', + parameterOptionalStringWithEmptyDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterOptionalStringWithEmptyDefault'] = '', + parameterOptionalStringWithNoDefault?: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterOptionalStringWithNoDefault'], + parameterStringWithDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringWithDefault'] = 'Hello World!', + parameterStringWithEmptyDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringWithEmptyDefault'] = '', + parameterStringNullableWithNoDefault?: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringNullableWithNoDefault'], + parameterStringNullableWithDefault: $OpenApiTs['/api/v{api-version}/defaults']['put']['req']['parameterStringNullableWithDefault'] = null, + ): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/defaults', + query: { + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringWithNoDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + }, + }); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/types.gen.ts.snap index 03d47f551..689a75423 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_legacy_positional_args/types.gen.ts.snap @@ -4,97 +4,97 @@ * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; export type $OpenApiTs = { - '/api/v{api-version}/defaults': { - get: { - req: { - /** - * This is a simple boolean with default value - */ - parameterBoolean: boolean | null; - /** - * This is a simple enum with default value - */ - parameterEnum: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model with default value - */ - parameterModel: ModelWithString | null; - /** - * This is a simple number with default value - */ - parameterNumber: number | null; - /** - * This is a simple string with default value - */ - parameterString: string | null; - }; - }; - post: { - req: { - /** - * This is a simple boolean that is optional with default value - */ - parameterBoolean: boolean; - /** - * This is a simple enum that is optional with default value - */ - parameterEnum: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model that is optional with default value - */ - parameterModel: ModelWithString; - /** - * This is a simple number that is optional with default value - */ - parameterNumber: number; - /** - * This is a simple string that is optional with default value - */ - parameterString: string; - }; - }; - put: { - req: { - /** - * This is a optional string with default - */ - parameterOptionalStringWithDefault: string; - /** - * This is a optional string with empty default - */ - parameterOptionalStringWithEmptyDefault: string; - /** - * This is a optional string with no default - */ - parameterOptionalStringWithNoDefault?: string; - /** - * This is a string that can be null with default - */ - parameterStringNullableWithDefault: string | null; - /** - * This is a string that can be null with no default - */ - parameterStringNullableWithNoDefault?: string | null; - /** - * This is a string with default - */ - parameterStringWithDefault: string; - /** - * This is a string with empty default - */ - parameterStringWithEmptyDefault: string; - /** - * This is a string with no default - */ - parameterStringWithNoDefault: string; - }; - }; + '/api/v{api-version}/defaults': { + get: { + req: { + /** + * This is a simple boolean with default value + */ + parameterBoolean: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel: ModelWithString | null; + /** + * This is a simple number with default value + */ + parameterNumber: number | null; + /** + * This is a simple string with default value + */ + parameterString: string | null; + }; }; + post: { + req: { + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel: ModelWithString; + /** + * This is a simple number that is optional with default value + */ + parameterNumber: number; + /** + * This is a simple string that is optional with default value + */ + parameterString: string; + }; + }; + put: { + req: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault: string | null; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + }; + }; + }; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_models/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_models/types.gen.ts.snap index 412a64071..f2ca0a737 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_models/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_models/types.gen.ts.snap @@ -85,19 +85,39 @@ export type SimpleStringWithPattern = string | null; * This is a simple enum with strings */ export type EnumWithStrings = - | 'Success' - | 'Warning' - | 'Error' - | "'Single Quote'" - | '"Double Quotes"' - | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + | 'Success' + | 'Warning' + | 'Error' + | "'Single Quote'" + | '"Double Quotes"' + | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; -export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; +export type EnumWithReplacedCharacters = + | "'Single Quote'" + | '"Double Quotes"' + | 'øæåôöØÆÅÔÖ字符串' + | 3.1 + | ''; /** * This is a simple enum with numbers */ -export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; +export type EnumWithNumbers = + | 1 + | 2 + | 3 + | 1.1 + | 1.2 + | 1.3 + | 100 + | 200 + | 300 + | -100 + | -200 + | -300 + | -1.1 + | -1.2 + | -1.3; /** * Success=1,Warning=2,Error=3 @@ -140,113 +160,113 @@ export type ArrayWithArray = Array>; * This is a simple array with properties */ export type ArrayWithProperties = Array<{ - foo?: camelCaseCommentWithBreaks; - bar?: string; + foo?: camelCaseCommentWithBreaks; + bar?: string; }>; /** * This is a simple array with any of properties */ export type ArrayWithAnyOfProperties = Array< - | { - foo?: string; - } - | { - bar?: string; - } + | { + foo?: string; + } + | { + bar?: string; + } >; export type AnyOfAnyAndNull = { - data?: unknown | null; + data?: unknown | null; }; /** * This is a simple array with any of properties */ export type AnyOfArrays = { - results?: Array< - | { - foo?: string; - } - | { - bar?: string; - } - >; + results?: Array< + | { + foo?: string; + } + | { + bar?: string; + } + >; }; /** * This is a string dictionary */ export type DictionaryWithString = { - [key: string]: string; + [key: string]: string; }; export type DictionaryWithPropertiesAndAdditionalProperties = { - foo?: string; - [key: string]: string | undefined; + foo?: string; + [key: string]: string | undefined; }; /** * This is a string reference */ export type DictionaryWithReference = { - [key: string]: ModelWithString; + [key: string]: ModelWithString; }; /** * This is a complex dictionary */ export type DictionaryWithArray = { - [key: string]: Array; + [key: string]: Array; }; /** * This is a string dictionary */ export type DictionaryWithDictionary = { - [key: string]: { - [key: string]: string; - }; + [key: string]: { + [key: string]: string; + }; }; /** * This is a complex dictionary */ export type DictionaryWithProperties = { - [key: string]: { - foo?: string; - bar?: string; - }; + [key: string]: { + foo?: string; + bar?: string; + }; }; /** * This is a model with one number property */ export type ModelWithInteger = { - /** - * This is a simple number property - */ - prop?: number; + /** + * This is a simple number property + */ + prop?: number; }; /** * This is a model with one boolean property */ export type ModelWithBoolean = { - /** - * This is a simple boolean property - */ - prop?: boolean; + /** + * This is a simple boolean property + */ + prop?: boolean; }; /** * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; /** @@ -258,113 +278,119 @@ export type Model_From_Zendesk = string; * This is a model with one string property */ export type ModelWithNullableString = { - /** - * This is a simple string property - */ - nullableProp1?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp1: string | null; - /** - * This is a simple string property - */ - nullableProp2?: string | null; - /** - * This is a simple string property - */ - nullableRequiredProp2: string | null; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * This is a simple string property + */ + nullableProp1?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp1: string | null; + /** + * This is a simple string property + */ + nullableProp2?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp2: string | null; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one enum */ export type ModelWithEnum = { - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; - /** - * These are the HTTP error code enums - */ - statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; - /** - * Simple boolean enum - */ - bool?: boolean; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: + | '100' + | '200 FOO' + | '300 FOO_BAR' + | '400 foo-bar' + | '500 foo.bar' + | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: boolean; }; /** * This is a model with one enum with escaped name */ export type ModelWithEnumWithHyphen = { - 'foo-bar-baz-qux'?: '3.0'; + 'foo-bar-baz-qux'?: '3.0'; }; /** * This is a model with one enum */ export type ModelWithEnumFromDescription = { - /** - * Success=1,Warning=2,Error=3 - */ - test?: number; + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; }; /** * This is a model with nested enums */ export type ModelWithNestedEnums = { - dictionaryWithEnum?: { - [key: string]: 'Success' | 'Warning' | 'Error'; - }; - dictionaryWithEnumFromDescription?: { - [key: string]: number; - }; - arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; - arrayWithDescription?: Array; - /** - * This is a simple enum with strings - */ - 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; }; /** * This is a model with one property containing a reference */ export type ModelWithReference = { - prop?: ModelWithProperties; + prop?: ModelWithProperties; }; /** * This is a model with one property containing an array */ export type ModelWithArrayReadOnlyAndWriteOnly = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing an array */ export type ModelWithArray = { - prop?: Array; - propWithFile?: Array; - propWithNumber?: Array; + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; }; /** * This is a model with one property containing a dictionary */ export type ModelWithDictionary = { - prop?: { - [key: string]: string; - }; + prop?: { + [key: string]: string; + }; }; /** @@ -372,53 +398,57 @@ export type ModelWithDictionary = { * @deprecated */ export type DeprecatedModel = { - /** - * This is a deprecated property - * @deprecated - */ - prop?: string; + /** + * This is a deprecated property + * @deprecated + */ + prop?: string; }; /** * This is a model with one property containing a circular reference */ export type ModelWithCircularReference = { - prop?: ModelWithCircularReference; + prop?: ModelWithCircularReference; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'one of' relationship where the options are not $ref */ export type CompositionWithOneOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * Circle */ export type ModelCircle = { - kind: 'circle'; - radius?: number; + kind: 'circle'; + radius?: number; }; /** * Square */ export type ModelSquare = { - kind: 'square'; - sideLength?: number; + kind: 'square'; + sideLength?: number; }; /** @@ -430,26 +460,30 @@ export type CompositionWithOneOfDiscriminator = ModelCircle | ModelSquare; * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOf = { - propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + propA?: + | ModelWithString + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary; }; /** * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithAnyOfAnonymous = { - propA?: - | { - propA?: string; - } - | string - | number; + propA?: + | { + propA?: string; + } + | string + | number; }; /** * This is a model with nested 'any of' property with a type null */ export type CompositionWithNestedAnyAndTypeNull = { - propA?: Array | Array; + propA?: Array | Array; }; export type Enum1 = 'Bird' | 'Dog'; @@ -460,264 +494,264 @@ export type ConstValue = 'ConstValue'; * This is a model with one property with a 'any of' relationship where the options are not $ref */ export type CompositionWithNestedAnyOfAndNull = { - propA?: Array | null; + propA?: Array | null; }; /** * This is a model with one property with a 'one of' relationship */ export type CompositionWithOneOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a model that contains a simple dictionary within composition */ export type CompositionWithOneOfAndSimpleDictionary = { - propA?: - | boolean - | { - [key: string]: number; - }; + propA?: + | boolean + | { + [key: string]: number; + }; }; /** * This is a model that contains a dictionary of simple arrays within composition */ export type CompositionWithOneOfAndSimpleArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model that contains a dictionary of complex arrays (composited) within composition */ export type CompositionWithOneOfAndComplexArrayDictionary = { - propA?: - | boolean - | { - [key: string]: Array; - }; + propA?: + | boolean + | { + [key: string]: Array; + }; }; /** * This is a model with one property with a 'all of' relationship */ export type CompositionWithAllOfAndNullable = { - propA?: - | ({ - boolean?: boolean; - } & ModelWithEnum & - ModelWithArray & - ModelWithDictionary) - | null; + propA?: + | ({ + boolean?: boolean; + } & ModelWithEnum & + ModelWithArray & + ModelWithDictionary) + | null; }; /** * This is a model with one property with a 'any of' relationship */ export type CompositionWithAnyOfAndNullable = { - propA?: - | { - boolean?: boolean; - } - | ModelWithEnum - | ModelWithArray - | ModelWithDictionary - | null; + propA?: + | { + boolean?: boolean; + } + | ModelWithEnum + | ModelWithArray + | ModelWithDictionary + | null; }; /** * This is a base model with two simple optional properties */ export type CompositionBaseModel = { - firstName?: string; - lastname?: string; + firstName?: string; + lastname?: string; }; /** * This is a model that extends the base model */ export type CompositionExtendedModel = CompositionBaseModel & { - firstName: string; - lastname: string; - age: number; + firstName: string; + lastname: string; + age: number; }; /** * This is a model with one nested property */ export type ModelWithProperties = { - required: string; - readonly requiredAndReadOnly: string; - requiredAndNullable: string | null; - string?: string; - number?: number; - boolean?: boolean; - reference?: ModelWithString; - 'property with space'?: string; - default?: string; - try?: string; - readonly '@namespace.string'?: string; - readonly '@namespace.integer'?: number; + required: string; + readonly requiredAndReadOnly: string; + requiredAndNullable: string | null; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; }; /** * This is a model with one nested property */ export type ModelWithNestedProperties = { - readonly first: { - readonly second: { - readonly third: string | null; - } | null; + readonly first: { + readonly second: { + readonly third: string | null; } | null; + } | null; }; /** * This is a model with duplicated properties */ export type ModelWithDuplicateProperties = { - prop?: ModelWithString; + prop?: ModelWithString; }; /** * This is a model with ordered properties */ export type ModelWithOrderedProperties = { - zebra?: string; - apple?: string; - hawaii?: string; + zebra?: string; + apple?: string; + hawaii?: string; }; /** * This is a model with duplicated imports */ export type ModelWithDuplicateImports = { - propA?: ModelWithString; - propB?: ModelWithString; - propC?: ModelWithString; + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtends = ModelWithString & { - propExtendsA?: string; - propExtendsB?: ModelWithString; + propExtendsA?: string; + propExtendsB?: ModelWithString; }; /** * This is a model that extends another model */ export type ModelThatExtendsExtends = ModelWithString & - ModelThatExtends & { - propExtendsC?: string; - propExtendsD?: ModelWithString; - }; + ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; + }; /** * This is a model that contains a some patterns */ export type ModelWithPattern = { - key: string; - name: string; - readonly enabled?: boolean; - readonly modified?: string; - id?: string; - text?: string; - patternWithSingleQuotes?: string; - patternWithNewline?: string; - patternWithBacktick?: string; + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; }; export type File = { - readonly id?: string; - readonly updated_at?: string; - readonly created_at?: string; - mime: string; - readonly file?: string; + readonly id?: string; + readonly updated_at?: string; + readonly created_at?: string; + mime: string; + readonly file?: string; }; export type _default = { - name?: string; + name?: string; }; export type Pageable = { - page?: number; - size?: number; - sort?: Array; + page?: number; + size?: number; + sort?: Array; }; /** * This is a free-form object without additionalProperties. */ export type FreeFormObjectWithoutAdditionalProperties = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: true. */ export type FreeFormObjectWithAdditionalPropertiesEqTrue = { - [key: string]: unknown; + [key: string]: unknown; }; /** * This is a free-form object with additionalProperties: {}. */ export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = { - [key: string]: unknown; + [key: string]: unknown; }; export type ModelWithConst = { - String?: 'String'; - number?: 0; - null?: null; - withType?: 'Some string'; + String?: 'String'; + number?: 0; + null?: null; + withType?: 'Some string'; }; /** * This is a model with one property and additionalProperties: true */ export type ModelWithAdditionalPropertiesEqTrue = { - /** - * This is a simple string property - */ - prop?: string; - [key: string]: unknown; + /** + * This is a simple string property + */ + prop?: string; + [key: string]: unknown; }; export type NestedAnyOfArraysNullable = { - nullableArray?: Array | null; + nullableArray?: Array | null; }; export type CompositionWithOneOfAndProperties = - | { - foo: SimpleParameter; - baz: number | null; - qux: number; - } - | { - bar: NonAsciiStringæøåÆØÅöôêÊ字符串; - baz: number | null; - qux: number; - }; + | { + foo: SimpleParameter; + baz: number | null; + qux: number; + } + | { + bar: NonAsciiStringæøåÆØÅöôêÊ字符串; + baz: number | null; + qux: number; + }; /** * An object that can be null */ export type NullableObject = { - foo?: string; + foo?: string; } | null; /** @@ -726,71 +760,81 @@ export type NullableObject = { export type CharactersInDescription = string; export type ModelWithNullableObject = { - data?: NullableObject; + data?: NullableObject; }; export type ModelWithOneOfEnum = - | { - foo: 'Bar'; - } - | { - foo: 'Baz'; - } - | { - foo: 'Qux'; - } - | { - content: string; - foo: 'Quux'; - } - | { - content: [string, string]; - foo: 'Corge'; - }; + | { + foo: 'Bar'; + } + | { + foo: 'Baz'; + } + | { + foo: 'Qux'; + } + | { + content: string; + foo: 'Quux'; + } + | { + content: [string, string]; + foo: 'Corge'; + }; export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; export type ModelWithNestedArrayEnumsData = { - foo?: Array; - bar?: Array; + foo?: Array; + bar?: Array; }; export type ModelWithNestedArrayEnums = { - array_strings?: Array; - data?: ModelWithNestedArrayEnumsData; + array_strings?: Array; + data?: ModelWithNestedArrayEnumsData; }; export type ModelWithNestedCompositionEnums = { - foo?: ModelWithNestedArrayEnumsDataFoo; + foo?: ModelWithNestedArrayEnumsDataFoo; }; export type ModelWithReadOnlyAndWriteOnly = { - foo: string; - readonly bar: string; - baz: string; + foo: string; + readonly bar: string; + baz: string; }; export type ModelWithConstantSizeArray = [number, number]; -export type ModelWithAnyOfConstantSizeArray = [number | string, number | string, number | string]; +export type ModelWithAnyOfConstantSizeArray = [ + number | string, + number | string, + number | string, +]; export type ModelWithAnyOfConstantSizeArrayNullable = [ - number | null | string, - number | null | string, - number | null | string, + number | null | string, + number | null | string, + number | null | string, ]; -export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [number | string, number | string]; +export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ + number | string, + number | string, +]; -export type ModelWithAnyOfConstantSizeArrayAndIntersect = [number & string, number & string]; +export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ + number & string, + number & string, +]; export type ModelWithNumericEnumUnion = { - /** - * Период - */ - value?: 1 | 3 | 6 | 12; + /** + * Период + */ + value?: 1 | 3 | 6 | 12; }; /** diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/OpenAPI.ts.snap index f5f3b9822..2f6bde646 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/OpenAPI.ts.snap @@ -6,46 +6,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/request.ts.snap index b48a33dd9..a326590a6 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_node/core/request.ts.snap @@ -9,301 +9,325 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } - } - - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + let request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } + for (const fn of config.interceptors.request._fns) { + request = await fn(request); + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = [ - 'application/octet-stream', - 'application/pdf', - 'application/zip', - 'audio/', - 'image/', - 'video/', - ]; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const binaryTypes = [ + 'application/octet-stream', + 'application/pdf', + 'application/zip', + 'audio/', + 'image/', + 'video/', + ]; + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return await response.json(); + } else if (binaryTypes.some((type) => contentType.includes(type))) { + return await response.blob(); + } else if (contentType.includes('multipart/form-data')) { + return await response.formData(); + } else if (contentType.includes('text/')) { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -313,38 +337,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/OpenAPI.ts.snap index 64be05544..5c1459c6b 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/OpenAPI.ts.snap @@ -5,46 +5,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/request.ts.snap index bee3d3694..eb8aae7f7 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/core/request.ts.snap @@ -6,305 +6,329 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + let request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } + for (const fn of config.interceptors.request._fns) { + request = await fn(request); + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = [ - 'application/octet-stream', - 'application/pdf', - 'application/zip', - 'audio/', - 'image/', - 'video/', - ]; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const binaryTypes = [ + 'application/octet-stream', + 'application/pdf', + 'application/zip', + 'audio/', + 'image/', + 'video/', + ]; + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return await response.json(); + } else if (binaryTypes.some((type) => contentType.includes(type))) { + return await response.blob(); + } else if (contentType.includes('multipart/form-data')) { + return await response.formData(); + } else if (contentType.includes('text/')) { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -314,38 +338,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/services.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/services.gen.ts.snap index ca5ea9692..d6f60a8a0 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/services.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/services.gen.ts.snap @@ -6,75 +6,87 @@ import { request as __request } from './core/request'; import type { $OpenApiTs } from './types.gen'; export class DefaultsService { - /** - * @throws ApiError - */ - public static callWithDefaultParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'GET', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDefaultParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['get']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'GET', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } - /** - * @throws ApiError - */ - public static callWithDefaultOptionalParameters( - data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {} - ): CancelablePromise { - const { parameterString, parameterNumber, parameterBoolean, parameterEnum, parameterModel } = data; - return __request(OpenAPI, { - method: 'POST', - url: '/api/v{api-version}/defaults', - query: { - parameterString, - parameterNumber, - parameterBoolean, - parameterEnum, - parameterModel, - }, - }); - } + /** + * @throws ApiError + */ + public static callWithDefaultOptionalParameters( + data: $OpenApiTs['/api/v{api-version}/defaults']['post']['req'] = {}, + ): CancelablePromise { + const { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + } = data; + return __request(OpenAPI, { + method: 'POST', + url: '/api/v{api-version}/defaults', + query: { + parameterString, + parameterNumber, + parameterBoolean, + parameterEnum, + parameterModel, + }, + }); + } - /** - * @throws ApiError - */ - public static callToTestOrderOfParams( - data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'] - ): CancelablePromise { - const { - parameterStringWithNoDefault, - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - } = data; - return __request(OpenAPI, { - method: 'PUT', - url: '/api/v{api-version}/defaults', - query: { - parameterOptionalStringWithDefault, - parameterOptionalStringWithEmptyDefault, - parameterOptionalStringWithNoDefault, - parameterStringWithDefault, - parameterStringWithEmptyDefault, - parameterStringWithNoDefault, - parameterStringNullableWithNoDefault, - parameterStringNullableWithDefault, - }, - }); - } + /** + * @throws ApiError + */ + public static callToTestOrderOfParams( + data: $OpenApiTs['/api/v{api-version}/defaults']['put']['req'], + ): CancelablePromise { + const { + parameterStringWithNoDefault, + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + } = data; + return __request(OpenAPI, { + method: 'PUT', + url: '/api/v{api-version}/defaults', + query: { + parameterOptionalStringWithDefault, + parameterOptionalStringWithEmptyDefault, + parameterOptionalStringWithNoDefault, + parameterStringWithDefault, + parameterStringWithEmptyDefault, + parameterStringWithNoDefault, + parameterStringNullableWithNoDefault, + parameterStringNullableWithDefault, + }, + }); + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/types.gen.ts.snap index abcc691fe..45e818f35 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_options/types.gen.ts.snap @@ -4,97 +4,97 @@ * This is a model with one string property */ export type ModelWithString = { - /** - * This is a simple string property - */ - prop?: string; + /** + * This is a simple string property + */ + prop?: string; }; export type $OpenApiTs = { - '/api/v{api-version}/defaults': { - get: { - req: { - /** - * This is a simple boolean with default value - */ - parameterBoolean?: boolean | null; - /** - * This is a simple enum with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model with default value - */ - parameterModel?: ModelWithString | null; - /** - * This is a simple number with default value - */ - parameterNumber?: number | null; - /** - * This is a simple string with default value - */ - parameterString?: string | null; - }; - }; - post: { - req: { - /** - * This is a simple boolean that is optional with default value - */ - parameterBoolean?: boolean; - /** - * This is a simple enum that is optional with default value - */ - parameterEnum?: 'Success' | 'Warning' | 'Error'; - /** - * This is a simple model that is optional with default value - */ - parameterModel?: ModelWithString; - /** - * This is a simple number that is optional with default value - */ - parameterNumber?: number; - /** - * This is a simple string that is optional with default value - */ - parameterString?: string; - }; - }; - put: { - req: { - /** - * This is a optional string with default - */ - parameterOptionalStringWithDefault?: string; - /** - * This is a optional string with empty default - */ - parameterOptionalStringWithEmptyDefault?: string; - /** - * This is a optional string with no default - */ - parameterOptionalStringWithNoDefault?: string; - /** - * This is a string that can be null with default - */ - parameterStringNullableWithDefault?: string | null; - /** - * This is a string that can be null with no default - */ - parameterStringNullableWithNoDefault?: string | null; - /** - * This is a string with default - */ - parameterStringWithDefault: string; - /** - * This is a string with empty default - */ - parameterStringWithEmptyDefault: string; - /** - * This is a string with no default - */ - parameterStringWithNoDefault: string; - }; - }; + '/api/v{api-version}/defaults': { + get: { + req: { + /** + * This is a simple boolean with default value + */ + parameterBoolean?: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel?: ModelWithString | null; + /** + * This is a simple number with default value + */ + parameterNumber?: number | null; + /** + * This is a simple string with default value + */ + parameterString?: string | null; + }; }; + post: { + req: { + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + }; + }; + put: { + req: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + }; + }; + }; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_pascalcase/types.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_pascalcase/types.gen.ts.snap index d35850f78..9bc427229 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_pascalcase/types.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_pascalcase/types.gen.ts.snap @@ -12,6 +12,6 @@ export type CamelCaseCommentWithBreaks = number; * This is a simple array with properties */ export type ArrayWithProperties = Array<{ - foo?: CamelCaseCommentWithBreaks; - bar?: string; + foo?: CamelCaseCommentWithBreaks; + bar?: string; }>; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_schemas_json/schemas.gen.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_schemas_json/schemas.gen.ts.snap index 3c14bc9a9..89d119987 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_schemas_json/schemas.gen.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_schemas_json/schemas.gen.ts.snap @@ -1,1642 +1,1672 @@ // This file is auto-generated by @hey-api/openapi-ts export const $camelCaseCommentWithBreaks = { - description: `Testing multiline comments in string: First line + description: `Testing multiline comments in string: First line Second line Fourth line`, - type: 'integer', + type: 'integer', } as const; export const $CommentWithBreaks = { - description: `Testing multiline comments in string: First line + description: `Testing multiline comments in string: First line Second line Fourth line`, - type: 'integer', + type: 'integer', } as const; export const $CommentWithBackticks = { - description: 'Testing backticks in string: `backticks` and ```multiple backticks``` should work', - type: 'integer', + description: + 'Testing backticks in string: `backticks` and ```multiple backticks``` should work', + type: 'integer', } as const; export const $CommentWithBackticksAndQuotes = { - description: `Testing backticks and quotes in string: \`backticks\`, 'quotes', "double quotes" and \`\`\`multiple backticks\`\`\` should work`, - type: 'integer', + description: `Testing backticks and quotes in string: \`backticks\`, 'quotes', "double quotes" and \`\`\`multiple backticks\`\`\` should work`, + type: 'integer', } as const; export const $CommentWithSlashes = { - description: 'Testing slashes in string: \backwards\\ and /forwards/// should work', - type: 'integer', + description: + 'Testing slashes in string: \backwards\\ and /forwards/// should work', + type: 'integer', } as const; export const $CommentWithExpressionPlaceholders = { - description: 'Testing expression placeholders in string: ${expression} should work', - type: 'integer', + description: + 'Testing expression placeholders in string: ${expression} should work', + type: 'integer', } as const; export const $CommentWithQuotes = { - description: `Testing quotes in string: 'single quote''' and "double quotes""" should work`, - type: 'integer', + description: `Testing quotes in string: 'single quote''' and "double quotes""" should work`, + type: 'integer', } as const; export const $CommentWithReservedCharacters = { - description: 'Testing reserved characters in string: /* inline */ and /** inline **/ should work', - type: 'integer', + description: + 'Testing reserved characters in string: /* inline */ and /** inline **/ should work', + type: 'integer', } as const; export const $SimpleInteger = { - description: 'This is a simple number', - type: 'integer', + description: 'This is a simple number', + type: 'integer', } as const; export const $SimpleBoolean = { - description: 'This is a simple boolean', - type: 'boolean', + description: 'This is a simple boolean', + type: 'boolean', } as const; export const $SimpleString = { - description: 'This is a simple string', - type: 'string', + description: 'This is a simple string', + type: 'string', } as const; export const $NonAsciiStringæøåÆØÅöôêÊ字符串 = { - description: 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)', - type: 'string', + description: + 'A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)', + type: 'string', } as const; export const $SimpleFile = { - description: 'This is a simple file', - type: 'file', + description: 'This is a simple file', + type: 'file', } as const; export const $SimpleReference = { - description: 'This is a simple reference', - $ref: '#/components/schemas/ModelWithString', + description: 'This is a simple reference', + $ref: '#/components/schemas/ModelWithString', } as const; export const $SimpleStringWithPattern = { - description: 'This is a simple string', - type: 'string', - nullable: true, - maxLength: 64, - pattern: '^[a-zA-Z0-9_]*$', + description: 'This is a simple string', + type: 'string', + nullable: true, + maxLength: 64, + pattern: '^[a-zA-Z0-9_]*$', } as const; export const $EnumWithStrings = { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', "'Single Quote'", '"Double Quotes"', 'Non-ascii: øæåôöØÆÅÔÖ字符串'], + description: 'This is a simple enum with strings', + enum: [ + 'Success', + 'Warning', + 'Error', + "'Single Quote'", + '"Double Quotes"', + 'Non-ascii: øæåôöØÆÅÔÖ字符串', + ], } as const; export const $EnumWithReplacedCharacters = { - enum: ["'Single Quote'", '"Double Quotes"', 'øæåôöØÆÅÔÖ字符串', 3.1, ''], - type: 'string', + enum: ["'Single Quote'", '"Double Quotes"', 'øæåôöØÆÅÔÖ字符串', 3.1, ''], + type: 'string', } as const; export const $EnumWithNumbers = { - description: 'This is a simple enum with numbers', - enum: [1, 2, 3, 1.1, 1.2, 1.3, 100, 200, 300, -100, -200, -300, -1.1, -1.2, -1.3], - default: 200, + description: 'This is a simple enum with numbers', + enum: [ + 1, 2, 3, 1.1, 1.2, 1.3, 100, 200, 300, -100, -200, -300, -1.1, -1.2, -1.3, + ], + default: 200, } as const; export const $EnumFromDescription = { - description: 'Success=1,Warning=2,Error=3', - type: 'number', + description: 'Success=1,Warning=2,Error=3', + type: 'number', } as const; export const $EnumWithExtensions = { - description: 'This is a simple enum with numbers', - enum: [200, 400, 500], - 'x-enum-varnames': ['CUSTOM_SUCCESS', 'CUSTOM_WARNING', 'CUSTOM_ERROR'], - 'x-enum-descriptions': [ - 'Used when the status of something is successful', - 'Used when the status of something has a warning', - 'Used when the status of something has an error', - ], + description: 'This is a simple enum with numbers', + enum: [200, 400, 500], + 'x-enum-varnames': ['CUSTOM_SUCCESS', 'CUSTOM_WARNING', 'CUSTOM_ERROR'], + 'x-enum-descriptions': [ + 'Used when the status of something is successful', + 'Used when the status of something has a warning', + 'Used when the status of something has an error', + ], } as const; export const $EnumWithXEnumNames = { - enum: [0, 1, 2], - 'x-enumNames': ['zero', 'one', 'two'], + enum: [0, 1, 2], + 'x-enumNames': ['zero', 'one', 'two'], } as const; export const $ArrayWithNumbers = { - description: 'This is a simple array with numbers', - type: 'array', - items: { - type: 'integer', - }, + description: 'This is a simple array with numbers', + type: 'array', + items: { + type: 'integer', + }, } as const; export const $ArrayWithBooleans = { - description: 'This is a simple array with booleans', - type: 'array', - items: { - type: 'boolean', - }, + description: 'This is a simple array with booleans', + type: 'array', + items: { + type: 'boolean', + }, } as const; export const $ArrayWithStrings = { - description: 'This is a simple array with strings', - type: 'array', - items: { - type: 'string', - }, - default: ['test'], + description: 'This is a simple array with strings', + type: 'array', + items: { + type: 'string', + }, + default: ['test'], } as const; export const $ArrayWithReferences = { - description: 'This is a simple array with references', - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a simple array with references', + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithString', + }, } as const; export const $ArrayWithArray = { - description: 'This is a simple array containing an array', + description: 'This is a simple array containing an array', + type: 'array', + items: { type: 'array', items: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, + $ref: '#/components/schemas/ModelWithString', }, + }, } as const; export const $ArrayWithProperties = { - description: 'This is a simple array with properties', - type: 'array', - items: { - type: 'object', - properties: { - foo: { - $ref: '#/components/schemas/camelCaseCommentWithBreaks', - }, - bar: { - type: 'string', - }, - }, + description: 'This is a simple array with properties', + type: 'array', + items: { + type: 'object', + properties: { + foo: { + $ref: '#/components/schemas/camelCaseCommentWithBreaks', + }, + bar: { + type: 'string', + }, }, + }, } as const; export const $ArrayWithAnyOfProperties = { - description: 'This is a simple array with any of properties', - type: 'array', - items: { - anyOf: [ - { - type: 'object', - properties: { - foo: { - type: 'string', - default: 'test', - }, - }, - }, - { - type: 'object', - properties: { - bar: { - type: 'string', - }, - }, - }, - ], - }, + description: 'This is a simple array with any of properties', + type: 'array', + items: { + anyOf: [ + { + type: 'object', + properties: { + foo: { + type: 'string', + default: 'test', + }, + }, + }, + { + type: 'object', + properties: { + bar: { + type: 'string', + }, + }, + }, + ], + }, } as const; export const $AnyOfAnyAndNull = { - type: 'object', - properties: { - data: { - anyOf: [ - {}, - { - type: 'null', - }, - ], + type: 'object', + properties: { + data: { + anyOf: [ + {}, + { + type: 'null', }, + ], }, + }, } as const; export const $AnyOfArrays = { - description: 'This is a simple array with any of properties', - type: 'object', - properties: { - results: { - items: { - anyOf: [ - { - type: 'object', - properties: { - foo: { - type: 'string', - }, - }, - }, - { - type: 'object', - properties: { - bar: { - type: 'string', - }, - }, - }, - ], + description: 'This is a simple array with any of properties', + type: 'object', + properties: { + results: { + items: { + anyOf: [ + { + type: 'object', + properties: { + foo: { + type: 'string', + }, }, - type: 'array', - }, + }, + { + type: 'object', + properties: { + bar: { + type: 'string', + }, + }, + }, + ], + }, + type: 'array', }, + }, } as const; export const $DictionaryWithString = { - description: 'This is a string dictionary', - type: 'object', - additionalProperties: { - type: 'string', - }, + description: 'This is a string dictionary', + type: 'object', + additionalProperties: { + type: 'string', + }, } as const; export const $DictionaryWithPropertiesAndAdditionalProperties = { - type: 'object', - properties: { - foo: { - type: 'string', - }, - }, - additionalProperties: { - type: 'string', + type: 'object', + properties: { + foo: { + type: 'string', }, + }, + additionalProperties: { + type: 'string', + }, } as const; export const $DictionaryWithReference = { - description: 'This is a string reference', - type: 'object', - additionalProperties: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a string reference', + type: 'object', + additionalProperties: { + $ref: '#/components/schemas/ModelWithString', + }, } as const; export const $DictionaryWithArray = { - description: 'This is a complex dictionary', - type: 'object', - additionalProperties: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a complex dictionary', + type: 'object', + additionalProperties: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithString', }, + }, } as const; export const $DictionaryWithDictionary = { - description: 'This is a string dictionary', + description: 'This is a string dictionary', + type: 'object', + additionalProperties: { type: 'object', additionalProperties: { - type: 'object', - additionalProperties: { - type: 'string', - }, + type: 'string', }, + }, } as const; export const $DictionaryWithProperties = { - description: 'This is a complex dictionary', + description: 'This is a complex dictionary', + type: 'object', + additionalProperties: { type: 'object', - additionalProperties: { - type: 'object', - properties: { - foo: { - type: 'string', - }, - bar: { - type: 'string', - }, - }, + properties: { + foo: { + type: 'string', + }, + bar: { + type: 'string', + }, }, + }, } as const; export const $ModelWithInteger = { - description: 'This is a model with one number property', - type: 'object', - properties: { - prop: { - description: 'This is a simple number property', - type: 'integer', - }, + description: 'This is a model with one number property', + type: 'object', + properties: { + prop: { + description: 'This is a simple number property', + type: 'integer', }, + }, } as const; export const $ModelWithBoolean = { - description: 'This is a model with one boolean property', - type: 'object', - properties: { - prop: { - description: 'This is a simple boolean property', - type: 'boolean', - }, + description: 'This is a model with one boolean property', + type: 'object', + properties: { + prop: { + description: 'This is a simple boolean property', + type: 'boolean', }, + }, } as const; export const $ModelWithString = { - description: 'This is a model with one string property', - type: 'object', - properties: { - prop: { - description: 'This is a simple string property', - type: 'string', - }, + description: 'This is a model with one string property', + type: 'object', + properties: { + prop: { + description: 'This is a simple string property', + type: 'string', }, + }, } as const; export const $Model_From_Zendesk = { - description: `\`Comment\` or \`VoiceComment\`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)`, - type: 'string', + description: `\`Comment\` or \`VoiceComment\`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)`, + type: 'string', } as const; export const $ModelWithNullableString = { - description: 'This is a model with one string property', - type: 'object', - required: ['nullableRequiredProp1', 'nullableRequiredProp2'], - properties: { - nullableProp1: { - description: 'This is a simple string property', - type: 'string', - nullable: true, - }, - nullableRequiredProp1: { - description: 'This is a simple string property', - type: 'string', - nullable: true, - }, - nullableProp2: { - description: 'This is a simple string property', - type: ['string', 'null'], - }, - nullableRequiredProp2: { - description: 'This is a simple string property', - type: ['string', 'null'], - }, - 'foo_bar-enum': { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], - }, + description: 'This is a model with one string property', + type: 'object', + required: ['nullableRequiredProp1', 'nullableRequiredProp2'], + properties: { + nullableProp1: { + description: 'This is a simple string property', + type: 'string', + nullable: true, + }, + nullableRequiredProp1: { + description: 'This is a simple string property', + type: 'string', + nullable: true, }, + nullableProp2: { + description: 'This is a simple string property', + type: ['string', 'null'], + }, + nullableRequiredProp2: { + description: 'This is a simple string property', + type: ['string', 'null'], + }, + 'foo_bar-enum': { + description: 'This is a simple enum with strings', + enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], + }, + }, } as const; export const $ModelWithEnum = { - description: 'This is a model with one enum', - type: 'object', - properties: { - 'foo_bar-enum': { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], - }, - statusCode: { - description: 'These are the HTTP error code enums', - enum: ['100', '200 FOO', '300 FOO_BAR', '400 foo-bar', '500 foo.bar', '600 foo&bar'], - }, - bool: { - description: 'Simple boolean enum', - type: 'boolean', - enum: [true], - }, - }, + description: 'This is a model with one enum', + type: 'object', + properties: { + 'foo_bar-enum': { + description: 'This is a simple enum with strings', + enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], + }, + statusCode: { + description: 'These are the HTTP error code enums', + enum: [ + '100', + '200 FOO', + '300 FOO_BAR', + '400 foo-bar', + '500 foo.bar', + '600 foo&bar', + ], + }, + bool: { + description: 'Simple boolean enum', + type: 'boolean', + enum: [true], + }, + }, } as const; export const $ModelWithEnumWithHyphen = { - description: 'This is a model with one enum with escaped name', - type: 'object', - properties: { - 'foo-bar-baz-qux': { - type: 'string', - enum: ['3.0'], - title: 'Foo-Bar-Baz-Qux', - default: '3.0', - }, + description: 'This is a model with one enum with escaped name', + type: 'object', + properties: { + 'foo-bar-baz-qux': { + type: 'string', + enum: ['3.0'], + title: 'Foo-Bar-Baz-Qux', + default: '3.0', }, + }, } as const; export const $ModelWithEnumFromDescription = { - description: 'This is a model with one enum', - type: 'object', - properties: { - test: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, + description: 'This is a model with one enum', + type: 'object', + properties: { + test: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', }, + }, } as const; export const $ModelWithNestedEnums = { - description: 'This is a model with nested enums', - type: 'object', - properties: { - dictionaryWithEnum: { - type: 'object', - additionalProperties: { - enum: ['Success', 'Warning', 'Error'], - }, - }, - dictionaryWithEnumFromDescription: { - type: 'object', - additionalProperties: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, - }, - arrayWithEnum: { - type: 'array', - items: { - enum: ['Success', 'Warning', 'Error'], - }, - }, - arrayWithDescription: { - type: 'array', - items: { - type: 'integer', - description: 'Success=1,Warning=2,Error=3', - }, - }, - 'foo_bar-enum': { - description: 'This is a simple enum with strings', - enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], - }, + description: 'This is a model with nested enums', + type: 'object', + properties: { + dictionaryWithEnum: { + type: 'object', + additionalProperties: { + enum: ['Success', 'Warning', 'Error'], + }, + }, + dictionaryWithEnumFromDescription: { + type: 'object', + additionalProperties: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', + }, + }, + arrayWithEnum: { + type: 'array', + items: { + enum: ['Success', 'Warning', 'Error'], + }, + }, + arrayWithDescription: { + type: 'array', + items: { + type: 'integer', + description: 'Success=1,Warning=2,Error=3', + }, + }, + 'foo_bar-enum': { + description: 'This is a simple enum with strings', + enum: ['Success', 'Warning', 'Error', 'ØÆÅ字符串'], }, + }, } as const; export const $ModelWithReference = { - description: 'This is a model with one property containing a reference', - type: 'object', - properties: { - prop: { - $ref: '#/components/schemas/ModelWithProperties', - }, + description: 'This is a model with one property containing a reference', + type: 'object', + properties: { + prop: { + $ref: '#/components/schemas/ModelWithProperties', }, + }, } as const; export const $ModelWithArrayReadOnlyAndWriteOnly = { - description: 'This is a model with one property containing an array', - type: 'object', - properties: { - prop: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly', - }, - }, - propWithFile: { - type: 'array', - items: { - type: 'file', - }, - }, - propWithNumber: { - type: 'array', - items: { - type: 'number', - }, - }, + description: 'This is a model with one property containing an array', + type: 'object', + properties: { + prop: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithReadOnlyAndWriteOnly', + }, + }, + propWithFile: { + type: 'array', + items: { + type: 'file', + }, + }, + propWithNumber: { + type: 'array', + items: { + type: 'number', + }, }, + }, } as const; export const $ModelWithArray = { - description: 'This is a model with one property containing an array', - type: 'object', - properties: { - prop: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithString', - }, - }, - propWithFile: { - type: 'array', - items: { - type: 'file', - }, - }, - propWithNumber: { - type: 'array', - items: { - type: 'number', - }, - }, + description: 'This is a model with one property containing an array', + type: 'object', + properties: { + prop: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithString', + }, + }, + propWithFile: { + type: 'array', + items: { + type: 'file', + }, + }, + propWithNumber: { + type: 'array', + items: { + type: 'number', + }, }, + }, } as const; export const $ModelWithDictionary = { - description: 'This is a model with one property containing a dictionary', - type: 'object', - properties: { - prop: { - type: 'object', - additionalProperties: { - type: 'string', - }, - }, + description: 'This is a model with one property containing a dictionary', + type: 'object', + properties: { + prop: { + type: 'object', + additionalProperties: { + type: 'string', + }, }, + }, } as const; export const $DeprecatedModel = { - deprecated: true, - description: 'This is a deprecated model with a deprecated property', - type: 'object', - properties: { - prop: { - deprecated: true, - description: 'This is a deprecated property', - type: 'string', - }, + deprecated: true, + description: 'This is a deprecated model with a deprecated property', + type: 'object', + properties: { + prop: { + deprecated: true, + description: 'This is a deprecated property', + type: 'string', }, + }, } as const; export const $ModelWithCircularReference = { - description: 'This is a model with one property containing a circular reference', - type: 'object', - properties: { - prop: { - $ref: '#/components/schemas/ModelWithCircularReference', - }, + description: + 'This is a model with one property containing a circular reference', + type: 'object', + properties: { + prop: { + $ref: '#/components/schemas/ModelWithCircularReference', }, + }, } as const; export const $CompositionWithOneOf = { - description: "This is a model with one property with a 'one of' relationship", - type: 'object', - properties: { - propA: { - type: 'object', - oneOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'one of' relationship", + type: 'object', + properties: { + propA: { + type: 'object', + oneOf: [ + { + $ref: '#/components/schemas/ModelWithString', + }, + { + $ref: '#/components/schemas/ModelWithEnum', + }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', }, + ], }, + }, } as const; export const $CompositionWithOneOfAnonymous = { - description: "This is a model with one property with a 'one of' relationship where the options are not $ref", - type: 'object', - properties: { - propA: { - type: 'object', - oneOf: [ - { - description: 'Anonymous object type', - type: 'object', - properties: { - propA: { - type: 'string', - }, - }, - }, - { - description: 'Anonymous string type', - type: 'string', - }, - { - description: 'Anonymous integer type', - type: 'integer', - }, - ], + description: + "This is a model with one property with a 'one of' relationship where the options are not $ref", + type: 'object', + properties: { + propA: { + type: 'object', + oneOf: [ + { + description: 'Anonymous object type', + type: 'object', + properties: { + propA: { + type: 'string', + }, + }, + }, + { + description: 'Anonymous string type', + type: 'string', + }, + { + description: 'Anonymous integer type', + type: 'integer', }, + ], }, + }, } as const; export const $ModelCircle = { - description: 'Circle', - type: 'object', - required: ['kind'], - properties: { - kind: { - type: 'string', - }, - radius: { - type: 'number', - }, + description: 'Circle', + type: 'object', + required: ['kind'], + properties: { + kind: { + type: 'string', + }, + radius: { + type: 'number', }, + }, } as const; export const $ModelSquare = { - description: 'Square', - type: 'object', - required: ['kind'], - properties: { - kind: { - type: 'string', - }, - sideLength: { - type: 'number', - }, + description: 'Square', + type: 'object', + required: ['kind'], + properties: { + kind: { + type: 'string', + }, + sideLength: { + type: 'number', }, + }, } as const; export const $CompositionWithOneOfDiscriminator = { - description: "This is a model with one property with a 'one of' relationship where the options are not $ref", - type: 'object', - oneOf: [ + description: + "This is a model with one property with a 'one of' relationship where the options are not $ref", + type: 'object', + oneOf: [ + { + $ref: '#/components/schemas/ModelCircle', + }, + { + $ref: '#/components/schemas/ModelSquare', + }, + ], + discriminator: { + propertyName: 'kind', + mapping: { + circle: '#/components/schemas/ModelCircle', + square: '#/components/schemas/ModelSquare', + }, + }, +} as const; + +export const $CompositionWithAnyOf = { + description: "This is a model with one property with a 'any of' relationship", + type: 'object', + properties: { + propA: { + type: 'object', + anyOf: [ { - $ref: '#/components/schemas/ModelCircle', + $ref: '#/components/schemas/ModelWithString', }, { - $ref: '#/components/schemas/ModelSquare', + $ref: '#/components/schemas/ModelWithEnum', }, - ], - discriminator: { - propertyName: 'kind', - mapping: { - circle: '#/components/schemas/ModelCircle', - square: '#/components/schemas/ModelSquare', + { + $ref: '#/components/schemas/ModelWithArray', }, - }, -} as const; - -export const $CompositionWithAnyOf = { - description: "This is a model with one property with a 'any of' relationship", - type: 'object', - properties: { - propA: { - type: 'object', - anyOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + { + $ref: '#/components/schemas/ModelWithDictionary', }, + ], }, + }, } as const; export const $CompositionWithAnyOfAnonymous = { - description: "This is a model with one property with a 'any of' relationship where the options are not $ref", - type: 'object', - properties: { - propA: { - type: 'object', - anyOf: [ - { - description: 'Anonymous object type', - type: 'object', - properties: { - propA: { - type: 'string', - }, - }, - }, - { - description: 'Anonymous string type', - type: 'string', - }, - { - description: 'Anonymous integer type', - type: 'integer', - }, - ], + description: + "This is a model with one property with a 'any of' relationship where the options are not $ref", + type: 'object', + properties: { + propA: { + type: 'object', + anyOf: [ + { + description: 'Anonymous object type', + type: 'object', + properties: { + propA: { + type: 'string', + }, + }, }, + { + description: 'Anonymous string type', + type: 'string', + }, + { + description: 'Anonymous integer type', + type: 'integer', + }, + ], }, + }, } as const; export const $CompositionWithNestedAnyAndTypeNull = { - description: "This is a model with nested 'any of' property with a type null", - type: 'object', - properties: { - propA: { - type: 'object', + description: "This is a model with nested 'any of' property with a type null", + type: 'object', + properties: { + propA: { + type: 'object', + anyOf: [ + { + items: { anyOf: [ - { - items: { - anyOf: [ - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - { - type: 'null', - }, - ], - }, - type: 'array', - }, - { - items: { - anyOf: [ - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - type: 'null', - }, - ], - }, - type: 'array', - }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + { + type: 'null', + }, + ], + }, + type: 'array', + }, + { + items: { + anyOf: [ + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + type: 'null', + }, ], + }, + type: 'array', }, + ], }, + }, } as const; export const $Enum1 = { - enum: ['Bird', 'Dog'], - type: 'string', + enum: ['Bird', 'Dog'], + type: 'string', } as const; export const $ConstValue = { - type: 'string', - const: 'ConstValue', + type: 'string', + const: 'ConstValue', } as const; export const $CompositionWithNestedAnyOfAndNull = { - description: "This is a model with one property with a 'any of' relationship where the options are not $ref", - type: 'object', - properties: { - propA: { + description: + "This is a model with one property with a 'any of' relationship where the options are not $ref", + type: 'object', + properties: { + propA: { + anyOf: [ + { + items: { anyOf: [ - { - items: { - anyOf: [ - { - $ref: '#/components/schemas/Enum1', - }, - { - $ref: '#/components/schemas/ConstValue', - }, - ], - }, - type: 'array', - }, - { - type: 'null', - }, + { + $ref: '#/components/schemas/Enum1', + }, + { + $ref: '#/components/schemas/ConstValue', + }, ], - title: 'Scopes', + }, + type: 'array', + }, + { + type: 'null', }, + ], + title: 'Scopes', }, + }, } as const; export const $CompositionWithOneOfAndNullable = { - description: "This is a model with one property with a 'one of' relationship", - type: 'object', - properties: { - propA: { - nullable: true, - type: 'object', - oneOf: [ - { - type: 'object', - properties: { - boolean: { - type: 'boolean', - }, - }, - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'one of' relationship", + type: 'object', + properties: { + propA: { + nullable: true, + type: 'object', + oneOf: [ + { + type: 'object', + properties: { + boolean: { + type: 'boolean', + }, + }, }, + { + $ref: '#/components/schemas/ModelWithEnum', + }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + ], }, + }, } as const; export const $CompositionWithOneOfAndSimpleDictionary = { - description: 'This is a model that contains a simple dictionary within composition', - type: 'object', - properties: { - propA: { - oneOf: [ - { - type: 'boolean', - }, - { - type: 'object', - additionalProperties: { - type: 'number', - }, - }, - ], + description: + 'This is a model that contains a simple dictionary within composition', + type: 'object', + properties: { + propA: { + oneOf: [ + { + type: 'boolean', + }, + { + type: 'object', + additionalProperties: { + type: 'number', + }, }, + ], }, + }, } as const; export const $CompositionWithOneOfAndSimpleArrayDictionary = { - description: 'This is a model that contains a dictionary of simple arrays within composition', - type: 'object', - properties: { - propA: { - oneOf: [ - { - type: 'boolean', - }, - { - type: 'object', - additionalProperties: { - type: 'array', - items: { - type: 'boolean', - }, - }, - }, - ], + description: + 'This is a model that contains a dictionary of simple arrays within composition', + type: 'object', + properties: { + propA: { + oneOf: [ + { + type: 'boolean', + }, + { + type: 'object', + additionalProperties: { + type: 'array', + items: { + type: 'boolean', + }, + }, }, + ], }, + }, } as const; export const $CompositionWithOneOfAndComplexArrayDictionary = { - description: 'This is a model that contains a dictionary of complex arrays (composited) within composition', - type: 'object', - properties: { - propA: { - oneOf: [ + description: + 'This is a model that contains a dictionary of complex arrays (composited) within composition', + type: 'object', + properties: { + propA: { + oneOf: [ + { + type: 'boolean', + }, + { + type: 'object', + additionalProperties: { + type: 'array', + items: { + oneOf: [ { - type: 'boolean', + type: 'number', }, { - type: 'object', - additionalProperties: { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - }, + type: 'string', }, - ], + ], + }, + }, }, + ], }, + }, } as const; export const $CompositionWithAllOfAndNullable = { - description: "This is a model with one property with a 'all of' relationship", - type: 'object', - properties: { - propA: { - nullable: true, - type: 'object', - allOf: [ - { - type: 'object', - properties: { - boolean: { - type: 'boolean', - }, - }, - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'all of' relationship", + type: 'object', + properties: { + propA: { + nullable: true, + type: 'object', + allOf: [ + { + type: 'object', + properties: { + boolean: { + type: 'boolean', + }, + }, + }, + { + $ref: '#/components/schemas/ModelWithEnum', }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + ], }, + }, } as const; export const $CompositionWithAnyOfAndNullable = { - description: "This is a model with one property with a 'any of' relationship", - type: 'object', - properties: { - propA: { - nullable: true, - type: 'object', - anyOf: [ - { - type: 'object', - properties: { - boolean: { - type: 'boolean', - }, - }, - }, - { - $ref: '#/components/schemas/ModelWithEnum', - }, - { - $ref: '#/components/schemas/ModelWithArray', - }, - { - $ref: '#/components/schemas/ModelWithDictionary', - }, - ], + description: "This is a model with one property with a 'any of' relationship", + type: 'object', + properties: { + propA: { + nullable: true, + type: 'object', + anyOf: [ + { + type: 'object', + properties: { + boolean: { + type: 'boolean', + }, + }, }, + { + $ref: '#/components/schemas/ModelWithEnum', + }, + { + $ref: '#/components/schemas/ModelWithArray', + }, + { + $ref: '#/components/schemas/ModelWithDictionary', + }, + ], }, + }, } as const; export const $CompositionBaseModel = { - description: 'This is a base model with two simple optional properties', - type: 'object', - properties: { - firstName: { - type: 'string', - }, - lastname: { - type: 'string', - }, + description: 'This is a base model with two simple optional properties', + type: 'object', + properties: { + firstName: { + type: 'string', + }, + lastname: { + type: 'string', }, + }, } as const; export const $CompositionExtendedModel = { - description: 'This is a model that extends the base model', - type: 'object', - allOf: [ - { - $ref: '#/components/schemas/CompositionBaseModel', - }, - ], - properties: { - age: { - type: 'number', - }, + description: 'This is a model that extends the base model', + type: 'object', + allOf: [ + { + $ref: '#/components/schemas/CompositionBaseModel', + }, + ], + properties: { + age: { + type: 'number', }, - required: ['firstName', 'lastname', 'age'], + }, + required: ['firstName', 'lastname', 'age'], } as const; export const $ModelWithProperties = { - description: 'This is a model with one nested property', - type: 'object', - required: ['required', 'requiredAndReadOnly', 'requiredAndNullable'], - properties: { - required: { - type: 'string', - }, - requiredAndReadOnly: { - type: 'string', - readOnly: true, - }, - requiredAndNullable: { - type: 'string', - nullable: true, - }, - string: { - type: 'string', - }, - number: { - type: 'number', - }, - boolean: { - type: 'boolean', - }, - reference: { - $ref: '#/components/schemas/ModelWithString', - }, - 'property with space': { - type: 'string', - }, - default: { - type: 'string', - }, - try: { - type: 'string', - }, - '@namespace.string': { - type: 'string', - readOnly: true, - }, - '@namespace.integer': { - type: 'integer', - readOnly: true, - }, + description: 'This is a model with one nested property', + type: 'object', + required: ['required', 'requiredAndReadOnly', 'requiredAndNullable'], + properties: { + required: { + type: 'string', + }, + requiredAndReadOnly: { + type: 'string', + readOnly: true, + }, + requiredAndNullable: { + type: 'string', + nullable: true, + }, + string: { + type: 'string', }, + number: { + type: 'number', + }, + boolean: { + type: 'boolean', + }, + reference: { + $ref: '#/components/schemas/ModelWithString', + }, + 'property with space': { + type: 'string', + }, + default: { + type: 'string', + }, + try: { + type: 'string', + }, + '@namespace.string': { + type: 'string', + readOnly: true, + }, + '@namespace.integer': { + type: 'integer', + readOnly: true, + }, + }, } as const; export const $ModelWithNestedProperties = { - description: 'This is a model with one nested property', - type: 'object', - required: ['first'], - properties: { - first: { - type: 'object', - required: ['second'], - readOnly: true, - nullable: true, - properties: { - second: { - type: 'object', - required: ['third'], - readOnly: true, - nullable: true, - properties: { - third: { - type: 'string', - required: true, - readOnly: true, - nullable: true, - }, - }, - }, + description: 'This is a model with one nested property', + type: 'object', + required: ['first'], + properties: { + first: { + type: 'object', + required: ['second'], + readOnly: true, + nullable: true, + properties: { + second: { + type: 'object', + required: ['third'], + readOnly: true, + nullable: true, + properties: { + third: { + type: 'string', + required: true, + readOnly: true, + nullable: true, }, + }, }, + }, }, + }, } as const; export const $ModelWithDuplicateProperties = { - description: 'This is a model with duplicated properties', - type: 'object', - properties: { - prop: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a model with duplicated properties', + type: 'object', + properties: { + prop: { + $ref: '#/components/schemas/ModelWithString', }, + }, } as const; export const $ModelWithOrderedProperties = { - description: 'This is a model with ordered properties', - type: 'object', - properties: { - zebra: { - type: 'string', - }, - apple: { - type: 'string', - }, - hawaii: { - type: 'string', - }, + description: 'This is a model with ordered properties', + type: 'object', + properties: { + zebra: { + type: 'string', }, + apple: { + type: 'string', + }, + hawaii: { + type: 'string', + }, + }, } as const; export const $ModelWithDuplicateImports = { - description: 'This is a model with duplicated imports', - type: 'object', - properties: { - propA: { - $ref: '#/components/schemas/ModelWithString', - }, - propB: { - $ref: '#/components/schemas/ModelWithString', - }, - propC: { - $ref: '#/components/schemas/ModelWithString', - }, + description: 'This is a model with duplicated imports', + type: 'object', + properties: { + propA: { + $ref: '#/components/schemas/ModelWithString', }, -} as const; - -export const $ModelThatExtends = { - description: 'This is a model that extends another model', - type: 'object', - allOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - type: 'object', - properties: { - propExtendsA: { - type: 'string', - }, - propExtendsB: { - $ref: '#/components/schemas/ModelWithString', - }, - }, - }, - ], -} as const; - -export const $ModelThatExtendsExtends = { - description: 'This is a model that extends another model', - type: 'object', - allOf: [ - { - $ref: '#/components/schemas/ModelWithString', - }, - { - $ref: '#/components/schemas/ModelThatExtends', - }, - { - type: 'object', - properties: { - propExtendsC: { - type: 'string', - }, - propExtendsD: { - $ref: '#/components/schemas/ModelWithString', - }, - }, - }, - ], -} as const; - -export const $ModelWithPattern = { - description: 'This is a model that contains a some patterns', - type: 'object', - required: ['key', 'name'], - properties: { - key: { - maxLength: 64, - pattern: '^[a-zA-Z0-9_]*$', - type: 'string', - }, - name: { - maxLength: 255, - type: 'string', - }, - enabled: { - type: 'boolean', - readOnly: true, - }, - modified: { - type: 'string', - format: 'date-time', - readOnly: true, + propB: { + $ref: '#/components/schemas/ModelWithString', + }, + propC: { + $ref: '#/components/schemas/ModelWithString', + }, + }, +} as const; + +export const $ModelThatExtends = { + description: 'This is a model that extends another model', + type: 'object', + allOf: [ + { + $ref: '#/components/schemas/ModelWithString', + }, + { + type: 'object', + properties: { + propExtendsA: { + type: 'string', }, - id: { - type: 'string', - pattern: '^d{2}-d{3}-d{4}$', + propExtendsB: { + $ref: '#/components/schemas/ModelWithString', }, - text: { - type: 'string', - pattern: '^w+$', + }, + }, + ], +} as const; + +export const $ModelThatExtendsExtends = { + description: 'This is a model that extends another model', + type: 'object', + allOf: [ + { + $ref: '#/components/schemas/ModelWithString', + }, + { + $ref: '#/components/schemas/ModelThatExtends', + }, + { + type: 'object', + properties: { + propExtendsC: { + type: 'string', }, - patternWithSingleQuotes: { - type: 'string', - pattern: "^[a-zA-Z0-9']*$", + propExtendsD: { + $ref: '#/components/schemas/ModelWithString', }, - patternWithNewline: { - type: 'string', - pattern: `aaa + }, + }, + ], +} as const; + +export const $ModelWithPattern = { + description: 'This is a model that contains a some patterns', + type: 'object', + required: ['key', 'name'], + properties: { + key: { + maxLength: 64, + pattern: '^[a-zA-Z0-9_]*$', + type: 'string', + }, + name: { + maxLength: 255, + type: 'string', + }, + enabled: { + type: 'boolean', + readOnly: true, + }, + modified: { + type: 'string', + format: 'date-time', + readOnly: true, + }, + id: { + type: 'string', + pattern: '^d{2}-d{3}-d{4}$', + }, + text: { + type: 'string', + pattern: '^w+$', + }, + patternWithSingleQuotes: { + type: 'string', + pattern: "^[a-zA-Z0-9']*$", + }, + patternWithNewline: { + type: 'string', + pattern: `aaa bbb`, - }, - patternWithBacktick: { - type: 'string', - pattern: 'aaa`bbb', - }, }, + patternWithBacktick: { + type: 'string', + pattern: 'aaa`bbb', + }, + }, } as const; export const $File = { - required: ['mime'], - type: 'object', - properties: { - id: { - title: 'Id', - type: 'string', - readOnly: true, - minLength: 1, - }, - updated_at: { - title: 'Updated at', - type: 'string', - format: 'date-time', - readOnly: true, - }, - created_at: { - title: 'Created at', - type: 'string', - format: 'date-time', - readOnly: true, - }, - mime: { - title: 'Mime', - type: 'string', - maxLength: 24, - minLength: 1, - }, - file: { - title: 'File', - type: 'string', - readOnly: true, - format: 'uri', - }, - }, + required: ['mime'], + type: 'object', + properties: { + id: { + title: 'Id', + type: 'string', + readOnly: true, + minLength: 1, + }, + updated_at: { + title: 'Updated at', + type: 'string', + format: 'date-time', + readOnly: true, + }, + created_at: { + title: 'Created at', + type: 'string', + format: 'date-time', + readOnly: true, + }, + mime: { + title: 'Mime', + type: 'string', + maxLength: 24, + minLength: 1, + }, + file: { + title: 'File', + type: 'string', + readOnly: true, + format: 'uri', + }, + }, } as const; export const $default = { - type: 'object', - properties: { - name: { - type: 'string', - }, + type: 'object', + properties: { + name: { + type: 'string', }, + }, } as const; export const $Pageable = { - type: 'object', - properties: { - page: { - minimum: 0, - type: 'integer', - format: 'int32', - default: 0, - }, - size: { - minimum: 1, - type: 'integer', - format: 'int32', - }, - sort: { - type: 'array', - items: { - type: 'string', - }, - }, + type: 'object', + properties: { + page: { + minimum: 0, + type: 'integer', + format: 'int32', + default: 0, + }, + size: { + minimum: 1, + type: 'integer', + format: 'int32', + }, + sort: { + type: 'array', + items: { + type: 'string', + }, }, + }, } as const; export const $FreeFormObjectWithoutAdditionalProperties = { - description: 'This is a free-form object without additionalProperties.', - type: 'object', + description: 'This is a free-form object without additionalProperties.', + type: 'object', } as const; export const $FreeFormObjectWithAdditionalPropertiesEqTrue = { - description: 'This is a free-form object with additionalProperties: true.', - type: 'object', - additionalProperties: true, + description: 'This is a free-form object with additionalProperties: true.', + type: 'object', + additionalProperties: true, } as const; export const $FreeFormObjectWithAdditionalPropertiesEqEmptyObject = { - description: 'This is a free-form object with additionalProperties: {}.', - type: 'object', - additionalProperties: {}, + description: 'This is a free-form object with additionalProperties: {}.', + type: 'object', + additionalProperties: {}, } as const; export const $ModelWithConst = { - type: 'object', - properties: { - String: { - const: 'String', - }, - number: { - const: 0, - }, - null: { - const: null, - }, - withType: { - type: 'string', - const: 'Some string', - }, + type: 'object', + properties: { + String: { + const: 'String', + }, + number: { + const: 0, }, + null: { + const: null, + }, + withType: { + type: 'string', + const: 'Some string', + }, + }, } as const; export const $ModelWithAdditionalPropertiesEqTrue = { - description: 'This is a model with one property and additionalProperties: true', - type: 'object', - properties: { - prop: { - description: 'This is a simple string property', - type: 'string', - }, + description: + 'This is a model with one property and additionalProperties: true', + type: 'object', + properties: { + prop: { + description: 'This is a simple string property', + type: 'string', }, - additionalProperties: true, + }, + additionalProperties: true, } as const; export const $NestedAnyOfArraysNullable = { - properties: { - nullableArray: { + properties: { + nullableArray: { + anyOf: [ + { + items: { anyOf: [ - { - items: { - anyOf: [ - { - type: 'string', - }, - { - type: 'boolean', - }, - ], - }, - type: 'array', - }, - { - type: 'null', - }, + { + type: 'string', + }, + { + type: 'boolean', + }, ], + }, + type: 'array', + }, + { + type: 'null', }, + ], }, - type: 'object', + }, + type: 'object', } as const; export const $CompositionWithOneOfAndProperties = { - type: 'object', - oneOf: [ - { - type: 'object', - required: ['foo'], - properties: { - foo: { - $ref: '#/components/parameters/SimpleParameter', - }, - }, - additionalProperties: false, - }, - { - type: 'object', - required: ['bar'], - properties: { - bar: { - $ref: '#/components/schemas/NonAsciiString%C3%A6%C3%B8%C3%A5%C3%86%C3%98%C3%85%C3%B6%C3%B4%C3%AA%C3%8A%E5%AD%97%E7%AC%A6%E4%B8%B2', - }, - }, - additionalProperties: false, - }, - ], - required: ['baz', 'qux'], - properties: { - baz: { - type: 'integer', - format: 'uint16', - minimum: 0, - nullable: true, + type: 'object', + oneOf: [ + { + type: 'object', + required: ['foo'], + properties: { + foo: { + $ref: '#/components/parameters/SimpleParameter', }, - qux: { - type: 'integer', - format: 'uint8', - minimum: 0, + }, + additionalProperties: false, + }, + { + type: 'object', + required: ['bar'], + properties: { + bar: { + $ref: '#/components/schemas/NonAsciiString%C3%A6%C3%B8%C3%A5%C3%86%C3%98%C3%85%C3%B6%C3%B4%C3%AA%C3%8A%E5%AD%97%E7%AC%A6%E4%B8%B2', }, + }, + additionalProperties: false, + }, + ], + required: ['baz', 'qux'], + properties: { + baz: { + type: 'integer', + format: 'uint16', + minimum: 0, + nullable: true, }, + qux: { + type: 'integer', + format: 'uint8', + minimum: 0, + }, + }, } as const; export const $NullableObject = { - type: 'object', - nullable: true, - description: 'An object that can be null', - properties: { - foo: { - type: 'string', - }, + type: 'object', + nullable: true, + description: 'An object that can be null', + properties: { + foo: { + type: 'string', }, - default: null, + }, + default: null, } as const; export const $CharactersInDescription = { - type: 'string', - description: 'Some % character', + type: 'string', + description: 'Some % character', } as const; export const $ModelWithNullableObject = { - type: 'object', - properties: { - data: { - $ref: '#/components/schemas/NullableObject', - }, + type: 'object', + properties: { + data: { + $ref: '#/components/schemas/NullableObject', }, + }, } as const; export const $ModelWithOneOfEnum = { - oneOf: [ - { - type: 'object', - required: ['foo'], - properties: { - foo: { - type: 'string', - enum: ['Bar'], - }, - }, + oneOf: [ + { + type: 'object', + required: ['foo'], + properties: { + foo: { + type: 'string', + enum: ['Bar'], }, - { - type: 'object', - required: ['foo'], - properties: { - foo: { - type: 'string', - enum: ['Baz'], - }, - }, + }, + }, + { + type: 'object', + required: ['foo'], + properties: { + foo: { + type: 'string', + enum: ['Baz'], }, - { - type: 'object', - required: ['foo'], - properties: { - foo: { - type: 'string', - enum: ['Qux'], - }, - }, + }, + }, + { + type: 'object', + required: ['foo'], + properties: { + foo: { + type: 'string', + enum: ['Qux'], }, - { - type: 'object', - required: ['content', 'foo'], - properties: { - content: { - type: 'string', - format: 'date-time', - }, - foo: { - type: 'string', - enum: ['Quux'], - }, - }, + }, + }, + { + type: 'object', + required: ['content', 'foo'], + properties: { + content: { + type: 'string', + format: 'date-time', }, - { - type: 'object', - required: ['content', 'foo'], - properties: { - content: { - type: 'array', - items: [ - { - type: 'string', - format: 'date-time', - }, - { - type: 'string', - }, - ], - maxItems: 2, - minItems: 2, - }, - foo: { - type: 'string', - enum: ['Corge'], - }, + foo: { + type: 'string', + enum: ['Quux'], + }, + }, + }, + { + type: 'object', + required: ['content', 'foo'], + properties: { + content: { + type: 'array', + items: [ + { + type: 'string', + format: 'date-time', + }, + { + type: 'string', }, + ], + maxItems: 2, + minItems: 2, }, - ], + foo: { + type: 'string', + enum: ['Corge'], + }, + }, + }, + ], } as const; export const $ModelWithNestedArrayEnumsDataFoo = { - enum: ['foo', 'bar'], - type: 'string', + enum: ['foo', 'bar'], + type: 'string', } as const; export const $ModelWithNestedArrayEnumsDataBar = { - enum: ['baz', 'qux'], - type: 'string', + enum: ['baz', 'qux'], + type: 'string', } as const; export const $ModelWithNestedArrayEnumsData = { - type: 'object', - properties: { - foo: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', - }, - }, - bar: { - type: 'array', - items: { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar', - }, - }, + type: 'object', + properties: { + foo: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', + }, + }, + bar: { + type: 'array', + items: { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataBar', + }, }, + }, } as const; export const $ModelWithNestedArrayEnums = { - type: 'object', - properties: { - array_strings: { - type: 'array', - items: { - type: 'string', - }, - }, - data: { - allOf: [ - { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsData', - }, - ], + type: 'object', + properties: { + array_strings: { + type: 'array', + items: { + type: 'string', + }, + }, + data: { + allOf: [ + { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsData', }, + ], }, + }, } as const; export const $ModelWithNestedCompositionEnums = { - type: 'object', - properties: { - foo: { - allOf: [ - { - $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', - }, - ], + type: 'object', + properties: { + foo: { + allOf: [ + { + $ref: '#/components/schemas/ModelWithNestedArrayEnumsDataFoo', }, + ], }, + }, } as const; export const $ModelWithReadOnlyAndWriteOnly = { - type: 'object', - required: ['foo', 'bar', 'baz'], - properties: { - foo: { - type: 'string', - }, - bar: { - readOnly: true, - type: 'string', - }, - baz: { - type: 'string', - writeOnly: true, - }, + type: 'object', + required: ['foo', 'bar', 'baz'], + properties: { + foo: { + type: 'string', }, + bar: { + readOnly: true, + type: 'string', + }, + baz: { + type: 'string', + writeOnly: true, + }, + }, } as const; export const $ModelWithConstantSizeArray = { - type: 'array', - items: { - type: 'number', - }, - minItems: 2, - maxItems: 2, + type: 'array', + items: { + type: 'number', + }, + minItems: 2, + maxItems: 2, } as const; export const $ModelWithAnyOfConstantSizeArray = { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - minItems: 3, - maxItems: 3, + type: 'array', + items: { + oneOf: [ + { + type: 'number', + }, + { + type: 'string', + }, + ], + }, + minItems: 3, + maxItems: 3, } as const; export const $ModelWithAnyOfConstantSizeArrayNullable = { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - nullable: true, - }, - { - type: 'string', - }, - ], - }, - minItems: 3, - maxItems: 3, + type: 'array', + items: { + oneOf: [ + { + type: 'number', + nullable: true, + }, + { + type: 'string', + }, + ], + }, + minItems: 3, + maxItems: 3, } as const; export const $ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = { - type: 'array', - items: { - oneOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - minItems: 2, - maxItems: 2, + type: 'array', + items: { + oneOf: [ + { + type: 'number', + }, + { + type: 'string', + }, + ], + }, + minItems: 2, + maxItems: 2, } as const; export const $ModelWithAnyOfConstantSizeArrayAndIntersect = { - type: 'array', - items: { - allOf: [ - { - type: 'number', - }, - { - type: 'string', - }, - ], - }, - minItems: 2, - maxItems: 2, + type: 'array', + items: { + allOf: [ + { + type: 'number', + }, + { + type: 'string', + }, + ], + }, + minItems: 2, + maxItems: 2, } as const; export const $ModelWithNumericEnumUnion = { - type: 'object', - properties: { - value: { - type: 'number', - description: 'Период', - enum: [1, 3, 6, 12], - }, - }, + type: 'object', + properties: { + value: { + type: 'number', + description: 'Период', + enum: [1, 3, 6, 12], + }, + }, } as const; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiError.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiError.ts.snap index 2c11b4136..b821db3ef 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiError.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiError.ts.snap @@ -2,20 +2,24 @@ import type { ApiRequestOptions } from './ApiRequestOptions'; import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: unknown; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiRequestOptions.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiRequestOptions.ts.snap index e93003ee7..cb2727aff 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiRequestOptions.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiRequestOptions.ts.snap @@ -1,13 +1,20 @@ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | 'GET' + | 'PUT' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiResult.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiResult.ts.snap index caa79c2ea..05040ba81 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiResult.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/ApiResult.ts.snap @@ -1,7 +1,7 @@ export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; + readonly body: TData; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly url: string; }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/CancelablePromise.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/CancelablePromise.ts.snap index e6b03b6a2..f002b69e9 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/CancelablePromise.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/CancelablePromise.ts.snap @@ -1,126 +1,126 @@ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + 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; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): 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( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } + private _isResolved: boolean; + private _isRejected: boolean; + private _isCancelled: boolean; + readonly cancelHandlers: (() => void)[]; + readonly promise: Promise; + private _resolve?: (value: T | PromiseLike) => void; + private _reject?: (reason?: unknown) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: unknown) => void, + onCancel: OnCancel, + ) => void, + ) { + this._isResolved = false; + this._isRejected = false; + this._isCancelled = false; + this.cancelHandlers = []; + this.promise = new Promise((resolve, reject) => { + this._resolve = resolve; + this._reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isResolved = true; + if (this._resolve) this._resolve(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } + const onReject = (reason?: unknown): void => { + if (this._isResolved || this._isRejected || this._isCancelled) { + return; + } + this._isRejected = true; + if (this._reject) this._reject(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this._isResolved || this._isRejected || this._isCancelled) { - return; + 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.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( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null, + ): Promise { + return this.promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: unknown) => TResult | PromiseLike) | null, + ): Promise { + return this.promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + 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(); } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } + this.cancelHandlers.length = 0; + if (this._reject) this._reject(new CancelError('Request aborted')); + } - public get isCancelled(): boolean { - return this._isCancelled; - } + public get isCancelled(): boolean { + return this._isCancelled; + } } diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/OpenAPI.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/OpenAPI.ts.snap index 3dc4008ac..3b8ff6278 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/OpenAPI.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/OpenAPI.ts.snap @@ -5,46 +5,49 @@ type Middleware = (value: T) => T | Promise; type Resolver = (options: ApiRequestOptions) => Promise; export class Interceptors { - _fns: Middleware[]; + _fns: Middleware[]; - constructor() { - this._fns = []; - } + constructor() { + this._fns = []; + } - eject(fn: Middleware) { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } + eject(fn: Middleware) { + const index = this._fns.indexOf(fn); + if (index !== -1) { + this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; } + } - use(fn: Middleware) { - this._fns = [...this._fns, fn]; - } + use(fn: Middleware) { + this._fns = [...this._fns, fn]; + } } export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { request: Interceptors; response: Interceptors }; + BASE: string; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + ENCODE_PATH?: ((path: string) => string) | undefined; + HEADERS?: Headers | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + VERSION: string; + WITH_CREDENTIALS: boolean; + interceptors: { + request: Interceptors; + response: Interceptors; + }; }; export const OpenAPI: OpenAPIConfig = { - BASE: 'http://localhost:3000/base', - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: undefined, - USERNAME: undefined, - VERSION: '1.0', - WITH_CREDENTIALS: false, - interceptors: { request: new Interceptors(), response: new Interceptors() }, + BASE: 'http://localhost:3000/base', + CREDENTIALS: 'include', + ENCODE_PATH: undefined, + HEADERS: undefined, + PASSWORD: undefined, + TOKEN: undefined, + USERNAME: undefined, + VERSION: '1.0', + WITH_CREDENTIALS: false, + interceptors: { request: new Interceptors(), response: new Interceptors() }, }; diff --git a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/request.ts.snap b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/request.ts.snap index a13dfd84e..07fbad30c 100644 --- a/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/request.ts.snap +++ b/packages/openapi-ts/test/__snapshots__/test/generated/v3_xhr/core/request.ts.snap @@ -6,298 +6,322 @@ import type { OnCancel } from './CancelablePromise'; import type { OpenAPIConfig } from './OpenAPI'; export const isString = (value: unknown): value is string => { - return typeof value === 'string'; + return typeof value === 'string'; }; export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; + return value instanceof Blob; }; export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const isSuccess = (status: number): boolean => { - return status >= 200 && status < 300; + return status >= 200 && status < 300; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: unknown) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } + 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); - } - }; + 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]) => encodePair(key, value)); + Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - return qs.length ? `?${qs.join('&')}` : ''; + return qs.length ? `?${qs.join('&')}` : ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); + + const url = config.BASE + path; + return options.query ? url + getQueryString(options.query) : url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); + + const process = (key: string, value: unknown) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + Object.entries(options.formData) + .filter(([, value]) => value !== undefined && value !== null) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - 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, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record - ); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + 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, + }) + .filter(([, value]) => value !== undefined && value !== null) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; + } + + if (options.body !== undefined) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; } + } - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if ( + options.mediaType?.includes('application/json') || + options.mediaType?.includes('+json') + ) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - let xhr = new XMLHttpRequest(); - xhr.open(options.method, url, true); - xhr.withCredentials = config.WITH_CREDENTIALS; + let xhr = new XMLHttpRequest(); + xhr.open(options.method, url, true); + xhr.withCredentials = config.WITH_CREDENTIALS; - headers.forEach((value, key) => { - xhr.setRequestHeader(key, value); - }); + headers.forEach((value, key) => { + xhr.setRequestHeader(key, value); + }); - return new Promise(async (resolve, reject) => { - xhr.onload = () => resolve(xhr); - xhr.onabort = () => reject(new Error('Request aborted')); - xhr.onerror = () => reject(new Error('Network error')); + return new Promise(async (resolve, reject) => { + xhr.onload = () => resolve(xhr); + xhr.onabort = () => reject(new Error('Request aborted')); + xhr.onerror = () => reject(new Error('Network error')); - for (const fn of config.interceptors.request._fns) { - xhr = await fn(xhr); - } + for (const fn of config.interceptors.request._fns) { + xhr = await fn(xhr); + } - xhr.send(body ?? formData); + xhr.send(body ?? formData); - onCancel(() => xhr.abort()); - }); + onCancel(() => xhr.abort()); + }); }; -export const getResponseHeader = (xhr: XMLHttpRequest, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = xhr.getResponseHeader(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + xhr: XMLHttpRequest, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = xhr.getResponseHeader(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = (xhr: XMLHttpRequest): unknown => { - if (xhr.status !== 204) { - try { - const contentType = xhr.getResponseHeader('Content-Type'); - if (contentType) { - if (contentType.includes('application/json') || contentType.includes('+json')) { - return JSON.parse(xhr.responseText); - } else { - return xhr.responseText; - } - } - } catch (error) { - console.error(error); + if (xhr.status !== 204) { + try { + const contentType = xhr.getResponseHeader('Content-Type'); + if (contentType) { + if ( + contentType.includes('application/json') || + contentType.includes('+json') + ) { + return JSON.parse(xhr.responseText); + } else { + return xhr.responseText; } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 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) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - 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}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 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) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + 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}`, + ); + } }; /** @@ -307,38 +331,52 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: isSuccess(response.status), - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + let response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + + for (const fn of config.interceptors.response._fns) { + response = await fn(response); } - }); + + const responseBody = getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: isSuccess(response.status), + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/packages/openapi-ts/test/bin.spec.ts b/packages/openapi-ts/test/bin.spec.ts index aef594d7c..0b441957a 100755 --- a/packages/openapi-ts/test/bin.spec.ts +++ b/packages/openapi-ts/test/bin.spec.ts @@ -1,5 +1,5 @@ -import { sync } from 'cross-spawn' -import { describe, expect, it } from 'vitest' +import { sync } from 'cross-spawn'; +import { describe, expect, it } from 'vitest'; describe('bin', () => { it('supports required parameters', () => { @@ -10,12 +10,12 @@ describe('bin', () => { '--output', './test/generated/bin', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).not.toContain('Prettier') - expect(result.stdout.toString()).toContain('Done!') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).not.toContain('Prettier'); + expect(result.stdout.toString()).toContain('Done!'); + expect(result.stderr.toString()).toBe(''); + }); it('generates angular client', () => { const result = sync('node', [ @@ -27,11 +27,11 @@ describe('bin', () => { '--client', 'angular', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain('') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).toContain(''); + expect(result.stderr.toString()).toBe(''); + }); it('generates axios client', () => { const result = sync('node', [ @@ -43,11 +43,11 @@ describe('bin', () => { '--client', 'axios', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain('') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).toContain(''); + expect(result.stderr.toString()).toBe(''); + }); it('generates fetch client', () => { const result = sync('node', [ @@ -59,11 +59,11 @@ describe('bin', () => { '--client', 'fetch', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain('') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).toContain(''); + expect(result.stderr.toString()).toBe(''); + }); it('generates node client', () => { const result = sync('node', [ @@ -75,11 +75,11 @@ describe('bin', () => { '--client', 'node', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain('') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).toContain(''); + expect(result.stderr.toString()).toBe(''); + }); it('generates xhr client', () => { const result = sync('node', [ @@ -91,11 +91,11 @@ describe('bin', () => { '--client', 'xhr', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain('') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).toContain(''); + expect(result.stderr.toString()).toBe(''); + }); it('supports all parameters', () => { const result = sync('node', [ @@ -116,11 +116,11 @@ describe('bin', () => { '--schemas', 'true', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain('Done!') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).toContain('Done!'); + expect(result.stderr.toString()).toBe(''); + }); it('supports regexp parameters', () => { const result = sync('node', [ @@ -134,11 +134,11 @@ describe('bin', () => { '--types', '^(Simple|Types)', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain('Done!') - expect(result.stderr.toString()).toBe('') - }) + 'true', + ]); + expect(result.stdout.toString()).toContain('Done!'); + expect(result.stderr.toString()).toBe(''); + }); it('formats output with Prettier', () => { const result = sync('node', [ @@ -146,11 +146,11 @@ describe('bin', () => { '--input', './test/spec/v3.json', '--output', - './test/generated/bin' - ]) - expect(result.stdout.toString()).toContain('Prettier') - expect(result.stderr.toString()).toBe('') - }) + './test/generated/bin', + ]); + expect(result.stdout.toString()).toContain('Prettier'); + expect(result.stderr.toString()).toBe(''); + }); it('lints output with ESLint', () => { const result = sync('node', [ @@ -159,17 +159,17 @@ describe('bin', () => { './test/spec/v3.json', '--output', './test/generated/bin', - '--lint' - ]) - expect(result.stdout.toString()).toContain('ESLint') - expect(result.stderr.toString()).toBe('') - }) + '--lint', + ]); + expect(result.stdout.toString()).toContain('ESLint'); + expect(result.stderr.toString()).toBe(''); + }); it('throws error without parameters', () => { - const result = sync('node', ['./bin/index.cjs', '--dry-run', 'true']) - expect(result.stdout.toString()).toBe('') - expect(result.stderr.toString()).toContain('Unexpected error occurred') - }) + const result = sync('node', ['./bin/index.cjs', '--dry-run', 'true']); + expect(result.stdout.toString()).toBe(''); + expect(result.stderr.toString()).toContain('Unexpected error occurred'); + }); it('throws error with wrong parameters', () => { const result = sync('node', [ @@ -180,27 +180,27 @@ describe('bin', () => { './test/generated/bin', '--unknown', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toBe('') + 'true', + ]); + expect(result.stdout.toString()).toBe(''); expect(result.stderr.toString()).toContain( - `error: unknown option '--unknown'` - ) - }) + `error: unknown option '--unknown'`, + ); + }); it('displays help', () => { const result = sync('node', [ './bin/index.cjs', '--help', '--dry-run', - 'true' - ]) - expect(result.stdout.toString()).toContain(`Usage: openapi-ts [options]`) - expect(result.stdout.toString()).toContain(`-i, --input `) - expect(result.stdout.toString()).toContain(`-o, --output `) - expect(result.stderr.toString()).toBe('') - }) -}) + 'true', + ]); + expect(result.stdout.toString()).toContain(`Usage: openapi-ts [options]`); + expect(result.stdout.toString()).toContain(`-i, --input `); + expect(result.stdout.toString()).toContain(`-o, --output `); + expect(result.stderr.toString()).toBe(''); + }); +}); describe('cli', () => { it('handles false booleans', () => { @@ -230,20 +230,20 @@ describe('cli', () => { '--useOptions', 'false', '--dry-run', - 'true' - ]) - expect(result.stderr.toString()).toContain('debug: true') - expect(result.stderr.toString()).toContain('dryRun: true') - expect(result.stderr.toString()).toContain('exportCore: false') - expect(result.stderr.toString()).toContain('types: false') - expect(result.stderr.toString()).toContain('exportServices: false') - expect(result.stderr.toString()).toContain('format: false') - expect(result.stderr.toString()).toContain('lint: false') - expect(result.stderr.toString()).toContain('operationId: false') - expect(result.stderr.toString()).toContain('schemas: false') - expect(result.stderr.toString()).toContain('useDateType: false') - expect(result.stderr.toString()).toContain('useOptions: false') - }) + 'true', + ]); + expect(result.stderr.toString()).toContain('debug: true'); + expect(result.stderr.toString()).toContain('dryRun: true'); + expect(result.stderr.toString()).toContain('exportCore: false'); + expect(result.stderr.toString()).toContain('types: false'); + expect(result.stderr.toString()).toContain('exportServices: false'); + expect(result.stderr.toString()).toContain('format: false'); + expect(result.stderr.toString()).toContain('lint: false'); + expect(result.stderr.toString()).toContain('operationId: false'); + expect(result.stderr.toString()).toContain('schemas: false'); + expect(result.stderr.toString()).toContain('useDateType: false'); + expect(result.stderr.toString()).toContain('useOptions: false'); + }); it('handles true booleans', () => { const result = sync('node', [ @@ -272,20 +272,20 @@ describe('cli', () => { '--useOptions', 'true', '--dry-run', - 'true' - ]) - expect(result.stderr.toString()).toContain('debug: true') - expect(result.stderr.toString()).toContain('dryRun: true') - expect(result.stderr.toString()).toContain('exportCore: true') - expect(result.stderr.toString()).toContain('types: true') - expect(result.stderr.toString()).toContain('exportServices: true') - expect(result.stderr.toString()).toContain('format: true') - expect(result.stderr.toString()).toContain('lint: true') - expect(result.stderr.toString()).toContain('operationId: true') - expect(result.stderr.toString()).toContain('schemas: true') - expect(result.stderr.toString()).toContain('useDateType: true') - expect(result.stderr.toString()).toContain('useOptions: true') - }) + 'true', + ]); + expect(result.stderr.toString()).toContain('debug: true'); + expect(result.stderr.toString()).toContain('dryRun: true'); + expect(result.stderr.toString()).toContain('exportCore: true'); + expect(result.stderr.toString()).toContain('types: true'); + expect(result.stderr.toString()).toContain('exportServices: true'); + expect(result.stderr.toString()).toContain('format: true'); + expect(result.stderr.toString()).toContain('lint: true'); + expect(result.stderr.toString()).toContain('operationId: true'); + expect(result.stderr.toString()).toContain('schemas: true'); + expect(result.stderr.toString()).toContain('useDateType: true'); + expect(result.stderr.toString()).toContain('useOptions: true'); + }); it('handles optional booleans', () => { const result = sync('node', [ @@ -307,18 +307,18 @@ describe('cli', () => { '--useDateType', '--useOptions', '--dry-run', - 'true' - ]) - expect(result.stderr.toString()).toContain('debug: true') - expect(result.stderr.toString()).toContain('dryRun: true') - expect(result.stderr.toString()).toContain('exportCore: true') - expect(result.stderr.toString()).toContain('format: true') - expect(result.stderr.toString()).toContain('lint: true') - expect(result.stderr.toString()).toContain('operationId: true') - expect(result.stderr.toString()).toContain('schemas: true') - expect(result.stderr.toString()).toContain('useDateType: true') - expect(result.stderr.toString()).toContain('useOptions: true') - expect(result.stderr.toString()).toContain("types: 'foo") - expect(result.stderr.toString()).toContain("exportServices: 'bar'") - }) -}) + 'true', + ]); + expect(result.stderr.toString()).toContain('debug: true'); + expect(result.stderr.toString()).toContain('dryRun: true'); + expect(result.stderr.toString()).toContain('exportCore: true'); + expect(result.stderr.toString()).toContain('format: true'); + expect(result.stderr.toString()).toContain('lint: true'); + expect(result.stderr.toString()).toContain('operationId: true'); + expect(result.stderr.toString()).toContain('schemas: true'); + expect(result.stderr.toString()).toContain('useDateType: true'); + expect(result.stderr.toString()).toContain('useOptions: true'); + expect(result.stderr.toString()).toContain("types: 'foo"); + expect(result.stderr.toString()).toContain("exportServices: 'bar'"); + }); +}); diff --git a/packages/openapi-ts/test/custom/request.ts b/packages/openapi-ts/test/custom/request.ts index 3a78bc6c6..960033745 100644 --- a/packages/openapi-ts/test/custom/request.ts +++ b/packages/openapi-ts/test/custom/request.ts @@ -1,36 +1,36 @@ -import type { ApiRequestOptions } from './ApiRequestOptions' -import { CancelablePromise } from './CancelablePromise' -import type { OpenAPIConfig } from './OpenAPI' +import type { ApiRequestOptions } from './ApiRequestOptions'; +import { CancelablePromise } from './CancelablePromise'; +import type { OpenAPIConfig } from './OpenAPI'; export const request = ( config: OpenAPIConfig, - options: ApiRequestOptions + options: ApiRequestOptions, ): CancelablePromise => new CancelablePromise((resolve, reject, onCancel) => { const url = `${config.BASE}${options.path}`.replace( '{api-version}', - config.VERSION - ) + config.VERSION, + ); try { // Do your request... const timeout = setTimeout(() => { resolve({ body: { - ...options + ...options, }, ok: true, status: 200, statusText: 'dummy', - url - }) - }, 500) + url, + }); + }, 500); // Cancel your request... onCancel(() => { - clearTimeout(timeout) - }) + clearTimeout(timeout); + }); } catch (e) { - reject(e) + reject(e); } - }) + }); diff --git a/packages/openapi-ts/test/index.spec.ts b/packages/openapi-ts/test/index.spec.ts index 33c9bc533..0c3a97f19 100644 --- a/packages/openapi-ts/test/index.spec.ts +++ b/packages/openapi-ts/test/index.spec.ts @@ -1,19 +1,19 @@ -import { readFileSync } from 'node:fs' +import { readFileSync } from 'node:fs'; -import { sync } from 'glob' -import { describe, expect, it } from 'vitest' +import { sync } from 'glob'; +import { describe, expect, it } from 'vitest'; -import { createClient } from '../' -import type { UserConfig } from '../src/types/config' +import { createClient } from '../'; +import type { UserConfig } from '../src/types/config'; -const V2_SPEC_PATH = './test/spec/v2.json' -const V3_SPEC_PATH = './test/spec/v3.json' +const V2_SPEC_PATH = './test/spec/v2.json'; +const V3_SPEC_PATH = './test/spec/v3.json'; -const OUTPUT_PREFIX = './test/generated/' +const OUTPUT_PREFIX = './test/generated/'; -const toOutputPath = (name: string) => `${OUTPUT_PREFIX}${name}/` +const toOutputPath = (name: string) => `${OUTPUT_PREFIX}${name}/`; const toSnapshotPath = (file: string) => - `./__snapshots__/${file.replace(OUTPUT_PREFIX, '')}.snap` + `./__snapshots__/${file.replace(OUTPUT_PREFIX, '')}.snap`; describe('OpenAPI v2', () => { it.each([ @@ -27,181 +27,194 @@ describe('OpenAPI v2', () => { output: '', schemas: true, types: true, - useOptions: true + useOptions: true, } as UserConfig, description: 'generate fetch client', - name: 'v2' - } + name: 'v2', + }, ])('$description', async ({ name, config }) => { - const output = toOutputPath(name) + const output = toOutputPath(name); await createClient({ ...config, input: V2_SPEC_PATH, - output - }) - sync(`${output}**/*.ts`).forEach(file => { - const content = readFileSync(file, 'utf8').toString() - expect(content).toMatchFileSnapshot(toSnapshotPath(file)) - }) - }) -}) + output, + }); + sync(`${output}**/*.ts`).forEach((file) => { + const content = readFileSync(file, 'utf8').toString(); + expect(content).toMatchFileSnapshot(toSnapshotPath(file)); + }); + }); +}); - it.each([ - { - config: { - ...config, - }, - description: 'generate fetch client', - name: 'v3', - }, - { - config: { - ...config, - client: 'angular', - enums: false, - schemas: false, - } as UserConfig, - description: 'generate angular client', - name: 'v3_angular', - }, - { - config: { - ...config, - client: 'node', - enums: false, - exportServices: false, - schemas: false, - types: false, - } as UserConfig, - description: 'generate node client', - name: 'v3_node', - }, - { - config: { - ...config, - client: 'axios', - enums: false, - exportServices: false, - schemas: false, - types: false, - } as UserConfig, - description: 'generate axios client', - name: 'v3_axios', - }, - { - config: { - ...config, - client: 'xhr', - enums: false, - exportServices: false, - schemas: false, - types: false, - } as UserConfig, - description: 'generate xhr client', - name: 'v3_xhr', - }, - { - config: { - ...config, - exportCore: false, - exportServices: false, - schemas: false, - types: '^ModelWithPattern', - useDateType: true, - } as UserConfig, - description: 'generate Date types', - name: 'v3_date', - }, - { - config: { - ...config, - exportServices: '^Defaults', - schemas: false, - types: '^ModelWithString', - useDateType: true, - useOptions: false, - } as UserConfig, - description: 'generate legacy positional arguments', - name: 'v3_legacy_positional_args', - }, - { - config: { - ...config, - exportServices: '^Defaults', - schemas: false, - types: '^ModelWithString', - useDateType: true, - } as UserConfig, - description: 'generate optional arguments', - name: 'v3_options', - }, - { - config: { - ...config, - name: 'ApiClient', - schemas: false, - useDateType: true, - } as UserConfig, - description: 'generate client', - name: 'v3_client', - }, - { - config: { - ...config, - enums: 'typescript', - schemas: false, - } as UserConfig, - description: 'generate TypeScript enums', - name: 'v3_enums_typescript', - }, - { - config: { - ...config, - enums: false, - exportCore: false, - exportServices: false, - schemas: false, - } as UserConfig, - description: 'generate models', - name: 'v3_models', - }, - { - config: { - ...config, - enums: false, - exportCore: false, - exportServices: false, - schemas: false, - types: { - include: '^(camelCaseCommentWithBreaks|ArrayWithProperties)', - name: 'PascalCase', - }, - } as UserConfig, - description: 'generate pascalcase types', - name: 'v3_pascalcase', - }, - { - config: { - ...config, - enums: false, - exportCore: false, - exportServices: false, - schemas: true, - types: false, - } as UserConfig, - description: 'generate JSON Schemas', - name: 'v3_schemas_json', +describe('OpenAPI v3', () => { + const config: UserConfig = { + client: 'fetch', + enums: 'javascript', + exportCore: true, + exportServices: true, + input: '', + output: '', + schemas: true, + types: true, + useOptions: true, + }; + + it.each([ + { + config: { + ...config, + }, + description: 'generate fetch client', + name: 'v3', + }, + { + config: { + ...config, + client: 'angular', + enums: false, + schemas: false, + } as UserConfig, + description: 'generate angular client', + name: 'v3_angular', + }, + { + config: { + ...config, + client: 'node', + enums: false, + exportServices: false, + schemas: false, + types: false, + } as UserConfig, + description: 'generate node client', + name: 'v3_node', + }, + { + config: { + ...config, + client: 'axios', + enums: false, + exportServices: false, + schemas: false, + types: false, + } as UserConfig, + description: 'generate axios client', + name: 'v3_axios', + }, + { + config: { + ...config, + client: 'xhr', + enums: false, + exportServices: false, + schemas: false, + types: false, + } as UserConfig, + description: 'generate xhr client', + name: 'v3_xhr', + }, + { + config: { + ...config, + exportCore: false, + exportServices: false, + schemas: false, + types: '^ModelWithPattern', + useDateType: true, + } as UserConfig, + description: 'generate Date types', + name: 'v3_date', + }, + { + config: { + ...config, + exportServices: '^Defaults', + schemas: false, + types: '^ModelWithString', + useDateType: true, + useOptions: false, + } as UserConfig, + description: 'generate legacy positional arguments', + name: 'v3_legacy_positional_args', + }, + { + config: { + ...config, + exportServices: '^Defaults', + schemas: false, + types: '^ModelWithString', + useDateType: true, + } as UserConfig, + description: 'generate optional arguments', + name: 'v3_options', + }, + { + config: { + ...config, + name: 'ApiClient', + schemas: false, + useDateType: true, + } as UserConfig, + description: 'generate client', + name: 'v3_client', + }, + { + config: { + ...config, + enums: 'typescript', + schemas: false, + } as UserConfig, + description: 'generate TypeScript enums', + name: 'v3_enums_typescript', + }, + { + config: { + ...config, + enums: false, + exportCore: false, + exportServices: false, + schemas: false, + } as UserConfig, + description: 'generate models', + name: 'v3_models', + }, + { + config: { + ...config, + enums: false, + exportCore: false, + exportServices: false, + schemas: false, + types: { + include: '^(camelCaseCommentWithBreaks|ArrayWithProperties)', + name: 'PascalCase', }, - ])('$description', async ({ name, config }) => { - const output = toOutputPath(name); - await createClient({ - ...config, - input: V3_SPEC_PATH, - output, - }); - sync(`${output}**/*.ts`).forEach(file => { - const content = readFileSync(file, 'utf8').toString(); - expect(content).toMatchFileSnapshot(toSnapshotPath(file)); - }); + } as UserConfig, + description: 'generate pascalcase types', + name: 'v3_pascalcase', + }, + { + config: { + ...config, + enums: false, + exportCore: false, + exportServices: false, + schemas: true, + types: false, + } as UserConfig, + description: 'generate JSON Schemas', + name: 'v3_schemas_json', + }, + ])('$description', async ({ name, config }) => { + const output = toOutputPath(name); + await createClient({ + ...config, + input: V3_SPEC_PATH, + output, + }); + sync(`${output}**/*.ts`).forEach((file) => { + const content = readFileSync(file, 'utf8').toString(); + expect(content).toMatchFileSnapshot(toSnapshotPath(file)); }); + }); }); diff --git a/packages/openapi-ts/test/sample.cjs b/packages/openapi-ts/test/sample.cjs index e218350a8..9b5d8c370 100644 --- a/packages/openapi-ts/test/sample.cjs +++ b/packages/openapi-ts/test/sample.cjs @@ -1,4 +1,4 @@ -const path = require('node:path') +const path = require('node:path'); const main = async () => { /** @type {import('../src/node/index').UserConfig} */ @@ -6,13 +6,13 @@ const main = async () => { client: 'fetch', enums: 'javascript', input: './test/spec/v3.json', - output: './test/generated/v3/' - } + output: './test/generated/v3/', + }; const { createClient } = await import( path.resolve(process.cwd(), 'dist/index.js') - ) - await createClient(config) -} + ); + await createClient(config); +}; -main() +main(); diff --git a/packages/openapi-ts/test/spec/v3.json b/packages/openapi-ts/test/spec/v3.json index 678d20ddc..eb2f5e500 100644 --- a/packages/openapi-ts/test/spec/v3.json +++ b/packages/openapi-ts/test/spec/v3.json @@ -1,2221 +1,27 @@ { - "openapi": "3.0.0", - "info": { - "title": "swagger", - "version": "v1.0" - }, - "servers": [ - { - "url": "http://localhost:3000/base" - } - ], - "paths": { - "/api/v{api-version}/no-tag": { - "tags": [], - "get": { - "operationId": "ServiceWithEmptyTag" - }, - "post": { - "operationId": "PostServiceWithEmptyTag", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ModelWithReadOnlyAndWriteOnly" - }, - { - "$ref": "#/components/schemas/ModelWithArrayReadOnlyAndWriteOnly" - } - ] - } - } - } - }, - "responses": { - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithReadOnlyAndWriteOnly" - } - } - } - } - } - } - }, - "/api/v{api-version}/simple/$count": { - "get": { - "tags": ["Simple"], - "operationId": "api/v{version}/ODataController/$count", - "responses": { - "200": { - "description": "Success", - "content": { - "application/json; type=collection": { - "schema": { - "$ref": "#/components/schemas/Model-From.Zendesk" - } - } - } - } - } - } - }, - "/api/v{api-version}/simple": { - "get": { - "tags": ["Simple"], - "operationId": "GetCallWithoutParametersAndResponse" - }, - "put": { - "tags": ["Simple"], - "operationId": "PutCallWithoutParametersAndResponse" - }, - "post": { - "tags": ["Simple"], - "operationId": "PostCallWithoutParametersAndResponse" - }, - "delete": { - "tags": ["Simple"], - "operationId": "DeleteCallWithoutParametersAndResponse" - }, - "options": { - "tags": ["Simple"], - "operationId": "OptionsCallWithoutParametersAndResponse" - }, - "head": { - "tags": ["Simple"], - "operationId": "HeadCallWithoutParametersAndResponse" - }, - "patch": { - "tags": ["Simple"], - "operationId": "PatchCallWithoutParametersAndResponse" - } - }, - "/api/v{api-version}/foo/{foo}/bar/{bar}": { - "delete": { - "tags": ["Parameters"], - "operationId": "deleteFoo", - "parameters": [ - { - "description": "foo in method", - "in": "path", - "name": "foo", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "bar in method", - "in": "path", - "name": "bar", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "parameters": [ - { - "description": "foo in global parameters", - "in": "path", - "name": "foo", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "bar in global parameters", - "in": "path", - "name": "bar", - "required": true, - "schema": { - "type": "string" - } - } - ] - }, - "/api/v{api-version}/descriptions/": { - "post": { - "tags": ["Descriptions"], - "operationId": "CallWithDescriptions", - "parameters": [ - { - "description": "Testing multiline comments in string: First line\nSecond line\n\nFourth line", - "name": "parameterWithBreaks", - "in": "query", - "type": "string" - }, - { - "description": "Testing backticks in string: `backticks` and ```multiple backticks``` should work", - "name": "parameterWithBackticks", - "in": "query", - "type": "string" - }, - { - "description": "Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work", - "name": "parameterWithSlashes", - "in": "query", - "type": "string" - }, - { - "description": "Testing expression placeholders in string: ${expression} should work", - "name": "parameterWithExpressionPlaceholders", - "in": "query", - "type": "string" - }, - { - "description": "Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work", - "name": "parameterWithQuotes", - "in": "query", - "type": "string" - }, - { - "description": "Testing reserved characters in string: /* inline */ and /** inline **/ should work", - "name": "parameterWithReservedCharacters", - "in": "query", - "type": "string" - } - ] - } - }, - "/api/v{api-version}/parameters/deprecated": { - "post": { - "tags": ["Deprecated"], - "deprecated": true, - "operationId": "DeprecatedCall", - "parameters": [ - { - "deprecated": true, - "description": "This parameter is deprecated", - "name": "parameter", - "in": "header", - "required": true, - "nullable": true, - "schema": { - "$ref": "#/components/schemas/DeprecatedModel" - } - } - ] - } - }, - "/api/v{api-version}/parameters/{parameterPath}": { - "post": { - "tags": ["Parameters"], - "operationId": "CallWithParameters", - "parameters": [ - { - "description": "This is the parameter that goes into the header", - "name": "parameterHeader", - "in": "header", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "required": false, - "schema": { - "$ref": "#/components/schemas/ModelWithNestedArrayEnumsDataFoo" - }, - "name": "foo_ref_enum", - "in": "query" - }, - { - "required": true, - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelWithNestedArrayEnumsDataFoo" - } - ] - }, - "name": "foo_all_of_enum", - "in": "query" - }, - { - "description": "This is the parameter that goes into the query params", - "name": "parameterQuery", - "in": "query", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the form data", - "name": "parameterForm", - "in": "formData", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the cookie", - "name": "parameterCookie", - "in": "cookie", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the path", - "name": "parameterPath", - "in": "path", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "path", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "This is the parameter that goes into the body", - "required": true, - "nullable": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - } - }, - "/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}": { - "post": { - "tags": ["Parameters"], - "operationId": "CallWithWeirdParameterNames", - "parameters": [ - { - "description": "This is the parameter that goes into the path", - "name": "parameter.path.1", - "in": "path", - "required": false, - "nullable": false, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the path", - "name": "parameter-path-2", - "in": "path", - "required": false, - "nullable": false, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the path", - "name": "PARAMETER-PATH-3", - "in": "path", - "required": false, - "nullable": false, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter with a reserved keyword", - "name": "default", - "in": "query", - "required": false, - "nullable": false, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the request header", - "name": "parameter.header", - "in": "header", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the request query params", - "name": "parameter-query", - "in": "query", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the request form data", - "name": "parameter_form", - "in": "formData", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "description": "This is the parameter that goes into the cookie", - "name": "PARAMETER-COOKIE", - "in": "cookie", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "path", - "required": true, - "nullable": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "This is the parameter that goes into the body", - "required": true, - "nullable": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - } - }, - "/api/v{api-version}/parameters/": { - "get": { - "tags": ["Parameters"], - "operationId": "GetCallWithOptionalParam", - "parameters": [ - { - "description": "This is an optional parameter", - "name": "parameter", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "This is a required parameter", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithOneOfEnum" - } - } - } - } - }, - "post": { - "tags": ["Parameters"], - "operationId": "PostCallWithOptionalParam", - "parameters": [ - { - "description": "This is a required parameter", - "name": "parameter", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/Pageable" - } - } - ], - "requestBody": { - "description": "This is an optional parameter", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - } - }, - "/api/v{api-version}/requestBody/": { - "post": { - "tags": ["RequestBody"], - "parameters": [ - { - "$ref": "#/components/parameters/SimpleParameter" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SimpleRequestBody" - } - } - }, - "/api/v{api-version}/formData/": { - "post": { - "tags": ["FormData"], - "parameters": [ - { - "$ref": "#/components/parameters/SimpleParameter" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/SimpleFormData" - } - } - }, - "/api/v{api-version}/defaults": { - "get": { - "tags": ["Defaults"], - "operationId": "CallWithDefaultParameters", - "parameters": [ - { - "description": "This is a simple string with default value", - "name": "parameterString", - "in": "query", - "nullable": true, - "schema": { - "type": "string", - "default": "Hello World!" - } - }, - { - "description": "This is a simple number with default value", - "name": "parameterNumber", - "in": "query", - "nullable": true, - "schema": { - "type": "number", - "default": 123 - } - }, - { - "description": "This is a simple boolean with default value", - "name": "parameterBoolean", - "in": "query", - "nullable": true, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "description": "This is a simple enum with default value", - "name": "parameterEnum", - "in": "query", - "schema": { - "enum": ["Success", "Warning", "Error"], - "default": 0 - } - }, - { - "description": "This is a simple model with default value", - "name": "parameterModel", - "in": "query", - "nullable": true, - "schema": { - "$ref": "#/components/schemas/ModelWithString", - "default": { - "prop": "Hello World!" - } - } - } - ] - }, - "post": { - "tags": ["Defaults"], - "operationId": "CallWithDefaultOptionalParameters", - "parameters": [ - { - "description": "This is a simple string that is optional with default value", - "name": "parameterString", - "in": "query", - "required": false, - "schema": { - "type": "string", - "default": "Hello World!" - } - }, - { - "description": "This is a simple number that is optional with default value", - "name": "parameterNumber", - "in": "query", - "required": false, - "schema": { - "type": "number", - "default": 123 - } - }, - { - "description": "This is a simple boolean that is optional with default value", - "name": "parameterBoolean", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": true - } - }, - { - "description": "This is a simple enum that is optional with default value", - "name": "parameterEnum", - "in": "query", - "required": false, - "schema": { - "enum": ["Success", "Warning", "Error"], - "default": 0 - } - }, - { - "description": "This is a simple model that is optional with default value", - "name": "parameterModel", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/ModelWithString", - "default": { - "prop": "Hello World!" - } - } - } - ] - }, - "put": { - "tags": ["Defaults"], - "operationId": "CallToTestOrderOfParams", - "parameters": [ - { - "description": "This is a optional string with default", - "name": "parameterOptionalStringWithDefault", - "in": "query", - "required": false, - "schema": { - "type": "string", - "default": "Hello World!" - } - }, - { - "description": "This is a optional string with empty default", - "name": "parameterOptionalStringWithEmptyDefault", - "in": "query", - "required": false, - "schema": { - "type": "string", - "default": "" - } - }, - { - "description": "This is a optional string with no default", - "name": "parameterOptionalStringWithNoDefault", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "This is a string with default", - "name": "parameterStringWithDefault", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "Hello World!" - } - }, - { - "description": "This is a string with empty default", - "name": "parameterStringWithEmptyDefault", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "" - } - }, - { - "description": "This is a string with no default", - "name": "parameterStringWithNoDefault", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "This is a string that can be null with no default", - "name": "parameterStringNullableWithNoDefault", - "in": "query", - "required": false, - "schema": { - "type": "string", - "nullable": true - } - }, - { - "description": "This is a string that can be null with default", - "name": "parameterStringNullableWithDefault", - "in": "query", - "required": false, - "schema": { - "type": "string", - "nullable": true, - "default": null - } - } - ] - } - }, - "/api/v{api-version}/duplicate": { - "get": { - "tags": ["Duplicate"], - "operationId": "DuplicateName" - }, - "post": { - "tags": ["Duplicate"], - "operationId": "DuplicateName" - }, - "put": { - "tags": ["Duplicate"], - "operationId": "DuplicateName" - }, - "delete": { - "tags": ["Duplicate"], - "operationId": "DuplicateName" - } - }, - "/api/v{api-version}/no-content": { - "get": { - "tags": ["NoContent"], - "operationId": "CallWithNoContentResponse", - "responses": { - "204": { - "description": "Success" - } - } - } - }, - "/api/v{api-version}/multiple-tags/response-and-no-content": { - "get": { - "tags": ["Response", "NoContent"], - "operationId": "CallWithResponseAndNoContentResponse", - "responses": { - "200": { - "description": "Response is a simple number", - "content": { - "application/json": { - "schema": { - "type": "number" - } - } - } - }, - "204": { - "description": "Success" - } - } - } - }, - "/api/v{api-version}/multiple-tags/a": { - "get": { - "tags": ["MultipleTags1", "MultipleTags2"], - "operationId": "DummyA", - "responses": { - "204": { - "description": "Success" - } - } - } - }, - "/api/v{api-version}/multiple-tags/b": { - "get": { - "tags": ["MultipleTags1", "MultipleTags2", "MultipleTags3"], - "operationId": "DummyB", - "responses": { - "204": { - "description": "Success" - } - } - } - }, - "/api/v{api-version}/response": { - "get": { - "tags": ["Response"], - "operationId": "CallWithResponse", - "responses": { - "default": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - } - }, - "post": { - "tags": ["Response"], - "operationId": "CallWithDuplicateResponses", - "responses": { - "default": { - "description": "Message for default response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "201": { - "description": "Message for 201 response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "202": { - "description": "Message for 202 response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "500": { - "description": "Message for 500 error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "501": { - "description": "Message for 501 error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "502": { - "description": "Message for 502 error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - } - }, - "put": { - "tags": ["Response"], - "operationId": "CallWithResponses", - "responses": { - "default": { - "description": "Message for default response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "200": { - "description": "Message for 200 response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "@namespace.string": { - "type": "string", - "readOnly": true - }, - "@namespace.integer": { - "type": "integer", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithString" - }, - "readOnly": true - } - } - } - } - } - }, - "201": { - "description": "Message for 201 response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelThatExtends" - } - } - } - }, - "202": { - "description": "Message for 202 response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelThatExtendsExtends" - } - } - } - }, - "500": { - "description": "Message for 500 error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "501": { - "description": "Message for 501 error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "502": { - "description": "Message for 502 error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - } - } - }, - "/api/v{api-version}/collectionFormat": { - "get": { - "tags": ["CollectionFormat"], - "operationId": "CollectionFormat", - "parameters": [ - { - "description": "This is an array parameter that is sent as csv format (comma-separated values)", - "name": "parameterArrayCSV", - "in": "query", - "required": true, - "nullable": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "collectionFormat": "csv" - }, - { - "description": "This is an array parameter that is sent as ssv format (space-separated values)", - "name": "parameterArraySSV", - "in": "query", - "required": true, - "nullable": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "collectionFormat": "ssv" - }, - { - "description": "This is an array parameter that is sent as tsv format (tab-separated values)", - "name": "parameterArrayTSV", - "in": "query", - "required": true, - "nullable": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "collectionFormat": "tsv" - }, - { - "description": "This is an array parameter that is sent as pipes format (pipe-separated values)", - "name": "parameterArrayPipes", - "in": "query", - "required": true, - "nullable": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "collectionFormat": "pipes" - }, - { - "description": "This is an array parameter that is sent as multi format (multiple parameter instances)", - "name": "parameterArrayMulti", - "in": "query", - "required": true, - "nullable": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "collectionFormat": "multi" - } - ] - } - }, - "/api/v{api-version}/types": { - "get": { - "tags": ["Types"], - "operationId": "Types", - "parameters": [ - { - "description": "This is a number parameter", - "name": "parameterNumber", - "in": "query", - "required": true, - "schema": { - "type": "number", - "default": 123 - } - }, - { - "description": "This is a string parameter", - "name": "parameterString", - "in": "query", - "required": true, - "schema": { - "type": "string", - "default": "default", - "nullable": true - } - }, - { - "description": "This is a boolean parameter", - "name": "parameterBoolean", - "in": "query", - "required": true, - "schema": { - "type": "boolean", - "default": true, - "nullable": true - } - }, - { - "description": "This is an object parameter", - "name": "parameterObject", - "in": "query", - "required": true, - "schema": { - "type": "object", - "default": null, - "nullable": true - } - }, - { - "description": "This is an array parameter", - "name": "parameterArray", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - { - "description": "This is a dictionary parameter", - "name": "parameterDictionary", - "in": "query", - "required": true, - "schema": { - "type": "object", - "items": { - "type": "string" - }, - "nullable": true - } - }, - { - "description": "This is an enum parameter", - "name": "parameterEnum", - "in": "query", - "required": true, - "schema": { - "enum": ["Success", "Warning", "Error"], - "nullable": true - } - }, - { - "description": "This is a number parameter", - "name": "id", - "in": "path", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Response is a simple number", - "content": { - "application/json": { - "schema": { - "type": "number" - } - } - } - }, - "201": { - "description": "Response is a simple string", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "202": { - "description": "Response is a simple boolean", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - }, - "203": { - "description": "Response is a simple object", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - } - } - }, - "/api/v{api-version}/upload": { - "post": { - "tags": ["Upload"], - "operationId": "UploadFile", - "parameters": [ - { - "description": "Supply a file reference for upload", - "name": "file", - "in": "formData", - "required": true, - "schema": { - "type": "file" - } - }, - { - "name": "api-version", - "in": "path", - "required": true, - "schema": { - "type": "string", - "nullable": true - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - } - } - }, - "/api/v{api-version}/file/{id}": { - "get": { - "tags": ["FileResponse"], - "operationId": "FileResponse", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Success", - "content": { - "audio/*": { - "schema": { - "type": "file" - } - }, - "video/*": { - "schema": { - "type": "file" - } - } - } - } - } - } - }, - "/api/v{api-version}/complex": { - "get": { - "tags": ["Complex"], - "operationId": "ComplexTypes", - "parameters": [ - { - "description": "Parameter containing object", - "name": "parameterObject", - "in": "query", - "required": true, - "schema": { - "type": "object", - "properties": { - "first": { - "type": "object", - "properties": { - "second": { - "type": "object", - "properties": { - "third": { - "type": "string" - } - } - } - } - } - } - } - }, - { - "description": "Parameter containing reference", - "name": "parameterReference", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - }, - "400": { - "description": "400 server error" - }, - "500": { - "description": "500 server error" - } - } - } - }, - "/api/v{api-version}/multipart": { - "post": { - "tags": ["multipart"], - "operationId": "MultipartRequest", - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "content": { - "type": "string", - "format": "binary" - }, - "data": { - "oneOf": [ - { - "$ref": "#/components/schemas/ModelWithString" - } - ], - "nullable": true - } - } - }, - "encoding": { - "content": { - "style": "form" - }, - "data": { - "style": "form" - } - } - } - } - } - }, - "get": { - "tags": ["multipart"], - "operationId": "MultipartResponse", - "responses": { - "200": { - "description": "OK", - "content": { - "multipart/mixed": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "metadata": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - } - } - } - } - } - } - } - } - } - } - }, - "/api/v{api-version}/complex/{id}": { - "put": { - "tags": ["Complex"], - "operationId": "ComplexParams", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json-patch+json": { - "schema": { - "required": ["key", "name", "parameters", "type"], - "type": "object", - "properties": { - "key": { - "maxLength": 64, - "pattern": "^[a-zA-Z0-9_]*$", - "type": "string", - "nullable": true, - "readOnly": true - }, - "name": { - "maxLength": 255, - "type": "string", - "nullable": true - }, - "enabled": { - "type": "boolean", - "default": true - }, - "type": { - "enum": ["Monkey", "Horse", "Bird"], - "type": "string", - "readOnly": true - }, - "listOfModels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithString" - }, - "nullable": true - }, - "listOfStrings": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "parameters": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ModelWithString" - }, - { - "$ref": "#/components/schemas/ModelWithEnum" - }, - { - "$ref": "#/components/schemas/ModelWithArray" - }, - { - "$ref": "#/components/schemas/ModelWithDictionary" - } - ] - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32", - "readOnly": true - }, - "name": { - "type": "string", - "nullable": true, - "readOnly": true - } - }, - "readOnly": true - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "application/json; type=collection": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - } - } - }, - "/api/v{api-version}/header": { - "post": { - "tags": ["Header"], - "operationId": "CallWithResultFromHeader", - "responses": { - "200": { - "description": "Successful response", - "headers": { - "operation-location": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "400 server error" - }, - "500": { - "description": "500 server error" - } - } - } - }, - "/api/v{api-version}/error": { - "post": { - "tags": ["Error"], - "operationId": "testErrorCode", - "parameters": [ - { - "description": "Status code to return", - "name": "status", - "in": "query", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "Custom message: Successful response" - }, - "500": { - "description": "Custom message: Internal Server Error" - }, - "501": { - "description": "Custom message: Not Implemented" - }, - "502": { - "description": "Custom message: Bad Gateway" - }, - "503": { - "description": "Custom message: Service Unavailable" - } - } - } - }, - "/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串": { - "post": { - "tags": ["Non-Ascii-æøåÆØÅöôêÊ"], - "operationId": "nonAsciiæøåÆØÅöôêÊ字符串", - "parameters": [ - { - "description": "Dummy input param", - "name": "nonAsciiParamæøåÆØÅöôêÊ", - "in": "query", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串" - } - } - } - } - } - } - } - } - }, - "components": { - "requestBodies": { - "SimpleRequestBody": { - "x-body-name": "foo", - "description": "A reusable request body", - "required": false, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - }, - "SimpleFormData": { - "description": "A reusable request body", - "required": false, - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/ModelWithString" - } - } - } - } - }, - "parameters": { - "SimpleParameter": { - "description": "This is a reusable parameter", - "name": "parameter", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - "x-Foo-Bar": { - "description": "Parameter with illegal characters", - "name": "x-Foo-Bar", - "in": "header", - "required": true, - "schema": { - "type": "string" - } - } - }, - "schemas": { - "camelCaseCommentWithBreaks": { - "description": "Testing multiline comments in string: First line\nSecond line\n\nFourth line", - "type": "integer" - }, - "CommentWithBreaks": { - "description": "Testing multiline comments in string: First line\nSecond line\n\nFourth line", - "type": "integer" - }, - "CommentWithBackticks": { - "description": "Testing backticks in string: `backticks` and ```multiple backticks``` should work", - "type": "integer" - }, - "CommentWithBackticksAndQuotes": { - "description": "Testing backticks and quotes in string: `backticks`, 'quotes', \"double quotes\" and ```multiple backticks``` should work", - "type": "integer" - }, - "CommentWithSlashes": { - "description": "Testing slashes in string: \\backwards\\\\\\ and /forwards/// should work", - "type": "integer" - }, - "CommentWithExpressionPlaceholders": { - "description": "Testing expression placeholders in string: ${expression} should work", - "type": "integer" - }, - "CommentWithQuotes": { - "description": "Testing quotes in string: 'single quote''' and \"double quotes\"\"\" should work", - "type": "integer" - }, - "CommentWithReservedCharacters": { - "description": "Testing reserved characters in string: /* inline */ and /** inline **/ should work", - "type": "integer" - }, - "SimpleInteger": { - "description": "This is a simple number", - "type": "integer" - }, - "SimpleBoolean": { - "description": "This is a simple boolean", - "type": "boolean" - }, - "SimpleString": { - "description": "This is a simple string", - "type": "string" - }, - "NonAsciiStringæøåÆØÅöôêÊ字符串": { - "description": "A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)", - "type": "string" - }, - "SimpleFile": { - "description": "This is a simple file", - "type": "file" - }, - "SimpleReference": { - "description": "This is a simple reference", - "$ref": "#/components/schemas/ModelWithString" - }, - "SimpleStringWithPattern": { - "description": "This is a simple string", - "type": "string", - "nullable": true, - "maxLength": 64, - "pattern": "^[a-zA-Z0-9_]*$" - }, - "EnumWithStrings": { - "description": "This is a simple enum with strings", - "enum": [ - "Success", - "Warning", - "Error", - "'Single Quote'", - "\"Double Quotes\"", - "Non-ascii: øæåôöØÆÅÔÖ字符串" - ] - }, - "EnumWithReplacedCharacters": { - "enum": ["'Single Quote'", "\"Double Quotes\"", "øæåôöØÆÅÔÖ字符串", 3.1, ""], - "type": "string" - }, - "EnumWithNumbers": { - "description": "This is a simple enum with numbers", - "enum": [1, 2, 3, 1.1, 1.2, 1.3, 100, 200, 300, -100, -200, -300, -1.1, -1.2, -1.3], - "default": 200 - }, - "EnumFromDescription": { - "description": "Success=1,Warning=2,Error=3", - "type": "number" - }, - "EnumWithExtensions": { - "description": "This is a simple enum with numbers", - "enum": [200, 400, 500], - "x-enum-varnames": ["CUSTOM_SUCCESS", "CUSTOM_WARNING", "CUSTOM_ERROR"], - "x-enum-descriptions": [ - "Used when the status of something is successful", - "Used when the status of something has a warning", - "Used when the status of something has an error" - ] - }, - "EnumWithXEnumNames": { - "enum": [0, 1, 2], - "x-enumNames": ["zero", "one", "two"] - }, - "ArrayWithNumbers": { - "description": "This is a simple array with numbers", - "type": "array", - "items": { - "type": "integer" - } - }, - "ArrayWithBooleans": { - "description": "This is a simple array with booleans", - "type": "array", - "items": { - "type": "boolean" - } - }, - "ArrayWithStrings": { - "description": "This is a simple array with strings", - "type": "array", - "items": { - "type": "string" - }, - "default": ["test"] - }, - "ArrayWithReferences": { - "description": "This is a simple array with references", - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithString" - } - }, - "ArrayWithArray": { - "description": "This is a simple array containing an array", - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithString" - } - } - }, - "ArrayWithProperties": { - "description": "This is a simple array with properties", - "type": "array", - "items": { - "type": "object", - "properties": { - "foo": { - "$ref": "#/components/schemas/camelCaseCommentWithBreaks" - }, - "bar": { - "type": "string" - } - } - } - }, - "ArrayWithAnyOfProperties": { - "description": "This is a simple array with any of properties", - "type": "array", - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "foo": { - "type": "string", - "default": "test" - } - } - }, - { - "type": "object", - "properties": { - "bar": { - "type": "string" - } - } - } - ] - } - }, - "AnyOfAnyAndNull": { - "type": "object", - "properties": { - "data": { - "anyOf": [ - {}, - { - "type": "null" - } - ] - } - } - }, - "AnyOfArrays": { - "description": "This is a simple array with any of properties", - "type": "object", - "properties": { - "results": { - "items": { - "anyOf": [ - { - "type": "object", - "properties": { - "foo": { - "type": "string" - } - } - }, - { - "type": "object", - "properties": { - "bar": { - "type": "string" - } - } - } - ] - }, - "type": "array" - } - } - }, - "DictionaryWithString": { - "description": "This is a string dictionary", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "DictionaryWithPropertiesAndAdditionalProperties": { - "type": "object", - "properties": { - "foo": { - "type": "string" - } - }, - "additionalProperties": { - "type": "string" - } - }, - "DictionaryWithReference": { - "description": "This is a string reference", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ModelWithString" - } - }, - "DictionaryWithArray": { - "description": "This is a complex dictionary", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithString" - } - } - }, - "DictionaryWithDictionary": { - "description": "This is a string dictionary", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "DictionaryWithProperties": { - "description": "This is a complex dictionary", - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "type": "string" - } - } - } - }, - "ModelWithInteger": { - "description": "This is a model with one number property", - "type": "object", - "properties": { - "prop": { - "description": "This is a simple number property", - "type": "integer" - } - } - }, - "ModelWithBoolean": { - "description": "This is a model with one boolean property", - "type": "object", - "properties": { - "prop": { - "description": "This is a simple boolean property", - "type": "boolean" - } - } - }, - "ModelWithString": { - "description": "This is a model with one string property", - "type": "object", - "properties": { - "prop": { - "description": "This is a simple string property", - "type": "string" - } - } - }, - "Model-From.Zendesk": { - "description": "`Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)", - "type": "string" - }, - "ModelWithNullableString": { - "description": "This is a model with one string property", - "type": "object", - "required": ["nullableRequiredProp1", "nullableRequiredProp2"], - "properties": { - "nullableProp1": { - "description": "This is a simple string property", - "type": "string", - "nullable": true - }, - "nullableRequiredProp1": { - "description": "This is a simple string property", - "type": "string", - "nullable": true - }, - "nullableProp2": { - "description": "This is a simple string property", - "type": ["string", "null"] - }, - "nullableRequiredProp2": { - "description": "This is a simple string property", - "type": ["string", "null"] - }, - "foo_bar-enum": { - "description": "This is a simple enum with strings", - "enum": ["Success", "Warning", "Error", "ØÆÅ字符串"] - } - } - }, - "ModelWithEnum": { - "description": "This is a model with one enum", - "type": "object", - "properties": { - "foo_bar-enum": { - "description": "This is a simple enum with strings", - "enum": ["Success", "Warning", "Error", "ØÆÅ字符串"] - }, - "statusCode": { - "description": "These are the HTTP error code enums", - "enum": ["100", "200 FOO", "300 FOO_BAR", "400 foo-bar", "500 foo.bar", "600 foo&bar"] - }, - "bool": { - "description": "Simple boolean enum", - "type": "boolean", - "enum": [true] - } - } - }, - "ModelWithEnumWithHyphen": { - "description": "This is a model with one enum with escaped name", - "type": "object", - "properties": { - "foo-bar-baz-qux": { - "type": "string", - "enum": ["3.0"], - "title": "Foo-Bar-Baz-Qux", - "default": "3.0" - } - } - }, - "ModelWithEnumFromDescription": { - "description": "This is a model with one enum", - "type": "object", - "properties": { - "test": { - "type": "integer", - "description": "Success=1,Warning=2,Error=3" - } - } - }, - "ModelWithNestedEnums": { - "description": "This is a model with nested enums", - "type": "object", - "properties": { - "dictionaryWithEnum": { - "type": "object", - "additionalProperties": { - "enum": ["Success", "Warning", "Error"] - } - }, - "dictionaryWithEnumFromDescription": { - "type": "object", - "additionalProperties": { - "type": "integer", - "description": "Success=1,Warning=2,Error=3" - } - }, - "arrayWithEnum": { - "type": "array", - "items": { - "enum": ["Success", "Warning", "Error"] - } - }, - "arrayWithDescription": { - "type": "array", - "items": { - "type": "integer", - "description": "Success=1,Warning=2,Error=3" - } - }, - "foo_bar-enum": { - "description": "This is a simple enum with strings", - "enum": ["Success", "Warning", "Error", "ØÆÅ字符串"] - } - } - }, - "ModelWithReference": { - "description": "This is a model with one property containing a reference", - "type": "object", - "properties": { - "prop": { - "$ref": "#/components/schemas/ModelWithProperties" - } - } - }, - "ModelWithArrayReadOnlyAndWriteOnly": { - "description": "This is a model with one property containing an array", - "type": "object", - "properties": { - "prop": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithReadOnlyAndWriteOnly" - } - }, - "propWithFile": { - "type": "array", - "items": { - "type": "file" - } - }, - "propWithNumber": { - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "ModelWithArray": { - "description": "This is a model with one property containing an array", - "type": "object", - "properties": { - "prop": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithString" - } - }, - "propWithFile": { - "type": "array", - "items": { - "type": "file" - } - }, - "propWithNumber": { - "type": "array", - "items": { - "type": "number" - } - } - } - }, - "ModelWithDictionary": { - "description": "This is a model with one property containing a dictionary", - "type": "object", - "properties": { - "prop": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "DeprecatedModel": { - "deprecated": true, - "description": "This is a deprecated model with a deprecated property", - "type": "object", - "properties": { - "prop": { - "deprecated": true, - "description": "This is a deprecated property", - "type": "string" - } - } - }, - "ModelWithCircularReference": { - "description": "This is a model with one property containing a circular reference", - "type": "object", - "properties": { - "prop": { - "$ref": "#/components/schemas/ModelWithCircularReference" - } - } - }, - "CompositionWithOneOf": { - "description": "This is a model with one property with a 'one of' relationship", - "type": "object", - "properties": { - "propA": { - "type": "object", - "oneOf": [ - { - "$ref": "#/components/schemas/ModelWithString" - }, - { - "$ref": "#/components/schemas/ModelWithEnum" - }, - { - "$ref": "#/components/schemas/ModelWithArray" - }, - { - "$ref": "#/components/schemas/ModelWithDictionary" - } - ] - } - } - }, - "CompositionWithOneOfAnonymous": { - "description": "This is a model with one property with a 'one of' relationship where the options are not $ref", - "type": "object", - "properties": { - "propA": { - "type": "object", - "oneOf": [ - { - "description": "Anonymous object type", - "type": "object", - "properties": { - "propA": { - "type": "string" - } - } - }, - { - "description": "Anonymous string type", - "type": "string" - }, - { - "description": "Anonymous integer type", - "type": "integer" - } - ] - } - } - }, - "ModelCircle": { - "description": "Circle", - "type": "object", - "required": ["kind"], - "properties": { - "kind": { - "type": "string" - }, - "radius": { - "type": "number" - } - } - }, - "ModelSquare": { - "description": "Square", - "type": "object", - "required": ["kind"], - "properties": { - "kind": { - "type": "string" - }, - "sideLength": { - "type": "number" - } - } - }, - "CompositionWithOneOfDiscriminator": { - "description": "This is a model with one property with a 'one of' relationship where the options are not $ref", + "openapi": "3.0.0", + "info": { + "title": "swagger", + "version": "v1.0" + }, + "servers": [ + { + "url": "http://localhost:3000/base" + } + ], + "paths": { + "/api/v{api-version}/no-tag": { + "tags": [], + "get": { + "operationId": "ServiceWithEmptyTag" + }, + "post": { + "operationId": "PostServiceWithEmptyTag", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "type": "object", "oneOf": [ { @@ -3663,323 +1469,7 @@ "readOnly": true } } - }, - "ModelWithAdditionalPropertiesEqTrue": { - "description": "This is a model with one property and additionalProperties: true", - "type": "object", - "properties": { - "prop": { - "description": "This is a simple string property", - "type": "string" - } - }, - "additionalProperties": true - }, - "NestedAnyOfArraysNullable": { - "properties": { - "nullableArray": { - "anyOf": [ - { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ] - } - }, - "type": "object" - }, - "CompositionWithOneOfAndProperties": { - "type": "object", - "oneOf": [ - { - "type": "object", - "required": ["foo"], - "properties": { - "foo": { - "$ref": "#/components/parameters/SimpleParameter" - } - }, - "additionalProperties": false - }, - { - "type": "object", - "required": ["bar"], - "properties": { - "bar": { - "$ref": "#/components/schemas/NonAsciiStringæøåÆØÅöôêÊ字符串" - } - }, - "additionalProperties": false - } - ], - "required": ["baz", "qux"], - "properties": { - "baz": { - "type": "integer", - "format": "uint16", - "minimum": 0.0, - "nullable": true - }, - "qux": { - "type": "integer", - "format": "uint8", - "minimum": 0.0 - } - } - }, - "NullableObject": { - "type": "object", - "nullable": true, - "description": "An object that can be null", - "properties": { - "foo": { - "type": "string" - } - }, - "default": null - }, - "CharactersInDescription": { - "type": "string", - "description": "Some % character" - }, - "ModelWithNullableObject": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/NullableObject" - } - } - }, - "ModelWithOneOfEnum": { - "oneOf": [ - { - "type": "object", - "required": ["foo"], - "properties": { - "foo": { - "type": "string", - "enum": ["Bar"] - } - } - }, - { - "type": "object", - "required": ["foo"], - "properties": { - "foo": { - "type": "string", - "enum": ["Baz"] - } - } - }, - { - "type": "object", - "required": ["foo"], - "properties": { - "foo": { - "type": "string", - "enum": ["Qux"] - } - } - }, - { - "type": "object", - "required": ["content", "foo"], - "properties": { - "content": { - "type": "string", - "format": "date-time" - }, - "foo": { - "type": "string", - "enum": ["Quux"] - } - } - }, - { - "type": "object", - "required": ["content", "foo"], - "properties": { - "content": { - "type": "array", - "items": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "string" - } - ], - "maxItems": 2, - "minItems": 2 - }, - "foo": { - "type": "string", - "enum": ["Corge"] - } - } - } - ] - }, - "ModelWithNestedArrayEnumsDataFoo": { - "enum": ["foo", "bar"], - "type": "string" - }, - "ModelWithNestedArrayEnumsDataBar": { - "enum": ["baz", "qux"], - "type": "string" - }, - "ModelWithNestedArrayEnumsData": { - "type": "object", - "properties": { - "foo": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithNestedArrayEnumsDataFoo" - } - }, - "bar": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ModelWithNestedArrayEnumsDataBar" - } - } - } - }, - "ModelWithNestedArrayEnums": { - "type": "object", - "properties": { - "array_strings": { - "type": "array", - "items": { - "type": "string" - } - }, - "data": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelWithNestedArrayEnumsData" - } - ] - } - } - }, - "ModelWithNestedCompositionEnums": { - "type": "object", - "properties": { - "foo": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelWithNestedArrayEnumsDataFoo" - } - ] - } - } - }, - "ModelWithReadOnlyAndWriteOnly": { - "type": "object", - "required": ["foo", "bar", "baz"], - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "readOnly": true, - "type": "string" - }, - "baz": { - "type": "string", - "writeOnly": true - } - } - }, - "ModelWithConstantSizeArray": { - "type": "array", - "items": { - "type": "number" - }, - "minItems": 2, - "maxItems": 2 - }, - "ModelWithAnyOfConstantSizeArray": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 3, - "maxItems": 3 - }, - "ModelWithAnyOfConstantSizeArrayNullable": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number", - "nullable": true - }, - { - "type": "string" - } - ] - }, - "minItems": 3, - "maxItems": 3 - }, - "ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 2, - "maxItems": 2 - }, - "ModelWithAnyOfConstantSizeArrayAndIntersect": { - "type": "array", - "items": { - "allOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "minItems": 2, - "maxItems": 2 - }, - "ModelWithNumericEnumUnion": { - "type": "object", - "properties": { - "value": { "type": "number", "description": "Период", "enum": [1, 3, 6, 12] } - } + } } } }, @@ -4291,7 +1781,7 @@ "type": "object", "properties": { "foo": { - "type": "string" + "$ref": "#/components/schemas/camelCaseCommentWithBreaks" }, "bar": { "type": "string" @@ -5683,6 +3173,16 @@ }, "minItems": 2, "maxItems": 2 + }, + "ModelWithNumericEnumUnion": { + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Период", + "enum": [1, 3, 6, 12] + } + } } } } diff --git a/packages/openapi-ts/vitest.config.e2e.ts b/packages/openapi-ts/vitest.config.e2e.ts index fbea0a212..ae277b99b 100644 --- a/packages/openapi-ts/vitest.config.e2e.ts +++ b/packages/openapi-ts/vitest.config.e2e.ts @@ -1,8 +1,8 @@ -import { fileURLToPath } from 'node:url' +import { fileURLToPath } from 'node:url'; -import { defineConfig } from 'vitest/config' +import { defineConfig } from 'vitest/config'; -import { handlebarsPlugin } from './rollup.config' +import { handlebarsPlugin } from './rollup.config'; export default defineConfig({ plugins: [handlebarsPlugin()], @@ -11,6 +11,6 @@ export default defineConfig({ // And that the port was not previously taken. fileParallelism: false, include: ['test/e2e/**/*.spec.ts'], - root: fileURLToPath(new URL('./', import.meta.url)) - } -}) + root: fileURLToPath(new URL('./', import.meta.url)), + }, +}); diff --git a/packages/openapi-ts/vitest.config.unit.ts b/packages/openapi-ts/vitest.config.unit.ts index d0cb79377..2b1683955 100644 --- a/packages/openapi-ts/vitest.config.unit.ts +++ b/packages/openapi-ts/vitest.config.unit.ts @@ -1,8 +1,8 @@ -import { fileURLToPath } from 'node:url' +import { fileURLToPath } from 'node:url'; -import { configDefaults, defineConfig } from 'vitest/config' +import { configDefaults, defineConfig } from 'vitest/config'; -import { handlebarsPlugin } from './rollup.config' +import { handlebarsPlugin } from './rollup.config'; export default defineConfig({ plugins: [handlebarsPlugin()], @@ -10,9 +10,9 @@ export default defineConfig({ coverage: { exclude: ['bin', 'dist', 'src/**/*.d.ts'], include: ['src/**/*.ts'], - provider: 'v8' + provider: 'v8', }, exclude: [...configDefaults.exclude, 'test/e2e/**/*.spec.ts'], - root: fileURLToPath(new URL('./', import.meta.url)) - } -}) + root: fileURLToPath(new URL('./', import.meta.url)), + }, +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc2eff667..173e126bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,7 @@ settings: excludeLinksFromLockfile: false importers: + .: devDependencies: '@changesets/cli': @@ -131,6 +132,9 @@ importers: node-fetch: specifier: 3.3.2 version: 3.3.2 + prettier: + specifier: 3.2.5 + version: 3.2.5 puppeteer: specifier: 22.6.4 version: 22.6.4(typescript@5.4.5) @@ -163,19 +167,14 @@ importers: version: 1.5.0(@types/node@20.12.7)(less@4.2.0) packages: + /@aashutoshrathi/word-wrap@1.2.6: - resolution: - { - integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} dev: true /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.23.3)(algoliasearch@4.23.2)(search-insights@2.13.0): - resolution: - { - integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw== - } + resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.23.3)(algoliasearch@4.23.2)(search-insights@2.13.0) '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.23.3)(algoliasearch@4.23.2) @@ -186,10 +185,7 @@ packages: dev: true /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.23.3)(algoliasearch@4.23.2)(search-insights@2.13.0): - resolution: - { - integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg== - } + resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} peerDependencies: search-insights: '>= 1 < 3' dependencies: @@ -201,10 +197,7 @@ packages: dev: true /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.23.3)(algoliasearch@4.23.2): - resolution: - { - integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA== - } + resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' @@ -215,10 +208,7 @@ packages: dev: true /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.23.3)(algoliasearch@4.23.2): - resolution: - { - integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ== - } + resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' @@ -228,42 +218,27 @@ packages: dev: true /@algolia/cache-browser-local-storage@4.23.2: - resolution: - { - integrity: sha512-PvRQdCmtiU22dw9ZcTJkrVKgNBVAxKgD0/cfiqyxhA5+PHzA2WDt6jOmZ9QASkeM2BpyzClJb/Wr1yt2/t78Kw== - } + resolution: {integrity: sha512-PvRQdCmtiU22dw9ZcTJkrVKgNBVAxKgD0/cfiqyxhA5+PHzA2WDt6jOmZ9QASkeM2BpyzClJb/Wr1yt2/t78Kw==} dependencies: '@algolia/cache-common': 4.23.2 dev: true /@algolia/cache-common@4.23.2: - resolution: - { - integrity: sha512-OUK/6mqr6CQWxzl/QY0/mwhlGvS6fMtvEPyn/7AHUx96NjqDA4X4+Ju7aXFQKh+m3jW9VPB0B9xvEQgyAnRPNw== - } + resolution: {integrity: sha512-OUK/6mqr6CQWxzl/QY0/mwhlGvS6fMtvEPyn/7AHUx96NjqDA4X4+Ju7aXFQKh+m3jW9VPB0B9xvEQgyAnRPNw==} dev: true /@algolia/cache-common@4.23.3: - resolution: - { - integrity: sha512-h9XcNI6lxYStaw32pHpB1TMm0RuxphF+Ik4o7tcQiodEdpKK+wKufY6QXtba7t3k8eseirEMVB83uFFF3Nu54A== - } + resolution: {integrity: sha512-h9XcNI6lxYStaw32pHpB1TMm0RuxphF+Ik4o7tcQiodEdpKK+wKufY6QXtba7t3k8eseirEMVB83uFFF3Nu54A==} dev: true /@algolia/cache-in-memory@4.23.2: - resolution: - { - integrity: sha512-rfbi/SnhEa3MmlqQvgYz/9NNJ156NkU6xFxjbxBtLWnHbpj+qnlMoKd+amoiacHRITpajg6zYbLM9dnaD3Bczw== - } + resolution: {integrity: sha512-rfbi/SnhEa3MmlqQvgYz/9NNJ156NkU6xFxjbxBtLWnHbpj+qnlMoKd+amoiacHRITpajg6zYbLM9dnaD3Bczw==} dependencies: '@algolia/cache-common': 4.23.2 dev: true /@algolia/client-account@4.23.2: - resolution: - { - integrity: sha512-VbrOCLIN/5I7iIdskSoSw3uOUPF516k4SjDD4Qz3BFwa3of7D9A0lzBMAvQEJJEPHWdVraBJlGgdJq/ttmquJQ== - } + resolution: {integrity: sha512-VbrOCLIN/5I7iIdskSoSw3uOUPF516k4SjDD4Qz3BFwa3of7D9A0lzBMAvQEJJEPHWdVraBJlGgdJq/ttmquJQ==} dependencies: '@algolia/client-common': 4.23.2 '@algolia/client-search': 4.23.2 @@ -271,10 +246,7 @@ packages: dev: true /@algolia/client-analytics@4.23.2: - resolution: - { - integrity: sha512-lLj7irsAztGhMoEx/SwKd1cwLY6Daf1Q5f2AOsZacpppSvuFvuBrmkzT7pap1OD/OePjLKxicJS8wNA0+zKtuw== - } + resolution: {integrity: sha512-lLj7irsAztGhMoEx/SwKd1cwLY6Daf1Q5f2AOsZacpppSvuFvuBrmkzT7pap1OD/OePjLKxicJS8wNA0+zKtuw==} dependencies: '@algolia/client-common': 4.23.2 '@algolia/client-search': 4.23.2 @@ -283,30 +255,21 @@ packages: dev: true /@algolia/client-common@4.23.2: - resolution: - { - integrity: sha512-Q2K1FRJBern8kIfZ0EqPvUr3V29ICxCm/q42zInV+VJRjldAD9oTsMGwqUQ26GFMdFYmqkEfCbY4VGAiQhh22g== - } + resolution: {integrity: sha512-Q2K1FRJBern8kIfZ0EqPvUr3V29ICxCm/q42zInV+VJRjldAD9oTsMGwqUQ26GFMdFYmqkEfCbY4VGAiQhh22g==} dependencies: '@algolia/requester-common': 4.23.2 '@algolia/transporter': 4.23.2 dev: true /@algolia/client-common@4.23.3: - resolution: - { - integrity: sha512-l6EiPxdAlg8CYhroqS5ybfIczsGUIAC47slLPOMDeKSVXYG1n0qGiz4RjAHLw2aD0xzh2EXZ7aRguPfz7UKDKw== - } + resolution: {integrity: sha512-l6EiPxdAlg8CYhroqS5ybfIczsGUIAC47slLPOMDeKSVXYG1n0qGiz4RjAHLw2aD0xzh2EXZ7aRguPfz7UKDKw==} dependencies: '@algolia/requester-common': 4.23.3 '@algolia/transporter': 4.23.3 dev: true /@algolia/client-personalization@4.23.2: - resolution: - { - integrity: sha512-vwPsgnCGhUcHhhQG5IM27z8q7dWrN9itjdvgA6uKf2e9r7vB+WXt4OocK0CeoYQt3OGEAExryzsB8DWqdMK5wg== - } + resolution: {integrity: sha512-vwPsgnCGhUcHhhQG5IM27z8q7dWrN9itjdvgA6uKf2e9r7vB+WXt4OocK0CeoYQt3OGEAExryzsB8DWqdMK5wg==} dependencies: '@algolia/client-common': 4.23.2 '@algolia/requester-common': 4.23.2 @@ -314,10 +277,7 @@ packages: dev: true /@algolia/client-search@4.23.2: - resolution: - { - integrity: sha512-CxSB29OVGSE7l/iyoHvamMonzq7Ev8lnk/OkzleODZ1iBcCs3JC/XgTIKzN/4RSTrJ9QybsnlrN/bYCGufo7qw== - } + resolution: {integrity: sha512-CxSB29OVGSE7l/iyoHvamMonzq7Ev8lnk/OkzleODZ1iBcCs3JC/XgTIKzN/4RSTrJ9QybsnlrN/bYCGufo7qw==} dependencies: '@algolia/client-common': 4.23.2 '@algolia/requester-common': 4.23.2 @@ -325,10 +285,7 @@ packages: dev: true /@algolia/client-search@4.23.3: - resolution: - { - integrity: sha512-P4VAKFHqU0wx9O+q29Q8YVuaowaZ5EM77rxfmGnkHUJggh28useXQdopokgwMeYw2XUht49WX5RcTQ40rZIabw== - } + resolution: {integrity: sha512-P4VAKFHqU0wx9O+q29Q8YVuaowaZ5EM77rxfmGnkHUJggh28useXQdopokgwMeYw2XUht49WX5RcTQ40rZIabw==} dependencies: '@algolia/client-common': 4.23.3 '@algolia/requester-common': 4.23.3 @@ -336,33 +293,21 @@ packages: dev: true /@algolia/logger-common@4.23.2: - resolution: - { - integrity: sha512-jGM49Q7626cXZ7qRAWXn0jDlzvoA1FvN4rKTi1g0hxKsTTSReyYk0i1ADWjChDPl3Q+nSDhJuosM2bBUAay7xw== - } + resolution: {integrity: sha512-jGM49Q7626cXZ7qRAWXn0jDlzvoA1FvN4rKTi1g0hxKsTTSReyYk0i1ADWjChDPl3Q+nSDhJuosM2bBUAay7xw==} dev: true /@algolia/logger-common@4.23.3: - resolution: - { - integrity: sha512-y9kBtmJwiZ9ZZ+1Ek66P0M68mHQzKRxkW5kAAXYN/rdzgDN0d2COsViEFufxJ0pb45K4FRcfC7+33YB4BLrZ+g== - } + resolution: {integrity: sha512-y9kBtmJwiZ9ZZ+1Ek66P0M68mHQzKRxkW5kAAXYN/rdzgDN0d2COsViEFufxJ0pb45K4FRcfC7+33YB4BLrZ+g==} dev: true /@algolia/logger-console@4.23.2: - resolution: - { - integrity: sha512-oo+lnxxEmlhTBTFZ3fGz1O8PJ+G+8FiAoMY2Qo3Q4w23xocQev6KqDTA1JQAGPDxAewNA2VBwWOsVXeXFjrI/Q== - } + resolution: {integrity: sha512-oo+lnxxEmlhTBTFZ3fGz1O8PJ+G+8FiAoMY2Qo3Q4w23xocQev6KqDTA1JQAGPDxAewNA2VBwWOsVXeXFjrI/Q==} dependencies: '@algolia/logger-common': 4.23.2 dev: true /@algolia/recommend@4.23.2: - resolution: - { - integrity: sha512-Q75CjnzRCDzgIlgWfPnkLtrfF4t82JCirhalXkSSwe/c1GH5pWh4xUyDOR3KTMo+YxxX3zTlrL/FjHmUJEWEcg== - } + resolution: {integrity: sha512-Q75CjnzRCDzgIlgWfPnkLtrfF4t82JCirhalXkSSwe/c1GH5pWh4xUyDOR3KTMo+YxxX3zTlrL/FjHmUJEWEcg==} dependencies: '@algolia/cache-browser-local-storage': 4.23.2 '@algolia/cache-common': 4.23.2 @@ -378,42 +323,27 @@ packages: dev: true /@algolia/requester-browser-xhr@4.23.2: - resolution: - { - integrity: sha512-TO9wLlp8+rvW9LnIfyHsu8mNAMYrqNdQ0oLF6eTWFxXfxG3k8F/Bh7nFYGk2rFAYty4Fw4XUtrv/YjeNDtM5og== - } + resolution: {integrity: sha512-TO9wLlp8+rvW9LnIfyHsu8mNAMYrqNdQ0oLF6eTWFxXfxG3k8F/Bh7nFYGk2rFAYty4Fw4XUtrv/YjeNDtM5og==} dependencies: '@algolia/requester-common': 4.23.2 dev: true /@algolia/requester-common@4.23.2: - resolution: - { - integrity: sha512-3EfpBS0Hri0lGDB5H/BocLt7Vkop0bTTLVUBB844HH6tVycwShmsV6bDR7yXbQvFP1uNpgePRD3cdBCjeHmk6Q== - } + resolution: {integrity: sha512-3EfpBS0Hri0lGDB5H/BocLt7Vkop0bTTLVUBB844HH6tVycwShmsV6bDR7yXbQvFP1uNpgePRD3cdBCjeHmk6Q==} dev: true /@algolia/requester-common@4.23.3: - resolution: - { - integrity: sha512-xloIdr/bedtYEGcXCiF2muajyvRhwop4cMZo+K2qzNht0CMzlRkm8YsDdj5IaBhshqfgmBb3rTg4sL4/PpvLYw== - } + resolution: {integrity: sha512-xloIdr/bedtYEGcXCiF2muajyvRhwop4cMZo+K2qzNht0CMzlRkm8YsDdj5IaBhshqfgmBb3rTg4sL4/PpvLYw==} dev: true /@algolia/requester-node-http@4.23.2: - resolution: - { - integrity: sha512-SVzgkZM/malo+2SB0NWDXpnT7nO5IZwuDTaaH6SjLeOHcya1o56LSWXk+3F3rNLz2GVH+I/rpYKiqmHhSOjerw== - } + resolution: {integrity: sha512-SVzgkZM/malo+2SB0NWDXpnT7nO5IZwuDTaaH6SjLeOHcya1o56LSWXk+3F3rNLz2GVH+I/rpYKiqmHhSOjerw==} dependencies: '@algolia/requester-common': 4.23.2 dev: true /@algolia/transporter@4.23.2: - resolution: - { - integrity: sha512-GY3aGKBy+8AK4vZh8sfkatDciDVKad5rTY2S10Aefyjh7e7UGBP4zigf42qVXwU8VOPwi7l/L7OACGMOFcjB0Q== - } + resolution: {integrity: sha512-GY3aGKBy+8AK4vZh8sfkatDciDVKad5rTY2S10Aefyjh7e7UGBP4zigf42qVXwU8VOPwi7l/L7OACGMOFcjB0Q==} dependencies: '@algolia/cache-common': 4.23.2 '@algolia/logger-common': 4.23.2 @@ -421,10 +351,7 @@ packages: dev: true /@algolia/transporter@4.23.3: - resolution: - { - integrity: sha512-Wjl5gttqnf/gQKJA+dafnD0Y6Yw97yvfY8R9h0dQltX1GXTgNs1zWgvtWW0tHl1EgMdhAyw189uWiZMnL3QebQ== - } + resolution: {integrity: sha512-Wjl5gttqnf/gQKJA+dafnD0Y6Yw97yvfY8R9h0dQltX1GXTgNs1zWgvtWW0tHl1EgMdhAyw189uWiZMnL3QebQ==} dependencies: '@algolia/cache-common': 4.23.3 '@algolia/logger-common': 4.23.3 @@ -432,27 +359,16 @@ packages: dev: true /@ampproject/remapping@2.3.0: - resolution: - { - integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 dev: true /@angular-devkit/architect@0.1703.4: - resolution: - { - integrity: sha512-o+XCMOiMh8tmQGEwcxjAj2/lmUVT7CGSUAM31ydDomVOFFw4CnBvsoyKqQNRC+/AUXvovb2dCegQl/lTAnrwOg== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-o+XCMOiMh8tmQGEwcxjAj2/lmUVT7CGSUAM31ydDomVOFFw4CnBvsoyKqQNRC+/AUXvovb2dCegQl/lTAnrwOg==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} dependencies: '@angular-devkit/core': 17.3.4 rxjs: 7.8.1 @@ -461,16 +377,8 @@ packages: dev: true /@angular-devkit/build-angular@17.3.4(@angular/compiler-cli@17.3.4)(@types/express@4.17.21)(@types/node@20.12.7)(typescript@5.4.5): - resolution: - { - integrity: sha512-8KieoPrsJcFPoza0gLQ6yebtIb3WdH3j/V1TnAihk4tVpgtdch8tOBE3FP1TnSW3RF+iCsA0I5NO9/4YbEsWtw== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-8KieoPrsJcFPoza0gLQ6yebtIb3WdH3j/V1TnAihk4tVpgtdch8tOBE3FP1TnSW3RF+iCsA0I5NO9/4YbEsWtw==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: '@angular/compiler-cli': ^17.0.0 '@angular/localize': ^17.0.0 @@ -597,16 +505,8 @@ packages: dev: true /@angular-devkit/build-webpack@0.1703.4(webpack-dev-server@4.15.1)(webpack@5.90.3): - resolution: - { - integrity: sha512-9Vsl6rfIH8kF02W7i3tW/aMOT2Ld1zpcok7n7JdL3Pb7oW0SOjt73FN6Ykm/hVig12gsOGJtEsDfQRsnCddmfQ== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-9Vsl6rfIH8kF02W7i3tW/aMOT2Ld1zpcok7n7JdL3Pb7oW0SOjt73FN6Ykm/hVig12gsOGJtEsDfQRsnCddmfQ==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: webpack: ^5.30.0 webpack-dev-server: ^4.0.0 @@ -620,16 +520,8 @@ packages: dev: true /@angular-devkit/core@17.3.4: - resolution: - { - integrity: sha512-vE69/Db555NTRPh+LUFO3rAQBbv7QGrK59F7chRggDZKamtCq/FfhEg2O+0BXQnUitOQN6WgQ79+payFYWyCCg== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-vE69/Db555NTRPh+LUFO3rAQBbv7QGrK59F7chRggDZKamtCq/FfhEg2O+0BXQnUitOQN6WgQ79+payFYWyCCg==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: chokidar: ^3.5.2 peerDependenciesMeta: @@ -645,16 +537,8 @@ packages: dev: true /@angular-devkit/schematics@17.3.4: - resolution: - { - integrity: sha512-Z6801QhIwrMTcKPzdo9si+ZtJkPz8fys0ftOTfTM66+tDECasU7pvk8Dr54WkDY29mdSHzPxpSxAsooEwfxvQQ== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-Z6801QhIwrMTcKPzdo9si+ZtJkPz8fys0ftOTfTM66+tDECasU7pvk8Dr54WkDY29mdSHzPxpSxAsooEwfxvQQ==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} dependencies: '@angular-devkit/core': 17.3.4 jsonc-parser: 3.2.1 @@ -666,11 +550,8 @@ packages: dev: true /@angular/animations@17.3.4(@angular/core@17.3.4): - resolution: - { - integrity: sha512-2nBgXRdTSVPZMueV6ZJjajDRucwJBLxwiVhGafk/nI5MJF0Yss/Jfp2Kfzk5Xw2AqGhz0rd00IyNNUQIzO2mlw== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-2nBgXRdTSVPZMueV6ZJjajDRucwJBLxwiVhGafk/nI5MJF0Yss/Jfp2Kfzk5Xw2AqGhz0rd00IyNNUQIzO2mlw==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: '@angular/core': 17.3.4 dependencies: @@ -679,16 +560,8 @@ packages: dev: true /@angular/cli@17.3.4: - resolution: - { - integrity: sha512-o4oIA2stUwXOur/T/kP3Zr8ZUCB4VYmvjACbsQ3tpzVCFYPeaW9psQagBNJfaBVVDSYL+EacVYBYJR9ZImvcGw== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-o4oIA2stUwXOur/T/kP3Zr8ZUCB4VYmvjACbsQ3tpzVCFYPeaW9psQagBNJfaBVVDSYL+EacVYBYJR9ZImvcGw==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} hasBin: true dependencies: '@angular-devkit/architect': 0.1703.4 @@ -716,11 +589,8 @@ packages: dev: true /@angular/common@17.3.4(@angular/core@17.3.4)(rxjs@7.8.1): - resolution: - { - integrity: sha512-rEsmtwUMJaNvaimh9hwaHdDLXaOIrjEnYdhmJUvDaKPQaFfSbH3CGGVz9brUyzVJyiWJYkYM0ssxavczeiEe8g== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-rEsmtwUMJaNvaimh9hwaHdDLXaOIrjEnYdhmJUvDaKPQaFfSbH3CGGVz9brUyzVJyiWJYkYM0ssxavczeiEe8g==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: '@angular/core': 17.3.4 rxjs: ^6.5.3 || ^7.4.0 @@ -731,11 +601,8 @@ packages: dev: true /@angular/compiler-cli@17.3.4(@angular/compiler@17.3.4)(typescript@5.4.5): - resolution: - { - integrity: sha512-TVWjpZSI/GIXTYsmVgEKYjBckcW8Aj62DcxLNehRFR+c7UB95OY3ZFjU8U4jL0XvWPgTkkVWQVq+P6N4KCBsyw== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-TVWjpZSI/GIXTYsmVgEKYjBckcW8Aj62DcxLNehRFR+c7UB95OY3ZFjU8U4jL0XvWPgTkkVWQVq+P6N4KCBsyw==} + engines: {node: ^18.13.0 || >=20.9.0} hasBin: true peerDependencies: '@angular/compiler': 17.3.4 @@ -756,11 +623,8 @@ packages: dev: true /@angular/compiler@17.3.4(@angular/core@17.3.4): - resolution: - { - integrity: sha512-YrDClIzgj6nQwiYHrfV6AkT1C5LCDgJh+LICus/2EY1w80j1Qf48Zh4asictReePdVE2Tarq6dnpDh4RW6LenQ== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-YrDClIzgj6nQwiYHrfV6AkT1C5LCDgJh+LICus/2EY1w80j1Qf48Zh4asictReePdVE2Tarq6dnpDh4RW6LenQ==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: '@angular/core': 17.3.4 peerDependenciesMeta: @@ -772,11 +636,8 @@ packages: dev: true /@angular/core@17.3.4(rxjs@7.8.1)(zone.js@0.14.4): - resolution: - { - integrity: sha512-fvhBkfa/DDBzp1UcNzSxHj+Z9DebSS/o9pZpZlbu/0uEiu9hScmScnhaty5E0EbutzHB0SVUCz7zZuDeAywvWg== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-fvhBkfa/DDBzp1UcNzSxHj+Z9DebSS/o9pZpZlbu/0uEiu9hScmScnhaty5E0EbutzHB0SVUCz7zZuDeAywvWg==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: rxjs: ^6.5.3 || ^7.4.0 zone.js: ~0.14.0 @@ -787,11 +648,8 @@ packages: dev: true /@angular/forms@17.3.4(@angular/common@17.3.4)(@angular/core@17.3.4)(@angular/platform-browser@17.3.4)(rxjs@7.8.1): - resolution: - { - integrity: sha512-XWA/FAs0r7VRdztMIfGU9EE0Chj+1U/sDnzJK3ZPO0n8F8oDAEWGJyiw8GIyWTLs+mz43thVIED3DhbRNsXbWw== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-XWA/FAs0r7VRdztMIfGU9EE0Chj+1U/sDnzJK3ZPO0n8F8oDAEWGJyiw8GIyWTLs+mz43thVIED3DhbRNsXbWw==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: '@angular/common': 17.3.4 '@angular/core': 17.3.4 @@ -806,11 +664,8 @@ packages: dev: true /@angular/platform-browser-dynamic@17.3.4(@angular/common@17.3.4)(@angular/compiler@17.3.4)(@angular/core@17.3.4)(@angular/platform-browser@17.3.4): - resolution: - { - integrity: sha512-S53jPyQtInVYkjdGEFt4dxM1NrHNkWCvXGRsCO7Uh+laDf1OpIDp9YHf49OZohYLajJradN6y4QfdZL6IUwXKA== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-S53jPyQtInVYkjdGEFt4dxM1NrHNkWCvXGRsCO7Uh+laDf1OpIDp9YHf49OZohYLajJradN6y4QfdZL6IUwXKA==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: '@angular/common': 17.3.4 '@angular/compiler': 17.3.4 @@ -825,11 +680,8 @@ packages: dev: true /@angular/platform-browser@17.3.4(@angular/animations@17.3.4)(@angular/common@17.3.4)(@angular/core@17.3.4): - resolution: - { - integrity: sha512-W2nH9WSQJfdNG4HH9B1Cvj5CTmy9gF3321I+65Tnb8jFmpeljYDBC/VVUhTZUCRpg8udMWeMHEQHuSb8CbozmQ== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-W2nH9WSQJfdNG4HH9B1Cvj5CTmy9gF3321I+65Tnb8jFmpeljYDBC/VVUhTZUCRpg8udMWeMHEQHuSb8CbozmQ==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: '@angular/animations': 17.3.4 '@angular/common': 17.3.4 @@ -845,11 +697,8 @@ packages: dev: true /@angular/router@17.3.4(@angular/common@17.3.4)(@angular/core@17.3.4)(@angular/platform-browser@17.3.4)(rxjs@7.8.1): - resolution: - { - integrity: sha512-B1zjUYyhN66dp47zdF96NRwo0dEdM5In4Ob8HN64PAbnaK3y1EPp31aN6EGernPvKum1ibgwSZw+Uwnbkuv7Ww== - } - engines: { node: ^18.13.0 || >=20.9.0 } + resolution: {integrity: sha512-B1zjUYyhN66dp47zdF96NRwo0dEdM5In4Ob8HN64PAbnaK3y1EPp31aN6EGernPvKum1ibgwSZw+Uwnbkuv7Ww==} + engines: {node: ^18.13.0 || >=20.9.0} peerDependencies: '@angular/common': 17.3.4 '@angular/core': 17.3.4 @@ -864,11 +713,8 @@ packages: dev: true /@apidevtools/json-schema-ref-parser@11.5.4: - resolution: - { - integrity: sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg== - } - engines: { node: '>= 16' } + resolution: {integrity: sha512-o2fsypTGU0WxRxbax8zQoHiIB4dyrkwYfcm8TxZ+bx9pCzcWZbQtiMqpgBvWA/nJ2TrGjK5adCLfTH8wUeU/Wg==} + engines: {node: '>= 16'} dependencies: '@jsdevtools/ono': 7.1.3 '@types/json-schema': 7.0.15 @@ -876,30 +722,21 @@ packages: dev: false /@babel/code-frame@7.24.2: - resolution: - { - integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} + engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.24.2 picocolors: 1.0.0 dev: true /@babel/compat-data@7.24.4: - resolution: - { - integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ==} + engines: {node: '>=6.9.0'} dev: true /@babel/core@7.23.9: - resolution: - { - integrity: sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==} + engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.2 @@ -921,11 +758,8 @@ packages: dev: true /@babel/core@7.24.0: - resolution: - { - integrity: sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==} + engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.24.2 @@ -947,11 +781,8 @@ packages: dev: true /@babel/generator@7.23.6: - resolution: - { - integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 '@jridgewell/gen-mapping': 0.3.5 @@ -960,11 +791,8 @@ packages: dev: true /@babel/generator@7.24.4: - resolution: - { - integrity: sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Xd6+v6SnjWVx/nus+y0l1sxMOTOMBkyL4+BIdbALyatQnAe/SRVjANeDPSCYaX+i1iJmuGSKf3Z+E+V/va1Hvw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 '@jridgewell/gen-mapping': 0.3.5 @@ -973,31 +801,22 @@ packages: dev: true /@babel/helper-annotate-as-pure@7.22.5: - resolution: - { - integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-builder-binary-assignment-operator-visitor@7.22.15: - resolution: - { - integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-compilation-targets@7.23.6: - resolution: - { - integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + engines: {node: '>=6.9.0'} dependencies: '@babel/compat-data': 7.24.4 '@babel/helper-validator-option': 7.23.5 @@ -1007,11 +826,8 @@ packages: dev: true /@babel/helper-create-class-features-plugin@7.24.4(@babel/core@7.24.0): - resolution: - { - integrity: sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-lG75yeuUSVu0pIcbhiYMXBXANHrpUPaOfu7ryAzskCgKUHuAxRQI5ssrtmF0X9UXldPlvT0XM/A4F44OXRt6iQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1028,11 +844,8 @@ packages: dev: true /@babel/helper-create-regexp-features-plugin@7.22.15(@babel/core@7.24.0): - resolution: - { - integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1043,10 +856,7 @@ packages: dev: true /@babel/helper-define-polyfill-provider@0.5.0(@babel/core@7.24.0): - resolution: - { - integrity: sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q== - } + resolution: {integrity: sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: @@ -1061,10 +871,7 @@ packages: dev: true /@babel/helper-define-polyfill-provider@0.6.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA== - } + resolution: {integrity: sha512-o7SDgTJuvx5vLKD6SFvkydkSMBvahDKGiNJzG22IZYXhiqoe9efY7zocICBgzHV4IRg5wdgl2nEL/tulKIEIbA==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: @@ -1079,60 +886,42 @@ packages: dev: true /@babel/helper-environment-visitor@7.22.20: - resolution: - { - integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-function-name@7.23.0: - resolution: - { - integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.24.0 '@babel/types': 7.24.0 dev: true /@babel/helper-hoist-variables@7.22.5: - resolution: - { - integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-member-expression-to-functions@7.23.0: - resolution: - { - integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-module-imports@7.24.3: - resolution: - { - integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.9): - resolution: - { - integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1145,11 +934,8 @@ packages: dev: true /@babel/helper-module-transforms@7.23.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1162,29 +948,20 @@ packages: dev: true /@babel/helper-optimise-call-expression@7.22.5: - resolution: - { - integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-plugin-utils@7.24.0: - resolution: - { - integrity: sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-remap-async-to-generator@7.22.20(@babel/core@7.24.0): - resolution: - { - integrity: sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1195,11 +972,8 @@ packages: dev: true /@babel/helper-replace-supers@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1210,65 +984,44 @@ packages: dev: true /@babel/helper-simple-access@7.22.5: - resolution: - { - integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-skip-transparent-expression-wrappers@7.22.5: - resolution: - { - integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-split-export-declaration@7.22.6: - resolution: - { - integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} + engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.24.0 dev: true /@babel/helper-string-parser@7.24.1: - resolution: - { - integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-validator-identifier@7.22.20: - resolution: - { - integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-validator-option@7.23.5: - resolution: - { - integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} + engines: {node: '>=6.9.0'} dev: true /@babel/helper-wrap-function@7.22.20: - resolution: - { - integrity: sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/helper-function-name': 7.23.0 '@babel/template': 7.24.0 @@ -1276,11 +1029,8 @@ packages: dev: true /@babel/helpers@7.24.4: - resolution: - { - integrity: sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-FewdlZbSiwaVGlgT1DPANDuCHaDMiOo+D/IDYRFYjHOuv66xMSJ7fQwwODwRNAPkADIO/z1EoF/l2BCWlWABDw==} + engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 @@ -1290,11 +1040,8 @@ packages: dev: true /@babel/highlight@7.24.2: - resolution: - { - integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} + engines: {node: '>=6.9.0'} requiresBuild: true dependencies: '@babel/helper-validator-identifier': 7.22.20 @@ -1304,22 +1051,16 @@ packages: dev: true /@babel/parser@7.24.4: - resolution: - { - integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg== - } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} + engines: {node: '>=6.0.0'} hasBin: true dependencies: '@babel/types': 7.24.0 dev: true /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-y4HqEnkelJIOQGd+3g1bTeKsA5c6qM7eOn7VggGVbBc0y8MLSKHacwcIE2PplNlQSj0PqS9rrXL/nkPVK+kUNg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1328,11 +1069,8 @@ packages: dev: true /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Hj791Ii4ci8HqnaKHAlLNs+zaLXb0EzSDhiAWp5VNlyvCNymYfacs64pxTxbH1znW/NcArSmwpmG9IKE/TUVVQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 dependencies: @@ -1343,11 +1081,8 @@ packages: dev: true /@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-m9m/fXsXLiHfwdgydIFnpk+7jlVbnvlK5B2EKiPdLUb6WX654ZaaEWJUjk8TftRbZpK0XibovlLWX4KIZhV6jw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1357,11 +1092,8 @@ packages: dev: true /@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.24.0): - resolution: - { - integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1369,10 +1101,7 @@ packages: dev: true /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.24.0): - resolution: - { - integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - } + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1381,10 +1110,7 @@ packages: dev: true /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.24.0): - resolution: - { - integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - } + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1393,11 +1119,8 @@ packages: dev: true /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.24.0): - resolution: - { - integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1406,10 +1129,7 @@ packages: dev: true /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - } + resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1418,10 +1138,7 @@ packages: dev: true /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - } + resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1430,11 +1147,8 @@ packages: dev: true /@babel/plugin-syntax-import-assertions@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-IuwnI5XnuF189t91XbxmXeCDz3qs6iDRO7GJ++wcfgeXNs/8FmIlKcpDSXNVyuLQxlwvskmI3Ct73wUODkJBlQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1443,11 +1157,8 @@ packages: dev: true /@babel/plugin-syntax-import-attributes@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-zhQTMH0X2nVLnb04tz+s7AMuasX8U0FnpE+nHTOhSOINjWMnopoZTxtIKsd45n4GQ/HIZLyfIpoul8e2m0DnRA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1456,10 +1167,7 @@ packages: dev: true /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.24.0): - resolution: - { - integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - } + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1468,10 +1176,7 @@ packages: dev: true /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - } + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1480,10 +1185,7 @@ packages: dev: true /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.24.0): - resolution: - { - integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - } + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1492,10 +1194,7 @@ packages: dev: true /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - } + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1504,10 +1203,7 @@ packages: dev: true /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.24.0): - resolution: - { - integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - } + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1516,10 +1212,7 @@ packages: dev: true /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - } + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1528,10 +1221,7 @@ packages: dev: true /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - } + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1540,10 +1230,7 @@ packages: dev: true /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - } + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1552,11 +1239,8 @@ packages: dev: true /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.24.0): - resolution: - { - integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1565,11 +1249,8 @@ packages: dev: true /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.24.0): - resolution: - { - integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1578,11 +1259,8 @@ packages: dev: true /@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.24.0): - resolution: - { - integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1592,11 +1270,8 @@ packages: dev: true /@babel/plugin-transform-arrow-functions@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-ngT/3NkRhsaep9ck9uj2Xhv9+xB1zShY3tM3g6om4xxCELwCDN4g4Aq5dRn48+0hasAql7s2hdBOysCfNpr4fw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1605,11 +1280,8 @@ packages: dev: true /@babel/plugin-transform-async-generator-functions@7.23.9(@babel/core@7.24.0): - resolution: - { - integrity: sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-8Q3veQEDGe14dTYuwagbRtwxQDnytyg1JFu4/HwEMETeofocrB0U0ejBJIXoeG/t2oXZ8kzCyI0ZZfbT80VFNQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1621,11 +1293,8 @@ packages: dev: true /@babel/plugin-transform-async-to-generator@7.23.3(@babel/core@7.24.0): - resolution: - { - integrity: sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1636,11 +1305,8 @@ packages: dev: true /@babel/plugin-transform-block-scoped-functions@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-TWWC18OShZutrv9C6mye1xwtam+uNi2bnTOCBUd5sZxyHOiWbU6ztSROofIMrK84uweEZC219POICK/sTYwfgg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1649,11 +1315,8 @@ packages: dev: true /@babel/plugin-transform-block-scoping@7.24.4(@babel/core@7.24.0): - resolution: - { - integrity: sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-nIFUZIpGKDf9O9ttyRXpHFpKC+X3Y5mtshZONuEUYBomAKoM4y029Jr+uB1bHGPhNmK8YXHevDtKDOLmtRrp6g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1662,11 +1325,8 @@ packages: dev: true /@babel/plugin-transform-class-properties@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-OMLCXi0NqvJfORTaPQBwqLXHhb93wkBKZ4aNwMl6WtehO7ar+cmp+89iPEQPqxAnxsOKTaMcs3POz3rKayJ72g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1676,11 +1336,8 @@ packages: dev: true /@babel/plugin-transform-class-static-block@7.24.4(@babel/core@7.24.0): - resolution: - { - integrity: sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 dependencies: @@ -1691,11 +1348,8 @@ packages: dev: true /@babel/plugin-transform-classes@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-ZTIe3W7UejJd3/3R4p7ScyyOoafetUShSf4kCqV0O7F/RiHxVj/wRaRnQlrGwflvcehNA8M42HkAiEDYZu2F1Q==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1711,11 +1365,8 @@ packages: dev: true /@babel/plugin-transform-computed-properties@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-5pJGVIUfJpOS+pAqBQd+QMaTD2vCL/HcePooON6pDpHgRp4gNRmzyHTPIkXntwKsq3ayUFVfJaIKPw2pOkOcTw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1725,11 +1376,8 @@ packages: dev: true /@babel/plugin-transform-destructuring@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-ow8jciWqNxR3RYbSNVuF4U2Jx130nwnBnhRw6N6h1bOejNkABmcI5X5oz29K4alWX7vf1C+o6gtKXikzRKkVdw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1738,11 +1386,8 @@ packages: dev: true /@babel/plugin-transform-dotall-regex@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-p7uUxgSoZwZ2lPNMzUkqCts3xlp8n+o05ikjy7gbtFJSt9gdU88jAmtfmOxHM14noQXBxfgzf2yRWECiNVhTCw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1752,11 +1397,8 @@ packages: dev: true /@babel/plugin-transform-duplicate-keys@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-msyzuUnvsjsaSaocV6L7ErfNsa5nDWL1XKNnDePLgmz+WdU4w/J8+AxBMrWfi9m4IxfL5sZQKUPQKDQeeAT6lA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1765,11 +1407,8 @@ packages: dev: true /@babel/plugin-transform-dynamic-import@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-av2gdSTyXcJVdI+8aFZsCAtR29xJt0S5tas+Ef8NvBNmD1a+N/3ecMLeMBgfcK+xzsjdLDT6oHt+DFPyeqUbDA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1779,11 +1418,8 @@ packages: dev: true /@babel/plugin-transform-exponentiation-operator@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-U1yX13dVBSwS23DEAqU+Z/PkwE9/m7QQy8Y9/+Tdb8UWYaGNDYwTLi19wqIAiROr8sXVum9A/rtiH5H0boUcTw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1793,11 +1429,8 @@ packages: dev: true /@babel/plugin-transform-export-namespace-from@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Ft38m/KFOyzKw2UaJFkWG9QnHPG/Q/2SkOrRk4pNBPg5IPZ+dOxcmkK5IyuBcxiNPyyYowPGUReyBvrvZs7IlQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1807,11 +1440,8 @@ packages: dev: true /@babel/plugin-transform-for-of@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-OxBdcnF04bpdQdR3i4giHZNZQn7cm8RQKcSwA17wAAqEELo1ZOwp5FFgeptWUQXFyT9kwHo10aqqauYkRZPCAg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1821,11 +1451,8 @@ packages: dev: true /@babel/plugin-transform-function-name@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-BXmDZpPlh7jwicKArQASrj8n22/w6iymRnvHYYd2zO30DbE277JO20/7yXJT3QxDPtiQiOxQBbZH4TpivNXIxA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1836,11 +1463,8 @@ packages: dev: true /@babel/plugin-transform-json-strings@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-U7RMFmRvoasscrIFy5xA4gIp8iWnWubnKkKuUGJjsuOH7GfbMkB+XZzeslx2kLdEGdOJDamEmCqOks6e8nv8DQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1850,11 +1474,8 @@ packages: dev: true /@babel/plugin-transform-literals@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-zn9pwz8U7nCqOYIiBaOxoQOtYmMODXTJnkxG4AtX8fPmnCRYWBOHD0qcpwS9e2VDSp1zNJYpdnFMIKb8jmwu6g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1863,11 +1484,8 @@ packages: dev: true /@babel/plugin-transform-logical-assignment-operators@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-OhN6J4Bpz+hIBqItTeWJujDOfNP+unqv/NJgyhlpSqgBTPm37KkMmZV6SYcOj+pnDbdcl1qRGV/ZiIjX9Iy34w==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1877,11 +1495,8 @@ packages: dev: true /@babel/plugin-transform-member-expression-literals@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-4ojai0KysTWXzHseJKa1XPNXKRbuUrhkOPY4rEGeR+7ChlJVKxFa3H3Bz+7tWaGKgJAXUWKOGmltN+u9B3+CVg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1890,11 +1505,8 @@ packages: dev: true /@babel/plugin-transform-modules-amd@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-lAxNHi4HVtjnHd5Rxg3D5t99Xm6H7b04hUS7EHIXcUl2EV4yl1gWdqZrNzXnSrHveL9qMdbODlLF55mvgjAfaQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1904,11 +1516,8 @@ packages: dev: true /@babel/plugin-transform-modules-commonjs@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1919,11 +1528,8 @@ packages: dev: true /@babel/plugin-transform-modules-systemjs@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-mqQ3Zh9vFO1Tpmlt8QPnbwGHzNz3lpNEMxQb1kAemn/erstyqw1r9KeOlOfo3y6xAnFEcOv2tSyrXfmMk+/YZA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1935,11 +1541,8 @@ packages: dev: true /@babel/plugin-transform-modules-umd@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-tuA3lpPj+5ITfcCluy6nWonSL7RvaG0AOTeAuvXqEKS34lnLzXpDb0dcP6K8jD0zWZFNDVly90AGFJPnm4fOYg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1949,11 +1552,8 @@ packages: dev: true /@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.24.0): - resolution: - { - integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -1963,11 +1563,8 @@ packages: dev: true /@babel/plugin-transform-new-target@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-/rurytBM34hYy0HKZQyA0nHbQgQNFm4Q/BOc9Hflxi2X3twRof7NaE5W46j4kQitm7SvACVRXsa6N/tSZxvPug==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1976,11 +1573,8 @@ packages: dev: true /@babel/plugin-transform-nullish-coalescing-operator@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-iQ+caew8wRrhCikO5DrUYx0mrmdhkaELgFa+7baMcVuhxIkN7oxt06CZ51D65ugIb1UWRQ8oQe+HXAVM6qHFjw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -1990,11 +1584,8 @@ packages: dev: true /@babel/plugin-transform-numeric-separator@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-7GAsGlK4cNL2OExJH1DzmDeKnRv/LXq0eLUSvudrehVA5Rgg4bIrqEUW29FbKMBRT0ztSqisv7kjP+XIC4ZMNw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2004,11 +1595,8 @@ packages: dev: true /@babel/plugin-transform-object-rest-spread@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-XjD5f0YqOtebto4HGISLNfiNMTTs6tbkFf2TOqJlYKYmbo+mN9Dnpl4SRoofiziuOWMIyq3sZEUqLo3hLITFEA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2020,11 +1608,8 @@ packages: dev: true /@babel/plugin-transform-object-super@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-oKJqR3TeI5hSLRxudMjFQ9re9fBVUU0GICqM3J1mi8MqlhVr6hC/ZN4ttAyMuQR6EZZIY6h/exe5swqGNNIkWQ==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2034,11 +1619,8 @@ packages: dev: true /@babel/plugin-transform-optional-catch-binding@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-oBTH7oURV4Y+3EUrf6cWn1OHio3qG/PVwO5J03iSJmBg6m2EhKjkAu/xuaXaYwWW9miYtvbWv4LNf0AmR43LUA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2048,11 +1630,8 @@ packages: dev: true /@babel/plugin-transform-optional-chaining@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-n03wmDt+987qXwAgcBlnUUivrZBPZ8z1plL0YvgQalLm+ZE5BMhGm94jhxXtA1wzv1Cu2aaOv1BM9vbVttrzSg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2063,11 +1642,8 @@ packages: dev: true /@babel/plugin-transform-parameters@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-8Jl6V24g+Uw5OGPeWNKrKqXPDw2YDjLc53ojwfMcKwlEoETKU9rU0mHUtcg9JntWI/QYzGAXNWEcVHZ+fR+XXg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2076,11 +1652,8 @@ packages: dev: true /@babel/plugin-transform-private-methods@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-tGvisebwBO5em4PaYNqt4fkw56K2VALsAbAakY0FjTYqJp7gfdrgr7YX76Or8/cpik0W6+tj3rZ0uHU9Oil4tw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2090,11 +1663,8 @@ packages: dev: true /@babel/plugin-transform-private-property-in-object@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-pTHxDVa0BpUbvAgX3Gat+7cSciXqUcY9j2VZKTbSB6+VQGpNgNO9ailxTGHSXlqOnX1Hcx1Enme2+yv7VqP9bg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2106,11 +1676,8 @@ packages: dev: true /@babel/plugin-transform-property-literals@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-LetvD7CrHmEx0G442gOomRr66d7q8HzzGGr4PMHGr+5YIm6++Yke+jxj246rpvsbyhJwCLxcTn6zW1P1BSenqA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2119,11 +1686,8 @@ packages: dev: true /@babel/plugin-transform-regenerator@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-sJwZBCzIBE4t+5Q4IGLaaun5ExVMRY0lYwos/jNecjMrVCygCdph3IKv0tkP5Fc87e/1+bebAmEAGBfnRD+cnw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2133,11 +1697,8 @@ packages: dev: true /@babel/plugin-transform-reserved-words@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-JAclqStUfIwKN15HrsQADFgeZt+wexNQ0uLhuqvqAUFoqPMjEcFCYZBhq0LUdz6dZK/mD+rErhW71fbx8RYElg==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2146,11 +1707,8 @@ packages: dev: true /@babel/plugin-transform-runtime@7.24.0(@babel/core@7.24.0): - resolution: - { - integrity: sha512-zc0GA5IitLKJrSfXlXmp8KDqLrnGECK7YRfQBmEKg1NmBOQ7e+KuclBEKJgzifQeUYLdNiAw4B4bjyvzWVLiSA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-zc0GA5IitLKJrSfXlXmp8KDqLrnGECK7YRfQBmEKg1NmBOQ7e+KuclBEKJgzifQeUYLdNiAw4B4bjyvzWVLiSA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2166,11 +1724,8 @@ packages: dev: true /@babel/plugin-transform-shorthand-properties@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-LyjVB1nsJ6gTTUKRjRWx9C1s9hE7dLfP/knKdrfeH9UPtAGjYGgxIbFfx7xyLIEWs7Xe1Gnf8EWiUqfjLhInZA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2179,11 +1734,8 @@ packages: dev: true /@babel/plugin-transform-spread@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-KjmcIM+fxgY+KxPVbjelJC6hrH1CgtPmTvdXAfn3/a9CnWGSTY7nH4zm5+cjmWJybdcPSsD0++QssDsjcpe47g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2193,11 +1745,8 @@ packages: dev: true /@babel/plugin-transform-sticky-regex@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-9v0f1bRXgPVcPrngOQvLXeGNNVLc8UjMVfebo9ka0WF3/7+aVUHmaJVT3sa0XCzEFioPfPHZiOcYG9qOsH63cw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2206,11 +1755,8 @@ packages: dev: true /@babel/plugin-transform-template-literals@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-WRkhROsNzriarqECASCNu/nojeXCDTE/F2HmRgOzi7NGvyfYGq1NEjKBK3ckLfRgGc6/lPAqP0vDOSw3YtG34g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2219,11 +1765,8 @@ packages: dev: true /@babel/plugin-transform-typeof-symbol@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-CBfU4l/A+KruSUoW+vTQthwcAdwuqbpRNB8HQKlZABwHRhsdHZ9fezp4Sn18PeAlYxTNiLMlx4xUBV3AWfg1BA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2232,11 +1775,8 @@ packages: dev: true /@babel/plugin-transform-unicode-escapes@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-RlkVIcWT4TLI96zM660S877E7beKlQw7Ig+wqkKBiWfj0zH5Q4h50q6er4wzZKRNSYpfo6ILJ+hrJAGSX2qcNw==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2245,11 +1785,8 @@ packages: dev: true /@babel/plugin-transform-unicode-property-regex@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Ss4VvlfYV5huWApFsF8/Sq0oXnGO+jB+rijFEFugTd3cwSObUSnUi88djgR5528Csl0uKlrI331kRqe56Ov2Ng==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2259,11 +1796,8 @@ packages: dev: true /@babel/plugin-transform-unicode-regex@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-2A/94wgZgxfTsiLaQ2E36XAOdcZmGAaEEgVmxQWwZXWkGhvoHbaqXcKnU8zny4ycpu3vNqg0L/PcCiYtHtA13g==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2273,11 +1807,8 @@ packages: dev: true /@babel/plugin-transform-unicode-sets-regex@7.24.1(@babel/core@7.24.0): - resolution: - { - integrity: sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-fqj4WuzzS+ukpgerpAoOnMfQXwUHFxXUZUE84oL2Kao2N8uSlvcpnAidKASgsNgzZHBsHWvcm8s9FPWUhAb8fA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: @@ -2287,11 +1818,8 @@ packages: dev: true /@babel/preset-env@7.24.0(@babel/core@7.24.0): - resolution: - { - integrity: sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-ZxPEzV9IgvGn73iK0E6VB9/95Nd7aMFpbE0l8KQFDG70cOV9IxRP7Y2FUPmlK0v6ImlLqYX50iuZ3ZTVhOF2lA==} + engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: @@ -2381,10 +1909,7 @@ packages: dev: true /@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.24.0): - resolution: - { - integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== - } + resolution: {integrity: sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==} peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 dependencies: @@ -2395,38 +1920,26 @@ packages: dev: true /@babel/regjsgen@0.8.0: - resolution: - { - integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== - } + resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: true /@babel/runtime@7.24.0: - resolution: - { - integrity: sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==} + engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 dev: true /@babel/runtime@7.24.1: - resolution: - { - integrity: sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==} + engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 dev: true /@babel/template@7.24.0: - resolution: - { - integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==} + engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.24.2 '@babel/parser': 7.24.4 @@ -2434,11 +1947,8 @@ packages: dev: true /@babel/traverse@7.24.1: - resolution: - { - integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==} + engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.24.2 '@babel/generator': 7.24.4 @@ -2455,11 +1965,8 @@ packages: dev: true /@babel/types@7.24.0: - resolution: - { - integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} + engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.24.1 '@babel/helper-validator-identifier': 7.22.20 @@ -2467,17 +1974,11 @@ packages: dev: true /@bcoe/v8-coverage@0.2.3: - resolution: - { - integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - } + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true /@changesets/apply-release-plan@7.0.0: - resolution: - { - integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ== - } + resolution: {integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ==} dependencies: '@babel/runtime': 7.24.1 '@changesets/config': 3.0.0 @@ -2495,10 +1996,7 @@ packages: dev: true /@changesets/assemble-release-plan@6.0.0: - resolution: - { - integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw== - } + resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} dependencies: '@babel/runtime': 7.24.1 '@changesets/errors': 0.2.0 @@ -2509,19 +2007,13 @@ packages: dev: true /@changesets/changelog-git@0.2.0: - resolution: - { - integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ== - } + resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} dependencies: '@changesets/types': 6.0.0 dev: true /@changesets/cli@2.27.1: - resolution: - { - integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ== - } + resolution: {integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ==} hasBin: true dependencies: '@babel/runtime': 7.24.1 @@ -2559,10 +2051,7 @@ packages: dev: true /@changesets/config@3.0.0: - resolution: - { - integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA== - } + resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} dependencies: '@changesets/errors': 0.2.0 '@changesets/get-dependents-graph': 2.0.0 @@ -2574,19 +2063,13 @@ packages: dev: true /@changesets/errors@0.2.0: - resolution: - { - integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow== - } + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} dependencies: extendable-error: 0.1.7 dev: true /@changesets/get-dependents-graph@2.0.0: - resolution: - { - integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA== - } + resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 @@ -2596,10 +2079,7 @@ packages: dev: true /@changesets/get-github-info@0.5.2: - resolution: - { - integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg== - } + resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} dependencies: dataloader: 1.4.0 node-fetch: 2.7.0 @@ -2608,10 +2088,7 @@ packages: dev: true /@changesets/get-release-plan@4.0.0: - resolution: - { - integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w== - } + resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} dependencies: '@babel/runtime': 7.24.1 '@changesets/assemble-release-plan': 6.0.0 @@ -2623,17 +2100,11 @@ packages: dev: true /@changesets/get-version-range-type@0.4.0: - resolution: - { - integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ== - } + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} dev: true /@changesets/git@3.0.0: - resolution: - { - integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w== - } + resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} dependencies: '@babel/runtime': 7.24.1 '@changesets/errors': 0.2.0 @@ -2645,29 +2116,20 @@ packages: dev: true /@changesets/logger@0.1.0: - resolution: - { - integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g== - } + resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} dependencies: chalk: 2.4.2 dev: true /@changesets/parse@0.4.0: - resolution: - { - integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw== - } + resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} dependencies: '@changesets/types': 6.0.0 js-yaml: 3.14.1 dev: true /@changesets/pre@2.0.0: - resolution: - { - integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw== - } + resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} dependencies: '@babel/runtime': 7.24.1 '@changesets/errors': 0.2.0 @@ -2677,10 +2139,7 @@ packages: dev: true /@changesets/read@0.6.0: - resolution: - { - integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw== - } + resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} dependencies: '@babel/runtime': 7.24.1 '@changesets/git': 3.0.0 @@ -2693,24 +2152,15 @@ packages: dev: true /@changesets/types@4.1.0: - resolution: - { - integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw== - } + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} dev: true /@changesets/types@6.0.0: - resolution: - { - integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ== - } + resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} dev: true /@changesets/write@0.3.0: - resolution: - { - integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw== - } + resolution: {integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw==} dependencies: '@babel/runtime': 7.24.1 '@changesets/types': 6.0.0 @@ -2720,35 +2170,23 @@ packages: dev: true /@cspotcode/source-map-support@0.8.1: - resolution: - { - integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} dependencies: '@jridgewell/trace-mapping': 0.3.9 dev: true /@discoveryjs/json-ext@0.5.7: - resolution: - { - integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - } - engines: { node: '>=10.0.0' } + resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} + engines: {node: '>=10.0.0'} dev: true /@docsearch/css@3.6.0: - resolution: - { - integrity: sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ== - } + resolution: {integrity: sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==} dev: true /@docsearch/js@3.6.0(@algolia/client-search@4.23.3)(search-insights@2.13.0): - resolution: - { - integrity: sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ== - } + resolution: {integrity: sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==} dependencies: '@docsearch/react': 3.6.0(@algolia/client-search@4.23.3)(search-insights@2.13.0) preact: 10.20.1 @@ -2761,10 +2199,7 @@ packages: dev: true /@docsearch/react@3.6.0(@algolia/client-search@4.23.3)(search-insights@2.13.0): - resolution: - { - integrity: sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w== - } + resolution: {integrity: sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' @@ -2790,11 +2225,8 @@ packages: dev: true /@esbuild/aix-ppc64@0.19.12: - resolution: - { - integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} cpu: [ppc64] os: [aix] requiresBuild: true @@ -2802,11 +2234,8 @@ packages: optional: true /@esbuild/aix-ppc64@0.20.1: - resolution: - { - integrity: sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==} + engines: {node: '>=12'} cpu: [ppc64] os: [aix] requiresBuild: true @@ -2814,11 +2243,8 @@ packages: optional: true /@esbuild/aix-ppc64@0.20.2: - resolution: - { - integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} + engines: {node: '>=12'} cpu: [ppc64] os: [aix] requiresBuild: true @@ -2826,11 +2252,8 @@ packages: optional: true /@esbuild/android-arm64@0.19.12: - resolution: - { - integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true @@ -2838,11 +2261,8 @@ packages: optional: true /@esbuild/android-arm64@0.20.1: - resolution: - { - integrity: sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==} + engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true @@ -2850,11 +2270,8 @@ packages: optional: true /@esbuild/android-arm64@0.20.2: - resolution: - { - integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} + engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true @@ -2862,11 +2279,8 @@ packages: optional: true /@esbuild/android-arm@0.19.12: - resolution: - { - integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true @@ -2874,11 +2288,8 @@ packages: optional: true /@esbuild/android-arm@0.20.1: - resolution: - { - integrity: sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==} + engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true @@ -2886,11 +2297,8 @@ packages: optional: true /@esbuild/android-arm@0.20.2: - resolution: - { - integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} + engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true @@ -2898,11 +2306,8 @@ packages: optional: true /@esbuild/android-x64@0.19.12: - resolution: - { - integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true @@ -2910,11 +2315,8 @@ packages: optional: true /@esbuild/android-x64@0.20.1: - resolution: - { - integrity: sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==} + engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true @@ -2922,11 +2324,8 @@ packages: optional: true /@esbuild/android-x64@0.20.2: - resolution: - { - integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} + engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true @@ -2934,11 +2333,8 @@ packages: optional: true /@esbuild/darwin-arm64@0.19.12: - resolution: - { - integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true @@ -2946,11 +2342,8 @@ packages: optional: true /@esbuild/darwin-arm64@0.20.1: - resolution: - { - integrity: sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==} + engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true @@ -2958,11 +2351,8 @@ packages: optional: true /@esbuild/darwin-arm64@0.20.2: - resolution: - { - integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} + engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true @@ -2970,11 +2360,8 @@ packages: optional: true /@esbuild/darwin-x64@0.19.12: - resolution: - { - integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true @@ -2982,11 +2369,8 @@ packages: optional: true /@esbuild/darwin-x64@0.20.1: - resolution: - { - integrity: sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==} + engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true @@ -2994,11 +2378,8 @@ packages: optional: true /@esbuild/darwin-x64@0.20.2: - resolution: - { - integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} + engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true @@ -3006,11 +2387,8 @@ packages: optional: true /@esbuild/freebsd-arm64@0.19.12: - resolution: - { - integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true @@ -3018,11 +2396,8 @@ packages: optional: true /@esbuild/freebsd-arm64@0.20.1: - resolution: - { - integrity: sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==} + engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true @@ -3030,11 +2405,8 @@ packages: optional: true /@esbuild/freebsd-arm64@0.20.2: - resolution: - { - integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} + engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true @@ -3042,11 +2414,8 @@ packages: optional: true /@esbuild/freebsd-x64@0.19.12: - resolution: - { - integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true @@ -3054,11 +2423,8 @@ packages: optional: true /@esbuild/freebsd-x64@0.20.1: - resolution: - { - integrity: sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==} + engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true @@ -3066,11 +2432,8 @@ packages: optional: true /@esbuild/freebsd-x64@0.20.2: - resolution: - { - integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} + engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true @@ -3078,11 +2441,8 @@ packages: optional: true /@esbuild/linux-arm64@0.19.12: - resolution: - { - integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true @@ -3090,11 +2450,8 @@ packages: optional: true /@esbuild/linux-arm64@0.20.1: - resolution: - { - integrity: sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==} + engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true @@ -3102,11 +2459,8 @@ packages: optional: true /@esbuild/linux-arm64@0.20.2: - resolution: - { - integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} + engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true @@ -3114,11 +2468,8 @@ packages: optional: true /@esbuild/linux-arm@0.19.12: - resolution: - { - integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true @@ -3126,11 +2477,8 @@ packages: optional: true /@esbuild/linux-arm@0.20.1: - resolution: - { - integrity: sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==} + engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true @@ -3138,11 +2486,8 @@ packages: optional: true /@esbuild/linux-arm@0.20.2: - resolution: - { - integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} + engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true @@ -3150,11 +2495,8 @@ packages: optional: true /@esbuild/linux-ia32@0.19.12: - resolution: - { - integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true @@ -3162,11 +2504,8 @@ packages: optional: true /@esbuild/linux-ia32@0.20.1: - resolution: - { - integrity: sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==} + engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true @@ -3174,11 +2513,8 @@ packages: optional: true /@esbuild/linux-ia32@0.20.2: - resolution: - { - integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} + engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true @@ -3186,11 +2522,8 @@ packages: optional: true /@esbuild/linux-loong64@0.19.12: - resolution: - { - integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true @@ -3198,11 +2531,8 @@ packages: optional: true /@esbuild/linux-loong64@0.20.1: - resolution: - { - integrity: sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==} + engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true @@ -3210,11 +2540,8 @@ packages: optional: true /@esbuild/linux-loong64@0.20.2: - resolution: - { - integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} + engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true @@ -3222,11 +2549,8 @@ packages: optional: true /@esbuild/linux-mips64el@0.19.12: - resolution: - { - integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true @@ -3234,11 +2558,8 @@ packages: optional: true /@esbuild/linux-mips64el@0.20.1: - resolution: - { - integrity: sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==} + engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true @@ -3246,11 +2567,8 @@ packages: optional: true /@esbuild/linux-mips64el@0.20.2: - resolution: - { - integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} + engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true @@ -3258,11 +2576,8 @@ packages: optional: true /@esbuild/linux-ppc64@0.19.12: - resolution: - { - integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true @@ -3270,11 +2585,8 @@ packages: optional: true /@esbuild/linux-ppc64@0.20.1: - resolution: - { - integrity: sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==} + engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true @@ -3282,11 +2594,8 @@ packages: optional: true /@esbuild/linux-ppc64@0.20.2: - resolution: - { - integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} + engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true @@ -3294,11 +2603,8 @@ packages: optional: true /@esbuild/linux-riscv64@0.19.12: - resolution: - { - integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true @@ -3306,11 +2612,8 @@ packages: optional: true /@esbuild/linux-riscv64@0.20.1: - resolution: - { - integrity: sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==} + engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true @@ -3318,11 +2621,8 @@ packages: optional: true /@esbuild/linux-riscv64@0.20.2: - resolution: - { - integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} + engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true @@ -3330,11 +2630,8 @@ packages: optional: true /@esbuild/linux-s390x@0.19.12: - resolution: - { - integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true @@ -3342,11 +2639,8 @@ packages: optional: true /@esbuild/linux-s390x@0.20.1: - resolution: - { - integrity: sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==} + engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true @@ -3354,11 +2648,8 @@ packages: optional: true /@esbuild/linux-s390x@0.20.2: - resolution: - { - integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} + engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true @@ -3366,11 +2657,8 @@ packages: optional: true /@esbuild/linux-x64@0.19.12: - resolution: - { - integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true @@ -3378,11 +2666,8 @@ packages: optional: true /@esbuild/linux-x64@0.20.1: - resolution: - { - integrity: sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==} + engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true @@ -3390,11 +2675,8 @@ packages: optional: true /@esbuild/linux-x64@0.20.2: - resolution: - { - integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} + engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true @@ -3402,11 +2684,8 @@ packages: optional: true /@esbuild/netbsd-x64@0.19.12: - resolution: - { - integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true @@ -3414,11 +2693,8 @@ packages: optional: true /@esbuild/netbsd-x64@0.20.1: - resolution: - { - integrity: sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==} + engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true @@ -3426,11 +2702,8 @@ packages: optional: true /@esbuild/netbsd-x64@0.20.2: - resolution: - { - integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} + engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true @@ -3438,11 +2711,8 @@ packages: optional: true /@esbuild/openbsd-x64@0.19.12: - resolution: - { - integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true @@ -3450,11 +2720,8 @@ packages: optional: true /@esbuild/openbsd-x64@0.20.1: - resolution: - { - integrity: sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==} + engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true @@ -3462,11 +2729,8 @@ packages: optional: true /@esbuild/openbsd-x64@0.20.2: - resolution: - { - integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} + engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true @@ -3474,11 +2738,8 @@ packages: optional: true /@esbuild/sunos-x64@0.19.12: - resolution: - { - integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true @@ -3486,11 +2747,8 @@ packages: optional: true /@esbuild/sunos-x64@0.20.1: - resolution: - { - integrity: sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==} + engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true @@ -3498,11 +2756,8 @@ packages: optional: true /@esbuild/sunos-x64@0.20.2: - resolution: - { - integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} + engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true @@ -3510,11 +2765,8 @@ packages: optional: true /@esbuild/win32-arm64@0.19.12: - resolution: - { - integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true @@ -3522,11 +2774,8 @@ packages: optional: true /@esbuild/win32-arm64@0.20.1: - resolution: - { - integrity: sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==} + engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true @@ -3534,11 +2783,8 @@ packages: optional: true /@esbuild/win32-arm64@0.20.2: - resolution: - { - integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} + engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true @@ -3546,11 +2792,8 @@ packages: optional: true /@esbuild/win32-ia32@0.19.12: - resolution: - { - integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true @@ -3558,11 +2801,8 @@ packages: optional: true /@esbuild/win32-ia32@0.20.1: - resolution: - { - integrity: sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==} + engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true @@ -3570,11 +2810,8 @@ packages: optional: true /@esbuild/win32-ia32@0.20.2: - resolution: - { - integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} + engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true @@ -3582,11 +2819,8 @@ packages: optional: true /@esbuild/win32-x64@0.19.12: - resolution: - { - integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true @@ -3594,11 +2828,8 @@ packages: optional: true /@esbuild/win32-x64@0.20.1: - resolution: - { - integrity: sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==} + engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true @@ -3606,11 +2837,8 @@ packages: optional: true /@esbuild/win32-x64@0.20.2: - resolution: - { - integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} + engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true @@ -3618,11 +2846,8 @@ packages: optional: true /@eslint-community/eslint-utils@4.4.0(eslint@9.0.0): - resolution: - { - integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: @@ -3631,19 +2856,13 @@ packages: dev: true /@eslint-community/regexpp@4.10.0: - resolution: - { - integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== - } - engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 } + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true /@eslint/eslintrc@3.0.2: - resolution: - { - integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg== - } - engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } + resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: ajv: 6.12.6 debug: 4.3.4 @@ -3659,19 +2878,13 @@ packages: dev: true /@eslint/js@9.0.0: - resolution: - { - integrity: sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ== - } - engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } + resolution: {integrity: sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true /@humanwhocodes/config-array@0.12.3: - resolution: - { - integrity: sha512-jsNnTBlMWuTpDkeE3on7+dWJi0D6fdDfeANj/w7MpS8ztROCoLvIO2nG0CcFj+E4k8j4QrSTh4Oryi3i2G669g== - } - engines: { node: '>=10.10.0' } + resolution: {integrity: sha512-jsNnTBlMWuTpDkeE3on7+dWJi0D6fdDfeANj/w7MpS8ztROCoLvIO2nG0CcFj+E4k8j4QrSTh4Oryi3i2G669g==} + engines: {node: '>=10.10.0'} dependencies: '@humanwhocodes/object-schema': 2.0.3 debug: 4.3.4 @@ -3681,26 +2894,17 @@ packages: dev: true /@humanwhocodes/module-importer@1.0.1: - resolution: - { - integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - } - engines: { node: '>=12.22' } + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} dev: true /@humanwhocodes/object-schema@2.0.3: - resolution: - { - integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - } + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} dev: true /@isaacs/cliui@8.0.2: - resolution: - { - integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} dependencies: string-width: 5.1.2 string-width-cjs: /string-width@4.2.3 @@ -3711,11 +2915,8 @@ packages: dev: true /@istanbuljs/load-nyc-config@1.1.0: - resolution: - { - integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} dependencies: camelcase: 5.3.1 find-up: 4.1.0 @@ -3725,29 +2926,20 @@ packages: dev: true /@istanbuljs/schema@0.1.3: - resolution: - { - integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} dev: true /@jest/schemas@29.6.3: - resolution: - { - integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== - } - engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 dev: true /@jridgewell/gen-mapping@0.3.5: - resolution: - { - integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== - } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.2.1 '@jridgewell/sourcemap-codec': 1.4.15 @@ -3755,87 +2947,57 @@ packages: dev: true /@jridgewell/resolve-uri@3.1.2: - resolution: - { - integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} dev: true /@jridgewell/set-array@1.2.1: - resolution: - { - integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} dev: true /@jridgewell/source-map@0.3.6: - resolution: - { - integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== - } + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 dev: true /@jridgewell/sourcemap-codec@1.4.15: - resolution: - { - integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - } + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true /@jridgewell/trace-mapping@0.3.25: - resolution: - { - integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - } + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@jridgewell/trace-mapping@0.3.9: - resolution: - { - integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - } + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 dev: true /@jsdevtools/ono@7.1.3: - resolution: - { - integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== - } + resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} dev: false /@leichtgewicht/ip-codec@2.0.5: - resolution: - { - integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw== - } + resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} dev: true /@ljharb/through@2.3.13: - resolution: - { - integrity: sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 dev: true /@manypkg/find-root@1.1.0: - resolution: - { - integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA== - } + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: '@babel/runtime': 7.24.1 '@types/node': 12.20.55 @@ -3844,10 +3006,7 @@ packages: dev: true /@manypkg/get-packages@1.1.3: - resolution: - { - integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A== - } + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} dependencies: '@babel/runtime': 7.24.1 '@changesets/types': 4.1.0 @@ -3858,16 +3017,8 @@ packages: dev: true /@ngtools/webpack@17.3.4(@angular/compiler-cli@17.3.4)(typescript@5.4.5)(webpack@5.90.3): - resolution: - { - integrity: sha512-3uNX4tRTKPm91mSQcnmQtqDMMKLGDevJERSPJU7hlOXZZ05QrT4et1mwvXNYYMpXqi2OkC7D4ryIS2YxAiItBA== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-3uNX4tRTKPm91mSQcnmQtqDMMKLGDevJERSPJU7hlOXZZ05QrT4et1mwvXNYYMpXqi2OkC7D4ryIS2YxAiItBA==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: '@angular/compiler-cli': ^17.0.0 typescript: '>=5.2 <5.5' @@ -3879,41 +3030,29 @@ packages: dev: true /@nodelib/fs.scandir@2.1.5: - resolution: - { - integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} dependencies: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.2.0 dev: true /@nodelib/fs.stat@2.0.5: - resolution: - { - integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} dev: true /@nodelib/fs.walk@1.2.8: - resolution: - { - integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} dependencies: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 dev: true /@npmcli/agent@2.2.2: - resolution: - { - integrity: sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-OrcNPXdpSl9UX7qPVRWbmWMCSXrcDa2M9DvrbOTj7ao1S4PlqVFYv9/yLKMkrJKZ/V5A/kDBC690or307i26Og==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: agent-base: 7.1.1 http-proxy-agent: 7.0.2 @@ -3925,21 +3064,15 @@ packages: dev: true /@npmcli/fs@3.1.0: - resolution: - { - integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: semver: 7.6.0 dev: true /@npmcli/git@5.0.4: - resolution: - { - integrity: sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@npmcli/promise-spawn': 7.0.1 lru-cache: 10.2.0 @@ -3954,11 +3087,8 @@ packages: dev: true /@npmcli/installed-package-contents@2.0.2: - resolution: - { - integrity: sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true dependencies: npm-bundled: 3.0.0 @@ -3966,19 +3096,13 @@ packages: dev: true /@npmcli/node-gyp@3.0.0: - resolution: - { - integrity: sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /@npmcli/package-json@5.0.0: - resolution: - { - integrity: sha512-OI2zdYBLhQ7kpNPaJxiflofYIpkNLi+lnGdzqUOfRmCF3r2l1nadcjtCYMJKv/Utm/ZtlffaUuTiAktPHbc17g== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-OI2zdYBLhQ7kpNPaJxiflofYIpkNLi+lnGdzqUOfRmCF3r2l1nadcjtCYMJKv/Utm/ZtlffaUuTiAktPHbc17g==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@npmcli/git': 5.0.4 glob: 10.3.12 @@ -3992,29 +3116,20 @@ packages: dev: true /@npmcli/promise-spawn@7.0.1: - resolution: - { - integrity: sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: which: 4.0.0 dev: true /@npmcli/redact@1.1.0: - resolution: - { - integrity: sha512-PfnWuOkQgu7gCbnSsAisaX7hKOdZ4wSAhAzH3/ph5dSGau52kCRrMMGbiSQLwyTZpgldkZ49b0brkOr1AzGBHQ== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-PfnWuOkQgu7gCbnSsAisaX7hKOdZ4wSAhAzH3/ph5dSGau52kCRrMMGbiSQLwyTZpgldkZ49b0brkOr1AzGBHQ==} + engines: {node: ^16.14.0 || >=18.0.0} dev: true /@npmcli/run-script@7.0.4: - resolution: - { - integrity: sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@npmcli/node-gyp': 3.0.0 '@npmcli/package-json': 5.0.0 @@ -4027,21 +3142,15 @@ packages: dev: true /@pkgjs/parseargs@0.11.0: - resolution: - { - integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} requiresBuild: true dev: true optional: true /@puppeteer/browsers@2.2.1: - resolution: - { - integrity: sha512-QSXujx4d4ogDamQA8ckkkRieFzDgZEuZuGiey9G7CuDcbnX4iINKWxTPC5Br2AEzY9ICAvcndqgAUFMMKnS/Tw== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-QSXujx4d4ogDamQA8ckkkRieFzDgZEuZuGiey9G7CuDcbnX4iINKWxTPC5Br2AEzY9ICAvcndqgAUFMMKnS/Tw==} + engines: {node: '>=18'} hasBin: true dependencies: debug: 4.3.4 @@ -4057,11 +3166,8 @@ packages: dev: true /@rollup/plugin-commonjs@25.0.7(rollup@4.14.2): - resolution: - { - integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} + engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.68.0||^3.0.0||^4.0.0 peerDependenciesMeta: @@ -4078,11 +3184,8 @@ packages: dev: true /@rollup/plugin-json@6.1.0(rollup@4.14.2): - resolution: - { - integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} + engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: @@ -4094,11 +3197,8 @@ packages: dev: true /@rollup/plugin-node-resolve@15.2.3(rollup@4.14.2): - resolution: - { - integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.78.0||^3.0.0||^4.0.0 peerDependenciesMeta: @@ -4115,11 +3215,8 @@ packages: dev: true /@rollup/plugin-terser@0.4.4(rollup@4.14.2): - resolution: - { - integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} + engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: @@ -4133,11 +3230,8 @@ packages: dev: true /@rollup/plugin-typescript@11.1.6(rollup@4.14.2)(tslib@2.6.2)(typescript@5.4.5): - resolution: - { - integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-R92yOmIACgYdJ7dJ97p4K69I8gg6IEHt8M7dUBxN3W6nrO8uUxX5ixl0yU/N3aZTi8WhPuICvOHXQvF6FaykAA==} + engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.14.0||^3.0.0||^4.0.0 tslib: '*' @@ -4156,11 +3250,8 @@ packages: dev: true /@rollup/pluginutils@5.1.0(rollup@4.14.2): - resolution: - { - integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: @@ -4174,10 +3265,7 @@ packages: dev: true /@rollup/rollup-android-arm-eabi@4.14.2: - resolution: - { - integrity: sha512-ahxSgCkAEk+P/AVO0vYr7DxOD3CwAQrT0Go9BJyGQ9Ef0QxVOfjDZMiF4Y2s3mLyPrjonchIMH/tbWHucJMykQ== - } + resolution: {integrity: sha512-ahxSgCkAEk+P/AVO0vYr7DxOD3CwAQrT0Go9BJyGQ9Ef0QxVOfjDZMiF4Y2s3mLyPrjonchIMH/tbWHucJMykQ==} cpu: [arm] os: [android] requiresBuild: true @@ -4185,10 +3273,7 @@ packages: optional: true /@rollup/rollup-android-arm64@4.14.2: - resolution: - { - integrity: sha512-lAarIdxZWbFSHFSDao9+I/F5jDaKyCqAPMq5HqnfpBw8dKDiCaaqM0lq5h1pQTLeIqueeay4PieGR5jGZMWprw== - } + resolution: {integrity: sha512-lAarIdxZWbFSHFSDao9+I/F5jDaKyCqAPMq5HqnfpBw8dKDiCaaqM0lq5h1pQTLeIqueeay4PieGR5jGZMWprw==} cpu: [arm64] os: [android] requiresBuild: true @@ -4196,10 +3281,7 @@ packages: optional: true /@rollup/rollup-darwin-arm64@4.14.2: - resolution: - { - integrity: sha512-SWsr8zEUk82KSqquIMgZEg2GE5mCSfr9sE/thDROkX6pb3QQWPp8Vw8zOq2GyxZ2t0XoSIUlvHDkrf5Gmf7x3Q== - } + resolution: {integrity: sha512-SWsr8zEUk82KSqquIMgZEg2GE5mCSfr9sE/thDROkX6pb3QQWPp8Vw8zOq2GyxZ2t0XoSIUlvHDkrf5Gmf7x3Q==} cpu: [arm64] os: [darwin] requiresBuild: true @@ -4207,10 +3289,7 @@ packages: optional: true /@rollup/rollup-darwin-x64@4.14.2: - resolution: - { - integrity: sha512-o/HAIrQq0jIxJAhgtIvV5FWviYK4WB0WwV91SLUnsliw1lSAoLsmgEEgRWzDguAFeUEUUoIWXiJrPqU7vGiVkA== - } + resolution: {integrity: sha512-o/HAIrQq0jIxJAhgtIvV5FWviYK4WB0WwV91SLUnsliw1lSAoLsmgEEgRWzDguAFeUEUUoIWXiJrPqU7vGiVkA==} cpu: [x64] os: [darwin] requiresBuild: true @@ -4218,10 +3297,7 @@ packages: optional: true /@rollup/rollup-linux-arm-gnueabihf@4.14.2: - resolution: - { - integrity: sha512-nwlJ65UY9eGq91cBi6VyDfArUJSKOYt5dJQBq8xyLhvS23qO+4Nr/RreibFHjP6t+5ap2ohZrUJcHv5zk5ju/g== - } + resolution: {integrity: sha512-nwlJ65UY9eGq91cBi6VyDfArUJSKOYt5dJQBq8xyLhvS23qO+4Nr/RreibFHjP6t+5ap2ohZrUJcHv5zk5ju/g==} cpu: [arm] os: [linux] requiresBuild: true @@ -4229,10 +3305,7 @@ packages: optional: true /@rollup/rollup-linux-arm64-gnu@4.14.2: - resolution: - { - integrity: sha512-Pg5TxxO2IVlMj79+c/9G0LREC9SY3HM+pfAwX7zj5/cAuwrbfj2Wv9JbMHIdPCfQpYsI4g9mE+2Bw/3aeSs2rQ== - } + resolution: {integrity: sha512-Pg5TxxO2IVlMj79+c/9G0LREC9SY3HM+pfAwX7zj5/cAuwrbfj2Wv9JbMHIdPCfQpYsI4g9mE+2Bw/3aeSs2rQ==} cpu: [arm64] os: [linux] requiresBuild: true @@ -4240,10 +3313,7 @@ packages: optional: true /@rollup/rollup-linux-arm64-musl@4.14.2: - resolution: - { - integrity: sha512-cAOTjGNm84gc6tS02D1EXtG7tDRsVSDTBVXOLbj31DkwfZwgTPYZ6aafSU7rD/4R2a34JOwlF9fQayuTSkoclA== - } + resolution: {integrity: sha512-cAOTjGNm84gc6tS02D1EXtG7tDRsVSDTBVXOLbj31DkwfZwgTPYZ6aafSU7rD/4R2a34JOwlF9fQayuTSkoclA==} cpu: [arm64] os: [linux] requiresBuild: true @@ -4251,10 +3321,7 @@ packages: optional: true /@rollup/rollup-linux-powerpc64le-gnu@4.14.2: - resolution: - { - integrity: sha512-4RyT6v1kXb7C0fn6zV33rvaX05P0zHoNzaXI/5oFHklfKm602j+N4mn2YvoezQViRLPnxP8M1NaY4s/5kXO5cw== - } + resolution: {integrity: sha512-4RyT6v1kXb7C0fn6zV33rvaX05P0zHoNzaXI/5oFHklfKm602j+N4mn2YvoezQViRLPnxP8M1NaY4s/5kXO5cw==} cpu: [ppc64] os: [linux] requiresBuild: true @@ -4262,10 +3329,7 @@ packages: optional: true /@rollup/rollup-linux-riscv64-gnu@4.14.2: - resolution: - { - integrity: sha512-KNUH6jC/vRGAKSorySTyc/yRYlCwN/5pnMjXylfBniwtJx5O7X17KG/0efj8XM3TZU7raYRXJFFReOzNmL1n1w== - } + resolution: {integrity: sha512-KNUH6jC/vRGAKSorySTyc/yRYlCwN/5pnMjXylfBniwtJx5O7X17KG/0efj8XM3TZU7raYRXJFFReOzNmL1n1w==} cpu: [riscv64] os: [linux] requiresBuild: true @@ -4273,10 +3337,7 @@ packages: optional: true /@rollup/rollup-linux-s390x-gnu@4.14.2: - resolution: - { - integrity: sha512-xPV4y73IBEXToNPa3h5lbgXOi/v0NcvKxU0xejiFw6DtIYQqOTMhZ2DN18/HrrP0PmiL3rGtRG9gz1QE8vFKXQ== - } + resolution: {integrity: sha512-xPV4y73IBEXToNPa3h5lbgXOi/v0NcvKxU0xejiFw6DtIYQqOTMhZ2DN18/HrrP0PmiL3rGtRG9gz1QE8vFKXQ==} cpu: [s390x] os: [linux] requiresBuild: true @@ -4284,10 +3345,7 @@ packages: optional: true /@rollup/rollup-linux-x64-gnu@4.14.2: - resolution: - { - integrity: sha512-QBhtr07iFGmF9egrPOWyO5wciwgtzKkYPNLVCFZTmr4TWmY0oY2Dm/bmhHjKRwZoGiaKdNcKhFtUMBKvlchH+Q== - } + resolution: {integrity: sha512-QBhtr07iFGmF9egrPOWyO5wciwgtzKkYPNLVCFZTmr4TWmY0oY2Dm/bmhHjKRwZoGiaKdNcKhFtUMBKvlchH+Q==} cpu: [x64] os: [linux] requiresBuild: true @@ -4295,10 +3353,7 @@ packages: optional: true /@rollup/rollup-linux-x64-musl@4.14.2: - resolution: - { - integrity: sha512-8zfsQRQGH23O6qazZSFY5jP5gt4cFvRuKTpuBsC1ZnSWxV8ZKQpPqOZIUtdfMOugCcBvFGRa1pDC/tkf19EgBw== - } + resolution: {integrity: sha512-8zfsQRQGH23O6qazZSFY5jP5gt4cFvRuKTpuBsC1ZnSWxV8ZKQpPqOZIUtdfMOugCcBvFGRa1pDC/tkf19EgBw==} cpu: [x64] os: [linux] requiresBuild: true @@ -4306,10 +3361,7 @@ packages: optional: true /@rollup/rollup-win32-arm64-msvc@4.14.2: - resolution: - { - integrity: sha512-H4s8UjgkPnlChl6JF5empNvFHp77Jx+Wfy2EtmYPe9G22XV+PMuCinZVHurNe8ggtwoaohxARJZbaH/3xjB/FA== - } + resolution: {integrity: sha512-H4s8UjgkPnlChl6JF5empNvFHp77Jx+Wfy2EtmYPe9G22XV+PMuCinZVHurNe8ggtwoaohxARJZbaH/3xjB/FA==} cpu: [arm64] os: [win32] requiresBuild: true @@ -4317,10 +3369,7 @@ packages: optional: true /@rollup/rollup-win32-ia32-msvc@4.14.2: - resolution: - { - integrity: sha512-djqpAjm/i8erWYF0K6UY4kRO3X5+T4TypIqw60Q8MTqSBaQNpNXDhxdjpZ3ikgb+wn99svA7jxcXpiyg9MUsdw== - } + resolution: {integrity: sha512-djqpAjm/i8erWYF0K6UY4kRO3X5+T4TypIqw60Q8MTqSBaQNpNXDhxdjpZ3ikgb+wn99svA7jxcXpiyg9MUsdw==} cpu: [ia32] os: [win32] requiresBuild: true @@ -4328,10 +3377,7 @@ packages: optional: true /@rollup/rollup-win32-x64-msvc@4.14.2: - resolution: - { - integrity: sha512-teAqzLT0yTYZa8ZP7zhFKEx4cotS8Tkk5XiqNMJhD4CpaWB1BHARE4Qy+RzwnXvSAYv+Q3jAqCVBS+PS+Yee8Q== - } + resolution: {integrity: sha512-teAqzLT0yTYZa8ZP7zhFKEx4cotS8Tkk5XiqNMJhD4CpaWB1BHARE4Qy+RzwnXvSAYv+Q3jAqCVBS+PS+Yee8Q==} cpu: [x64] os: [win32] requiresBuild: true @@ -4339,16 +3385,8 @@ packages: optional: true /@schematics/angular@17.3.4: - resolution: - { - integrity: sha512-Rqhp5l76Ej6BOZCHPrvHlA2SBkjv1aHFWAfW9gREke826j46D+fuA0eDAdgeVTz0Fx9e7XM3LdtWsz7CBlV4Ug== - } - engines: - { - node: ^18.13.0 || >=20.9.0, - npm: ^6.11.0 || ^7.5.6 || >=8.0.0, - yarn: '>= 1.13.0' - } + resolution: {integrity: sha512-Rqhp5l76Ej6BOZCHPrvHlA2SBkjv1aHFWAfW9gREke826j46D+fuA0eDAdgeVTz0Fx9e7XM3LdtWsz7CBlV4Ug==} + engines: {node: ^18.13.0 || >=20.9.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} dependencies: '@angular-devkit/core': 17.3.4 '@angular-devkit/schematics': 17.3.4 @@ -4358,53 +3396,35 @@ packages: dev: true /@shikijs/core@1.2.4: - resolution: - { - integrity: sha512-ClaUWpt8oTzjcF0MM1P81AeWyzc1sNSJlAjMG80CbwqbFqXSNz+NpQVUC0icobt3sZn43Sn27M4pHD/Jmp3zHw== - } + resolution: {integrity: sha512-ClaUWpt8oTzjcF0MM1P81AeWyzc1sNSJlAjMG80CbwqbFqXSNz+NpQVUC0icobt3sZn43Sn27M4pHD/Jmp3zHw==} dev: true /@shikijs/transformers@1.2.4: - resolution: - { - integrity: sha512-ysGkpsHxRxLmz8nGKeFdV+gKj1NXt+88sM/34kfKVWTWIXg5gsFOJxJBbG7k+fUR5JlD6sNh65W9qPXrbVE1wQ== - } + resolution: {integrity: sha512-ysGkpsHxRxLmz8nGKeFdV+gKj1NXt+88sM/34kfKVWTWIXg5gsFOJxJBbG7k+fUR5JlD6sNh65W9qPXrbVE1wQ==} dependencies: shiki: 1.2.4 dev: true /@sigstore/bundle@2.3.1: - resolution: - { - integrity: sha512-eqV17lO3EIFqCWK3969Rz+J8MYrRZKw9IBHpSo6DEcEX2c+uzDFOgHE9f2MnyDpfs48LFO4hXmk9KhQ74JzU1g== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-eqV17lO3EIFqCWK3969Rz+J8MYrRZKw9IBHpSo6DEcEX2c+uzDFOgHE9f2MnyDpfs48LFO4hXmk9KhQ74JzU1g==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@sigstore/protobuf-specs': 0.3.1 dev: true /@sigstore/core@1.1.0: - resolution: - { - integrity: sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-JzBqdVIyqm2FRQCulY6nbQzMpJJpSiJ8XXWMhtOX9eKgaXXpfNOF53lzQEjIydlStnd/eFtuC1dW4VYdD93oRg==} + engines: {node: ^16.14.0 || >=18.0.0} dev: true /@sigstore/protobuf-specs@0.3.1: - resolution: - { - integrity: sha512-aIL8Z9NsMr3C64jyQzE0XlkEyBLpgEJJFDHLVVStkFV5Q3Il/r/YtY6NJWKQ4cy4AE7spP1IX5Jq7VCAxHHMfQ== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-aIL8Z9NsMr3C64jyQzE0XlkEyBLpgEJJFDHLVVStkFV5Q3Il/r/YtY6NJWKQ4cy4AE7spP1IX5Jq7VCAxHHMfQ==} + engines: {node: ^16.14.0 || >=18.0.0} dev: true /@sigstore/sign@2.3.0: - resolution: - { - integrity: sha512-tsAyV6FC3R3pHmKS880IXcDJuiFJiKITO1jxR1qbplcsBkZLBmjrEw5GbC7ikD6f5RU1hr7WnmxB/2kKc1qUWQ== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-tsAyV6FC3R3pHmKS880IXcDJuiFJiKITO1jxR1qbplcsBkZLBmjrEw5GbC7ikD6f5RU1hr7WnmxB/2kKc1qUWQ==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@sigstore/bundle': 2.3.1 '@sigstore/core': 1.1.0 @@ -4415,11 +3435,8 @@ packages: dev: true /@sigstore/tuf@2.3.2: - resolution: - { - integrity: sha512-mwbY1VrEGU4CO55t+Kl6I7WZzIl+ysSzEYdA1Nv/FTrl2bkeaPXo5PnWZAVfcY2zSdhOpsUTJW67/M2zHXGn5w== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-mwbY1VrEGU4CO55t+Kl6I7WZzIl+ysSzEYdA1Nv/FTrl2bkeaPXo5PnWZAVfcY2zSdhOpsUTJW67/M2zHXGn5w==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@sigstore/protobuf-specs': 0.3.1 tuf-js: 2.2.0 @@ -4428,11 +3445,8 @@ packages: dev: true /@sigstore/verify@1.2.0: - resolution: - { - integrity: sha512-hQF60nc9yab+Csi4AyoAmilGNfpXT+EXdBgFkP9OgPwIBPwyqVf7JAWPtmqrrrneTmAT6ojv7OlH1f6Ix5BG4Q== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-hQF60nc9yab+Csi4AyoAmilGNfpXT+EXdBgFkP9OgPwIBPwyqVf7JAWPtmqrrrneTmAT6ojv7OlH1f6Ix5BG4Q==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@sigstore/bundle': 2.3.1 '@sigstore/core': 1.1.0 @@ -4440,18 +3454,12 @@ packages: dev: true /@sinclair/typebox@0.27.8: - resolution: - { - integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - } + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true /@svitejs/changesets-changelog-github-compact@1.1.0: - resolution: - { - integrity: sha512-qhUGGDHcpbY2zpjW3SwqchuW8J/5EzlPFud7xNntHKA7f3a/mx5+g+ruJKFHSAiVZYo30PALt+AyhmPUNKH/Og== - } - engines: { node: ^14.13.1 || ^16.0.0 || >=18 } + resolution: {integrity: sha512-qhUGGDHcpbY2zpjW3SwqchuW8J/5EzlPFud7xNntHKA7f3a/mx5+g+ruJKFHSAiVZYo30PALt+AyhmPUNKH/Og==} + engines: {node: ^14.13.1 || ^16.0.0 || >=18} dependencies: '@changesets/get-github-info': 0.5.2 dotenv: 16.4.5 @@ -4460,138 +3468,90 @@ packages: dev: true /@tootallnate/quickjs-emscripten@0.23.0: - resolution: - { - integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA== - } + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} dev: true /@tsconfig/node10@1.0.11: - resolution: - { - integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== - } + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} dev: true /@tsconfig/node12@1.0.11: - resolution: - { - integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - } + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} dev: true /@tsconfig/node14@1.0.3: - resolution: - { - integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - } + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} dev: true /@tsconfig/node16@1.0.4: - resolution: - { - integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== - } + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true /@tufjs/canonical-json@2.0.0: - resolution: - { - integrity: sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==} + engines: {node: ^16.14.0 || >=18.0.0} dev: true /@tufjs/models@2.0.0: - resolution: - { - integrity: sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@tufjs/canonical-json': 2.0.0 minimatch: 9.0.4 dev: true /@types/body-parser@1.19.5: - resolution: - { - integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg== - } + resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 '@types/node': 20.12.7 dev: true /@types/bonjour@3.5.13: - resolution: - { - integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ== - } + resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==} dependencies: '@types/node': 20.12.7 dev: true /@types/connect-history-api-fallback@1.5.4: - resolution: - { - integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw== - } + resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} dependencies: '@types/express-serve-static-core': 4.19.0 '@types/node': 20.12.7 dev: true /@types/connect@3.4.38: - resolution: - { - integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== - } + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: '@types/node': 20.12.7 dev: true /@types/cross-spawn@6.0.6: - resolution: - { - integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA== - } + resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==} dependencies: '@types/node': 20.12.7 dev: true /@types/eslint-scope@3.7.7: - resolution: - { - integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== - } + resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} dependencies: '@types/eslint': 8.56.7 '@types/estree': 1.0.5 dev: true /@types/eslint@8.56.7: - resolution: - { - integrity: sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA== - } + resolution: {integrity: sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==} dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 dev: true /@types/estree@1.0.5: - resolution: - { - integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== - } + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true /@types/express-serve-static-core@4.19.0: - resolution: - { - integrity: sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ== - } + resolution: {integrity: sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==} dependencies: '@types/node': 20.12.7 '@types/qs': 6.9.14 @@ -4600,10 +3560,7 @@ packages: dev: true /@types/express@4.17.21: - resolution: - { - integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== - } + resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} dependencies: '@types/body-parser': 1.19.5 '@types/express-serve-static-core': 4.19.0 @@ -4612,156 +3569,96 @@ packages: dev: true /@types/http-errors@2.0.4: - resolution: - { - integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA== - } + resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} dev: true /@types/http-proxy@1.17.14: - resolution: - { - integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w== - } + resolution: {integrity: sha512-SSrD0c1OQzlFX7pGu1eXxSEjemej64aaNPRhhVYUGqXh0BtldAAx37MG8btcumvpgKyZp1F5Gn3JkktdxiFv6w==} dependencies: '@types/node': 20.12.7 dev: true /@types/json-schema@7.0.15: - resolution: - { - integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== - } + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} /@types/linkify-it@3.0.5: - resolution: - { - integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw== - } + resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==} dev: true /@types/markdown-it@13.0.7: - resolution: - { - integrity: sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA== - } + resolution: {integrity: sha512-U/CBi2YUUcTHBt5tjO2r5QV/x0Po6nsYwQU4Y04fBS6vfoImaiZ6f8bi3CjTCxBPQSO1LMyUqkByzi8AidyxfA==} dependencies: '@types/linkify-it': 3.0.5 '@types/mdurl': 1.0.5 dev: true /@types/mdurl@1.0.5: - resolution: - { - integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA== - } + resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==} dev: true /@types/mime@1.3.5: - resolution: - { - integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== - } + resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} dev: true /@types/minimist@1.2.5: - resolution: - { - integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== - } + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} dev: true /@types/node-forge@1.3.11: - resolution: - { - integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== - } + resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} dependencies: '@types/node': 20.12.7 dev: true /@types/node@12.20.55: - resolution: - { - integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - } + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true /@types/node@20.12.7: - resolution: - { - integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== - } + resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} dependencies: undici-types: 5.26.5 dev: true /@types/normalize-package-data@2.4.4: - resolution: - { - integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== - } + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: true /@types/qs@6.9.14: - resolution: - { - integrity: sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA== - } + resolution: {integrity: sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==} dev: true /@types/range-parser@1.2.7: - resolution: - { - integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== - } + resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} dev: true /@types/resolve@1.20.2: - resolution: - { - integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== - } + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: true /@types/retry@0.12.0: - resolution: - { - integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== - } + resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} dev: true /@types/semver@7.5.8: - resolution: - { - integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - } + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} dev: true /@types/send@0.17.4: - resolution: - { - integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA== - } + resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 '@types/node': 20.12.7 dev: true /@types/serve-index@1.9.4: - resolution: - { - integrity: sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug== - } + resolution: {integrity: sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==} dependencies: '@types/express': 4.17.21 dev: true /@types/serve-static@1.15.7: - resolution: - { - integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw== - } + resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} dependencies: '@types/http-errors': 2.0.4 '@types/node': 20.12.7 @@ -4769,35 +3666,23 @@ packages: dev: true /@types/sockjs@0.3.36: - resolution: - { - integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q== - } + resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} dependencies: '@types/node': 20.12.7 dev: true /@types/web-bluetooth@0.0.20: - resolution: - { - integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow== - } + resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: true /@types/ws@8.5.10: - resolution: - { - integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== - } + resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: '@types/node': 20.12.7 dev: true /@types/yauzl@2.10.3: - resolution: - { - integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== - } + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: '@types/node': 20.12.7 @@ -4805,11 +3690,8 @@ packages: optional: true /@typescript-eslint/eslint-plugin@7.6.0(@typescript-eslint/parser@7.6.0)(eslint@9.0.0)(typescript@5.4.5): - resolution: - { - integrity: sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 eslint: ^8.56.0 @@ -4837,11 +3719,8 @@ packages: dev: true /@typescript-eslint/parser@7.6.0(eslint@9.0.0)(typescript@5.4.5): - resolution: - { - integrity: sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 typescript: '*' @@ -4861,22 +3740,16 @@ packages: dev: true /@typescript-eslint/scope-manager@7.6.0: - resolution: - { - integrity: sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==} + engines: {node: ^18.18.0 || >=20.0.0} dependencies: '@typescript-eslint/types': 7.6.0 '@typescript-eslint/visitor-keys': 7.6.0 dev: true /@typescript-eslint/type-utils@7.6.0(eslint@9.0.0)(typescript@5.4.5): - resolution: - { - integrity: sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 typescript: '*' @@ -4895,19 +3768,13 @@ packages: dev: true /@typescript-eslint/types@7.6.0: - resolution: - { - integrity: sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==} + engines: {node: ^18.18.0 || >=20.0.0} dev: true /@typescript-eslint/typescript-estree@7.6.0(typescript@5.4.5): - resolution: - { - integrity: sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -4928,11 +3795,8 @@ packages: dev: true /@typescript-eslint/utils@7.6.0(eslint@9.0.0)(typescript@5.4.5): - resolution: - { - integrity: sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: @@ -4950,22 +3814,16 @@ packages: dev: true /@typescript-eslint/visitor-keys@7.6.0: - resolution: - { - integrity: sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==} + engines: {node: ^18.18.0 || >=20.0.0} dependencies: '@typescript-eslint/types': 7.6.0 eslint-visitor-keys: 3.4.3 dev: true /@vitejs/plugin-basic-ssl@1.1.0(vite@5.1.7): - resolution: - { - integrity: sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A== - } - engines: { node: '>=14.6.0' } + resolution: {integrity: sha512-wO4Dk/rm8u7RNhOf95ZzcEmC9rYOncYgvq4z3duaJrCgjN8BxAnDVyndanfcJZ0O6XZzHz6Q0hTimxTg8Y9g/A==} + engines: {node: '>=14.6.0'} peerDependencies: vite: ^3.0.0 || ^4.0.0 || ^5.0.0 dependencies: @@ -4973,11 +3831,8 @@ packages: dev: true /@vitejs/plugin-vue@5.0.4(vite@5.2.8)(vue@3.4.21): - resolution: - { - integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ== - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} + engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.0.0 vue: ^3.2.25 @@ -4987,10 +3842,7 @@ packages: dev: true /@vitest/coverage-v8@1.5.0(vitest@1.5.0): - resolution: - { - integrity: sha512-1igVwlcqw1QUMdfcMlzzY4coikSIBN944pkueGi0pawrX5I5Z+9hxdTR+w3Sg6Q3eZhvdMAs8ZaF9JuTG1uYOQ== - } + resolution: {integrity: sha512-1igVwlcqw1QUMdfcMlzzY4coikSIBN944pkueGi0pawrX5I5Z+9hxdTR+w3Sg6Q3eZhvdMAs8ZaF9JuTG1uYOQ==} peerDependencies: vitest: 1.5.0 dependencies: @@ -5013,10 +3865,7 @@ packages: dev: true /@vitest/expect@1.5.0: - resolution: - { - integrity: sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA== - } + resolution: {integrity: sha512-0pzuCI6KYi2SIC3LQezmxujU9RK/vwC1U9R0rLuGlNGcOuDWxqWKu6nUdFsX9tH1WU0SXtAxToOsEjeUn1s3hA==} dependencies: '@vitest/spy': 1.5.0 '@vitest/utils': 1.5.0 @@ -5024,10 +3873,7 @@ packages: dev: true /@vitest/runner@1.5.0: - resolution: - { - integrity: sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ== - } + resolution: {integrity: sha512-7HWwdxXP5yDoe7DTpbif9l6ZmDwCzcSIK38kTSIt6CFEpMjX4EpCgT6wUmS0xTXqMI6E/ONmfgRKmaujpabjZQ==} dependencies: '@vitest/utils': 1.5.0 p-limit: 5.0.0 @@ -5035,10 +3881,7 @@ packages: dev: true /@vitest/snapshot@1.5.0: - resolution: - { - integrity: sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A== - } + resolution: {integrity: sha512-qpv3fSEuNrhAO3FpH6YYRdaECnnRjg9VxbhdtPwPRnzSfHVXnNzzrpX4cJxqiwgRMo7uRMWDFBlsBq4Cr+rO3A==} dependencies: magic-string: 0.30.9 pathe: 1.1.2 @@ -5046,19 +3889,13 @@ packages: dev: true /@vitest/spy@1.5.0: - resolution: - { - integrity: sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w== - } + resolution: {integrity: sha512-vu6vi6ew5N5MMHJjD5PoakMRKYdmIrNJmyfkhRpQt5d9Ewhw9nZ5Aqynbi3N61bvk9UvZ5UysMT6ayIrZ8GA9w==} dependencies: tinyspy: 2.2.1 dev: true /@vitest/utils@1.5.0: - resolution: - { - integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A== - } + resolution: {integrity: sha512-BDU0GNL8MWkRkSRdNFvCUCAVOeHaUlVJ9Tx0TYBZyXaaOTmGtUFObzchCivIBrIwKzvZA7A9sCejVhXM2aY98A==} dependencies: diff-sequences: 29.6.3 estree-walker: 3.0.3 @@ -5067,10 +3904,7 @@ packages: dev: true /@vue/compiler-core@3.4.21: - resolution: - { - integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og== - } + resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} dependencies: '@babel/parser': 7.24.4 '@vue/shared': 3.4.21 @@ -5080,20 +3914,14 @@ packages: dev: true /@vue/compiler-dom@3.4.21: - resolution: - { - integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA== - } + resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==} dependencies: '@vue/compiler-core': 3.4.21 '@vue/shared': 3.4.21 dev: true /@vue/compiler-sfc@3.4.21: - resolution: - { - integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ== - } + resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==} dependencies: '@babel/parser': 7.24.4 '@vue/compiler-core': 3.4.21 @@ -5107,20 +3935,14 @@ packages: dev: true /@vue/compiler-ssr@3.4.21: - resolution: - { - integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q== - } + resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==} dependencies: '@vue/compiler-dom': 3.4.21 '@vue/shared': 3.4.21 dev: true /@vue/devtools-api@7.0.25(vue@3.4.21): - resolution: - { - integrity: sha512-fL6DlRp4MSXCLYcqYvKU7QhQZWE3Hfu7X8pC25BS74coJi7uJeSWs4tmrITcwFihNmC9S5GPiffkMdckkeWjzg== - } + resolution: {integrity: sha512-fL6DlRp4MSXCLYcqYvKU7QhQZWE3Hfu7X8pC25BS74coJi7uJeSWs4tmrITcwFihNmC9S5GPiffkMdckkeWjzg==} dependencies: '@vue/devtools-kit': 7.0.25(vue@3.4.21) transitivePeerDependencies: @@ -5128,10 +3950,7 @@ packages: dev: true /@vue/devtools-kit@7.0.25(vue@3.4.21): - resolution: - { - integrity: sha512-wbLkSnOTsKHPb1mB9koFHUoSAF8Dp6Ii/ocR2+DeXFY4oKqIjCeJb/4Lihk4rgqEhCy1WwxLfTgNDo83VvDYkQ== - } + resolution: {integrity: sha512-wbLkSnOTsKHPb1mB9koFHUoSAF8Dp6Ii/ocR2+DeXFY4oKqIjCeJb/4Lihk4rgqEhCy1WwxLfTgNDo83VvDYkQ==} peerDependencies: vue: ^3.0.0 dependencies: @@ -5144,38 +3963,26 @@ packages: dev: true /@vue/devtools-shared@7.0.25: - resolution: - { - integrity: sha512-5+XYhcHSXuJSguYnNwL6/e6VTmXwCfryWQOkffh9ZU2zMByybqqqBrMWqvBkqTmMFCjPdzulo66xXbVbwLaElQ== - } + resolution: {integrity: sha512-5+XYhcHSXuJSguYnNwL6/e6VTmXwCfryWQOkffh9ZU2zMByybqqqBrMWqvBkqTmMFCjPdzulo66xXbVbwLaElQ==} dependencies: rfdc: 1.3.1 dev: true /@vue/reactivity@3.4.21: - resolution: - { - integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw== - } + resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==} dependencies: '@vue/shared': 3.4.21 dev: true /@vue/runtime-core@3.4.21: - resolution: - { - integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA== - } + resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==} dependencies: '@vue/reactivity': 3.4.21 '@vue/shared': 3.4.21 dev: true /@vue/runtime-dom@3.4.21: - resolution: - { - integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw== - } + resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==} dependencies: '@vue/runtime-core': 3.4.21 '@vue/shared': 3.4.21 @@ -5183,10 +3990,7 @@ packages: dev: true /@vue/server-renderer@3.4.21(vue@3.4.21): - resolution: - { - integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg== - } + resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==} peerDependencies: vue: 3.4.21 dependencies: @@ -5196,17 +4000,11 @@ packages: dev: true /@vue/shared@3.4.21: - resolution: - { - integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g== - } + resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==} dev: true /@vueuse/core@10.9.0(vue@3.4.21): - resolution: - { - integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg== - } + resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==} dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 10.9.0 @@ -5218,10 +4016,7 @@ packages: dev: true /@vueuse/integrations@10.9.0(focus-trap@7.5.4)(vue@3.4.21): - resolution: - { - integrity: sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q== - } + resolution: {integrity: sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==} peerDependencies: async-validator: '*' axios: '*' @@ -5271,17 +4066,11 @@ packages: dev: true /@vueuse/metadata@10.9.0: - resolution: - { - integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA== - } + resolution: {integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==} dev: true /@vueuse/shared@10.9.0(vue@3.4.21): - resolution: - { - integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw== - } + resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==} dependencies: vue-demi: 0.14.7(vue@3.4.21) transitivePeerDependencies: @@ -5290,41 +4079,26 @@ packages: dev: true /@webassemblyjs/ast@1.12.1: - resolution: - { - integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== - } + resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} dependencies: '@webassemblyjs/helper-numbers': 1.11.6 '@webassemblyjs/helper-wasm-bytecode': 1.11.6 dev: true /@webassemblyjs/floating-point-hex-parser@1.11.6: - resolution: - { - integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== - } + resolution: {integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==} dev: true /@webassemblyjs/helper-api-error@1.11.6: - resolution: - { - integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== - } + resolution: {integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==} dev: true /@webassemblyjs/helper-buffer@1.12.1: - resolution: - { - integrity: sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== - } + resolution: {integrity: sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==} dev: true /@webassemblyjs/helper-numbers@1.11.6: - resolution: - { - integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== - } + resolution: {integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==} dependencies: '@webassemblyjs/floating-point-hex-parser': 1.11.6 '@webassemblyjs/helper-api-error': 1.11.6 @@ -5332,17 +4106,11 @@ packages: dev: true /@webassemblyjs/helper-wasm-bytecode@1.11.6: - resolution: - { - integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== - } + resolution: {integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==} dev: true /@webassemblyjs/helper-wasm-section@1.12.1: - resolution: - { - integrity: sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== - } + resolution: {integrity: sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==} dependencies: '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/helper-buffer': 1.12.1 @@ -5351,35 +4119,23 @@ packages: dev: true /@webassemblyjs/ieee754@1.11.6: - resolution: - { - integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== - } + resolution: {integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==} dependencies: '@xtuc/ieee754': 1.2.0 dev: true /@webassemblyjs/leb128@1.11.6: - resolution: - { - integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== - } + resolution: {integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==} dependencies: '@xtuc/long': 4.2.2 dev: true /@webassemblyjs/utf8@1.11.6: - resolution: - { - integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== - } + resolution: {integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==} dev: true /@webassemblyjs/wasm-edit@1.12.1: - resolution: - { - integrity: sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== - } + resolution: {integrity: sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==} dependencies: '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/helper-buffer': 1.12.1 @@ -5392,10 +4148,7 @@ packages: dev: true /@webassemblyjs/wasm-gen@1.12.1: - resolution: - { - integrity: sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== - } + resolution: {integrity: sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==} dependencies: '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/helper-wasm-bytecode': 1.11.6 @@ -5405,10 +4158,7 @@ packages: dev: true /@webassemblyjs/wasm-opt@1.12.1: - resolution: - { - integrity: sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== - } + resolution: {integrity: sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==} dependencies: '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/helper-buffer': 1.12.1 @@ -5417,10 +4167,7 @@ packages: dev: true /@webassemblyjs/wasm-parser@1.12.1: - resolution: - { - integrity: sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== - } + resolution: {integrity: sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==} dependencies: '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/helper-api-error': 1.11.6 @@ -5431,60 +4178,39 @@ packages: dev: true /@webassemblyjs/wast-printer@1.12.1: - resolution: - { - integrity: sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== - } + resolution: {integrity: sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==} dependencies: '@webassemblyjs/ast': 1.12.1 '@xtuc/long': 4.2.2 dev: true /@xtuc/ieee754@1.2.0: - resolution: - { - integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - } + resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} dev: true /@xtuc/long@4.2.2: - resolution: - { - integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - } + resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} dev: true /@yarnpkg/lockfile@1.1.0: - resolution: - { - integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== - } + resolution: {integrity: sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==} dev: true /abbrev@2.0.0: - resolution: - { - integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /accepts@1.3.8: - resolution: - { - integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} dependencies: mime-types: 2.1.35 negotiator: 0.6.3 dev: true /acorn-import-assertions@1.9.0(acorn@8.11.3): - resolution: - { - integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== - } + resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} peerDependencies: acorn: ^8 dependencies: @@ -5492,10 +4218,7 @@ packages: dev: true /acorn-jsx@5.3.2(acorn@7.4.1): - resolution: - { - integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - } + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: @@ -5503,10 +4226,7 @@ packages: dev: true /acorn-jsx@5.3.2(acorn@8.11.3): - resolution: - { - integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - } + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: @@ -5514,47 +4234,32 @@ packages: dev: true /acorn-walk@8.3.2: - resolution: - { - integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== - } - engines: { node: '>=0.4.0' } + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} dev: true /acorn@7.4.1: - resolution: - { - integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - } - engines: { node: '>=0.4.0' } + resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} + engines: {node: '>=0.4.0'} hasBin: true dev: true /acorn@8.11.3: - resolution: - { - integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== - } - engines: { node: '>=0.4.0' } + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} hasBin: true /adjust-sourcemap-loader@4.0.0: - resolution: - { - integrity: sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A== - } - engines: { node: '>=8.9' } + resolution: {integrity: sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==} + engines: {node: '>=8.9'} dependencies: loader-utils: 2.0.4 regex-parser: 2.3.0 dev: true /agent-base@7.1.1: - resolution: - { - integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} + engines: {node: '>= 14'} dependencies: debug: 4.3.4 transitivePeerDependencies: @@ -5562,21 +4267,15 @@ packages: dev: true /aggregate-error@3.1.0: - resolution: - { - integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} dependencies: clean-stack: 2.2.0 indent-string: 4.0.0 dev: true /ajv-formats@2.1.1(ajv@8.12.0): - resolution: - { - integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - } + resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: ajv: ^8.0.0 peerDependenciesMeta: @@ -5587,10 +4286,7 @@ packages: dev: true /ajv-keywords@3.5.2(ajv@6.12.6): - resolution: - { - integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - } + resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: ajv: ^6.9.1 dependencies: @@ -5598,10 +4294,7 @@ packages: dev: true /ajv-keywords@5.1.0(ajv@8.12.0): - resolution: - { - integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== - } + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} peerDependencies: ajv: ^8.8.2 dependencies: @@ -5610,10 +4303,7 @@ packages: dev: true /ajv@6.12.6: - resolution: - { - integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - } + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 @@ -5622,10 +4312,7 @@ packages: dev: true /ajv@8.12.0: - resolution: - { - integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - } + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} dependencies: fast-deep-equal: 3.1.3 json-schema-traverse: 1.0.0 @@ -5634,10 +4321,7 @@ packages: dev: true /algoliasearch@4.23.2: - resolution: - { - integrity: sha512-8aCl055IsokLuPU8BzLjwzXjb7ty9TPcUFFOk0pYOwsE5DMVhE3kwCMFtsCFKcnoPZK7oObm+H5mbnSO/9ioxQ== - } + resolution: {integrity: sha512-8aCl055IsokLuPU8BzLjwzXjb7ty9TPcUFFOk0pYOwsE5DMVhE3kwCMFtsCFKcnoPZK7oObm+H5mbnSO/9ioxQ==} dependencies: '@algolia/cache-browser-local-storage': 4.23.2 '@algolia/cache-common': 4.23.2 @@ -5657,148 +4341,97 @@ packages: dev: true /ansi-colors@4.1.3: - resolution: - { - integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} dev: true /ansi-escapes@4.3.2: - resolution: - { - integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} dependencies: type-fest: 0.21.3 dev: true /ansi-html-community@0.0.8: - resolution: - { - integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== - } - engines: { '0': node >= 0.8.0 } + resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} + engines: {'0': node >= 0.8.0} hasBin: true dev: true /ansi-regex@5.0.1: - resolution: - { - integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} dev: true /ansi-regex@6.0.1: - resolution: - { - integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} dev: true /ansi-styles@3.2.1: - resolution: - { - integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} dependencies: color-convert: 1.9.3 dev: true /ansi-styles@4.3.0: - resolution: - { - integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} dependencies: color-convert: 2.0.1 dev: true /ansi-styles@5.2.0: - resolution: - { - integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} dev: true /ansi-styles@6.2.1: - resolution: - { - integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} dev: true /anymatch@3.1.3: - resolution: - { - integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 /arg@4.1.3: - resolution: - { - integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - } + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: true /argparse@1.0.10: - resolution: - { - integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - } + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: sprintf-js: 1.0.3 dev: true /argparse@2.0.1: - resolution: - { - integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - } + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} /array-buffer-byte-length@1.0.1: - resolution: - { - integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 is-array-buffer: 3.0.4 dev: true /array-flatten@1.1.1: - resolution: - { - integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - } + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: true /array-union@2.1.0: - resolution: - { - integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} dev: true /array.prototype.flat@1.3.2: - resolution: - { - integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -5807,11 +4440,8 @@ packages: dev: true /arraybuffer.prototype.slice@1.0.3: - resolution: - { - integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.1 call-bind: 1.0.7 @@ -5824,43 +4454,28 @@ packages: dev: true /arrify@1.0.1: - resolution: - { - integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} dev: true /assertion-error@1.1.0: - resolution: - { - integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - } + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} dev: true /ast-types@0.13.4: - resolution: - { - integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} dependencies: tslib: 2.6.2 dev: true /asynckit@0.4.0: - resolution: - { - integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - } + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true /autoprefixer@10.4.18(postcss@8.4.35): - resolution: - { - integrity: sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g== - } - engines: { node: ^10 || ^12 || >=14 } + resolution: {integrity: sha512-1DKbDfsr6KUElM6wg+0zRNkB/Q7WcKYAaK+pzXn+Xqmszm/5Xa9coeNdtP88Vi+dPzZnMjhge8GIV49ZQkDa+g==} + engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 @@ -5875,20 +4490,14 @@ packages: dev: true /available-typed-arrays@1.0.7: - resolution: - { - integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} dependencies: possible-typed-array-names: 1.0.0 dev: true /axios@1.6.8: - resolution: - { - integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ== - } + resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} dependencies: follow-redirects: 1.15.6 form-data: 4.0.0 @@ -5898,18 +4507,12 @@ packages: dev: true /b4a@1.6.6: - resolution: - { - integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg== - } + resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} dev: true /babel-loader@9.1.3(@babel/core@7.24.0)(webpack@5.90.3): - resolution: - { - integrity: sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw== - } - engines: { node: '>= 14.15.0' } + resolution: {integrity: sha512-xG3ST4DglodGf8qSwv0MdeWLhrDsw/32QMdTO5T1ZIp9gQur0HkCyFs7Awskr10JKXFXwpAhiCuYX5oGXnRGbw==} + engines: {node: '>= 14.15.0'} peerDependencies: '@babel/core': ^7.12.0 webpack: '>=5' @@ -5921,11 +4524,8 @@ packages: dev: true /babel-plugin-istanbul@6.1.1: - resolution: - { - integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} + engines: {node: '>=8'} dependencies: '@babel/helper-plugin-utils': 7.24.0 '@istanbuljs/load-nyc-config': 1.1.0 @@ -5937,10 +4537,7 @@ packages: dev: true /babel-plugin-polyfill-corejs2@0.4.10(@babel/core@7.24.0): - resolution: - { - integrity: sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ== - } + resolution: {integrity: sha512-rpIuu//y5OX6jVU+a5BCn1R5RSZYWAl2Nar76iwaOdycqb6JPxediskWFMMl7stfwNJR4b7eiQvh5fB5TEQJTQ==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: @@ -5953,10 +4550,7 @@ packages: dev: true /babel-plugin-polyfill-corejs3@0.9.0(@babel/core@7.24.0): - resolution: - { - integrity: sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg== - } + resolution: {integrity: sha512-7nZPG1uzK2Ymhy/NbaOWTg3uibM2BmGASS4vHS4szRZAIR8R6GwA/xAujpdrXU5iyklrimWnLWU+BLF9suPTqg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: @@ -5968,10 +4562,7 @@ packages: dev: true /babel-plugin-polyfill-regenerator@0.5.5(@babel/core@7.24.0): - resolution: - { - integrity: sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg== - } + resolution: {integrity: sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: @@ -5982,26 +4573,17 @@ packages: dev: true /balanced-match@1.0.2: - resolution: - { - integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - } + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true /bare-events@2.2.2: - resolution: - { - integrity: sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ== - } + resolution: {integrity: sha512-h7z00dWdG0PYOQEvChhOSWvOfkIKsdZGkWr083FgN/HyoQuebSew/cgirYqh9SCuy/hRvxc5Vy6Fw8xAmYHLkQ==} requiresBuild: true dev: true optional: true /bare-fs@2.2.3: - resolution: - { - integrity: sha512-amG72llr9pstfXOBOHve1WjiuKKAMnebcmMbPWDZ7BCevAoJLpugjuAPRsDINEyjT0a6tbaVx3DctkXIRbLuJw== - } + resolution: {integrity: sha512-amG72llr9pstfXOBOHve1WjiuKKAMnebcmMbPWDZ7BCevAoJLpugjuAPRsDINEyjT0a6tbaVx3DctkXIRbLuJw==} requiresBuild: true dependencies: bare-events: 2.2.2 @@ -6011,19 +4593,13 @@ packages: optional: true /bare-os@2.2.1: - resolution: - { - integrity: sha512-OwPyHgBBMkhC29Hl3O4/YfxW9n7mdTr2+SsO29XBWKKJsbgj3mnorDB80r5TiCQgQstgE5ga1qNYrpes6NvX2w== - } + resolution: {integrity: sha512-OwPyHgBBMkhC29Hl3O4/YfxW9n7mdTr2+SsO29XBWKKJsbgj3mnorDB80r5TiCQgQstgE5ga1qNYrpes6NvX2w==} requiresBuild: true dev: true optional: true /bare-path@2.1.1: - resolution: - { - integrity: sha512-OHM+iwRDRMDBsSW7kl3dO62JyHdBKO3B25FB9vNQBPcGHMo4+eA8Yj41Lfbk3pS/seDY+siNge0LdRTulAau/A== - } + resolution: {integrity: sha512-OHM+iwRDRMDBsSW7kl3dO62JyHdBKO3B25FB9vNQBPcGHMo4+eA8Yj41Lfbk3pS/seDY+siNge0LdRTulAau/A==} requiresBuild: true dependencies: bare-os: 2.2.1 @@ -6031,56 +4607,35 @@ packages: optional: true /base64-js@1.5.1: - resolution: - { - integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - } + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: true /basic-ftp@5.0.5: - resolution: - { - integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg== - } - engines: { node: '>=10.0.0' } + resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} + engines: {node: '>=10.0.0'} dev: true /batch@0.6.1: - resolution: - { - integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== - } + resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==} dev: true /better-path-resolve@1.0.0: - resolution: - { - integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} dependencies: is-windows: 1.0.2 dev: true /big.js@5.2.2: - resolution: - { - integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - } + resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} dev: true /binary-extensions@2.3.0: - resolution: - { - integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} /bl@4.1.0: - resolution: - { - integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - } + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: buffer: 5.7.1 inherits: 2.0.4 @@ -6088,11 +4643,8 @@ packages: dev: true /body-parser@1.20.2: - resolution: - { - integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - } - engines: { node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16 } + resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dependencies: bytes: 3.1.2 content-type: 1.0.5 @@ -6111,65 +4663,44 @@ packages: dev: true /bonjour-service@1.2.1: - resolution: - { - integrity: sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw== - } + resolution: {integrity: sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==} dependencies: fast-deep-equal: 3.1.3 multicast-dns: 7.2.5 dev: true /boolbase@1.0.0: - resolution: - { - integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - } + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} dev: true /brace-expansion@1.1.11: - resolution: - { - integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - } + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 dev: true /brace-expansion@2.0.1: - resolution: - { - integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - } + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 dev: true /braces@3.0.2: - resolution: - { - integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} dependencies: fill-range: 7.0.1 /breakword@1.0.6: - resolution: - { - integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw== - } + resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} dependencies: wcwidth: 1.0.1 dev: true /browserslist@4.23.0: - resolution: - { - integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== - } - engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 } + resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: caniuse-lite: 1.0.30001606 @@ -6179,67 +4710,43 @@ packages: dev: true /buffer-crc32@0.2.13: - resolution: - { - integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== - } + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} dev: true /buffer-from@1.1.2: - resolution: - { - integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - } + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: true /buffer@5.7.1: - resolution: - { - integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - } + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 dev: true /builtin-modules@3.3.0: - resolution: - { - integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} dev: true /builtins@5.1.0: - resolution: - { - integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg== - } + resolution: {integrity: sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==} dependencies: semver: 7.6.0 dev: true /bytes@3.0.0: - resolution: - { - integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} + engines: {node: '>= 0.8'} dev: true /bytes@3.1.2: - resolution: - { - integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} dev: true /c12@1.10.0: - resolution: - { - integrity: sha512-0SsG7UDhoRWcuSvKWHaXmu5uNjDCDN3nkQLRL4Q42IlFy+ze58FcCoI3uPwINXinkz7ZinbhEgyzYFw9u9ZV8g== - } + resolution: {integrity: sha512-0SsG7UDhoRWcuSvKWHaXmu5uNjDCDN3nkQLRL4Q42IlFy+ze58FcCoI3uPwINXinkz7ZinbhEgyzYFw9u9ZV8g==} dependencies: chokidar: 3.6.0 confbox: 0.1.3 @@ -6256,19 +4763,13 @@ packages: dev: false /cac@6.7.14: - resolution: - { - integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} dev: true /cacache@18.0.2: - resolution: - { - integrity: sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@npmcli/fs': 3.1.0 fs-minipass: 3.0.3 @@ -6285,11 +4786,8 @@ packages: dev: true /call-bind@1.0.7: - resolution: - { - integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 @@ -6299,19 +4797,13 @@ packages: dev: true /callsites@3.1.0: - resolution: - { - integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} dev: true /camelcase-keys@6.2.2: - resolution: - { - integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} dependencies: camelcase: 5.3.1 map-obj: 4.3.0 @@ -6319,34 +4811,22 @@ packages: dev: true /camelcase@5.3.1: - resolution: - { - integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} dev: true /camelcase@8.0.0: - resolution: - { - integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA== - } - engines: { node: '>=16' } + resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} + engines: {node: '>=16'} dev: false /caniuse-lite@1.0.30001606: - resolution: - { - integrity: sha512-LPbwnW4vfpJId225pwjZJOgX1m9sGfbw/RKJvw/t0QhYOOaTXHvkjVGFGPpvwEzufrjvTlsULnVTxdy4/6cqkg== - } + resolution: {integrity: sha512-LPbwnW4vfpJId225pwjZJOgX1m9sGfbw/RKJvw/t0QhYOOaTXHvkjVGFGPpvwEzufrjvTlsULnVTxdy4/6cqkg==} dev: true /chai@4.4.1: - resolution: - { - integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} + engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 check-error: 1.0.3 @@ -6358,11 +4838,8 @@ packages: dev: true /chalk@2.4.2: - resolution: - { - integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} dependencies: ansi-styles: 3.2.1 escape-string-regexp: 1.0.5 @@ -6370,46 +4847,31 @@ packages: dev: true /chalk@4.1.2: - resolution: - { - integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 dev: true /chalk@5.3.0: - resolution: - { - integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== - } - engines: { node: ^12.17.0 || ^14.13 || >=16.0.0 } + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} dev: true /chardet@0.7.0: - resolution: - { - integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - } + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true /check-error@1.0.3: - resolution: - { - integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== - } + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} dependencies: get-func-name: 2.0.2 dev: true /chokidar@3.6.0: - resolution: - { - integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== - } - engines: { node: '>= 8.10.0' } + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} dependencies: anymatch: 3.1.3 braces: 3.0.2 @@ -6422,25 +4884,16 @@ packages: fsevents: 2.3.3 /chownr@2.0.0: - resolution: - { - integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} /chrome-trace-event@1.0.3: - resolution: - { - integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== - } - engines: { node: '>=6.0' } + resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} + engines: {node: '>=6.0'} dev: true /chromium-bidi@0.5.17(devtools-protocol@0.0.1262051): - resolution: - { - integrity: sha512-BqOuIWUgTPj8ayuBFJUYCCuwIcwjBsb3/614P7tt1bEPJ4i1M0kCdIl0Wi9xhtswBXnfO2bTpTMkHD71H8rJMg== - } + resolution: {integrity: sha512-BqOuIWUgTPj8ayuBFJUYCCuwIcwjBsb3/614P7tt1bEPJ4i1M0kCdIl0Wi9xhtswBXnfO2bTpTMkHD71H8rJMg==} peerDependencies: devtools-protocol: '*' dependencies: @@ -6451,61 +4904,40 @@ packages: dev: true /ci-info@3.9.0: - resolution: - { - integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} dev: true /citty@0.1.6: - resolution: - { - integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ== - } + resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} dependencies: consola: 3.2.3 dev: false /clean-stack@2.2.0: - resolution: - { - integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} dev: true /cli-cursor@3.1.0: - resolution: - { - integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} dependencies: restore-cursor: 3.1.0 dev: true /cli-spinners@2.9.2: - resolution: - { - integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} dev: true /cli-width@4.1.0: - resolution: - { - integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ== - } - engines: { node: '>= 12' } + resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} + engines: {node: '>= 12'} dev: true /cliui@6.0.0: - resolution: - { - integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== - } + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 @@ -6513,11 +4945,8 @@ packages: dev: true /cliui@8.0.1: - resolution: - { - integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 @@ -6525,11 +4954,8 @@ packages: dev: true /clone-deep@4.0.1: - resolution: - { - integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} + engines: {node: '>=6'} dependencies: is-plain-object: 2.0.4 kind-of: 6.0.3 @@ -6537,108 +4963,69 @@ packages: dev: true /clone@1.0.4: - resolution: - { - integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - } - engines: { node: '>=0.8' } + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} dev: true /color-convert@1.9.3: - resolution: - { - integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - } + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 dev: true /color-convert@2.0.1: - resolution: - { - integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - } - engines: { node: '>=7.0.0' } + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 dev: true /color-name@1.1.3: - resolution: - { - integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - } + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: true /color-name@1.1.4: - resolution: - { - integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - } + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true /colorette@2.0.20: - resolution: - { - integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== - } + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true /combined-stream@1.0.8: - resolution: - { - integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 dev: true /commander@12.0.0: - resolution: - { - integrity: sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==} + engines: {node: '>=18'} dev: false /commander@2.20.3: - resolution: - { - integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - } + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true /common-path-prefix@3.0.0: - resolution: - { - integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== - } + resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} dev: true /commondir@1.0.1: - resolution: - { - integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - } + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true /compressible@2.0.18: - resolution: - { - integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} + engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 dev: true /compression@1.7.4: - resolution: - { - integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==} + engines: {node: '>= 0.8.0'} dependencies: accepts: 1.3.8 bytes: 3.0.0 @@ -6652,97 +5039,61 @@ packages: dev: true /concat-map@0.0.1: - resolution: - { - integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - } + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true /confbox@0.1.3: - resolution: - { - integrity: sha512-eH3ZxAihl1PhKfpr4VfEN6/vUd87fmgb6JkldHgg/YR6aEBhW63qUDgzP2Y6WM0UumdsYp5H3kibalXAdHfbgg== - } + resolution: {integrity: sha512-eH3ZxAihl1PhKfpr4VfEN6/vUd87fmgb6JkldHgg/YR6aEBhW63qUDgzP2Y6WM0UumdsYp5H3kibalXAdHfbgg==} dev: false /connect-history-api-fallback@2.0.0: - resolution: - { - integrity: sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== - } - engines: { node: '>=0.8' } + resolution: {integrity: sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==} + engines: {node: '>=0.8'} dev: true /consola@3.2.3: - resolution: - { - integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ== - } - engines: { node: ^14.18.0 || >=16.10.0 } + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} dev: false /content-disposition@0.5.4: - resolution: - { - integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} dependencies: safe-buffer: 5.2.1 dev: true /content-type@1.0.5: - resolution: - { - integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} dev: true /convert-source-map@1.9.0: - resolution: - { - integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - } + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true /convert-source-map@2.0.0: - resolution: - { - integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - } + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true /cookie-signature@1.0.6: - resolution: - { - integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - } + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: true /cookie@0.6.0: - resolution: - { - integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} dev: true /copy-anything@2.0.6: - resolution: - { - integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw== - } + resolution: {integrity: sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==} dependencies: is-what: 3.14.1 dev: true /copy-webpack-plugin@11.0.0(webpack@5.90.3): - resolution: - { - integrity: sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ== - } - engines: { node: '>= 14.15.0' } + resolution: {integrity: sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==} + engines: {node: '>= 14.15.0'} peerDependencies: webpack: ^5.1.0 dependencies: @@ -6756,27 +5107,18 @@ packages: dev: true /core-js-compat@3.36.1: - resolution: - { - integrity: sha512-Dk997v9ZCt3X/npqzyGdTlq6t7lDBhZwGvV94PKzDArjp7BTRm7WlDAXYd/OWdeFHO8OChQYRJNJvUCqCbrtKA== - } + resolution: {integrity: sha512-Dk997v9ZCt3X/npqzyGdTlq6t7lDBhZwGvV94PKzDArjp7BTRm7WlDAXYd/OWdeFHO8OChQYRJNJvUCqCbrtKA==} dependencies: browserslist: 4.23.0 dev: true /core-util-is@1.0.3: - resolution: - { - integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - } + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true /cosmiconfig@9.0.0(typescript@5.4.5): - resolution: - { - integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} + engines: {node: '>=14'} peerDependencies: typescript: '>=4.9.5' peerDependenciesMeta: @@ -6791,17 +5133,11 @@ packages: dev: true /create-require@1.1.1: - resolution: - { - integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - } + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true /critters@0.0.22: - resolution: - { - integrity: sha512-NU7DEcQZM2Dy8XTKFHxtdnIM/drE312j2T4PCVaSUcS0oBeyT/NImpRw/Ap0zOr/1SE7SgPK9tGPg1WK/sVakw== - } + resolution: {integrity: sha512-NU7DEcQZM2Dy8XTKFHxtdnIM/drE312j2T4PCVaSUcS0oBeyT/NImpRw/Ap0zOr/1SE7SgPK9tGPg1WK/sVakw==} dependencies: chalk: 4.1.2 css-select: 5.1.0 @@ -6813,10 +5149,7 @@ packages: dev: true /cross-spawn@5.1.0: - resolution: - { - integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A== - } + resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: lru-cache: 4.1.5 shebang-command: 1.2.0 @@ -6824,22 +5157,16 @@ packages: dev: true /cross-spawn@7.0.3: - resolution: - { - integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 /css-loader@6.10.0(webpack@5.90.3): - resolution: - { - integrity: sha512-LTSA/jWbwdMlk+rhmElbDR2vbtQoTBPr7fkJE+mxrHj+7ru0hUmHafDRzWIjIHTwpitWVaqY2/UWGRca3yUgRw== - } - engines: { node: '>= 12.13.0' } + resolution: {integrity: sha512-LTSA/jWbwdMlk+rhmElbDR2vbtQoTBPr7fkJE+mxrHj+7ru0hUmHafDRzWIjIHTwpitWVaqY2/UWGRca3yUgRw==} + engines: {node: '>= 12.13.0'} peerDependencies: '@rspack/core': 0.x || 1.x webpack: ^5.0.0 @@ -6861,10 +5188,7 @@ packages: dev: true /css-select@5.1.0: - resolution: - { - integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - } + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} dependencies: boolbase: 1.0.0 css-what: 6.1.0 @@ -6874,56 +5198,35 @@ packages: dev: true /css-what@6.1.0: - resolution: - { - integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - } - engines: { node: '>= 6' } + resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} + engines: {node: '>= 6'} dev: true /cssesc@3.0.0: - resolution: - { - integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} hasBin: true dev: true /csstype@3.1.3: - resolution: - { - integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== - } + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} dev: true /csv-generate@3.4.3: - resolution: - { - integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw== - } + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} dev: true /csv-parse@4.16.3: - resolution: - { - integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg== - } + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} dev: true /csv-stringify@5.6.5: - resolution: - { - integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A== - } + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} dev: true /csv@5.5.3: - resolution: - { - integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g== - } - engines: { node: '>= 0.1.90' } + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} dependencies: csv-generate: 3.4.3 csv-parse: 4.16.3 @@ -6932,27 +5235,18 @@ packages: dev: true /data-uri-to-buffer@4.0.1: - resolution: - { - integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A== - } - engines: { node: '>= 12' } + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} dev: true /data-uri-to-buffer@6.0.2: - resolution: - { - integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} + engines: {node: '>= 14'} dev: true /data-view-buffer@1.0.1: - resolution: - { - integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -6960,11 +5254,8 @@ packages: dev: true /data-view-byte-length@1.0.1: - resolution: - { - integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -6972,11 +5263,8 @@ packages: dev: true /data-view-byte-offset@1.0.0: - resolution: - { - integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -6984,17 +5272,11 @@ packages: dev: true /dataloader@1.4.0: - resolution: - { - integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw== - } + resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} dev: true /debug@2.6.9: - resolution: - { - integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - } + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -7005,11 +5287,8 @@ packages: dev: true /debug@4.3.4: - resolution: - { - integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - } - engines: { node: '>=6.0' } + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -7020,74 +5299,50 @@ packages: dev: true /decamelize-keys@1.1.1: - resolution: - { - integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} dependencies: decamelize: 1.2.0 map-obj: 1.0.1 dev: true /decamelize@1.2.0: - resolution: - { - integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} dev: true /deep-eql@4.1.3: - resolution: - { - integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} dependencies: type-detect: 4.0.8 dev: true /deep-is@0.1.4: - resolution: - { - integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - } + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true /deepmerge@4.3.1: - resolution: - { - integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} dev: true /default-gateway@6.0.3: - resolution: - { - integrity: sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== - } - engines: { node: '>= 10' } + resolution: {integrity: sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==} + engines: {node: '>= 10'} dependencies: execa: 5.1.1 dev: true /defaults@1.0.4: - resolution: - { - integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - } + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} dependencies: clone: 1.0.4 dev: true /define-data-property@1.1.4: - resolution: - { - integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 @@ -7095,19 +5350,13 @@ packages: dev: true /define-lazy-prop@2.0.0: - resolution: - { - integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} dev: true /define-properties@1.2.1: - resolution: - { - integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.4 has-property-descriptors: 1.0.2 @@ -7115,18 +5364,12 @@ packages: dev: true /defu@6.1.4: - resolution: - { - integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== - } + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} dev: false /degenerator@5.0.1: - resolution: - { - integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} dependencies: ast-types: 0.13.4 escodegen: 2.1.0 @@ -7134,107 +5377,68 @@ packages: dev: true /delayed-stream@1.0.0: - resolution: - { - integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - } - engines: { node: '>=0.4.0' } + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} dev: true /depd@1.1.2: - resolution: - { - integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} + engines: {node: '>= 0.6'} dev: true /depd@2.0.0: - resolution: - { - integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} dev: true /destr@2.0.3: - resolution: - { - integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ== - } + resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} dev: false /destroy@1.2.0: - resolution: - { - integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - } - engines: { node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16 } + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} dev: true /detect-indent@6.1.0: - resolution: - { - integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} dev: true /detect-node@2.1.0: - resolution: - { - integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== - } + resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} dev: true /devtools-protocol@0.0.1262051: - resolution: - { - integrity: sha512-YJe4CT5SA8on3Spa+UDtNhEqtuV6Epwz3OZ4HQVLhlRccpZ9/PAYk0/cy/oKxFKRrZPBUPyxympQci4yWNWZ9g== - } + resolution: {integrity: sha512-YJe4CT5SA8on3Spa+UDtNhEqtuV6Epwz3OZ4HQVLhlRccpZ9/PAYk0/cy/oKxFKRrZPBUPyxympQci4yWNWZ9g==} dev: true /diff-sequences@29.6.3: - resolution: - { - integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - } - engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true /diff@4.0.2: - resolution: - { - integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - } - engines: { node: '>=0.3.1' } + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} dev: true /dir-glob@3.0.1: - resolution: - { - integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} dependencies: path-type: 4.0.0 dev: true /dns-packet@5.6.1: - resolution: - { - integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==} + engines: {node: '>=6'} dependencies: '@leichtgewicht/ip-codec': 2.0.5 dev: true /dom-serializer@2.0.0: - resolution: - { - integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - } + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 @@ -7242,27 +5446,18 @@ packages: dev: true /domelementtype@2.3.0: - resolution: - { - integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - } + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} dev: true /domhandler@5.0.3: - resolution: - { - integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - } - engines: { node: '>= 4' } + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} dependencies: domelementtype: 2.3.0 dev: true /domutils@3.1.0: - resolution: - { - integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== - } + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} dependencies: dom-serializer: 2.0.0 domelementtype: 2.3.0 @@ -7270,68 +5465,41 @@ packages: dev: true /dotenv@16.4.5: - resolution: - { - integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} /eastasianwidth@0.2.0: - resolution: - { - integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== - } + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true /ee-first@1.1.1: - resolution: - { - integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - } + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: true /electron-to-chromium@1.4.729: - resolution: - { - integrity: sha512-bx7+5Saea/qu14kmPTDHQxkp2UnziG3iajUQu3BxFvCOnpAJdDbMV4rSl+EqFDkkpNNVUFlR1kDfpL59xfy1HA== - } + resolution: {integrity: sha512-bx7+5Saea/qu14kmPTDHQxkp2UnziG3iajUQu3BxFvCOnpAJdDbMV4rSl+EqFDkkpNNVUFlR1kDfpL59xfy1HA==} dev: true /emoji-regex@8.0.0: - resolution: - { - integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - } + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true /emoji-regex@9.2.2: - resolution: - { - integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - } + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true /emojis-list@3.0.0: - resolution: - { - integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - } - engines: { node: '>= 4' } + resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} + engines: {node: '>= 4'} dev: true /encodeurl@1.0.2: - resolution: - { - integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} dev: true /encoding@0.1.13: - resolution: - { - integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - } + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} requiresBuild: true dependencies: iconv-lite: 0.6.3 @@ -7339,64 +5507,43 @@ packages: optional: true /end-of-stream@1.4.4: - resolution: - { - integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - } + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: once: 1.4.0 dev: true /enhanced-resolve@5.16.0: - resolution: - { - integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== - } - engines: { node: '>=10.13.0' } + resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==} + engines: {node: '>=10.13.0'} dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 dev: true /enquirer@2.4.1: - resolution: - { - integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== - } - engines: { node: '>=8.6' } + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} dependencies: ansi-colors: 4.1.3 strip-ansi: 6.0.1 dev: true /entities@4.5.0: - resolution: - { - integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - } - engines: { node: '>=0.12' } + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} dev: true /env-paths@2.2.1: - resolution: - { - integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} dev: true /err-code@2.0.3: - resolution: - { - integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== - } + resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} dev: true /errno@0.1.8: - resolution: - { - integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - } + resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} hasBin: true requiresBuild: true dependencies: @@ -7405,20 +5552,14 @@ packages: optional: true /error-ex@1.3.2: - resolution: - { - integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - } + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 dev: true /es-abstract@1.23.3: - resolution: - { - integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.1 arraybuffer.prototype.slice: 1.0.3 @@ -7469,46 +5610,31 @@ packages: dev: true /es-define-property@1.0.0: - resolution: - { - integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 dev: true /es-errors@1.3.0: - resolution: - { - integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} dev: true /es-module-lexer@1.5.0: - resolution: - { - integrity: sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw== - } + resolution: {integrity: sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==} dev: true /es-object-atoms@1.0.0: - resolution: - { - integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} dependencies: es-errors: 1.3.0 dev: true /es-set-tostringtag@2.0.3: - resolution: - { - integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.4 has-tostringtag: 1.0.2 @@ -7516,20 +5642,14 @@ packages: dev: true /es-shim-unscopables@1.0.2: - resolution: - { - integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== - } + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: hasown: 2.0.2 dev: true /es-to-primitive@1.2.1: - resolution: - { - integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} dependencies: is-callable: 1.2.7 is-date-object: 1.0.5 @@ -7537,20 +5657,14 @@ packages: dev: true /esbuild-wasm@0.20.1: - resolution: - { - integrity: sha512-6v/WJubRsjxBbQdz6izgvx7LsVFvVaGmSdwrFHmEzoVgfXL89hkKPoQHsnVI2ngOkcBUQT9kmAM1hVL1k/Av4A== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-6v/WJubRsjxBbQdz6izgvx7LsVFvVaGmSdwrFHmEzoVgfXL89hkKPoQHsnVI2ngOkcBUQT9kmAM1hVL1k/Av4A==} + engines: {node: '>=12'} hasBin: true dev: true /esbuild@0.19.12: - resolution: - { - integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: @@ -7580,11 +5694,8 @@ packages: dev: true /esbuild@0.20.1: - resolution: - { - integrity: sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==} + engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: @@ -7614,11 +5725,8 @@ packages: dev: true /esbuild@0.20.2: - resolution: - { - integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} + engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: @@ -7648,42 +5756,27 @@ packages: dev: true /escalade@3.1.2: - resolution: - { - integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} dev: true /escape-html@1.0.3: - resolution: - { - integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - } + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} dev: true /escape-string-regexp@1.0.5: - resolution: - { - integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - } - engines: { node: '>=0.8.0' } + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} dev: true /escape-string-regexp@4.0.0: - resolution: - { - integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} dev: true /escodegen@2.1.0: - resolution: - { - integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w== - } - engines: { node: '>=6.0' } + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} hasBin: true dependencies: esprima: 4.0.1 @@ -7694,10 +5787,7 @@ packages: dev: true /eslint-config-prettier@9.1.0(eslint@9.0.0): - resolution: - { - integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== - } + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -7706,10 +5796,7 @@ packages: dev: true /eslint-plugin-simple-import-sort@12.1.0(eslint@9.0.0): - resolution: - { - integrity: sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig== - } + resolution: {integrity: sha512-Y2fqAfC11TcG/WP3TrI1Gi3p3nc8XJyEOJYHyEPEGI/UAgNx6akxxlX74p7SbAQdLcgASKhj8M0GKvH3vq/+ig==} peerDependencies: eslint: '>=5.0.0' dependencies: @@ -7717,11 +5804,8 @@ packages: dev: true /eslint-plugin-sort-keys-fix@1.1.2: - resolution: - { - integrity: sha512-DNPHFGCA0/hZIsfODbeLZqaGY/+q3vgtshF85r+YWDNCQ2apd9PNs/zL6ttKm0nD1IFwvxyg3YOTI7FHl4unrw== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-DNPHFGCA0/hZIsfODbeLZqaGY/+q3vgtshF85r+YWDNCQ2apd9PNs/zL6ttKm0nD1IFwvxyg3YOTI7FHl4unrw==} + engines: {node: '>=0.10.0'} dependencies: espree: 6.2.1 esutils: 2.0.3 @@ -7730,57 +5814,39 @@ packages: dev: true /eslint-scope@5.1.1: - resolution: - { - integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - } - engines: { node: '>=8.0.0' } + resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} + engines: {node: '>=8.0.0'} dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 dev: true /eslint-scope@8.0.1: - resolution: - { - integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og== - } - engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } + resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 dev: true /eslint-visitor-keys@1.3.0: - resolution: - { - integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} + engines: {node: '>=4'} dev: true /eslint-visitor-keys@3.4.3: - resolution: - { - integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - } - engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true /eslint-visitor-keys@4.0.0: - resolution: - { - integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== - } - engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true /eslint@9.0.0: - resolution: - { - integrity: sha512-IMryZ5SudxzQvuod6rUdIUz29qFItWx281VhtFVc2Psy/ZhlCeD/5DT6lBIJ4H3G+iamGJoTln1v+QSuPw0p7Q== - } - engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } + resolution: {integrity: sha512-IMryZ5SudxzQvuod6rUdIUz29qFItWx281VhtFVc2Psy/ZhlCeD/5DT6lBIJ4H3G+iamGJoTln1v+QSuPw0p7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.0.0) @@ -7822,11 +5888,8 @@ packages: dev: true /espree@10.0.1: - resolution: - { - integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== - } - engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } + resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: acorn: 8.11.3 acorn-jsx: 5.3.2(acorn@8.11.3) @@ -7834,11 +5897,8 @@ packages: dev: true /espree@6.2.1: - resolution: - { - integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== - } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==} + engines: {node: '>=6.0.0'} dependencies: acorn: 7.4.1 acorn-jsx: 5.3.2(acorn@7.4.1) @@ -7846,103 +5906,67 @@ packages: dev: true /esprima@4.0.1: - resolution: - { - integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} hasBin: true dev: true /esquery@1.5.0: - resolution: - { - integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - } - engines: { node: '>=0.10' } + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 dev: true /esrecurse@4.3.0: - resolution: - { - integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - } - engines: { node: '>=4.0' } + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} dependencies: estraverse: 5.3.0 dev: true /estraverse@4.3.0: - resolution: - { - integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - } - engines: { node: '>=4.0' } + resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} + engines: {node: '>=4.0'} dev: true /estraverse@5.3.0: - resolution: - { - integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - } - engines: { node: '>=4.0' } + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} dev: true /estree-walker@2.0.2: - resolution: - { - integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - } + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: true /estree-walker@3.0.3: - resolution: - { - integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== - } + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} dependencies: '@types/estree': 1.0.5 dev: true /esutils@2.0.3: - resolution: - { - integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} dev: true /etag@1.8.1: - resolution: - { - integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} dev: true /eventemitter3@4.0.7: - resolution: - { - integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - } + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} dev: true /events@3.3.0: - resolution: - { - integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - } - engines: { node: '>=0.8.x' } + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} dev: true /execa@5.1.1: - resolution: - { - integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} dependencies: cross-spawn: 7.0.3 get-stream: 6.0.1 @@ -7956,11 +5980,8 @@ packages: dev: true /execa@8.0.1: - resolution: - { - integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== - } - engines: { node: '>=16.17' } + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} dependencies: cross-spawn: 7.0.3 get-stream: 8.0.1 @@ -7973,18 +5994,12 @@ packages: strip-final-newline: 3.0.0 /exponential-backoff@3.1.1: - resolution: - { - integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== - } + resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} dev: true /express@4.19.2: - resolution: - { - integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q== - } - engines: { node: '>= 0.10.0' } + resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==} + engines: {node: '>= 0.10.0'} dependencies: accepts: 1.3.8 array-flatten: 1.1.1 @@ -8022,18 +6037,12 @@ packages: dev: true /extendable-error@0.1.7: - resolution: - { - integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg== - } + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} dev: true /external-editor@3.1.0: - resolution: - { - integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} dependencies: chardet: 0.7.0 iconv-lite: 0.4.24 @@ -8041,11 +6050,8 @@ packages: dev: true /extract-zip@2.0.1: - resolution: - { - integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== - } - engines: { node: '>= 10.17.0' } + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} hasBin: true dependencies: debug: 4.3.4 @@ -8058,25 +6064,16 @@ packages: dev: true /fast-deep-equal@3.1.3: - resolution: - { - integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - } + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true /fast-fifo@1.3.2: - resolution: - { - integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== - } + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} dev: true /fast-glob@3.3.2: - resolution: - { - integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== - } - engines: { node: '>=8.6.0' } + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 '@nodelib/fs.walk': 1.2.8 @@ -8086,93 +6083,63 @@ packages: dev: true /fast-json-stable-stringify@2.1.0: - resolution: - { - integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - } + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true /fast-levenshtein@2.0.6: - resolution: - { - integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - } + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true /fastq@1.17.1: - resolution: - { - integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== - } + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} dependencies: reusify: 1.0.4 dev: true /faye-websocket@0.11.4: - resolution: - { - integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== - } - engines: { node: '>=0.8.0' } + resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} + engines: {node: '>=0.8.0'} dependencies: websocket-driver: 0.7.4 dev: true /fd-slicer@1.1.0: - resolution: - { - integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== - } + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} dependencies: pend: 1.2.0 dev: true /fetch-blob@3.2.0: - resolution: - { - integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - } - engines: { node: ^12.20 || >= 14.13 } + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} dependencies: node-domexception: 1.0.0 web-streams-polyfill: 3.3.3 dev: true /figures@3.2.0: - resolution: - { - integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} dependencies: escape-string-regexp: 1.0.5 dev: true /file-entry-cache@8.0.0: - resolution: - { - integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== - } - engines: { node: '>=16.0.0' } + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} dependencies: flat-cache: 4.0.1 dev: true /fill-range@7.0.1: - resolution: - { - integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 /finalhandler@1.2.0: - resolution: - { - integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} + engines: {node: '>= 0.8'} dependencies: debug: 2.6.9 encodeurl: 1.0.2 @@ -8186,99 +6153,69 @@ packages: dev: true /find-cache-dir@4.0.0: - resolution: - { - integrity: sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg== - } - engines: { node: '>=14.16' } + resolution: {integrity: sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==} + engines: {node: '>=14.16'} dependencies: common-path-prefix: 3.0.0 pkg-dir: 7.0.0 dev: true /find-up@4.1.0: - resolution: - { - integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} dependencies: locate-path: 5.0.0 path-exists: 4.0.0 dev: true /find-up@5.0.0: - resolution: - { - integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} dependencies: locate-path: 6.0.0 path-exists: 4.0.0 dev: true /find-up@6.3.0: - resolution: - { - integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: locate-path: 7.2.0 path-exists: 5.0.0 dev: true /find-yarn-workspace-root2@1.2.16: - resolution: - { - integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA== - } + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} dependencies: micromatch: 4.0.5 pkg-dir: 4.2.0 dev: true /flat-cache@4.0.1: - resolution: - { - integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== - } - engines: { node: '>=16' } + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} dependencies: flatted: 3.3.1 keyv: 4.5.4 dev: true /flat@5.0.2: - resolution: - { - integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - } + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true /flatted@3.3.1: - resolution: - { - integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== - } + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} dev: true /focus-trap@7.5.4: - resolution: - { - integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w== - } + resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} dependencies: tabbable: 6.2.0 dev: true /follow-redirects@1.15.6: - resolution: - { - integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== - } - engines: { node: '>=4.0' } + resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + engines: {node: '>=4.0'} peerDependencies: debug: '*' peerDependenciesMeta: @@ -8287,31 +6224,22 @@ packages: dev: true /for-each@0.3.3: - resolution: - { - integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - } + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 dev: true /foreground-child@3.1.1: - resolution: - { - integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 dev: true /form-data@4.0.0: - resolution: - { - integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - } - engines: { node: '>= 6' } + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -8319,44 +6247,29 @@ packages: dev: true /formdata-polyfill@4.0.10: - resolution: - { - integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - } - engines: { node: '>=12.20.0' } + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} dependencies: fetch-blob: 3.2.0 dev: true /forwarded@0.2.0: - resolution: - { - integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} dev: true /fraction.js@4.3.7: - resolution: - { - integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew== - } + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} dev: true /fresh@0.5.2: - resolution: - { - integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} dev: true /fs-extra@11.2.0: - resolution: - { - integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== - } - engines: { node: '>=14.14' } + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} dependencies: graceful-fs: 4.2.11 jsonfile: 6.1.0 @@ -8364,11 +6277,8 @@ packages: dev: true /fs-extra@7.0.1: - resolution: - { - integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - } - engines: { node: '>=6 <7 || >=8' } + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} dependencies: graceful-fs: 4.2.11 jsonfile: 4.0.0 @@ -8376,11 +6286,8 @@ packages: dev: true /fs-extra@8.1.0: - resolution: - { - integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - } - engines: { node: '>=6 <7 || >=8' } + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} dependencies: graceful-fs: 4.2.11 jsonfile: 4.0.0 @@ -8388,61 +6295,40 @@ packages: dev: true /fs-minipass@2.1.0: - resolution: - { - integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} dependencies: minipass: 3.3.6 /fs-minipass@3.0.3: - resolution: - { - integrity: sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: minipass: 7.0.4 dev: true /fs-monkey@1.0.5: - resolution: - { - integrity: sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew== - } + resolution: {integrity: sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==} dev: true /fs.realpath@1.0.0: - resolution: - { - integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - } + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true /fsevents@2.3.3: - resolution: - { - integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - } - engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true optional: true /function-bind@1.1.2: - resolution: - { - integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - } + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: true /function.prototype.name@1.1.6: - resolution: - { - integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -8451,41 +6337,26 @@ packages: dev: true /functions-have-names@1.2.3: - resolution: - { - integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - } + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true /gensync@1.0.0-beta.2: - resolution: - { - integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - } - engines: { node: '>=6.9.0' } + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} dev: true /get-caller-file@2.0.5: - resolution: - { - integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - } - engines: { node: 6.* || 8.* || >= 10.* } + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} dev: true /get-func-name@2.0.2: - resolution: - { - integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== - } + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: true /get-intrinsic@1.2.4: - resolution: - { - integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} dependencies: es-errors: 1.3.0 function-bind: 1.1.2 @@ -8495,44 +6366,29 @@ packages: dev: true /get-package-type@0.1.0: - resolution: - { - integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - } - engines: { node: '>=8.0.0' } + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} dev: true /get-stream@5.2.0: - resolution: - { - integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} dependencies: pump: 3.0.0 dev: true /get-stream@6.0.1: - resolution: - { - integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} dev: true /get-stream@8.0.1: - resolution: - { - integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== - } - engines: { node: '>=16' } + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} /get-symbol-description@1.0.2: - resolution: - { - integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -8540,11 +6396,8 @@ packages: dev: true /get-uri@6.0.3: - resolution: - { - integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==} + engines: {node: '>= 14'} dependencies: basic-ftp: 5.0.5 data-uri-to-buffer: 6.0.2 @@ -8555,10 +6408,7 @@ packages: dev: true /giget@1.2.3: - resolution: - { - integrity: sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA== - } + resolution: {integrity: sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==} hasBin: true dependencies: citty: 0.1.6 @@ -8572,37 +6422,25 @@ packages: dev: false /glob-parent@5.1.2: - resolution: - { - integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - } - engines: { node: '>= 6' } + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 /glob-parent@6.0.2: - resolution: - { - integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - } - engines: { node: '>=10.13.0' } + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 dev: true /glob-to-regexp@0.4.1: - resolution: - { - integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - } + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: true /glob@10.3.12: - resolution: - { - integrity: sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg== - } - engines: { node: '>=16 || 14 >=14.17' } + resolution: {integrity: sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==} + engines: {node: '>=16 || 14 >=14.17'} hasBin: true dependencies: foreground-child: 3.1.1 @@ -8613,10 +6451,7 @@ packages: dev: true /glob@7.2.3: - resolution: - { - integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - } + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -8627,11 +6462,8 @@ packages: dev: true /glob@8.1.0: - resolution: - { - integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 @@ -8641,45 +6473,30 @@ packages: dev: true /globals@11.12.0: - resolution: - { - integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} dev: true /globals@14.0.0: - resolution: - { - integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} dev: true /globals@15.0.0: - resolution: - { - integrity: sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-m/C/yR4mjO6pXDTm9/R/SpYTAIyaUB4EOzcaaMEl7mds7Mshct9GfejiJNQGjHHbdMPey13Kpu4TMbYi9ex1pw==} + engines: {node: '>=18'} dev: true /globalthis@1.0.3: - resolution: - { - integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} dependencies: define-properties: 1.2.1 dev: true /globby@11.1.0: - resolution: - { - integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} dependencies: array-union: 2.1.0 dir-glob: 3.0.1 @@ -8690,11 +6507,8 @@ packages: dev: true /globby@13.2.2: - resolution: - { - integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 fast-glob: 3.3.2 @@ -8704,48 +6518,30 @@ packages: dev: true /gopd@1.0.1: - resolution: - { - integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - } + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: get-intrinsic: 1.2.4 dev: true /graceful-fs@4.2.11: - resolution: - { - integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - } + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true /grapheme-splitter@1.0.4: - resolution: - { - integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - } + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true /graphemer@1.4.0: - resolution: - { - integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - } + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true /handle-thing@2.0.1: - resolution: - { - integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - } + resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==} dev: true /handlebars@4.7.8: - resolution: - { - integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - } - engines: { node: '>=0.4.7' } + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} hasBin: true dependencies: minimist: 1.2.8 @@ -8757,110 +6553,71 @@ packages: dev: false /hard-rejection@2.1.0: - resolution: - { - integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} dev: true /has-bigints@1.0.2: - resolution: - { - integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - } + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true /has-flag@3.0.0: - resolution: - { - integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} dev: true /has-flag@4.0.0: - resolution: - { - integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} dev: true /has-property-descriptors@1.0.2: - resolution: - { - integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== - } + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 dev: true /has-proto@1.0.3: - resolution: - { - integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} dev: true /has-symbols@1.0.3: - resolution: - { - integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} dev: true /has-tostringtag@1.0.2: - resolution: - { - integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true /hasown@2.0.2: - resolution: - { - integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 dev: true /hookable@5.5.3: - resolution: - { - integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ== - } + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} dev: true /hosted-git-info@2.8.9: - resolution: - { - integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - } + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true /hosted-git-info@7.0.1: - resolution: - { - integrity: sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: lru-cache: 10.2.0 dev: true /hpack.js@2.1.6: - resolution: - { - integrity: sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ== - } + resolution: {integrity: sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==} dependencies: inherits: 2.0.4 obuf: 1.1.2 @@ -8869,24 +6626,15 @@ packages: dev: true /html-entities@2.5.2: - resolution: - { - integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA== - } + resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==} dev: true /html-escaper@2.0.2: - resolution: - { - integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - } + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true /htmlparser2@8.0.2: - resolution: - { - integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== - } + resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 @@ -8895,25 +6643,16 @@ packages: dev: true /http-cache-semantics@4.1.1: - resolution: - { - integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - } + resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} dev: true /http-deceiver@1.2.7: - resolution: - { - integrity: sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== - } + resolution: {integrity: sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==} dev: true /http-errors@1.6.3: - resolution: - { - integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==} + engines: {node: '>= 0.6'} dependencies: depd: 1.1.2 inherits: 2.0.3 @@ -8922,11 +6661,8 @@ packages: dev: true /http-errors@2.0.0: - resolution: - { - integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} dependencies: depd: 2.0.0 inherits: 2.0.4 @@ -8936,18 +6672,12 @@ packages: dev: true /http-parser-js@0.5.8: - resolution: - { - integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== - } + resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} dev: true /http-proxy-agent@7.0.2: - resolution: - { - integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.1 debug: 4.3.4 @@ -8956,11 +6686,8 @@ packages: dev: true /http-proxy-middleware@2.0.6(@types/express@4.17.21): - resolution: - { - integrity: sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== - } - engines: { node: '>=12.0.0' } + resolution: {integrity: sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==} + engines: {node: '>=12.0.0'} peerDependencies: '@types/express': ^4.17.13 peerDependenciesMeta: @@ -8978,11 +6705,8 @@ packages: dev: true /http-proxy@1.18.1: - resolution: - { - integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - } - engines: { node: '>=8.0.0' } + resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} + engines: {node: '>=8.0.0'} dependencies: eventemitter3: 4.0.7 follow-redirects: 1.15.6 @@ -8992,11 +6716,8 @@ packages: dev: true /https-proxy-agent@7.0.4: - resolution: - { - integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.1 debug: 4.3.4 @@ -9005,54 +6726,36 @@ packages: dev: true /human-id@1.0.2: - resolution: - { - integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw== - } + resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} dev: true /human-signals@2.1.0: - resolution: - { - integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - } - engines: { node: '>=10.17.0' } + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} dev: true /human-signals@5.0.0: - resolution: - { - integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== - } - engines: { node: '>=16.17.0' } + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} /iconv-lite@0.4.24: - resolution: - { - integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 dev: true /iconv-lite@0.6.3: - resolution: - { - integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} requiresBuild: true dependencies: safer-buffer: 2.1.2 dev: true /icss-utils@5.1.0(postcss@8.4.38): - resolution: - { - integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== - } - engines: { node: ^10 || ^12 || >= 14 } + resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} + engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: @@ -9060,113 +6763,74 @@ packages: dev: true /ieee754@1.2.1: - resolution: - { - integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - } + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true /ignore-walk@6.0.4: - resolution: - { - integrity: sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: minimatch: 9.0.4 dev: true /ignore@5.3.1: - resolution: - { - integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== - } - engines: { node: '>= 4' } + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + engines: {node: '>= 4'} dev: true /image-size@0.5.5: - resolution: - { - integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==} + engines: {node: '>=0.10.0'} hasBin: true requiresBuild: true dev: true optional: true /immutable@4.3.5: - resolution: - { - integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw== - } + resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} dev: true /import-fresh@3.3.0: - resolution: - { - integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 dev: true /imurmurhash@0.1.4: - resolution: - { - integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - } - engines: { node: '>=0.8.19' } + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} dev: true /indent-string@4.0.0: - resolution: - { - integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} dev: true /inflight@1.0.6: - resolution: - { - integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - } + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: once: 1.4.0 wrappy: 1.0.2 dev: true /inherits@2.0.3: - resolution: - { - integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== - } + resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} dev: true /inherits@2.0.4: - resolution: - { - integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - } + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true /ini@4.1.2: - resolution: - { - integrity: sha512-AMB1mvwR1pyBFY/nSevUX6y8nJWS63/SzUKD3JyQn97s4xgIdgQPT75IRouIiBAN4yLQBUShNYVW0+UG25daCw== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-AMB1mvwR1pyBFY/nSevUX6y8nJWS63/SzUKD3JyQn97s4xgIdgQPT75IRouIiBAN4yLQBUShNYVW0+UG25daCw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /inquirer@9.2.15: - resolution: - { - integrity: sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-vI2w4zl/mDluHt9YEQ/543VTCwPKWiHzKtm9dM2V0NdFcqEexDAjUHzO1oA60HRNaVifGXXM1tRRNluLVHa0Kg==} + engines: {node: '>=18'} dependencies: '@ljharb/through': 2.3.13 ansi-escapes: 4.3.2 @@ -9186,11 +6850,8 @@ packages: dev: true /internal-slot@1.0.7: - resolution: - { - integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} dependencies: es-errors: 1.3.0 hasown: 2.0.2 @@ -9198,417 +6859,273 @@ packages: dev: true /ip-address@9.0.5: - resolution: - { - integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== - } - engines: { node: '>= 12' } + resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} + engines: {node: '>= 12'} dependencies: jsbn: 1.1.0 sprintf-js: 1.1.3 dev: true /ipaddr.js@1.9.1: - resolution: - { - integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - } - engines: { node: '>= 0.10' } + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} dev: true /ipaddr.js@2.1.0: - resolution: - { - integrity: sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ== - } - engines: { node: '>= 10' } + resolution: {integrity: sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==} + engines: {node: '>= 10'} dev: true /is-array-buffer@3.0.4: - resolution: - { - integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 dev: true /is-arrayish@0.2.1: - resolution: - { - integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - } + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true /is-bigint@1.0.4: - resolution: - { - integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - } + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: has-bigints: 1.0.2 dev: true /is-binary-path@2.1.0: - resolution: - { - integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} dependencies: binary-extensions: 2.3.0 /is-boolean-object@1.1.2: - resolution: - { - integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 dev: true /is-builtin-module@3.2.1: - resolution: - { - integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} dependencies: builtin-modules: 3.3.0 dev: true /is-callable@1.2.7: - resolution: - { - integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} dev: true /is-core-module@2.13.1: - resolution: - { - integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== - } + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: hasown: 2.0.2 dev: true /is-data-view@1.0.1: - resolution: - { - integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} dependencies: is-typed-array: 1.1.13 dev: true /is-date-object@1.0.5: - resolution: - { - integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 dev: true /is-docker@2.2.1: - resolution: - { - integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} hasBin: true dev: true /is-extglob@2.1.1: - resolution: - { - integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} /is-fullwidth-code-point@3.0.0: - resolution: - { - integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} dev: true /is-glob@4.0.3: - resolution: - { - integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 /is-interactive@1.0.0: - resolution: - { - integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} dev: true /is-lambda@1.0.1: - resolution: - { - integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== - } + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} dev: true /is-module@1.0.0: - resolution: - { - integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== - } + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} dev: true /is-negative-zero@2.0.3: - resolution: - { - integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} dev: true /is-number-object@1.0.7: - resolution: - { - integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 dev: true /is-number@7.0.0: - resolution: - { - integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - } - engines: { node: '>=0.12.0' } + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} /is-path-inside@3.0.3: - resolution: - { - integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} dev: true /is-plain-obj@1.1.0: - resolution: - { - integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} dev: true /is-plain-obj@3.0.0: - resolution: - { - integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==} + engines: {node: '>=10'} dev: true /is-plain-object@2.0.4: - resolution: - { - integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} + engines: {node: '>=0.10.0'} dependencies: isobject: 3.0.1 dev: true /is-reference@1.2.1: - resolution: - { - integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== - } + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} dependencies: '@types/estree': 1.0.5 dev: true /is-regex@1.1.4: - resolution: - { - integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 dev: true /is-shared-array-buffer@1.0.3: - resolution: - { - integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 dev: true /is-stream@2.0.1: - resolution: - { - integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} dev: true /is-stream@3.0.0: - resolution: - { - integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} /is-string@1.0.7: - resolution: - { - integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.2 dev: true /is-subdir@1.2.0: - resolution: - { - integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} dependencies: better-path-resolve: 1.0.0 dev: true /is-symbol@1.0.4: - resolution: - { - integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: true /is-typed-array@1.1.13: - resolution: - { - integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} dependencies: which-typed-array: 1.1.15 dev: true /is-unicode-supported@0.1.0: - resolution: - { - integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} dev: true /is-weakref@1.0.2: - resolution: - { - integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== - } + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: call-bind: 1.0.7 dev: true /is-what@3.14.1: - resolution: - { - integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== - } + resolution: {integrity: sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==} dev: true /is-windows@1.0.2: - resolution: - { - integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} dev: true /is-wsl@2.2.0: - resolution: - { - integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} dependencies: is-docker: 2.2.1 dev: true /isarray@1.0.0: - resolution: - { - integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - } + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: true /isarray@2.0.5: - resolution: - { - integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - } + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true /isexe@2.0.0: - resolution: - { - integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - } + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} /isexe@3.1.1: - resolution: - { - integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== - } - engines: { node: '>=16' } + resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} + engines: {node: '>=16'} dev: true /isobject@3.0.1: - resolution: - { - integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} + engines: {node: '>=0.10.0'} dev: true /istanbul-lib-coverage@3.2.2: - resolution: - { - integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} dev: true /istanbul-lib-instrument@5.2.1: - resolution: - { - integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} + engines: {node: '>=8'} dependencies: '@babel/core': 7.24.0 '@babel/parser': 7.24.4 @@ -9620,11 +7137,8 @@ packages: dev: true /istanbul-lib-report@3.0.1: - resolution: - { - integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} dependencies: istanbul-lib-coverage: 3.2.2 make-dir: 4.0.0 @@ -9632,11 +7146,8 @@ packages: dev: true /istanbul-lib-source-maps@5.0.4: - resolution: - { - integrity: sha512-wHOoEsNJTVltaJp8eVkm8w+GVkVNHT2YDYo53YdzQEL2gWm1hBX5cGFR9hQJtuGLebidVX7et3+dmDZrmclduw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-wHOoEsNJTVltaJp8eVkm8w+GVkVNHT2YDYo53YdzQEL2gWm1hBX5cGFR9hQJtuGLebidVX7et3+dmDZrmclduw==} + engines: {node: '>=10'} dependencies: '@jridgewell/trace-mapping': 0.3.25 debug: 4.3.4 @@ -9646,22 +7157,16 @@ packages: dev: true /istanbul-reports@3.1.7: - resolution: - { - integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 dev: true /jackspeak@2.3.6: - resolution: - { - integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: @@ -9669,11 +7174,8 @@ packages: dev: true /jest-worker@27.5.1: - resolution: - { - integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - } - engines: { node: '>= 10.13.0' } + resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} + engines: {node: '>= 10.13.0'} dependencies: '@types/node': 20.12.7 merge-stream: 2.0.0 @@ -9681,32 +7183,20 @@ packages: dev: true /jiti@1.21.0: - resolution: - { - integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== - } + resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} hasBin: true /js-tokens@4.0.0: - resolution: - { - integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - } + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} requiresBuild: true dev: true /js-tokens@9.0.0: - resolution: - { - integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ== - } + resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} dev: true /js-yaml@3.14.1: - resolution: - { - integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - } + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true dependencies: argparse: 1.0.10 @@ -9714,110 +7204,68 @@ packages: dev: true /js-yaml@4.1.0: - resolution: - { - integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - } + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true dependencies: argparse: 2.0.1 /jsbn@1.1.0: - resolution: - { - integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== - } + resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} dev: true /jsesc@0.5.0: - resolution: - { - integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== - } + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true dev: true /jsesc@2.5.2: - resolution: - { - integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} hasBin: true dev: true /json-buffer@3.0.1: - resolution: - { - integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - } + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true /json-parse-even-better-errors@2.3.1: - resolution: - { - integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - } + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true /json-parse-even-better-errors@3.0.1: - resolution: - { - integrity: sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-aatBvbL26wVUCLmbWdCpeu9iF5wOyWpagiKkInA+kfws3sWdBrTnsvN2CKcyCYyUrc7rebNBlK6+kteg7ksecg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /json-schema-traverse@0.4.1: - resolution: - { - integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - } + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true /json-schema-traverse@1.0.0: - resolution: - { - integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - } + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} dev: true /json-stable-stringify-without-jsonify@1.0.1: - resolution: - { - integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - } + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true /json5@2.2.3: - resolution: - { - integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} hasBin: true dev: true /jsonc-parser@3.2.1: - resolution: - { - integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== - } + resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} /jsonfile@4.0.0: - resolution: - { - integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - } + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: graceful-fs: 4.2.11 dev: true /jsonfile@6.1.0: - resolution: - { - integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - } + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: universalify: 2.0.1 optionalDependencies: @@ -9825,71 +7273,47 @@ packages: dev: true /jsonparse@1.3.1: - resolution: - { - integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== - } - engines: { '0': node >= 0.2.0 } + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} dev: true /karma-source-map-support@1.4.0: - resolution: - { - integrity: sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A== - } + resolution: {integrity: sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==} dependencies: source-map-support: 0.5.21 dev: true /keyv@4.5.4: - resolution: - { - integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - } + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: json-buffer: 3.0.1 dev: true /kind-of@6.0.3: - resolution: - { - integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} dev: true /kleur@4.1.5: - resolution: - { - integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} dev: true /klona@2.0.6: - resolution: - { - integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} + engines: {node: '>= 8'} dev: true /launch-editor@2.6.1: - resolution: - { - integrity: sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw== - } + resolution: {integrity: sha512-eB/uXmFVpY4zezmGp5XtU21kwo7GBbKB+EQ+UZeWtGb9yAM5xt/Evk+lYH3eRNAtId+ej4u7TYPFZ07w4s7rRw==} dependencies: picocolors: 1.0.0 shell-quote: 1.8.1 dev: true /less-loader@11.1.0(less@4.2.0)(webpack@5.90.3): - resolution: - { - integrity: sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug== - } - engines: { node: '>= 14.15.0' } + resolution: {integrity: sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug==} + engines: {node: '>= 14.15.0'} peerDependencies: less: ^3.5.0 || ^4.0.0 webpack: ^5.0.0 @@ -9900,11 +7324,8 @@ packages: dev: true /less@4.2.0: - resolution: - { - integrity: sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==} + engines: {node: '>=6'} hasBin: true dependencies: copy-anything: 2.0.6 @@ -9921,21 +7342,15 @@ packages: dev: true /levn@0.4.1: - resolution: - { - integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 dev: true /license-webpack-plugin@4.0.2(webpack@5.90.3): - resolution: - { - integrity: sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw== - } + resolution: {integrity: sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==} peerDependencies: webpack: '*' peerDependenciesMeta: @@ -9947,18 +7362,12 @@ packages: dev: true /lines-and-columns@1.2.4: - resolution: - { - integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - } + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true /load-yaml-file@0.2.0: - resolution: - { - integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} dependencies: graceful-fs: 4.2.11 js-yaml: 3.14.1 @@ -9967,19 +7376,13 @@ packages: dev: true /loader-runner@4.3.0: - resolution: - { - integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - } - engines: { node: '>=6.11.5' } + resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} + engines: {node: '>=6.11.5'} dev: true /loader-utils@2.0.4: - resolution: - { - integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== - } - engines: { node: '>=8.9.0' } + resolution: {integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==} + engines: {node: '>=8.9.0'} dependencies: big.js: 5.2.2 emojis-list: 3.0.0 @@ -9987,173 +7390,116 @@ packages: dev: true /loader-utils@3.2.1: - resolution: - { - integrity: sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== - } - engines: { node: '>= 12.13.0' } + resolution: {integrity: sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==} + engines: {node: '>= 12.13.0'} dev: true /local-pkg@0.5.0: - resolution: - { - integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} dependencies: mlly: 1.6.1 pkg-types: 1.0.3 dev: true /locate-path@5.0.0: - resolution: - { - integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} dependencies: p-locate: 4.1.0 dev: true /locate-path@6.0.0: - resolution: - { - integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} dependencies: p-locate: 5.0.0 dev: true /locate-path@7.2.0: - resolution: - { - integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: p-locate: 6.0.0 dev: true /lodash.debounce@4.0.8: - resolution: - { - integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== - } + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: true /lodash.merge@4.6.2: - resolution: - { - integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - } + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true /lodash.startcase@4.4.0: - resolution: - { - integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg== - } + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true /lodash@4.17.21: - resolution: - { - integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - } + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} requiresBuild: true dev: true /log-symbols@4.1.0: - resolution: - { - integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} dependencies: chalk: 4.1.2 is-unicode-supported: 0.1.0 dev: true /loupe@2.3.7: - resolution: - { - integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== - } + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: get-func-name: 2.0.2 dev: true /lru-cache@10.2.0: - resolution: - { - integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== - } - engines: { node: 14 || >=16.14 } + resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} + engines: {node: 14 || >=16.14} dev: true /lru-cache@4.1.5: - resolution: - { - integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - } + resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} dependencies: pseudomap: 1.0.2 yallist: 2.1.2 dev: true /lru-cache@5.1.1: - resolution: - { - integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - } + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: yallist: 3.1.1 dev: true /lru-cache@6.0.0: - resolution: - { - integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} dependencies: yallist: 4.0.0 dev: true /lru-cache@7.18.3: - resolution: - { - integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} dev: true /magic-string@0.30.8: - resolution: - { - integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} + engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 dev: true /magic-string@0.30.9: - resolution: - { - integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==} + engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 dev: true /magicast@0.3.3: - resolution: - { - integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw== - } + resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==} dependencies: '@babel/parser': 7.24.4 '@babel/types': 7.24.0 @@ -10161,11 +7507,8 @@ packages: dev: true /make-dir@2.1.0: - resolution: - { - integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} + engines: {node: '>=6'} requiresBuild: true dependencies: pify: 4.0.1 @@ -10174,28 +7517,19 @@ packages: optional: true /make-dir@4.0.0: - resolution: - { - integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} dependencies: semver: 7.6.0 dev: true /make-error@1.3.6: - resolution: - { - integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - } + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true /make-fetch-happen@13.0.0: - resolution: - { - integrity: sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@npmcli/agent': 2.2.2 cacache: 18.0.2 @@ -10213,52 +7547,34 @@ packages: dev: true /map-obj@1.0.1: - resolution: - { - integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} dev: true /map-obj@4.3.0: - resolution: - { - integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} dev: true /mark.js@8.11.1: - resolution: - { - integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ== - } + resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} dev: true /media-typer@0.3.0: - resolution: - { - integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} dev: true /memfs@3.5.3: - resolution: - { - integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw== - } - engines: { node: '>= 4.0.0' } + resolution: {integrity: sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==} + engines: {node: '>= 4.0.0'} dependencies: fs-monkey: 1.0.5 dev: true /meow@6.1.1: - resolution: - { - integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} dependencies: '@types/minimist': 1.2.5 camelcase-keys: 6.2.2 @@ -10274,101 +7590,65 @@ packages: dev: true /merge-descriptors@1.0.1: - resolution: - { - integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - } + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: true /merge-stream@2.0.0: - resolution: - { - integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - } + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} /merge2@1.4.1: - resolution: - { - integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} dev: true /methods@1.1.2: - resolution: - { - integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} dev: true /micromatch@4.0.5: - resolution: - { - integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - } - engines: { node: '>=8.6' } + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} dependencies: braces: 3.0.2 picomatch: 2.3.1 dev: true /mime-db@1.52.0: - resolution: - { - integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} dev: true /mime-types@2.1.35: - resolution: - { - integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 dev: true /mime@1.6.0: - resolution: - { - integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} hasBin: true dev: true /mimic-fn@2.1.0: - resolution: - { - integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} dev: true /mimic-fn@4.0.0: - resolution: - { - integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} /min-indent@1.0.1: - resolution: - { - integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} dev: true /mini-css-extract-plugin@2.8.1(webpack@5.90.3): - resolution: - { - integrity: sha512-/1HDlyFRxWIZPI1ZpgqlZ8jMw/1Dp/dl3P0L1jtZ+zVcHqwPhGwaJwKL00WVgfnBy6PWCde9W65or7IIETImuA== - } - engines: { node: '>= 12.13.0' } + resolution: {integrity: sha512-/1HDlyFRxWIZPI1ZpgqlZ8jMw/1Dp/dl3P0L1jtZ+zVcHqwPhGwaJwKL00WVgfnBy6PWCde9W65or7IIETImuA==} + engines: {node: '>= 12.13.0'} peerDependencies: webpack: ^5.0.0 dependencies: @@ -10378,47 +7658,32 @@ packages: dev: true /minimalistic-assert@1.0.1: - resolution: - { - integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - } + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} dev: true /minimatch@3.1.2: - resolution: - { - integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - } + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 dev: true /minimatch@5.1.6: - resolution: - { - integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 dev: true /minimatch@9.0.4: - resolution: - { - integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== - } - engines: { node: '>=16 || 14 >=14.17' } + resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + engines: {node: '>=16 || 14 >=14.17'} dependencies: brace-expansion: 2.0.1 dev: true /minimist-options@4.1.0: - resolution: - { - integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== - } - engines: { node: '>= 6' } + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} dependencies: arrify: 1.0.1 is-plain-obj: 1.1.0 @@ -10426,28 +7691,19 @@ packages: dev: true /minimist@1.2.8: - resolution: - { - integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - } + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false /minipass-collect@2.0.1: - resolution: - { - integrity: sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== - } - engines: { node: '>=16 || 14 >=14.17' } + resolution: {integrity: sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==} + engines: {node: '>=16 || 14 >=14.17'} dependencies: minipass: 7.0.4 dev: true /minipass-fetch@3.0.4: - resolution: - { - integrity: sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: minipass: 7.0.4 minipass-sized: 1.0.3 @@ -10457,114 +7713,75 @@ packages: dev: true /minipass-flush@1.0.5: - resolution: - { - integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} + engines: {node: '>= 8'} dependencies: minipass: 3.3.6 dev: true /minipass-json-stream@1.0.1: - resolution: - { - integrity: sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== - } + resolution: {integrity: sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==} dependencies: jsonparse: 1.3.1 minipass: 3.3.6 dev: true /minipass-pipeline@1.2.4: - resolution: - { - integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} + engines: {node: '>=8'} dependencies: minipass: 3.3.6 dev: true /minipass-sized@1.0.3: - resolution: - { - integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} + engines: {node: '>=8'} dependencies: minipass: 3.3.6 dev: true /minipass@3.3.6: - resolution: - { - integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} dependencies: yallist: 4.0.0 /minipass@5.0.0: - resolution: - { - integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} /minipass@7.0.4: - resolution: - { - integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== - } - engines: { node: '>=16 || 14 >=14.17' } + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + engines: {node: '>=16 || 14 >=14.17'} dev: true /minisearch@6.3.0: - resolution: - { - integrity: sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ== - } + resolution: {integrity: sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==} dev: true /minizlib@2.1.2: - resolution: - { - integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} dependencies: minipass: 3.3.6 yallist: 4.0.0 /mitt@3.0.1: - resolution: - { - integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== - } + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} dev: true /mixme@0.5.10: - resolution: - { - integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q== - } - engines: { node: '>= 8.0.0' } + resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} + engines: {node: '>= 8.0.0'} dev: true /mkdirp@1.0.4: - resolution: - { - integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} hasBin: true /mlly@1.6.1: - resolution: - { - integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA== - } + resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} dependencies: acorn: 8.11.3 pathe: 1.1.2 @@ -10572,39 +7789,24 @@ packages: ufo: 1.5.3 /mrmime@2.0.0: - resolution: - { - integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} dev: true /ms@2.0.0: - resolution: - { - integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - } + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: true /ms@2.1.2: - resolution: - { - integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - } + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true /ms@2.1.3: - resolution: - { - integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - } + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: true /multicast-dns@7.2.5: - resolution: - { - integrity: sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== - } + resolution: {integrity: sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==} hasBin: true dependencies: dns-packet: 5.6.1 @@ -10612,35 +7814,23 @@ packages: dev: true /mute-stream@1.0.0: - resolution: - { - integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /nanoid@3.3.7: - resolution: - { - integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== - } - engines: { node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 } + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true /natural-compare@1.4.0: - resolution: - { - integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - } + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true /needle@3.3.1: - resolution: - { - integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q== - } - engines: { node: '>= 4.4.x' } + resolution: {integrity: sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==} + engines: {node: '>= 4.4.x'} hasBin: true requiresBuild: true dependencies: @@ -10650,32 +7840,20 @@ packages: optional: true /negotiator@0.6.3: - resolution: - { - integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} dev: true /neo-async@2.6.2: - resolution: - { - integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - } + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} /netmask@2.0.2: - resolution: - { - integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== - } - engines: { node: '>= 0.4.0' } + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} dev: true /nice-napi@1.0.2: - resolution: - { - integrity: sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA== - } + resolution: {integrity: sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==} os: ['!win32'] requiresBuild: true dependencies: @@ -10685,35 +7863,23 @@ packages: optional: true /node-addon-api@3.2.1: - resolution: - { - integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== - } + resolution: {integrity: sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==} requiresBuild: true dev: true optional: true /node-domexception@1.0.0: - resolution: - { - integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - } - engines: { node: '>=10.5.0' } + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} dev: true /node-fetch-native@1.6.4: - resolution: - { - integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ== - } + resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} dev: false /node-fetch@2.7.0: - resolution: - { - integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== - } - engines: { node: 4.x || >=6.0.0 } + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 peerDependenciesMeta: @@ -10724,11 +7890,8 @@ packages: dev: true /node-fetch@3.3.2: - resolution: - { - integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: data-uri-to-buffer: 4.0.1 fetch-blob: 3.2.0 @@ -10736,29 +7899,20 @@ packages: dev: true /node-forge@1.3.1: - resolution: - { - integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - } - engines: { node: '>= 6.13.0' } + resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} + engines: {node: '>= 6.13.0'} dev: true /node-gyp-build@4.8.0: - resolution: - { - integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== - } + resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} hasBin: true requiresBuild: true dev: true optional: true /node-gyp@10.1.0: - resolution: - { - integrity: sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==} + engines: {node: ^16.14.0 || >=18.0.0} hasBin: true dependencies: env-paths: 2.2.1 @@ -10776,28 +7930,19 @@ packages: dev: true /node-releases@2.0.14: - resolution: - { - integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== - } + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true /nopt@7.2.0: - resolution: - { - integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} hasBin: true dependencies: abbrev: 2.0.0 dev: true /normalize-package-data@2.5.0: - resolution: - { - integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - } + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 resolve: 1.22.8 @@ -10806,11 +7951,8 @@ packages: dev: true /normalize-package-data@6.0.0: - resolution: - { - integrity: sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: hosted-git-info: 7.0.1 is-core-module: 2.13.1 @@ -10819,54 +7961,36 @@ packages: dev: true /normalize-path@3.0.0: - resolution: - { - integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} /normalize-range@0.1.2: - resolution: - { - integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} dev: true /npm-bundled@3.0.0: - resolution: - { - integrity: sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: npm-normalize-package-bin: 3.0.1 dev: true /npm-install-checks@6.3.0: - resolution: - { - integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: semver: 7.6.0 dev: true /npm-normalize-package-bin@3.0.1: - resolution: - { - integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /npm-package-arg@11.0.1: - resolution: - { - integrity: sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: hosted-git-info: 7.0.1 proc-log: 3.0.0 @@ -10875,21 +7999,15 @@ packages: dev: true /npm-packlist@8.0.2: - resolution: - { - integrity: sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: ignore-walk: 6.0.4 dev: true /npm-pick-manifest@9.0.0: - resolution: - { - integrity: sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: npm-install-checks: 6.3.0 npm-normalize-package-bin: 3.0.1 @@ -10898,11 +8016,8 @@ packages: dev: true /npm-registry-fetch@16.2.0: - resolution: - { - integrity: sha512-zVH+G0q1O2hqgQBUvQ2LWp6ujr6VJAeDnmWxqiMlCguvLexEzBnuQIwC70r04vcvCMAcYEIpA/rO9YyVi+fmJQ== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-zVH+G0q1O2hqgQBUvQ2LWp6ujr6VJAeDnmWxqiMlCguvLexEzBnuQIwC70r04vcvCMAcYEIpA/rO9YyVi+fmJQ==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@npmcli/redact': 1.1.0 make-fetch-happen: 13.0.0 @@ -10917,39 +8032,27 @@ packages: dev: true /npm-run-path@4.0.1: - resolution: - { - integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} dependencies: path-key: 3.1.1 dev: true /npm-run-path@5.3.0: - resolution: - { - integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: path-key: 4.0.0 /nth-check@2.1.1: - resolution: - { - integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - } + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} dependencies: boolbase: 1.0.0 dev: true /nypm@0.3.8: - resolution: - { - integrity: sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og== - } - engines: { node: ^14.16.0 || >=16.10.0 } + resolution: {integrity: sha512-IGWlC6So2xv6V4cIDmoV0SwwWx7zLG086gyqkyumteH2fIgCAM4nDVFB2iDRszDvmdSVW9xb1N+2KjQ6C7d4og==} + engines: {node: ^14.16.0 || >=16.10.0} hasBin: true dependencies: citty: 0.1.6 @@ -10960,26 +8063,17 @@ packages: dev: false /object-inspect@1.13.1: - resolution: - { - integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== - } + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true /object-keys@1.1.1: - resolution: - { - integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} dev: true /object.assign@4.1.5: - resolution: - { - integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -10988,71 +8082,47 @@ packages: dev: true /obuf@1.1.2: - resolution: - { - integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - } + resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} dev: true /ohash@1.1.3: - resolution: - { - integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw== - } + resolution: {integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==} dev: false /on-finished@2.4.1: - resolution: - { - integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} dependencies: ee-first: 1.1.1 dev: true /on-headers@1.0.2: - resolution: - { - integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} + engines: {node: '>= 0.8'} dev: true /once@1.4.0: - resolution: - { - integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - } + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 dev: true /onetime@5.1.2: - resolution: - { - integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} dependencies: mimic-fn: 2.1.0 dev: true /onetime@6.0.0: - resolution: - { - integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} dependencies: mimic-fn: 4.0.0 /open@8.4.2: - resolution: - { - integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} dependencies: define-lazy-prop: 2.0.0 is-docker: 2.2.1 @@ -11060,11 +8130,8 @@ packages: dev: true /optionator@0.9.3: - resolution: - { - integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} dependencies: '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 @@ -11075,11 +8142,8 @@ packages: dev: true /ora@5.4.1: - resolution: - { - integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} dependencies: bl: 4.1.0 chalk: 4.1.2 @@ -11093,143 +8157,98 @@ packages: dev: true /os-tmpdir@1.0.2: - resolution: - { - integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} dev: true /outdent@0.5.0: - resolution: - { - integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q== - } + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} dev: true /p-filter@2.1.0: - resolution: - { - integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} dependencies: p-map: 2.1.0 dev: true /p-limit@2.3.0: - resolution: - { - integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} dependencies: p-try: 2.2.0 dev: true /p-limit@3.1.0: - resolution: - { - integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 dev: true /p-limit@4.0.0: - resolution: - { - integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: yocto-queue: 1.0.0 dev: true /p-limit@5.0.0: - resolution: - { - integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} dependencies: yocto-queue: 1.0.0 dev: true /p-locate@4.1.0: - resolution: - { - integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} dependencies: p-limit: 2.3.0 dev: true /p-locate@5.0.0: - resolution: - { - integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} dependencies: p-limit: 3.1.0 dev: true /p-locate@6.0.0: - resolution: - { - integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: p-limit: 4.0.0 dev: true /p-map@2.1.0: - resolution: - { - integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} dev: true /p-map@4.0.0: - resolution: - { - integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} dependencies: aggregate-error: 3.1.0 dev: true /p-retry@4.6.2: - resolution: - { - integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} + engines: {node: '>=8'} dependencies: '@types/retry': 0.12.0 retry: 0.13.1 dev: true /p-try@2.2.0: - resolution: - { - integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} dev: true /pac-proxy-agent@7.0.1: - resolution: - { - integrity: sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==} + engines: {node: '>= 14'} dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.1 @@ -11244,22 +8263,16 @@ packages: dev: true /pac-resolver@7.0.1: - resolution: - { - integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} + engines: {node: '>= 14'} dependencies: degenerator: 5.0.1 netmask: 2.0.2 dev: true /pacote@17.0.6: - resolution: - { - integrity: sha512-cJKrW21VRE8vVTRskJo78c/RCvwJCn1f4qgfxL4w77SOWrTCRcmfkYHlHtS0gqpgjv3zhXflRtgsrUCX5xwNnQ== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-cJKrW21VRE8vVTRskJo78c/RCvwJCn1f4qgfxL4w77SOWrTCRcmfkYHlHtS0gqpgjv3zhXflRtgsrUCX5xwNnQ==} + engines: {node: ^16.14.0 || >=18.0.0} hasBin: true dependencies: '@npmcli/git': 5.0.4 @@ -11286,21 +8299,15 @@ packages: dev: true /parent-module@1.0.1: - resolution: - { - integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} dependencies: callsites: 3.1.0 dev: true /parse-json@5.2.0: - resolution: - { - integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} dependencies: '@babel/code-frame': 7.24.2 error-ex: 1.3.2 @@ -11309,18 +8316,12 @@ packages: dev: true /parse-node-version@1.0.1: - resolution: - { - integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== - } - engines: { node: '>= 0.10' } + resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} + engines: {node: '>= 0.10'} dev: true /parse5-html-rewriting-stream@7.0.0: - resolution: - { - integrity: sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg== - } + resolution: {integrity: sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg==} dependencies: entities: 4.5.0 parse5: 7.1.2 @@ -11328,212 +8329,134 @@ packages: dev: true /parse5-sax-parser@7.0.0: - resolution: - { - integrity: sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg== - } + resolution: {integrity: sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg==} dependencies: parse5: 7.1.2 dev: true /parse5@7.1.2: - resolution: - { - integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - } + resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} dependencies: entities: 4.5.0 dev: true /parseurl@1.3.3: - resolution: - { - integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} dev: true /path-exists@4.0.0: - resolution: - { - integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} dev: true /path-exists@5.0.0: - resolution: - { - integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== - } - engines: { node: ^12.20.0 || ^14.13.1 || >=16.0.0 } + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true /path-is-absolute@1.0.1: - resolution: - { - integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} dev: true /path-key@3.1.1: - resolution: - { - integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} /path-key@4.0.0: - resolution: - { - integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} /path-parse@1.0.7: - resolution: - { - integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - } + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true /path-scurry@1.10.2: - resolution: - { - integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== - } - engines: { node: '>=16 || 14 >=14.17' } + resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==} + engines: {node: '>=16 || 14 >=14.17'} dependencies: lru-cache: 10.2.0 minipass: 7.0.4 dev: true /path-to-regexp@0.1.7: - resolution: - { - integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - } + resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} dev: true /path-type@4.0.0: - resolution: - { - integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} dev: true /pathe@1.1.2: - resolution: - { - integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== - } + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} /pathval@1.1.1: - resolution: - { - integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - } + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true /pend@1.2.0: - resolution: - { - integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== - } + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true /perfect-debounce@1.0.0: - resolution: - { - integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA== - } + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} /picocolors@1.0.0: - resolution: - { - integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - } + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true /picomatch@2.3.1: - resolution: - { - integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - } - engines: { node: '>=8.6' } + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} /picomatch@4.0.1: - resolution: - { - integrity: sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==} + engines: {node: '>=12'} dev: true /pify@4.0.1: - resolution: - { - integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} requiresBuild: true dev: true /piscina@4.4.0: - resolution: - { - integrity: sha512-+AQduEJefrOApE4bV7KRmp3N2JnnyErlVqq4P/jmko4FPz9Z877BCccl/iB3FdrWSUkvbGV9Kan/KllJgat3Vg== - } + resolution: {integrity: sha512-+AQduEJefrOApE4bV7KRmp3N2JnnyErlVqq4P/jmko4FPz9Z877BCccl/iB3FdrWSUkvbGV9Kan/KllJgat3Vg==} optionalDependencies: nice-napi: 1.0.2 dev: true /pkg-dir@4.2.0: - resolution: - { - integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} dependencies: find-up: 4.1.0 dev: true /pkg-dir@7.0.0: - resolution: - { - integrity: sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA== - } - engines: { node: '>=14.16' } + resolution: {integrity: sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==} + engines: {node: '>=14.16'} dependencies: find-up: 6.3.0 dev: true /pkg-types@1.0.3: - resolution: - { - integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A== - } + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: jsonc-parser: 3.2.1 mlly: 1.6.1 pathe: 1.1.2 /possible-typed-array-names@1.0.0: - resolution: - { - integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} dev: true /postcss-loader@8.1.1(postcss@8.4.35)(typescript@5.4.5)(webpack@5.90.3): - resolution: - { - integrity: sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ== - } - engines: { node: '>= 18.12.0' } + resolution: {integrity: sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ==} + engines: {node: '>= 18.12.0'} peerDependencies: '@rspack/core': 0.x || 1.x postcss: ^7.0.0 || ^8.0.1 @@ -11554,18 +8477,12 @@ packages: dev: true /postcss-media-query-parser@0.2.3: - resolution: - { - integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig== - } + resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==} dev: true /postcss-modules-extract-imports@3.1.0(postcss@8.4.38): - resolution: - { - integrity: sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== - } - engines: { node: ^10 || ^12 || >= 14 } + resolution: {integrity: sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==} + engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: @@ -11573,11 +8490,8 @@ packages: dev: true /postcss-modules-local-by-default@4.0.5(postcss@8.4.38): - resolution: - { - integrity: sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw== - } - engines: { node: ^10 || ^12 || >= 14 } + resolution: {integrity: sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==} + engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: @@ -11588,11 +8502,8 @@ packages: dev: true /postcss-modules-scope@3.2.0(postcss@8.4.38): - resolution: - { - integrity: sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ== - } - engines: { node: ^10 || ^12 || >= 14 } + resolution: {integrity: sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==} + engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: @@ -11601,11 +8512,8 @@ packages: dev: true /postcss-modules-values@4.0.0(postcss@8.4.38): - resolution: - { - integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - } - engines: { node: ^10 || ^12 || >= 14 } + resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} + engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: @@ -11614,29 +8522,20 @@ packages: dev: true /postcss-selector-parser@6.0.16: - resolution: - { - integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==} + engines: {node: '>=4'} dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 dev: true /postcss-value-parser@4.2.0: - resolution: - { - integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - } + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: true /postcss@8.4.35: - resolution: - { - integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== - } - engines: { node: ^10 || ^12 || >=14 } + resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} + engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 picocolors: 1.0.0 @@ -11644,11 +8543,8 @@ packages: dev: true /postcss@8.4.38: - resolution: - { - integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== - } - engines: { node: ^10 || ^12 || >=14 } + resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} + engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 picocolors: 1.0.0 @@ -11656,18 +8552,12 @@ packages: dev: true /preact@10.20.1: - resolution: - { - integrity: sha512-JIFjgFg9B2qnOoGiYMVBtrcFxHqn+dNXbq76bVmcaHYJFYR4lW67AOcXgAYQQTDYXDOg/kTZrKPNCdRgJ2UJmw== - } + resolution: {integrity: sha512-JIFjgFg9B2qnOoGiYMVBtrcFxHqn+dNXbq76bVmcaHYJFYR4lW67AOcXgAYQQTDYXDOg/kTZrKPNCdRgJ2UJmw==} dev: true /preferred-pm@3.1.3: - resolution: - { - integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} + engines: {node: '>=10'} dependencies: find-up: 5.0.0 find-yarn-workspace-root2: 1.2.16 @@ -11676,37 +8566,25 @@ packages: dev: true /prelude-ls@1.2.1: - resolution: - { - integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} dev: true /prettier@2.8.8: - resolution: - { - integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - } - engines: { node: '>=10.13.0' } + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} hasBin: true dev: true /prettier@3.2.5: - resolution: - { - integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + engines: {node: '>=14'} hasBin: true dev: true /pretty-format@29.7.0: - resolution: - { - integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== - } - engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 @@ -11714,33 +8592,21 @@ packages: dev: true /proc-log@3.0.0: - resolution: - { - integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dev: true /process-nextick-args@2.0.1: - resolution: - { - integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - } + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true /progress@2.0.3: - resolution: - { - integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - } - engines: { node: '>=0.4.0' } + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} dev: true /promise-inflight@1.0.1: - resolution: - { - integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== - } + resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} peerDependencies: bluebird: '*' peerDependenciesMeta: @@ -11749,33 +8615,24 @@ packages: dev: true /promise-retry@2.0.1: - resolution: - { - integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} + engines: {node: '>=10'} dependencies: err-code: 2.0.3 retry: 0.12.0 dev: true /proxy-addr@2.0.7: - resolution: - { - integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - } - engines: { node: '>= 0.10' } + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 dev: true /proxy-agent@6.4.0: - resolution: - { - integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.1 debug: 4.3.4 @@ -11790,52 +8647,34 @@ packages: dev: true /proxy-from-env@1.1.0: - resolution: - { - integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - } + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} dev: true /prr@1.0.1: - resolution: - { - integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== - } + resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} requiresBuild: true dev: true optional: true /pseudomap@1.0.2: - resolution: - { - integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== - } + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} dev: true /pump@3.0.0: - resolution: - { - integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - } + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: end-of-stream: 1.4.4 once: 1.4.0 dev: true /punycode@2.3.1: - resolution: - { - integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} dev: true /puppeteer-core@22.6.4: - resolution: - { - integrity: sha512-QtfJwPmqQec3EHc6LqbEz03vSiuVAr9bYp0TV87dLoreev6ZevsXdLgOfQgoA3GocrsSe/eUf7NRPQ1lQfsc3w== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-QtfJwPmqQec3EHc6LqbEz03vSiuVAr9bYp0TV87dLoreev6ZevsXdLgOfQgoA3GocrsSe/eUf7NRPQ1lQfsc3w==} + engines: {node: '>=18'} dependencies: '@puppeteer/browsers': 2.2.1 chromium-bidi: 0.5.17(devtools-protocol@0.0.1262051) @@ -11849,11 +8688,8 @@ packages: dev: true /puppeteer@22.6.4(typescript@5.4.5): - resolution: - { - integrity: sha512-J9hXNwZmuqKDmNMj6kednZH8jzbdX9735NQfQJrq5LRD4nHisAMyW9pCD7glKi+iM7RV9JkesI1MYhdsN+0ZSQ== - } - engines: { node: '>=18' } + resolution: {integrity: sha512-J9hXNwZmuqKDmNMj6kednZH8jzbdX9735NQfQJrq5LRD4nHisAMyW9pCD7glKi+iM7RV9JkesI1MYhdsN+0ZSQ==} + engines: {node: '>=18'} hasBin: true requiresBuild: true dependencies: @@ -11869,61 +8705,40 @@ packages: dev: true /qs@6.11.0: - resolution: - { - integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - } - engines: { node: '>=0.6' } + resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + engines: {node: '>=0.6'} dependencies: side-channel: 1.0.6 dev: true /queue-microtask@1.2.3: - resolution: - { - integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - } + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true /queue-tick@1.0.1: - resolution: - { - integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag== - } + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} requiresBuild: true dev: true /quick-lru@4.0.1: - resolution: - { - integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} dev: true /randombytes@2.1.0: - resolution: - { - integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - } + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: safe-buffer: 5.2.1 dev: true /range-parser@1.2.1: - resolution: - { - integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} dev: true /raw-body@2.5.2: - resolution: - { - integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + engines: {node: '>= 0.8'} dependencies: bytes: 3.1.2 http-errors: 2.0.0 @@ -11932,10 +8747,7 @@ packages: dev: true /rc9@2.1.1: - resolution: - { - integrity: sha512-lNeOl38Ws0eNxpO3+wD1I9rkHGQyj1NU1jlzv4go2CtEnEQEUfqnIvZG7W+bC/aXdJ27n5x/yUjb6RoT9tko+Q== - } + resolution: {integrity: sha512-lNeOl38Ws0eNxpO3+wD1I9rkHGQyj1NU1jlzv4go2CtEnEQEUfqnIvZG7W+bC/aXdJ27n5x/yUjb6RoT9tko+Q==} dependencies: defu: 6.1.4 destr: 2.0.3 @@ -11943,29 +8755,20 @@ packages: dev: false /react-is@18.2.0: - resolution: - { - integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - } + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true /read-package-json-fast@3.0.2: - resolution: - { - integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: json-parse-even-better-errors: 3.0.1 npm-normalize-package-bin: 3.0.1 dev: true /read-package-json@7.0.0: - resolution: - { - integrity: sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: glob: 10.3.12 json-parse-even-better-errors: 3.0.1 @@ -11974,11 +8777,8 @@ packages: dev: true /read-pkg-up@7.0.1: - resolution: - { - integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} dependencies: find-up: 4.1.0 read-pkg: 5.2.0 @@ -11986,11 +8786,8 @@ packages: dev: true /read-pkg@5.2.0: - resolution: - { - integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} dependencies: '@types/normalize-package-data': 2.4.4 normalize-package-data: 2.5.0 @@ -11999,11 +8796,8 @@ packages: dev: true /read-yaml-file@1.1.0: - resolution: - { - integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} dependencies: graceful-fs: 4.2.11 js-yaml: 3.14.1 @@ -12012,10 +8806,7 @@ packages: dev: true /readable-stream@2.3.8: - resolution: - { - integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - } + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: core-util-is: 1.0.3 inherits: 2.0.4 @@ -12027,11 +8818,8 @@ packages: dev: true /readable-stream@3.6.2: - resolution: - { - integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - } - engines: { node: '>= 6' } + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} dependencies: inherits: 2.0.4 string_decoder: 1.3.0 @@ -12039,78 +8827,51 @@ packages: dev: true /readdirp@3.6.0: - resolution: - { - integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - } - engines: { node: '>=8.10.0' } + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 /redent@3.0.0: - resolution: - { - integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} dependencies: indent-string: 4.0.0 strip-indent: 3.0.0 dev: true /reflect-metadata@0.2.2: - resolution: - { - integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q== - } + resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} dev: true /regenerate-unicode-properties@10.1.1: - resolution: - { - integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==} + engines: {node: '>=4'} dependencies: regenerate: 1.4.2 dev: true /regenerate@1.4.2: - resolution: - { - integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - } + resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} dev: true /regenerator-runtime@0.14.1: - resolution: - { - integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== - } + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: true /regenerator-transform@0.15.2: - resolution: - { - integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== - } + resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} dependencies: '@babel/runtime': 7.24.1 dev: true /regex-parser@2.3.0: - resolution: - { - integrity: sha512-TVILVSz2jY5D47F4mA4MppkBrafEaiUWJO/TcZHEIuI13AqoZMkK1WMA4Om1YkYbTx+9Ki1/tSUXbceyr9saRg== - } + resolution: {integrity: sha512-TVILVSz2jY5D47F4mA4MppkBrafEaiUWJO/TcZHEIuI13AqoZMkK1WMA4Om1YkYbTx+9Ki1/tSUXbceyr9saRg==} dev: true /regexp.prototype.flags@1.5.2: - resolution: - { - integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -12119,11 +8880,8 @@ packages: dev: true /regexpu-core@5.3.2: - resolution: - { - integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} + engines: {node: '>=4'} dependencies: '@babel/regjsgen': 0.8.0 regenerate: 1.4.2 @@ -12134,75 +8892,48 @@ packages: dev: true /regjsparser@0.9.1: - resolution: - { - integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== - } + resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} hasBin: true dependencies: jsesc: 0.5.0 dev: true /require-directory@2.1.1: - resolution: - { - integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} dev: true /require-from-string@2.0.2: - resolution: - { - integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} dev: true /require-main-filename@2.0.0: - resolution: - { - integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - } + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} dev: true /requireindex@1.2.0: - resolution: - { - integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== - } - engines: { node: '>=0.10.5' } + resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} + engines: {node: '>=0.10.5'} dev: true /requires-port@1.0.0: - resolution: - { - integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - } + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: true /resolve-from@4.0.0: - resolution: - { - integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} dev: true /resolve-from@5.0.0: - resolution: - { - integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} dev: true /resolve-url-loader@5.0.0: - resolution: - { - integrity: sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==} + engines: {node: '>=12'} dependencies: adjust-sourcemap-loader: 4.0.0 convert-source-map: 1.9.0 @@ -12212,10 +8943,7 @@ packages: dev: true /resolve@1.22.8: - resolution: - { - integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== - } + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: is-core-module: 2.13.1 @@ -12224,74 +8952,50 @@ packages: dev: true /restore-cursor@3.1.0: - resolution: - { - integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} dependencies: onetime: 5.1.2 signal-exit: 3.0.7 dev: true /retry@0.12.0: - resolution: - { - integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - } - engines: { node: '>= 4' } + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} dev: true /retry@0.13.1: - resolution: - { - integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== - } - engines: { node: '>= 4' } + resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} + engines: {node: '>= 4'} dev: true /reusify@1.0.4: - resolution: - { - integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - } - engines: { iojs: '>=1.0.0', node: '>=0.10.0' } + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true /rfdc@1.3.1: - resolution: - { - integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== - } + resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} dev: true /rimraf@3.0.2: - resolution: - { - integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - } + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.2.3 dev: true /rimraf@5.0.5: - resolution: - { - integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} + engines: {node: '>=14'} hasBin: true dependencies: glob: 10.3.12 dev: true /rollup-plugin-dts@6.1.0(rollup@4.14.2)(typescript@5.4.5): - resolution: - { - integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw== - } - engines: { node: '>=16' } + resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} + engines: {node: '>=16'} peerDependencies: rollup: ^3.29.4 || ^4 typescript: ^4.5 || ^5.0 @@ -12304,11 +9008,8 @@ packages: dev: true /rollup@4.14.2: - resolution: - { - integrity: sha512-WkeoTWvuBoFjFAhsEOHKRoZ3r9GfTyhh7Vff1zwebEFLEFjT1lG3784xEgKiTa7E+e70vsC81roVL2MP4tgEEQ== - } - engines: { node: '>=18.0.0', npm: '>=8.0.0' } + resolution: {integrity: sha512-WkeoTWvuBoFjFAhsEOHKRoZ3r9GfTyhh7Vff1zwebEFLEFjT1lG3784xEgKiTa7E+e70vsC81roVL2MP4tgEEQ==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 @@ -12332,37 +9033,25 @@ packages: dev: true /run-async@3.0.0: - resolution: - { - integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q== - } - engines: { node: '>=0.12.0' } + resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} + engines: {node: '>=0.12.0'} dev: true /run-parallel@1.2.0: - resolution: - { - integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - } + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 dev: true /rxjs@7.8.1: - resolution: - { - integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== - } + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: tslib: 2.6.2 dev: true /safe-array-concat@1.1.2: - resolution: - { - integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== - } - engines: { node: '>=0.4' } + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + engines: {node: '>=0.4'} dependencies: call-bind: 1.0.7 get-intrinsic: 1.2.4 @@ -12371,25 +9060,16 @@ packages: dev: true /safe-buffer@5.1.2: - resolution: - { - integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - } + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: true /safe-buffer@5.2.1: - resolution: - { - integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - } + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true /safe-regex-test@1.0.3: - resolution: - { - integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -12397,19 +9077,13 @@ packages: dev: true /safer-buffer@2.1.2: - resolution: - { - integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - } + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} requiresBuild: true dev: true /sass-loader@14.1.1(sass@1.71.1)(webpack@5.90.3): - resolution: - { - integrity: sha512-QX8AasDg75monlybel38BZ49JP5Z+uSKfKwF2rO7S74BywaRmGQMUBw9dtkS+ekyM/QnP+NOrRYq8ABMZ9G8jw== - } - engines: { node: '>= 18.12.0' } + resolution: {integrity: sha512-QX8AasDg75monlybel38BZ49JP5Z+uSKfKwF2rO7S74BywaRmGQMUBw9dtkS+ekyM/QnP+NOrRYq8ABMZ9G8jw==} + engines: {node: '>= 18.12.0'} peerDependencies: '@rspack/core': 0.x || 1.x node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -12434,11 +9108,8 @@ packages: dev: true /sass@1.71.1: - resolution: - { - integrity: sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==} + engines: {node: '>=14.0.0'} hasBin: true dependencies: chokidar: 3.6.0 @@ -12447,20 +9118,14 @@ packages: dev: true /sax@1.3.0: - resolution: - { - integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA== - } + resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} requiresBuild: true dev: true optional: true /schema-utils@3.3.0: - resolution: - { - integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - } - engines: { node: '>= 10.13.0' } + resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} + engines: {node: '>= 10.13.0'} dependencies: '@types/json-schema': 7.0.15 ajv: 6.12.6 @@ -12468,11 +9133,8 @@ packages: dev: true /schema-utils@4.2.0: - resolution: - { - integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== - } - engines: { node: '>= 12.13.0' } + resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} + engines: {node: '>= 12.13.0'} dependencies: '@types/json-schema': 7.0.15 ajv: 8.12.0 @@ -12481,64 +9143,43 @@ packages: dev: true /search-insights@2.13.0: - resolution: - { - integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw== - } + resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} dev: true /select-hose@2.0.0: - resolution: - { - integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== - } + resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==} dev: true /selfsigned@2.4.1: - resolution: - { - integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==} + engines: {node: '>=10'} dependencies: '@types/node-forge': 1.3.11 node-forge: 1.3.1 dev: true /semver@5.7.2: - resolution: - { - integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== - } + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true requiresBuild: true dev: true /semver@6.3.1: - resolution: - { - integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - } + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true dev: true /semver@7.6.0: - resolution: - { - integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} hasBin: true dependencies: lru-cache: 6.0.0 dev: true /send@0.18.0: - resolution: - { - integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + engines: {node: '>= 0.8.0'} dependencies: debug: 2.6.9 depd: 2.0.0 @@ -12558,20 +9199,14 @@ packages: dev: true /serialize-javascript@6.0.2: - resolution: - { - integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== - } + resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} dependencies: randombytes: 2.1.0 dev: true /serve-index@1.9.1: - resolution: - { - integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==} + engines: {node: '>= 0.8.0'} dependencies: accepts: 1.3.8 batch: 0.6.1 @@ -12585,11 +9220,8 @@ packages: dev: true /serve-static@1.15.0: - resolution: - { - integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} + engines: {node: '>= 0.8.0'} dependencies: encodeurl: 1.0.2 escape-html: 1.0.3 @@ -12600,18 +9232,12 @@ packages: dev: true /set-blocking@2.0.0: - resolution: - { - integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - } + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} dev: true /set-function-length@1.2.2: - resolution: - { - integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.4 es-errors: 1.3.0 @@ -12622,11 +9248,8 @@ packages: dev: true /set-function-name@2.0.2: - resolution: - { - integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.4 es-errors: 1.3.0 @@ -12635,85 +9258,55 @@ packages: dev: true /setprototypeof@1.1.0: - resolution: - { - integrity: sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - } + resolution: {integrity: sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==} dev: true /setprototypeof@1.2.0: - resolution: - { - integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - } + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} dev: true /shallow-clone@3.0.1: - resolution: - { - integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} + engines: {node: '>=8'} dependencies: kind-of: 6.0.3 dev: true /shebang-command@1.2.0: - resolution: - { - integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} dependencies: shebang-regex: 1.0.0 dev: true /shebang-command@2.0.0: - resolution: - { - integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 /shebang-regex@1.0.0: - resolution: - { - integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} dev: true /shebang-regex@3.0.0: - resolution: - { - integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} /shell-quote@1.8.1: - resolution: - { - integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== - } + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true /shiki@1.2.4: - resolution: - { - integrity: sha512-Q9n9jKiOjJCRPztA9POn3/uZXNySHDNKAsPNpmtHDcFyi6ZQhx5vQKZW3Nhrwn8TWW3RudSRk66zqY603EZDeg== - } + resolution: {integrity: sha512-Q9n9jKiOjJCRPztA9POn3/uZXNySHDNKAsPNpmtHDcFyi6ZQhx5vQKZW3Nhrwn8TWW3RudSRk66zqY603EZDeg==} dependencies: '@shikijs/core': 1.2.4 dev: true /side-channel@1.0.6: - resolution: - { - integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -12722,32 +9315,20 @@ packages: dev: true /siginfo@2.0.0: - resolution: - { - integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== - } + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} dev: true /signal-exit@3.0.7: - resolution: - { - integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - } + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true /signal-exit@4.1.0: - resolution: - { - integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== - } - engines: { node: '>=14' } + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} /sigstore@2.3.0: - resolution: - { - integrity: sha512-q+o8L2ebiWD1AxD17eglf1pFrl9jtW7FHa0ygqY6EKvibK8JHyq9Z26v9MZXeDiw+RbfOJ9j2v70M10Hd6E06A== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-q+o8L2ebiWD1AxD17eglf1pFrl9jtW7FHa0ygqY6EKvibK8JHyq9Z26v9MZXeDiw+RbfOJ9j2v70M10Hd6E06A==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@sigstore/bundle': 2.3.1 '@sigstore/core': 1.1.0 @@ -12760,35 +9341,23 @@ packages: dev: true /slash@3.0.0: - resolution: - { - integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} dev: true /slash@4.0.0: - resolution: - { - integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} + engines: {node: '>=12'} dev: true /smart-buffer@4.2.0: - resolution: - { - integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - } - engines: { node: '>= 6.0.0', npm: '>= 3.0.0' } + resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} + engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} dev: true /smartwrap@2.0.2: - resolution: - { - integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} hasBin: true dependencies: array.prototype.flat: 1.3.2 @@ -12800,17 +9369,11 @@ packages: dev: true /smob@1.5.0: - resolution: - { - integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig== - } + resolution: {integrity: sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==} dev: true /sockjs@0.3.24: - resolution: - { - integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== - } + resolution: {integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==} dependencies: faye-websocket: 0.11.4 uuid: 8.3.2 @@ -12818,11 +9381,8 @@ packages: dev: true /socks-proxy-agent@8.0.3: - resolution: - { - integrity: sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A== - } - engines: { node: '>= 14' } + resolution: {integrity: sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==} + engines: {node: '>= 14'} dependencies: agent-base: 7.1.1 debug: 4.3.4 @@ -12832,30 +9392,21 @@ packages: dev: true /socks@2.8.1: - resolution: - { - integrity: sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ== - } - engines: { node: '>= 10.0.0', npm: '>= 3.0.0' } + resolution: {integrity: sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} dependencies: ip-address: 9.0.5 smart-buffer: 4.2.0 dev: true /source-map-js@1.2.0: - resolution: - { - integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + engines: {node: '>=0.10.0'} dev: true /source-map-loader@5.0.0(webpack@5.90.3): - resolution: - { - integrity: sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA== - } - engines: { node: '>= 18.12.0' } + resolution: {integrity: sha512-k2Dur7CbSLcAH73sBcIkV5xjPV4SzqO1NJ7+XaQl8if3VODDUj3FNchNGpqgJSKbvUfJuhVdv8K2Eu8/TNl2eA==} + engines: {node: '>= 18.12.0'} peerDependencies: webpack: ^5.72.1 dependencies: @@ -12865,79 +9416,52 @@ packages: dev: true /source-map-support@0.5.21: - resolution: - { - integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - } + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: buffer-from: 1.1.2 source-map: 0.6.1 dev: true /source-map@0.6.1: - resolution: - { - integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} /source-map@0.7.4: - resolution: - { - integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} + engines: {node: '>= 8'} dev: true /spawndamnit@2.0.0: - resolution: - { - integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA== - } + resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} dependencies: cross-spawn: 5.1.0 signal-exit: 3.0.7 dev: true /spdx-correct@3.2.0: - resolution: - { - integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== - } + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 spdx-license-ids: 3.0.17 dev: true /spdx-exceptions@2.5.0: - resolution: - { - integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w== - } + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} dev: true /spdx-expression-parse@3.0.1: - resolution: - { - integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - } + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.5.0 spdx-license-ids: 3.0.17 dev: true /spdx-license-ids@3.0.17: - resolution: - { - integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== - } + resolution: {integrity: sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==} dev: true /spdy-transport@3.0.0: - resolution: - { - integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - } + resolution: {integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==} dependencies: debug: 4.3.4 detect-node: 2.1.0 @@ -12950,11 +9474,8 @@ packages: dev: true /spdy@4.0.2: - resolution: - { - integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - } - engines: { node: '>=6.0.0' } + resolution: {integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==} + engines: {node: '>=6.0.0'} dependencies: debug: 4.3.4 handle-thing: 2.0.1 @@ -12966,81 +9487,51 @@ packages: dev: true /speakingurl@14.0.1: - resolution: - { - integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ== - } - engines: { node: '>=0.10.0' } + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} dev: true /sprintf-js@1.0.3: - resolution: - { - integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - } + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true /sprintf-js@1.1.3: - resolution: - { - integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== - } + resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} dev: true /ssri@10.0.5: - resolution: - { - integrity: sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: minipass: 7.0.4 dev: true /stackback@0.0.2: - resolution: - { - integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== - } + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true /statuses@1.5.0: - resolution: - { - integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} + engines: {node: '>= 0.6'} dev: true /statuses@2.0.1: - resolution: - { - integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} dev: true /std-env@3.7.0: - resolution: - { - integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== - } + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} dev: true /stream-transform@2.1.3: - resolution: - { - integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ== - } + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} dependencies: mixme: 0.5.10 dev: true /streamx@2.16.1: - resolution: - { - integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ== - } + resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -13049,11 +9540,8 @@ packages: dev: true /string-width@4.2.3: - resolution: - { - integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 @@ -13061,11 +9549,8 @@ packages: dev: true /string-width@5.1.2: - resolution: - { - integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 @@ -13073,11 +9558,8 @@ packages: dev: true /string.prototype.trim@1.2.9: - resolution: - { - integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -13086,10 +9568,7 @@ packages: dev: true /string.prototype.trimend@1.0.8: - resolution: - { - integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== - } + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -13097,11 +9576,8 @@ packages: dev: true /string.prototype.trimstart@1.0.8: - resolution: - { - integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 define-properties: 1.2.1 @@ -13109,159 +9585,105 @@ packages: dev: true /string_decoder@1.1.1: - resolution: - { - integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - } + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 dev: true /string_decoder@1.3.0: - resolution: - { - integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - } + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 dev: true /strip-ansi@6.0.1: - resolution: - { - integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 dev: true /strip-ansi@7.1.0: - resolution: - { - integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} dependencies: ansi-regex: 6.0.1 dev: true /strip-bom@3.0.0: - resolution: - { - integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} dev: true /strip-final-newline@2.0.0: - resolution: - { - integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} dev: true /strip-final-newline@3.0.0: - resolution: - { - integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} /strip-indent@3.0.0: - resolution: - { - integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} dependencies: min-indent: 1.0.1 dev: true /strip-json-comments@3.1.1: - resolution: - { - integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} dev: true /strip-literal@2.1.0: - resolution: - { - integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw== - } + resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} dependencies: js-tokens: 9.0.0 dev: true /supports-color@5.5.0: - resolution: - { - integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} dependencies: has-flag: 3.0.0 dev: true /supports-color@7.2.0: - resolution: - { - integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} dependencies: has-flag: 4.0.0 dev: true /supports-color@8.1.1: - resolution: - { - integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} dependencies: has-flag: 4.0.0 dev: true /supports-preserve-symlinks-flag@1.0.0: - resolution: - { - integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} dev: true /symbol-observable@4.0.0: - resolution: - { - integrity: sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== - } - engines: { node: '>=0.10' } + resolution: {integrity: sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==} + engines: {node: '>=0.10'} dev: true /tabbable@6.2.0: - resolution: - { - integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew== - } + resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==} dev: true /tapable@2.2.1: - resolution: - { - integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} dev: true /tar-fs@3.0.5: - resolution: - { - integrity: sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg== - } + resolution: {integrity: sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==} dependencies: pump: 3.0.0 tar-stream: 3.1.7 @@ -13271,10 +9693,7 @@ packages: dev: true /tar-stream@3.1.7: - resolution: - { - integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ== - } + resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} dependencies: b4a: 1.6.6 fast-fifo: 1.3.2 @@ -13282,11 +9701,8 @@ packages: dev: true /tar@6.2.1: - resolution: - { - integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} + engines: {node: '>=10'} dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 @@ -13296,19 +9712,13 @@ packages: yallist: 4.0.0 /term-size@2.2.1: - resolution: - { - integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} dev: true /terser-webpack-plugin@5.3.10(esbuild@0.20.1)(webpack@5.90.3): - resolution: - { - integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== - } - engines: { node: '>= 10.13.0' } + resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==} + engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' esbuild: '*' @@ -13332,11 +9742,8 @@ packages: dev: true /terser@5.29.1: - resolution: - { - integrity: sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-lZQ/fyaIGxsbGxApKmoPTODIzELy3++mXhS5hOqaAWZjQtpq/hFHAc+rm29NND1rYRxRWKcjuARNwULNXa5RtQ==} + engines: {node: '>=10'} hasBin: true dependencies: '@jridgewell/source-map': 0.3.6 @@ -13346,11 +9753,8 @@ packages: dev: true /terser@5.30.3: - resolution: - { - integrity: sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==} + engines: {node: '>=10'} hasBin: true dependencies: '@jridgewell/source-map': 0.3.6 @@ -13360,11 +9764,8 @@ packages: dev: true /test-exclude@6.0.0: - resolution: - { - integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} dependencies: '@istanbuljs/schema': 0.1.3 glob: 7.2.3 @@ -13372,113 +9773,71 @@ packages: dev: true /text-table@0.2.0: - resolution: - { - integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - } + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true /through@2.3.8: - resolution: - { - integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - } + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true /thunky@1.1.0: - resolution: - { - integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - } + resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==} dev: true /tinybench@2.6.0: - resolution: - { - integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA== - } + resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} dev: true /tinypool@0.8.3: - resolution: - { - integrity: sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-Ud7uepAklqRH1bvwy22ynrliC7Dljz7Tm8M/0RBUW+YRa4YHhZ6e4PpgE+fu1zr/WqB1kbeuVrdfeuyIBpy4tw==} + engines: {node: '>=14.0.0'} dev: true /tinyspy@2.2.1: - resolution: - { - integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== - } - engines: { node: '>=14.0.0' } + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} dev: true /tmp@0.0.33: - resolution: - { - integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - } - engines: { node: '>=0.6.0' } + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} dependencies: os-tmpdir: 1.0.2 dev: true /to-fast-properties@2.0.0: - resolution: - { - integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} dev: true /to-regex-range@5.0.1: - resolution: - { - integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - } - engines: { node: '>=8.0' } + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 /toidentifier@1.0.1: - resolution: - { - integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - } - engines: { node: '>=0.6' } + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} dev: true /tr46@0.0.3: - resolution: - { - integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - } + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true /tree-kill@1.2.2: - resolution: - { - integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - } + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true dev: true /trim-newlines@3.0.1: - resolution: - { - integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} dev: true /ts-api-utils@1.3.0(typescript@5.4.5): - resolution: - { - integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== - } - engines: { node: '>=16' } + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: @@ -13486,10 +9845,7 @@ packages: dev: true /ts-node@10.9.2(@types/node@20.12.7)(typescript@5.4.5): - resolution: - { - integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== - } + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true peerDependencies: '@swc/core': '>=1.2.50' @@ -13520,18 +9876,12 @@ packages: dev: true /tslib@2.6.2: - resolution: - { - integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - } + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true /tty-table@4.2.3: - resolution: - { - integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA== - } - engines: { node: '>=8.0.0' } + resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} + engines: {node: '>=8.0.0'} hasBin: true dependencies: chalk: 4.1.2 @@ -13544,11 +9894,8 @@ packages: dev: true /tuf-js@2.2.0: - resolution: - { - integrity: sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg== - } - engines: { node: ^16.14.0 || >=18.0.0 } + resolution: {integrity: sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg==} + engines: {node: ^16.14.0 || >=18.0.0} dependencies: '@tufjs/models': 2.0.0 debug: 4.3.4 @@ -13558,72 +9905,48 @@ packages: dev: true /type-check@0.4.0: - resolution: - { - integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - } - engines: { node: '>= 0.8.0' } + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 dev: true /type-detect@4.0.8: - resolution: - { - integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} dev: true /type-fest@0.13.1: - resolution: - { - integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} dev: true /type-fest@0.21.3: - resolution: - { - integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} dev: true /type-fest@0.6.0: - resolution: - { - integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} dev: true /type-fest@0.8.1: - resolution: - { - integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} dev: true /type-is@1.6.18: - resolution: - { - integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - } - engines: { node: '>= 0.6' } + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} dependencies: media-typer: 0.3.0 mime-types: 2.1.35 dev: true /typed-array-buffer@1.0.2: - resolution: - { - integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 es-errors: 1.3.0 @@ -13631,11 +9954,8 @@ packages: dev: true /typed-array-byte-length@1.0.1: - resolution: - { - integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 for-each: 0.3.3 @@ -13645,11 +9965,8 @@ packages: dev: true /typed-array-byte-offset@1.0.2: - resolution: - { - integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 @@ -13660,11 +9977,8 @@ packages: dev: true /typed-array-length@1.0.6: - resolution: - { - integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 for-each: 0.3.3 @@ -13675,18 +9989,12 @@ packages: dev: true /typed-assert@1.0.9: - resolution: - { - integrity: sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg== - } + resolution: {integrity: sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==} dev: true /typescript-eslint@7.6.0(eslint@9.0.0)(typescript@5.4.5): - resolution: - { - integrity: sha512-LY6vH6F1l5jpGqRtU+uK4+mOecIb4Cd4kaz1hAiJrgnNiHUA8wiw8BkJyYS+MRLM69F1QuSKwtGlQqnGl1Rc6w== - } - engines: { node: ^18.18.0 || >=20.0.0 } + resolution: {integrity: sha512-LY6vH6F1l5jpGqRtU+uK4+mOecIb4Cd4kaz1hAiJrgnNiHUA8wiw8BkJyYS+MRLM69F1QuSKwtGlQqnGl1Rc6w==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 typescript: '*' @@ -13704,36 +10012,24 @@ packages: dev: true /typescript@5.4.5: - resolution: - { - integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== - } - engines: { node: '>=14.17' } + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} hasBin: true dev: true /ufo@1.5.3: - resolution: - { - integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== - } + resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} /uglify-js@3.17.4: - resolution: - { - integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== - } - engines: { node: '>=0.8.0' } + resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} + engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true dev: false optional: true /unbox-primitive@1.0.2: - resolution: - { - integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== - } + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: call-bind: 1.0.7 has-bigints: 1.0.2 @@ -13742,114 +10038,75 @@ packages: dev: true /unbzip2-stream@1.4.3: - resolution: - { - integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg== - } + resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} dependencies: buffer: 5.7.1 through: 2.3.8 dev: true /undici-types@5.26.5: - resolution: - { - integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== - } + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true /undici@6.11.1: - resolution: - { - integrity: sha512-KyhzaLJnV1qa3BSHdj4AZ2ndqI0QWPxYzaIOio0WzcEJB9gvuysprJSLtpvc2D9mhR9jPDUk7xlJlZbH2KR5iw== - } - engines: { node: '>=18.0' } + resolution: {integrity: sha512-KyhzaLJnV1qa3BSHdj4AZ2ndqI0QWPxYzaIOio0WzcEJB9gvuysprJSLtpvc2D9mhR9jPDUk7xlJlZbH2KR5iw==} + engines: {node: '>=18.0'} dev: true /unicode-canonical-property-names-ecmascript@2.0.0: - resolution: - { - integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} + engines: {node: '>=4'} dev: true /unicode-match-property-ecmascript@2.0.0: - resolution: - { - integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==} + engines: {node: '>=4'} dependencies: unicode-canonical-property-names-ecmascript: 2.0.0 unicode-property-aliases-ecmascript: 2.1.0 dev: true /unicode-match-property-value-ecmascript@2.1.0: - resolution: - { - integrity: sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==} + engines: {node: '>=4'} dev: true /unicode-property-aliases-ecmascript@2.1.0: - resolution: - { - integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== - } - engines: { node: '>=4' } + resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} + engines: {node: '>=4'} dev: true /unique-filename@3.0.0: - resolution: - { - integrity: sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: unique-slug: 4.0.0 dev: true /unique-slug@4.0.0: - resolution: - { - integrity: sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: imurmurhash: 0.1.4 dev: true /universalify@0.1.2: - resolution: - { - integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - } - engines: { node: '>= 4.0.0' } + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} dev: true /universalify@2.0.1: - resolution: - { - integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== - } - engines: { node: '>= 10.0.0' } + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} dev: true /unpipe@1.0.0: - resolution: - { - integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} dev: true /update-browserslist-db@1.0.13(browserslist@4.23.0): - resolution: - { - integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== - } + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -13860,85 +10117,55 @@ packages: dev: true /uri-js@4.4.1: - resolution: - { - integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - } + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.1 dev: true /urlpattern-polyfill@10.0.0: - resolution: - { - integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg== - } + resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==} dev: true /util-deprecate@1.0.2: - resolution: - { - integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - } + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true /utils-merge@1.0.1: - resolution: - { - integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - } - engines: { node: '>= 0.4.0' } + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} dev: true /uuid@8.3.2: - resolution: - { - integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - } + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true dev: true /v8-compile-cache-lib@3.0.1: - resolution: - { - integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - } + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true /validate-npm-package-license@3.0.4: - resolution: - { - integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - } + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 dev: true /validate-npm-package-name@5.0.0: - resolution: - { - integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== - } - engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: builtins: 5.1.0 dev: true /vary@1.1.2: - resolution: - { - integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - } - engines: { node: '>= 0.8' } + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} dev: true /vite-node@1.5.0(@types/node@20.12.7)(less@4.2.0): - resolution: - { - integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw== - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-tV8h6gMj6vPzVCa7l+VGq9lwoJjW8Y79vst8QZZGiuRAfijU+EEWuc0kFpmndQrWhMMhet1jdSF+40KSZUqIIw==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: cac: 6.7.14 @@ -13958,11 +10185,8 @@ packages: dev: true /vite@5.1.7(@types/node@20.12.7)(less@4.2.0)(sass@1.71.1)(terser@5.29.1): - resolution: - { - integrity: sha512-sgnEEFTZYMui/sTlH1/XEnVNHMujOahPLGMxn1+5sIT45Xjng1Ec1K78jRP15dSmVgg5WBin9yO81j3o9OxofA== - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-sgnEEFTZYMui/sTlH1/XEnVNHMujOahPLGMxn1+5sIT45Xjng1Ec1K78jRP15dSmVgg5WBin9yO81j3o9OxofA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@types/node': ^18.0.0 || >=20.0.0 @@ -14000,11 +10224,8 @@ packages: dev: true /vite@5.2.8(@types/node@20.12.7)(less@4.2.0): - resolution: - { - integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA== - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@types/node': ^18.0.0 || >=20.0.0 @@ -14040,10 +10261,7 @@ packages: dev: true /vitepress@1.1.0(@algolia/client-search@4.23.3)(search-insights@2.13.0): - resolution: - { - integrity: sha512-G+NS5I2OETxC0SfGAMDO75JWNkrcir0UCptuhQMNoaZhhlqvYtTDQhph4qGc5dtiTtZkcFa/bCcSx+A2gSS3lA== - } + resolution: {integrity: sha512-G+NS5I2OETxC0SfGAMDO75JWNkrcir0UCptuhQMNoaZhhlqvYtTDQhph4qGc5dtiTtZkcFa/bCcSx+A2gSS3lA==} hasBin: true peerDependencies: markdown-it-mathjax3: ^4 @@ -14098,11 +10316,8 @@ packages: dev: true /vitest@1.5.0(@types/node@20.12.7)(less@4.2.0): - resolution: - { - integrity: sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw== - } - engines: { node: ^18.0.0 || >=20.0.0 } + resolution: {integrity: sha512-d8UKgR0m2kjdxDWX6911uwxout6GHS0XaGH1cksSIVVG8kRlE7G7aBw7myKQCvDI5dT4j7ZMa+l706BIORMDLw==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' @@ -14157,11 +10372,8 @@ packages: dev: true /vue-demi@0.14.7(vue@3.4.21): - resolution: - { - integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} + engines: {node: '>=12'} hasBin: true requiresBuild: true peerDependencies: @@ -14175,10 +10387,7 @@ packages: dev: true /vue@3.4.21: - resolution: - { - integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA== - } + resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -14193,55 +10402,37 @@ packages: dev: true /watchpack@2.4.0: - resolution: - { - integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - } - engines: { node: '>=10.13.0' } + resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} + engines: {node: '>=10.13.0'} dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 dev: true /wbuf@1.7.3: - resolution: - { - integrity: sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - } + resolution: {integrity: sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==} dependencies: minimalistic-assert: 1.0.1 dev: true /wcwidth@1.0.1: - resolution: - { - integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - } + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: defaults: 1.0.4 dev: true /web-streams-polyfill@3.3.3: - resolution: - { - integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} dev: true /webidl-conversions@3.0.1: - resolution: - { - integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - } + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true /webpack-dev-middleware@5.3.4(webpack@5.90.3): - resolution: - { - integrity: sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q== - } - engines: { node: '>= 12.13.0' } + resolution: {integrity: sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==} + engines: {node: '>= 12.13.0'} peerDependencies: webpack: ^4.0.0 || ^5.0.0 dependencies: @@ -14254,11 +10445,8 @@ packages: dev: true /webpack-dev-middleware@6.1.2(webpack@5.90.3): - resolution: - { - integrity: sha512-Wu+EHmX326YPYUpQLKmKbTyZZJIB8/n6R09pTmB03kJmnMsVPTo9COzHZFr01txwaCAuZvfBJE4ZCHRcKs5JaQ== - } - engines: { node: '>= 14.15.0' } + resolution: {integrity: sha512-Wu+EHmX326YPYUpQLKmKbTyZZJIB8/n6R09pTmB03kJmnMsVPTo9COzHZFr01txwaCAuZvfBJE4ZCHRcKs5JaQ==} + engines: {node: '>= 14.15.0'} peerDependencies: webpack: ^5.0.0 peerDependenciesMeta: @@ -14274,11 +10462,8 @@ packages: dev: true /webpack-dev-server@4.15.1(webpack@5.90.3): - resolution: - { - integrity: sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA== - } - engines: { node: '>= 12.13.0' } + resolution: {integrity: sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==} + engines: {node: '>= 12.13.0'} hasBin: true peerDependencies: webpack: ^4.37.0 || ^5.0.0 @@ -14328,11 +10513,8 @@ packages: dev: true /webpack-merge@5.10.0: - resolution: - { - integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== - } - engines: { node: '>=10.0.0' } + resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==} + engines: {node: '>=10.0.0'} dependencies: clone-deep: 4.0.1 flat: 5.0.2 @@ -14340,19 +10522,13 @@ packages: dev: true /webpack-sources@3.2.3: - resolution: - { - integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - } - engines: { node: '>=10.13.0' } + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} + engines: {node: '>=10.13.0'} dev: true /webpack-subresource-integrity@5.1.0(webpack@5.90.3): - resolution: - { - integrity: sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q== - } - engines: { node: '>= 12' } + resolution: {integrity: sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q==} + engines: {node: '>= 12'} peerDependencies: html-webpack-plugin: '>= 5.0.0-beta.1 < 6' webpack: ^5.12.0 @@ -14365,11 +10541,8 @@ packages: dev: true /webpack@5.90.3(esbuild@0.20.1): - resolution: - { - integrity: sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA== - } - engines: { node: '>=10.13.0' } + resolution: {integrity: sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==} + engines: {node: '>=10.13.0'} hasBin: true peerDependencies: webpack-cli: '*' @@ -14408,11 +10581,8 @@ packages: dev: true /websocket-driver@0.7.4: - resolution: - { - integrity: sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - } - engines: { node: '>=0.8.0' } + resolution: {integrity: sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==} + engines: {node: '>=0.8.0'} dependencies: http-parser-js: 0.5.8 safe-buffer: 5.2.1 @@ -14420,28 +10590,19 @@ packages: dev: true /websocket-extensions@0.1.4: - resolution: - { - integrity: sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - } - engines: { node: '>=0.8.0' } + resolution: {integrity: sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==} + engines: {node: '>=0.8.0'} dev: true /whatwg-url@5.0.0: - resolution: - { - integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - } + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 dev: true /which-boxed-primitive@1.0.2: - resolution: - { - integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - } + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: is-bigint: 1.0.4 is-boolean-object: 1.1.2 @@ -14451,29 +10612,20 @@ packages: dev: true /which-module@2.0.1: - resolution: - { - integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== - } + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} dev: true /which-pm@2.0.0: - resolution: - { - integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w== - } - engines: { node: '>=8.15' } + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} dependencies: load-yaml-file: 0.2.0 path-exists: 4.0.0 dev: true /which-typed-array@1.1.15: - resolution: - { - integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== - } - engines: { node: '>= 0.4' } + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.7 call-bind: 1.0.7 @@ -14483,42 +10635,30 @@ packages: dev: true /which@1.3.1: - resolution: - { - integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - } + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true dependencies: isexe: 2.0.0 dev: true /which@2.0.2: - resolution: - { - integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - } - engines: { node: '>= 8' } + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} hasBin: true dependencies: isexe: 2.0.0 /which@4.0.0: - resolution: - { - integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== - } - engines: { node: ^16.13.0 || >=18.0.0 } + resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} + engines: {node: ^16.13.0 || >=18.0.0} hasBin: true dependencies: isexe: 3.1.1 dev: true /why-is-node-running@2.2.2: - resolution: - { - integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} hasBin: true dependencies: siginfo: 2.0.0 @@ -14526,25 +10666,16 @@ packages: dev: true /wildcard@2.0.1: - resolution: - { - integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== - } + resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} dev: true /wordwrap@1.0.0: - resolution: - { - integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - } + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: false /wrap-ansi@6.2.0: - resolution: - { - integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 @@ -14552,11 +10683,8 @@ packages: dev: true /wrap-ansi@7.0.0: - resolution: - { - integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 @@ -14564,11 +10692,8 @@ packages: dev: true /wrap-ansi@8.1.0: - resolution: - { - integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} dependencies: ansi-styles: 6.2.1 string-width: 5.1.2 @@ -14576,18 +10701,12 @@ packages: dev: true /wrappy@1.0.2: - resolution: - { - integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - } + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true /ws@8.16.0: - resolution: - { - integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== - } - engines: { node: '>=10.0.0' } + resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} + engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 utf-8-validate: '>=5.0.2' @@ -14599,65 +10718,41 @@ packages: dev: true /y18n@4.0.3: - resolution: - { - integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== - } + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} dev: true /y18n@5.0.8: - resolution: - { - integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} dev: true /yallist@2.1.2: - resolution: - { - integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== - } + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} dev: true /yallist@3.1.1: - resolution: - { - integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - } + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true /yallist@4.0.0: - resolution: - { - integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - } + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} /yargs-parser@18.1.3: - resolution: - { - integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} dependencies: camelcase: 5.3.1 decamelize: 1.2.0 dev: true /yargs-parser@21.1.1: - resolution: - { - integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} dev: true /yargs@15.4.1: - resolution: - { - integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - } - engines: { node: '>=8' } + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} dependencies: cliui: 6.0.0 decamelize: 1.2.0 @@ -14673,11 +10768,8 @@ packages: dev: true /yargs@17.7.2: - resolution: - { - integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - } - engines: { node: '>=12' } + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} dependencies: cliui: 8.0.1 escalade: 3.1.2 @@ -14689,51 +10781,33 @@ packages: dev: true /yauzl@2.10.0: - resolution: - { - integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== - } + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} dependencies: buffer-crc32: 0.2.13 fd-slicer: 1.1.0 dev: true /yn@3.1.1: - resolution: - { - integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - } - engines: { node: '>=6' } + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} dev: true /yocto-queue@0.1.0: - resolution: - { - integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - } - engines: { node: '>=10' } + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} dev: true /yocto-queue@1.0.0: - resolution: - { - integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== - } - engines: { node: '>=12.20' } + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} dev: true /zod@3.22.4: - resolution: - { - integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg== - } + resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} dev: true /zone.js@0.14.4: - resolution: - { - integrity: sha512-NtTUvIlNELez7Q1DzKVIFZBzNb646boQMgpATo9z3Ftuu/gWvzxCW7jdjcUDoRGxRikrhVHB/zLXh1hxeJawvw== - } + resolution: {integrity: sha512-NtTUvIlNELez7Q1DzKVIFZBzNb646boQMgpATo9z3Ftuu/gWvzxCW7jdjcUDoRGxRikrhVHB/zLXh1hxeJawvw==} dependencies: tslib: 2.6.2 dev: true diff --git a/prettier.config.js b/prettier.config.js index f282fbe04..61e80527d 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,18 +1,7 @@ /** @type {import("prettier").Config} */ const config = { - printWidth: 80, - tabWidth: 2, - useTabs: false, - semi: false, + semi: true, singleQuote: true, - quoteProps: 'as-needed', - jsxSingleQuote: false, - trailingComma: 'none', - bracketSpacing: true, - bracketSameLine: true, - arrowParens: 'avoid', - htmlWhitespaceSensitivity: 'css', - endOfLine: 'lf' -} +}; -export default config +export default config;