@hey-api/openapi-ts 0.84.0 → 0.84.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/README.md +1 -0
- package/dist/chunk-WF7D2BDN.js +54 -0
- package/dist/chunk-WF7D2BDN.js.map +1 -0
- package/dist/clients/ofetch/client.ts +272 -0
- package/dist/clients/ofetch/index.ts +23 -0
- package/dist/clients/ofetch/types.ts +333 -0
- package/dist/clients/ofetch/utils.ts +540 -0
- package/dist/index.cjs +63 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +293 -110
- package/dist/index.d.ts +293 -110
- package/dist/index.js +28 -28
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +19 -19
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-ClTVswi2.d.cts → types.d-fB2fiwrL.d.cts} +90 -34
- package/dist/{types.d-ClTVswi2.d.ts → types.d-fB2fiwrL.d.ts} +90 -34
- package/package.json +3 -1
- package/dist/chunk-ZXJLXXXN.js +0 -54
- package/dist/chunk-ZXJLXXXN.js.map +0 -1
package/dist/internal.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Config, L as Logger, c as IR, U as UserConfig, W as WatchValues } from './types.d-
|
|
1
|
+
import { l as Config, L as Logger, c as IR, U as UserConfig, W as WatchValues } from './types.d-fB2fiwrL.cjs';
|
|
2
2
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
3
3
|
import 'semver';
|
|
4
4
|
import '@hey-api/codegen-core';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as Config, L as Logger, c as IR, U as UserConfig, W as WatchValues } from './types.d-
|
|
1
|
+
import { l as Config, L as Logger, c as IR, U as UserConfig, W as WatchValues } from './types.d-fB2fiwrL.js';
|
|
2
2
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
3
3
|
import 'semver';
|
|
4
4
|
import '@hey-api/codegen-core';
|
package/dist/internal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {createRequire}from'module';export{L as getSpec,K as initConfigs,D as parseOpenApiSpec}from'./chunk-
|
|
1
|
+
import {createRequire}from'module';export{L as getSpec,K as initConfigs,D as parseOpenApiSpec}from'./chunk-WF7D2BDN.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
|
|
2
2
|
//# sourceMappingURL=internal.js.map
|
|
@@ -5990,7 +5990,7 @@ declare namespace OpenApiSchemaObject {
|
|
|
5990
5990
|
|
|
5991
5991
|
type EnumsMode = 'inline' | 'root';
|
|
5992
5992
|
|
|
5993
|
-
type
|
|
5993
|
+
type UserParser = {
|
|
5994
5994
|
/**
|
|
5995
5995
|
* Filters can be used to select a subset of your input before it's passed
|
|
5996
5996
|
* to plugins.
|
|
@@ -6072,6 +6072,19 @@ type Parser = {
|
|
|
6072
6072
|
*/
|
|
6073
6073
|
name?: StringName;
|
|
6074
6074
|
};
|
|
6075
|
+
/**
|
|
6076
|
+
* By default, any object schema with a missing `required` keyword is
|
|
6077
|
+
* interpreted as "no properties are required." This is the correct
|
|
6078
|
+
* behavior according to the OpenAPI standard. However, some specifications
|
|
6079
|
+
* interpret a missing `required` keyword as "all properties should be
|
|
6080
|
+
* required."
|
|
6081
|
+
*
|
|
6082
|
+
* This option allows you to change the default behavior so that
|
|
6083
|
+
* properties are required by default unless explicitly marked as optional.
|
|
6084
|
+
*
|
|
6085
|
+
* @default false
|
|
6086
|
+
*/
|
|
6087
|
+
propertiesRequiredByDefault?: boolean;
|
|
6075
6088
|
/**
|
|
6076
6089
|
* Your schemas might contain read-only or write-only fields. Using such
|
|
6077
6090
|
* schemas directly could mean asking the user to provide a read-only
|
|
@@ -6159,7 +6172,7 @@ type Parser = {
|
|
|
6159
6172
|
validate_EXPERIMENTAL?: boolean | 'strict' | 'warn';
|
|
6160
6173
|
};
|
|
6161
6174
|
|
|
6162
|
-
type
|
|
6175
|
+
type Parser = {
|
|
6163
6176
|
/**
|
|
6164
6177
|
* Filters can be used to select a subset of your input before it's passed
|
|
6165
6178
|
* to plugins.
|
|
@@ -6236,6 +6249,19 @@ type ResolvedParser = {
|
|
|
6236
6249
|
*/
|
|
6237
6250
|
name: StringName;
|
|
6238
6251
|
};
|
|
6252
|
+
/**
|
|
6253
|
+
* By default, any object schema with a missing `required` keyword is
|
|
6254
|
+
* interpreted as "no properties are required." This is the correct
|
|
6255
|
+
* behavior according to the OpenAPI standard. However, some specifications
|
|
6256
|
+
* interpret a missing `required` keyword as "all properties should be
|
|
6257
|
+
* required."
|
|
6258
|
+
*
|
|
6259
|
+
* This option allows you to change the default behavior so that
|
|
6260
|
+
* properties are required by default unless explicitly marked as optional.
|
|
6261
|
+
*
|
|
6262
|
+
* @default false
|
|
6263
|
+
*/
|
|
6264
|
+
propertiesRequiredByDefault: boolean;
|
|
6239
6265
|
/**
|
|
6240
6266
|
* Your schemas might contain read-only or write-only fields. Using such
|
|
6241
6267
|
* schemas directly could mean asking the user to provide a read-only
|
|
@@ -6565,7 +6591,7 @@ type Patch = {
|
|
|
6565
6591
|
version?: string | ((version: string) => string);
|
|
6566
6592
|
};
|
|
6567
6593
|
|
|
6568
|
-
interface UserConfig$
|
|
6594
|
+
interface UserConfig$p {
|
|
6569
6595
|
/**
|
|
6570
6596
|
* Path to the config file. Set this value if you don't use the default
|
|
6571
6597
|
* config file name, or it's not located in the project root.
|
|
@@ -6618,7 +6644,7 @@ interface UserConfig$o {
|
|
|
6618
6644
|
* Customize how the input is parsed and transformed before it's passed to
|
|
6619
6645
|
* plugins.
|
|
6620
6646
|
*/
|
|
6621
|
-
parser?:
|
|
6647
|
+
parser?: UserParser;
|
|
6622
6648
|
/**
|
|
6623
6649
|
* Plugins generate artifacts from `input`. By default, we generate SDK
|
|
6624
6650
|
* functions and TypeScript interfaces. If you manually define `plugins`,
|
|
@@ -6690,7 +6716,7 @@ interface UserConfig$o {
|
|
|
6690
6716
|
}
|
|
6691
6717
|
|
|
6692
6718
|
type Config$c = Omit<
|
|
6693
|
-
Required<UserConfig$
|
|
6719
|
+
Required<UserConfig$p>,
|
|
6694
6720
|
| 'base'
|
|
6695
6721
|
| 'input'
|
|
6696
6722
|
| 'logs'
|
|
@@ -6701,7 +6727,7 @@ type Config$c = Omit<
|
|
|
6701
6727
|
| 'request'
|
|
6702
6728
|
| 'watch'
|
|
6703
6729
|
> &
|
|
6704
|
-
Pick<UserConfig$
|
|
6730
|
+
Pick<UserConfig$p, 'base' | 'name' | 'request'> & {
|
|
6705
6731
|
input: Omit<Input, 'path' | 'watch'> &
|
|
6706
6732
|
Pick<Required<Input>, 'path'> & { watch: Watch };
|
|
6707
6733
|
logs: Logs;
|
|
@@ -6710,7 +6736,7 @@ type Config$c = Omit<
|
|
|
6710
6736
|
* Customize how the input is parsed and transformed before it's passed to
|
|
6711
6737
|
* plugins.
|
|
6712
6738
|
*/
|
|
6713
|
-
parser:
|
|
6739
|
+
parser: Parser;
|
|
6714
6740
|
pluginOrder: ReadonlyArray<keyof PluginConfigMap>;
|
|
6715
6741
|
plugins: {
|
|
6716
6742
|
[K in PluginNames]?: Plugin.ConfigWithName<PluginConfigMap[K]>;
|
|
@@ -7760,6 +7786,7 @@ type PluginClientNames =
|
|
|
7760
7786
|
| '@hey-api/client-fetch'
|
|
7761
7787
|
| '@hey-api/client-next'
|
|
7762
7788
|
| '@hey-api/client-nuxt'
|
|
7789
|
+
| '@hey-api/client-ofetch'
|
|
7763
7790
|
| 'legacy/angular'
|
|
7764
7791
|
| 'legacy/axios'
|
|
7765
7792
|
| 'legacy/fetch'
|
|
@@ -7920,8 +7947,8 @@ type DefinePlugin<
|
|
|
7920
7947
|
Types: Plugin.Types<Config, ResolvedConfig, Api>;
|
|
7921
7948
|
};
|
|
7922
7949
|
|
|
7923
|
-
type SelectorType$
|
|
7924
|
-
type IApi$
|
|
7950
|
+
type SelectorType$j = 'class' | 'httpRequest' | 'httpResource' | 'HttpRequest' | 'inject' | 'Injectable';
|
|
7951
|
+
type IApi$j = {
|
|
7925
7952
|
/**
|
|
7926
7953
|
* @param type Selector type.
|
|
7927
7954
|
* @param value Depends on `type`:
|
|
@@ -7933,10 +7960,10 @@ type IApi$i = {
|
|
|
7933
7960
|
* - `Injectable`: never
|
|
7934
7961
|
* @returns Selector array
|
|
7935
7962
|
*/
|
|
7936
|
-
getSelector: (type: SelectorType$
|
|
7963
|
+
getSelector: (type: SelectorType$j, value?: string) => Selector;
|
|
7937
7964
|
};
|
|
7938
7965
|
|
|
7939
|
-
type UserConfig$
|
|
7966
|
+
type UserConfig$o = Plugin.Name<'@angular/common'> &
|
|
7940
7967
|
Plugin.Hooks & {
|
|
7941
7968
|
/**
|
|
7942
7969
|
* Should the exports from the generated files be re-exported in the index
|
|
@@ -8075,7 +8102,18 @@ type Config$b = Plugin.Name<'@angular/common'> &
|
|
|
8075
8102
|
};
|
|
8076
8103
|
};
|
|
8077
8104
|
|
|
8078
|
-
type AngularCommonPlugin = DefinePlugin<UserConfig$
|
|
8105
|
+
type AngularCommonPlugin = DefinePlugin<UserConfig$o, Config$b, IApi$j>;
|
|
8106
|
+
|
|
8107
|
+
type SelectorType$i = 'client';
|
|
8108
|
+
type IApi$i = {
|
|
8109
|
+
/**
|
|
8110
|
+
* @param type Selector type.
|
|
8111
|
+
* @param value Depends on `type`:
|
|
8112
|
+
* - `client`: never
|
|
8113
|
+
* @returns Selector array
|
|
8114
|
+
*/
|
|
8115
|
+
getSelector: (type: SelectorType$i, value?: string) => Selector;
|
|
8116
|
+
};
|
|
8079
8117
|
|
|
8080
8118
|
type SelectorType$h = 'client';
|
|
8081
8119
|
type IApi$h = {
|
|
@@ -8088,6 +8126,22 @@ type IApi$h = {
|
|
|
8088
8126
|
getSelector: (type: SelectorType$h, value?: string) => Selector;
|
|
8089
8127
|
};
|
|
8090
8128
|
|
|
8129
|
+
type UserConfig$n = Plugin.Name<'@hey-api/client-axios'> &
|
|
8130
|
+
Client.Config & {
|
|
8131
|
+
/**
|
|
8132
|
+
* Throw an error instead of returning it in the response?
|
|
8133
|
+
*
|
|
8134
|
+
* @default false
|
|
8135
|
+
*/
|
|
8136
|
+
throwOnError?: boolean;
|
|
8137
|
+
};
|
|
8138
|
+
|
|
8139
|
+
type HeyApiClientAxiosPlugin = DefinePlugin<
|
|
8140
|
+
UserConfig$n,
|
|
8141
|
+
UserConfig$n,
|
|
8142
|
+
IApi$h
|
|
8143
|
+
>;
|
|
8144
|
+
|
|
8091
8145
|
type SelectorType$g = 'client';
|
|
8092
8146
|
type IApi$g = {
|
|
8093
8147
|
/**
|
|
@@ -8099,7 +8153,7 @@ type IApi$g = {
|
|
|
8099
8153
|
getSelector: (type: SelectorType$g, value?: string) => Selector;
|
|
8100
8154
|
};
|
|
8101
8155
|
|
|
8102
|
-
type UserConfig$m = Plugin.Name<'@hey-api/client-
|
|
8156
|
+
type UserConfig$m = Plugin.Name<'@hey-api/client-fetch'> &
|
|
8103
8157
|
Client.Config & {
|
|
8104
8158
|
/**
|
|
8105
8159
|
* Throw an error instead of returning it in the response?
|
|
@@ -8109,7 +8163,7 @@ type UserConfig$m = Plugin.Name<'@hey-api/client-axios'> &
|
|
|
8109
8163
|
throwOnError?: boolean;
|
|
8110
8164
|
};
|
|
8111
8165
|
|
|
8112
|
-
type
|
|
8166
|
+
type HeyApiClientFetchPlugin = DefinePlugin<
|
|
8113
8167
|
UserConfig$m,
|
|
8114
8168
|
UserConfig$m,
|
|
8115
8169
|
IApi$g
|
|
@@ -8126,7 +8180,7 @@ type IApi$f = {
|
|
|
8126
8180
|
getSelector: (type: SelectorType$f, value?: string) => Selector;
|
|
8127
8181
|
};
|
|
8128
8182
|
|
|
8129
|
-
type UserConfig$l = Plugin.Name<'@hey-api/client-
|
|
8183
|
+
type UserConfig$l = Plugin.Name<'@hey-api/client-next'> &
|
|
8130
8184
|
Client.Config & {
|
|
8131
8185
|
/**
|
|
8132
8186
|
* Throw an error instead of returning it in the response?
|
|
@@ -8136,11 +8190,7 @@ type UserConfig$l = Plugin.Name<'@hey-api/client-fetch'> &
|
|
|
8136
8190
|
throwOnError?: boolean;
|
|
8137
8191
|
};
|
|
8138
8192
|
|
|
8139
|
-
type
|
|
8140
|
-
UserConfig$l,
|
|
8141
|
-
UserConfig$l,
|
|
8142
|
-
IApi$f
|
|
8143
|
-
>;
|
|
8193
|
+
type HeyApiClientNextPlugin = DefinePlugin<UserConfig$l, UserConfig$l, IApi$f>;
|
|
8144
8194
|
|
|
8145
8195
|
type SelectorType$e = 'client';
|
|
8146
8196
|
type IApi$e = {
|
|
@@ -8153,17 +8203,9 @@ type IApi$e = {
|
|
|
8153
8203
|
getSelector: (type: SelectorType$e, value?: string) => Selector;
|
|
8154
8204
|
};
|
|
8155
8205
|
|
|
8156
|
-
type UserConfig$k = Plugin.Name<'@hey-api/client-
|
|
8157
|
-
Client.Config & {
|
|
8158
|
-
/**
|
|
8159
|
-
* Throw an error instead of returning it in the response?
|
|
8160
|
-
*
|
|
8161
|
-
* @default false
|
|
8162
|
-
*/
|
|
8163
|
-
throwOnError?: boolean;
|
|
8164
|
-
};
|
|
8206
|
+
type UserConfig$k = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
|
|
8165
8207
|
|
|
8166
|
-
type
|
|
8208
|
+
type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$k, UserConfig$k, IApi$e>;
|
|
8167
8209
|
|
|
8168
8210
|
type SelectorType$d = 'client';
|
|
8169
8211
|
type IApi$d = {
|
|
@@ -8176,9 +8218,21 @@ type IApi$d = {
|
|
|
8176
8218
|
getSelector: (type: SelectorType$d, value?: string) => Selector;
|
|
8177
8219
|
};
|
|
8178
8220
|
|
|
8179
|
-
type UserConfig$j = Plugin.Name<'@hey-api/client-
|
|
8221
|
+
type UserConfig$j = Plugin.Name<'@hey-api/client-ofetch'> &
|
|
8222
|
+
Client.Config & {
|
|
8223
|
+
/**
|
|
8224
|
+
* Throw an error instead of returning it in the response?
|
|
8225
|
+
*
|
|
8226
|
+
* @default false
|
|
8227
|
+
*/
|
|
8228
|
+
throwOnError?: boolean;
|
|
8229
|
+
};
|
|
8180
8230
|
|
|
8181
|
-
type
|
|
8231
|
+
type HeyApiClientOfetchPlugin = DefinePlugin<
|
|
8232
|
+
UserConfig$j,
|
|
8233
|
+
UserConfig$j,
|
|
8234
|
+
IApi$d
|
|
8235
|
+
>;
|
|
8182
8236
|
|
|
8183
8237
|
interface PluginHandler {
|
|
8184
8238
|
(...args: Parameters<HeyApiClientAngularPlugin['Handler']>): void;
|
|
@@ -8186,6 +8240,7 @@ interface PluginHandler {
|
|
|
8186
8240
|
(...args: Parameters<HeyApiClientFetchPlugin['Handler']>): void;
|
|
8187
8241
|
(...args: Parameters<HeyApiClientNextPlugin['Handler']>): void;
|
|
8188
8242
|
(...args: Parameters<HeyApiClientNuxtPlugin['Handler']>): void;
|
|
8243
|
+
(...args: Parameters<HeyApiClientOfetchPlugin['Handler']>): void;
|
|
8189
8244
|
}
|
|
8190
8245
|
|
|
8191
8246
|
/**
|
|
@@ -8259,7 +8314,7 @@ type UserConfig$i = Plugin.Name<'@hey-api/client-angular'> &
|
|
|
8259
8314
|
type HeyApiClientAngularPlugin = DefinePlugin<
|
|
8260
8315
|
UserConfig$i,
|
|
8261
8316
|
UserConfig$i,
|
|
8262
|
-
IApi$
|
|
8317
|
+
IApi$i
|
|
8263
8318
|
>;
|
|
8264
8319
|
|
|
8265
8320
|
type UserConfig$h = Plugin.Name<'legacy/angular'> &
|
|
@@ -13687,6 +13742,7 @@ interface PluginConfigMap {
|
|
|
13687
13742
|
'@hey-api/client-fetch': HeyApiClientFetchPlugin['Types'];
|
|
13688
13743
|
'@hey-api/client-next': HeyApiClientNextPlugin['Types'];
|
|
13689
13744
|
'@hey-api/client-nuxt': HeyApiClientNuxtPlugin['Types'];
|
|
13745
|
+
'@hey-api/client-ofetch': HeyApiClientOfetchPlugin['Types'];
|
|
13690
13746
|
'@hey-api/schemas': HeyApiSchemasPlugin['Types'];
|
|
13691
13747
|
'@hey-api/sdk': HeyApiSdkPlugin['Types'];
|
|
13692
13748
|
'@hey-api/transformers': HeyApiTransformersPlugin['Types'];
|
|
@@ -14134,4 +14190,4 @@ interface WatchValues {
|
|
|
14134
14190
|
lastValue?: string;
|
|
14135
14191
|
}
|
|
14136
14192
|
|
|
14137
|
-
export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, Logger as L, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type TypeTransformer as T, type UserConfig$
|
|
14193
|
+
export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, Logger as L, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type TypeTransformer as T, type UserConfig$p as U, type WatchValues as W, Plugin as a, type Client$1 as b, IR$1 as c, OpenApiMetaObject as d, OpenApiOperationObject as e, OpenApiParameterObject as f, OpenApiRequestBodyObject as g, OpenApiResponseObject as h, OpenApiSchemaObject as i, Client as j, LegacyIR as k, type Config$c as l, tsNodeToString as t };
|
|
@@ -5990,7 +5990,7 @@ declare namespace OpenApiSchemaObject {
|
|
|
5990
5990
|
|
|
5991
5991
|
type EnumsMode = 'inline' | 'root';
|
|
5992
5992
|
|
|
5993
|
-
type
|
|
5993
|
+
type UserParser = {
|
|
5994
5994
|
/**
|
|
5995
5995
|
* Filters can be used to select a subset of your input before it's passed
|
|
5996
5996
|
* to plugins.
|
|
@@ -6072,6 +6072,19 @@ type Parser = {
|
|
|
6072
6072
|
*/
|
|
6073
6073
|
name?: StringName;
|
|
6074
6074
|
};
|
|
6075
|
+
/**
|
|
6076
|
+
* By default, any object schema with a missing `required` keyword is
|
|
6077
|
+
* interpreted as "no properties are required." This is the correct
|
|
6078
|
+
* behavior according to the OpenAPI standard. However, some specifications
|
|
6079
|
+
* interpret a missing `required` keyword as "all properties should be
|
|
6080
|
+
* required."
|
|
6081
|
+
*
|
|
6082
|
+
* This option allows you to change the default behavior so that
|
|
6083
|
+
* properties are required by default unless explicitly marked as optional.
|
|
6084
|
+
*
|
|
6085
|
+
* @default false
|
|
6086
|
+
*/
|
|
6087
|
+
propertiesRequiredByDefault?: boolean;
|
|
6075
6088
|
/**
|
|
6076
6089
|
* Your schemas might contain read-only or write-only fields. Using such
|
|
6077
6090
|
* schemas directly could mean asking the user to provide a read-only
|
|
@@ -6159,7 +6172,7 @@ type Parser = {
|
|
|
6159
6172
|
validate_EXPERIMENTAL?: boolean | 'strict' | 'warn';
|
|
6160
6173
|
};
|
|
6161
6174
|
|
|
6162
|
-
type
|
|
6175
|
+
type Parser = {
|
|
6163
6176
|
/**
|
|
6164
6177
|
* Filters can be used to select a subset of your input before it's passed
|
|
6165
6178
|
* to plugins.
|
|
@@ -6236,6 +6249,19 @@ type ResolvedParser = {
|
|
|
6236
6249
|
*/
|
|
6237
6250
|
name: StringName;
|
|
6238
6251
|
};
|
|
6252
|
+
/**
|
|
6253
|
+
* By default, any object schema with a missing `required` keyword is
|
|
6254
|
+
* interpreted as "no properties are required." This is the correct
|
|
6255
|
+
* behavior according to the OpenAPI standard. However, some specifications
|
|
6256
|
+
* interpret a missing `required` keyword as "all properties should be
|
|
6257
|
+
* required."
|
|
6258
|
+
*
|
|
6259
|
+
* This option allows you to change the default behavior so that
|
|
6260
|
+
* properties are required by default unless explicitly marked as optional.
|
|
6261
|
+
*
|
|
6262
|
+
* @default false
|
|
6263
|
+
*/
|
|
6264
|
+
propertiesRequiredByDefault: boolean;
|
|
6239
6265
|
/**
|
|
6240
6266
|
* Your schemas might contain read-only or write-only fields. Using such
|
|
6241
6267
|
* schemas directly could mean asking the user to provide a read-only
|
|
@@ -6565,7 +6591,7 @@ type Patch = {
|
|
|
6565
6591
|
version?: string | ((version: string) => string);
|
|
6566
6592
|
};
|
|
6567
6593
|
|
|
6568
|
-
interface UserConfig$
|
|
6594
|
+
interface UserConfig$p {
|
|
6569
6595
|
/**
|
|
6570
6596
|
* Path to the config file. Set this value if you don't use the default
|
|
6571
6597
|
* config file name, or it's not located in the project root.
|
|
@@ -6618,7 +6644,7 @@ interface UserConfig$o {
|
|
|
6618
6644
|
* Customize how the input is parsed and transformed before it's passed to
|
|
6619
6645
|
* plugins.
|
|
6620
6646
|
*/
|
|
6621
|
-
parser?:
|
|
6647
|
+
parser?: UserParser;
|
|
6622
6648
|
/**
|
|
6623
6649
|
* Plugins generate artifacts from `input`. By default, we generate SDK
|
|
6624
6650
|
* functions and TypeScript interfaces. If you manually define `plugins`,
|
|
@@ -6690,7 +6716,7 @@ interface UserConfig$o {
|
|
|
6690
6716
|
}
|
|
6691
6717
|
|
|
6692
6718
|
type Config$c = Omit<
|
|
6693
|
-
Required<UserConfig$
|
|
6719
|
+
Required<UserConfig$p>,
|
|
6694
6720
|
| 'base'
|
|
6695
6721
|
| 'input'
|
|
6696
6722
|
| 'logs'
|
|
@@ -6701,7 +6727,7 @@ type Config$c = Omit<
|
|
|
6701
6727
|
| 'request'
|
|
6702
6728
|
| 'watch'
|
|
6703
6729
|
> &
|
|
6704
|
-
Pick<UserConfig$
|
|
6730
|
+
Pick<UserConfig$p, 'base' | 'name' | 'request'> & {
|
|
6705
6731
|
input: Omit<Input, 'path' | 'watch'> &
|
|
6706
6732
|
Pick<Required<Input>, 'path'> & { watch: Watch };
|
|
6707
6733
|
logs: Logs;
|
|
@@ -6710,7 +6736,7 @@ type Config$c = Omit<
|
|
|
6710
6736
|
* Customize how the input is parsed and transformed before it's passed to
|
|
6711
6737
|
* plugins.
|
|
6712
6738
|
*/
|
|
6713
|
-
parser:
|
|
6739
|
+
parser: Parser;
|
|
6714
6740
|
pluginOrder: ReadonlyArray<keyof PluginConfigMap>;
|
|
6715
6741
|
plugins: {
|
|
6716
6742
|
[K in PluginNames]?: Plugin.ConfigWithName<PluginConfigMap[K]>;
|
|
@@ -7760,6 +7786,7 @@ type PluginClientNames =
|
|
|
7760
7786
|
| '@hey-api/client-fetch'
|
|
7761
7787
|
| '@hey-api/client-next'
|
|
7762
7788
|
| '@hey-api/client-nuxt'
|
|
7789
|
+
| '@hey-api/client-ofetch'
|
|
7763
7790
|
| 'legacy/angular'
|
|
7764
7791
|
| 'legacy/axios'
|
|
7765
7792
|
| 'legacy/fetch'
|
|
@@ -7920,8 +7947,8 @@ type DefinePlugin<
|
|
|
7920
7947
|
Types: Plugin.Types<Config, ResolvedConfig, Api>;
|
|
7921
7948
|
};
|
|
7922
7949
|
|
|
7923
|
-
type SelectorType$
|
|
7924
|
-
type IApi$
|
|
7950
|
+
type SelectorType$j = 'class' | 'httpRequest' | 'httpResource' | 'HttpRequest' | 'inject' | 'Injectable';
|
|
7951
|
+
type IApi$j = {
|
|
7925
7952
|
/**
|
|
7926
7953
|
* @param type Selector type.
|
|
7927
7954
|
* @param value Depends on `type`:
|
|
@@ -7933,10 +7960,10 @@ type IApi$i = {
|
|
|
7933
7960
|
* - `Injectable`: never
|
|
7934
7961
|
* @returns Selector array
|
|
7935
7962
|
*/
|
|
7936
|
-
getSelector: (type: SelectorType$
|
|
7963
|
+
getSelector: (type: SelectorType$j, value?: string) => Selector;
|
|
7937
7964
|
};
|
|
7938
7965
|
|
|
7939
|
-
type UserConfig$
|
|
7966
|
+
type UserConfig$o = Plugin.Name<'@angular/common'> &
|
|
7940
7967
|
Plugin.Hooks & {
|
|
7941
7968
|
/**
|
|
7942
7969
|
* Should the exports from the generated files be re-exported in the index
|
|
@@ -8075,7 +8102,18 @@ type Config$b = Plugin.Name<'@angular/common'> &
|
|
|
8075
8102
|
};
|
|
8076
8103
|
};
|
|
8077
8104
|
|
|
8078
|
-
type AngularCommonPlugin = DefinePlugin<UserConfig$
|
|
8105
|
+
type AngularCommonPlugin = DefinePlugin<UserConfig$o, Config$b, IApi$j>;
|
|
8106
|
+
|
|
8107
|
+
type SelectorType$i = 'client';
|
|
8108
|
+
type IApi$i = {
|
|
8109
|
+
/**
|
|
8110
|
+
* @param type Selector type.
|
|
8111
|
+
* @param value Depends on `type`:
|
|
8112
|
+
* - `client`: never
|
|
8113
|
+
* @returns Selector array
|
|
8114
|
+
*/
|
|
8115
|
+
getSelector: (type: SelectorType$i, value?: string) => Selector;
|
|
8116
|
+
};
|
|
8079
8117
|
|
|
8080
8118
|
type SelectorType$h = 'client';
|
|
8081
8119
|
type IApi$h = {
|
|
@@ -8088,6 +8126,22 @@ type IApi$h = {
|
|
|
8088
8126
|
getSelector: (type: SelectorType$h, value?: string) => Selector;
|
|
8089
8127
|
};
|
|
8090
8128
|
|
|
8129
|
+
type UserConfig$n = Plugin.Name<'@hey-api/client-axios'> &
|
|
8130
|
+
Client.Config & {
|
|
8131
|
+
/**
|
|
8132
|
+
* Throw an error instead of returning it in the response?
|
|
8133
|
+
*
|
|
8134
|
+
* @default false
|
|
8135
|
+
*/
|
|
8136
|
+
throwOnError?: boolean;
|
|
8137
|
+
};
|
|
8138
|
+
|
|
8139
|
+
type HeyApiClientAxiosPlugin = DefinePlugin<
|
|
8140
|
+
UserConfig$n,
|
|
8141
|
+
UserConfig$n,
|
|
8142
|
+
IApi$h
|
|
8143
|
+
>;
|
|
8144
|
+
|
|
8091
8145
|
type SelectorType$g = 'client';
|
|
8092
8146
|
type IApi$g = {
|
|
8093
8147
|
/**
|
|
@@ -8099,7 +8153,7 @@ type IApi$g = {
|
|
|
8099
8153
|
getSelector: (type: SelectorType$g, value?: string) => Selector;
|
|
8100
8154
|
};
|
|
8101
8155
|
|
|
8102
|
-
type UserConfig$m = Plugin.Name<'@hey-api/client-
|
|
8156
|
+
type UserConfig$m = Plugin.Name<'@hey-api/client-fetch'> &
|
|
8103
8157
|
Client.Config & {
|
|
8104
8158
|
/**
|
|
8105
8159
|
* Throw an error instead of returning it in the response?
|
|
@@ -8109,7 +8163,7 @@ type UserConfig$m = Plugin.Name<'@hey-api/client-axios'> &
|
|
|
8109
8163
|
throwOnError?: boolean;
|
|
8110
8164
|
};
|
|
8111
8165
|
|
|
8112
|
-
type
|
|
8166
|
+
type HeyApiClientFetchPlugin = DefinePlugin<
|
|
8113
8167
|
UserConfig$m,
|
|
8114
8168
|
UserConfig$m,
|
|
8115
8169
|
IApi$g
|
|
@@ -8126,7 +8180,7 @@ type IApi$f = {
|
|
|
8126
8180
|
getSelector: (type: SelectorType$f, value?: string) => Selector;
|
|
8127
8181
|
};
|
|
8128
8182
|
|
|
8129
|
-
type UserConfig$l = Plugin.Name<'@hey-api/client-
|
|
8183
|
+
type UserConfig$l = Plugin.Name<'@hey-api/client-next'> &
|
|
8130
8184
|
Client.Config & {
|
|
8131
8185
|
/**
|
|
8132
8186
|
* Throw an error instead of returning it in the response?
|
|
@@ -8136,11 +8190,7 @@ type UserConfig$l = Plugin.Name<'@hey-api/client-fetch'> &
|
|
|
8136
8190
|
throwOnError?: boolean;
|
|
8137
8191
|
};
|
|
8138
8192
|
|
|
8139
|
-
type
|
|
8140
|
-
UserConfig$l,
|
|
8141
|
-
UserConfig$l,
|
|
8142
|
-
IApi$f
|
|
8143
|
-
>;
|
|
8193
|
+
type HeyApiClientNextPlugin = DefinePlugin<UserConfig$l, UserConfig$l, IApi$f>;
|
|
8144
8194
|
|
|
8145
8195
|
type SelectorType$e = 'client';
|
|
8146
8196
|
type IApi$e = {
|
|
@@ -8153,17 +8203,9 @@ type IApi$e = {
|
|
|
8153
8203
|
getSelector: (type: SelectorType$e, value?: string) => Selector;
|
|
8154
8204
|
};
|
|
8155
8205
|
|
|
8156
|
-
type UserConfig$k = Plugin.Name<'@hey-api/client-
|
|
8157
|
-
Client.Config & {
|
|
8158
|
-
/**
|
|
8159
|
-
* Throw an error instead of returning it in the response?
|
|
8160
|
-
*
|
|
8161
|
-
* @default false
|
|
8162
|
-
*/
|
|
8163
|
-
throwOnError?: boolean;
|
|
8164
|
-
};
|
|
8206
|
+
type UserConfig$k = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
|
|
8165
8207
|
|
|
8166
|
-
type
|
|
8208
|
+
type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$k, UserConfig$k, IApi$e>;
|
|
8167
8209
|
|
|
8168
8210
|
type SelectorType$d = 'client';
|
|
8169
8211
|
type IApi$d = {
|
|
@@ -8176,9 +8218,21 @@ type IApi$d = {
|
|
|
8176
8218
|
getSelector: (type: SelectorType$d, value?: string) => Selector;
|
|
8177
8219
|
};
|
|
8178
8220
|
|
|
8179
|
-
type UserConfig$j = Plugin.Name<'@hey-api/client-
|
|
8221
|
+
type UserConfig$j = Plugin.Name<'@hey-api/client-ofetch'> &
|
|
8222
|
+
Client.Config & {
|
|
8223
|
+
/**
|
|
8224
|
+
* Throw an error instead of returning it in the response?
|
|
8225
|
+
*
|
|
8226
|
+
* @default false
|
|
8227
|
+
*/
|
|
8228
|
+
throwOnError?: boolean;
|
|
8229
|
+
};
|
|
8180
8230
|
|
|
8181
|
-
type
|
|
8231
|
+
type HeyApiClientOfetchPlugin = DefinePlugin<
|
|
8232
|
+
UserConfig$j,
|
|
8233
|
+
UserConfig$j,
|
|
8234
|
+
IApi$d
|
|
8235
|
+
>;
|
|
8182
8236
|
|
|
8183
8237
|
interface PluginHandler {
|
|
8184
8238
|
(...args: Parameters<HeyApiClientAngularPlugin['Handler']>): void;
|
|
@@ -8186,6 +8240,7 @@ interface PluginHandler {
|
|
|
8186
8240
|
(...args: Parameters<HeyApiClientFetchPlugin['Handler']>): void;
|
|
8187
8241
|
(...args: Parameters<HeyApiClientNextPlugin['Handler']>): void;
|
|
8188
8242
|
(...args: Parameters<HeyApiClientNuxtPlugin['Handler']>): void;
|
|
8243
|
+
(...args: Parameters<HeyApiClientOfetchPlugin['Handler']>): void;
|
|
8189
8244
|
}
|
|
8190
8245
|
|
|
8191
8246
|
/**
|
|
@@ -8259,7 +8314,7 @@ type UserConfig$i = Plugin.Name<'@hey-api/client-angular'> &
|
|
|
8259
8314
|
type HeyApiClientAngularPlugin = DefinePlugin<
|
|
8260
8315
|
UserConfig$i,
|
|
8261
8316
|
UserConfig$i,
|
|
8262
|
-
IApi$
|
|
8317
|
+
IApi$i
|
|
8263
8318
|
>;
|
|
8264
8319
|
|
|
8265
8320
|
type UserConfig$h = Plugin.Name<'legacy/angular'> &
|
|
@@ -13687,6 +13742,7 @@ interface PluginConfigMap {
|
|
|
13687
13742
|
'@hey-api/client-fetch': HeyApiClientFetchPlugin['Types'];
|
|
13688
13743
|
'@hey-api/client-next': HeyApiClientNextPlugin['Types'];
|
|
13689
13744
|
'@hey-api/client-nuxt': HeyApiClientNuxtPlugin['Types'];
|
|
13745
|
+
'@hey-api/client-ofetch': HeyApiClientOfetchPlugin['Types'];
|
|
13690
13746
|
'@hey-api/schemas': HeyApiSchemasPlugin['Types'];
|
|
13691
13747
|
'@hey-api/sdk': HeyApiSdkPlugin['Types'];
|
|
13692
13748
|
'@hey-api/transformers': HeyApiTransformersPlugin['Types'];
|
|
@@ -14134,4 +14190,4 @@ interface WatchValues {
|
|
|
14134
14190
|
lastValue?: string;
|
|
14135
14191
|
}
|
|
14136
14192
|
|
|
14137
|
-
export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, Logger as L, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type TypeTransformer as T, type UserConfig$
|
|
14193
|
+
export { type Comments as C, type DefinePlugin as D, type ExpressionTransformer as E, type ImportExportItemObject as I, Logger as L, OpenApi$3 as O, type PluginHandler as P, type StringCase as S, type TypeTransformer as T, type UserConfig$p as U, type WatchValues as W, Plugin as a, type Client$1 as b, IR$1 as c, OpenApiMetaObject as d, OpenApiOperationObject as e, OpenApiParameterObject as f, OpenApiRequestBodyObject as g, OpenApiResponseObject as h, OpenApiSchemaObject as i, Client as j, LegacyIR as k, type Config$c as l, tsNodeToString as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hey-api/openapi-ts",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.2",
|
|
4
4
|
"description": "🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.",
|
|
5
5
|
"homepage": "https://heyapi.dev/",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"next.js",
|
|
31
31
|
"node",
|
|
32
32
|
"nuxt",
|
|
33
|
+
"ofetch",
|
|
33
34
|
"openapi",
|
|
34
35
|
"rest",
|
|
35
36
|
"swagger",
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
"glob": "10.4.3",
|
|
110
111
|
"node-fetch": "3.3.2",
|
|
111
112
|
"nuxt": "3.14.1592",
|
|
113
|
+
"ofetch": "1.4.1",
|
|
112
114
|
"prettier": "3.4.2",
|
|
113
115
|
"rxjs": "7.8.1",
|
|
114
116
|
"ts-node": "10.9.2",
|