@hey-api/openapi-ts 0.72.2 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -12
- package/dist/chunk-QUDCWAFW.js +39 -0
- package/dist/chunk-QUDCWAFW.js.map +1 -0
- package/dist/clients/axios/client.ts +111 -0
- package/dist/clients/axios/index.ts +21 -0
- package/dist/clients/axios/types.ts +178 -0
- package/dist/clients/axios/utils.ts +286 -0
- package/dist/clients/core/auth.ts +40 -0
- package/dist/clients/core/bodySerializer.ts +84 -0
- package/dist/clients/core/params.ts +141 -0
- package/dist/clients/core/pathSerializer.ts +179 -0
- package/dist/clients/core/types.ts +98 -0
- package/dist/clients/fetch/client.ts +181 -0
- package/dist/clients/fetch/index.ts +22 -0
- package/dist/clients/fetch/types.ts +215 -0
- package/dist/clients/fetch/utils.ts +415 -0
- package/dist/clients/next/client.ts +163 -0
- package/dist/clients/next/index.ts +21 -0
- package/dist/clients/next/types.ts +166 -0
- package/dist/clients/next/utils.ts +404 -0
- package/dist/clients/nuxt/client.ts +145 -0
- package/dist/clients/nuxt/index.ts +22 -0
- package/dist/clients/nuxt/types.ts +192 -0
- package/dist/clients/nuxt/utils.ts +358 -0
- package/dist/index.cjs +63 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +10 -10
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/{types.d-DtkupL5A.d.cts → types.d-CAqtwzfv.d.cts} +16 -25
- package/dist/{types.d-DtkupL5A.d.ts → types.d-CAqtwzfv.d.ts} +16 -25
- package/package.json +4 -3
- package/dist/chunk-LC3ZVK3Y.js +0 -39
- package/dist/chunk-LC3ZVK3Y.js.map +0 -1
package/dist/internal.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
2
|
-
import { e as Config, I as IR, W as WatchValues } from './types.d-
|
|
3
|
-
export { i as initConfigs } from './types.d-
|
|
2
|
+
import { e as Config, I as IR, W as WatchValues } from './types.d-CAqtwzfv.cjs';
|
|
3
|
+
export { i as initConfigs } from './types.d-CAqtwzfv.cjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'typescript';
|
|
6
6
|
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
2
|
-
import { e as Config, I as IR, W as WatchValues } from './types.d-
|
|
3
|
-
export { i as initConfigs } from './types.d-
|
|
2
|
+
import { e as Config, I as IR, W as WatchValues } from './types.d-CAqtwzfv.js';
|
|
3
|
+
export { i as initConfigs } from './types.d-CAqtwzfv.js';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'typescript';
|
|
6
6
|
|
package/dist/internal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {createRequire}from'module';export{r as getSpec,
|
|
1
|
+
import {createRequire}from'module';export{r as getSpec,G as initConfigs,B as parseOpenApiSpec}from'./chunk-QUDCWAFW.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
|
|
2
2
|
//# sourceMappingURL=internal.js.map
|
|
@@ -6476,10 +6476,11 @@ type PluginTag = 'client' | 'transformer' | 'validator';
|
|
|
6476
6476
|
|
|
6477
6477
|
interface PluginContext {
|
|
6478
6478
|
ensureDependency: (name: PluginNames | true) => void;
|
|
6479
|
-
pluginByTag: (
|
|
6480
|
-
|
|
6481
|
-
errorMessage?: string
|
|
6482
|
-
|
|
6479
|
+
pluginByTag: (props: {
|
|
6480
|
+
defaultPlugin?: AnyPluginName;
|
|
6481
|
+
errorMessage?: string;
|
|
6482
|
+
tag: PluginTag;
|
|
6483
|
+
}) => AnyPluginName | undefined;
|
|
6483
6484
|
}
|
|
6484
6485
|
|
|
6485
6486
|
interface BaseConfig {
|
|
@@ -6624,25 +6625,12 @@ declare namespace Client {
|
|
|
6624
6625
|
*/
|
|
6625
6626
|
baseUrl?: string | number | boolean;
|
|
6626
6627
|
/**
|
|
6627
|
-
* Bundle the client module?
|
|
6628
|
-
*
|
|
6629
|
-
* from the client package and bundled with the rest of the generated output.
|
|
6630
|
-
* This is useful if you're repackaging the output, publishing it to other
|
|
6631
|
-
* users, and you don't want them to install any dependencies.
|
|
6628
|
+
* Bundle the client module? When `true`, the client module will be copied
|
|
6629
|
+
* from the client plugin and bundled with the generated output.
|
|
6632
6630
|
*
|
|
6633
|
-
* @default
|
|
6631
|
+
* @default true
|
|
6634
6632
|
*/
|
|
6635
6633
|
bundle?: boolean;
|
|
6636
|
-
/**
|
|
6637
|
-
* **This is an experimental feature.**
|
|
6638
|
-
*
|
|
6639
|
-
* When `bundle` is set to `true`, you can optionally set this option
|
|
6640
|
-
* to `true` to bundle the client source code instead of the `dist` folder.
|
|
6641
|
-
* This will copy the TypeScript files instead of CJS/ESM JavaScript files.
|
|
6642
|
-
*
|
|
6643
|
-
* @default false
|
|
6644
|
-
*/
|
|
6645
|
-
bundleSource_EXPERIMENTAL?: boolean;
|
|
6646
6634
|
/**
|
|
6647
6635
|
* Should the exports from the generated files be re-exported in the index
|
|
6648
6636
|
* barrel file?
|
|
@@ -6795,10 +6783,10 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6795
6783
|
* Use an internal client instance to send HTTP requests? This is useful if
|
|
6796
6784
|
* you don't want to manually pass the client to each SDK function.
|
|
6797
6785
|
*
|
|
6798
|
-
*
|
|
6799
|
-
*
|
|
6800
|
-
*
|
|
6801
|
-
*
|
|
6786
|
+
* You can customize the selected client output through its plugin. You can
|
|
6787
|
+
* also set `client` to `true` to automatically choose the client from your
|
|
6788
|
+
* defined plugins. If we can't detect a client plugin when using `true`, we
|
|
6789
|
+
* will default to `@hey-api/client-fetch`.
|
|
6802
6790
|
*
|
|
6803
6791
|
* @default true
|
|
6804
6792
|
*/
|
|
@@ -8359,7 +8347,10 @@ declare const defaultPlugins: readonly ["@hey-api/typescript", "@hey-api/sdk"];
|
|
|
8359
8347
|
/**
|
|
8360
8348
|
* @internal
|
|
8361
8349
|
*/
|
|
8362
|
-
declare const initConfigs: (userConfig: UserConfig | undefined) => Promise<
|
|
8350
|
+
declare const initConfigs: (userConfig: UserConfig | undefined) => Promise<ReadonlyArray<{
|
|
8351
|
+
config: Config;
|
|
8352
|
+
errors: ReadonlyArray<Error>;
|
|
8353
|
+
}>>;
|
|
8363
8354
|
|
|
8364
8355
|
declare namespace LegacyIR {
|
|
8365
8356
|
export type LegacyOperation = Operation;
|
|
@@ -6476,10 +6476,11 @@ type PluginTag = 'client' | 'transformer' | 'validator';
|
|
|
6476
6476
|
|
|
6477
6477
|
interface PluginContext {
|
|
6478
6478
|
ensureDependency: (name: PluginNames | true) => void;
|
|
6479
|
-
pluginByTag: (
|
|
6480
|
-
|
|
6481
|
-
errorMessage?: string
|
|
6482
|
-
|
|
6479
|
+
pluginByTag: (props: {
|
|
6480
|
+
defaultPlugin?: AnyPluginName;
|
|
6481
|
+
errorMessage?: string;
|
|
6482
|
+
tag: PluginTag;
|
|
6483
|
+
}) => AnyPluginName | undefined;
|
|
6483
6484
|
}
|
|
6484
6485
|
|
|
6485
6486
|
interface BaseConfig {
|
|
@@ -6624,25 +6625,12 @@ declare namespace Client {
|
|
|
6624
6625
|
*/
|
|
6625
6626
|
baseUrl?: string | number | boolean;
|
|
6626
6627
|
/**
|
|
6627
|
-
* Bundle the client module?
|
|
6628
|
-
*
|
|
6629
|
-
* from the client package and bundled with the rest of the generated output.
|
|
6630
|
-
* This is useful if you're repackaging the output, publishing it to other
|
|
6631
|
-
* users, and you don't want them to install any dependencies.
|
|
6628
|
+
* Bundle the client module? When `true`, the client module will be copied
|
|
6629
|
+
* from the client plugin and bundled with the generated output.
|
|
6632
6630
|
*
|
|
6633
|
-
* @default
|
|
6631
|
+
* @default true
|
|
6634
6632
|
*/
|
|
6635
6633
|
bundle?: boolean;
|
|
6636
|
-
/**
|
|
6637
|
-
* **This is an experimental feature.**
|
|
6638
|
-
*
|
|
6639
|
-
* When `bundle` is set to `true`, you can optionally set this option
|
|
6640
|
-
* to `true` to bundle the client source code instead of the `dist` folder.
|
|
6641
|
-
* This will copy the TypeScript files instead of CJS/ESM JavaScript files.
|
|
6642
|
-
*
|
|
6643
|
-
* @default false
|
|
6644
|
-
*/
|
|
6645
|
-
bundleSource_EXPERIMENTAL?: boolean;
|
|
6646
6634
|
/**
|
|
6647
6635
|
* Should the exports from the generated files be re-exported in the index
|
|
6648
6636
|
* barrel file?
|
|
@@ -6795,10 +6783,10 @@ interface Config$b extends Plugin.Name<'@hey-api/sdk'> {
|
|
|
6795
6783
|
* Use an internal client instance to send HTTP requests? This is useful if
|
|
6796
6784
|
* you don't want to manually pass the client to each SDK function.
|
|
6797
6785
|
*
|
|
6798
|
-
*
|
|
6799
|
-
*
|
|
6800
|
-
*
|
|
6801
|
-
*
|
|
6786
|
+
* You can customize the selected client output through its plugin. You can
|
|
6787
|
+
* also set `client` to `true` to automatically choose the client from your
|
|
6788
|
+
* defined plugins. If we can't detect a client plugin when using `true`, we
|
|
6789
|
+
* will default to `@hey-api/client-fetch`.
|
|
6802
6790
|
*
|
|
6803
6791
|
* @default true
|
|
6804
6792
|
*/
|
|
@@ -8359,7 +8347,10 @@ declare const defaultPlugins: readonly ["@hey-api/typescript", "@hey-api/sdk"];
|
|
|
8359
8347
|
/**
|
|
8360
8348
|
* @internal
|
|
8361
8349
|
*/
|
|
8362
|
-
declare const initConfigs: (userConfig: UserConfig | undefined) => Promise<
|
|
8350
|
+
declare const initConfigs: (userConfig: UserConfig | undefined) => Promise<ReadonlyArray<{
|
|
8351
|
+
config: Config;
|
|
8352
|
+
errors: ReadonlyArray<Error>;
|
|
8353
|
+
}>>;
|
|
8363
8354
|
|
|
8364
8355
|
declare namespace LegacyIR {
|
|
8365
8356
|
export type LegacyOperation = Operation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hey-api/openapi-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.",
|
|
5
5
|
"homepage": "https://heyapi.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -96,13 +96,14 @@
|
|
|
96
96
|
"express": "4.21.0",
|
|
97
97
|
"glob": "10.4.3",
|
|
98
98
|
"node-fetch": "3.3.2",
|
|
99
|
+
"nuxt": "3.14.1592",
|
|
99
100
|
"prettier": "3.4.2",
|
|
100
101
|
"ts-node": "10.9.2",
|
|
101
102
|
"tslib": "2.8.1",
|
|
102
103
|
"typescript": "5.8.3",
|
|
104
|
+
"vue": "3.5.13",
|
|
103
105
|
"yaml": "2.8.0",
|
|
104
|
-
"@config/vite-base": "0.0.1"
|
|
105
|
-
"@hey-api/client-core": "0.2.1"
|
|
106
|
+
"@config/vite-base": "0.0.1"
|
|
106
107
|
},
|
|
107
108
|
"scripts": {
|
|
108
109
|
"build": "tsup && pnpm check-exports",
|