@hey-api/openapi-ts 0.86.11 → 0.87.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.
Files changed (39) hide show
  1. package/README.md +8 -14
  2. package/dist/clients/angular/types.ts +2 -2
  3. package/dist/clients/axios/types.ts +2 -2
  4. package/dist/clients/core/params.ts +34 -11
  5. package/dist/clients/fetch/types.ts +2 -2
  6. package/dist/clients/next/types.ts +2 -2
  7. package/dist/clients/nuxt/types.ts +1 -1
  8. package/dist/clients/ofetch/types.ts +2 -2
  9. package/dist/{types-CFT9BYmF.d.ts → config-B2o9ax_a.d.cts} +1607 -3076
  10. package/dist/{types-Bxdq98WE.d.cts → config-oAoGatJ7.d.ts} +1770 -2369
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.d.cts +575 -140
  13. package/dist/index.d.ts +439 -878
  14. package/dist/index.js +1 -1
  15. package/dist/internal.cjs +1 -1
  16. package/dist/internal.d.cts +38 -1
  17. package/dist/internal.d.ts +38 -1
  18. package/dist/internal.js +1 -1
  19. package/dist/openApi-BWD76jue.cjs +21 -0
  20. package/dist/openApi-BWD76jue.cjs.map +1 -0
  21. package/dist/openApi-DXfWYPpF.js +21 -0
  22. package/dist/openApi-DXfWYPpF.js.map +1 -0
  23. package/dist/run.cjs +1 -1
  24. package/dist/run.cjs.map +1 -1
  25. package/dist/run.js +1 -1
  26. package/dist/run.js.map +1 -1
  27. package/dist/src-CTUbY-zd.js +11 -0
  28. package/dist/src-CTUbY-zd.js.map +1 -0
  29. package/dist/src-H1fIt1p4.cjs +19 -0
  30. package/dist/src-H1fIt1p4.cjs.map +1 -0
  31. package/package.json +2 -5
  32. package/dist/getSpec-NJ6vig64.js +0 -25
  33. package/dist/getSpec-NJ6vig64.js.map +0 -1
  34. package/dist/getSpec-ekNG3x72.cjs +0 -25
  35. package/dist/getSpec-ekNG3x72.cjs.map +0 -1
  36. package/dist/src-C4Q2-7Ic.js +0 -1310
  37. package/dist/src-C4Q2-7Ic.js.map +0 -1
  38. package/dist/src-Cu5Xi-FZ.cjs +0 -1318
  39. package/dist/src-Cu5Xi-FZ.cjs.map +0 -1
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{_ as e,a as t,b as n,c as r,r as i,s as a,v as o,x as s}from"./getSpec-NJ6vig64.js";import{i as c,n as l,r as u,t as d}from"./src-C4Q2-7Ic.js";export{c as Logger,a as clientDefaultConfig,r as clientDefaultMeta,t as clientPluginHandler,e as compiler,u as createClient,s as defaultPaginationKeywords,i as defaultPlugins,d as defineConfig,n as definePluginConfig,o as tsc,l as utils};
1
+ import{a as e,c as t,d as n,h as r,l as i,m as a,o,u as s}from"./openApi-DXfWYPpF.js";import{i as c,n as l,r as u,t as d}from"./src-CTUbY-zd.js";export{c as Logger,t as clientDefaultConfig,i as clientDefaultMeta,o as clientPluginHandler,s as compiler,u as createClient,r as defaultPaginationKeywords,e as defaultPlugins,d as defineConfig,a as definePluginConfig,n as tsc,l as utils};
package/dist/internal.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./getSpec-ekNG3x72.cjs`);exports.getSpec=e.t,exports.initConfigs=e.n,exports.parseOpenApiSpec=e.u;
1
+ const e=require(`./openApi-BWD76jue.cjs`);exports.getSpec=e.r,exports.initConfigs=e.i,exports.parseOpenApiSpec=e.t;
@@ -1,4 +1,4 @@
1
- import { a as Input, b as parseOpenApiSpec, i as UserConfig, n as WatchValues, r as Config, x as Logger } from "./types-Bxdq98WE.cjs";
1
+ import { m as Logger, n as UserConfig, p as Context, r as Input, t as Config } from "./config-B2o9ax_a.cjs";
2
2
  import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
3
3
 
4
4
  //#region src/config/init.d.ts
@@ -22,6 +22,25 @@ declare const initConfigs: ({
22
22
  userConfigs: ReadonlyArray<UserConfig>;
23
23
  }) => Promise<Configs>;
24
24
  //#endregion
25
+ //#region src/types/types.d.ts
26
+ interface WatchValues {
27
+ /**
28
+ * Headers to be sent with each HEAD and/or GET request. This effectively
29
+ * serves as a mechanism resolver because setting certain headers will opt
30
+ * into comparing the specifications using that method.
31
+ */
32
+ headers: Headers;
33
+ /**
34
+ * Can we send a HEAD request instead of fetching the whole specification?
35
+ * This value will be set after the first successful fetch.
36
+ */
37
+ isHeadMethodSupported?: boolean;
38
+ /**
39
+ * String content of the last successfully fetched specification.
40
+ */
41
+ lastValue?: string;
42
+ }
43
+ //#endregion
25
44
  //#region src/getSpec.d.ts
26
45
  type SpecResponse = {
27
46
  arrayBuffer: ArrayBuffer | undefined;
@@ -50,5 +69,23 @@ declare const getSpec: ({
50
69
  watch: WatchValues;
51
70
  }) => Promise<SpecResponse | SpecError>;
52
71
  //#endregion
72
+ //#region src/openApi/index.d.ts
73
+ /**
74
+ * @internal
75
+ * Parse the resolved OpenAPI specification. This will populate and return
76
+ * `context` with intermediate representation obtained from the parsed spec.
77
+ */
78
+ declare const parseOpenApiSpec: ({
79
+ config,
80
+ dependencies,
81
+ logger,
82
+ spec
83
+ }: {
84
+ config: Config;
85
+ dependencies: Record<string, string>;
86
+ logger: Logger;
87
+ spec: unknown;
88
+ }) => Context;
89
+ //#endregion
53
90
  export { getSpec, initConfigs, parseOpenApiSpec };
54
91
  //# sourceMappingURL=internal.d.cts.map
@@ -1,4 +1,4 @@
1
- import { a as Input, b as parseOpenApiSpec, i as UserConfig, n as WatchValues, r as Config, x as Logger } from "./types-CFT9BYmF.js";
1
+ import { m as Logger, n as UserConfig, p as Context, r as Input, t as Config } from "./config-oAoGatJ7.js";
2
2
  import { getResolvedInput } from "@hey-api/json-schema-ref-parser";
3
3
 
4
4
  //#region src/config/init.d.ts
@@ -22,6 +22,25 @@ declare const initConfigs: ({
22
22
  userConfigs: ReadonlyArray<UserConfig>;
23
23
  }) => Promise<Configs>;
24
24
  //#endregion
25
+ //#region src/types/types.d.ts
26
+ interface WatchValues {
27
+ /**
28
+ * Headers to be sent with each HEAD and/or GET request. This effectively
29
+ * serves as a mechanism resolver because setting certain headers will opt
30
+ * into comparing the specifications using that method.
31
+ */
32
+ headers: Headers;
33
+ /**
34
+ * Can we send a HEAD request instead of fetching the whole specification?
35
+ * This value will be set after the first successful fetch.
36
+ */
37
+ isHeadMethodSupported?: boolean;
38
+ /**
39
+ * String content of the last successfully fetched specification.
40
+ */
41
+ lastValue?: string;
42
+ }
43
+ //#endregion
25
44
  //#region src/getSpec.d.ts
26
45
  type SpecResponse = {
27
46
  arrayBuffer: ArrayBuffer | undefined;
@@ -50,5 +69,23 @@ declare const getSpec: ({
50
69
  watch: WatchValues;
51
70
  }) => Promise<SpecResponse | SpecError>;
52
71
  //#endregion
72
+ //#region src/openApi/index.d.ts
73
+ /**
74
+ * @internal
75
+ * Parse the resolved OpenAPI specification. This will populate and return
76
+ * `context` with intermediate representation obtained from the parsed spec.
77
+ */
78
+ declare const parseOpenApiSpec: ({
79
+ config,
80
+ dependencies,
81
+ logger,
82
+ spec
83
+ }: {
84
+ config: Config;
85
+ dependencies: Record<string, string>;
86
+ logger: Logger;
87
+ spec: unknown;
88
+ }) => Context;
89
+ //#endregion
53
90
  export { getSpec, initConfigs, parseOpenApiSpec };
54
91
  //# sourceMappingURL=internal.d.ts.map
package/dist/internal.js CHANGED
@@ -1 +1 @@
1
- import{n as e,t,u as n}from"./getSpec-NJ6vig64.js";export{t as getSpec,e as initConfigs,n as parseOpenApiSpec};
1
+ import{i as e,r as t,t as n}from"./openApi-DXfWYPpF.js";export{t as getSpec,e as initConfigs,n as parseOpenApiSpec};