@redocly/client-generator 0.0.0-snapshot.1784554531

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 (250) hide show
  1. package/README.md +506 -0
  2. package/lib/config-file.d.ts +8 -0
  3. package/lib/config-file.d.ts.map +1 -0
  4. package/lib/config-file.js +32 -0
  5. package/lib/config-file.js.map +1 -0
  6. package/lib/config.d.ts +63 -0
  7. package/lib/config.d.ts.map +1 -0
  8. package/lib/config.js +2 -0
  9. package/lib/config.js.map +1 -0
  10. package/lib/emitters/auth.d.ts +14 -0
  11. package/lib/emitters/auth.d.ts.map +1 -0
  12. package/lib/emitters/auth.js +30 -0
  13. package/lib/emitters/auth.js.map +1 -0
  14. package/lib/emitters/client-assembly.d.ts +15 -0
  15. package/lib/emitters/client-assembly.d.ts.map +1 -0
  16. package/lib/emitters/client-assembly.js +299 -0
  17. package/lib/emitters/client-assembly.js.map +1 -0
  18. package/lib/emitters/descriptor.d.ts +22 -0
  19. package/lib/emitters/descriptor.d.ts.map +1 -0
  20. package/lib/emitters/descriptor.js +207 -0
  21. package/lib/emitters/descriptor.js.map +1 -0
  22. package/lib/emitters/emit-options.d.ts +71 -0
  23. package/lib/emitters/emit-options.d.ts.map +1 -0
  24. package/lib/emitters/emit-options.js +28 -0
  25. package/lib/emitters/emit-options.js.map +1 -0
  26. package/lib/emitters/faker.d.ts +11 -0
  27. package/lib/emitters/faker.d.ts.map +1 -0
  28. package/lib/emitters/faker.js +204 -0
  29. package/lib/emitters/faker.js.map +1 -0
  30. package/lib/emitters/identifier.d.ts +28 -0
  31. package/lib/emitters/identifier.d.ts.map +1 -0
  32. package/lib/emitters/identifier.js +94 -0
  33. package/lib/emitters/identifier.js.map +1 -0
  34. package/lib/emitters/inline-runtime.d.ts +11 -0
  35. package/lib/emitters/inline-runtime.d.ts.map +1 -0
  36. package/lib/emitters/inline-runtime.js +97 -0
  37. package/lib/emitters/inline-runtime.js.map +1 -0
  38. package/lib/emitters/jsdoc.d.ts +9 -0
  39. package/lib/emitters/jsdoc.d.ts.map +1 -0
  40. package/lib/emitters/jsdoc.js +83 -0
  41. package/lib/emitters/jsdoc.js.map +1 -0
  42. package/lib/emitters/mock.d.ts +22 -0
  43. package/lib/emitters/mock.d.ts.map +1 -0
  44. package/lib/emitters/mock.js +243 -0
  45. package/lib/emitters/mock.js.map +1 -0
  46. package/lib/emitters/operation-aliases.d.ts +27 -0
  47. package/lib/emitters/operation-aliases.d.ts.map +1 -0
  48. package/lib/emitters/operation-aliases.js +138 -0
  49. package/lib/emitters/operation-aliases.js.map +1 -0
  50. package/lib/emitters/operation-signature.d.ts +23 -0
  51. package/lib/emitters/operation-signature.d.ts.map +1 -0
  52. package/lib/emitters/operation-signature.js +34 -0
  53. package/lib/emitters/operation-signature.js.map +1 -0
  54. package/lib/emitters/operation-types.d.ts +32 -0
  55. package/lib/emitters/operation-types.d.ts.map +1 -0
  56. package/lib/emitters/operation-types.js +117 -0
  57. package/lib/emitters/operation-types.js.map +1 -0
  58. package/lib/emitters/operations.d.ts +39 -0
  59. package/lib/emitters/operations.d.ts.map +1 -0
  60. package/lib/emitters/operations.js +33 -0
  61. package/lib/emitters/operations.js.map +1 -0
  62. package/lib/emitters/pagination.d.ts +69 -0
  63. package/lib/emitters/pagination.d.ts.map +1 -0
  64. package/lib/emitters/pagination.js +223 -0
  65. package/lib/emitters/pagination.js.map +1 -0
  66. package/lib/emitters/runtime-sources.d.ts +16 -0
  67. package/lib/emitters/runtime-sources.d.ts.map +1 -0
  68. package/lib/emitters/runtime-sources.js +16 -0
  69. package/lib/emitters/runtime-sources.js.map +1 -0
  70. package/lib/emitters/sample.d.ts +27 -0
  71. package/lib/emitters/sample.d.ts.map +1 -0
  72. package/lib/emitters/sample.js +161 -0
  73. package/lib/emitters/sample.js.map +1 -0
  74. package/lib/emitters/setup-bake.d.ts +15 -0
  75. package/lib/emitters/setup-bake.d.ts.map +1 -0
  76. package/lib/emitters/setup-bake.js +65 -0
  77. package/lib/emitters/setup-bake.js.map +1 -0
  78. package/lib/emitters/sse.d.ts +10 -0
  79. package/lib/emitters/sse.d.ts.map +1 -0
  80. package/lib/emitters/sse.js +46 -0
  81. package/lib/emitters/sse.js.map +1 -0
  82. package/lib/emitters/support.d.ts +13 -0
  83. package/lib/emitters/support.d.ts.map +1 -0
  84. package/lib/emitters/support.js +21 -0
  85. package/lib/emitters/support.js.map +1 -0
  86. package/lib/emitters/swr.d.ts +10 -0
  87. package/lib/emitters/swr.d.ts.map +1 -0
  88. package/lib/emitters/swr.js +88 -0
  89. package/lib/emitters/swr.js.map +1 -0
  90. package/lib/emitters/tanstack-query.d.ts +11 -0
  91. package/lib/emitters/tanstack-query.d.ts.map +1 -0
  92. package/lib/emitters/tanstack-query.js +68 -0
  93. package/lib/emitters/tanstack-query.js.map +1 -0
  94. package/lib/emitters/transformers.d.ts +11 -0
  95. package/lib/emitters/transformers.d.ts.map +1 -0
  96. package/lib/emitters/transformers.js +334 -0
  97. package/lib/emitters/transformers.js.map +1 -0
  98. package/lib/emitters/ts.d.ts +40 -0
  99. package/lib/emitters/ts.d.ts.map +1 -0
  100. package/lib/emitters/ts.js +104 -0
  101. package/lib/emitters/ts.js.map +1 -0
  102. package/lib/emitters/type-guards.d.ts +21 -0
  103. package/lib/emitters/type-guards.d.ts.map +1 -0
  104. package/lib/emitters/type-guards.js +183 -0
  105. package/lib/emitters/type-guards.js.map +1 -0
  106. package/lib/emitters/types.d.ts +23 -0
  107. package/lib/emitters/types.d.ts.map +1 -0
  108. package/lib/emitters/types.js +127 -0
  109. package/lib/emitters/types.js.map +1 -0
  110. package/lib/emitters/wrapper-support.d.ts +40 -0
  111. package/lib/emitters/wrapper-support.d.ts.map +1 -0
  112. package/lib/emitters/wrapper-support.js +112 -0
  113. package/lib/emitters/wrapper-support.js.map +1 -0
  114. package/lib/emitters/zod.d.ts +13 -0
  115. package/lib/emitters/zod.d.ts.map +1 -0
  116. package/lib/emitters/zod.js +344 -0
  117. package/lib/emitters/zod.js.map +1 -0
  118. package/lib/errors.d.ts +4 -0
  119. package/lib/errors.d.ts.map +1 -0
  120. package/lib/errors.js +7 -0
  121. package/lib/errors.js.map +1 -0
  122. package/lib/generators/anchor.d.ts +9 -0
  123. package/lib/generators/anchor.d.ts.map +1 -0
  124. package/lib/generators/anchor.js +10 -0
  125. package/lib/generators/anchor.js.map +1 -0
  126. package/lib/generators/index.d.ts +15 -0
  127. package/lib/generators/index.d.ts.map +1 -0
  128. package/lib/generators/index.js +62 -0
  129. package/lib/generators/index.js.map +1 -0
  130. package/lib/generators/mock.d.ts +9 -0
  131. package/lib/generators/mock.d.ts.map +1 -0
  132. package/lib/generators/mock.js +23 -0
  133. package/lib/generators/mock.js.map +1 -0
  134. package/lib/generators/resolve.d.ts +19 -0
  135. package/lib/generators/resolve.d.ts.map +1 -0
  136. package/lib/generators/resolve.js +68 -0
  137. package/lib/generators/resolve.js.map +1 -0
  138. package/lib/generators/sdk.d.ts +12 -0
  139. package/lib/generators/sdk.d.ts.map +1 -0
  140. package/lib/generators/sdk.js +26 -0
  141. package/lib/generators/sdk.js.map +1 -0
  142. package/lib/generators/swr.d.ts +15 -0
  143. package/lib/generators/swr.d.ts.map +1 -0
  144. package/lib/generators/swr.js +27 -0
  145. package/lib/generators/swr.js.map +1 -0
  146. package/lib/generators/tanstack-query.d.ts +17 -0
  147. package/lib/generators/tanstack-query.d.ts.map +1 -0
  148. package/lib/generators/tanstack-query.js +30 -0
  149. package/lib/generators/tanstack-query.js.map +1 -0
  150. package/lib/generators/transformers.d.ts +19 -0
  151. package/lib/generators/transformers.d.ts.map +1 -0
  152. package/lib/generators/transformers.js +28 -0
  153. package/lib/generators/transformers.js.map +1 -0
  154. package/lib/generators/types.d.ts +66 -0
  155. package/lib/generators/types.d.ts.map +1 -0
  156. package/lib/generators/types.js +2 -0
  157. package/lib/generators/types.js.map +1 -0
  158. package/lib/generators/zod.d.ts +14 -0
  159. package/lib/generators/zod.d.ts.map +1 -0
  160. package/lib/generators/zod.js +23 -0
  161. package/lib/generators/zod.js.map +1 -0
  162. package/lib/index.d.ts +29 -0
  163. package/lib/index.d.ts.map +1 -0
  164. package/lib/index.js +119 -0
  165. package/lib/index.js.map +1 -0
  166. package/lib/intermediate-representation/build.d.ts +4 -0
  167. package/lib/intermediate-representation/build.d.ts.map +1 -0
  168. package/lib/intermediate-representation/build.js +761 -0
  169. package/lib/intermediate-representation/build.js.map +1 -0
  170. package/lib/intermediate-representation/model.d.ts +275 -0
  171. package/lib/intermediate-representation/model.d.ts.map +1 -0
  172. package/lib/intermediate-representation/model.js +5 -0
  173. package/lib/intermediate-representation/model.js.map +1 -0
  174. package/lib/intermediate-representation/normalize-swagger2.d.ts +10 -0
  175. package/lib/intermediate-representation/normalize-swagger2.d.ts.map +1 -0
  176. package/lib/intermediate-representation/normalize-swagger2.js +210 -0
  177. package/lib/intermediate-representation/normalize-swagger2.js.map +1 -0
  178. package/lib/intermediate-representation/sanitize-identifiers.d.ts +30 -0
  179. package/lib/intermediate-representation/sanitize-identifiers.d.ts.map +1 -0
  180. package/lib/intermediate-representation/sanitize-identifiers.js +153 -0
  181. package/lib/intermediate-representation/sanitize-identifiers.js.map +1 -0
  182. package/lib/loader.d.ts +4 -0
  183. package/lib/loader.d.ts.map +1 -0
  184. package/lib/loader.js +14 -0
  185. package/lib/loader.js.map +1 -0
  186. package/lib/plugin.d.ts +19 -0
  187. package/lib/plugin.d.ts.map +1 -0
  188. package/lib/plugin.js +41 -0
  189. package/lib/plugin.js.map +1 -0
  190. package/lib/runtime/auth.d.ts +15 -0
  191. package/lib/runtime/auth.d.ts.map +1 -0
  192. package/lib/runtime/auth.js +67 -0
  193. package/lib/runtime/auth.js.map +1 -0
  194. package/lib/runtime/create-client.d.ts +35 -0
  195. package/lib/runtime/create-client.d.ts.map +1 -0
  196. package/lib/runtime/create-client.js +215 -0
  197. package/lib/runtime/create-client.js.map +1 -0
  198. package/lib/runtime/errors.d.ts +11 -0
  199. package/lib/runtime/errors.d.ts.map +1 -0
  200. package/lib/runtime/errors.js +25 -0
  201. package/lib/runtime/errors.js.map +1 -0
  202. package/lib/runtime/index.d.ts +14 -0
  203. package/lib/runtime/index.d.ts.map +1 -0
  204. package/lib/runtime/index.js +24 -0
  205. package/lib/runtime/index.js.map +1 -0
  206. package/lib/runtime/multipart.d.ts +9 -0
  207. package/lib/runtime/multipart.d.ts.map +1 -0
  208. package/lib/runtime/multipart.js +31 -0
  209. package/lib/runtime/multipart.js.map +1 -0
  210. package/lib/runtime/paginate.d.ts +36 -0
  211. package/lib/runtime/paginate.d.ts.map +1 -0
  212. package/lib/runtime/paginate.js +99 -0
  213. package/lib/runtime/paginate.js.map +1 -0
  214. package/lib/runtime/parse.d.ts +9 -0
  215. package/lib/runtime/parse.d.ts.map +1 -0
  216. package/lib/runtime/parse.js +37 -0
  217. package/lib/runtime/parse.js.map +1 -0
  218. package/lib/runtime/retry.d.ts +15 -0
  219. package/lib/runtime/retry.d.ts.map +1 -0
  220. package/lib/runtime/retry.js +51 -0
  221. package/lib/runtime/retry.js.map +1 -0
  222. package/lib/runtime/send.d.ts +31 -0
  223. package/lib/runtime/send.d.ts.map +1 -0
  224. package/lib/runtime/send.js +138 -0
  225. package/lib/runtime/send.js.map +1 -0
  226. package/lib/runtime/setup.d.ts +11 -0
  227. package/lib/runtime/setup.d.ts.map +1 -0
  228. package/lib/runtime/setup.js +13 -0
  229. package/lib/runtime/setup.js.map +1 -0
  230. package/lib/runtime/sse.d.ts +21 -0
  231. package/lib/runtime/sse.d.ts.map +1 -0
  232. package/lib/runtime/sse.js +163 -0
  233. package/lib/runtime/sse.js.map +1 -0
  234. package/lib/runtime/types.d.ts +232 -0
  235. package/lib/runtime/types.d.ts.map +1 -0
  236. package/lib/runtime/types.js +9 -0
  237. package/lib/runtime/types.js.map +1 -0
  238. package/lib/runtime/url.d.ts +25 -0
  239. package/lib/runtime/url.d.ts.map +1 -0
  240. package/lib/runtime/url.js +97 -0
  241. package/lib/runtime/url.js.map +1 -0
  242. package/lib/runtime-contract.d.ts +27 -0
  243. package/lib/runtime-contract.d.ts.map +1 -0
  244. package/lib/runtime-contract.js +14 -0
  245. package/lib/runtime-contract.js.map +1 -0
  246. package/lib/types.d.ts +118 -0
  247. package/lib/types.d.ts.map +1 -0
  248. package/lib/types.js +2 -0
  249. package/lib/types.js.map +1 -0
  250. package/package.json +59 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-contract.d.ts","sourceRoot":"","sources":["../src/runtime-contract.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAElF,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,aAAa,GACd,MAAM,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EACJ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACtB,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,UAAU,CAAC,EAAE,CACX,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,cAAc,KAChB,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,cAAc,KAAK,KAAK,CAAC;IACvD,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAAC,UAAU,CAAC,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAEpF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAEjE"}
