@hey-api/openapi-ts 0.90.7 → 0.90.9
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 +2 -8
- package/dist/index.cjs +9 -3
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- package/dist/internal.cjs +2 -2
- package/dist/internal.d.cts +16 -9
- package/dist/internal.d.mts +16 -9
- package/dist/internal.mjs +2 -2
- package/dist/{openApi-BZ7m5ia5.cjs → openApi-BaGlRfMs.cjs} +249 -211
- package/dist/openApi-BaGlRfMs.cjs.map +1 -0
- package/dist/{openApi-B6J9qPwL.mjs → openApi-CE_z8tev.mjs} +227 -189
- package/dist/openApi-CE_z8tev.mjs.map +1 -0
- package/dist/run.cjs +40 -48
- package/dist/run.cjs.map +1 -1
- package/dist/run.mjs +41 -49
- package/dist/run.mjs.map +1 -1
- package/dist/{src-BkOFTEi8.cjs → src-CO2t0IHm.cjs} +32 -172
- package/dist/src-CO2t0IHm.cjs.map +1 -0
- package/dist/{src-BehyjtZ7.mjs → src-DqFHTOrs.mjs} +34 -168
- package/dist/src-DqFHTOrs.mjs.map +1 -0
- package/dist/{config-CU3acGju.d.mts → types-CQTciSfa.d.mts} +4495 -4498
- package/dist/{config-BF7XAWuG.d.cts → types-WLqvV8HC.d.cts} +4495 -4498
- package/package.json +3 -4
- package/dist/openApi-B6J9qPwL.mjs.map +0 -1
- package/dist/openApi-BZ7m5ia5.cjs.map +0 -1
- package/dist/src-BehyjtZ7.mjs.map +0 -1
- package/dist/src-BkOFTEi8.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -214,15 +214,9 @@ bun add @hey-api/openapi-ts -D -E
|
|
|
214
214
|
|
|
215
215
|
### Versioning
|
|
216
216
|
|
|
217
|
-
This package
|
|
217
|
+
This package is in [initial development](https://semver.org/#spec-item-4). Please pin an exact version so you can safely upgrade when you're ready.
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
- `1.x.x`: significant breaking changes, reserved for v1 release
|
|
222
|
-
- `x.1.x`: breaking changes
|
|
223
|
-
- `x.x.1`: new features, bug fixes, and non-breaking changes
|
|
224
|
-
|
|
225
|
-
We publish [migration notes](https://heyapi.dev/openapi-ts/migrating) for every breaking release. You might not be impacted by a breaking release if you don't use the affected plugin(s).
|
|
219
|
+
We publish [migration notes](https://heyapi.dev/openapi-ts/migrating) for every breaking release. You might not be impacted by a breaking change if you don't use the affected features.
|
|
226
220
|
|
|
227
221
|
## Usage
|
|
228
222
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
const require_openApi = require('./openApi-
|
|
3
|
-
const require_src = require('./src-
|
|
2
|
+
const require_openApi = require('./openApi-BaGlRfMs.cjs');
|
|
3
|
+
const require_src = require('./src-CO2t0IHm.cjs');
|
|
4
|
+
let _hey_api_codegen_core = require("@hey-api/codegen-core");
|
|
4
5
|
|
|
5
6
|
exports.$ = require_openApi.$;
|
|
6
|
-
exports
|
|
7
|
+
Object.defineProperty(exports, 'Logger', {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _hey_api_codegen_core.Logger;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
7
13
|
exports.OperationPath = require_openApi.OperationPath;
|
|
8
14
|
exports.OperationStrategy = require_openApi.OperationStrategy;
|
|
9
15
|
exports.TsDsl = require_openApi.TsDsl;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as CallArgs, C as keywords, D as ExampleOptions, E as TypeTsDsl, M as OperationStrategy, N as Casing, O as TsDslContext, P as IR, S as regexp, T as TsDsl, _ as PluginHandler, a as Plugin, b as reserved, c as OpenApiOperationObject, d as OpenApiResponseObject, f as OpenApiSchemaObject, g as Client$2, h as ExpressionTransformer, i as DefinePlugin, j as OperationPath, k as ctx, l as OpenApiParameterObject, m as TypeTransformer, n as UserConfig, o as OpenApi, p as Context, s as OpenApiMetaObject, u as OpenApiRequestBodyObject, v as $, w as MaybeTsDsl, x as TypeScriptRenderer, y as DollarTsDsl } from "./types-WLqvV8HC.cjs";
|
|
3
|
+
import { Logger } from "@hey-api/codegen-core";
|
|
3
4
|
import { LazyOrAsync, MaybeArray } from "@hey-api/types";
|
|
4
5
|
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpRequest, HttpResponse } from "@angular/common/http";
|
|
5
6
|
import { Injector } from "@angular/core";
|
|
@@ -880,7 +881,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
880
881
|
*
|
|
881
882
|
* @param userConfig User provided {@link UserConfig} configuration(s).
|
|
882
883
|
*/
|
|
883
|
-
declare
|
|
884
|
+
declare function createClient(userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: any): Promise<ReadonlyArray<Context>>;
|
|
884
885
|
//#endregion
|
|
885
886
|
//#region src/config/parser.d.ts
|
|
886
887
|
declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"];
|
|
@@ -981,9 +982,9 @@ declare module '@hey-api/codegen-core' {
|
|
|
981
982
|
}
|
|
982
983
|
}
|
|
983
984
|
/**
|
|
984
|
-
* Type helper for
|
|
985
|
+
* Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)
|
|
985
986
|
*/
|
|
986
|
-
declare
|
|
987
|
+
declare function defineConfig<T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>): Promise<T>;
|
|
987
988
|
//#endregion
|
|
988
989
|
export { $, type Client as AngularClient, type Client$1 as AxiosClient, CallArgs, type Client$2 as Client, type DefinePlugin, DollarTsDsl, ExampleOptions, type ExpressionTransformer, type Client$3 as FetchClient, type IR, Logger, MaybeTsDsl, type Client$4 as NextClient, type Client$5 as NuxtClient, type Client$6 as OfetchClient, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, OperationPath, OperationStrategy, type Plugin, TsDsl, TsDslContext, TypeScriptRenderer, type TypeTransformer, TypeTsDsl, type UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, createClient, ctx, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, keywords, regexp, reserved, utils };
|
|
989
990
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as
|
|
3
|
-
import "@hey-api/codegen-core";
|
|
2
|
+
import { A as MaybeTsDsl, B as IR, C as Client, D as TypeScriptRenderer, E as reserved, F as ctx, I as CallArgs, L as OperationPath, M as TypeTsDsl, N as ExampleOptions, O as regexp, P as TsDslContext, R as OperationStrategy, S as Client$1, T as DollarTsDsl, _ as PluginHandler, a as Plugin, b as Client$4, c as OpenApiOperationObject, d as OpenApiResponseObject, f as OpenApiSchemaObject, g as Client$2, h as ExpressionTransformer, i as DefinePlugin, j as TsDsl, k as keywords, l as OpenApiParameterObject, m as TypeTransformer, n as UserConfig, o as OpenApi, p as Context, s as OpenApiMetaObject, u as OpenApiRequestBodyObject, v as Client$6, w as $, x as Client$3, y as Client$5, z as Casing } from "./types-CQTciSfa.mjs";
|
|
3
|
+
import { Logger } from "@hey-api/codegen-core";
|
|
4
4
|
import { LazyOrAsync, MaybeArray } from "@hey-api/types";
|
|
5
5
|
|
|
6
6
|
//#region src/generate.d.ts
|
|
@@ -10,7 +10,7 @@ import { LazyOrAsync, MaybeArray } from "@hey-api/types";
|
|
|
10
10
|
*
|
|
11
11
|
* @param userConfig User provided {@link UserConfig} configuration(s).
|
|
12
12
|
*/
|
|
13
|
-
declare
|
|
13
|
+
declare function createClient(userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: any): Promise<ReadonlyArray<Context>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/config/parser.d.ts
|
|
16
16
|
declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"];
|
|
@@ -111,9 +111,9 @@ declare module '@hey-api/codegen-core' {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* Type helper for
|
|
114
|
+
* Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)
|
|
115
115
|
*/
|
|
116
|
-
declare
|
|
116
|
+
declare function defineConfig<T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>): Promise<T>;
|
|
117
117
|
//#endregion
|
|
118
118
|
export { $, type Client as AngularClient, type Client$1 as AxiosClient, CallArgs, type Client$2 as Client, type DefinePlugin, DollarTsDsl, ExampleOptions, type ExpressionTransformer, type Client$3 as FetchClient, type IR, Logger, MaybeTsDsl, type Client$4 as NextClient, type Client$5 as NuxtClient, type Client$6 as OfetchClient, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, OperationPath, OperationStrategy, type Plugin, TsDsl, TsDslContext, TypeScriptRenderer, type TypeTransformer, TypeTsDsl, type UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, createClient, ctx, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, keywords, regexp, reserved, utils };
|
|
119
119
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { C as defaultPaginationKeywords, S as definePluginConfig, _ as regexp, a as defaultPlugins, b as OperationPath, c as clientDefaultConfig, d as $, f as TypeScriptRenderer, g as keywords, h as reserved, l as clientDefaultMeta, m as ctx, o as clientPluginHandler, p as TsDslContext, v as TsDsl, x as OperationStrategy } from "./openApi-
|
|
3
|
-
import { i as
|
|
2
|
+
import { C as defaultPaginationKeywords, S as definePluginConfig, _ as regexp, a as defaultPlugins, b as OperationPath, c as clientDefaultConfig, d as $, f as TypeScriptRenderer, g as keywords, h as reserved, l as clientDefaultMeta, m as ctx, o as clientPluginHandler, p as TsDslContext, v as TsDsl, x as OperationStrategy } from "./openApi-CE_z8tev.mjs";
|
|
3
|
+
import { i as createClient, n as defineConfig, r as utils, t as Logger } from "./src-DqFHTOrs.mjs";
|
|
4
4
|
|
|
5
5
|
export { $, Logger, OperationPath, OperationStrategy, TsDsl, TsDslContext, TypeScriptRenderer, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, createClient, ctx, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, keywords, regexp, reserved, utils };
|
package/dist/internal.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
const require_openApi = require('./openApi-
|
|
2
|
+
const require_openApi = require('./openApi-BaGlRfMs.cjs');
|
|
3
3
|
|
|
4
4
|
exports.getSpec = require_openApi.getSpec;
|
|
5
|
-
exports.initConfigs = require_openApi.
|
|
5
|
+
exports.initConfigs = require_openApi.resolveJobs;
|
|
6
6
|
exports.parseOpenApiSpec = require_openApi.parseOpenApiSpec;
|
package/dist/internal.d.cts
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { n as UserConfig, p as Context, r as Input, t as Config } from "./types-WLqvV8HC.cjs";
|
|
3
|
+
import { Logger } from "@hey-api/codegen-core";
|
|
3
4
|
import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
|
|
4
5
|
|
|
5
|
-
//#region src/config/
|
|
6
|
-
type
|
|
6
|
+
//#region src/config/resolve.d.ts
|
|
7
|
+
type ResolvedJob = {
|
|
7
8
|
config: Config;
|
|
8
|
-
errors:
|
|
9
|
-
|
|
9
|
+
errors: Array<Error>;
|
|
10
|
+
index: number;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/config/init.d.ts
|
|
11
14
|
type Configs = {
|
|
12
15
|
dependencies: Record<string, string>;
|
|
13
|
-
|
|
16
|
+
jobs: ReadonlyArray<ResolvedJob>;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `jobs` instead.
|
|
19
|
+
*/
|
|
20
|
+
results: ReadonlyArray<ResolvedJob>;
|
|
14
21
|
};
|
|
15
22
|
/**
|
|
16
23
|
* @internal
|
|
17
24
|
*/
|
|
18
|
-
declare
|
|
25
|
+
declare function resolveJobs({
|
|
19
26
|
logger,
|
|
20
27
|
userConfigs
|
|
21
28
|
}: {
|
|
22
29
|
logger: Logger;
|
|
23
30
|
userConfigs: ReadonlyArray<UserConfig>;
|
|
24
|
-
})
|
|
31
|
+
}): Promise<Configs>;
|
|
25
32
|
//#endregion
|
|
26
33
|
//#region src/types/types.d.ts
|
|
27
34
|
interface WatchValues {
|
|
@@ -88,5 +95,5 @@ declare const parseOpenApiSpec: ({
|
|
|
88
95
|
spec: unknown;
|
|
89
96
|
}) => Context;
|
|
90
97
|
//#endregion
|
|
91
|
-
export { getSpec, initConfigs, parseOpenApiSpec };
|
|
98
|
+
export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
|
|
92
99
|
//# sourceMappingURL=internal.d.cts.map
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { n as UserConfig, p as Context, r as Input, t as Config } from "./types-CQTciSfa.mjs";
|
|
3
|
+
import { Logger } from "@hey-api/codegen-core";
|
|
3
4
|
import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
|
|
4
5
|
|
|
5
|
-
//#region src/config/
|
|
6
|
-
type
|
|
6
|
+
//#region src/config/resolve.d.ts
|
|
7
|
+
type ResolvedJob = {
|
|
7
8
|
config: Config;
|
|
8
|
-
errors:
|
|
9
|
-
|
|
9
|
+
errors: Array<Error>;
|
|
10
|
+
index: number;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/config/init.d.ts
|
|
11
14
|
type Configs = {
|
|
12
15
|
dependencies: Record<string, string>;
|
|
13
|
-
|
|
16
|
+
jobs: ReadonlyArray<ResolvedJob>;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `jobs` instead.
|
|
19
|
+
*/
|
|
20
|
+
results: ReadonlyArray<ResolvedJob>;
|
|
14
21
|
};
|
|
15
22
|
/**
|
|
16
23
|
* @internal
|
|
17
24
|
*/
|
|
18
|
-
declare
|
|
25
|
+
declare function resolveJobs({
|
|
19
26
|
logger,
|
|
20
27
|
userConfigs
|
|
21
28
|
}: {
|
|
22
29
|
logger: Logger;
|
|
23
30
|
userConfigs: ReadonlyArray<UserConfig>;
|
|
24
|
-
})
|
|
31
|
+
}): Promise<Configs>;
|
|
25
32
|
//#endregion
|
|
26
33
|
//#region src/types/types.d.ts
|
|
27
34
|
interface WatchValues {
|
|
@@ -88,5 +95,5 @@ declare const parseOpenApiSpec: ({
|
|
|
88
95
|
spec: unknown;
|
|
89
96
|
}) => Context;
|
|
90
97
|
//#endregion
|
|
91
|
-
export { getSpec, initConfigs, parseOpenApiSpec };
|
|
98
|
+
export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
|
|
92
99
|
//# sourceMappingURL=internal.d.mts.map
|
package/dist/internal.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as
|
|
2
|
+
import { i as resolveJobs, r as getSpec, t as parseOpenApiSpec } from "./openApi-CE_z8tev.mjs";
|
|
3
3
|
|
|
4
|
-
export { getSpec, initConfigs, parseOpenApiSpec };
|
|
4
|
+
export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
|