fork of hey-api/openapi-ts because I need some additional things

chore: delete sample example

Lubos 713510d6 cf8cabfa

+1 -1
.changeset/nine-cats-cross.md
··· 2 2 '@hey-api/openapi-ts': patch 3 3 --- 4 4 5 - fix(sdk): add paramsStructure field 5 + fix(sdk): add `paramsStructure` option
+9 -9
dev/openapi-ts.config.ts
··· 41 41 // 'invalid', 42 42 // 'openai.yaml', 43 43 // 'full.yaml', 44 - 'opencode.yaml', 44 + // 'opencode.yaml', 45 45 // 'sdk-instance.yaml', 46 46 // 'string-with-format.yaml', 47 47 // 'transformers.json', 48 48 // 'type-format.yaml', 49 - // 'validators.yaml', 49 + 'validators.yaml', 50 50 // 'validators-circular-ref.json', 51 51 // 'validators-circular-ref-2.yaml', 52 52 // 'zoom-video-sdk.json', ··· 260 260 // }, 261 261 // include... 262 262 instance: true, 263 - name: '@hey-api/sdk', 263 + // name: '@hey-api/sdk', 264 264 // operationId: false, 265 265 paramsStructure: 'flat', 266 266 // responseStyle: 'data', ··· 335 335 }, 336 336 }, 337 337 { 338 - // name: 'arktype', 338 + name: 'arktype', 339 339 // types: { 340 340 // infer: true, 341 341 // }, ··· 346 346 // definitions: 'z{{name}}Definition', 347 347 exportFromIndex: true, 348 348 // metadata: true, 349 - // name: 'valibot', 349 + name: 'valibot', 350 350 // requests: { 351 351 // case: 'PascalCase', 352 352 // name: '{{name}}Data', ··· 396 396 }, 397 397 // exportFromIndex: true, 398 398 // metadata: true, 399 - // name: 'zod', 399 + name: 'zod', 400 400 // requests: { 401 401 // // case: 'SCREAMING_SNAKE_CASE', 402 402 // // name: 'z{{name}}TestData', ··· 417 417 // }, 418 418 }, 419 419 types: { 420 - infer: { 421 - case: 'snake_case', 422 - }, 420 + // infer: { 421 + // case: 'snake_case', 422 + // }, 423 423 }, 424 424 '~hooks': { 425 425 symbols: {
+51
dev/package.json
··· 1 + { 2 + "name": "@test/openapi-ts-playground", 3 + "version": "0.0.0", 4 + "private": true, 5 + "type": "module", 6 + "engines": { 7 + "node": ">=20.19.0" 8 + }, 9 + "devDependencies": { 10 + "@angular-devkit/build-angular": "19.2.19", 11 + "@angular/animations": "19.2.15", 12 + "@angular/cli": "19.2.19", 13 + "@angular/common": "19.2.15", 14 + "@angular/compiler": "19.2.15", 15 + "@angular/compiler-cli": "19.2.15", 16 + "@angular/core": "19.2.15", 17 + "@angular/forms": "19.2.15", 18 + "@angular/platform-browser": "19.2.15", 19 + "@angular/platform-browser-dynamic": "19.2.15", 20 + "@angular/router": "19.2.15", 21 + "@config/vite-base": "workspace:*", 22 + "@hey-api/codegen-core": "workspace:*", 23 + "@hey-api/custom-client": "workspace:*", 24 + "@hey-api/openapi-ts": "workspace:*", 25 + "@pinia/colada": "0.17.7", 26 + "@tanstack/angular-query-experimental": "5.73.3", 27 + "@tanstack/react-query": "5.73.3", 28 + "@tanstack/solid-query": "5.73.3", 29 + "@tanstack/svelte-query": "5.73.3", 30 + "@tanstack/vue-query": "5.73.3", 31 + "@types/cross-spawn": "6.0.6", 32 + "ajv": "8.17.1", 33 + "arktype": "2.1.25", 34 + "axios": "1.8.2", 35 + "cross-spawn": "7.0.6", 36 + "eslint": "9.17.0", 37 + "fastify": "5.2.0", 38 + "glob": "11.0.3", 39 + "node-fetch": "3.3.2", 40 + "nuxt": "3.14.1592", 41 + "ofetch": "1.4.1", 42 + "prettier": "3.4.2", 43 + "rxjs": "7.8.2", 44 + "ts-node": "10.9.2", 45 + "tslib": "2.8.1", 46 + "typescript": "5.9.3", 47 + "valibot": "1.1.0", 48 + "vue": "3.5.13", 49 + "zod": "4.1.12" 50 + } 51 + }
+11
dev/tsconfig.json
··· 1 + { 2 + "extends": "../packages/openapi-ts-tests/tsconfig.base.json", 3 + "compilerOptions": { 4 + "allowImportingTsExtensions": true, 5 + "declaration": false, 6 + "esModuleInterop": true, 7 + "noEmit": true, 8 + "resolveJsonModule": true, 9 + "skipLibCheck": true 10 + } 11 + }
+10
dev/turbo.json
··· 1 + { 2 + "$schema": "../node_modules/turbo/schema.json", 3 + "extends": ["//"], 4 + "tasks": { 5 + "build": { 6 + "dependsOn": [], 7 + "outputs": ["dist/**"] 8 + } 9 + } 10 + }
-24
examples/openapi-ts-sample/.gitignore
··· 1 - # Logs 2 - logs 3 - *.log 4 - npm-debug.log* 5 - yarn-debug.log* 6 - yarn-error.log* 7 - pnpm-debug.log* 8 - lerna-debug.log* 9 - 10 - node_modules 11 - dist 12 - dist-ssr 13 - *.local 14 - 15 - # Editor directories and files 16 - .vscode/* 17 - !.vscode/extensions.json 18 - .idea 19 - .DS_Store 20 - *.suo 21 - *.ntvs* 22 - *.njsproj 23 - *.sln 24 - *.sw?
-113
examples/openapi-ts-sample/CHANGELOG.md
··· 1 - # @example/openapi-ts-sample 2 - 3 - ## 0.0.17 4 - 5 - ### Patch Changes 6 - 7 - - Updated dependencies [[`f23f3ae`](https://github.com/hey-api/openapi-ts/commit/f23f3ae874385e758eb8d43bb4e274c9858a4e40)]: 8 - - @hey-api/client-fetch@0.13.1 9 - 10 - ## 0.0.16 11 - 12 - ### Patch Changes 13 - 14 - - Updated dependencies [[`10d2e03`](https://github.com/hey-api/openapi-ts/commit/10d2e03b8295e4e887fab8d023aa823699efbae8)]: 15 - - @hey-api/client-fetch@0.13.0 16 - 17 - ## 0.0.15 18 - 19 - ### Patch Changes 20 - 21 - - Updated dependencies [[`4d8c030`](https://github.com/hey-api/openapi-ts/commit/4d8c03038979c9a75315cc158789b3c198c62f90)]: 22 - - @hey-api/client-fetch@0.12.0 23 - 24 - ## 0.0.14 25 - 26 - ### Patch Changes 27 - 28 - - Updated dependencies [[`8152aaf`](https://github.com/hey-api/openapi-ts/commit/8152aaf4892c48b79fd3dc486eb3c0ea333dc3e6)]: 29 - - @hey-api/client-fetch@0.11.0 30 - 31 - ## 0.0.13 32 - 33 - ### Patch Changes 34 - 35 - - Updated dependencies [[`1f99066`](https://github.com/hey-api/openapi-ts/commit/1f99066efbb2d0e6b9e3710c701293c2cc09d65e)]: 36 - - @hey-api/client-fetch@0.10.2 37 - 38 - ## 0.0.12 39 - 40 - ### Patch Changes 41 - 42 - - Updated dependencies [[`565e0b8`](https://github.com/hey-api/openapi-ts/commit/565e0b89fbab4556ecdc63dfe08250942681140e)]: 43 - - @hey-api/client-fetch@0.10.1 44 - 45 - ## 0.0.11 46 - 47 - ### Patch Changes 48 - 49 - - Updated dependencies [[`fed9699`](https://github.com/hey-api/openapi-ts/commit/fed969985275621c7c2b65ffc760c7c66fafaf72)]: 50 - - @hey-api/client-fetch@0.10.0 51 - 52 - ## 0.0.10 53 - 54 - ### Patch Changes 55 - 56 - - Updated dependencies [[`67c385b`](https://github.com/hey-api/openapi-ts/commit/67c385bf6289a79726b0cdd85fd81ca501cf2248)]: 57 - - @hey-api/client-fetch@0.9.0 58 - 59 - ## 0.0.9 60 - 61 - ### Patch Changes 62 - 63 - - Updated dependencies [[`fe43b88`](https://github.com/hey-api/openapi-ts/commit/fe43b889c20a2001f56e259f93f64851a1caa1d1)]: 64 - - @hey-api/client-fetch@0.8.4 65 - 66 - ## 0.0.8 67 - 68 - ### Patch Changes 69 - 70 - - Updated dependencies [[`c0b36b9`](https://github.com/hey-api/openapi-ts/commit/c0b36b95645d484034c3af145c5554867568979b)]: 71 - - @hey-api/client-fetch@0.8.3 72 - 73 - ## 0.0.7 74 - 75 - ### Patch Changes 76 - 77 - - Updated dependencies [[`b8cc9f8`](https://github.com/hey-api/openapi-ts/commit/b8cc9f8a5eaf4f4ff345abc49c14c6b96744c2ea)]: 78 - - @hey-api/client-fetch@0.8.2 79 - 80 - ## 0.0.6 81 - 82 - ### Patch Changes 83 - 84 - - Updated dependencies [[`7f0f4a7`](https://github.com/hey-api/openapi-ts/commit/7f0f4a76b06c8fafb33581b522faf8efc6fd85ac)]: 85 - - @hey-api/client-fetch@0.8.1 86 - 87 - ## 0.0.5 88 - 89 - ### Patch Changes 90 - 91 - - Updated dependencies [[`bb6d46a`](https://github.com/hey-api/openapi-ts/commit/bb6d46ae119ce4e7e3a2ab3fded74ac4fb4cdff2)]: 92 - - @hey-api/client-fetch@0.8.0 93 - 94 - ## 0.0.4 95 - 96 - ### Patch Changes 97 - 98 - - Updated dependencies [[`2dc380e`](https://github.com/hey-api/openapi-ts/commit/2dc380eabc17c723654beb04ecd7bce6d33d3b49), [`603541e`](https://github.com/hey-api/openapi-ts/commit/603541e307dc2953da7dddd300176865629b50bb), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31), [`2cbffeb`](https://github.com/hey-api/openapi-ts/commit/2cbffeb2cdd6c6143cd68cac68369584879dda31)]: 99 - - @hey-api/client-fetch@0.7.3 100 - 101 - ## 0.0.3 102 - 103 - ### Patch Changes 104 - 105 - - Updated dependencies [[`8eba19d`](https://github.com/hey-api/openapi-ts/commit/8eba19d4092fc0903572ab9fdadf0b4c26928ba2)]: 106 - - @hey-api/client-fetch@0.7.2 107 - 108 - ## 0.0.2 109 - 110 - ### Patch Changes 111 - 112 - - Updated dependencies [[`0432418`](https://github.com/hey-api/openapi-ts/commit/0432418d72c94ef94865f8216ed2f723ad5191f9), [`4784727`](https://github.com/hey-api/openapi-ts/commit/47847276e8bc854045044dd414382080270dd779)]: 113 - - @hey-api/client-fetch@0.7.1
-13
examples/openapi-ts-sample/index.html
··· 1 - <!doctype html> 2 - <html lang="en"> 3 - <head> 4 - <meta charset="UTF-8" /> 5 - <!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> --> 6 - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 7 - <title>Hey API + Fetch API Demo</title> 8 - </head> 9 - <body> 10 - <div id="root"></div> 11 - <script type="module" src="/src/main.tsx"></script> 12 - </body> 13 - </html>
-26
examples/openapi-ts-sample/openapi-ts.config.ts
··· 1 - import { defineConfig } from '@hey-api/openapi-ts'; 2 - 3 - export default defineConfig({ 4 - input: 5 - 'https://raw.githubusercontent.com/swagger-api/swagger-petstore/master/src/main/resources/openapi.yaml', 6 - output: { 7 - format: 'prettier', 8 - lint: 'eslint', 9 - path: './src/client', 10 - }, 11 - plugins: [ 12 - { 13 - name: '@hey-api/client-fetch', 14 - runtimeConfigPath: './src/hey-api.ts', 15 - }, 16 - '@hey-api/schemas', 17 - { 18 - name: '@hey-api/sdk', 19 - validator: 'zod', 20 - }, 21 - { 22 - enums: 'javascript', 23 - name: '@hey-api/typescript', 24 - }, 25 - ], 26 - });
-41
examples/openapi-ts-sample/package.json
··· 1 - { 2 - "name": "@example/openapi-ts-sample", 3 - "private": true, 4 - "version": "0.0.17", 5 - "type": "module", 6 - "scripts": { 7 - "build": "tsc && vite build", 8 - "dev": "vite", 9 - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", 10 - "openapi-ts": "openapi-ts", 11 - "preview": "vite preview", 12 - "typecheck": "tsc --noEmit" 13 - }, 14 - "dependencies": { 15 - "@radix-ui/react-form": "0.1.1", 16 - "@radix-ui/react-icons": "1.3.2", 17 - "@radix-ui/themes": "3.1.6", 18 - "react": "19.0.0", 19 - "react-dom": "19.0.0", 20 - "valibot": "1.1.0", 21 - "zod": "4.0.5" 22 - }, 23 - "devDependencies": { 24 - "@config/vite-base": "workspace:*", 25 - "@hey-api/openapi-ts": "workspace:*", 26 - "@types/react": "19.0.1", 27 - "@types/react-dom": "19.0.1", 28 - "@typescript-eslint/eslint-plugin": "8.29.1", 29 - "@typescript-eslint/parser": "8.29.1", 30 - "@vitejs/plugin-react": "4.4.0-beta.1", 31 - "autoprefixer": "10.4.19", 32 - "eslint": "9.17.0", 33 - "eslint-plugin-react-hooks": "5.2.0", 34 - "eslint-plugin-react-refresh": "0.4.7", 35 - "postcss": "8.4.41", 36 - "prettier": "3.4.2", 37 - "tailwindcss": "3.4.9", 38 - "typescript": "5.8.3", 39 - "vite": "7.1.2" 40 - } 41 - }
-6
examples/openapi-ts-sample/postcss.config.js
··· 1 - export default { 2 - plugins: { 3 - autoprefixer: {}, 4 - tailwindcss: {}, 5 - }, 6 - };
-3
examples/openapi-ts-sample/src/App.css
··· 1 - @tailwind base; 2 - @tailwind components; 3 - @tailwind utilities;
-45
examples/openapi-ts-sample/src/App.tsx
··· 1 - import './App.css'; 2 - 3 - import { 4 - Box, 5 - Button, 6 - Container, 7 - Flex, 8 - Heading, 9 - Section, 10 - } from '@radix-ui/themes'; 11 - 12 - import { getPetById } from './client/sdk.gen'; 13 - 14 - function App() { 15 - const onClick = async () => { 16 - const response = await getPetById({ 17 - path: { 18 - // @ts-expect-error 19 - foo: 3, 20 - petId: 3, 21 - }, 22 - }); 23 - console.log(response); 24 - }; 25 - 26 - return ( 27 - <Box 28 - style={{ background: 'var(--gray-a2)', borderRadius: 'var(--radius-3)' }} 29 - > 30 - <Container size="1"> 31 - <Section size="1" /> 32 - <Flex align="center"> 33 - <Heading>sample for internal testing</Heading> 34 - </Flex> 35 - <Section size="1" /> 36 - <Flex direction="column" gapY="2"> 37 - <Button onClick={onClick}>Click me</Button> 38 - </Flex> 39 - <Section size="1" /> 40 - </Container> 41 - </Box> 42 - ); 43 - } 44 - 45 - export default App;
-30
examples/openapi-ts-sample/src/client/client.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import { 4 - type ClientOptions, 5 - type Config, 6 - createClient, 7 - createConfig, 8 - } from './client'; 9 - import { createClientConfig } from './src/hey-api.ts'; 10 - import type { ClientOptions as ClientOptions2 } from './types.gen'; 11 - 12 - /** 13 - * The `createClientConfig()` function will be called on client initialization 14 - * and the returned object will become the client's initial configuration. 15 - * 16 - * You may want to initialize your client this way instead of calling 17 - * `setConfig()`. This is useful for example if you're using Next.js 18 - * to ensure your client always has the correct values. 19 - */ 20 - export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = ( 21 - override?: Config<ClientOptions & T>, 22 - ) => Config<Required<ClientOptions> & T>; 23 - 24 - export const client = createClient( 25 - createClientConfig( 26 - createConfig<ClientOptions2>({ 27 - baseUrl: 'https://petstore3.swagger.io/api/v3', 28 - }), 29 - ), 30 - );
-268
examples/openapi-ts-sample/src/client/client/client.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import { createSseClient } from '../core/serverSentEvents.gen'; 4 - import type { HttpMethod } from '../core/types.gen'; 5 - import { getValidRequestBody } from '../core/utils.gen'; 6 - import type { 7 - Client, 8 - Config, 9 - RequestOptions, 10 - ResolvedRequestOptions, 11 - } from './types.gen'; 12 - import { 13 - buildUrl, 14 - createConfig, 15 - createInterceptors, 16 - getParseAs, 17 - mergeConfigs, 18 - mergeHeaders, 19 - setAuthParams, 20 - } from './utils.gen'; 21 - 22 - type ReqInit = Omit<RequestInit, 'body' | 'headers'> & { 23 - body?: any; 24 - headers: ReturnType<typeof mergeHeaders>; 25 - }; 26 - 27 - export const createClient = (config: Config = {}): Client => { 28 - let _config = mergeConfigs(createConfig(), config); 29 - 30 - const getConfig = (): Config => ({ ..._config }); 31 - 32 - const setConfig = (config: Config): Config => { 33 - _config = mergeConfigs(_config, config); 34 - return getConfig(); 35 - }; 36 - 37 - const interceptors = createInterceptors< 38 - Request, 39 - Response, 40 - unknown, 41 - ResolvedRequestOptions 42 - >(); 43 - 44 - const beforeRequest = async (options: RequestOptions) => { 45 - const opts = { 46 - ..._config, 47 - ...options, 48 - fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, 49 - headers: mergeHeaders(_config.headers, options.headers), 50 - serializedBody: undefined, 51 - }; 52 - 53 - if (opts.security) { 54 - await setAuthParams({ 55 - ...opts, 56 - security: opts.security, 57 - }); 58 - } 59 - 60 - if (opts.requestValidator) { 61 - await opts.requestValidator(opts); 62 - } 63 - 64 - if (opts.body !== undefined && opts.bodySerializer) { 65 - opts.serializedBody = opts.bodySerializer(opts.body); 66 - } 67 - 68 - // remove Content-Type header if body is empty to avoid sending invalid requests 69 - if (opts.body === undefined || opts.serializedBody === '') { 70 - opts.headers.delete('Content-Type'); 71 - } 72 - 73 - const url = buildUrl(opts); 74 - 75 - return { opts, url }; 76 - }; 77 - 78 - const request: Client['request'] = async (options) => { 79 - // @ts-expect-error 80 - const { opts, url } = await beforeRequest(options); 81 - const requestInit: ReqInit = { 82 - redirect: 'follow', 83 - ...opts, 84 - body: getValidRequestBody(opts), 85 - }; 86 - 87 - let request = new Request(url, requestInit); 88 - 89 - for (const fn of interceptors.request.fns) { 90 - if (fn) { 91 - request = await fn(request, opts); 92 - } 93 - } 94 - 95 - // fetch must be assigned here, otherwise it would throw the error: 96 - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation 97 - const _fetch = opts.fetch!; 98 - let response = await _fetch(request); 99 - 100 - for (const fn of interceptors.response.fns) { 101 - if (fn) { 102 - response = await fn(response, request, opts); 103 - } 104 - } 105 - 106 - const result = { 107 - request, 108 - response, 109 - }; 110 - 111 - if (response.ok) { 112 - const parseAs = 113 - (opts.parseAs === 'auto' 114 - ? getParseAs(response.headers.get('Content-Type')) 115 - : opts.parseAs) ?? 'json'; 116 - 117 - if ( 118 - response.status === 204 || 119 - response.headers.get('Content-Length') === '0' 120 - ) { 121 - let emptyData: any; 122 - switch (parseAs) { 123 - case 'arrayBuffer': 124 - case 'blob': 125 - case 'text': 126 - emptyData = await response[parseAs](); 127 - break; 128 - case 'formData': 129 - emptyData = new FormData(); 130 - break; 131 - case 'stream': 132 - emptyData = response.body; 133 - break; 134 - case 'json': 135 - default: 136 - emptyData = {}; 137 - break; 138 - } 139 - return opts.responseStyle === 'data' 140 - ? emptyData 141 - : { 142 - data: emptyData, 143 - ...result, 144 - }; 145 - } 146 - 147 - let data: any; 148 - switch (parseAs) { 149 - case 'arrayBuffer': 150 - case 'blob': 151 - case 'formData': 152 - case 'json': 153 - case 'text': 154 - data = await response[parseAs](); 155 - break; 156 - case 'stream': 157 - return opts.responseStyle === 'data' 158 - ? response.body 159 - : { 160 - data: response.body, 161 - ...result, 162 - }; 163 - } 164 - 165 - if (parseAs === 'json') { 166 - if (opts.responseValidator) { 167 - await opts.responseValidator(data); 168 - } 169 - 170 - if (opts.responseTransformer) { 171 - data = await opts.responseTransformer(data); 172 - } 173 - } 174 - 175 - return opts.responseStyle === 'data' 176 - ? data 177 - : { 178 - data, 179 - ...result, 180 - }; 181 - } 182 - 183 - const textError = await response.text(); 184 - let jsonError: unknown; 185 - 186 - try { 187 - jsonError = JSON.parse(textError); 188 - } catch { 189 - // noop 190 - } 191 - 192 - const error = jsonError ?? textError; 193 - let finalError = error; 194 - 195 - for (const fn of interceptors.error.fns) { 196 - if (fn) { 197 - finalError = (await fn(error, response, request, opts)) as string; 198 - } 199 - } 200 - 201 - finalError = finalError || ({} as string); 202 - 203 - if (opts.throwOnError) { 204 - throw finalError; 205 - } 206 - 207 - // TODO: we probably want to return error and improve types 208 - return opts.responseStyle === 'data' 209 - ? undefined 210 - : { 211 - error: finalError, 212 - ...result, 213 - }; 214 - }; 215 - 216 - const makeMethodFn = 217 - (method: Uppercase<HttpMethod>) => (options: RequestOptions) => 218 - request({ ...options, method }); 219 - 220 - const makeSseFn = 221 - (method: Uppercase<HttpMethod>) => async (options: RequestOptions) => { 222 - const { opts, url } = await beforeRequest(options); 223 - return createSseClient({ 224 - ...opts, 225 - body: opts.body as BodyInit | null | undefined, 226 - headers: opts.headers as unknown as Record<string, string>, 227 - method, 228 - onRequest: async (url, init) => { 229 - let request = new Request(url, init); 230 - for (const fn of interceptors.request.fns) { 231 - if (fn) { 232 - request = await fn(request, opts); 233 - } 234 - } 235 - return request; 236 - }, 237 - url, 238 - }); 239 - }; 240 - 241 - return { 242 - buildUrl, 243 - connect: makeMethodFn('CONNECT'), 244 - delete: makeMethodFn('DELETE'), 245 - get: makeMethodFn('GET'), 246 - getConfig, 247 - head: makeMethodFn('HEAD'), 248 - interceptors, 249 - options: makeMethodFn('OPTIONS'), 250 - patch: makeMethodFn('PATCH'), 251 - post: makeMethodFn('POST'), 252 - put: makeMethodFn('PUT'), 253 - request, 254 - setConfig, 255 - sse: { 256 - connect: makeSseFn('CONNECT'), 257 - delete: makeSseFn('DELETE'), 258 - get: makeSseFn('GET'), 259 - head: makeSseFn('HEAD'), 260 - options: makeSseFn('OPTIONS'), 261 - patch: makeSseFn('PATCH'), 262 - post: makeSseFn('POST'), 263 - put: makeSseFn('PUT'), 264 - trace: makeSseFn('TRACE'), 265 - }, 266 - trace: makeMethodFn('TRACE'), 267 - } as Client; 268 - };
-26
examples/openapi-ts-sample/src/client/client/index.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - export type { Auth } from '../core/auth.gen'; 4 - export type { QuerySerializerOptions } from '../core/bodySerializer.gen'; 5 - export { 6 - formDataBodySerializer, 7 - jsonBodySerializer, 8 - urlSearchParamsBodySerializer, 9 - } from '../core/bodySerializer.gen'; 10 - export { buildClientParams } from '../core/params.gen'; 11 - export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen'; 12 - export { createClient } from './client.gen'; 13 - export type { 14 - Client, 15 - ClientOptions, 16 - Config, 17 - CreateClientConfig, 18 - Options, 19 - OptionsLegacyParser, 20 - RequestOptions, 21 - RequestResult, 22 - ResolvedRequestOptions, 23 - ResponseStyle, 24 - TDataShape, 25 - } from './types.gen'; 26 - export { createConfig, mergeHeaders } from './utils.gen';
-268
examples/openapi-ts-sample/src/client/client/types.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import type { Auth } from '../core/auth.gen'; 4 - import type { 5 - ServerSentEventsOptions, 6 - ServerSentEventsResult, 7 - } from '../core/serverSentEvents.gen'; 8 - import type { 9 - Client as CoreClient, 10 - Config as CoreConfig, 11 - } from '../core/types.gen'; 12 - import type { Middleware } from './utils.gen'; 13 - 14 - export type ResponseStyle = 'data' | 'fields'; 15 - 16 - export interface Config<T extends ClientOptions = ClientOptions> 17 - extends Omit<RequestInit, 'body' | 'headers' | 'method'>, 18 - CoreConfig { 19 - /** 20 - * Base URL for all requests made by this client. 21 - */ 22 - baseUrl?: T['baseUrl']; 23 - /** 24 - * Fetch API implementation. You can use this option to provide a custom 25 - * fetch instance. 26 - * 27 - * @default globalThis.fetch 28 - */ 29 - fetch?: typeof fetch; 30 - /** 31 - * Please don't use the Fetch client for Next.js applications. The `next` 32 - * options won't have any effect. 33 - * 34 - * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. 35 - */ 36 - next?: never; 37 - /** 38 - * Return the response data parsed in a specified format. By default, `auto` 39 - * will infer the appropriate method from the `Content-Type` response header. 40 - * You can override this behavior with any of the {@link Body} methods. 41 - * Select `stream` if you don't want to parse response data at all. 42 - * 43 - * @default 'auto' 44 - */ 45 - parseAs?: 46 - | 'arrayBuffer' 47 - | 'auto' 48 - | 'blob' 49 - | 'formData' 50 - | 'json' 51 - | 'stream' 52 - | 'text'; 53 - /** 54 - * Should we return only data or multiple fields (data, error, response, etc.)? 55 - * 56 - * @default 'fields' 57 - */ 58 - responseStyle?: ResponseStyle; 59 - /** 60 - * Throw an error instead of returning it in the response? 61 - * 62 - * @default false 63 - */ 64 - throwOnError?: T['throwOnError']; 65 - } 66 - 67 - export interface RequestOptions< 68 - TData = unknown, 69 - TResponseStyle extends ResponseStyle = 'fields', 70 - ThrowOnError extends boolean = boolean, 71 - Url extends string = string, 72 - > extends Config<{ 73 - responseStyle: TResponseStyle; 74 - throwOnError: ThrowOnError; 75 - }>, 76 - Pick< 77 - ServerSentEventsOptions<TData>, 78 - | 'onSseError' 79 - | 'onSseEvent' 80 - | 'sseDefaultRetryDelay' 81 - | 'sseMaxRetryAttempts' 82 - | 'sseMaxRetryDelay' 83 - > { 84 - /** 85 - * Any body that you want to add to your request. 86 - * 87 - * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} 88 - */ 89 - body?: unknown; 90 - path?: Record<string, unknown>; 91 - query?: Record<string, unknown>; 92 - /** 93 - * Security mechanism(s) to use for the request. 94 - */ 95 - security?: ReadonlyArray<Auth>; 96 - url: Url; 97 - } 98 - 99 - export interface ResolvedRequestOptions< 100 - TResponseStyle extends ResponseStyle = 'fields', 101 - ThrowOnError extends boolean = boolean, 102 - Url extends string = string, 103 - > extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> { 104 - serializedBody?: string; 105 - } 106 - 107 - export type RequestResult< 108 - TData = unknown, 109 - TError = unknown, 110 - ThrowOnError extends boolean = boolean, 111 - TResponseStyle extends ResponseStyle = 'fields', 112 - > = ThrowOnError extends true 113 - ? Promise< 114 - TResponseStyle extends 'data' 115 - ? TData extends Record<string, unknown> 116 - ? TData[keyof TData] 117 - : TData 118 - : { 119 - data: TData extends Record<string, unknown> 120 - ? TData[keyof TData] 121 - : TData; 122 - request: Request; 123 - response: Response; 124 - } 125 - > 126 - : Promise< 127 - TResponseStyle extends 'data' 128 - ? 129 - | (TData extends Record<string, unknown> 130 - ? TData[keyof TData] 131 - : TData) 132 - | undefined 133 - : ( 134 - | { 135 - data: TData extends Record<string, unknown> 136 - ? TData[keyof TData] 137 - : TData; 138 - error: undefined; 139 - } 140 - | { 141 - data: undefined; 142 - error: TError extends Record<string, unknown> 143 - ? TError[keyof TError] 144 - : TError; 145 - } 146 - ) & { 147 - request: Request; 148 - response: Response; 149 - } 150 - >; 151 - 152 - export interface ClientOptions { 153 - baseUrl?: string; 154 - responseStyle?: ResponseStyle; 155 - throwOnError?: boolean; 156 - } 157 - 158 - type MethodFn = < 159 - TData = unknown, 160 - TError = unknown, 161 - ThrowOnError extends boolean = false, 162 - TResponseStyle extends ResponseStyle = 'fields', 163 - >( 164 - options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>, 165 - ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 166 - 167 - type SseFn = < 168 - TData = unknown, 169 - TError = unknown, 170 - ThrowOnError extends boolean = false, 171 - TResponseStyle extends ResponseStyle = 'fields', 172 - >( 173 - options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>, 174 - ) => Promise<ServerSentEventsResult<TData, TError>>; 175 - 176 - type RequestFn = < 177 - TData = unknown, 178 - TError = unknown, 179 - ThrowOnError extends boolean = false, 180 - TResponseStyle extends ResponseStyle = 'fields', 181 - >( 182 - options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & 183 - Pick< 184 - Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 185 - 'method' 186 - >, 187 - ) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; 188 - 189 - type BuildUrlFn = < 190 - TData extends { 191 - body?: unknown; 192 - path?: Record<string, unknown>; 193 - query?: Record<string, unknown>; 194 - url: string; 195 - }, 196 - >( 197 - options: TData & Options<TData>, 198 - ) => string; 199 - 200 - export type Client = CoreClient< 201 - RequestFn, 202 - Config, 203 - MethodFn, 204 - BuildUrlFn, 205 - SseFn 206 - > & { 207 - interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>; 208 - }; 209 - 210 - /** 211 - * The `createClientConfig()` function will be called on client initialization 212 - * and the returned object will become the client's initial configuration. 213 - * 214 - * You may want to initialize your client this way instead of calling 215 - * `setConfig()`. This is useful for example if you're using Next.js 216 - * to ensure your client always has the correct values. 217 - */ 218 - export type CreateClientConfig<T extends ClientOptions = ClientOptions> = ( 219 - override?: Config<ClientOptions & T>, 220 - ) => Config<Required<ClientOptions> & T>; 221 - 222 - export interface TDataShape { 223 - body?: unknown; 224 - headers?: unknown; 225 - path?: unknown; 226 - query?: unknown; 227 - url: string; 228 - } 229 - 230 - type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>; 231 - 232 - export type Options< 233 - TData extends TDataShape = TDataShape, 234 - ThrowOnError extends boolean = boolean, 235 - TResponse = unknown, 236 - TResponseStyle extends ResponseStyle = 'fields', 237 - > = OmitKeys< 238 - RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 239 - 'body' | 'path' | 'query' | 'url' 240 - > & 241 - ([TData] extends [never] ? unknown : Omit<TData, 'url'>); 242 - 243 - export type OptionsLegacyParser< 244 - TData = unknown, 245 - ThrowOnError extends boolean = boolean, 246 - TResponseStyle extends ResponseStyle = 'fields', 247 - > = TData extends { body?: any } 248 - ? TData extends { headers?: any } 249 - ? OmitKeys< 250 - RequestOptions<unknown, TResponseStyle, ThrowOnError>, 251 - 'body' | 'headers' | 'url' 252 - > & 253 - TData 254 - : OmitKeys< 255 - RequestOptions<unknown, TResponseStyle, ThrowOnError>, 256 - 'body' | 'url' 257 - > & 258 - TData & 259 - Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'headers'> 260 - : TData extends { headers?: any } 261 - ? OmitKeys< 262 - RequestOptions<unknown, TResponseStyle, ThrowOnError>, 263 - 'headers' | 'url' 264 - > & 265 - TData & 266 - Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'body'> 267 - : OmitKeys<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'url'> & 268 - TData;
-337
examples/openapi-ts-sample/src/client/client/utils.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import { getAuthToken } from '../core/auth.gen'; 4 - import type { QuerySerializerOptions } from '../core/bodySerializer.gen'; 5 - import { jsonBodySerializer } from '../core/bodySerializer.gen'; 6 - import { 7 - serializeArrayParam, 8 - serializeObjectParam, 9 - serializePrimitiveParam, 10 - } from '../core/pathSerializer.gen'; 11 - import { getUrl } from '../core/utils.gen'; 12 - import type { 13 - Client, 14 - ClientOptions, 15 - Config, 16 - RequestOptions, 17 - } from './types.gen'; 18 - 19 - export const createQuerySerializer = <T = unknown>({ 20 - parameters = {}, 21 - ...args 22 - }: QuerySerializerOptions = {}) => { 23 - const querySerializer = (queryParams: T) => { 24 - const search: string[] = []; 25 - if (queryParams && typeof queryParams === 'object') { 26 - for (const name in queryParams) { 27 - const value = queryParams[name]; 28 - 29 - if (value === undefined || value === null) { 30 - continue; 31 - } 32 - 33 - const options = parameters[name] || args; 34 - 35 - if (Array.isArray(value)) { 36 - const serializedArray = serializeArrayParam({ 37 - allowReserved: options.allowReserved, 38 - explode: true, 39 - name, 40 - style: 'form', 41 - value, 42 - ...options.array, 43 - }); 44 - if (serializedArray) search.push(serializedArray); 45 - } else if (typeof value === 'object') { 46 - const serializedObject = serializeObjectParam({ 47 - allowReserved: options.allowReserved, 48 - explode: true, 49 - name, 50 - style: 'deepObject', 51 - value: value as Record<string, unknown>, 52 - ...options.object, 53 - }); 54 - if (serializedObject) search.push(serializedObject); 55 - } else { 56 - const serializedPrimitive = serializePrimitiveParam({ 57 - allowReserved: options.allowReserved, 58 - name, 59 - value: value as string, 60 - }); 61 - if (serializedPrimitive) search.push(serializedPrimitive); 62 - } 63 - } 64 - } 65 - return search.join('&'); 66 - }; 67 - return querySerializer; 68 - }; 69 - 70 - /** 71 - * Infers parseAs value from provided Content-Type header. 72 - */ 73 - export const getParseAs = ( 74 - contentType: string | null, 75 - ): Exclude<Config['parseAs'], 'auto'> => { 76 - if (!contentType) { 77 - // If no Content-Type header is provided, the best we can do is return the raw response body, 78 - // which is effectively the same as the 'stream' option. 79 - return 'stream'; 80 - } 81 - 82 - const cleanContent = contentType.split(';')[0]?.trim(); 83 - 84 - if (!cleanContent) { 85 - return; 86 - } 87 - 88 - if ( 89 - cleanContent.startsWith('application/json') || 90 - cleanContent.endsWith('+json') 91 - ) { 92 - return 'json'; 93 - } 94 - 95 - if (cleanContent === 'multipart/form-data') { 96 - return 'formData'; 97 - } 98 - 99 - if ( 100 - ['application/', 'audio/', 'image/', 'video/'].some((type) => 101 - cleanContent.startsWith(type), 102 - ) 103 - ) { 104 - return 'blob'; 105 - } 106 - 107 - if (cleanContent.startsWith('text/')) { 108 - return 'text'; 109 - } 110 - 111 - return; 112 - }; 113 - 114 - const checkForExistence = ( 115 - options: Pick<RequestOptions, 'auth' | 'query'> & { 116 - headers: Headers; 117 - }, 118 - name?: string, 119 - ): boolean => { 120 - if (!name) { 121 - return false; 122 - } 123 - if ( 124 - options.headers.has(name) || 125 - options.query?.[name] || 126 - options.headers.get('Cookie')?.includes(`${name}=`) 127 - ) { 128 - return true; 129 - } 130 - return false; 131 - }; 132 - 133 - export const setAuthParams = async ({ 134 - security, 135 - ...options 136 - }: Pick<Required<RequestOptions>, 'security'> & 137 - Pick<RequestOptions, 'auth' | 'query'> & { 138 - headers: Headers; 139 - }) => { 140 - for (const auth of security) { 141 - if (checkForExistence(options, auth.name)) { 142 - continue; 143 - } 144 - 145 - const token = await getAuthToken(auth, options.auth); 146 - 147 - if (!token) { 148 - continue; 149 - } 150 - 151 - const name = auth.name ?? 'Authorization'; 152 - 153 - switch (auth.in) { 154 - case 'query': 155 - if (!options.query) { 156 - options.query = {}; 157 - } 158 - options.query[name] = token; 159 - break; 160 - case 'cookie': 161 - options.headers.append('Cookie', `${name}=${token}`); 162 - break; 163 - case 'header': 164 - default: 165 - options.headers.set(name, token); 166 - break; 167 - } 168 - } 169 - }; 170 - 171 - export const buildUrl: Client['buildUrl'] = (options) => 172 - getUrl({ 173 - baseUrl: options.baseUrl as string, 174 - path: options.path, 175 - query: options.query, 176 - querySerializer: 177 - typeof options.querySerializer === 'function' 178 - ? options.querySerializer 179 - : createQuerySerializer(options.querySerializer), 180 - url: options.url, 181 - }); 182 - 183 - export const mergeConfigs = (a: Config, b: Config): Config => { 184 - const config = { ...a, ...b }; 185 - if (config.baseUrl?.endsWith('/')) { 186 - config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); 187 - } 188 - config.headers = mergeHeaders(a.headers, b.headers); 189 - return config; 190 - }; 191 - 192 - const headersEntries = (headers: Headers): Array<[string, string]> => { 193 - const entries: Array<[string, string]> = []; 194 - headers.forEach((value, key) => { 195 - entries.push([key, value]); 196 - }); 197 - return entries; 198 - }; 199 - 200 - export const mergeHeaders = ( 201 - ...headers: Array<Required<Config>['headers'] | undefined> 202 - ): Headers => { 203 - const mergedHeaders = new Headers(); 204 - for (const header of headers) { 205 - if (!header) { 206 - continue; 207 - } 208 - 209 - const iterator = 210 - header instanceof Headers 211 - ? headersEntries(header) 212 - : Object.entries(header); 213 - 214 - for (const [key, value] of iterator) { 215 - if (value === null) { 216 - mergedHeaders.delete(key); 217 - } else if (Array.isArray(value)) { 218 - for (const v of value) { 219 - mergedHeaders.append(key, v as string); 220 - } 221 - } else if (value !== undefined) { 222 - // assume object headers are meant to be JSON stringified, i.e. their 223 - // content value in OpenAPI specification is 'application/json' 224 - mergedHeaders.set( 225 - key, 226 - typeof value === 'object' ? JSON.stringify(value) : (value as string), 227 - ); 228 - } 229 - } 230 - } 231 - return mergedHeaders; 232 - }; 233 - 234 - type ErrInterceptor<Err, Res, Req, Options> = ( 235 - error: Err, 236 - response: Res, 237 - request: Req, 238 - options: Options, 239 - ) => Err | Promise<Err>; 240 - 241 - type ReqInterceptor<Req, Options> = ( 242 - request: Req, 243 - options: Options, 244 - ) => Req | Promise<Req>; 245 - 246 - type ResInterceptor<Res, Req, Options> = ( 247 - response: Res, 248 - request: Req, 249 - options: Options, 250 - ) => Res | Promise<Res>; 251 - 252 - class Interceptors<Interceptor> { 253 - fns: Array<Interceptor | null> = []; 254 - 255 - clear(): void { 256 - this.fns = []; 257 - } 258 - 259 - eject(id: number | Interceptor): void { 260 - const index = this.getInterceptorIndex(id); 261 - if (this.fns[index]) { 262 - this.fns[index] = null; 263 - } 264 - } 265 - 266 - exists(id: number | Interceptor): boolean { 267 - const index = this.getInterceptorIndex(id); 268 - return Boolean(this.fns[index]); 269 - } 270 - 271 - getInterceptorIndex(id: number | Interceptor): number { 272 - if (typeof id === 'number') { 273 - return this.fns[id] ? id : -1; 274 - } 275 - return this.fns.indexOf(id); 276 - } 277 - 278 - update( 279 - id: number | Interceptor, 280 - fn: Interceptor, 281 - ): number | Interceptor | false { 282 - const index = this.getInterceptorIndex(id); 283 - if (this.fns[index]) { 284 - this.fns[index] = fn; 285 - return id; 286 - } 287 - return false; 288 - } 289 - 290 - use(fn: Interceptor): number { 291 - this.fns.push(fn); 292 - return this.fns.length - 1; 293 - } 294 - } 295 - 296 - export interface Middleware<Req, Res, Err, Options> { 297 - error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>; 298 - request: Interceptors<ReqInterceptor<Req, Options>>; 299 - response: Interceptors<ResInterceptor<Res, Req, Options>>; 300 - } 301 - 302 - export const createInterceptors = <Req, Res, Err, Options>(): Middleware< 303 - Req, 304 - Res, 305 - Err, 306 - Options 307 - > => ({ 308 - error: new Interceptors<ErrInterceptor<Err, Res, Req, Options>>(), 309 - request: new Interceptors<ReqInterceptor<Req, Options>>(), 310 - response: new Interceptors<ResInterceptor<Res, Req, Options>>(), 311 - }); 312 - 313 - const defaultQuerySerializer = createQuerySerializer({ 314 - allowReserved: false, 315 - array: { 316 - explode: true, 317 - style: 'form', 318 - }, 319 - object: { 320 - explode: true, 321 - style: 'deepObject', 322 - }, 323 - }); 324 - 325 - const defaultHeaders = { 326 - 'Content-Type': 'application/json', 327 - }; 328 - 329 - export const createConfig = <T extends ClientOptions = ClientOptions>( 330 - override: Config<Omit<ClientOptions, keyof T> & T> = {}, 331 - ): Config<Omit<ClientOptions, keyof T> & T> => ({ 332 - ...jsonBodySerializer, 333 - headers: defaultHeaders, 334 - parseAs: 'auto', 335 - querySerializer: defaultQuerySerializer, 336 - ...override, 337 - });
-42
examples/openapi-ts-sample/src/client/core/auth.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - export type AuthToken = string | undefined; 4 - 5 - export interface Auth { 6 - /** 7 - * Which part of the request do we use to send the auth? 8 - * 9 - * @default 'header' 10 - */ 11 - in?: 'header' | 'query' | 'cookie'; 12 - /** 13 - * Header or query parameter name. 14 - * 15 - * @default 'Authorization' 16 - */ 17 - name?: string; 18 - scheme?: 'basic' | 'bearer'; 19 - type: 'apiKey' | 'http'; 20 - } 21 - 22 - export const getAuthToken = async ( 23 - auth: Auth, 24 - callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken, 25 - ): Promise<string | undefined> => { 26 - const token = 27 - typeof callback === 'function' ? await callback(auth) : callback; 28 - 29 - if (!token) { 30 - return; 31 - } 32 - 33 - if (auth.scheme === 'bearer') { 34 - return `Bearer ${token}`; 35 - } 36 - 37 - if (auth.scheme === 'basic') { 38 - return `Basic ${btoa(token)}`; 39 - } 40 - 41 - return token; 42 - };
-100
examples/openapi-ts-sample/src/client/core/bodySerializer.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import type { 4 - ArrayStyle, 5 - ObjectStyle, 6 - SerializerOptions, 7 - } from './pathSerializer.gen'; 8 - 9 - export type QuerySerializer = (query: Record<string, unknown>) => string; 10 - 11 - export type BodySerializer = (body: any) => any; 12 - 13 - type QuerySerializerOptionsObject = { 14 - allowReserved?: boolean; 15 - array?: Partial<SerializerOptions<ArrayStyle>>; 16 - object?: Partial<SerializerOptions<ObjectStyle>>; 17 - }; 18 - 19 - export type QuerySerializerOptions = QuerySerializerOptionsObject & { 20 - /** 21 - * Per-parameter serialization overrides. When provided, these settings 22 - * override the global array/object settings for specific parameter names. 23 - */ 24 - parameters?: Record<string, QuerySerializerOptionsObject>; 25 - }; 26 - 27 - const serializeFormDataPair = ( 28 - data: FormData, 29 - key: string, 30 - value: unknown, 31 - ): void => { 32 - if (typeof value === 'string' || value instanceof Blob) { 33 - data.append(key, value); 34 - } else if (value instanceof Date) { 35 - data.append(key, value.toISOString()); 36 - } else { 37 - data.append(key, JSON.stringify(value)); 38 - } 39 - }; 40 - 41 - const serializeUrlSearchParamsPair = ( 42 - data: URLSearchParams, 43 - key: string, 44 - value: unknown, 45 - ): void => { 46 - if (typeof value === 'string') { 47 - data.append(key, value); 48 - } else { 49 - data.append(key, JSON.stringify(value)); 50 - } 51 - }; 52 - 53 - export const formDataBodySerializer = { 54 - bodySerializer: <T extends Record<string, any> | Array<Record<string, any>>>( 55 - body: T, 56 - ): FormData => { 57 - const data = new FormData(); 58 - 59 - Object.entries(body).forEach(([key, value]) => { 60 - if (value === undefined || value === null) { 61 - return; 62 - } 63 - if (Array.isArray(value)) { 64 - value.forEach((v) => serializeFormDataPair(data, key, v)); 65 - } else { 66 - serializeFormDataPair(data, key, value); 67 - } 68 - }); 69 - 70 - return data; 71 - }, 72 - }; 73 - 74 - export const jsonBodySerializer = { 75 - bodySerializer: <T>(body: T): string => 76 - JSON.stringify(body, (_key, value) => 77 - typeof value === 'bigint' ? value.toString() : value, 78 - ), 79 - }; 80 - 81 - export const urlSearchParamsBodySerializer = { 82 - bodySerializer: <T extends Record<string, any> | Array<Record<string, any>>>( 83 - body: T, 84 - ): string => { 85 - const data = new URLSearchParams(); 86 - 87 - Object.entries(body).forEach(([key, value]) => { 88 - if (value === undefined || value === null) { 89 - return; 90 - } 91 - if (Array.isArray(value)) { 92 - value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); 93 - } else { 94 - serializeUrlSearchParamsPair(data, key, value); 95 - } 96 - }); 97 - 98 - return data.toString(); 99 - }, 100 - };
-176
examples/openapi-ts-sample/src/client/core/params.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - type Slot = 'body' | 'headers' | 'path' | 'query'; 4 - 5 - export type Field = 6 - | { 7 - in: Exclude<Slot, 'body'>; 8 - /** 9 - * Field name. This is the name we want the user to see and use. 10 - */ 11 - key: string; 12 - /** 13 - * Field mapped name. This is the name we want to use in the request. 14 - * If omitted, we use the same value as `key`. 15 - */ 16 - map?: string; 17 - } 18 - | { 19 - in: Extract<Slot, 'body'>; 20 - /** 21 - * Key isn't required for bodies. 22 - */ 23 - key?: string; 24 - map?: string; 25 - } 26 - | { 27 - /** 28 - * Field name. This is the name we want the user to see and use. 29 - */ 30 - key: string; 31 - /** 32 - * Field mapped name. This is the name we want to use in the request. 33 - * If `in` is omitted, `map` aliases `key` to the transport layer. 34 - */ 35 - map: Slot; 36 - }; 37 - 38 - export interface Fields { 39 - allowExtra?: Partial<Record<Slot, boolean>>; 40 - args?: ReadonlyArray<Field>; 41 - } 42 - 43 - export type FieldsConfig = ReadonlyArray<Field | Fields>; 44 - 45 - const extraPrefixesMap: Record<string, Slot> = { 46 - $body_: 'body', 47 - $headers_: 'headers', 48 - $path_: 'path', 49 - $query_: 'query', 50 - }; 51 - const extraPrefixes = Object.entries(extraPrefixesMap); 52 - 53 - type KeyMap = Map< 54 - string, 55 - | { 56 - in: Slot; 57 - map?: string; 58 - } 59 - | { 60 - in?: never; 61 - map: Slot; 62 - } 63 - >; 64 - 65 - const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { 66 - if (!map) { 67 - map = new Map(); 68 - } 69 - 70 - for (const config of fields) { 71 - if ('in' in config) { 72 - if (config.key) { 73 - map.set(config.key, { 74 - in: config.in, 75 - map: config.map, 76 - }); 77 - } 78 - } else if ('key' in config) { 79 - map.set(config.key, { 80 - map: config.map, 81 - }); 82 - } else if (config.args) { 83 - buildKeyMap(config.args, map); 84 - } 85 - } 86 - 87 - return map; 88 - }; 89 - 90 - interface Params { 91 - body: unknown; 92 - headers: Record<string, unknown>; 93 - path: Record<string, unknown>; 94 - query: Record<string, unknown>; 95 - } 96 - 97 - const stripEmptySlots = (params: Params) => { 98 - for (const [slot, value] of Object.entries(params)) { 99 - if (value && typeof value === 'object' && !Object.keys(value).length) { 100 - delete params[slot as Slot]; 101 - } 102 - } 103 - }; 104 - 105 - export const buildClientParams = ( 106 - args: ReadonlyArray<unknown>, 107 - fields: FieldsConfig, 108 - ) => { 109 - const params: Params = { 110 - body: {}, 111 - headers: {}, 112 - path: {}, 113 - query: {}, 114 - }; 115 - 116 - const map = buildKeyMap(fields); 117 - 118 - let config: FieldsConfig[number] | undefined; 119 - 120 - for (const [index, arg] of args.entries()) { 121 - if (fields[index]) { 122 - config = fields[index]; 123 - } 124 - 125 - if (!config) { 126 - continue; 127 - } 128 - 129 - if ('in' in config) { 130 - if (config.key) { 131 - const field = map.get(config.key)!; 132 - const name = field.map || config.key; 133 - if (field.in) { 134 - (params[field.in] as Record<string, unknown>)[name] = arg; 135 - } 136 - } else { 137 - params.body = arg; 138 - } 139 - } else { 140 - for (const [key, value] of Object.entries(arg ?? {})) { 141 - const field = map.get(key); 142 - 143 - if (field) { 144 - if (field.in) { 145 - const name = field.map || key; 146 - (params[field.in] as Record<string, unknown>)[name] = value; 147 - } else { 148 - params[field.map] = value; 149 - } 150 - } else { 151 - const extra = extraPrefixes.find(([prefix]) => 152 - key.startsWith(prefix), 153 - ); 154 - 155 - if (extra) { 156 - const [prefix, slot] = extra; 157 - (params[slot] as Record<string, unknown>)[ 158 - key.slice(prefix.length) 159 - ] = value; 160 - } else if ('allowExtra' in config && config.allowExtra) { 161 - for (const [slot, allowed] of Object.entries(config.allowExtra)) { 162 - if (allowed) { 163 - (params[slot as Slot] as Record<string, unknown>)[key] = value; 164 - break; 165 - } 166 - } 167 - } 168 - } 169 - } 170 - } 171 - } 172 - 173 - stripEmptySlots(params); 174 - 175 - return params; 176 - };
-181
examples/openapi-ts-sample/src/client/core/pathSerializer.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - interface SerializeOptions<T> 4 - extends SerializePrimitiveOptions, 5 - SerializerOptions<T> {} 6 - 7 - interface SerializePrimitiveOptions { 8 - allowReserved?: boolean; 9 - name: string; 10 - } 11 - 12 - export interface SerializerOptions<T> { 13 - /** 14 - * @default true 15 - */ 16 - explode: boolean; 17 - style: T; 18 - } 19 - 20 - export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; 21 - export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; 22 - type MatrixStyle = 'label' | 'matrix' | 'simple'; 23 - export type ObjectStyle = 'form' | 'deepObject'; 24 - type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; 25 - 26 - interface SerializePrimitiveParam extends SerializePrimitiveOptions { 27 - value: string; 28 - } 29 - 30 - export const separatorArrayExplode = (style: ArraySeparatorStyle) => { 31 - switch (style) { 32 - case 'label': 33 - return '.'; 34 - case 'matrix': 35 - return ';'; 36 - case 'simple': 37 - return ','; 38 - default: 39 - return '&'; 40 - } 41 - }; 42 - 43 - export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { 44 - switch (style) { 45 - case 'form': 46 - return ','; 47 - case 'pipeDelimited': 48 - return '|'; 49 - case 'spaceDelimited': 50 - return '%20'; 51 - default: 52 - return ','; 53 - } 54 - }; 55 - 56 - export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { 57 - switch (style) { 58 - case 'label': 59 - return '.'; 60 - case 'matrix': 61 - return ';'; 62 - case 'simple': 63 - return ','; 64 - default: 65 - return '&'; 66 - } 67 - }; 68 - 69 - export const serializeArrayParam = ({ 70 - allowReserved, 71 - explode, 72 - name, 73 - style, 74 - value, 75 - }: SerializeOptions<ArraySeparatorStyle> & { 76 - value: unknown[]; 77 - }) => { 78 - if (!explode) { 79 - const joinedValues = ( 80 - allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) 81 - ).join(separatorArrayNoExplode(style)); 82 - switch (style) { 83 - case 'label': 84 - return `.${joinedValues}`; 85 - case 'matrix': 86 - return `;${name}=${joinedValues}`; 87 - case 'simple': 88 - return joinedValues; 89 - default: 90 - return `${name}=${joinedValues}`; 91 - } 92 - } 93 - 94 - const separator = separatorArrayExplode(style); 95 - const joinedValues = value 96 - .map((v) => { 97 - if (style === 'label' || style === 'simple') { 98 - return allowReserved ? v : encodeURIComponent(v as string); 99 - } 100 - 101 - return serializePrimitiveParam({ 102 - allowReserved, 103 - name, 104 - value: v as string, 105 - }); 106 - }) 107 - .join(separator); 108 - return style === 'label' || style === 'matrix' 109 - ? separator + joinedValues 110 - : joinedValues; 111 - }; 112 - 113 - export const serializePrimitiveParam = ({ 114 - allowReserved, 115 - name, 116 - value, 117 - }: SerializePrimitiveParam) => { 118 - if (value === undefined || value === null) { 119 - return ''; 120 - } 121 - 122 - if (typeof value === 'object') { 123 - throw new Error( 124 - 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.', 125 - ); 126 - } 127 - 128 - return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; 129 - }; 130 - 131 - export const serializeObjectParam = ({ 132 - allowReserved, 133 - explode, 134 - name, 135 - style, 136 - value, 137 - valueOnly, 138 - }: SerializeOptions<ObjectSeparatorStyle> & { 139 - value: Record<string, unknown> | Date; 140 - valueOnly?: boolean; 141 - }) => { 142 - if (value instanceof Date) { 143 - return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; 144 - } 145 - 146 - if (style !== 'deepObject' && !explode) { 147 - let values: string[] = []; 148 - Object.entries(value).forEach(([key, v]) => { 149 - values = [ 150 - ...values, 151 - key, 152 - allowReserved ? (v as string) : encodeURIComponent(v as string), 153 - ]; 154 - }); 155 - const joinedValues = values.join(','); 156 - switch (style) { 157 - case 'form': 158 - return `${name}=${joinedValues}`; 159 - case 'label': 160 - return `.${joinedValues}`; 161 - case 'matrix': 162 - return `;${name}=${joinedValues}`; 163 - default: 164 - return joinedValues; 165 - } 166 - } 167 - 168 - const separator = separatorObjectExplode(style); 169 - const joinedValues = Object.entries(value) 170 - .map(([key, v]) => 171 - serializePrimitiveParam({ 172 - allowReserved, 173 - name: style === 'deepObject' ? `${name}[${key}]` : key, 174 - value: v as string, 175 - }), 176 - ) 177 - .join(separator); 178 - return style === 'label' || style === 'matrix' 179 - ? separator + joinedValues 180 - : joinedValues; 181 - };
-136
examples/openapi-ts-sample/src/client/core/queryKeySerializer.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - /** 4 - * JSON-friendly union that mirrors what Pinia Colada can hash. 5 - */ 6 - export type JsonValue = 7 - | null 8 - | string 9 - | number 10 - | boolean 11 - | JsonValue[] 12 - | { [key: string]: JsonValue }; 13 - 14 - /** 15 - * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. 16 - */ 17 - export const queryKeyJsonReplacer = (_key: string, value: unknown) => { 18 - if ( 19 - value === undefined || 20 - typeof value === 'function' || 21 - typeof value === 'symbol' 22 - ) { 23 - return undefined; 24 - } 25 - if (typeof value === 'bigint') { 26 - return value.toString(); 27 - } 28 - if (value instanceof Date) { 29 - return value.toISOString(); 30 - } 31 - return value; 32 - }; 33 - 34 - /** 35 - * Safely stringifies a value and parses it back into a JsonValue. 36 - */ 37 - export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { 38 - try { 39 - const json = JSON.stringify(input, queryKeyJsonReplacer); 40 - if (json === undefined) { 41 - return undefined; 42 - } 43 - return JSON.parse(json) as JsonValue; 44 - } catch { 45 - return undefined; 46 - } 47 - }; 48 - 49 - /** 50 - * Detects plain objects (including objects with a null prototype). 51 - */ 52 - const isPlainObject = (value: unknown): value is Record<string, unknown> => { 53 - if (value === null || typeof value !== 'object') { 54 - return false; 55 - } 56 - const prototype = Object.getPrototypeOf(value as object); 57 - return prototype === Object.prototype || prototype === null; 58 - }; 59 - 60 - /** 61 - * Turns URLSearchParams into a sorted JSON object for deterministic keys. 62 - */ 63 - const serializeSearchParams = (params: URLSearchParams): JsonValue => { 64 - const entries = Array.from(params.entries()).sort(([a], [b]) => 65 - a.localeCompare(b), 66 - ); 67 - const result: Record<string, JsonValue> = {}; 68 - 69 - for (const [key, value] of entries) { 70 - const existing = result[key]; 71 - if (existing === undefined) { 72 - result[key] = value; 73 - continue; 74 - } 75 - 76 - if (Array.isArray(existing)) { 77 - (existing as string[]).push(value); 78 - } else { 79 - result[key] = [existing, value]; 80 - } 81 - } 82 - 83 - return result; 84 - }; 85 - 86 - /** 87 - * Normalizes any accepted value into a JSON-friendly shape for query keys. 88 - */ 89 - export const serializeQueryKeyValue = ( 90 - value: unknown, 91 - ): JsonValue | undefined => { 92 - if (value === null) { 93 - return null; 94 - } 95 - 96 - if ( 97 - typeof value === 'string' || 98 - typeof value === 'number' || 99 - typeof value === 'boolean' 100 - ) { 101 - return value; 102 - } 103 - 104 - if ( 105 - value === undefined || 106 - typeof value === 'function' || 107 - typeof value === 'symbol' 108 - ) { 109 - return undefined; 110 - } 111 - 112 - if (typeof value === 'bigint') { 113 - return value.toString(); 114 - } 115 - 116 - if (value instanceof Date) { 117 - return value.toISOString(); 118 - } 119 - 120 - if (Array.isArray(value)) { 121 - return stringifyToJsonValue(value); 122 - } 123 - 124 - if ( 125 - typeof URLSearchParams !== 'undefined' && 126 - value instanceof URLSearchParams 127 - ) { 128 - return serializeSearchParams(value); 129 - } 130 - 131 - if (isPlainObject(value)) { 132 - return stringifyToJsonValue(value); 133 - } 134 - 135 - return undefined; 136 - };
-264
examples/openapi-ts-sample/src/client/core/serverSentEvents.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import type { Config } from './types.gen'; 4 - 5 - export type ServerSentEventsOptions<TData = unknown> = Omit< 6 - RequestInit, 7 - 'method' 8 - > & 9 - Pick<Config, 'method' | 'responseTransformer' | 'responseValidator'> & { 10 - /** 11 - * Fetch API implementation. You can use this option to provide a custom 12 - * fetch instance. 13 - * 14 - * @default globalThis.fetch 15 - */ 16 - fetch?: typeof fetch; 17 - /** 18 - * Implementing clients can call request interceptors inside this hook. 19 - */ 20 - onRequest?: (url: string, init: RequestInit) => Promise<Request>; 21 - /** 22 - * Callback invoked when a network or parsing error occurs during streaming. 23 - * 24 - * This option applies only if the endpoint returns a stream of events. 25 - * 26 - * @param error The error that occurred. 27 - */ 28 - onSseError?: (error: unknown) => void; 29 - /** 30 - * Callback invoked when an event is streamed from the server. 31 - * 32 - * This option applies only if the endpoint returns a stream of events. 33 - * 34 - * @param event Event streamed from the server. 35 - * @returns Nothing (void). 36 - */ 37 - onSseEvent?: (event: StreamEvent<TData>) => void; 38 - serializedBody?: RequestInit['body']; 39 - /** 40 - * Default retry delay in milliseconds. 41 - * 42 - * This option applies only if the endpoint returns a stream of events. 43 - * 44 - * @default 3000 45 - */ 46 - sseDefaultRetryDelay?: number; 47 - /** 48 - * Maximum number of retry attempts before giving up. 49 - */ 50 - sseMaxRetryAttempts?: number; 51 - /** 52 - * Maximum retry delay in milliseconds. 53 - * 54 - * Applies only when exponential backoff is used. 55 - * 56 - * This option applies only if the endpoint returns a stream of events. 57 - * 58 - * @default 30000 59 - */ 60 - sseMaxRetryDelay?: number; 61 - /** 62 - * Optional sleep function for retry backoff. 63 - * 64 - * Defaults to using `setTimeout`. 65 - */ 66 - sseSleepFn?: (ms: number) => Promise<void>; 67 - url: string; 68 - }; 69 - 70 - export interface StreamEvent<TData = unknown> { 71 - data: TData; 72 - event?: string; 73 - id?: string; 74 - retry?: number; 75 - } 76 - 77 - export type ServerSentEventsResult< 78 - TData = unknown, 79 - TReturn = void, 80 - TNext = unknown, 81 - > = { 82 - stream: AsyncGenerator< 83 - TData extends Record<string, unknown> ? TData[keyof TData] : TData, 84 - TReturn, 85 - TNext 86 - >; 87 - }; 88 - 89 - export const createSseClient = <TData = unknown>({ 90 - onRequest, 91 - onSseError, 92 - onSseEvent, 93 - responseTransformer, 94 - responseValidator, 95 - sseDefaultRetryDelay, 96 - sseMaxRetryAttempts, 97 - sseMaxRetryDelay, 98 - sseSleepFn, 99 - url, 100 - ...options 101 - }: ServerSentEventsOptions): ServerSentEventsResult<TData> => { 102 - let lastEventId: string | undefined; 103 - 104 - const sleep = 105 - sseSleepFn ?? 106 - ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); 107 - 108 - const createStream = async function* () { 109 - let retryDelay: number = sseDefaultRetryDelay ?? 3000; 110 - let attempt = 0; 111 - const signal = options.signal ?? new AbortController().signal; 112 - 113 - while (true) { 114 - if (signal.aborted) break; 115 - 116 - attempt++; 117 - 118 - const headers = 119 - options.headers instanceof Headers 120 - ? options.headers 121 - : new Headers(options.headers as Record<string, string> | undefined); 122 - 123 - if (lastEventId !== undefined) { 124 - headers.set('Last-Event-ID', lastEventId); 125 - } 126 - 127 - try { 128 - const requestInit: RequestInit = { 129 - redirect: 'follow', 130 - ...options, 131 - body: options.serializedBody, 132 - headers, 133 - signal, 134 - }; 135 - let request = new Request(url, requestInit); 136 - if (onRequest) { 137 - request = await onRequest(url, requestInit); 138 - } 139 - // fetch must be assigned here, otherwise it would throw the error: 140 - // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation 141 - const _fetch = options.fetch ?? globalThis.fetch; 142 - const response = await _fetch(request); 143 - 144 - if (!response.ok) 145 - throw new Error( 146 - `SSE failed: ${response.status} ${response.statusText}`, 147 - ); 148 - 149 - if (!response.body) throw new Error('No body in SSE response'); 150 - 151 - const reader = response.body 152 - .pipeThrough(new TextDecoderStream()) 153 - .getReader(); 154 - 155 - let buffer = ''; 156 - 157 - const abortHandler = () => { 158 - try { 159 - reader.cancel(); 160 - } catch { 161 - // noop 162 - } 163 - }; 164 - 165 - signal.addEventListener('abort', abortHandler); 166 - 167 - try { 168 - while (true) { 169 - const { done, value } = await reader.read(); 170 - if (done) break; 171 - buffer += value; 172 - 173 - const chunks = buffer.split('\n\n'); 174 - buffer = chunks.pop() ?? ''; 175 - 176 - for (const chunk of chunks) { 177 - const lines = chunk.split('\n'); 178 - const dataLines: Array<string> = []; 179 - let eventName: string | undefined; 180 - 181 - for (const line of lines) { 182 - if (line.startsWith('data:')) { 183 - dataLines.push(line.replace(/^data:\s*/, '')); 184 - } else if (line.startsWith('event:')) { 185 - eventName = line.replace(/^event:\s*/, ''); 186 - } else if (line.startsWith('id:')) { 187 - lastEventId = line.replace(/^id:\s*/, ''); 188 - } else if (line.startsWith('retry:')) { 189 - const parsed = Number.parseInt( 190 - line.replace(/^retry:\s*/, ''), 191 - 10, 192 - ); 193 - if (!Number.isNaN(parsed)) { 194 - retryDelay = parsed; 195 - } 196 - } 197 - } 198 - 199 - let data: unknown; 200 - let parsedJson = false; 201 - 202 - if (dataLines.length) { 203 - const rawData = dataLines.join('\n'); 204 - try { 205 - data = JSON.parse(rawData); 206 - parsedJson = true; 207 - } catch { 208 - data = rawData; 209 - } 210 - } 211 - 212 - if (parsedJson) { 213 - if (responseValidator) { 214 - await responseValidator(data); 215 - } 216 - 217 - if (responseTransformer) { 218 - data = await responseTransformer(data); 219 - } 220 - } 221 - 222 - onSseEvent?.({ 223 - data, 224 - event: eventName, 225 - id: lastEventId, 226 - retry: retryDelay, 227 - }); 228 - 229 - if (dataLines.length) { 230 - yield data as any; 231 - } 232 - } 233 - } 234 - } finally { 235 - signal.removeEventListener('abort', abortHandler); 236 - reader.releaseLock(); 237 - } 238 - 239 - break; // exit loop on normal completion 240 - } catch (error) { 241 - // connection failed or aborted; retry after delay 242 - onSseError?.(error); 243 - 244 - if ( 245 - sseMaxRetryAttempts !== undefined && 246 - attempt >= sseMaxRetryAttempts 247 - ) { 248 - break; // stop after firing error 249 - } 250 - 251 - // exponential backoff: double retry each attempt, cap at 30s 252 - const backoff = Math.min( 253 - retryDelay * 2 ** (attempt - 1), 254 - sseMaxRetryDelay ?? 30000, 255 - ); 256 - await sleep(backoff); 257 - } 258 - } 259 - }; 260 - 261 - const stream = createStream(); 262 - 263 - return { stream }; 264 - };
-118
examples/openapi-ts-sample/src/client/core/types.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import type { Auth, AuthToken } from './auth.gen'; 4 - import type { 5 - BodySerializer, 6 - QuerySerializer, 7 - QuerySerializerOptions, 8 - } from './bodySerializer.gen'; 9 - 10 - export type HttpMethod = 11 - | 'connect' 12 - | 'delete' 13 - | 'get' 14 - | 'head' 15 - | 'options' 16 - | 'patch' 17 - | 'post' 18 - | 'put' 19 - | 'trace'; 20 - 21 - export type Client< 22 - RequestFn = never, 23 - Config = unknown, 24 - MethodFn = never, 25 - BuildUrlFn = never, 26 - SseFn = never, 27 - > = { 28 - /** 29 - * Returns the final request URL. 30 - */ 31 - buildUrl: BuildUrlFn; 32 - getConfig: () => Config; 33 - request: RequestFn; 34 - setConfig: (config: Config) => Config; 35 - } & { 36 - [K in HttpMethod]: MethodFn; 37 - } & ([SseFn] extends [never] 38 - ? { sse?: never } 39 - : { sse: { [K in HttpMethod]: SseFn } }); 40 - 41 - export interface Config { 42 - /** 43 - * Auth token or a function returning auth token. The resolved value will be 44 - * added to the request payload as defined by its `security` array. 45 - */ 46 - auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken; 47 - /** 48 - * A function for serializing request body parameter. By default, 49 - * {@link JSON.stringify()} will be used. 50 - */ 51 - bodySerializer?: BodySerializer | null; 52 - /** 53 - * An object containing any HTTP headers that you want to pre-populate your 54 - * `Headers` object with. 55 - * 56 - * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} 57 - */ 58 - headers?: 59 - | RequestInit['headers'] 60 - | Record< 61 - string, 62 - | string 63 - | number 64 - | boolean 65 - | (string | number | boolean)[] 66 - | null 67 - | undefined 68 - | unknown 69 - >; 70 - /** 71 - * The request method. 72 - * 73 - * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} 74 - */ 75 - method?: Uppercase<HttpMethod>; 76 - /** 77 - * A function for serializing request query parameters. By default, arrays 78 - * will be exploded in form style, objects will be exploded in deepObject 79 - * style, and reserved characters are percent-encoded. 80 - * 81 - * This method will have no effect if the native `paramsSerializer()` Axios 82 - * API function is used. 83 - * 84 - * {@link https://swagger.io/docs/specification/serialization/#query View examples} 85 - */ 86 - querySerializer?: QuerySerializer | QuerySerializerOptions; 87 - /** 88 - * A function validating request data. This is useful if you want to ensure 89 - * the request conforms to the desired shape, so it can be safely sent to 90 - * the server. 91 - */ 92 - requestValidator?: (data: unknown) => Promise<unknown>; 93 - /** 94 - * A function transforming response data before it's returned. This is useful 95 - * for post-processing data, e.g. converting ISO strings into Date objects. 96 - */ 97 - responseTransformer?: (data: unknown) => Promise<unknown>; 98 - /** 99 - * A function validating response data. This is useful if you want to ensure 100 - * the response conforms to the desired shape, so it can be safely passed to 101 - * the transformers and returned to the user. 102 - */ 103 - responseValidator?: (data: unknown) => Promise<unknown>; 104 - } 105 - 106 - type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] 107 - ? true 108 - : [T] extends [never | undefined] 109 - ? [undefined] extends [T] 110 - ? false 111 - : true 112 - : false; 113 - 114 - export type OmitNever<T extends Record<string, unknown>> = { 115 - [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true 116 - ? never 117 - : K]: T[K]; 118 - };
-143
examples/openapi-ts-sample/src/client/core/utils.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import type { BodySerializer, QuerySerializer } from './bodySerializer.gen'; 4 - import { 5 - type ArraySeparatorStyle, 6 - serializeArrayParam, 7 - serializeObjectParam, 8 - serializePrimitiveParam, 9 - } from './pathSerializer.gen'; 10 - 11 - export interface PathSerializer { 12 - path: Record<string, unknown>; 13 - url: string; 14 - } 15 - 16 - export const PATH_PARAM_RE = /\{[^{}]+\}/g; 17 - 18 - export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { 19 - let url = _url; 20 - const matches = _url.match(PATH_PARAM_RE); 21 - if (matches) { 22 - for (const match of matches) { 23 - let explode = false; 24 - let name = match.substring(1, match.length - 1); 25 - let style: ArraySeparatorStyle = 'simple'; 26 - 27 - if (name.endsWith('*')) { 28 - explode = true; 29 - name = name.substring(0, name.length - 1); 30 - } 31 - 32 - if (name.startsWith('.')) { 33 - name = name.substring(1); 34 - style = 'label'; 35 - } else if (name.startsWith(';')) { 36 - name = name.substring(1); 37 - style = 'matrix'; 38 - } 39 - 40 - const value = path[name]; 41 - 42 - if (value === undefined || value === null) { 43 - continue; 44 - } 45 - 46 - if (Array.isArray(value)) { 47 - url = url.replace( 48 - match, 49 - serializeArrayParam({ explode, name, style, value }), 50 - ); 51 - continue; 52 - } 53 - 54 - if (typeof value === 'object') { 55 - url = url.replace( 56 - match, 57 - serializeObjectParam({ 58 - explode, 59 - name, 60 - style, 61 - value: value as Record<string, unknown>, 62 - valueOnly: true, 63 - }), 64 - ); 65 - continue; 66 - } 67 - 68 - if (style === 'matrix') { 69 - url = url.replace( 70 - match, 71 - `;${serializePrimitiveParam({ 72 - name, 73 - value: value as string, 74 - })}`, 75 - ); 76 - continue; 77 - } 78 - 79 - const replaceValue = encodeURIComponent( 80 - style === 'label' ? `.${value as string}` : (value as string), 81 - ); 82 - url = url.replace(match, replaceValue); 83 - } 84 - } 85 - return url; 86 - }; 87 - 88 - export const getUrl = ({ 89 - baseUrl, 90 - path, 91 - query, 92 - querySerializer, 93 - url: _url, 94 - }: { 95 - baseUrl?: string; 96 - path?: Record<string, unknown>; 97 - query?: Record<string, unknown>; 98 - querySerializer: QuerySerializer; 99 - url: string; 100 - }) => { 101 - const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; 102 - let url = (baseUrl ?? '') + pathUrl; 103 - if (path) { 104 - url = defaultPathSerializer({ path, url }); 105 - } 106 - let search = query ? querySerializer(query) : ''; 107 - if (search.startsWith('?')) { 108 - search = search.substring(1); 109 - } 110 - if (search) { 111 - url += `?${search}`; 112 - } 113 - return url; 114 - }; 115 - 116 - export function getValidRequestBody(options: { 117 - body?: unknown; 118 - bodySerializer?: BodySerializer | null; 119 - serializedBody?: unknown; 120 - }) { 121 - const hasBody = options.body !== undefined; 122 - const isSerializedBody = hasBody && options.bodySerializer; 123 - 124 - if (isSerializedBody) { 125 - if ('serializedBody' in options) { 126 - const hasSerializedBody = 127 - options.serializedBody !== undefined && options.serializedBody !== ''; 128 - 129 - return hasSerializedBody ? options.serializedBody : null; 130 - } 131 - 132 - // not all clients implement a serializedBody property (i.e. client-axios) 133 - return options.body !== '' ? options.body : null; 134 - } 135 - 136 - // plain/text body 137 - if (hasBody) { 138 - return options.body; 139 - } 140 - 141 - // no body was provided 142 - return undefined; 143 - }
-4
examples/openapi-ts-sample/src/client/index.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - export * from './sdk.gen'; 4 - export type * from './types.gen';
-188
examples/openapi-ts-sample/src/client/schemas.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - export const OrderSchema = { 4 - properties: { 5 - complete: { 6 - type: 'boolean', 7 - }, 8 - id: { 9 - example: 10, 10 - format: 'int64', 11 - type: 'integer', 12 - }, 13 - petId: { 14 - example: 198772, 15 - format: 'int64', 16 - type: 'integer', 17 - }, 18 - quantity: { 19 - example: 7, 20 - format: 'int32', 21 - type: 'integer', 22 - }, 23 - shipDate: { 24 - format: 'date-time', 25 - type: 'string', 26 - }, 27 - status: { 28 - description: 'Order Status', 29 - enum: ['placed', 'approved', 'delivered'], 30 - example: 'approved', 31 - type: 'string', 32 - }, 33 - }, 34 - type: 'object', 35 - 'x-swagger-router-model': 'io.swagger.petstore.model.Order', 36 - xml: { 37 - name: 'order', 38 - }, 39 - } as const; 40 - 41 - export const CategorySchema = { 42 - properties: { 43 - id: { 44 - example: 1, 45 - format: 'int64', 46 - type: 'integer', 47 - }, 48 - name: { 49 - example: 'Dogs', 50 - type: 'string', 51 - }, 52 - }, 53 - type: 'object', 54 - 'x-swagger-router-model': 'io.swagger.petstore.model.Category', 55 - xml: { 56 - name: 'category', 57 - }, 58 - } as const; 59 - 60 - export const UserSchema = { 61 - properties: { 62 - email: { 63 - example: 'john@email.com', 64 - type: 'string', 65 - }, 66 - firstName: { 67 - example: 'John', 68 - type: 'string', 69 - }, 70 - id: { 71 - example: 10, 72 - format: 'int64', 73 - type: 'integer', 74 - }, 75 - lastName: { 76 - example: 'James', 77 - type: 'string', 78 - }, 79 - password: { 80 - example: '12345', 81 - type: 'string', 82 - }, 83 - phone: { 84 - example: '12345', 85 - type: 'string', 86 - }, 87 - userStatus: { 88 - description: 'User Status', 89 - example: 1, 90 - format: 'int32', 91 - type: 'integer', 92 - }, 93 - username: { 94 - example: 'theUser', 95 - type: 'string', 96 - }, 97 - }, 98 - type: 'object', 99 - 'x-swagger-router-model': 'io.swagger.petstore.model.User', 100 - xml: { 101 - name: 'user', 102 - }, 103 - } as const; 104 - 105 - export const TagSchema = { 106 - properties: { 107 - id: { 108 - format: 'int64', 109 - type: 'integer', 110 - }, 111 - name: { 112 - type: 'string', 113 - }, 114 - }, 115 - type: 'object', 116 - 'x-swagger-router-model': 'io.swagger.petstore.model.Tag', 117 - xml: { 118 - name: 'tag', 119 - }, 120 - } as const; 121 - 122 - export const PetSchema = { 123 - properties: { 124 - category: { 125 - $ref: '#/components/schemas/Category', 126 - }, 127 - id: { 128 - example: 10, 129 - format: 'int64', 130 - type: 'integer', 131 - }, 132 - name: { 133 - example: 'doggie', 134 - type: 'string', 135 - }, 136 - photoUrls: { 137 - items: { 138 - type: 'string', 139 - xml: { 140 - name: 'photoUrl', 141 - }, 142 - }, 143 - type: 'array', 144 - xml: { 145 - wrapped: true, 146 - }, 147 - }, 148 - status: { 149 - description: 'pet status in the store', 150 - enum: ['available', 'pending', 'sold'], 151 - type: 'string', 152 - }, 153 - tags: { 154 - items: { 155 - $ref: '#/components/schemas/Tag', 156 - }, 157 - type: 'array', 158 - xml: { 159 - wrapped: true, 160 - }, 161 - }, 162 - }, 163 - required: ['name', 'photoUrls'], 164 - type: 'object', 165 - 'x-swagger-router-model': 'io.swagger.petstore.model.Pet', 166 - xml: { 167 - name: 'pet', 168 - }, 169 - } as const; 170 - 171 - export const ApiResponseSchema = { 172 - properties: { 173 - code: { 174 - format: 'int32', 175 - type: 'integer', 176 - }, 177 - message: { 178 - type: 'string', 179 - }, 180 - type: { 181 - type: 'string', 182 - }, 183 - }, 184 - type: 'object', 185 - xml: { 186 - name: '##default', 187 - }, 188 - } as const;
-571
examples/openapi-ts-sample/src/client/sdk.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import type { Client, Options as Options2, TDataShape } from './client'; 4 - import { client } from './client.gen'; 5 - import type { 6 - AddPetData, 7 - AddPetErrors, 8 - AddPetResponses, 9 - CreateUserData, 10 - CreateUserErrors, 11 - CreateUserResponses, 12 - CreateUsersWithListInputData, 13 - CreateUsersWithListInputErrors, 14 - CreateUsersWithListInputResponses, 15 - DeleteOrderData, 16 - DeleteOrderErrors, 17 - DeleteOrderResponses, 18 - DeletePetData, 19 - DeletePetErrors, 20 - DeletePetResponses, 21 - DeleteUserData, 22 - DeleteUserErrors, 23 - DeleteUserResponses, 24 - FindPetsByStatusData, 25 - FindPetsByStatusErrors, 26 - FindPetsByStatusResponses, 27 - FindPetsByTagsData, 28 - FindPetsByTagsErrors, 29 - FindPetsByTagsResponses, 30 - GetInventoryData, 31 - GetInventoryErrors, 32 - GetInventoryResponses, 33 - GetOrderByIdData, 34 - GetOrderByIdErrors, 35 - GetOrderByIdResponses, 36 - GetPetByIdData, 37 - GetPetByIdErrors, 38 - GetPetByIdResponses, 39 - GetUserByNameData, 40 - GetUserByNameErrors, 41 - GetUserByNameResponses, 42 - LoginUserData, 43 - LoginUserErrors, 44 - LoginUserResponses, 45 - LogoutUserData, 46 - LogoutUserErrors, 47 - LogoutUserResponses, 48 - PlaceOrderData, 49 - PlaceOrderErrors, 50 - PlaceOrderResponses, 51 - UpdatePetData, 52 - UpdatePetErrors, 53 - UpdatePetResponses, 54 - UpdatePetWithFormData, 55 - UpdatePetWithFormErrors, 56 - UpdatePetWithFormResponses, 57 - UpdateUserData, 58 - UpdateUserErrors, 59 - UpdateUserResponses, 60 - UploadFileData, 61 - UploadFileErrors, 62 - UploadFileResponses, 63 - } from './types.gen'; 64 - import { 65 - zAddPetData, 66 - zAddPetResponse, 67 - zCreateUserData, 68 - zCreateUserResponse, 69 - zCreateUsersWithListInputData, 70 - zCreateUsersWithListInputResponse, 71 - zDeleteOrderData, 72 - zDeletePetData, 73 - zDeleteUserData, 74 - zFindPetsByStatusData, 75 - zFindPetsByStatusResponse, 76 - zFindPetsByTagsData, 77 - zFindPetsByTagsResponse, 78 - zGetInventoryData, 79 - zGetInventoryResponse, 80 - zGetOrderByIdData, 81 - zGetOrderByIdResponse, 82 - zGetPetByIdData, 83 - zGetPetByIdResponse, 84 - zGetUserByNameData, 85 - zGetUserByNameResponse, 86 - zLoginUserData, 87 - zLoginUserResponse, 88 - zLogoutUserData, 89 - zPlaceOrderData, 90 - zPlaceOrderResponse, 91 - zUpdatePetData, 92 - zUpdatePetResponse, 93 - zUpdatePetWithFormData, 94 - zUpdatePetWithFormResponse, 95 - zUpdateUserData, 96 - zUploadFileData, 97 - zUploadFileResponse, 98 - } from './zod.gen'; 99 - 100 - export type Options< 101 - TData extends TDataShape = TDataShape, 102 - ThrowOnError extends boolean = boolean, 103 - > = Options2<TData, ThrowOnError> & { 104 - /** 105 - * You can provide a client instance returned by `createClient()` instead of 106 - * individual options. This might be also useful if you want to implement a 107 - * custom client. 108 - */ 109 - client?: Client; 110 - /** 111 - * You can pass arbitrary values through the `meta` object. This can be 112 - * used to access values that aren't defined as part of the SDK function. 113 - */ 114 - meta?: Record<string, unknown>; 115 - }; 116 - 117 - /** 118 - * Add a new pet to the store. 119 - * 120 - * Add a new pet to the store. 121 - */ 122 - export const addPet = <ThrowOnError extends boolean = false>( 123 - options: Options<AddPetData, ThrowOnError>, 124 - ) => 125 - (options.client ?? client).post<AddPetResponses, AddPetErrors, ThrowOnError>({ 126 - requestValidator: async (data) => await zAddPetData.parseAsync(data), 127 - responseValidator: async (data) => await zAddPetResponse.parseAsync(data), 128 - security: [ 129 - { 130 - scheme: 'bearer', 131 - type: 'http', 132 - }, 133 - ], 134 - url: '/pet', 135 - ...options, 136 - headers: { 137 - 'Content-Type': 'application/json', 138 - ...options.headers, 139 - }, 140 - }); 141 - 142 - /** 143 - * Update an existing pet. 144 - * 145 - * Update an existing pet by Id. 146 - */ 147 - export const updatePet = <ThrowOnError extends boolean = false>( 148 - options: Options<UpdatePetData, ThrowOnError>, 149 - ) => 150 - (options.client ?? client).put< 151 - UpdatePetResponses, 152 - UpdatePetErrors, 153 - ThrowOnError 154 - >({ 155 - requestValidator: async (data) => await zUpdatePetData.parseAsync(data), 156 - responseValidator: async (data) => 157 - await zUpdatePetResponse.parseAsync(data), 158 - security: [ 159 - { 160 - scheme: 'bearer', 161 - type: 'http', 162 - }, 163 - ], 164 - url: '/pet', 165 - ...options, 166 - headers: { 167 - 'Content-Type': 'application/json', 168 - ...options.headers, 169 - }, 170 - }); 171 - 172 - /** 173 - * Finds Pets by status. 174 - * 175 - * Multiple status values can be provided with comma separated strings. 176 - */ 177 - export const findPetsByStatus = <ThrowOnError extends boolean = false>( 178 - options: Options<FindPetsByStatusData, ThrowOnError>, 179 - ) => 180 - (options.client ?? client).get< 181 - FindPetsByStatusResponses, 182 - FindPetsByStatusErrors, 183 - ThrowOnError 184 - >({ 185 - requestValidator: async (data) => 186 - await zFindPetsByStatusData.parseAsync(data), 187 - responseValidator: async (data) => 188 - await zFindPetsByStatusResponse.parseAsync(data), 189 - security: [ 190 - { 191 - scheme: 'bearer', 192 - type: 'http', 193 - }, 194 - ], 195 - url: '/pet/findByStatus', 196 - ...options, 197 - }); 198 - 199 - /** 200 - * Finds Pets by tags. 201 - * 202 - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. 203 - */ 204 - export const findPetsByTags = <ThrowOnError extends boolean = false>( 205 - options: Options<FindPetsByTagsData, ThrowOnError>, 206 - ) => 207 - (options.client ?? client).get< 208 - FindPetsByTagsResponses, 209 - FindPetsByTagsErrors, 210 - ThrowOnError 211 - >({ 212 - requestValidator: async (data) => 213 - await zFindPetsByTagsData.parseAsync(data), 214 - responseValidator: async (data) => 215 - await zFindPetsByTagsResponse.parseAsync(data), 216 - security: [ 217 - { 218 - scheme: 'bearer', 219 - type: 'http', 220 - }, 221 - ], 222 - url: '/pet/findByTags', 223 - ...options, 224 - }); 225 - 226 - /** 227 - * Deletes a pet. 228 - * 229 - * Delete a pet. 230 - */ 231 - export const deletePet = <ThrowOnError extends boolean = false>( 232 - options: Options<DeletePetData, ThrowOnError>, 233 - ) => 234 - (options.client ?? client).delete< 235 - DeletePetResponses, 236 - DeletePetErrors, 237 - ThrowOnError 238 - >({ 239 - requestValidator: async (data) => await zDeletePetData.parseAsync(data), 240 - security: [ 241 - { 242 - scheme: 'bearer', 243 - type: 'http', 244 - }, 245 - ], 246 - url: '/pet/{petId}', 247 - ...options, 248 - }); 249 - 250 - /** 251 - * Find pet by ID. 252 - * 253 - * Returns a single pet. 254 - */ 255 - export const getPetById = <ThrowOnError extends boolean = false>( 256 - options: Options<GetPetByIdData, ThrowOnError>, 257 - ) => 258 - (options.client ?? client).get< 259 - GetPetByIdResponses, 260 - GetPetByIdErrors, 261 - ThrowOnError 262 - >({ 263 - requestValidator: async (data) => await zGetPetByIdData.parseAsync(data), 264 - responseValidator: async (data) => 265 - await zGetPetByIdResponse.parseAsync(data), 266 - security: [ 267 - { 268 - name: 'api_key', 269 - type: 'apiKey', 270 - }, 271 - { 272 - scheme: 'bearer', 273 - type: 'http', 274 - }, 275 - ], 276 - url: '/pet/{petId}', 277 - ...options, 278 - }); 279 - 280 - /** 281 - * Updates a pet in the store with form data. 282 - * 283 - * Updates a pet resource based on the form data. 284 - */ 285 - export const updatePetWithForm = <ThrowOnError extends boolean = false>( 286 - options: Options<UpdatePetWithFormData, ThrowOnError>, 287 - ) => 288 - (options.client ?? client).post< 289 - UpdatePetWithFormResponses, 290 - UpdatePetWithFormErrors, 291 - ThrowOnError 292 - >({ 293 - requestValidator: async (data) => 294 - await zUpdatePetWithFormData.parseAsync(data), 295 - responseValidator: async (data) => 296 - await zUpdatePetWithFormResponse.parseAsync(data), 297 - security: [ 298 - { 299 - scheme: 'bearer', 300 - type: 'http', 301 - }, 302 - ], 303 - url: '/pet/{petId}', 304 - ...options, 305 - }); 306 - 307 - /** 308 - * Uploads an image. 309 - * 310 - * Upload image of the pet. 311 - */ 312 - export const uploadFile = <ThrowOnError extends boolean = false>( 313 - options: Options<UploadFileData, ThrowOnError>, 314 - ) => 315 - (options.client ?? client).post< 316 - UploadFileResponses, 317 - UploadFileErrors, 318 - ThrowOnError 319 - >({ 320 - bodySerializer: null, 321 - requestValidator: async (data) => await zUploadFileData.parseAsync(data), 322 - responseValidator: async (data) => 323 - await zUploadFileResponse.parseAsync(data), 324 - security: [ 325 - { 326 - scheme: 'bearer', 327 - type: 'http', 328 - }, 329 - ], 330 - url: '/pet/{petId}/uploadImage', 331 - ...options, 332 - headers: { 333 - 'Content-Type': 'application/octet-stream', 334 - ...options.headers, 335 - }, 336 - }); 337 - 338 - /** 339 - * Returns pet inventories by status. 340 - * 341 - * Returns a map of status codes to quantities. 342 - */ 343 - export const getInventory = <ThrowOnError extends boolean = false>( 344 - options?: Options<GetInventoryData, ThrowOnError>, 345 - ) => 346 - (options?.client ?? client).get< 347 - GetInventoryResponses, 348 - GetInventoryErrors, 349 - ThrowOnError 350 - >({ 351 - requestValidator: async (data) => await zGetInventoryData.parseAsync(data), 352 - responseValidator: async (data) => 353 - await zGetInventoryResponse.parseAsync(data), 354 - security: [ 355 - { 356 - name: 'api_key', 357 - type: 'apiKey', 358 - }, 359 - ], 360 - url: '/store/inventory', 361 - ...options, 362 - }); 363 - 364 - /** 365 - * Place an order for a pet. 366 - * 367 - * Place a new order in the store. 368 - */ 369 - export const placeOrder = <ThrowOnError extends boolean = false>( 370 - options?: Options<PlaceOrderData, ThrowOnError>, 371 - ) => 372 - (options?.client ?? client).post< 373 - PlaceOrderResponses, 374 - PlaceOrderErrors, 375 - ThrowOnError 376 - >({ 377 - requestValidator: async (data) => await zPlaceOrderData.parseAsync(data), 378 - responseValidator: async (data) => 379 - await zPlaceOrderResponse.parseAsync(data), 380 - url: '/store/order', 381 - ...options, 382 - headers: { 383 - 'Content-Type': 'application/json', 384 - ...options?.headers, 385 - }, 386 - }); 387 - 388 - /** 389 - * Delete purchase order by identifier. 390 - * 391 - * For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors. 392 - */ 393 - export const deleteOrder = <ThrowOnError extends boolean = false>( 394 - options: Options<DeleteOrderData, ThrowOnError>, 395 - ) => 396 - (options.client ?? client).delete< 397 - DeleteOrderResponses, 398 - DeleteOrderErrors, 399 - ThrowOnError 400 - >({ 401 - requestValidator: async (data) => await zDeleteOrderData.parseAsync(data), 402 - url: '/store/order/{orderId}', 403 - ...options, 404 - }); 405 - 406 - /** 407 - * Find purchase order by ID. 408 - * 409 - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. 410 - */ 411 - export const getOrderById = <ThrowOnError extends boolean = false>( 412 - options: Options<GetOrderByIdData, ThrowOnError>, 413 - ) => 414 - (options.client ?? client).get< 415 - GetOrderByIdResponses, 416 - GetOrderByIdErrors, 417 - ThrowOnError 418 - >({ 419 - requestValidator: async (data) => await zGetOrderByIdData.parseAsync(data), 420 - responseValidator: async (data) => 421 - await zGetOrderByIdResponse.parseAsync(data), 422 - url: '/store/order/{orderId}', 423 - ...options, 424 - }); 425 - 426 - /** 427 - * Create user. 428 - * 429 - * This can only be done by the logged in user. 430 - */ 431 - export const createUser = <ThrowOnError extends boolean = false>( 432 - options?: Options<CreateUserData, ThrowOnError>, 433 - ) => 434 - (options?.client ?? client).post< 435 - CreateUserResponses, 436 - CreateUserErrors, 437 - ThrowOnError 438 - >({ 439 - requestValidator: async (data) => await zCreateUserData.parseAsync(data), 440 - responseValidator: async (data) => 441 - await zCreateUserResponse.parseAsync(data), 442 - url: '/user', 443 - ...options, 444 - headers: { 445 - 'Content-Type': 'application/json', 446 - ...options?.headers, 447 - }, 448 - }); 449 - 450 - /** 451 - * Creates list of users with given input array. 452 - * 453 - * Creates list of users with given input array. 454 - */ 455 - export const createUsersWithListInput = <ThrowOnError extends boolean = false>( 456 - options?: Options<CreateUsersWithListInputData, ThrowOnError>, 457 - ) => 458 - (options?.client ?? client).post< 459 - CreateUsersWithListInputResponses, 460 - CreateUsersWithListInputErrors, 461 - ThrowOnError 462 - >({ 463 - requestValidator: async (data) => 464 - await zCreateUsersWithListInputData.parseAsync(data), 465 - responseValidator: async (data) => 466 - await zCreateUsersWithListInputResponse.parseAsync(data), 467 - url: '/user/createWithList', 468 - ...options, 469 - headers: { 470 - 'Content-Type': 'application/json', 471 - ...options?.headers, 472 - }, 473 - }); 474 - 475 - /** 476 - * Logs user into the system. 477 - * 478 - * Log into the system. 479 - */ 480 - export const loginUser = <ThrowOnError extends boolean = false>( 481 - options?: Options<LoginUserData, ThrowOnError>, 482 - ) => 483 - (options?.client ?? client).get< 484 - LoginUserResponses, 485 - LoginUserErrors, 486 - ThrowOnError 487 - >({ 488 - requestValidator: async (data) => await zLoginUserData.parseAsync(data), 489 - responseValidator: async (data) => 490 - await zLoginUserResponse.parseAsync(data), 491 - url: '/user/login', 492 - ...options, 493 - }); 494 - 495 - /** 496 - * Logs out current logged in user session. 497 - * 498 - * Log user out of the system. 499 - */ 500 - export const logoutUser = <ThrowOnError extends boolean = false>( 501 - options?: Options<LogoutUserData, ThrowOnError>, 502 - ) => 503 - (options?.client ?? client).get< 504 - LogoutUserResponses, 505 - LogoutUserErrors, 506 - ThrowOnError 507 - >({ 508 - requestValidator: async (data) => await zLogoutUserData.parseAsync(data), 509 - url: '/user/logout', 510 - ...options, 511 - }); 512 - 513 - /** 514 - * Delete user resource. 515 - * 516 - * This can only be done by the logged in user. 517 - */ 518 - export const deleteUser = <ThrowOnError extends boolean = false>( 519 - options: Options<DeleteUserData, ThrowOnError>, 520 - ) => 521 - (options.client ?? client).delete< 522 - DeleteUserResponses, 523 - DeleteUserErrors, 524 - ThrowOnError 525 - >({ 526 - requestValidator: async (data) => await zDeleteUserData.parseAsync(data), 527 - url: '/user/{username}', 528 - ...options, 529 - }); 530 - 531 - /** 532 - * Get user by user name. 533 - * 534 - * Get user detail based on username. 535 - */ 536 - export const getUserByName = <ThrowOnError extends boolean = false>( 537 - options: Options<GetUserByNameData, ThrowOnError>, 538 - ) => 539 - (options.client ?? client).get< 540 - GetUserByNameResponses, 541 - GetUserByNameErrors, 542 - ThrowOnError 543 - >({ 544 - requestValidator: async (data) => await zGetUserByNameData.parseAsync(data), 545 - responseValidator: async (data) => 546 - await zGetUserByNameResponse.parseAsync(data), 547 - url: '/user/{username}', 548 - ...options, 549 - }); 550 - 551 - /** 552 - * Update user resource. 553 - * 554 - * This can only be done by the logged in user. 555 - */ 556 - export const updateUser = <ThrowOnError extends boolean = false>( 557 - options: Options<UpdateUserData, ThrowOnError>, 558 - ) => 559 - (options.client ?? client).put< 560 - UpdateUserResponses, 561 - UpdateUserErrors, 562 - ThrowOnError 563 - >({ 564 - requestValidator: async (data) => await zUpdateUserData.parseAsync(data), 565 - url: '/user/{username}', 566 - ...options, 567 - headers: { 568 - 'Content-Type': 'application/json', 569 - ...options.headers, 570 - }, 571 - });
-699
examples/openapi-ts-sample/src/client/types.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - export type ClientOptions = { 4 - baseUrl: 'https://petstore3.swagger.io/api/v3' | (string & {}); 5 - }; 6 - 7 - export type Order = { 8 - complete?: boolean; 9 - id?: number; 10 - petId?: number; 11 - quantity?: number; 12 - shipDate?: string; 13 - /** 14 - * Order Status 15 - */ 16 - status?: 'placed' | 'approved' | 'delivered'; 17 - }; 18 - 19 - export type Category = { 20 - id?: number; 21 - name?: string; 22 - }; 23 - 24 - export type User = { 25 - email?: string; 26 - firstName?: string; 27 - id?: number; 28 - lastName?: string; 29 - password?: string; 30 - phone?: string; 31 - /** 32 - * User Status 33 - */ 34 - userStatus?: number; 35 - username?: string; 36 - }; 37 - 38 - export type Tag = { 39 - id?: number; 40 - name?: string; 41 - }; 42 - 43 - export type Pet = { 44 - category?: Category; 45 - id?: number; 46 - name: string; 47 - photoUrls: Array<string>; 48 - /** 49 - * pet status in the store 50 - */ 51 - status?: 'available' | 'pending' | 'sold'; 52 - tags?: Array<Tag>; 53 - }; 54 - 55 - export type ApiResponse = { 56 - code?: number; 57 - message?: string; 58 - type?: string; 59 - }; 60 - 61 - export type Pet2 = Pet; 62 - 63 - /** 64 - * List of user object 65 - */ 66 - export type UserArray = Array<User>; 67 - 68 - export type AddPetData = { 69 - /** 70 - * Create a new pet in the store 71 - */ 72 - body: Pet; 73 - path?: never; 74 - query?: never; 75 - url: '/pet'; 76 - }; 77 - 78 - export type AddPetErrors = { 79 - /** 80 - * Invalid input 81 - */ 82 - 400: unknown; 83 - /** 84 - * Validation exception 85 - */ 86 - 422: unknown; 87 - /** 88 - * Unexpected error 89 - */ 90 - default: unknown; 91 - }; 92 - 93 - export type AddPetResponses = { 94 - /** 95 - * Successful operation 96 - */ 97 - 200: Pet; 98 - }; 99 - 100 - export type AddPetResponse = AddPetResponses[keyof AddPetResponses]; 101 - 102 - export type UpdatePetData = { 103 - /** 104 - * Update an existent pet in the store 105 - */ 106 - body: Pet; 107 - path?: never; 108 - query?: never; 109 - url: '/pet'; 110 - }; 111 - 112 - export type UpdatePetErrors = { 113 - /** 114 - * Invalid ID supplied 115 - */ 116 - 400: unknown; 117 - /** 118 - * Pet not found 119 - */ 120 - 404: unknown; 121 - /** 122 - * Validation exception 123 - */ 124 - 422: unknown; 125 - /** 126 - * Unexpected error 127 - */ 128 - default: unknown; 129 - }; 130 - 131 - export type UpdatePetResponses = { 132 - /** 133 - * Successful operation 134 - */ 135 - 200: Pet; 136 - }; 137 - 138 - export type UpdatePetResponse = UpdatePetResponses[keyof UpdatePetResponses]; 139 - 140 - export type FindPetsByStatusData = { 141 - body?: never; 142 - path?: never; 143 - query: { 144 - /** 145 - * Status values that need to be considered for filter 146 - */ 147 - status: 'available' | 'pending' | 'sold'; 148 - }; 149 - url: '/pet/findByStatus'; 150 - }; 151 - 152 - export type FindPetsByStatusErrors = { 153 - /** 154 - * Invalid status value 155 - */ 156 - 400: unknown; 157 - /** 158 - * Unexpected error 159 - */ 160 - default: unknown; 161 - }; 162 - 163 - export type FindPetsByStatusResponses = { 164 - /** 165 - * successful operation 166 - */ 167 - 200: Array<Pet>; 168 - }; 169 - 170 - export type FindPetsByStatusResponse = 171 - FindPetsByStatusResponses[keyof FindPetsByStatusResponses]; 172 - 173 - export type FindPetsByTagsData = { 174 - body?: never; 175 - path?: never; 176 - query: { 177 - /** 178 - * Tags to filter by 179 - */ 180 - tags: Array<string>; 181 - }; 182 - url: '/pet/findByTags'; 183 - }; 184 - 185 - export type FindPetsByTagsErrors = { 186 - /** 187 - * Invalid tag value 188 - */ 189 - 400: unknown; 190 - /** 191 - * Unexpected error 192 - */ 193 - default: unknown; 194 - }; 195 - 196 - export type FindPetsByTagsResponses = { 197 - /** 198 - * successful operation 199 - */ 200 - 200: Array<Pet>; 201 - }; 202 - 203 - export type FindPetsByTagsResponse = 204 - FindPetsByTagsResponses[keyof FindPetsByTagsResponses]; 205 - 206 - export type DeletePetData = { 207 - body?: never; 208 - headers?: { 209 - api_key?: string; 210 - }; 211 - path: { 212 - /** 213 - * Pet id to delete 214 - */ 215 - petId: number; 216 - }; 217 - query?: never; 218 - url: '/pet/{petId}'; 219 - }; 220 - 221 - export type DeletePetErrors = { 222 - /** 223 - * Invalid pet value 224 - */ 225 - 400: unknown; 226 - /** 227 - * Unexpected error 228 - */ 229 - default: unknown; 230 - }; 231 - 232 - export type DeletePetResponses = { 233 - /** 234 - * Pet deleted 235 - */ 236 - 200: unknown; 237 - }; 238 - 239 - export type GetPetByIdData = { 240 - body?: never; 241 - path: { 242 - /** 243 - * ID of pet to return 244 - */ 245 - petId: number; 246 - }; 247 - query?: never; 248 - url: '/pet/{petId}'; 249 - }; 250 - 251 - export type GetPetByIdErrors = { 252 - /** 253 - * Invalid ID supplied 254 - */ 255 - 400: unknown; 256 - /** 257 - * Pet not found 258 - */ 259 - 404: unknown; 260 - /** 261 - * Unexpected error 262 - */ 263 - default: unknown; 264 - }; 265 - 266 - export type GetPetByIdResponses = { 267 - /** 268 - * successful operation 269 - */ 270 - 200: Pet; 271 - }; 272 - 273 - export type GetPetByIdResponse = GetPetByIdResponses[keyof GetPetByIdResponses]; 274 - 275 - export type UpdatePetWithFormData = { 276 - body?: never; 277 - path: { 278 - /** 279 - * ID of pet that needs to be updated 280 - */ 281 - petId: number; 282 - }; 283 - query?: { 284 - /** 285 - * Name of pet that needs to be updated 286 - */ 287 - name?: string; 288 - /** 289 - * Status of pet that needs to be updated 290 - */ 291 - status?: string; 292 - }; 293 - url: '/pet/{petId}'; 294 - }; 295 - 296 - export type UpdatePetWithFormErrors = { 297 - /** 298 - * Invalid input 299 - */ 300 - 400: unknown; 301 - /** 302 - * Unexpected error 303 - */ 304 - default: unknown; 305 - }; 306 - 307 - export type UpdatePetWithFormResponses = { 308 - /** 309 - * successful operation 310 - */ 311 - 200: Pet; 312 - }; 313 - 314 - export type UpdatePetWithFormResponse = 315 - UpdatePetWithFormResponses[keyof UpdatePetWithFormResponses]; 316 - 317 - export type UploadFileData = { 318 - body?: Blob | File; 319 - path: { 320 - /** 321 - * ID of pet to update 322 - */ 323 - petId: number; 324 - }; 325 - query?: { 326 - /** 327 - * Additional Metadata 328 - */ 329 - additionalMetadata?: string; 330 - }; 331 - url: '/pet/{petId}/uploadImage'; 332 - }; 333 - 334 - export type UploadFileErrors = { 335 - /** 336 - * No file uploaded 337 - */ 338 - 400: unknown; 339 - /** 340 - * Pet not found 341 - */ 342 - 404: unknown; 343 - /** 344 - * Unexpected error 345 - */ 346 - default: unknown; 347 - }; 348 - 349 - export type UploadFileResponses = { 350 - /** 351 - * successful operation 352 - */ 353 - 200: ApiResponse; 354 - }; 355 - 356 - export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; 357 - 358 - export type GetInventoryData = { 359 - body?: never; 360 - path?: never; 361 - query?: never; 362 - url: '/store/inventory'; 363 - }; 364 - 365 - export type GetInventoryErrors = { 366 - /** 367 - * Unexpected error 368 - */ 369 - default: unknown; 370 - }; 371 - 372 - export type GetInventoryResponses = { 373 - /** 374 - * successful operation 375 - */ 376 - 200: { 377 - [key: string]: number; 378 - }; 379 - }; 380 - 381 - export type GetInventoryResponse = 382 - GetInventoryResponses[keyof GetInventoryResponses]; 383 - 384 - export type PlaceOrderData = { 385 - body?: Order; 386 - path?: never; 387 - query?: never; 388 - url: '/store/order'; 389 - }; 390 - 391 - export type PlaceOrderErrors = { 392 - /** 393 - * Invalid input 394 - */ 395 - 400: unknown; 396 - /** 397 - * Validation exception 398 - */ 399 - 422: unknown; 400 - /** 401 - * Unexpected error 402 - */ 403 - default: unknown; 404 - }; 405 - 406 - export type PlaceOrderResponses = { 407 - /** 408 - * successful operation 409 - */ 410 - 200: Order; 411 - }; 412 - 413 - export type PlaceOrderResponse = PlaceOrderResponses[keyof PlaceOrderResponses]; 414 - 415 - export type DeleteOrderData = { 416 - body?: never; 417 - path: { 418 - /** 419 - * ID of the order that needs to be deleted 420 - */ 421 - orderId: number; 422 - }; 423 - query?: never; 424 - url: '/store/order/{orderId}'; 425 - }; 426 - 427 - export type DeleteOrderErrors = { 428 - /** 429 - * Invalid ID supplied 430 - */ 431 - 400: unknown; 432 - /** 433 - * Order not found 434 - */ 435 - 404: unknown; 436 - /** 437 - * Unexpected error 438 - */ 439 - default: unknown; 440 - }; 441 - 442 - export type DeleteOrderResponses = { 443 - /** 444 - * order deleted 445 - */ 446 - 200: unknown; 447 - }; 448 - 449 - export type GetOrderByIdData = { 450 - body?: never; 451 - path: { 452 - /** 453 - * ID of order that needs to be fetched 454 - */ 455 - orderId: number; 456 - }; 457 - query?: never; 458 - url: '/store/order/{orderId}'; 459 - }; 460 - 461 - export type GetOrderByIdErrors = { 462 - /** 463 - * Invalid ID supplied 464 - */ 465 - 400: unknown; 466 - /** 467 - * Order not found 468 - */ 469 - 404: unknown; 470 - /** 471 - * Unexpected error 472 - */ 473 - default: unknown; 474 - }; 475 - 476 - export type GetOrderByIdResponses = { 477 - /** 478 - * successful operation 479 - */ 480 - 200: Order; 481 - }; 482 - 483 - export type GetOrderByIdResponse = 484 - GetOrderByIdResponses[keyof GetOrderByIdResponses]; 485 - 486 - export type CreateUserData = { 487 - /** 488 - * Created user object 489 - */ 490 - body?: User; 491 - path?: never; 492 - query?: never; 493 - url: '/user'; 494 - }; 495 - 496 - export type CreateUserErrors = { 497 - /** 498 - * Unexpected error 499 - */ 500 - default: unknown; 501 - }; 502 - 503 - export type CreateUserResponses = { 504 - /** 505 - * successful operation 506 - */ 507 - 200: User; 508 - }; 509 - 510 - export type CreateUserResponse = CreateUserResponses[keyof CreateUserResponses]; 511 - 512 - export type CreateUsersWithListInputData = { 513 - body?: Array<User>; 514 - path?: never; 515 - query?: never; 516 - url: '/user/createWithList'; 517 - }; 518 - 519 - export type CreateUsersWithListInputErrors = { 520 - /** 521 - * Unexpected error 522 - */ 523 - default: unknown; 524 - }; 525 - 526 - export type CreateUsersWithListInputResponses = { 527 - /** 528 - * Successful operation 529 - */ 530 - 200: User; 531 - }; 532 - 533 - export type CreateUsersWithListInputResponse = 534 - CreateUsersWithListInputResponses[keyof CreateUsersWithListInputResponses]; 535 - 536 - export type LoginUserData = { 537 - body?: never; 538 - path?: never; 539 - query?: { 540 - /** 541 - * The password for login in clear text 542 - */ 543 - password?: string; 544 - /** 545 - * The user name for login 546 - */ 547 - username?: string; 548 - }; 549 - url: '/user/login'; 550 - }; 551 - 552 - export type LoginUserErrors = { 553 - /** 554 - * Invalid username/password supplied 555 - */ 556 - 400: unknown; 557 - /** 558 - * Unexpected error 559 - */ 560 - default: unknown; 561 - }; 562 - 563 - export type LoginUserResponses = { 564 - /** 565 - * successful operation 566 - */ 567 - 200: string; 568 - }; 569 - 570 - export type LoginUserResponse = LoginUserResponses[keyof LoginUserResponses]; 571 - 572 - export type LogoutUserData = { 573 - body?: never; 574 - path?: never; 575 - query?: never; 576 - url: '/user/logout'; 577 - }; 578 - 579 - export type LogoutUserErrors = { 580 - /** 581 - * Unexpected error 582 - */ 583 - default: unknown; 584 - }; 585 - 586 - export type LogoutUserResponses = { 587 - /** 588 - * successful operation 589 - */ 590 - 200: unknown; 591 - }; 592 - 593 - export type DeleteUserData = { 594 - body?: never; 595 - path: { 596 - /** 597 - * The name that needs to be deleted 598 - */ 599 - username: string; 600 - }; 601 - query?: never; 602 - url: '/user/{username}'; 603 - }; 604 - 605 - export type DeleteUserErrors = { 606 - /** 607 - * Invalid username supplied 608 - */ 609 - 400: unknown; 610 - /** 611 - * User not found 612 - */ 613 - 404: unknown; 614 - /** 615 - * Unexpected error 616 - */ 617 - default: unknown; 618 - }; 619 - 620 - export type DeleteUserResponses = { 621 - /** 622 - * User deleted 623 - */ 624 - 200: unknown; 625 - }; 626 - 627 - export type GetUserByNameData = { 628 - body?: never; 629 - path: { 630 - /** 631 - * The name that needs to be fetched. Use user1 for testing 632 - */ 633 - username: string; 634 - }; 635 - query?: never; 636 - url: '/user/{username}'; 637 - }; 638 - 639 - export type GetUserByNameErrors = { 640 - /** 641 - * Invalid username supplied 642 - */ 643 - 400: unknown; 644 - /** 645 - * User not found 646 - */ 647 - 404: unknown; 648 - /** 649 - * Unexpected error 650 - */ 651 - default: unknown; 652 - }; 653 - 654 - export type GetUserByNameResponses = { 655 - /** 656 - * successful operation 657 - */ 658 - 200: User; 659 - }; 660 - 661 - export type GetUserByNameResponse = 662 - GetUserByNameResponses[keyof GetUserByNameResponses]; 663 - 664 - export type UpdateUserData = { 665 - /** 666 - * Update an existent user in the store 667 - */ 668 - body?: User; 669 - path: { 670 - /** 671 - * name that need to be deleted 672 - */ 673 - username: string; 674 - }; 675 - query?: never; 676 - url: '/user/{username}'; 677 - }; 678 - 679 - export type UpdateUserErrors = { 680 - /** 681 - * bad request 682 - */ 683 - 400: unknown; 684 - /** 685 - * user not found 686 - */ 687 - 404: unknown; 688 - /** 689 - * Unexpected error 690 - */ 691 - default: unknown; 692 - }; 693 - 694 - export type UpdateUserResponses = { 695 - /** 696 - * successful operation 697 - */ 698 - 200: unknown; 699 - };
-280
examples/openapi-ts-sample/src/client/zod.gen.ts
··· 1 - // This file is auto-generated by @hey-api/openapi-ts 2 - 3 - import { z } from 'zod'; 4 - 5 - export const zOrder = z.object({ 6 - complete: z.optional(z.boolean()), 7 - id: z.optional(z.coerce.bigint()), 8 - petId: z.optional(z.coerce.bigint()), 9 - quantity: z.optional(z.int()), 10 - shipDate: z.optional(z.iso.datetime()), 11 - status: z.optional(z.enum(['placed', 'approved', 'delivered'])), 12 - }); 13 - 14 - export const zCategory = z.object({ 15 - id: z.optional(z.coerce.bigint()), 16 - name: z.optional(z.string()), 17 - }); 18 - 19 - export const zUser = z.object({ 20 - email: z.optional(z.string()), 21 - firstName: z.optional(z.string()), 22 - id: z.optional(z.coerce.bigint()), 23 - lastName: z.optional(z.string()), 24 - password: z.optional(z.string()), 25 - phone: z.optional(z.string()), 26 - userStatus: z.optional(z.int()), 27 - username: z.optional(z.string()), 28 - }); 29 - 30 - export const zTag = z.object({ 31 - id: z.optional(z.coerce.bigint()), 32 - name: z.optional(z.string()), 33 - }); 34 - 35 - export const zPet = z.object({ 36 - category: z.optional(zCategory), 37 - id: z.optional(z.coerce.bigint()), 38 - name: z.string(), 39 - photoUrls: z.array(z.string()), 40 - status: z.optional(z.enum(['available', 'pending', 'sold'])), 41 - tags: z.optional(z.array(zTag)), 42 - }); 43 - 44 - export const zApiResponse = z.object({ 45 - code: z.optional(z.int()), 46 - message: z.optional(z.string()), 47 - type: z.optional(z.string()), 48 - }); 49 - 50 - export const zPet2 = zPet; 51 - 52 - /** 53 - * List of user object 54 - */ 55 - export const zUserArray = z.array(zUser); 56 - 57 - export const zAddPetData = z.object({ 58 - body: zPet, 59 - path: z.optional(z.never()), 60 - query: z.optional(z.never()), 61 - }); 62 - 63 - /** 64 - * Successful operation 65 - */ 66 - export const zAddPetResponse = zPet; 67 - 68 - export const zUpdatePetData = z.object({ 69 - body: zPet, 70 - path: z.optional(z.never()), 71 - query: z.optional(z.never()), 72 - }); 73 - 74 - /** 75 - * Successful operation 76 - */ 77 - export const zUpdatePetResponse = zPet; 78 - 79 - export const zFindPetsByStatusData = z.object({ 80 - body: z.optional(z.never()), 81 - path: z.optional(z.never()), 82 - query: z.object({ 83 - status: z.enum(['available', 'pending', 'sold']), 84 - }), 85 - }); 86 - 87 - /** 88 - * successful operation 89 - */ 90 - export const zFindPetsByStatusResponse = z.array(zPet); 91 - 92 - export const zFindPetsByTagsData = z.object({ 93 - body: z.optional(z.never()), 94 - path: z.optional(z.never()), 95 - query: z.object({ 96 - tags: z.array(z.string()), 97 - }), 98 - }); 99 - 100 - /** 101 - * successful operation 102 - */ 103 - export const zFindPetsByTagsResponse = z.array(zPet); 104 - 105 - export const zDeletePetData = z.object({ 106 - body: z.optional(z.never()), 107 - headers: z.optional( 108 - z.object({ 109 - api_key: z.optional(z.string()), 110 - }), 111 - ), 112 - path: z.object({ 113 - petId: z.coerce.bigint(), 114 - }), 115 - query: z.optional(z.never()), 116 - }); 117 - 118 - export const zGetPetByIdData = z.object({ 119 - body: z.optional(z.never()), 120 - path: z.object({ 121 - petId: z.coerce.bigint(), 122 - }), 123 - query: z.optional(z.never()), 124 - }); 125 - 126 - /** 127 - * successful operation 128 - */ 129 - export const zGetPetByIdResponse = zPet; 130 - 131 - export const zUpdatePetWithFormData = z.object({ 132 - body: z.optional(z.never()), 133 - path: z.object({ 134 - petId: z.coerce.bigint(), 135 - }), 136 - query: z.optional( 137 - z.object({ 138 - name: z.optional(z.string()), 139 - status: z.optional(z.string()), 140 - }), 141 - ), 142 - }); 143 - 144 - /** 145 - * successful operation 146 - */ 147 - export const zUpdatePetWithFormResponse = zPet; 148 - 149 - export const zUploadFileData = z.object({ 150 - body: z.optional(z.string()), 151 - path: z.object({ 152 - petId: z.coerce.bigint(), 153 - }), 154 - query: z.optional( 155 - z.object({ 156 - additionalMetadata: z.optional(z.string()), 157 - }), 158 - ), 159 - }); 160 - 161 - /** 162 - * successful operation 163 - */ 164 - export const zUploadFileResponse = zApiResponse; 165 - 166 - export const zGetInventoryData = z.object({ 167 - body: z.optional(z.never()), 168 - path: z.optional(z.never()), 169 - query: z.optional(z.never()), 170 - }); 171 - 172 - /** 173 - * successful operation 174 - */ 175 - export const zGetInventoryResponse = z.record(z.string(), z.int()); 176 - 177 - export const zPlaceOrderData = z.object({ 178 - body: z.optional(zOrder), 179 - path: z.optional(z.never()), 180 - query: z.optional(z.never()), 181 - }); 182 - 183 - /** 184 - * successful operation 185 - */ 186 - export const zPlaceOrderResponse = zOrder; 187 - 188 - export const zDeleteOrderData = z.object({ 189 - body: z.optional(z.never()), 190 - path: z.object({ 191 - orderId: z.coerce.bigint(), 192 - }), 193 - query: z.optional(z.never()), 194 - }); 195 - 196 - export const zGetOrderByIdData = z.object({ 197 - body: z.optional(z.never()), 198 - path: z.object({ 199 - orderId: z.coerce.bigint(), 200 - }), 201 - query: z.optional(z.never()), 202 - }); 203 - 204 - /** 205 - * successful operation 206 - */ 207 - export const zGetOrderByIdResponse = zOrder; 208 - 209 - export const zCreateUserData = z.object({ 210 - body: z.optional(zUser), 211 - path: z.optional(z.never()), 212 - query: z.optional(z.never()), 213 - }); 214 - 215 - /** 216 - * successful operation 217 - */ 218 - export const zCreateUserResponse = zUser; 219 - 220 - export const zCreateUsersWithListInputData = z.object({ 221 - body: z.optional(z.array(zUser)), 222 - path: z.optional(z.never()), 223 - query: z.optional(z.never()), 224 - }); 225 - 226 - /** 227 - * Successful operation 228 - */ 229 - export const zCreateUsersWithListInputResponse = zUser; 230 - 231 - export const zLoginUserData = z.object({ 232 - body: z.optional(z.never()), 233 - path: z.optional(z.never()), 234 - query: z.optional( 235 - z.object({ 236 - password: z.optional(z.string()), 237 - username: z.optional(z.string()), 238 - }), 239 - ), 240 - }); 241 - 242 - /** 243 - * successful operation 244 - */ 245 - export const zLoginUserResponse = z.string(); 246 - 247 - export const zLogoutUserData = z.object({ 248 - body: z.optional(z.never()), 249 - path: z.optional(z.never()), 250 - query: z.optional(z.never()), 251 - }); 252 - 253 - export const zDeleteUserData = z.object({ 254 - body: z.optional(z.never()), 255 - path: z.object({ 256 - username: z.string(), 257 - }), 258 - query: z.optional(z.never()), 259 - }); 260 - 261 - export const zGetUserByNameData = z.object({ 262 - body: z.optional(z.never()), 263 - path: z.object({ 264 - username: z.string(), 265 - }), 266 - query: z.optional(z.never()), 267 - }); 268 - 269 - /** 270 - * successful operation 271 - */ 272 - export const zGetUserByNameResponse = zUser; 273 - 274 - export const zUpdateUserData = z.object({ 275 - body: z.optional(zUser), 276 - path: z.object({ 277 - username: z.string(), 278 - }), 279 - query: z.optional(z.never()), 280 - });
-11
examples/openapi-ts-sample/src/hey-api.ts
··· 1 - import type { CreateClientConfig } from './client/client'; 2 - 3 - export const createClientConfig: CreateClientConfig = (config) => ({ 4 - ...config, 5 - // set default base url for requests 6 - baseUrl: 'https://petstore3.swagger.io/api/v3', 7 - // set default headers for requests 8 - headers: { 9 - Authorization: 'Bearer <token_from_internal_client>', 10 - }, 11 - });
-15
examples/openapi-ts-sample/src/main.tsx
··· 1 - import '@radix-ui/themes/styles.css'; 2 - 3 - import { Theme } from '@radix-ui/themes'; 4 - import React from 'react'; 5 - import ReactDOM from 'react-dom/client'; 6 - 7 - import App from './App.tsx'; 8 - 9 - ReactDOM.createRoot(document.getElementById('root')!).render( 10 - <React.StrictMode> 11 - <Theme appearance="dark"> 12 - <App /> 13 - </Theme> 14 - </React.StrictMode>, 15 - );
-1
examples/openapi-ts-sample/src/vite-env.d.ts
··· 1 - /// <reference types="vite/client" />
-8
examples/openapi-ts-sample/tailwind.config.js
··· 1 - /** @type {import('tailwindcss').Config} */ 2 - export default { 3 - content: ['./index.html', './src/**/*.{html,js,ts,jsx,tsx}'], 4 - plugins: [], 5 - theme: { 6 - extend: {}, 7 - }, 8 - };
-25
examples/openapi-ts-sample/tsconfig.json
··· 1 - { 2 - "compilerOptions": { 3 - "target": "ES2020", 4 - "useDefineForClassFields": true, 5 - "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 - "module": "ESNext", 7 - "skipLibCheck": true, 8 - 9 - /* Bundler mode */ 10 - "moduleResolution": "bundler", 11 - "allowImportingTsExtensions": true, 12 - "resolveJsonModule": true, 13 - "isolatedModules": true, 14 - "noEmit": true, 15 - "jsx": "react-jsx", 16 - 17 - /* Linting */ 18 - "strict": true, 19 - "noUnusedLocals": true, 20 - "noUnusedParameters": true, 21 - "noFallthroughCasesInSwitch": true 22 - }, 23 - "include": ["src"], 24 - "references": [{ "path": "./tsconfig.node.json" }] 25 - }
-11
examples/openapi-ts-sample/tsconfig.node.json
··· 1 - { 2 - "compilerOptions": { 3 - "composite": true, 4 - "skipLibCheck": true, 5 - "module": "ESNext", 6 - "moduleResolution": "bundler", 7 - "allowSyntheticDefaultImports": true, 8 - "strict": true 9 - }, 10 - "include": ["vite.config.ts"] 11 - }
-7
examples/openapi-ts-sample/vite.config.ts
··· 1 - import { createViteConfig } from '@config/vite-base'; 2 - import react from '@vitejs/plugin-react'; 3 - 4 - // https://vitejs.dev/config/ 5 - export default createViteConfig({ 6 - plugins: [react()], 7 - });
+3 -3
package.json
··· 20 20 "funding": "https://github.com/sponsors/hey-api", 21 21 "type": "module", 22 22 "scripts": { 23 - "build": "turbo run build --filter=\"!@example/openapi-ts-sample\"", 23 + "build": "turbo run build", 24 24 "changeset": "changeset", 25 25 "examples:check": "sh ./scripts/examples-check.sh", 26 26 "examples:generate": "sh ./scripts/examples-generate.sh", ··· 33 33 "test:coverage": "turbo run test:coverage", 34 34 "test:update": "turbo run test:update", 35 35 "test:watch": "turbo run test:watch", 36 - "test": "turbo run test --filter=\"!@example/openapi-ts-sample\"", 37 - "typecheck": "turbo run typecheck --filter=\"!@example/openapi-ts-sample\"" 36 + "test": "turbo run test", 37 + "typecheck": "turbo run typecheck" 38 38 }, 39 39 "engines": { 40 40 "node": ">=20.19.0"
+596 -130
pnpm-lock.yaml
··· 110 110 specifier: 3.1.1 111 111 version: 3.1.1(@types/debug@4.1.12)(@types/node@22.10.5)(jiti@2.6.1)(jsdom@23.0.0)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 112 112 113 + dev: 114 + devDependencies: 115 + '@angular-devkit/build-angular': 116 + specifier: 19.2.19 117 + version: 19.2.19(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(@angular/compiler@19.2.15)(@angular/platform-server@19.2.0(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.15)(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.6.1)(karma@6.4.4)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.9.3)))(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))(yaml@2.8.1) 118 + '@angular/animations': 119 + specifier: 19.2.15 120 + version: 19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)) 121 + '@angular/cli': 122 + specifier: 19.2.19 123 + version: 19.2.19(@types/node@22.10.5)(chokidar@4.0.3) 124 + '@angular/common': 125 + specifier: 19.2.15 126 + version: 19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2) 127 + '@angular/compiler': 128 + specifier: 19.2.15 129 + version: 19.2.15 130 + '@angular/compiler-cli': 131 + specifier: 19.2.15 132 + version: 19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3) 133 + '@angular/core': 134 + specifier: 19.2.15 135 + version: 19.2.15(rxjs@7.8.2)(zone.js@0.15.1) 136 + '@angular/forms': 137 + specifier: 19.2.15 138 + version: 19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(rxjs@7.8.2) 139 + '@angular/platform-browser': 140 + specifier: 19.2.15 141 + version: 19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)) 142 + '@angular/platform-browser-dynamic': 143 + specifier: 19.2.15 144 + version: 19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.15)(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))) 145 + '@angular/router': 146 + specifier: 19.2.15 147 + version: 19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(rxjs@7.8.2) 148 + '@config/vite-base': 149 + specifier: workspace:* 150 + version: link:../packages/config-vite-base 151 + '@hey-api/codegen-core': 152 + specifier: workspace:* 153 + version: link:../packages/codegen-core 154 + '@hey-api/custom-client': 155 + specifier: workspace:* 156 + version: link:../packages/custom-client 157 + '@hey-api/openapi-ts': 158 + specifier: workspace:* 159 + version: link:../packages/openapi-ts 160 + '@pinia/colada': 161 + specifier: 0.17.7 162 + version: 0.17.7(pinia@3.0.3(typescript@5.9.3)(vue@3.5.13(typescript@5.9.3)))(vue@3.5.13(typescript@5.9.3)) 163 + '@tanstack/angular-query-experimental': 164 + specifier: 5.73.3 165 + version: 5.73.3(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)) 166 + '@tanstack/react-query': 167 + specifier: 5.73.3 168 + version: 5.73.3(react@19.0.0) 169 + '@tanstack/solid-query': 170 + specifier: 5.73.3 171 + version: 5.73.3(solid-js@1.9.9) 172 + '@tanstack/svelte-query': 173 + specifier: 5.73.3 174 + version: 5.73.3(svelte@5.19.9) 175 + '@tanstack/vue-query': 176 + specifier: 5.73.3 177 + version: 5.73.3(vue@3.5.13(typescript@5.9.3)) 178 + '@types/cross-spawn': 179 + specifier: 6.0.6 180 + version: 6.0.6 181 + ajv: 182 + specifier: 8.17.1 183 + version: 8.17.1 184 + arktype: 185 + specifier: 2.1.25 186 + version: 2.1.25 187 + axios: 188 + specifier: 1.8.2 189 + version: 1.8.2 190 + cross-spawn: 191 + specifier: 7.0.6 192 + version: 7.0.6 193 + eslint: 194 + specifier: 9.17.0 195 + version: 9.17.0(jiti@2.6.1) 196 + fastify: 197 + specifier: 5.2.0 198 + version: 5.2.0 199 + glob: 200 + specifier: 11.0.3 201 + version: 11.0.3 202 + node-fetch: 203 + specifier: 3.3.2 204 + version: 3.3.2 205 + nuxt: 206 + specifier: 3.14.1592 207 + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 208 + ofetch: 209 + specifier: 1.4.1 210 + version: 1.4.1 211 + prettier: 212 + specifier: 3.4.2 213 + version: 3.4.2 214 + rxjs: 215 + specifier: 7.8.2 216 + version: 7.8.2 217 + ts-node: 218 + specifier: 10.9.2 219 + version: 10.9.2(@types/node@22.10.5)(typescript@5.9.3) 220 + tslib: 221 + specifier: 2.8.1 222 + version: 2.8.1 223 + typescript: 224 + specifier: 5.9.3 225 + version: 5.9.3 226 + valibot: 227 + specifier: 1.1.0 228 + version: 1.1.0(typescript@5.9.3) 229 + vue: 230 + specifier: 3.5.13 231 + version: 3.5.13(typescript@5.9.3) 232 + zod: 233 + specifier: 4.1.12 234 + version: 4.1.12 235 + 113 236 docs: 114 237 dependencies: 115 238 '@stackblitz/sdk': ··· 1342 1465 version: 11.0.3 1343 1466 nuxt: 1344 1467 specifier: 3.14.1592 1345 - version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 1468 + version: 3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3) 1346 1469 ofetch: 1347 1470 specifier: 1.4.1 1348 1471 version: 1.4.1 ··· 7984 8107 resolution: {integrity: sha512-YKGmAy84hKH+hHIIER07VCAHf9u0Ldelx1uU6EBxsRPDXIA1m5fsKmJfyC3xBhw6cVC/1i83VdbL4PvepTrt8A==} 7985 8108 hasBin: true 7986 8109 7987 - cross-spawn@7.0.5: 7988 - resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==} 7989 - engines: {node: '>= 8'} 7990 - 7991 8110 cross-spawn@7.0.6: 7992 8111 resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} 7993 8112 engines: {node: '>= 8'} ··· 14283 14402 dependencies: 14284 14403 '@ampproject/remapping': 2.3.0 14285 14404 '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) 14286 - '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)))(webpack@5.98.0(esbuild@0.25.0)) 14405 + '@angular-devkit/build-webpack': 0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0))(webpack@5.98.0) 14287 14406 '@angular-devkit/core': 19.2.0(chokidar@4.0.3) 14288 14407 '@angular/build': 19.2.0(@angular/compiler-cli@19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/platform-server@19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))))(@angular/ssr@19.2.15(5c03da8199d2fcdf9ff93b70f9349edd))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.6.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.8.3)))(terser@5.39.0)(typescript@5.8.3)(yaml@2.8.1) 14289 14408 '@angular/compiler-cli': 19.2.0(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(typescript@5.8.3) ··· 14301 14420 '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.1)) 14302 14421 ansi-colors: 4.1.3 14303 14422 autoprefixer: 10.4.20(postcss@8.5.2) 14304 - babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) 14423 + babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0) 14305 14424 browserslist: 4.25.4 14306 14425 copy-webpack-plugin: 12.0.2(webpack@5.98.0) 14307 14426 css-loader: 7.1.2(webpack@5.98.0) ··· 14321 14440 picomatch: 4.0.2 14322 14441 piscina: 4.8.0 14323 14442 postcss: 8.5.2 14324 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14443 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0) 14325 14444 resolve-url-loader: 5.0.0 14326 14445 rxjs: 7.8.1 14327 14446 sass: 1.85.0 ··· 14334 14453 tslib: 2.8.1 14335 14454 typescript: 5.8.3 14336 14455 webpack: 5.98.0(esbuild@0.25.0) 14337 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14338 - webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) 14456 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14457 + webpack-dev-server: 5.2.0(webpack@5.98.0) 14339 14458 webpack-merge: 6.0.1 14340 14459 webpack-subresource-integrity: 5.1.0(webpack@5.98.0) 14341 14460 optionalDependencies: ··· 14389 14508 '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 14390 14509 ansi-colors: 4.1.3 14391 14510 autoprefixer: 10.4.20(postcss@8.5.2) 14392 - babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)) 14511 + babel-loader: 9.2.1(@babel/core@7.26.9)(webpack@5.98.0) 14393 14512 browserslist: 4.25.4 14394 - copy-webpack-plugin: 12.0.2(webpack@5.98.0) 14395 - css-loader: 7.1.2(webpack@5.98.0) 14513 + copy-webpack-plugin: 12.0.2(webpack@5.98.0(esbuild@0.25.0)) 14514 + css-loader: 7.1.2(webpack@5.98.0(esbuild@0.25.0)) 14396 14515 esbuild-wasm: 0.25.0 14397 14516 fast-glob: 3.3.3 14398 14517 http-proxy-middleware: 3.0.3 ··· 14400 14519 jsonc-parser: 3.3.1 14401 14520 karma-source-map-support: 1.4.0 14402 14521 less: 4.2.2 14403 - less-loader: 12.2.0(less@4.2.2)(webpack@5.98.0) 14404 - license-webpack-plugin: 4.0.2(webpack@5.98.0) 14522 + less-loader: 12.2.0(less@4.2.2)(webpack@5.98.0(esbuild@0.25.0)) 14523 + license-webpack-plugin: 4.0.2(webpack@5.98.0(esbuild@0.25.0)) 14405 14524 loader-utils: 3.3.1 14406 - mini-css-extract-plugin: 2.9.2(webpack@5.98.0) 14525 + mini-css-extract-plugin: 2.9.2(webpack@5.98.0(esbuild@0.25.0)) 14407 14526 open: 10.1.0 14408 14527 ora: 5.4.1 14409 14528 picomatch: 4.0.2 14410 14529 piscina: 4.8.0 14411 14530 postcss: 8.5.2 14412 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14531 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0) 14413 14532 resolve-url-loader: 5.0.0 14414 14533 rxjs: 7.8.1 14415 14534 sass: 1.85.0 14416 - sass-loader: 16.0.5(sass@1.85.0)(webpack@5.98.0) 14535 + sass-loader: 16.0.5(sass@1.85.0)(webpack@5.98.0(esbuild@0.25.0)) 14417 14536 semver: 7.7.1 14418 - source-map-loader: 5.0.0(webpack@5.98.0) 14537 + source-map-loader: 5.0.0(webpack@5.98.0(esbuild@0.25.0)) 14419 14538 source-map-support: 0.5.21 14420 14539 terser: 5.39.0 14421 14540 tree-kill: 1.2.2 ··· 14425 14544 webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14426 14545 webpack-dev-server: 5.2.0(webpack@5.98.0(esbuild@0.25.0)) 14427 14546 webpack-merge: 6.0.1 14428 - webpack-subresource-integrity: 5.1.0(webpack@5.98.0) 14547 + webpack-subresource-integrity: 5.1.0(webpack@5.98.0(esbuild@0.25.0)) 14429 14548 optionalDependencies: 14430 14549 '@angular/platform-server': 19.2.0(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.0(@angular/animations@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.0(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.0(rxjs@7.8.2)(zone.js@0.15.1))) 14431 14550 '@angular/ssr': 19.2.15(5c03da8199d2fcdf9ff93b70f9349edd) ··· 14497 14616 picomatch: 4.0.2 14498 14617 piscina: 4.8.0 14499 14618 postcss: 8.5.2 14500 - postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)) 14619 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0) 14501 14620 resolve-url-loader: 5.0.0 14502 14621 rxjs: 7.8.1 14503 14622 sass: 1.85.0 ··· 14510 14629 tslib: 2.8.1 14511 14630 typescript: 5.8.3 14512 14631 webpack: 5.98.0(esbuild@0.25.4) 14513 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14632 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14514 14633 webpack-dev-server: 5.2.2(webpack@5.98.0) 14515 14634 webpack-merge: 6.0.1 14516 14635 webpack-subresource-integrity: 5.1.0(webpack@5.98.0) ··· 14598 14717 tslib: 2.8.1 14599 14718 typescript: 5.9.3 14600 14719 webpack: 5.98.0(esbuild@0.25.4) 14601 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 14720 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14721 + webpack-dev-server: 5.2.2(webpack@5.98.0) 14722 + webpack-merge: 6.0.1 14723 + webpack-subresource-integrity: 5.1.0(webpack@5.98.0) 14724 + optionalDependencies: 14725 + '@angular/platform-server': 19.2.0(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.15)(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))) 14726 + esbuild: 0.25.4 14727 + karma: 6.4.4 14728 + tailwindcss: 3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.9.3)) 14729 + transitivePeerDependencies: 14730 + - '@angular/compiler' 14731 + - '@rspack/core' 14732 + - '@swc/core' 14733 + - '@types/node' 14734 + - bufferutil 14735 + - chokidar 14736 + - debug 14737 + - html-webpack-plugin 14738 + - jiti 14739 + - lightningcss 14740 + - node-sass 14741 + - sass-embedded 14742 + - stylus 14743 + - sugarss 14744 + - supports-color 14745 + - tsx 14746 + - uglify-js 14747 + - utf-8-validate 14748 + - vite 14749 + - webpack-cli 14750 + - yaml 14751 + 14752 + '@angular-devkit/build-angular@19.2.19(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(@angular/compiler@19.2.15)(@angular/platform-server@19.2.0(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.15)(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.6.1)(karma@6.4.4)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.9.3)))(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))(yaml@2.8.1)': 14753 + dependencies: 14754 + '@ampproject/remapping': 2.3.0 14755 + '@angular-devkit/architect': 0.1902.19(chokidar@4.0.3) 14756 + '@angular-devkit/build-webpack': 0.1902.19(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.98.0))(webpack@5.98.0) 14757 + '@angular-devkit/core': 19.2.19(chokidar@4.0.3) 14758 + '@angular/build': 19.2.19(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(@angular/compiler@19.2.15)(@angular/platform-server@19.2.0(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/compiler@19.2.15)(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(@angular/platform-browser@19.2.15(@angular/animations@19.2.15(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1)))(@angular/common@19.2.15(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))(rxjs@7.8.2))(@angular/core@19.2.15(rxjs@7.8.2)(zone.js@0.15.1))))(@types/node@22.10.5)(chokidar@4.0.3)(jiti@2.6.1)(karma@6.4.4)(less@4.2.2)(postcss@8.5.2)(tailwindcss@3.4.14(ts-node@10.9.2(@types/node@22.10.5)(typescript@5.9.3)))(terser@5.39.0)(typescript@5.9.3)(yaml@2.8.1) 14759 + '@angular/compiler-cli': 19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3) 14760 + '@babel/core': 7.26.10 14761 + '@babel/generator': 7.26.10 14762 + '@babel/helper-annotate-as-pure': 7.25.9 14763 + '@babel/helper-split-export-declaration': 7.24.7 14764 + '@babel/plugin-transform-async-generator-functions': 7.26.8(@babel/core@7.26.10) 14765 + '@babel/plugin-transform-async-to-generator': 7.25.9(@babel/core@7.26.10) 14766 + '@babel/plugin-transform-runtime': 7.26.10(@babel/core@7.26.10) 14767 + '@babel/preset-env': 7.26.9(@babel/core@7.26.10) 14768 + '@babel/runtime': 7.26.10 14769 + '@discoveryjs/json-ext': 0.6.3 14770 + '@ngtools/webpack': 19.2.19(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.98.0) 14771 + '@vitejs/plugin-basic-ssl': 1.2.0(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 14772 + ansi-colors: 4.1.3 14773 + autoprefixer: 10.4.20(postcss@8.5.2) 14774 + babel-loader: 9.2.1(@babel/core@7.26.10)(webpack@5.98.0) 14775 + browserslist: 4.25.4 14776 + copy-webpack-plugin: 12.0.2(webpack@5.98.0) 14777 + css-loader: 7.1.2(webpack@5.98.0) 14778 + esbuild-wasm: 0.25.4 14779 + fast-glob: 3.3.3 14780 + http-proxy-middleware: 3.0.5 14781 + istanbul-lib-instrument: 6.0.3 14782 + jsonc-parser: 3.3.1 14783 + karma-source-map-support: 1.4.0 14784 + less: 4.2.2 14785 + less-loader: 12.2.0(less@4.2.2)(webpack@5.98.0) 14786 + license-webpack-plugin: 4.0.2(webpack@5.98.0) 14787 + loader-utils: 3.3.1 14788 + mini-css-extract-plugin: 2.9.2(webpack@5.98.0) 14789 + open: 10.1.0 14790 + ora: 5.4.1 14791 + picomatch: 4.0.2 14792 + piscina: 4.8.0 14793 + postcss: 8.5.2 14794 + postcss-loader: 8.1.1(postcss@8.5.2)(typescript@5.9.3)(webpack@5.98.0) 14795 + resolve-url-loader: 5.0.0 14796 + rxjs: 7.8.1 14797 + sass: 1.85.0 14798 + sass-loader: 16.0.5(sass@1.85.0)(webpack@5.98.0) 14799 + semver: 7.7.1 14800 + source-map-loader: 5.0.0(webpack@5.98.0) 14801 + source-map-support: 0.5.21 14802 + terser: 5.39.0 14803 + tree-kill: 1.2.2 14804 + tslib: 2.8.1 14805 + typescript: 5.9.3 14806 + webpack: 5.98.0(esbuild@0.25.4) 14807 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 14602 14808 webpack-dev-server: 5.2.2(webpack@5.98.0) 14603 14809 webpack-merge: 6.0.1 14604 14810 webpack-subresource-integrity: 5.1.0(webpack@5.98.0) ··· 14639 14845 transitivePeerDependencies: 14640 14846 - chokidar 14641 14847 14848 + '@angular-devkit/build-webpack@0.1902.0(chokidar@4.0.3)(webpack-dev-server@5.2.0(webpack@5.98.0))(webpack@5.98.0)': 14849 + dependencies: 14850 + '@angular-devkit/architect': 0.1902.0(chokidar@4.0.3) 14851 + rxjs: 7.8.1 14852 + webpack: 5.98.0(esbuild@0.25.0) 14853 + webpack-dev-server: 5.2.0(webpack@5.98.0) 14854 + transitivePeerDependencies: 14855 + - chokidar 14856 + 14642 14857 '@angular-devkit/build-webpack@0.1902.15(chokidar@4.0.3)(webpack-dev-server@5.2.2(webpack@5.98.0))(webpack@5.98.0)': 14643 14858 dependencies: 14644 14859 '@angular-devkit/architect': 0.1902.15(chokidar@4.0.3) 14645 14860 rxjs: 7.8.1 14646 - webpack: 5.98.0(esbuild@0.25.0) 14861 + webpack: 5.98.0(esbuild@0.25.4) 14647 14862 webpack-dev-server: 5.2.2(webpack@5.98.0) 14648 14863 transitivePeerDependencies: 14649 14864 - chokidar ··· 14652 14867 dependencies: 14653 14868 '@angular-devkit/architect': 0.1902.19(chokidar@4.0.3) 14654 14869 rxjs: 7.8.1 14655 - webpack: 5.98.0(esbuild@0.25.0) 14870 + webpack: 5.98.0(esbuild@0.25.4) 14656 14871 webpack-dev-server: 5.2.2(webpack@5.98.0) 14657 14872 transitivePeerDependencies: 14658 14873 - chokidar ··· 18054 18269 dependencies: 18055 18270 '@angular/compiler-cli': 19.2.14(@angular/compiler@19.2.14)(typescript@5.8.3) 18056 18271 typescript: 5.8.3 18057 - webpack: 5.98.0(esbuild@0.25.0) 18272 + webpack: 5.98.0(esbuild@0.25.4) 18058 18273 18059 18274 '@ngtools/webpack@19.2.19(@angular/compiler-cli@19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3))(typescript@5.9.3)(webpack@5.98.0)': 18060 18275 dependencies: 18061 18276 '@angular/compiler-cli': 19.2.15(@angular/compiler@19.2.15)(typescript@5.9.3) 18062 18277 typescript: 5.9.3 18063 - webpack: 5.98.0(esbuild@0.25.0) 18278 + webpack: 5.98.0(esbuild@0.25.4) 18064 18279 18065 18280 '@nodelib/fs.scandir@2.1.5': 18066 18281 dependencies: ··· 18157 18372 - magicast 18158 18373 - supports-color 18159 18374 18160 - '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))': 18375 + '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))': 18161 18376 dependencies: 18162 18377 '@nuxt/kit': 3.15.4(magicast@0.3.5) 18163 18378 '@nuxt/schema': 3.16.2 18164 18379 execa: 7.2.0 18165 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18380 + vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 18166 18381 transitivePeerDependencies: 18167 18382 - magicast 18168 18383 - supports-color ··· 18212 18427 scule: 1.3.0 18213 18428 semver: 7.7.2 18214 18429 simple-git: 3.28.0 18215 - sirv: 3.0.1 18216 - tinyglobby: 0.2.14 18430 + sirv: 3.0.2 18431 + tinyglobby: 0.2.15 18217 18432 unimport: 3.14.6(rollup@3.29.5) 18218 18433 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 18219 18434 vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@3.29.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) ··· 18259 18474 scule: 1.3.0 18260 18475 semver: 7.7.2 18261 18476 simple-git: 3.28.0 18262 - sirv: 3.0.1 18263 - tinyglobby: 0.2.14 18477 + sirv: 3.0.2 18478 + tinyglobby: 0.2.15 18264 18479 unimport: 3.14.6(rollup@4.50.0) 18265 18480 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 18266 18481 vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) ··· 18306 18521 scule: 1.3.0 18307 18522 semver: 7.7.2 18308 18523 simple-git: 3.28.0 18309 - sirv: 3.0.1 18310 - tinyglobby: 0.2.14 18524 + sirv: 3.0.2 18525 + tinyglobby: 0.2.15 18311 18526 unimport: 3.14.6(rollup@4.50.0) 18312 18527 vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.1) 18313 18528 vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.1)) ··· 18321 18536 - utf-8-validate 18322 18537 - vue 18323 18538 18324 - '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 18539 + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))(vue@3.5.13(typescript@5.9.3))': 18325 18540 dependencies: 18326 18541 '@antfu/utils': 0.7.10 18327 - '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18542 + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 18328 18543 '@nuxt/devtools-wizard': 1.7.0 18329 18544 '@nuxt/kit': 3.15.4(magicast@0.3.5) 18330 - '@vue/devtools-core': 7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 18545 + '@vue/devtools-core': 7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))(vue@3.5.13(typescript@5.9.3)) 18331 18546 '@vue/devtools-kit': 7.6.8 18332 18547 birpc: 0.2.19 18333 18548 consola: 3.4.2 ··· 18353 18568 scule: 1.3.0 18354 18569 semver: 7.7.2 18355 18570 simple-git: 3.28.0 18356 - sirv: 3.0.1 18357 - tinyglobby: 0.2.14 18571 + sirv: 3.0.2 18572 + tinyglobby: 0.2.15 18358 18573 unimport: 3.14.6(rollup@4.50.0) 18359 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 18360 - vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18361 - vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 18574 + vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 18575 + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 18576 + vite-plugin-vue-inspector: 5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 18577 + which: 3.0.1 18578 + ws: 8.18.3 18579 + transitivePeerDependencies: 18580 + - bufferutil 18581 + - rollup 18582 + - supports-color 18583 + - utf-8-validate 18584 + - vue 18585 + 18586 + '@nuxt/devtools@1.7.0(rollup@4.50.0)(vue@3.5.13(typescript@5.9.3))': 18587 + dependencies: 18588 + '@antfu/utils': 0.7.10 18589 + '@nuxt/devtools-kit': 1.7.0(magicast@0.3.5)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 18590 + '@nuxt/devtools-wizard': 1.7.0 18591 + '@nuxt/kit': 3.15.4(magicast@0.3.5) 18592 + '@vue/devtools-core': 7.6.8(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))(vue@3.5.13(typescript@5.9.3)) 18593 + '@vue/devtools-kit': 7.6.8 18594 + birpc: 0.2.19 18595 + consola: 3.4.2 18596 + cronstrue: 2.59.0 18597 + destr: 2.0.5 18598 + error-stack-parser-es: 0.1.5 18599 + execa: 7.2.0 18600 + fast-npm-meta: 0.2.2 18601 + flatted: 3.3.3 18602 + get-port-please: 3.2.0 18603 + hookable: 5.5.3 18604 + image-meta: 0.2.1 18605 + is-installed-globally: 1.0.0 18606 + launch-editor: 2.11.1 18607 + local-pkg: 0.5.1 18608 + magicast: 0.3.5 18609 + nypm: 0.4.1 18610 + ohash: 1.1.6 18611 + pathe: 1.1.2 18612 + perfect-debounce: 1.0.0 18613 + pkg-types: 1.3.1 18614 + rc9: 2.1.2 18615 + scule: 1.3.0 18616 + semver: 7.7.2 18617 + simple-git: 3.28.0 18618 + sirv: 3.0.2 18619 + tinyglobby: 0.2.15 18620 + unimport: 3.14.6(rollup@4.50.0) 18621 + vite-plugin-inspect: 0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 18622 + vite-plugin-vue-inspector: 5.3.2(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 18362 18623 which: 3.0.1 18363 18624 ws: 8.18.3 18364 18625 transitivePeerDependencies: ··· 18378 18639 globby: 14.1.0 18379 18640 hash-sum: 2.0.0 18380 18641 ignore: 6.0.2 18381 - jiti: 2.5.1 18642 + jiti: 2.6.1 18382 18643 klona: 2.0.6 18383 18644 knitwork: 1.2.0 18384 18645 mlly: 1.8.0 ··· 18405 18666 globby: 14.1.0 18406 18667 hash-sum: 2.0.0 18407 18668 ignore: 6.0.2 18408 - jiti: 2.5.1 18669 + jiti: 2.6.1 18409 18670 klona: 2.0.6 18410 18671 knitwork: 1.2.0 18411 18672 mlly: 1.8.0 ··· 18623 18884 externality: 1.0.2 18624 18885 get-port-please: 3.2.0 18625 18886 h3: 1.15.4 18626 - jiti: 2.5.1 18887 + jiti: 2.6.1 18627 18888 knitwork: 1.2.0 18628 - magic-string: 0.30.18 18889 + magic-string: 0.30.19 18629 18890 mlly: 1.8.0 18630 18891 ohash: 1.1.6 18631 18892 pathe: 1.1.2 ··· 18683 18944 externality: 1.0.2 18684 18945 get-port-please: 3.2.0 18685 18946 h3: 1.15.4 18686 - jiti: 2.5.1 18947 + jiti: 2.6.1 18687 18948 knitwork: 1.2.0 18688 - magic-string: 0.30.18 18949 + magic-string: 0.30.19 18689 18950 mlly: 1.8.0 18690 18951 ohash: 1.1.6 18691 18952 pathe: 1.1.2 ··· 18743 19004 externality: 1.0.2 18744 19005 get-port-please: 3.2.0 18745 19006 h3: 1.15.4 18746 - jiti: 2.5.1 19007 + jiti: 2.6.1 18747 19008 knitwork: 1.2.0 18748 - magic-string: 0.30.18 19009 + magic-string: 0.30.19 18749 19010 mlly: 1.8.0 18750 19011 ohash: 1.1.6 18751 19012 pathe: 1.1.2 ··· 21130 21391 transitivePeerDependencies: 21131 21392 - vite 21132 21393 21133 - '@vue/devtools-core@7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3))': 21394 + '@vue/devtools-core@7.6.8(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))(vue@3.5.13(typescript@5.9.3))': 21134 21395 dependencies: 21135 21396 '@vue/devtools-kit': 7.7.7 21136 21397 '@vue/devtools-shared': 7.7.7 21137 21398 mitt: 3.0.1 21138 21399 nanoid: 5.1.5 21139 21400 pathe: 1.1.2 21140 - vite-hot-client: 0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)) 21401 + vite-hot-client: 0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)) 21141 21402 vue: 3.5.13(typescript@5.9.3) 21142 21403 transitivePeerDependencies: 21143 21404 - vite ··· 21702 21963 21703 21964 ast-walker-scope@0.6.2: 21704 21965 dependencies: 21705 - '@babel/parser': 7.28.3 21966 + '@babel/parser': 7.28.4 21706 21967 ast-kit: 1.4.3 21707 21968 21708 21969 async-function@1.0.0: {} ··· 21783 22044 '@babel/core': 7.26.10 21784 22045 find-cache-dir: 4.0.0 21785 22046 schema-utils: 4.3.2 21786 - webpack: 5.98.0(esbuild@0.25.0) 22047 + webpack: 5.98.0(esbuild@0.25.4) 21787 22048 21788 - babel-loader@9.2.1(@babel/core@7.26.9)(webpack@5.98.0(esbuild@0.25.0)): 22049 + babel-loader@9.2.1(@babel/core@7.26.9)(webpack@5.98.0): 21789 22050 dependencies: 21790 22051 '@babel/core': 7.26.9 21791 22052 find-cache-dir: 4.0.0 ··· 22369 22630 graceful-fs: 4.2.11 22370 22631 p-event: 6.0.1 22371 22632 22633 + copy-webpack-plugin@12.0.2(webpack@5.98.0(esbuild@0.25.0)): 22634 + dependencies: 22635 + fast-glob: 3.3.3 22636 + glob-parent: 6.0.2 22637 + globby: 14.1.0 22638 + normalize-path: 3.0.0 22639 + schema-utils: 4.3.2 22640 + serialize-javascript: 6.0.2 22641 + webpack: 5.98.0(esbuild@0.25.0) 22642 + 22372 22643 copy-webpack-plugin@12.0.2(webpack@5.98.0): 22373 22644 dependencies: 22374 22645 fast-glob: 3.3.3 ··· 22377 22648 normalize-path: 3.0.0 22378 22649 schema-utils: 4.3.2 22379 22650 serialize-javascript: 6.0.2 22380 - webpack: 5.98.0(esbuild@0.25.0) 22651 + webpack: 5.98.0(esbuild@0.25.4) 22381 22652 22382 22653 core-js-compat@3.45.1: 22383 22654 dependencies: ··· 22425 22696 22426 22697 cronstrue@2.59.0: {} 22427 22698 22428 - cross-spawn@7.0.5: 22429 - dependencies: 22430 - path-key: 3.1.1 22431 - shebang-command: 2.0.0 22432 - which: 2.0.2 22433 - 22434 22699 cross-spawn@7.0.6: 22435 22700 dependencies: 22436 22701 path-key: 3.1.1 ··· 22445 22710 dependencies: 22446 22711 postcss: 8.5.6 22447 22712 22448 - css-loader@7.1.2(webpack@5.98.0): 22713 + css-loader@7.1.2(webpack@5.98.0(esbuild@0.25.0)): 22449 22714 dependencies: 22450 22715 icss-utils: 5.1.0(postcss@8.4.41) 22451 22716 postcss: 8.4.41 ··· 22457 22722 semver: 7.7.2 22458 22723 optionalDependencies: 22459 22724 webpack: 5.98.0(esbuild@0.25.0) 22725 + 22726 + css-loader@7.1.2(webpack@5.98.0): 22727 + dependencies: 22728 + icss-utils: 5.1.0(postcss@8.4.41) 22729 + postcss: 8.4.41 22730 + postcss-modules-extract-imports: 3.1.0(postcss@8.4.41) 22731 + postcss-modules-local-by-default: 4.2.0(postcss@8.4.41) 22732 + postcss-modules-scope: 3.2.1(postcss@8.4.41) 22733 + postcss-modules-values: 4.0.0(postcss@8.4.41) 22734 + postcss-value-parser: 4.2.0 22735 + semver: 7.7.2 22736 + optionalDependencies: 22737 + webpack: 5.98.0(esbuild@0.25.4) 22460 22738 22461 22739 css-select@5.2.2: 22462 22740 dependencies: ··· 23221 23499 eslint: 9.17.0(jiti@2.6.1) 23222 23500 eslint-import-resolver-node: 0.3.9 23223 23501 eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)) 23224 - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.6.1)) 23502 + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)) 23225 23503 eslint-plugin-jsx-a11y: 6.10.2(eslint@9.17.0(jiti@2.6.1)) 23226 23504 eslint-plugin-react: 7.37.5(eslint@9.17.0(jiti@2.6.1)) 23227 23505 eslint-plugin-react-hooks: 5.2.0(eslint@9.17.0(jiti@2.6.1)) ··· 23259 23537 tinyglobby: 0.2.14 23260 23538 unrs-resolver: 1.11.1 23261 23539 optionalDependencies: 23262 - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.6.1)) 23540 + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)) 23263 23541 transitivePeerDependencies: 23264 23542 - supports-color 23265 23543 ··· 23274 23552 transitivePeerDependencies: 23275 23553 - supports-color 23276 23554 23277 - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.17.0(jiti@2.6.1)): 23555 + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.29.1(eslint@9.17.0(jiti@2.6.1))(typescript@5.8.3))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)))(eslint@9.17.0(jiti@2.6.1)): 23278 23556 dependencies: 23279 23557 '@rtsao/scc': 1.1.0 23280 23558 array-includes: 3.1.9 ··· 24708 24986 24709 24987 istanbul-lib-instrument@6.0.3: 24710 24988 dependencies: 24711 - '@babel/core': 7.26.9 24989 + '@babel/core': 7.28.3 24712 24990 '@babel/parser': 7.28.3 24713 24991 '@istanbuljs/schema': 0.1.3 24714 24992 istanbul-lib-coverage: 3.2.2 ··· 24995 25273 dependencies: 24996 25274 readable-stream: 2.3.8 24997 25275 24998 - less-loader@12.2.0(less@4.2.2)(webpack@5.98.0): 25276 + less-loader@12.2.0(less@4.2.2)(webpack@5.98.0(esbuild@0.25.0)): 24999 25277 dependencies: 25000 25278 less: 4.2.2 25001 25279 optionalDependencies: 25002 25280 webpack: 5.98.0(esbuild@0.25.0) 25281 + 25282 + less-loader@12.2.0(less@4.2.2)(webpack@5.98.0): 25283 + dependencies: 25284 + less: 4.2.2 25285 + optionalDependencies: 25286 + webpack: 5.98.0(esbuild@0.25.4) 25003 25287 25004 25288 less@4.2.2: 25005 25289 dependencies: ··· 25020 25304 prelude-ls: 1.2.1 25021 25305 type-check: 0.4.0 25022 25306 25023 - license-webpack-plugin@4.0.2(webpack@5.98.0): 25307 + license-webpack-plugin@4.0.2(webpack@5.98.0(esbuild@0.25.0)): 25024 25308 dependencies: 25025 25309 webpack-sources: 3.3.3 25026 25310 optionalDependencies: 25027 25311 webpack: 5.98.0(esbuild@0.25.0) 25312 + 25313 + license-webpack-plugin@4.0.2(webpack@5.98.0): 25314 + dependencies: 25315 + webpack-sources: 3.3.3 25316 + optionalDependencies: 25317 + webpack: 5.98.0(esbuild@0.25.4) 25028 25318 25029 25319 light-my-request@6.6.0: 25030 25320 dependencies: ··· 25064 25354 get-port-please: 3.2.0 25065 25355 h3: 1.15.4 25066 25356 http-shutdown: 1.2.2 25067 - jiti: 2.5.1 25357 + jiti: 2.6.1 25068 25358 mlly: 1.8.0 25069 25359 node-forge: 1.3.1 25070 25360 pathe: 1.1.2 ··· 25567 25857 25568 25858 mimic-function@5.0.1: {} 25569 25859 25570 - mini-css-extract-plugin@2.9.2(webpack@5.98.0): 25860 + mini-css-extract-plugin@2.9.2(webpack@5.98.0(esbuild@0.25.0)): 25571 25861 dependencies: 25572 25862 schema-utils: 4.3.2 25573 25863 tapable: 2.2.3 25574 25864 webpack: 5.98.0(esbuild@0.25.0) 25865 + 25866 + mini-css-extract-plugin@2.9.2(webpack@5.98.0): 25867 + dependencies: 25868 + schema-utils: 4.3.2 25869 + tapable: 2.2.3 25870 + webpack: 5.98.0(esbuild@0.25.4) 25575 25871 25576 25872 minimalistic-assert@1.0.1: {} 25577 25873 ··· 25824 26120 hookable: 5.5.3 25825 26121 httpxy: 0.1.7 25826 26122 ioredis: 5.7.0 25827 - jiti: 2.5.1 26123 + jiti: 2.6.1 25828 26124 klona: 2.0.6 25829 26125 knitwork: 1.2.0 25830 26126 listhen: 1.9.0 25831 - magic-string: 0.30.18 26127 + magic-string: 0.30.19 25832 26128 magicast: 0.3.5 25833 26129 mime: 4.0.7 25834 26130 mlly: 1.8.0 ··· 26017 26313 npm-run-all2@6.2.0: 26018 26314 dependencies: 26019 26315 ansi-styles: 6.2.1 26020 - cross-spawn: 7.0.5 26316 + cross-spawn: 7.0.6 26021 26317 memorystream: 0.3.1 26022 26318 minimatch: 9.0.5 26023 26319 pidtree: 0.6.0 ··· 26055 26351 '@unhead/shared': 1.11.20 26056 26352 '@unhead/ssr': 1.11.20 26057 26353 '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.9.3)) 26058 - '@vue/shared': 3.5.20 26354 + '@vue/shared': 3.5.21 26059 26355 acorn: 8.14.0 26060 26356 c12: 2.0.1(magicast@0.3.5) 26061 26357 chokidar: 4.0.3 ··· 26074 26370 hookable: 5.5.3 26075 26371 ignore: 6.0.2 26076 26372 impound: 0.2.2(rollup@3.29.5) 26077 - jiti: 2.5.1 26373 + jiti: 2.6.1 26078 26374 klona: 2.0.6 26079 26375 knitwork: 1.2.0 26080 - magic-string: 0.30.18 26376 + magic-string: 0.30.19 26081 26377 mlly: 1.8.0 26082 26378 nanotar: 0.1.1 26083 26379 nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13)(rolldown@1.0.0-beta.44) ··· 26176 26472 '@unhead/shared': 1.11.20 26177 26473 '@unhead/ssr': 1.11.20 26178 26474 '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.9.3)) 26179 - '@vue/shared': 3.5.20 26475 + '@vue/shared': 3.5.21 26476 + acorn: 8.14.0 26477 + c12: 2.0.1(magicast@0.3.5) 26478 + chokidar: 4.0.3 26479 + compatx: 0.1.8 26480 + consola: 3.4.2 26481 + cookie-es: 1.2.2 26482 + defu: 6.1.4 26483 + destr: 2.0.5 26484 + devalue: 5.3.2 26485 + errx: 0.1.0 26486 + esbuild: 0.24.2 26487 + escape-string-regexp: 5.0.0 26488 + estree-walker: 3.0.3 26489 + globby: 14.1.0 26490 + h3: 1.15.4 26491 + hookable: 5.5.3 26492 + ignore: 6.0.2 26493 + impound: 0.2.2(rollup@4.50.0) 26494 + jiti: 2.6.1 26495 + klona: 2.0.6 26496 + knitwork: 1.2.0 26497 + magic-string: 0.30.19 26498 + mlly: 1.8.0 26499 + nanotar: 0.1.1 26500 + nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13)(rolldown@1.0.0-beta.44) 26501 + nuxi: 3.28.0 26502 + nypm: 0.3.12 26503 + ofetch: 1.4.1 26504 + ohash: 1.1.6 26505 + pathe: 1.1.2 26506 + perfect-debounce: 1.0.0 26507 + pkg-types: 1.3.1 26508 + radix3: 1.1.2 26509 + scule: 1.3.0 26510 + semver: 7.7.2 26511 + std-env: 3.9.0 26512 + strip-literal: 2.1.1 26513 + tinyglobby: 0.2.10 26514 + ufo: 1.6.1 26515 + ultrahtml: 1.6.0 26516 + uncrypto: 0.1.3 26517 + unctx: 2.4.1 26518 + unenv: 1.10.0 26519 + unhead: 1.11.20 26520 + unimport: 3.14.6(rollup@4.50.0) 26521 + unplugin: 1.16.1 26522 + unplugin-vue-router: 0.10.9(rollup@4.50.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.9.3)))(vue@3.5.13(typescript@5.9.3)) 26523 + unstorage: 1.17.0(@netlify/blobs@9.1.2)(db0@0.3.2)(ioredis@5.7.0) 26524 + untyped: 1.5.2 26525 + vue: 3.5.13(typescript@5.9.3) 26526 + vue-bundle-renderer: 2.1.2 26527 + vue-devtools-stub: 0.1.0 26528 + vue-router: 4.5.0(vue@3.5.13(typescript@5.9.3)) 26529 + optionalDependencies: 26530 + '@parcel/watcher': 2.5.1 26531 + '@types/node': 22.10.5 26532 + transitivePeerDependencies: 26533 + - '@azure/app-configuration' 26534 + - '@azure/cosmos' 26535 + - '@azure/data-tables' 26536 + - '@azure/identity' 26537 + - '@azure/keyvault-secrets' 26538 + - '@azure/storage-blob' 26539 + - '@biomejs/biome' 26540 + - '@capacitor/preferences' 26541 + - '@deno/kv' 26542 + - '@electric-sql/pglite' 26543 + - '@libsql/client' 26544 + - '@netlify/blobs' 26545 + - '@planetscale/database' 26546 + - '@upstash/redis' 26547 + - '@vercel/blob' 26548 + - '@vercel/functions' 26549 + - '@vercel/kv' 26550 + - aws4fetch 26551 + - better-sqlite3 26552 + - bufferutil 26553 + - db0 26554 + - drizzle-orm 26555 + - encoding 26556 + - eslint 26557 + - idb-keyval 26558 + - ioredis 26559 + - less 26560 + - lightningcss 26561 + - magicast 26562 + - meow 26563 + - mysql2 26564 + - optionator 26565 + - rolldown 26566 + - rollup 26567 + - sass 26568 + - sass-embedded 26569 + - sqlite3 26570 + - stylelint 26571 + - stylus 26572 + - sugarss 26573 + - supports-color 26574 + - terser 26575 + - typescript 26576 + - uploadthing 26577 + - utf-8-validate 26578 + - vite 26579 + - vls 26580 + - vti 26581 + - vue-tsc 26582 + - xml2js 26583 + 26584 + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3): 26585 + dependencies: 26586 + '@nuxt/devalue': 2.0.2 26587 + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vue@3.5.13(typescript@5.9.3)) 26588 + '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26589 + '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26590 + '@nuxt/telemetry': 2.6.6(magicast@0.3.5) 26591 + '@nuxt/vite-builder': 3.14.1592(@types/node@22.10.5)(eslint@9.17.0(jiti@2.6.1))(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vue@3.5.13(typescript@5.9.3)) 26592 + '@unhead/dom': 1.11.20 26593 + '@unhead/shared': 1.11.20 26594 + '@unhead/ssr': 1.11.20 26595 + '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.9.3)) 26596 + '@vue/shared': 3.5.21 26180 26597 acorn: 8.14.0 26181 26598 c12: 2.0.1(magicast@0.3.5) 26182 26599 chokidar: 4.0.3 ··· 26195 26612 hookable: 5.5.3 26196 26613 ignore: 6.0.2 26197 26614 impound: 0.2.2(rollup@4.50.0) 26198 - jiti: 2.5.1 26615 + jiti: 2.6.1 26199 26616 klona: 2.0.6 26200 26617 knitwork: 1.2.0 26201 - magic-string: 0.30.18 26618 + magic-string: 0.30.19 26202 26619 mlly: 1.8.0 26203 26620 nanotar: 0.1.1 26204 26621 nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13)(rolldown@1.0.0-beta.44) ··· 26297 26714 '@unhead/shared': 1.11.20 26298 26715 '@unhead/ssr': 1.11.20 26299 26716 '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.9.3)) 26300 - '@vue/shared': 3.5.20 26717 + '@vue/shared': 3.5.21 26301 26718 acorn: 8.14.0 26302 26719 c12: 2.0.1(magicast@0.3.5) 26303 26720 chokidar: 4.0.3 ··· 26316 26733 hookable: 5.5.3 26317 26734 ignore: 6.0.2 26318 26735 impound: 0.2.2(rollup@4.50.0) 26319 - jiti: 2.5.1 26736 + jiti: 2.6.1 26320 26737 klona: 2.0.6 26321 26738 knitwork: 1.2.0 26322 - magic-string: 0.30.18 26739 + magic-string: 0.30.19 26323 26740 mlly: 1.8.0 26324 26741 nanotar: 0.1.1 26325 26742 nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13)(rolldown@1.0.0-beta.44) ··· 26406 26823 - vue-tsc 26407 26824 - xml2js 26408 26825 26409 - nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 26826 + nuxt@3.14.1592(@netlify/blobs@9.1.2)(@parcel/watcher@2.5.1)(@types/node@22.10.5)(db0@0.3.2)(encoding@0.1.13)(eslint@9.17.0(jiti@2.6.1))(ioredis@5.7.0)(less@4.2.2)(magicast@0.3.5)(optionator@0.9.4)(rolldown@1.0.0-beta.44)(rollup@4.50.0)(sass@1.85.0)(terser@5.43.1)(typescript@5.9.3)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)): 26410 26827 dependencies: 26411 26828 '@nuxt/devalue': 2.0.2 26412 - '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0))(vue@3.5.13(typescript@5.9.3)) 26829 + '@nuxt/devtools': 1.7.0(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1))(vue@3.5.13(typescript@5.9.3)) 26413 26830 '@nuxt/kit': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26414 26831 '@nuxt/schema': 3.14.1592(magicast@0.3.5)(rollup@4.50.0) 26415 26832 '@nuxt/telemetry': 2.6.6(magicast@0.3.5) ··· 26418 26835 '@unhead/shared': 1.11.20 26419 26836 '@unhead/ssr': 1.11.20 26420 26837 '@unhead/vue': 1.11.20(vue@3.5.13(typescript@5.9.3)) 26421 - '@vue/shared': 3.5.20 26838 + '@vue/shared': 3.5.21 26422 26839 acorn: 8.14.0 26423 26840 c12: 2.0.1(magicast@0.3.5) 26424 26841 chokidar: 4.0.3 ··· 26437 26854 hookable: 5.5.3 26438 26855 ignore: 6.0.2 26439 26856 impound: 0.2.2(rollup@4.50.0) 26440 - jiti: 2.5.1 26857 + jiti: 2.6.1 26441 26858 klona: 2.0.6 26442 26859 knitwork: 1.2.0 26443 - magic-string: 0.30.18 26860 + magic-string: 0.30.19 26444 26861 mlly: 1.8.0 26445 26862 nanotar: 0.1.1 26446 26863 nitropack: 2.12.4(@netlify/blobs@9.1.2)(encoding@0.1.13)(rolldown@1.0.0-beta.44) ··· 27047 27464 ts-node: 10.9.2(@types/node@22.10.5)(typescript@5.9.3) 27048 27465 optional: true 27049 27466 27050 - postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0(esbuild@0.25.0)): 27467 + postcss-loader@8.1.1(postcss@8.5.2)(typescript@5.8.3)(webpack@5.98.0): 27051 27468 dependencies: 27052 27469 cosmiconfig: 9.0.0(typescript@5.8.3) 27053 27470 jiti: 1.21.7 ··· 27065 27482 postcss: 8.5.2 27066 27483 semver: 7.7.2 27067 27484 optionalDependencies: 27068 - webpack: 5.98.0(esbuild@0.25.0) 27485 + webpack: 5.98.0(esbuild@0.25.4) 27069 27486 transitivePeerDependencies: 27070 27487 - typescript 27071 27488 ··· 27885 28302 27886 28303 safer-buffer@2.1.2: {} 27887 28304 28305 + sass-loader@16.0.5(sass@1.85.0)(webpack@5.98.0(esbuild@0.25.0)): 28306 + dependencies: 28307 + neo-async: 2.6.2 28308 + optionalDependencies: 28309 + sass: 1.85.0 28310 + webpack: 5.98.0(esbuild@0.25.0) 28311 + 27888 28312 sass-loader@16.0.5(sass@1.85.0)(webpack@5.98.0): 27889 28313 dependencies: 27890 28314 neo-async: 2.6.2 27891 28315 optionalDependencies: 27892 28316 sass: 1.85.0 27893 - webpack: 5.98.0(esbuild@0.25.0) 28317 + webpack: 5.98.0(esbuild@0.25.4) 27894 28318 27895 28319 sass@1.85.0: 27896 28320 dependencies: ··· 28252 28676 atomic-sleep: 1.0.0 28253 28677 28254 28678 source-map-js@1.2.1: {} 28679 + 28680 + source-map-loader@5.0.0(webpack@5.98.0(esbuild@0.25.0)): 28681 + dependencies: 28682 + iconv-lite: 0.6.3 28683 + source-map-js: 1.2.1 28684 + webpack: 5.98.0(esbuild@0.25.0) 28255 28685 28256 28686 source-map-loader@5.0.0(webpack@5.98.0): 28257 28687 dependencies: 28258 28688 iconv-lite: 0.6.3 28259 28689 source-map-js: 1.2.1 28260 - webpack: 5.98.0(esbuild@0.25.0) 28690 + webpack: 5.98.0(esbuild@0.25.4) 28261 28691 28262 28692 source-map-support@0.5.21: 28263 28693 dependencies: ··· 28706 29136 schema-utils: 4.3.2 28707 29137 serialize-javascript: 6.0.2 28708 29138 terser: 5.43.1 28709 - webpack: 5.98.0(esbuild@0.25.0) 29139 + webpack: 5.98.0(esbuild@0.25.4) 28710 29140 optionalDependencies: 28711 29141 esbuild: 0.25.4 28712 29142 ··· 29165 29595 estree-walker: 3.0.3 29166 29596 fast-glob: 3.3.3 29167 29597 local-pkg: 1.1.2 29168 - magic-string: 0.30.18 29598 + magic-string: 0.30.19 29169 29599 mlly: 1.8.0 29170 29600 pathe: 2.0.3 29171 29601 picomatch: 4.0.3 ··· 29184 29614 estree-walker: 3.0.3 29185 29615 fast-glob: 3.3.3 29186 29616 local-pkg: 1.1.2 29187 - magic-string: 0.30.18 29617 + magic-string: 0.30.19 29188 29618 mlly: 1.8.0 29189 29619 pathe: 2.0.3 29190 29620 picomatch: 4.0.3 ··· 29290 29720 29291 29721 unplugin-vue-router@0.10.9(rollup@3.29.5)(vue-router@4.5.0(vue@3.5.13(typescript@5.9.3)))(vue@3.5.13(typescript@5.9.3)): 29292 29722 dependencies: 29293 - '@babel/types': 7.28.2 29723 + '@babel/types': 7.28.4 29294 29724 '@rollup/pluginutils': 5.2.0(rollup@3.29.5) 29295 29725 '@vue-macros/common': 1.16.1(vue@3.5.13(typescript@5.9.3)) 29296 29726 ast-walker-scope: 0.6.2 ··· 29298 29728 fast-glob: 3.3.3 29299 29729 json5: 2.2.3 29300 29730 local-pkg: 0.5.1 29301 - magic-string: 0.30.18 29731 + magic-string: 0.30.19 29302 29732 mlly: 1.8.0 29303 29733 pathe: 1.1.2 29304 29734 scule: 1.3.0 ··· 29312 29742 29313 29743 unplugin-vue-router@0.10.9(rollup@4.50.0)(vue-router@4.5.0(vue@3.5.13(typescript@5.9.3)))(vue@3.5.13(typescript@5.9.3)): 29314 29744 dependencies: 29315 - '@babel/types': 7.28.2 29745 + '@babel/types': 7.28.4 29316 29746 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) 29317 29747 '@vue-macros/common': 1.16.1(vue@3.5.13(typescript@5.9.3)) 29318 29748 ast-walker-scope: 0.6.2 ··· 29320 29750 fast-glob: 3.3.3 29321 29751 json5: 2.2.3 29322 29752 local-pkg: 0.5.1 29323 - magic-string: 0.30.18 29753 + magic-string: 0.30.19 29324 29754 mlly: 1.8.0 29325 29755 pathe: 1.1.2 29326 29756 scule: 1.3.0 ··· 29517 29947 dependencies: 29518 29948 vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.1) 29519 29949 29520 - vite-hot-client@0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 29950 + vite-hot-client@0.2.4(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)): 29521 29951 dependencies: 29522 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 29952 + vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 29523 29953 29524 29954 vite-hot-client@2.1.0(vite@7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)): 29525 29955 dependencies: ··· 29657 30087 open: 10.2.0 29658 30088 perfect-debounce: 1.0.0 29659 30089 picocolors: 1.1.1 29660 - sirv: 3.0.1 30090 + sirv: 3.0.2 29661 30091 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 29662 30092 optionalDependencies: 29663 30093 '@nuxt/kit': 3.15.4(magicast@0.3.5) ··· 29675 30105 open: 10.2.0 29676 30106 perfect-debounce: 1.0.0 29677 30107 picocolors: 1.1.1 29678 - sirv: 3.0.1 30108 + sirv: 3.0.2 29679 30109 vite: 7.1.2(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 29680 30110 optionalDependencies: 29681 30111 '@nuxt/kit': 3.15.4(magicast@0.3.5) ··· 29693 30123 open: 10.2.0 29694 30124 perfect-debounce: 1.0.0 29695 30125 picocolors: 1.1.1 29696 - sirv: 3.0.1 30126 + sirv: 3.0.2 29697 30127 vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.39.0)(yaml@2.8.1) 29698 30128 optionalDependencies: 29699 30129 '@nuxt/kit': 3.15.4(magicast@0.3.5) ··· 29701 30131 - rollup 29702 30132 - supports-color 29703 30133 29704 - vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 30134 + vite-plugin-inspect@0.8.9(@nuxt/kit@3.15.4(magicast@0.3.5))(rollup@4.50.0)(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)): 29705 30135 dependencies: 29706 30136 '@antfu/utils': 0.7.10 29707 30137 '@rollup/pluginutils': 5.2.0(rollup@4.50.0) ··· 29711 30141 open: 10.2.0 29712 30142 perfect-debounce: 1.0.0 29713 30143 picocolors: 1.1.1 29714 - sirv: 3.0.1 29715 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 30144 + sirv: 3.0.2 30145 + vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 29716 30146 optionalDependencies: 29717 30147 '@nuxt/kit': 3.15.4(magicast@0.3.5) 29718 30148 transitivePeerDependencies: ··· 29779 30209 transitivePeerDependencies: 29780 30210 - supports-color 29781 30211 29782 - vite-plugin-vue-inspector@5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0)): 30212 + vite-plugin-vue-inspector@5.3.2(vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1)): 29783 30213 dependencies: 29784 30214 '@babel/core': 7.28.3 29785 30215 '@babel/plugin-proposal-decorators': 7.28.0(@babel/core@7.28.3) ··· 29790 30220 '@vue/compiler-dom': 3.5.21 29791 30221 kolorist: 1.8.0 29792 30222 magic-string: 0.30.18 29793 - vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0) 30223 + vite: 7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1) 29794 30224 transitivePeerDependencies: 29795 30225 - supports-color 29796 30226 ··· 29913 30343 sass: 1.85.0 29914 30344 terser: 5.39.0 29915 30345 yaml: 2.8.1 29916 - 29917 - vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.0): 29918 - dependencies: 29919 - esbuild: 0.25.9 29920 - fdir: 6.5.0(picomatch@4.0.3) 29921 - picomatch: 4.0.3 29922 - postcss: 8.5.6 29923 - rollup: 4.50.0 29924 - tinyglobby: 0.2.15 29925 - optionalDependencies: 29926 - '@types/node': 22.10.5 29927 - fsevents: 2.3.3 29928 - jiti: 2.6.1 29929 - less: 4.2.2 29930 - sass: 1.85.0 29931 - terser: 5.43.1 29932 - yaml: 2.8.0 29933 30346 29934 30347 vite@7.1.5(@types/node@22.10.5)(jiti@2.6.1)(less@4.2.2)(sass@1.85.0)(terser@5.43.1)(yaml@2.8.1): 29935 30348 dependencies: ··· 30277 30690 optionalDependencies: 30278 30691 webpack: 5.98.0(esbuild@0.25.0) 30279 30692 30693 + webpack-dev-middleware@7.4.2(webpack@5.98.0): 30694 + dependencies: 30695 + colorette: 2.0.20 30696 + memfs: 4.38.2 30697 + mime-types: 2.1.35 30698 + on-finished: 2.4.1 30699 + range-parser: 1.2.1 30700 + schema-utils: 4.3.2 30701 + optionalDependencies: 30702 + webpack: 5.98.0(esbuild@0.25.4) 30703 + 30280 30704 webpack-dev-server@5.2.0(webpack@5.98.0(esbuild@0.25.0)): 30281 30705 dependencies: 30282 30706 '@types/bonjour': 3.5.13 ··· 30314 30738 - supports-color 30315 30739 - utf-8-validate 30316 30740 30741 + webpack-dev-server@5.2.0(webpack@5.98.0): 30742 + dependencies: 30743 + '@types/bonjour': 3.5.13 30744 + '@types/connect-history-api-fallback': 1.5.4 30745 + '@types/express': 4.17.21 30746 + '@types/serve-index': 1.9.4 30747 + '@types/serve-static': 1.15.8 30748 + '@types/sockjs': 0.3.36 30749 + '@types/ws': 8.18.1 30750 + ansi-html-community: 0.0.8 30751 + bonjour-service: 1.3.0 30752 + chokidar: 3.6.0 30753 + colorette: 2.0.20 30754 + compression: 1.8.1 30755 + connect-history-api-fallback: 2.0.0 30756 + express: 4.21.2 30757 + graceful-fs: 4.2.11 30758 + http-proxy-middleware: 2.0.9(@types/express@4.17.21) 30759 + ipaddr.js: 2.2.0 30760 + launch-editor: 2.11.1 30761 + open: 10.2.0 30762 + p-retry: 6.2.1 30763 + schema-utils: 4.3.2 30764 + selfsigned: 2.4.1 30765 + serve-index: 1.9.1 30766 + sockjs: 0.3.24 30767 + spdy: 4.0.2 30768 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 30769 + ws: 8.18.3 30770 + optionalDependencies: 30771 + webpack: 5.98.0(esbuild@0.25.0) 30772 + transitivePeerDependencies: 30773 + - bufferutil 30774 + - debug 30775 + - supports-color 30776 + - utf-8-validate 30777 + 30317 30778 webpack-dev-server@5.2.2(webpack@5.98.0): 30318 30779 dependencies: 30319 30780 '@types/bonjour': 3.5.13 ··· 30342 30803 serve-index: 1.9.1 30343 30804 sockjs: 0.3.24 30344 30805 spdy: 4.0.2 30345 - webpack-dev-middleware: 7.4.2(webpack@5.98.0(esbuild@0.25.0)) 30806 + webpack-dev-middleware: 7.4.2(webpack@5.98.0) 30346 30807 ws: 8.18.3 30347 30808 optionalDependencies: 30348 - webpack: 5.98.0(esbuild@0.25.0) 30809 + webpack: 5.98.0(esbuild@0.25.4) 30349 30810 transitivePeerDependencies: 30350 30811 - bufferutil 30351 30812 - debug ··· 30360 30821 30361 30822 webpack-sources@3.3.3: {} 30362 30823 30824 + webpack-subresource-integrity@5.1.0(webpack@5.98.0(esbuild@0.25.0)): 30825 + dependencies: 30826 + typed-assert: 1.0.9 30827 + webpack: 5.98.0(esbuild@0.25.0) 30828 + 30363 30829 webpack-subresource-integrity@5.1.0(webpack@5.98.0): 30364 30830 dependencies: 30365 30831 typed-assert: 1.0.9 30366 - webpack: 5.98.0(esbuild@0.25.0) 30832 + webpack: 5.98.0(esbuild@0.25.4) 30367 30833 30368 30834 webpack-virtual-modules@0.6.2: {} 30369 30835
+1
pnpm-workspace.yaml
··· 1 1 packages: 2 2 - docs 3 + - dev/** 3 4 - examples/**/* 4 5 - packages/**/* 5 6