@@ -0,0 +1,14 @@
1
+ // The public, spec-independent runtime contract a publisher's `--setup` file imports.
2
+ // These are the runtime's own types (src/runtime/types.ts) — the very module the
3
+ // generated client embeds (inline) or imports (package) — so the contract cannot
4
+ // drift from the generated output.
5
+ /**
6
+ * Identity helper for authoring a `--setup` module: gives full type inference and a stable
7
+ * call the baker recognises. `export default defineClientSetup({ config, middleware })`.
8
+ *
9
+ * @experimental The setup API may change between minor versions until stabilized.
10
+ */
11
+ export function defineClientSetup(setup) {
12
+ return setup;
13
+ }
14
+ //# sourceMappingURL=runtime-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-contract.js","sourceRoot":"","sources":["../src/runtime-contract.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,iFAAiF;AACjF,iFAAiF;AACjF,mCAAmC;AAkCnC;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAkB;IAClD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,118 @@
1
+ import type { Config as RedoclyConfig, Oas3Definition, detectSpec } from '@redocly/openapi-core';
2
+ import type { ArgsStyle } from './emitters/emit-options.js';
3
+ import type { PaginationConfig } from './emitters/pagination.js';
4
+ import type { CustomGenerator, OutputMode } from './generators/types.js';
5
+ export type GenerateClientOptions = {
6
+ /** Path or URL to the OpenAPI document (or an `apis:` alias from `redocly.yaml`). */
7
+ api: string;
8
+ output: string;
9
+ /** Resolved Redocly config for spec loading. */
10
+ config?: RedoclyConfig;
11
+ /**
12
+ * How the generated client is partitioned across files. Defaults to `single`
13
+ * (one self-contained file).
14
+ */
15
+ outputMode?: OutputMode;
16
+ /**
17
+ * How operation inputs are passed to each generated function/method:
18
+ * `'flat'` (default) spreads path params as positional args followed by
19
+ * `params`/`body`/`headers` slots; `'grouped'` bundles every input into a single
20
+ * `args` object. The per-call `init` argument stays separate in both styles.
21
+ */
22
+ argsStyle?: ArgsStyle;
23
+ /**
24
+ * Override the BASE URL inlined into the generated runtime. When omitted,
25
+ * the value is derived from `servers[0].url` in the source OpenAPI document.
26
+ * Validation (e.g. `new URL(value)`) is the caller's responsibility — the
27
+ * CLI handler validates before calling.
28
+ */
29
+ serverUrl?: string;
30
+ /**
31
+ * How named string enums are emitted. `'const-object'` (default) emits a
32
+ * runtime `as const` companion object alongside the union type; `'union'`
33
+ * emits only the string-literal union.
34
+ */
35
+ enumStyle?: 'union' | 'const-object';
36
+ /**
37
+ * Error-handling shape of the generated client. `'throw'` (default) throws
38
+ * `ApiError` on non-2xx responses; `'result'` returns a discriminated
39
+ * `{ data, error, response }` whose `error` is typed from the spec's 4xx/5xx
40
+ * response bodies.
41
+ */
42
+ errorMode?: 'throw' | 'result';
43
+ /**
44
+ * How `format: date-time`/`date` string fields are typed. `'string'` (default)
45
+ * keeps the ISO wire shape; `'Date'` emits a `Date` reference. Opt-in — pair with
46
+ * the `transformers` generator so the runtime value matches the type. The
47
+ * generated client stays zero-dep (`Date` is a web standard).
48
+ */
49
+ dateType?: 'string' | 'Date';
50
+ /**
51
+ * TanStack Query adapter the `tanstack-query` generator imports from
52
+ * (`@tanstack/${queryFramework}-query`). Defaults to `'react'`; only the import
53
+ * specifier changes — the emitted factory module is byte-identical across frameworks.
54
+ */
55
+ queryFramework?: 'react' | 'vue' | 'svelte' | 'solid';
56
+ /**
57
+ * How the `mock` generator produces data. `'baked'` (default) inlines deterministic
58
+ * literals (zero-dep, contract-faithful); `'faker'` emits `@faker-js/faker` calls for
59
+ * realistic data — making `@faker-js/faker` the consumer's dev-dep. Factory signatures
60
+ * are identical across modes, so a consumer can flip this without changing call sites.
61
+ */
62
+ mockData?: 'baked' | 'faker';
63
+ /**
64
+ * Seed for faker-mode mocks. When set, the mock module emits a top-level
65
+ * `faker.seed(<n>)` so generated data is reproducible across runs. Ignored in baked mode.
66
+ */
67
+ mockSeed?: number;
68
+ /**
69
+ * Generators to run, in order. Defaults to `['sdk']`. Each entry is a built-in name
70
+ * (`sdk`/`zod`/`tanstack-query`/`swr`/`transformers`/`mock`), the `name` of an inline
71
+ * `customGenerators` entry, or an import specifier (a path or package) for a custom generator.
72
+ */
73
+ generators?: string[];
74
+ /**
75
+ * Inline custom generators (the experimental plugin API), registered before resolution so they
76
+ * can be selected in `generators` by `name`. Authored with `defineGenerator` from
77
+ * `@redocly/client-generator`. Path/package specifiers in `generators` don't need this.
78
+ */
79
+ customGenerators?: CustomGenerator[];
80
+ /**
81
+ * Directory that relative-path generator specifiers resolve against (typically the config file's
82
+ * location). Defaults to the current working directory.
83
+ */
84
+ configDir?: string;
85
+ /**
86
+ * Path to a publisher setup module (`export default defineClientSetup({ config, middleware })`)
87
+ * baked into the generated client. Resolved against `configDir`. Works across all output modes.
88
+ */
89
+ setup?: string;
90
+ /** Runtime distribution: 'inline' (default, self-contained) | 'package' (imports @redocly/client-generator). */
91
+ runtime?: 'inline' | 'package';
92
+ /**
93
+ * Auto-pagination rules: a convention rule (applied to every operation it
94
+ * structurally fits), per-operation overrides, and `exclude`d operationIds —
95
+ * resolved together with each operation's `x-pagination` extension (per-op config >
96
+ * extension > convention). Paginated operations gain typed `.pages()`/`.items()`
97
+ * iterators. Verified statically: an explicit rule that doesn't fit its operation
98
+ * fails generation.
99
+ */
100
+ pagination?: PaginationConfig;
101
+ };
102
+ export type GenerateClientResult = {
103
+ /** The `--output` anchor path (the entry file in multi-file modes). */
104
+ outputPath: string;
105
+ /** Total bytes written across every generated file. */
106
+ bytes: number;
107
+ /** Every file written to disk (single-element in `single` mode). */
108
+ files: Array<{
109
+ path: string;
110
+ bytes: number;
111
+ }>;
112
+ };
113
+ export type LoadResult = {
114
+ document: Oas3Definition;
115
+ /** The detected input spec version (e.g. 'oas2', 'oas3_0', 'oas3_1', 'oas3_2'). */
116
+ version: ReturnType<typeof detectSpec>;
117
+ };
118
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEzE,MAAM,MAAM,qBAAqB,GAAG;IAClC,qFAAqF;IACrF,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IACrC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC7B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gHAAgH;IAChH,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,cAAc,CAAC;IACzB,mFAAmF;IACnF,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;CACxC,CAAC"}
package/lib/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@redocly/client-generator",
3
+ "version": "0.0.0-snapshot.1784554531",
4
+ "description": "Generate typed, zero-dependency TypeScript clients (fetch, auth, retries, middleware, SSE) from OpenAPI descriptions.",
5
+ "type": "module",
6
+ "types": "lib/index.d.ts",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "import": "./lib/index.js",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "engines": {
17
+ "node": ">=22.12.0 || >=20.19.0 <21.0.0",
18
+ "npm": ">=10"
19
+ },
20
+ "engineStrict": true,
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "scripts": {
25
+ "examples:regen": "node scripts/regenerate-examples.mjs",
26
+ "prepare": "node scripts/generate-runtime-sources.mjs",
27
+ "typecheck:examples": "node scripts/typecheck-examples.mjs"
28
+ },
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/Redocly/redocly-cli.git"
33
+ },
34
+ "homepage": "https://github.com/Redocly/redocly-cli",
35
+ "keywords": [
36
+ "OpenAPI",
37
+ "Swagger",
38
+ "TypeScript",
39
+ "client",
40
+ "generator",
41
+ "codegen",
42
+ "fetch"
43
+ ],
44
+ "contributors": [
45
+ "Roman Marshevskyi <roman.marshevskyy@redocly.com> (https://redocly.com/)"
46
+ ],
47
+ "dependencies": {
48
+ "@redocly/openapi-core": "0.0.0-snapshot.1784554531"
49
+ },
50
+ "peerDependencies": {
51
+ "typescript": ">=5.5.0"
52
+ },
53
+ "devDependencies": {
54
+ "typescript": "6.0.2"
55
+ },
56
+ "files": [
57
+ "lib"
58
+ ]
59
+ }