@hey-api/openapi-ts 0.90.8 → 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 CHANGED
@@ -214,15 +214,9 @@ bun add @hey-api/openapi-ts -D -E
214
214
 
215
215
  ### Versioning
216
216
 
217
- This package does NOT follow the [semantic versioning](https://semver.org/) strategy. Please pin an exact version so you can safely upgrade when you're ready.
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
- Due to the nature of the package, we use the following versioning strategy.
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,6 +1,6 @@
1
1
 
2
- const require_openApi = require('./openApi-BZ7m5ia5.cjs');
3
- const require_src = require('./src-Dbxz7RgS.cjs');
2
+ const require_openApi = require('./openApi-BaGlRfMs.cjs');
3
+ const require_src = require('./src-CO2t0IHm.cjs');
4
4
  let _hey_api_codegen_core = require("@hey-api/codegen-core");
5
5
 
6
6
  exports.$ = require_openApi.$;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
 
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-DzR_aHdx.cjs";
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
3
  import { Logger } from "@hey-api/codegen-core";
4
4
  import { LazyOrAsync, MaybeArray } from "@hey-api/types";
5
5
  import { HttpClient, HttpErrorResponse, HttpHeaders, HttpRequest, HttpResponse } from "@angular/common/http";
@@ -881,7 +881,7 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
881
881
  *
882
882
  * @param userConfig User provided {@link UserConfig} configuration(s).
883
883
  */
884
- declare const createClient: (userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: any) => Promise<ReadonlyArray<Context>>;
884
+ declare function createClient(userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: any): Promise<ReadonlyArray<Context>>;
885
885
  //#endregion
886
886
  //#region src/config/parser.d.ts
887
887
  declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"];
@@ -982,9 +982,9 @@ declare module '@hey-api/codegen-core' {
982
982
  }
983
983
  }
984
984
  /**
985
- * Type helper for openapi-ts.config.ts, returns {@link MaybeArray<UserConfig>} object(s)
985
+ * Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)
986
986
  */
987
- declare const defineConfig: <T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>) => Promise<T>;
987
+ declare function defineConfig<T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>): Promise<T>;
988
988
  //#endregion
989
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 };
990
990
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
 
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-ByDiVB9E.mjs";
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
3
  import { Logger } from "@hey-api/codegen-core";
4
4
  import { LazyOrAsync, MaybeArray } from "@hey-api/types";
5
5
 
@@ -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 const createClient: (userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: any) => Promise<ReadonlyArray<Context>>;
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 openapi-ts.config.ts, returns {@link MaybeArray<UserConfig>} object(s)
114
+ * Type helper for configuration object, returns {@link MaybeArray<UserConfig>} object(s)
115
115
  */
116
- declare const defineConfig: <T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>) => Promise<T>;
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-B6J9qPwL.mjs";
3
- import { i as createClient, n as defineConfig, r as utils, t as Logger } from "./src-C9rj3EgV.mjs";
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-BZ7m5ia5.cjs');
2
+ const require_openApi = require('./openApi-BaGlRfMs.cjs');
3
3
 
4
4
  exports.getSpec = require_openApi.getSpec;
5
- exports.initConfigs = require_openApi.initConfigs;
5
+ exports.initConfigs = require_openApi.resolveJobs;
6
6
  exports.parseOpenApiSpec = require_openApi.parseOpenApiSpec;
@@ -1,28 +1,34 @@
1
1
 
2
- import { n as UserConfig, p as Context, r as Input, t as Config } from "./types-DzR_aHdx.cjs";
2
+ import { n as UserConfig, p as Context, r as Input, t as Config } from "./types-WLqvV8HC.cjs";
3
3
  import { Logger } from "@hey-api/codegen-core";
4
4
  import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
5
5
 
6
- //#region src/config/init.d.ts
7
- type ConfigResult = {
6
+ //#region src/config/resolve.d.ts
7
+ type ResolvedJob = {
8
8
  config: Config;
9
- errors: ReadonlyArray<Error>;
10
- jobIndex: number;
9
+ errors: Array<Error>;
10
+ index: number;
11
11
  };
12
+ //#endregion
13
+ //#region src/config/init.d.ts
12
14
  type Configs = {
13
15
  dependencies: Record<string, string>;
14
- results: ReadonlyArray<ConfigResult>;
16
+ jobs: ReadonlyArray<ResolvedJob>;
17
+ /**
18
+ * @deprecated Use `jobs` instead.
19
+ */
20
+ results: ReadonlyArray<ResolvedJob>;
15
21
  };
16
22
  /**
17
23
  * @internal
18
24
  */
19
- declare const initConfigs: ({
25
+ declare function resolveJobs({
20
26
  logger,
21
27
  userConfigs
22
28
  }: {
23
29
  logger: Logger;
24
30
  userConfigs: ReadonlyArray<UserConfig>;
25
- }) => Promise<Configs>;
31
+ }): Promise<Configs>;
26
32
  //#endregion
27
33
  //#region src/types/types.d.ts
28
34
  interface WatchValues {
@@ -89,5 +95,5 @@ declare const parseOpenApiSpec: ({
89
95
  spec: unknown;
90
96
  }) => Context;
91
97
  //#endregion
92
- export { getSpec, initConfigs, parseOpenApiSpec };
98
+ export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
93
99
  //# sourceMappingURL=internal.d.cts.map
@@ -1,28 +1,34 @@
1
1
 
2
- import { n as UserConfig, p as Context, r as Input, t as Config } from "./types-ByDiVB9E.mjs";
2
+ import { n as UserConfig, p as Context, r as Input, t as Config } from "./types-CQTciSfa.mjs";
3
3
  import { Logger } from "@hey-api/codegen-core";
4
4
  import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
5
5
 
6
- //#region src/config/init.d.ts
7
- type ConfigResult = {
6
+ //#region src/config/resolve.d.ts
7
+ type ResolvedJob = {
8
8
  config: Config;
9
- errors: ReadonlyArray<Error>;
10
- jobIndex: number;
9
+ errors: Array<Error>;
10
+ index: number;
11
11
  };
12
+ //#endregion
13
+ //#region src/config/init.d.ts
12
14
  type Configs = {
13
15
  dependencies: Record<string, string>;
14
- results: ReadonlyArray<ConfigResult>;
16
+ jobs: ReadonlyArray<ResolvedJob>;
17
+ /**
18
+ * @deprecated Use `jobs` instead.
19
+ */
20
+ results: ReadonlyArray<ResolvedJob>;
15
21
  };
16
22
  /**
17
23
  * @internal
18
24
  */
19
- declare const initConfigs: ({
25
+ declare function resolveJobs({
20
26
  logger,
21
27
  userConfigs
22
28
  }: {
23
29
  logger: Logger;
24
30
  userConfigs: ReadonlyArray<UserConfig>;
25
- }) => Promise<Configs>;
31
+ }): Promise<Configs>;
26
32
  //#endregion
27
33
  //#region src/types/types.d.ts
28
34
  interface WatchValues {
@@ -89,5 +95,5 @@ declare const parseOpenApiSpec: ({
89
95
  spec: unknown;
90
96
  }) => Context;
91
97
  //#endregion
92
- export { getSpec, initConfigs, parseOpenApiSpec };
98
+ export { getSpec, resolveJobs as initConfigs, parseOpenApiSpec };
93
99
  //# sourceMappingURL=internal.d.mts.map
package/dist/internal.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
 
2
- import { i as initConfigs, r as getSpec, t as parseOpenApiSpec } from "./openApi-B6J9qPwL.mjs";
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 };