@hey-api/openapi-ts 0.54.0 → 0.54.2
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/dist/index.cjs +59 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -17
- package/dist/index.d.ts +55 -17
- package/dist/index.js +55 -55
- package/dist/index.js.map +1 -1
- package/package.json +16 -15
package/dist/index.d.cts
CHANGED
|
@@ -3,6 +3,7 @@ type PluginNames =
|
|
|
3
3
|
| '@hey-api/services'
|
|
4
4
|
| '@hey-api/transformers'
|
|
5
5
|
| '@hey-api/types'
|
|
6
|
+
| '@tanstack/angular-query-experimental'
|
|
6
7
|
| '@tanstack/react-query'
|
|
7
8
|
| '@tanstack/solid-query'
|
|
8
9
|
| '@tanstack/svelte-query'
|
|
@@ -427,7 +428,7 @@ interface OpenApiV3_1_0 {
|
|
|
427
428
|
/**
|
|
428
429
|
* An element to hold various schemas for the document.
|
|
429
430
|
*/
|
|
430
|
-
components?: ComponentsObject;
|
|
431
|
+
components?: ComponentsObject$1;
|
|
431
432
|
/**
|
|
432
433
|
* Additional external documentation.
|
|
433
434
|
*/
|
|
@@ -443,7 +444,7 @@ interface OpenApiV3_1_0 {
|
|
|
443
444
|
/**
|
|
444
445
|
* **REQUIRED**. This string MUST be the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#versions version number} of the OpenAPI Specification that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#infoVersion `info.version`} string.
|
|
445
446
|
*/
|
|
446
|
-
openapi: '3.1.0';
|
|
447
|
+
openapi: '3.1.0' | '3.1.1';
|
|
447
448
|
/**
|
|
448
449
|
* The available paths and operations for the API.
|
|
449
450
|
*/
|
|
@@ -643,7 +644,7 @@ interface CallbackObject {
|
|
|
643
644
|
* read:pets: read your pets
|
|
644
645
|
* ```
|
|
645
646
|
*/
|
|
646
|
-
interface ComponentsObject {
|
|
647
|
+
interface ComponentsObject$1 {
|
|
647
648
|
/**
|
|
648
649
|
* An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.
|
|
649
650
|
*/
|
|
@@ -2507,7 +2508,7 @@ interface XMLObject {
|
|
|
2507
2508
|
wrapped?: boolean;
|
|
2508
2509
|
}
|
|
2509
2510
|
|
|
2510
|
-
interface Config$
|
|
2511
|
+
interface Config$8 extends PluginName<'@hey-api/schemas'> {
|
|
2511
2512
|
/**
|
|
2512
2513
|
* Customise the schema name. By default, `{{name}}Schema` is used. `name` is a
|
|
2513
2514
|
* valid JavaScript/TypeScript identifier, e.g. if your schema name is
|
|
@@ -2648,7 +2649,7 @@ interface IRSchemaObject
|
|
|
2648
2649
|
| 'void';
|
|
2649
2650
|
}
|
|
2650
2651
|
|
|
2651
|
-
interface Config$
|
|
2652
|
+
interface Config$7 extends PluginName<'@hey-api/services'> {
|
|
2652
2653
|
/**
|
|
2653
2654
|
* Group operation methods into service classes? When enabled, you can
|
|
2654
2655
|
* select which classes to export with `services.include` and/or
|
|
@@ -2705,7 +2706,7 @@ interface Config$6 extends PluginName<'@hey-api/services'> {
|
|
|
2705
2706
|
serviceNameBuilder?: string;
|
|
2706
2707
|
}
|
|
2707
2708
|
|
|
2708
|
-
interface Config$
|
|
2709
|
+
interface Config$6 extends PluginName<'@hey-api/transformers'> {
|
|
2709
2710
|
/**
|
|
2710
2711
|
* Convert date strings into Date objects?
|
|
2711
2712
|
* @default false
|
|
@@ -2718,7 +2719,7 @@ interface Config$5 extends PluginName<'@hey-api/transformers'> {
|
|
|
2718
2719
|
output?: string;
|
|
2719
2720
|
}
|
|
2720
2721
|
|
|
2721
|
-
interface Config$
|
|
2722
|
+
interface Config$5 extends PluginName<'@hey-api/types'> {
|
|
2722
2723
|
/**
|
|
2723
2724
|
* Generate enum definitions?
|
|
2724
2725
|
* @default false
|
|
@@ -2746,6 +2747,31 @@ interface Config$4 extends PluginName<'@hey-api/types'> {
|
|
|
2746
2747
|
tree?: boolean;
|
|
2747
2748
|
}
|
|
2748
2749
|
|
|
2750
|
+
interface Config$4
|
|
2751
|
+
extends PluginName<'@tanstack/angular-query-experimental'> {
|
|
2752
|
+
/**
|
|
2753
|
+
* Generate {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
2754
|
+
* @default true
|
|
2755
|
+
*/
|
|
2756
|
+
infiniteQueryOptions?: boolean;
|
|
2757
|
+
/**
|
|
2758
|
+
* Generate {@link https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation `useMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
|
|
2759
|
+
* @default true
|
|
2760
|
+
*/
|
|
2761
|
+
mutationOptions?: boolean;
|
|
2762
|
+
/**
|
|
2763
|
+
* Name of the generated file.
|
|
2764
|
+
* @default '@tanstack/angular-query-experimental'
|
|
2765
|
+
*/
|
|
2766
|
+
output?: string;
|
|
2767
|
+
/**
|
|
2768
|
+
* Generate {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions `queryOptions()`} helpers?
|
|
2769
|
+
* These will be generated from all requests.
|
|
2770
|
+
* @default true
|
|
2771
|
+
*/
|
|
2772
|
+
queryOptions?: boolean;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2749
2775
|
interface Config$3 extends PluginName<'@tanstack/react-query'> {
|
|
2750
2776
|
/**
|
|
2751
2777
|
* Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
@@ -2845,7 +2871,7 @@ interface Config extends PluginName<'@tanstack/vue-query'> {
|
|
|
2845
2871
|
/**
|
|
2846
2872
|
* User-facing plugin types.
|
|
2847
2873
|
*/
|
|
2848
|
-
type UserPlugins = UserConfig$1<Config$7> | UserConfig$1<Config$6> | UserConfig$1<Config$5> | UserConfig$1<Config$4> | UserConfig$1<Config$3> | UserConfig$1<Config$2> | UserConfig$1<Config$1> | UserConfig$1<Config>;
|
|
2874
|
+
type UserPlugins = UserConfig$1<Config$8> | UserConfig$1<Config$7> | UserConfig$1<Config$6> | UserConfig$1<Config$5> | UserConfig$1<Config$4> | UserConfig$1<Config$3> | UserConfig$1<Config$2> | UserConfig$1<Config$1> | UserConfig$1<Config>;
|
|
2849
2875
|
|
|
2850
2876
|
declare const CLIENTS: readonly ["@hey-api/client-axios", "@hey-api/client-fetch", "legacy/angular", "legacy/axios", "legacy/fetch", "legacy/node", "legacy/xhr"];
|
|
2851
2877
|
type Client$2 = (typeof CLIENTS)[number];
|
|
@@ -3200,14 +3226,6 @@ interface Client$1 {
|
|
|
3200
3226
|
version: string;
|
|
3201
3227
|
}
|
|
3202
3228
|
|
|
3203
|
-
interface OpenApiV3_0_3 {
|
|
3204
|
-
/**
|
|
3205
|
-
* **REQUIRED**. This string MUST be the {@link https://semver.org/spec/v2.0.0.html semantic version number} of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions OpenAPI Specification version} that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#infoVersion `info.version`} string.
|
|
3206
|
-
*/
|
|
3207
|
-
openapi: '3.0.3';
|
|
3208
|
-
// TODO
|
|
3209
|
-
}
|
|
3210
|
-
|
|
3211
3229
|
/**
|
|
3212
3230
|
* {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#external-documentation-object
|
|
3213
3231
|
*/
|
|
@@ -3283,6 +3301,26 @@ interface Client extends Omit<Client$1, 'operations'> {
|
|
|
3283
3301
|
services: Service[];
|
|
3284
3302
|
}
|
|
3285
3303
|
|
|
3304
|
+
/**
|
|
3305
|
+
* This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-description OpenAPI Description}.
|
|
3306
|
+
*
|
|
3307
|
+
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
|
|
3308
|
+
*/
|
|
3309
|
+
interface OpenApiV3_0_0 {
|
|
3310
|
+
/**
|
|
3311
|
+
* An element to hold various Objects for the OpenAPI Description.
|
|
3312
|
+
*/
|
|
3313
|
+
components?: ComponentsObject;
|
|
3314
|
+
/**
|
|
3315
|
+
* **REQUIRED**. This string MUST be the {@link https://semver.org/spec/v2.0.0.html semantic version number} of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions OpenAPI Specification version} that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#infoVersion `info.version`} string.
|
|
3316
|
+
*/
|
|
3317
|
+
openapi: '3.0.0' | '3.0.1' | '3.0.2' | '3.0.3' | '3.0.4';
|
|
3318
|
+
// TODO
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
// TODO
|
|
3322
|
+
interface ComponentsObject {}
|
|
3323
|
+
|
|
3286
3324
|
/**
|
|
3287
3325
|
* Generate the OpenAPI client. This method will read the OpenAPI specification and based on the
|
|
3288
3326
|
* given language it will generate the client, including the typed models, validation schemas,
|
|
@@ -3299,4 +3337,4 @@ declare const _default: {
|
|
|
3299
3337
|
defineConfig: (config: UserConfig) => UserConfig;
|
|
3300
3338
|
};
|
|
3301
3339
|
|
|
3302
|
-
export { type
|
|
3340
|
+
export { type OpenApiV3_0_0, type OpenApiV3_1_0, type UserConfig, createClient, _default as default, defineConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ type PluginNames =
|
|
|
3
3
|
| '@hey-api/services'
|
|
4
4
|
| '@hey-api/transformers'
|
|
5
5
|
| '@hey-api/types'
|
|
6
|
+
| '@tanstack/angular-query-experimental'
|
|
6
7
|
| '@tanstack/react-query'
|
|
7
8
|
| '@tanstack/solid-query'
|
|
8
9
|
| '@tanstack/svelte-query'
|
|
@@ -427,7 +428,7 @@ interface OpenApiV3_1_0 {
|
|
|
427
428
|
/**
|
|
428
429
|
* An element to hold various schemas for the document.
|
|
429
430
|
*/
|
|
430
|
-
components?: ComponentsObject;
|
|
431
|
+
components?: ComponentsObject$1;
|
|
431
432
|
/**
|
|
432
433
|
* Additional external documentation.
|
|
433
434
|
*/
|
|
@@ -443,7 +444,7 @@ interface OpenApiV3_1_0 {
|
|
|
443
444
|
/**
|
|
444
445
|
* **REQUIRED**. This string MUST be the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#versions version number} of the OpenAPI Specification that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#infoVersion `info.version`} string.
|
|
445
446
|
*/
|
|
446
|
-
openapi: '3.1.0';
|
|
447
|
+
openapi: '3.1.0' | '3.1.1';
|
|
447
448
|
/**
|
|
448
449
|
* The available paths and operations for the API.
|
|
449
450
|
*/
|
|
@@ -643,7 +644,7 @@ interface CallbackObject {
|
|
|
643
644
|
* read:pets: read your pets
|
|
644
645
|
* ```
|
|
645
646
|
*/
|
|
646
|
-
interface ComponentsObject {
|
|
647
|
+
interface ComponentsObject$1 {
|
|
647
648
|
/**
|
|
648
649
|
* An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.
|
|
649
650
|
*/
|
|
@@ -2507,7 +2508,7 @@ interface XMLObject {
|
|
|
2507
2508
|
wrapped?: boolean;
|
|
2508
2509
|
}
|
|
2509
2510
|
|
|
2510
|
-
interface Config$
|
|
2511
|
+
interface Config$8 extends PluginName<'@hey-api/schemas'> {
|
|
2511
2512
|
/**
|
|
2512
2513
|
* Customise the schema name. By default, `{{name}}Schema` is used. `name` is a
|
|
2513
2514
|
* valid JavaScript/TypeScript identifier, e.g. if your schema name is
|
|
@@ -2648,7 +2649,7 @@ interface IRSchemaObject
|
|
|
2648
2649
|
| 'void';
|
|
2649
2650
|
}
|
|
2650
2651
|
|
|
2651
|
-
interface Config$
|
|
2652
|
+
interface Config$7 extends PluginName<'@hey-api/services'> {
|
|
2652
2653
|
/**
|
|
2653
2654
|
* Group operation methods into service classes? When enabled, you can
|
|
2654
2655
|
* select which classes to export with `services.include` and/or
|
|
@@ -2705,7 +2706,7 @@ interface Config$6 extends PluginName<'@hey-api/services'> {
|
|
|
2705
2706
|
serviceNameBuilder?: string;
|
|
2706
2707
|
}
|
|
2707
2708
|
|
|
2708
|
-
interface Config$
|
|
2709
|
+
interface Config$6 extends PluginName<'@hey-api/transformers'> {
|
|
2709
2710
|
/**
|
|
2710
2711
|
* Convert date strings into Date objects?
|
|
2711
2712
|
* @default false
|
|
@@ -2718,7 +2719,7 @@ interface Config$5 extends PluginName<'@hey-api/transformers'> {
|
|
|
2718
2719
|
output?: string;
|
|
2719
2720
|
}
|
|
2720
2721
|
|
|
2721
|
-
interface Config$
|
|
2722
|
+
interface Config$5 extends PluginName<'@hey-api/types'> {
|
|
2722
2723
|
/**
|
|
2723
2724
|
* Generate enum definitions?
|
|
2724
2725
|
* @default false
|
|
@@ -2746,6 +2747,31 @@ interface Config$4 extends PluginName<'@hey-api/types'> {
|
|
|
2746
2747
|
tree?: boolean;
|
|
2747
2748
|
}
|
|
2748
2749
|
|
|
2750
|
+
interface Config$4
|
|
2751
|
+
extends PluginName<'@tanstack/angular-query-experimental'> {
|
|
2752
|
+
/**
|
|
2753
|
+
* Generate {@link https://tanstack.com/query/v5/docs/framework/angular/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
2754
|
+
* @default true
|
|
2755
|
+
*/
|
|
2756
|
+
infiniteQueryOptions?: boolean;
|
|
2757
|
+
/**
|
|
2758
|
+
* Generate {@link https://tanstack.com/query/v5/docs/framework/angular/reference/useMutation `useMutation()`} helpers? These will be generated from DELETE, PATCH, POST, and PUT requests.
|
|
2759
|
+
* @default true
|
|
2760
|
+
*/
|
|
2761
|
+
mutationOptions?: boolean;
|
|
2762
|
+
/**
|
|
2763
|
+
* Name of the generated file.
|
|
2764
|
+
* @default '@tanstack/angular-query-experimental'
|
|
2765
|
+
*/
|
|
2766
|
+
output?: string;
|
|
2767
|
+
/**
|
|
2768
|
+
* Generate {@link https://tanstack.com/query/v5/docs/framework/angular/reference/queryOptions `queryOptions()`} helpers?
|
|
2769
|
+
* These will be generated from all requests.
|
|
2770
|
+
* @default true
|
|
2771
|
+
*/
|
|
2772
|
+
queryOptions?: boolean;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2749
2775
|
interface Config$3 extends PluginName<'@tanstack/react-query'> {
|
|
2750
2776
|
/**
|
|
2751
2777
|
* Generate {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
@@ -2845,7 +2871,7 @@ interface Config extends PluginName<'@tanstack/vue-query'> {
|
|
|
2845
2871
|
/**
|
|
2846
2872
|
* User-facing plugin types.
|
|
2847
2873
|
*/
|
|
2848
|
-
type UserPlugins = UserConfig$1<Config$7> | UserConfig$1<Config$6> | UserConfig$1<Config$5> | UserConfig$1<Config$4> | UserConfig$1<Config$3> | UserConfig$1<Config$2> | UserConfig$1<Config$1> | UserConfig$1<Config>;
|
|
2874
|
+
type UserPlugins = UserConfig$1<Config$8> | UserConfig$1<Config$7> | UserConfig$1<Config$6> | UserConfig$1<Config$5> | UserConfig$1<Config$4> | UserConfig$1<Config$3> | UserConfig$1<Config$2> | UserConfig$1<Config$1> | UserConfig$1<Config>;
|
|
2849
2875
|
|
|
2850
2876
|
declare const CLIENTS: readonly ["@hey-api/client-axios", "@hey-api/client-fetch", "legacy/angular", "legacy/axios", "legacy/fetch", "legacy/node", "legacy/xhr"];
|
|
2851
2877
|
type Client$2 = (typeof CLIENTS)[number];
|
|
@@ -3200,14 +3226,6 @@ interface Client$1 {
|
|
|
3200
3226
|
version: string;
|
|
3201
3227
|
}
|
|
3202
3228
|
|
|
3203
|
-
interface OpenApiV3_0_3 {
|
|
3204
|
-
/**
|
|
3205
|
-
* **REQUIRED**. This string MUST be the {@link https://semver.org/spec/v2.0.0.html semantic version number} of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions OpenAPI Specification version} that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#infoVersion `info.version`} string.
|
|
3206
|
-
*/
|
|
3207
|
-
openapi: '3.0.3';
|
|
3208
|
-
// TODO
|
|
3209
|
-
}
|
|
3210
|
-
|
|
3211
3229
|
/**
|
|
3212
3230
|
* {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#external-documentation-object
|
|
3213
3231
|
*/
|
|
@@ -3283,6 +3301,26 @@ interface Client extends Omit<Client$1, 'operations'> {
|
|
|
3283
3301
|
services: Service[];
|
|
3284
3302
|
}
|
|
3285
3303
|
|
|
3304
|
+
/**
|
|
3305
|
+
* This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-description OpenAPI Description}.
|
|
3306
|
+
*
|
|
3307
|
+
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
|
|
3308
|
+
*/
|
|
3309
|
+
interface OpenApiV3_0_0 {
|
|
3310
|
+
/**
|
|
3311
|
+
* An element to hold various Objects for the OpenAPI Description.
|
|
3312
|
+
*/
|
|
3313
|
+
components?: ComponentsObject;
|
|
3314
|
+
/**
|
|
3315
|
+
* **REQUIRED**. This string MUST be the {@link https://semver.org/spec/v2.0.0.html semantic version number} of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#versions OpenAPI Specification version} that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is _not_ related to the API {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#infoVersion `info.version`} string.
|
|
3316
|
+
*/
|
|
3317
|
+
openapi: '3.0.0' | '3.0.1' | '3.0.2' | '3.0.3' | '3.0.4';
|
|
3318
|
+
// TODO
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
// TODO
|
|
3322
|
+
interface ComponentsObject {}
|
|
3323
|
+
|
|
3286
3324
|
/**
|
|
3287
3325
|
* Generate the OpenAPI client. This method will read the OpenAPI specification and based on the
|
|
3288
3326
|
* given language it will generate the client, including the typed models, validation schemas,
|
|
@@ -3299,4 +3337,4 @@ declare const _default: {
|
|
|
3299
3337
|
defineConfig: (config: UserConfig) => UserConfig;
|
|
3300
3338
|
};
|
|
3301
3339
|
|
|
3302
|
-
export { type
|
|
3340
|
+
export { type OpenApiV3_0_0, type OpenApiV3_1_0, type UserConfig, createClient, _default as default, defineConfig };
|