@hey-api/openapi-ts 0.64.15 → 0.65.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/bin/index.cjs +7 -0
- package/dist/index.cjs +55 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -3
- package/dist/index.d.ts +44 -3
- package/dist/index.js +56 -56
- package/dist/index.js.map +1 -1
- package/package.json +7 -34
package/dist/index.d.cts
CHANGED
|
@@ -6468,7 +6468,7 @@ declare namespace Plugin {
|
|
|
6468
6468
|
};
|
|
6469
6469
|
|
|
6470
6470
|
export type DefineConfig<Config extends BaseConfig> = (
|
|
6471
|
-
config?: Plugin.UserConfig<Config
|
|
6471
|
+
config?: Plugin.UserConfig<Omit<Config, 'name'>>,
|
|
6472
6472
|
) => Omit<Plugin.Config<Config>, 'name'> & {
|
|
6473
6473
|
/**
|
|
6474
6474
|
* Cast name to `any` so it doesn't throw type error in `plugins` array.
|
|
@@ -6538,6 +6538,14 @@ interface Config$i
|
|
|
6538
6538
|
extends Plugin.Name<'@hey-api/client-nuxt'>,
|
|
6539
6539
|
Client.Config {}
|
|
6540
6540
|
|
|
6541
|
+
type PluginHandler<ReturnType = void> = Plugin.Handler<
|
|
6542
|
+
Omit<
|
|
6543
|
+
Config$h | Config$k | Config$j | Config$i,
|
|
6544
|
+
'name'
|
|
6545
|
+
>,
|
|
6546
|
+
ReturnType
|
|
6547
|
+
>;
|
|
6548
|
+
|
|
6541
6549
|
/**
|
|
6542
6550
|
* Public Client API.
|
|
6543
6551
|
*/
|
|
@@ -6567,6 +6575,16 @@ declare namespace Client {
|
|
|
6567
6575
|
* @default false
|
|
6568
6576
|
*/
|
|
6569
6577
|
bundle?: boolean;
|
|
6578
|
+
/**
|
|
6579
|
+
* **This is an experimental feature.**
|
|
6580
|
+
*
|
|
6581
|
+
* When `bundle` is set to `true`, you can optionally set this option
|
|
6582
|
+
* to `true` to bundle the client source code instead of the `dist` folder.
|
|
6583
|
+
* This will copy the TypeScript files instead of CJS/ESM JavaScript files.
|
|
6584
|
+
*
|
|
6585
|
+
* @default false
|
|
6586
|
+
*/
|
|
6587
|
+
bundleSource_EXPERIMENTAL?: boolean;
|
|
6570
6588
|
/**
|
|
6571
6589
|
* Should the exports from the generated files be re-exported in the index
|
|
6572
6590
|
* barrel file?
|
|
@@ -7160,6 +7178,11 @@ interface Input {
|
|
|
7160
7178
|
* schema: '^#/components/schemas/Foo$'
|
|
7161
7179
|
*/
|
|
7162
7180
|
exclude?: string;
|
|
7181
|
+
/**
|
|
7182
|
+
* You pass any valid Fetch API options to the request for fetching your
|
|
7183
|
+
* specification. This is useful if your file is behind auth for example.
|
|
7184
|
+
*/
|
|
7185
|
+
fetch?: RequestInit;
|
|
7163
7186
|
/**
|
|
7164
7187
|
* Process only parts matching the regular expression. You can select both
|
|
7165
7188
|
* operations and components by reference within the bundled input. In
|
|
@@ -7244,7 +7267,7 @@ interface UserConfig {
|
|
|
7244
7267
|
input:
|
|
7245
7268
|
| 'https://get.heyapi.dev/<organization>/<project>'
|
|
7246
7269
|
| (string & {})
|
|
7247
|
-
| Record<string, unknown>
|
|
7270
|
+
| (Record<string, unknown> & { path?: never })
|
|
7248
7271
|
| Input;
|
|
7249
7272
|
/**
|
|
7250
7273
|
* The relative location of the logs folder
|
|
@@ -7254,6 +7277,12 @@ interface UserConfig {
|
|
|
7254
7277
|
logs?:
|
|
7255
7278
|
| string
|
|
7256
7279
|
| {
|
|
7280
|
+
/**
|
|
7281
|
+
* Whether or not error logs should be written to a file or not
|
|
7282
|
+
*
|
|
7283
|
+
* @default true
|
|
7284
|
+
* */
|
|
7285
|
+
file?: boolean;
|
|
7257
7286
|
/**
|
|
7258
7287
|
* The logging level to control the verbosity of log output.
|
|
7259
7288
|
* Determines which messages are logged based on their severity.
|
|
@@ -7279,6 +7308,7 @@ interface UserConfig {
|
|
|
7279
7308
|
| 'silent'
|
|
7280
7309
|
| 'trace'
|
|
7281
7310
|
| 'warn';
|
|
7311
|
+
|
|
7282
7312
|
/**
|
|
7283
7313
|
* The relative location of the logs folder
|
|
7284
7314
|
*
|
|
@@ -7875,6 +7905,17 @@ declare namespace IR {
|
|
|
7875
7905
|
*/
|
|
7876
7906
|
declare const defaultPlugins: readonly ["@hey-api/typescript", "@hey-api/sdk"];
|
|
7877
7907
|
|
|
7908
|
+
declare const clientDefaultConfig: {
|
|
7909
|
+
readonly _dependencies: readonly ["@hey-api/typescript"];
|
|
7910
|
+
readonly _tags: readonly ["client"];
|
|
7911
|
+
readonly baseUrl: true;
|
|
7912
|
+
readonly bundle: false;
|
|
7913
|
+
readonly exportFromIndex: false;
|
|
7914
|
+
readonly output: "client";
|
|
7915
|
+
};
|
|
7916
|
+
|
|
7917
|
+
declare const clientPluginHandler: PluginHandler;
|
|
7918
|
+
|
|
7878
7919
|
declare namespace LegacyIR {
|
|
7879
7920
|
export type LegacyOperation = Operation;
|
|
7880
7921
|
}
|
|
@@ -7899,4 +7940,4 @@ declare const createClient: (userConfig?: Configs) => Promise<ReadonlyArray<Clie
|
|
|
7899
7940
|
*/
|
|
7900
7941
|
declare const defineConfig: (config: Configs) => Promise<UserConfig>;
|
|
7901
7942
|
|
|
7902
|
-
export { IR, LegacyIR, OpenApi, Plugin, type UserConfig, createClient, defaultPlugins, defineConfig, utils };
|
|
7943
|
+
export { Client, IR, LegacyIR, OpenApi, Plugin, type UserConfig, clientDefaultConfig, clientPluginHandler, createClient, defaultPlugins, defineConfig, utils };
|
package/dist/index.d.ts
CHANGED
|
@@ -6468,7 +6468,7 @@ declare namespace Plugin {
|
|
|
6468
6468
|
};
|
|
6469
6469
|
|
|
6470
6470
|
export type DefineConfig<Config extends BaseConfig> = (
|
|
6471
|
-
config?: Plugin.UserConfig<Config
|
|
6471
|
+
config?: Plugin.UserConfig<Omit<Config, 'name'>>,
|
|
6472
6472
|
) => Omit<Plugin.Config<Config>, 'name'> & {
|
|
6473
6473
|
/**
|
|
6474
6474
|
* Cast name to `any` so it doesn't throw type error in `plugins` array.
|
|
@@ -6538,6 +6538,14 @@ interface Config$i
|
|
|
6538
6538
|
extends Plugin.Name<'@hey-api/client-nuxt'>,
|
|
6539
6539
|
Client.Config {}
|
|
6540
6540
|
|
|
6541
|
+
type PluginHandler<ReturnType = void> = Plugin.Handler<
|
|
6542
|
+
Omit<
|
|
6543
|
+
Config$h | Config$k | Config$j | Config$i,
|
|
6544
|
+
'name'
|
|
6545
|
+
>,
|
|
6546
|
+
ReturnType
|
|
6547
|
+
>;
|
|
6548
|
+
|
|
6541
6549
|
/**
|
|
6542
6550
|
* Public Client API.
|
|
6543
6551
|
*/
|
|
@@ -6567,6 +6575,16 @@ declare namespace Client {
|
|
|
6567
6575
|
* @default false
|
|
6568
6576
|
*/
|
|
6569
6577
|
bundle?: boolean;
|
|
6578
|
+
/**
|
|
6579
|
+
* **This is an experimental feature.**
|
|
6580
|
+
*
|
|
6581
|
+
* When `bundle` is set to `true`, you can optionally set this option
|
|
6582
|
+
* to `true` to bundle the client source code instead of the `dist` folder.
|
|
6583
|
+
* This will copy the TypeScript files instead of CJS/ESM JavaScript files.
|
|
6584
|
+
*
|
|
6585
|
+
* @default false
|
|
6586
|
+
*/
|
|
6587
|
+
bundleSource_EXPERIMENTAL?: boolean;
|
|
6570
6588
|
/**
|
|
6571
6589
|
* Should the exports from the generated files be re-exported in the index
|
|
6572
6590
|
* barrel file?
|
|
@@ -7160,6 +7178,11 @@ interface Input {
|
|
|
7160
7178
|
* schema: '^#/components/schemas/Foo$'
|
|
7161
7179
|
*/
|
|
7162
7180
|
exclude?: string;
|
|
7181
|
+
/**
|
|
7182
|
+
* You pass any valid Fetch API options to the request for fetching your
|
|
7183
|
+
* specification. This is useful if your file is behind auth for example.
|
|
7184
|
+
*/
|
|
7185
|
+
fetch?: RequestInit;
|
|
7163
7186
|
/**
|
|
7164
7187
|
* Process only parts matching the regular expression. You can select both
|
|
7165
7188
|
* operations and components by reference within the bundled input. In
|
|
@@ -7244,7 +7267,7 @@ interface UserConfig {
|
|
|
7244
7267
|
input:
|
|
7245
7268
|
| 'https://get.heyapi.dev/<organization>/<project>'
|
|
7246
7269
|
| (string & {})
|
|
7247
|
-
| Record<string, unknown>
|
|
7270
|
+
| (Record<string, unknown> & { path?: never })
|
|
7248
7271
|
| Input;
|
|
7249
7272
|
/**
|
|
7250
7273
|
* The relative location of the logs folder
|
|
@@ -7254,6 +7277,12 @@ interface UserConfig {
|
|
|
7254
7277
|
logs?:
|
|
7255
7278
|
| string
|
|
7256
7279
|
| {
|
|
7280
|
+
/**
|
|
7281
|
+
* Whether or not error logs should be written to a file or not
|
|
7282
|
+
*
|
|
7283
|
+
* @default true
|
|
7284
|
+
* */
|
|
7285
|
+
file?: boolean;
|
|
7257
7286
|
/**
|
|
7258
7287
|
* The logging level to control the verbosity of log output.
|
|
7259
7288
|
* Determines which messages are logged based on their severity.
|
|
@@ -7279,6 +7308,7 @@ interface UserConfig {
|
|
|
7279
7308
|
| 'silent'
|
|
7280
7309
|
| 'trace'
|
|
7281
7310
|
| 'warn';
|
|
7311
|
+
|
|
7282
7312
|
/**
|
|
7283
7313
|
* The relative location of the logs folder
|
|
7284
7314
|
*
|
|
@@ -7875,6 +7905,17 @@ declare namespace IR {
|
|
|
7875
7905
|
*/
|
|
7876
7906
|
declare const defaultPlugins: readonly ["@hey-api/typescript", "@hey-api/sdk"];
|
|
7877
7907
|
|
|
7908
|
+
declare const clientDefaultConfig: {
|
|
7909
|
+
readonly _dependencies: readonly ["@hey-api/typescript"];
|
|
7910
|
+
readonly _tags: readonly ["client"];
|
|
7911
|
+
readonly baseUrl: true;
|
|
7912
|
+
readonly bundle: false;
|
|
7913
|
+
readonly exportFromIndex: false;
|
|
7914
|
+
readonly output: "client";
|
|
7915
|
+
};
|
|
7916
|
+
|
|
7917
|
+
declare const clientPluginHandler: PluginHandler;
|
|
7918
|
+
|
|
7878
7919
|
declare namespace LegacyIR {
|
|
7879
7920
|
export type LegacyOperation = Operation;
|
|
7880
7921
|
}
|
|
@@ -7899,4 +7940,4 @@ declare const createClient: (userConfig?: Configs) => Promise<ReadonlyArray<Clie
|
|
|
7899
7940
|
*/
|
|
7900
7941
|
declare const defineConfig: (config: Configs) => Promise<UserConfig>;
|
|
7901
7942
|
|
|
7902
|
-
export { IR, LegacyIR, OpenApi, Plugin, type UserConfig, createClient, defaultPlugins, defineConfig, utils };
|
|
7943
|
+
export { Client, IR, LegacyIR, OpenApi, Plugin, type UserConfig, clientDefaultConfig, clientPluginHandler, createClient, defaultPlugins, defineConfig, utils };
|