@hey-api/openapi-ts 0.55.2 → 0.56.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/dist/index.cjs +59 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -11
- package/dist/index.d.ts +23 -11
- package/dist/index.js +57 -57
- package/dist/index.js.map +1 -1
- package/package.json +19 -18
package/dist/index.d.cts
CHANGED
|
@@ -8,6 +8,7 @@ type PluginNames =
|
|
|
8
8
|
| '@tanstack/solid-query'
|
|
9
9
|
| '@tanstack/svelte-query'
|
|
10
10
|
| '@tanstack/vue-query'
|
|
11
|
+
| 'fastify'
|
|
11
12
|
| 'zod';
|
|
12
13
|
|
|
13
14
|
interface PluginName<Name extends PluginNames> {
|
|
@@ -3801,7 +3802,7 @@ interface XMLObject {
|
|
|
3801
3802
|
wrapped?: boolean;
|
|
3802
3803
|
}
|
|
3803
3804
|
|
|
3804
|
-
interface Config$
|
|
3805
|
+
interface Config$9 extends PluginName<'@hey-api/schemas'> {
|
|
3805
3806
|
/**
|
|
3806
3807
|
* Customise the schema name. By default, `{{name}}Schema` is used. `name` is a
|
|
3807
3808
|
* valid JavaScript/TypeScript identifier, e.g. if your schema name is
|
|
@@ -3912,6 +3913,7 @@ interface IRResponsesObject {
|
|
|
3912
3913
|
|
|
3913
3914
|
interface IRResponseObject {
|
|
3914
3915
|
// TODO: parser - handle headers, links, and possibly other media types?
|
|
3916
|
+
mediaType?: string;
|
|
3915
3917
|
schema: IRSchemaObject;
|
|
3916
3918
|
}
|
|
3917
3919
|
|
|
@@ -3968,7 +3970,7 @@ interface IRSchemaObject
|
|
|
3968
3970
|
| 'void';
|
|
3969
3971
|
}
|
|
3970
3972
|
|
|
3971
|
-
interface Config$
|
|
3973
|
+
interface Config$8 extends PluginName<'@hey-api/services'> {
|
|
3972
3974
|
/**
|
|
3973
3975
|
* Group operation methods into service classes? When enabled, you can
|
|
3974
3976
|
* select which classes to export with `services.include` and/or
|
|
@@ -4029,7 +4031,7 @@ interface Config$7 extends PluginName<'@hey-api/services'> {
|
|
|
4029
4031
|
serviceNameBuilder?: string;
|
|
4030
4032
|
}
|
|
4031
4033
|
|
|
4032
|
-
interface Config$
|
|
4034
|
+
interface Config$7 extends PluginName<'@hey-api/transformers'> {
|
|
4033
4035
|
/**
|
|
4034
4036
|
* Convert date strings into Date objects?
|
|
4035
4037
|
* @default false
|
|
@@ -4042,7 +4044,7 @@ interface Config$6 extends PluginName<'@hey-api/transformers'> {
|
|
|
4042
4044
|
output?: string;
|
|
4043
4045
|
}
|
|
4044
4046
|
|
|
4045
|
-
interface Config$
|
|
4047
|
+
interface Config$6 extends PluginName<'@hey-api/types'> {
|
|
4046
4048
|
/**
|
|
4047
4049
|
* Generate enum definitions?
|
|
4048
4050
|
* @default false
|
|
@@ -4070,11 +4072,13 @@ interface Config$5 extends PluginName<'@hey-api/types'> {
|
|
|
4070
4072
|
* Generate a tree of types containing all operations? It will be named
|
|
4071
4073
|
* $OpenApiTs.
|
|
4072
4074
|
* @default false
|
|
4075
|
+
*
|
|
4076
|
+
* @deprecated
|
|
4073
4077
|
*/
|
|
4074
4078
|
tree?: boolean;
|
|
4075
4079
|
}
|
|
4076
4080
|
|
|
4077
|
-
interface Config$
|
|
4081
|
+
interface Config$5
|
|
4078
4082
|
extends PluginName<'@tanstack/angular-query-experimental'> {
|
|
4079
4083
|
/**
|
|
4080
4084
|
* 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.
|
|
@@ -4099,7 +4103,7 @@ interface Config$4
|
|
|
4099
4103
|
queryOptions?: boolean;
|
|
4100
4104
|
}
|
|
4101
4105
|
|
|
4102
|
-
interface Config$
|
|
4106
|
+
interface Config$4 extends PluginName<'@tanstack/react-query'> {
|
|
4103
4107
|
/**
|
|
4104
4108
|
* 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.
|
|
4105
4109
|
* @default true
|
|
@@ -4123,7 +4127,7 @@ interface Config$3 extends PluginName<'@tanstack/react-query'> {
|
|
|
4123
4127
|
queryOptions?: boolean;
|
|
4124
4128
|
}
|
|
4125
4129
|
|
|
4126
|
-
interface Config$
|
|
4130
|
+
interface Config$3 extends PluginName<'@tanstack/solid-query'> {
|
|
4127
4131
|
/**
|
|
4128
4132
|
* Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
4129
4133
|
* @default true
|
|
@@ -4147,7 +4151,7 @@ interface Config$2 extends PluginName<'@tanstack/solid-query'> {
|
|
|
4147
4151
|
queryOptions?: boolean;
|
|
4148
4152
|
}
|
|
4149
4153
|
|
|
4150
|
-
interface Config$
|
|
4154
|
+
interface Config$2 extends PluginName<'@tanstack/svelte-query'> {
|
|
4151
4155
|
/**
|
|
4152
4156
|
* Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
4153
4157
|
* @default true
|
|
@@ -4171,7 +4175,7 @@ interface Config$1 extends PluginName<'@tanstack/svelte-query'> {
|
|
|
4171
4175
|
queryOptions?: boolean;
|
|
4172
4176
|
}
|
|
4173
4177
|
|
|
4174
|
-
interface Config extends PluginName<'@tanstack/vue-query'> {
|
|
4178
|
+
interface Config$1 extends PluginName<'@tanstack/vue-query'> {
|
|
4175
4179
|
/**
|
|
4176
4180
|
* Generate {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
4177
4181
|
* @default true
|
|
@@ -4195,10 +4199,18 @@ interface Config extends PluginName<'@tanstack/vue-query'> {
|
|
|
4195
4199
|
queryOptions?: boolean;
|
|
4196
4200
|
}
|
|
4197
4201
|
|
|
4202
|
+
interface Config extends PluginName<'fastify'> {
|
|
4203
|
+
/**
|
|
4204
|
+
* Name of the generated file.
|
|
4205
|
+
* @default 'fastify'
|
|
4206
|
+
*/
|
|
4207
|
+
output?: string;
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4198
4210
|
/**
|
|
4199
4211
|
* User-facing plugin types.
|
|
4200
4212
|
*/
|
|
4201
|
-
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>;
|
|
4213
|
+
type UserPlugins = UserConfig$1<Config$9> | 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>;
|
|
4202
4214
|
|
|
4203
4215
|
declare const CLIENTS: readonly ["@hey-api/client-axios", "@hey-api/client-fetch", "legacy/angular", "legacy/axios", "legacy/fetch", "legacy/node", "legacy/xhr"];
|
|
4204
4216
|
type Client$2 = (typeof CLIENTS)[number];
|
|
@@ -4296,7 +4308,7 @@ interface ClientConfig {
|
|
|
4296
4308
|
* Process output folder with linter?
|
|
4297
4309
|
* @default false
|
|
4298
4310
|
*/
|
|
4299
|
-
lint?: 'biome' | 'eslint' | false;
|
|
4311
|
+
lint?: 'biome' | 'eslint' | 'oxlint' | false;
|
|
4300
4312
|
/**
|
|
4301
4313
|
* The relative location of the output folder
|
|
4302
4314
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ type PluginNames =
|
|
|
8
8
|
| '@tanstack/solid-query'
|
|
9
9
|
| '@tanstack/svelte-query'
|
|
10
10
|
| '@tanstack/vue-query'
|
|
11
|
+
| 'fastify'
|
|
11
12
|
| 'zod';
|
|
12
13
|
|
|
13
14
|
interface PluginName<Name extends PluginNames> {
|
|
@@ -3801,7 +3802,7 @@ interface XMLObject {
|
|
|
3801
3802
|
wrapped?: boolean;
|
|
3802
3803
|
}
|
|
3803
3804
|
|
|
3804
|
-
interface Config$
|
|
3805
|
+
interface Config$9 extends PluginName<'@hey-api/schemas'> {
|
|
3805
3806
|
/**
|
|
3806
3807
|
* Customise the schema name. By default, `{{name}}Schema` is used. `name` is a
|
|
3807
3808
|
* valid JavaScript/TypeScript identifier, e.g. if your schema name is
|
|
@@ -3912,6 +3913,7 @@ interface IRResponsesObject {
|
|
|
3912
3913
|
|
|
3913
3914
|
interface IRResponseObject {
|
|
3914
3915
|
// TODO: parser - handle headers, links, and possibly other media types?
|
|
3916
|
+
mediaType?: string;
|
|
3915
3917
|
schema: IRSchemaObject;
|
|
3916
3918
|
}
|
|
3917
3919
|
|
|
@@ -3968,7 +3970,7 @@ interface IRSchemaObject
|
|
|
3968
3970
|
| 'void';
|
|
3969
3971
|
}
|
|
3970
3972
|
|
|
3971
|
-
interface Config$
|
|
3973
|
+
interface Config$8 extends PluginName<'@hey-api/services'> {
|
|
3972
3974
|
/**
|
|
3973
3975
|
* Group operation methods into service classes? When enabled, you can
|
|
3974
3976
|
* select which classes to export with `services.include` and/or
|
|
@@ -4029,7 +4031,7 @@ interface Config$7 extends PluginName<'@hey-api/services'> {
|
|
|
4029
4031
|
serviceNameBuilder?: string;
|
|
4030
4032
|
}
|
|
4031
4033
|
|
|
4032
|
-
interface Config$
|
|
4034
|
+
interface Config$7 extends PluginName<'@hey-api/transformers'> {
|
|
4033
4035
|
/**
|
|
4034
4036
|
* Convert date strings into Date objects?
|
|
4035
4037
|
* @default false
|
|
@@ -4042,7 +4044,7 @@ interface Config$6 extends PluginName<'@hey-api/transformers'> {
|
|
|
4042
4044
|
output?: string;
|
|
4043
4045
|
}
|
|
4044
4046
|
|
|
4045
|
-
interface Config$
|
|
4047
|
+
interface Config$6 extends PluginName<'@hey-api/types'> {
|
|
4046
4048
|
/**
|
|
4047
4049
|
* Generate enum definitions?
|
|
4048
4050
|
* @default false
|
|
@@ -4070,11 +4072,13 @@ interface Config$5 extends PluginName<'@hey-api/types'> {
|
|
|
4070
4072
|
* Generate a tree of types containing all operations? It will be named
|
|
4071
4073
|
* $OpenApiTs.
|
|
4072
4074
|
* @default false
|
|
4075
|
+
*
|
|
4076
|
+
* @deprecated
|
|
4073
4077
|
*/
|
|
4074
4078
|
tree?: boolean;
|
|
4075
4079
|
}
|
|
4076
4080
|
|
|
4077
|
-
interface Config$
|
|
4081
|
+
interface Config$5
|
|
4078
4082
|
extends PluginName<'@tanstack/angular-query-experimental'> {
|
|
4079
4083
|
/**
|
|
4080
4084
|
* 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.
|
|
@@ -4099,7 +4103,7 @@ interface Config$4
|
|
|
4099
4103
|
queryOptions?: boolean;
|
|
4100
4104
|
}
|
|
4101
4105
|
|
|
4102
|
-
interface Config$
|
|
4106
|
+
interface Config$4 extends PluginName<'@tanstack/react-query'> {
|
|
4103
4107
|
/**
|
|
4104
4108
|
* 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.
|
|
4105
4109
|
* @default true
|
|
@@ -4123,7 +4127,7 @@ interface Config$3 extends PluginName<'@tanstack/react-query'> {
|
|
|
4123
4127
|
queryOptions?: boolean;
|
|
4124
4128
|
}
|
|
4125
4129
|
|
|
4126
|
-
interface Config$
|
|
4130
|
+
interface Config$3 extends PluginName<'@tanstack/solid-query'> {
|
|
4127
4131
|
/**
|
|
4128
4132
|
* Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
4129
4133
|
* @default true
|
|
@@ -4147,7 +4151,7 @@ interface Config$2 extends PluginName<'@tanstack/solid-query'> {
|
|
|
4147
4151
|
queryOptions?: boolean;
|
|
4148
4152
|
}
|
|
4149
4153
|
|
|
4150
|
-
interface Config$
|
|
4154
|
+
interface Config$2 extends PluginName<'@tanstack/svelte-query'> {
|
|
4151
4155
|
/**
|
|
4152
4156
|
* Generate `createInfiniteQuery()` helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
4153
4157
|
* @default true
|
|
@@ -4171,7 +4175,7 @@ interface Config$1 extends PluginName<'@tanstack/svelte-query'> {
|
|
|
4171
4175
|
queryOptions?: boolean;
|
|
4172
4176
|
}
|
|
4173
4177
|
|
|
4174
|
-
interface Config extends PluginName<'@tanstack/vue-query'> {
|
|
4178
|
+
interface Config$1 extends PluginName<'@tanstack/vue-query'> {
|
|
4175
4179
|
/**
|
|
4176
4180
|
* Generate {@link https://tanstack.com/query/v5/docs/framework/vue/reference/infiniteQueryOptions `infiniteQueryOptions()`} helpers? These will be generated from GET and POST requests where a pagination parameter is detected.
|
|
4177
4181
|
* @default true
|
|
@@ -4195,10 +4199,18 @@ interface Config extends PluginName<'@tanstack/vue-query'> {
|
|
|
4195
4199
|
queryOptions?: boolean;
|
|
4196
4200
|
}
|
|
4197
4201
|
|
|
4202
|
+
interface Config extends PluginName<'fastify'> {
|
|
4203
|
+
/**
|
|
4204
|
+
* Name of the generated file.
|
|
4205
|
+
* @default 'fastify'
|
|
4206
|
+
*/
|
|
4207
|
+
output?: string;
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4198
4210
|
/**
|
|
4199
4211
|
* User-facing plugin types.
|
|
4200
4212
|
*/
|
|
4201
|
-
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>;
|
|
4213
|
+
type UserPlugins = UserConfig$1<Config$9> | 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>;
|
|
4202
4214
|
|
|
4203
4215
|
declare const CLIENTS: readonly ["@hey-api/client-axios", "@hey-api/client-fetch", "legacy/angular", "legacy/axios", "legacy/fetch", "legacy/node", "legacy/xhr"];
|
|
4204
4216
|
type Client$2 = (typeof CLIENTS)[number];
|
|
@@ -4296,7 +4308,7 @@ interface ClientConfig {
|
|
|
4296
4308
|
* Process output folder with linter?
|
|
4297
4309
|
* @default false
|
|
4298
4310
|
*/
|
|
4299
|
-
lint?: 'biome' | 'eslint' | false;
|
|
4311
|
+
lint?: 'biome' | 'eslint' | 'oxlint' | false;
|
|
4300
4312
|
/**
|
|
4301
4313
|
* The relative location of the output folder
|
|
4302
4314
|
*/
|