@kubb/plugin-ts 5.0.0-alpha.11 → 5.0.0-alpha.12
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/dist/{components-CRu8IKY3.js → Type-CX1HRooG.js} +377 -365
- package/dist/Type-CX1HRooG.js.map +1 -0
- package/dist/Type-Cat0_htq.cjs +808 -0
- package/dist/Type-Cat0_htq.cjs.map +1 -0
- package/dist/components.cjs +3 -2
- package/dist/components.d.ts +40 -9
- package/dist/components.js +2 -2
- package/dist/generators-CLuCmfUz.js +532 -0
- package/dist/generators-CLuCmfUz.js.map +1 -0
- package/dist/generators-DWBU-MuW.cjs +536 -0
- package/dist/generators-DWBU-MuW.cjs.map +1 -0
- package/dist/generators.cjs +2 -3
- package/dist/generators.d.ts +3 -503
- package/dist/generators.js +2 -2
- package/dist/index.cjs +308 -4
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +26 -21
- package/dist/index.js +305 -2
- package/dist/index.js.map +1 -0
- package/dist/{types-mSXmB8WU.d.ts → types-BA1ZCQ5p.d.ts} +73 -57
- package/package.json +5 -5
- package/src/components/{v2/Enum.tsx → Enum.tsx} +27 -11
- package/src/components/Type.tsx +23 -141
- package/src/components/index.ts +1 -0
- package/src/generators/index.ts +0 -1
- package/src/generators/typeGenerator.tsx +189 -413
- package/src/generators/utils.ts +298 -0
- package/src/index.ts +1 -1
- package/src/plugin.ts +80 -126
- package/src/printer.ts +15 -4
- package/src/resolverTs.ts +109 -1
- package/src/types.ts +68 -52
- package/dist/components-CRu8IKY3.js.map +0 -1
- package/dist/components-DeNDKlzf.cjs +0 -982
- package/dist/components-DeNDKlzf.cjs.map +0 -1
- package/dist/plugin-CJ29AwE2.cjs +0 -1320
- package/dist/plugin-CJ29AwE2.cjs.map +0 -1
- package/dist/plugin-D60XNJSD.js +0 -1267
- package/dist/plugin-D60XNJSD.js.map +0 -1
- package/src/components/v2/Type.tsx +0 -59
- package/src/generators/v2/typeGenerator.tsx +0 -167
- package/src/generators/v2/utils.ts +0 -140
- package/src/parser.ts +0 -389
|
@@ -0,0 +1,536 @@
|
|
|
1
|
+
const require_Type = require("./Type-Cat0_htq.cjs");
|
|
2
|
+
let _kubb_ast = require("@kubb/ast");
|
|
3
|
+
let _kubb_core = require("@kubb/core");
|
|
4
|
+
let _kubb_core_hooks = require("@kubb/core/hooks");
|
|
5
|
+
let _kubb_react_fabric = require("@kubb/react-fabric");
|
|
6
|
+
let _kubb_react_fabric_jsx_runtime = require("@kubb/react-fabric/jsx-runtime");
|
|
7
|
+
//#region src/generators/utils.ts
|
|
8
|
+
/**
|
|
9
|
+
* Builds an `ObjectSchemaNode` for a group of parameters (path/query/header).
|
|
10
|
+
* Each property is a `ref` schema pointing to the individually-resolved parameter type.
|
|
11
|
+
* The ref name includes the parameter location so generated type names follow
|
|
12
|
+
* the `<OperationId><Location><ParamName>` convention.
|
|
13
|
+
*/
|
|
14
|
+
function buildParamsSchema({ params, node, resolver }) {
|
|
15
|
+
return (0, _kubb_ast.createSchema)({
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: params.map((param) => (0, _kubb_ast.createProperty)({
|
|
18
|
+
name: param.name,
|
|
19
|
+
schema: (0, _kubb_ast.createSchema)({
|
|
20
|
+
type: "ref",
|
|
21
|
+
name: resolver.resolveParamName(node, param),
|
|
22
|
+
optional: !param.required
|
|
23
|
+
})
|
|
24
|
+
}))
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Builds an `ObjectSchemaNode` representing the `<OperationId>RequestConfig` type:
|
|
29
|
+
* - `data` → request body ref (optional) or `never`
|
|
30
|
+
* - `pathParams` → inline object of path param refs, or `never`
|
|
31
|
+
* - `queryParams` → inline object of query param refs (optional), or `never`
|
|
32
|
+
* - `headerParams` → inline object of header param refs (optional), or `never`
|
|
33
|
+
* - `url` → Express-style template literal (plugin-ts extension, handled by printer)
|
|
34
|
+
*/
|
|
35
|
+
function buildDataSchemaNode({ node, resolver }) {
|
|
36
|
+
const pathParams = node.parameters.filter((p) => p.in === "path");
|
|
37
|
+
const queryParams = node.parameters.filter((p) => p.in === "query");
|
|
38
|
+
const headerParams = node.parameters.filter((p) => p.in === "header");
|
|
39
|
+
return (0, _kubb_ast.createSchema)({
|
|
40
|
+
type: "object",
|
|
41
|
+
deprecated: node.deprecated,
|
|
42
|
+
properties: [
|
|
43
|
+
(0, _kubb_ast.createProperty)({
|
|
44
|
+
name: "data",
|
|
45
|
+
schema: node.requestBody?.schema ? (0, _kubb_ast.createSchema)({
|
|
46
|
+
type: "ref",
|
|
47
|
+
name: resolver.resolveDataTypedName(node),
|
|
48
|
+
optional: true
|
|
49
|
+
}) : (0, _kubb_ast.createSchema)({
|
|
50
|
+
type: "never",
|
|
51
|
+
optional: true
|
|
52
|
+
})
|
|
53
|
+
}),
|
|
54
|
+
(0, _kubb_ast.createProperty)({
|
|
55
|
+
name: "pathParams",
|
|
56
|
+
schema: pathParams.length > 0 ? buildParamsSchema({
|
|
57
|
+
params: pathParams,
|
|
58
|
+
node,
|
|
59
|
+
resolver
|
|
60
|
+
}) : (0, _kubb_ast.createSchema)({
|
|
61
|
+
type: "never",
|
|
62
|
+
optional: true
|
|
63
|
+
})
|
|
64
|
+
}),
|
|
65
|
+
(0, _kubb_ast.createProperty)({
|
|
66
|
+
name: "queryParams",
|
|
67
|
+
schema: queryParams.length > 0 ? (0, _kubb_ast.createSchema)({
|
|
68
|
+
...buildParamsSchema({
|
|
69
|
+
params: queryParams,
|
|
70
|
+
node,
|
|
71
|
+
resolver
|
|
72
|
+
}),
|
|
73
|
+
optional: true
|
|
74
|
+
}) : (0, _kubb_ast.createSchema)({
|
|
75
|
+
type: "never",
|
|
76
|
+
optional: true
|
|
77
|
+
})
|
|
78
|
+
}),
|
|
79
|
+
(0, _kubb_ast.createProperty)({
|
|
80
|
+
name: "headerParams",
|
|
81
|
+
schema: headerParams.length > 0 ? (0, _kubb_ast.createSchema)({
|
|
82
|
+
...buildParamsSchema({
|
|
83
|
+
params: headerParams,
|
|
84
|
+
node,
|
|
85
|
+
resolver
|
|
86
|
+
}),
|
|
87
|
+
optional: true
|
|
88
|
+
}) : (0, _kubb_ast.createSchema)({
|
|
89
|
+
type: "never",
|
|
90
|
+
optional: true
|
|
91
|
+
})
|
|
92
|
+
}),
|
|
93
|
+
(0, _kubb_ast.createProperty)({
|
|
94
|
+
name: "url",
|
|
95
|
+
schema: (0, _kubb_ast.createSchema)({
|
|
96
|
+
type: "url",
|
|
97
|
+
path: node.path
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Builds an `ObjectSchemaNode` representing `<OperationId>Responses` — keyed by HTTP status code.
|
|
105
|
+
* Numeric status codes produce unquoted numeric keys (e.g. `200:`).
|
|
106
|
+
* All responses are included; those without a schema are represented as a ref to a `never` type.
|
|
107
|
+
*/
|
|
108
|
+
function buildResponsesSchemaNode({ node, resolver }) {
|
|
109
|
+
if (node.responses.length === 0) return null;
|
|
110
|
+
return (0, _kubb_ast.createSchema)({
|
|
111
|
+
type: "object",
|
|
112
|
+
properties: node.responses.map((res) => (0, _kubb_ast.createProperty)({
|
|
113
|
+
name: String(res.statusCode),
|
|
114
|
+
schema: (0, _kubb_ast.createSchema)({
|
|
115
|
+
type: "ref",
|
|
116
|
+
name: resolver.resolveResponseStatusTypedName(node, res.statusCode)
|
|
117
|
+
})
|
|
118
|
+
}))
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Builds a `UnionSchemaNode` representing `<OperationId>Response` — all response types in union format.
|
|
123
|
+
* Returns `null` when the operation has no responses with schemas.
|
|
124
|
+
*/
|
|
125
|
+
function buildResponseUnionSchemaNode({ node, resolver }) {
|
|
126
|
+
const responsesWithSchema = node.responses.filter((res) => res.schema);
|
|
127
|
+
if (responsesWithSchema.length === 0) return null;
|
|
128
|
+
return (0, _kubb_ast.createSchema)({
|
|
129
|
+
type: "union",
|
|
130
|
+
members: responsesWithSchema.map((res) => (0, _kubb_ast.createSchema)({
|
|
131
|
+
type: "ref",
|
|
132
|
+
name: resolver.resolveResponseStatusTypedName(node, res.statusCode)
|
|
133
|
+
}))
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Builds an `ObjectSchemaNode` for a grouped parameters type (path/query/header) in legacy mode.
|
|
138
|
+
* Each property directly embeds the parameter's schema inline (not a ref).
|
|
139
|
+
* Used to generate `<OperationId>PathParams`, `<OperationId>QueryParams`, `<OperationId>HeaderParams`.
|
|
140
|
+
* @deprecated Legacy only — will be removed in v6.
|
|
141
|
+
*/
|
|
142
|
+
function buildGroupedParamsSchema({ params, parentName }) {
|
|
143
|
+
return (0, _kubb_ast.createSchema)({
|
|
144
|
+
type: "object",
|
|
145
|
+
properties: params.map((param) => {
|
|
146
|
+
let schema = {
|
|
147
|
+
...param.schema,
|
|
148
|
+
optional: !param.required
|
|
149
|
+
};
|
|
150
|
+
if ((0, _kubb_ast.narrowSchema)(schema, "enum") && !schema.name && parentName) schema = {
|
|
151
|
+
...schema,
|
|
152
|
+
name: require_Type.pascalCase([
|
|
153
|
+
parentName,
|
|
154
|
+
param.name,
|
|
155
|
+
"enum"
|
|
156
|
+
].join(" "))
|
|
157
|
+
};
|
|
158
|
+
return (0, _kubb_ast.createProperty)({
|
|
159
|
+
name: param.name,
|
|
160
|
+
schema
|
|
161
|
+
});
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Builds the legacy wrapper `ObjectSchemaNode` for `<OperationId>Mutation` / `<OperationId>Query`.
|
|
167
|
+
* Structure: `{ Response, Request (mutation) | QueryParams (query), Errors }`.
|
|
168
|
+
* Mirrors the v4 naming convention where this type acts as a namespace for the operation's shapes.
|
|
169
|
+
*
|
|
170
|
+
* @deprecated Legacy only — will be removed in v6.
|
|
171
|
+
*/
|
|
172
|
+
function buildLegacyResponsesSchemaNode({ node, resolver }) {
|
|
173
|
+
const isGet = node.method.toLowerCase() === "get";
|
|
174
|
+
const successResponses = node.responses.filter((res) => {
|
|
175
|
+
const code = Number(res.statusCode);
|
|
176
|
+
return !Number.isNaN(code) && code >= 200 && code < 300;
|
|
177
|
+
});
|
|
178
|
+
const errorResponses = node.responses.filter((res) => res.statusCode === "default" || Number(res.statusCode) >= 400);
|
|
179
|
+
const responseSchema = successResponses.length > 0 ? successResponses.length === 1 ? (0, _kubb_ast.createSchema)({
|
|
180
|
+
type: "ref",
|
|
181
|
+
name: resolver.resolveResponseStatusTypedName(node, successResponses[0].statusCode)
|
|
182
|
+
}) : (0, _kubb_ast.createSchema)({
|
|
183
|
+
type: "union",
|
|
184
|
+
members: successResponses.map((res) => (0, _kubb_ast.createSchema)({
|
|
185
|
+
type: "ref",
|
|
186
|
+
name: resolver.resolveResponseStatusTypedName(node, res.statusCode)
|
|
187
|
+
}))
|
|
188
|
+
}) : (0, _kubb_ast.createSchema)({ type: "any" });
|
|
189
|
+
const errorsSchema = errorResponses.length > 0 ? errorResponses.length === 1 ? (0, _kubb_ast.createSchema)({
|
|
190
|
+
type: "ref",
|
|
191
|
+
name: resolver.resolveResponseStatusTypedName(node, errorResponses[0].statusCode)
|
|
192
|
+
}) : (0, _kubb_ast.createSchema)({
|
|
193
|
+
type: "union",
|
|
194
|
+
members: errorResponses.map((res) => (0, _kubb_ast.createSchema)({
|
|
195
|
+
type: "ref",
|
|
196
|
+
name: resolver.resolveResponseStatusTypedName(node, res.statusCode)
|
|
197
|
+
}))
|
|
198
|
+
}) : (0, _kubb_ast.createSchema)({ type: "any" });
|
|
199
|
+
const properties = [(0, _kubb_ast.createProperty)({
|
|
200
|
+
name: "Response",
|
|
201
|
+
schema: responseSchema
|
|
202
|
+
})];
|
|
203
|
+
if (!isGet && node.requestBody?.schema) properties.push((0, _kubb_ast.createProperty)({
|
|
204
|
+
name: "Request",
|
|
205
|
+
schema: (0, _kubb_ast.createSchema)({
|
|
206
|
+
type: "ref",
|
|
207
|
+
name: resolver.resolveDataTypedName(node)
|
|
208
|
+
})
|
|
209
|
+
}));
|
|
210
|
+
else if (isGet && node.parameters.some((p) => p.in === "query")) properties.push((0, _kubb_ast.createProperty)({
|
|
211
|
+
name: "QueryParams",
|
|
212
|
+
schema: (0, _kubb_ast.createSchema)({
|
|
213
|
+
type: "ref",
|
|
214
|
+
name: resolver.resolveQueryParamsTypedName(node)
|
|
215
|
+
})
|
|
216
|
+
}));
|
|
217
|
+
if (node.parameters.some((p) => p.in === "path") && resolver.resolvePathParamsTypedName) properties.push((0, _kubb_ast.createProperty)({
|
|
218
|
+
name: "PathParams",
|
|
219
|
+
schema: (0, _kubb_ast.createSchema)({
|
|
220
|
+
type: "ref",
|
|
221
|
+
name: resolver.resolvePathParamsTypedName(node)
|
|
222
|
+
})
|
|
223
|
+
}));
|
|
224
|
+
if (node.parameters.some((p) => p.in === "header") && resolver.resolveHeaderParamsTypedName) properties.push((0, _kubb_ast.createProperty)({
|
|
225
|
+
name: "HeaderParams",
|
|
226
|
+
schema: (0, _kubb_ast.createSchema)({
|
|
227
|
+
type: "ref",
|
|
228
|
+
name: resolver.resolveHeaderParamsTypedName(node)
|
|
229
|
+
})
|
|
230
|
+
}));
|
|
231
|
+
properties.push((0, _kubb_ast.createProperty)({
|
|
232
|
+
name: "Errors",
|
|
233
|
+
schema: errorsSchema
|
|
234
|
+
}));
|
|
235
|
+
return (0, _kubb_ast.createSchema)({
|
|
236
|
+
type: "object",
|
|
237
|
+
properties
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Builds the legacy response union for `<OperationId>MutationResponse` / `<OperationId>QueryResponse`.
|
|
242
|
+
* In legacy mode this is the **success** response only (not the full union including errors).
|
|
243
|
+
* Returns an `any` schema when there is no success response, matching v4 behavior.
|
|
244
|
+
* @deprecated Legacy only — will be removed in v6.
|
|
245
|
+
*/
|
|
246
|
+
function buildLegacyResponseUnionSchemaNode({ node, resolver }) {
|
|
247
|
+
const successResponses = node.responses.filter((res) => {
|
|
248
|
+
const code = Number(res.statusCode);
|
|
249
|
+
return !Number.isNaN(code) && code >= 200 && code < 300;
|
|
250
|
+
});
|
|
251
|
+
if (successResponses.length === 0) return (0, _kubb_ast.createSchema)({ type: "any" });
|
|
252
|
+
if (successResponses.length === 1) return (0, _kubb_ast.createSchema)({
|
|
253
|
+
type: "ref",
|
|
254
|
+
name: resolver.resolveResponseStatusTypedName(node, successResponses[0].statusCode)
|
|
255
|
+
});
|
|
256
|
+
return (0, _kubb_ast.createSchema)({
|
|
257
|
+
type: "union",
|
|
258
|
+
members: successResponses.map((res) => (0, _kubb_ast.createSchema)({
|
|
259
|
+
type: "ref",
|
|
260
|
+
name: resolver.resolveResponseStatusTypedName(node, res.statusCode)
|
|
261
|
+
}))
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Names unnamed enum nodes within a schema tree based on the parent type name.
|
|
266
|
+
* Used in legacy mode to ensure inline enums in response/request schemas get
|
|
267
|
+
* extracted as named enum declarations (e.g. `DeletePet200Enum`).
|
|
268
|
+
*
|
|
269
|
+
* @deprecated Legacy only — will be removed in v6.
|
|
270
|
+
*/
|
|
271
|
+
function nameUnnamedEnums(node, parentName) {
|
|
272
|
+
return (0, _kubb_ast.transform)(node, {
|
|
273
|
+
schema(n) {
|
|
274
|
+
if (n.type === "enum" && !n.name) return {
|
|
275
|
+
...n,
|
|
276
|
+
name: require_Type.pascalCase([parentName, "enum"].join(" "))
|
|
277
|
+
};
|
|
278
|
+
},
|
|
279
|
+
property(p) {
|
|
280
|
+
const enumNode = (0, _kubb_ast.narrowSchema)(p.schema, "enum");
|
|
281
|
+
if (enumNode && !enumNode.name) return {
|
|
282
|
+
...p,
|
|
283
|
+
schema: {
|
|
284
|
+
...enumNode,
|
|
285
|
+
name: require_Type.pascalCase([
|
|
286
|
+
parentName,
|
|
287
|
+
p.name,
|
|
288
|
+
"enum"
|
|
289
|
+
].join(" "))
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/generators/typeGenerator.tsx
|
|
297
|
+
const typeGenerator = (0, _kubb_core.defineGenerator)({
|
|
298
|
+
name: "typescript",
|
|
299
|
+
type: "react",
|
|
300
|
+
Operation({ node, adapter, options }) {
|
|
301
|
+
const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, group, resolver, legacy } = options;
|
|
302
|
+
const { mode, getFile, resolveBanner, resolveFooter } = (0, _kubb_core_hooks.useKubb)();
|
|
303
|
+
const file = getFile({
|
|
304
|
+
name: node.operationId,
|
|
305
|
+
extname: ".ts",
|
|
306
|
+
mode,
|
|
307
|
+
options: { group: group ? group.type === "tag" ? { tag: node.tags[0] ?? "default" } : { path: node.path } : void 0 }
|
|
308
|
+
});
|
|
309
|
+
const params = (0, _kubb_ast.applyParamsCasing)(node.parameters, paramsCasing);
|
|
310
|
+
function renderSchemaType({ node: schemaNode, name, typedName, description, keysToOmit }) {
|
|
311
|
+
if (!schemaNode) return null;
|
|
312
|
+
const imports = adapter.getImports(schemaNode, (schemaName) => ({
|
|
313
|
+
name: resolver.default(schemaName, "type"),
|
|
314
|
+
path: getFile({
|
|
315
|
+
name: schemaName,
|
|
316
|
+
extname: ".ts",
|
|
317
|
+
mode
|
|
318
|
+
}).path
|
|
319
|
+
}));
|
|
320
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric_jsx_runtime.Fragment, { children: [mode === "split" && imports.map((imp) => /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
321
|
+
root: file.path,
|
|
322
|
+
path: imp.path,
|
|
323
|
+
name: imp.name,
|
|
324
|
+
isTypeOnly: true
|
|
325
|
+
}, [
|
|
326
|
+
name,
|
|
327
|
+
imp.path,
|
|
328
|
+
imp.isTypeOnly
|
|
329
|
+
].join("-"))), /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(require_Type.Type, {
|
|
330
|
+
name,
|
|
331
|
+
typedName,
|
|
332
|
+
node: schemaNode,
|
|
333
|
+
description,
|
|
334
|
+
enumType,
|
|
335
|
+
enumKeyCasing,
|
|
336
|
+
optionalType,
|
|
337
|
+
arrayType,
|
|
338
|
+
syntaxType,
|
|
339
|
+
resolver,
|
|
340
|
+
keysToOmit
|
|
341
|
+
})] });
|
|
342
|
+
}
|
|
343
|
+
const responseTypes = legacy ? node.responses.map((res) => {
|
|
344
|
+
const responseName = resolver.resolveResponseStatusName(node, res.statusCode);
|
|
345
|
+
return renderSchemaType({
|
|
346
|
+
node: res.schema ? nameUnnamedEnums(res.schema, responseName) : res.schema,
|
|
347
|
+
name: responseName,
|
|
348
|
+
typedName: resolver.resolveResponseStatusTypedName(node, res.statusCode),
|
|
349
|
+
description: res.description,
|
|
350
|
+
keysToOmit: res.keysToOmit
|
|
351
|
+
});
|
|
352
|
+
}) : node.responses.map((res) => renderSchemaType({
|
|
353
|
+
node: res.schema,
|
|
354
|
+
name: resolver.resolveResponseStatusName(node, res.statusCode),
|
|
355
|
+
typedName: resolver.resolveResponseStatusTypedName(node, res.statusCode),
|
|
356
|
+
description: res.description,
|
|
357
|
+
keysToOmit: res.keysToOmit
|
|
358
|
+
}));
|
|
359
|
+
const requestType = node.requestBody?.schema ? renderSchemaType({
|
|
360
|
+
node: legacy ? nameUnnamedEnums(node.requestBody.schema, resolver.resolveDataName(node)) : node.requestBody.schema,
|
|
361
|
+
name: resolver.resolveDataName(node),
|
|
362
|
+
typedName: resolver.resolveDataTypedName(node),
|
|
363
|
+
description: node.requestBody.schema.description,
|
|
364
|
+
keysToOmit: node.requestBody.keysToOmit
|
|
365
|
+
}) : null;
|
|
366
|
+
if (legacy) {
|
|
367
|
+
const pathParams = params.filter((p) => p.in === "path");
|
|
368
|
+
const queryParams = params.filter((p) => p.in === "query");
|
|
369
|
+
const headerParams = params.filter((p) => p.in === "header");
|
|
370
|
+
const legacyParamTypes = [
|
|
371
|
+
pathParams.length > 0 ? renderSchemaType({
|
|
372
|
+
node: buildGroupedParamsSchema({
|
|
373
|
+
params: pathParams,
|
|
374
|
+
parentName: resolver.resolvePathParamsName(node)
|
|
375
|
+
}),
|
|
376
|
+
name: resolver.resolvePathParamsName(node),
|
|
377
|
+
typedName: resolver.resolvePathParamsTypedName(node)
|
|
378
|
+
}) : null,
|
|
379
|
+
queryParams.length > 0 ? renderSchemaType({
|
|
380
|
+
node: buildGroupedParamsSchema({
|
|
381
|
+
params: queryParams,
|
|
382
|
+
parentName: resolver.resolveQueryParamsName(node)
|
|
383
|
+
}),
|
|
384
|
+
name: resolver.resolveQueryParamsName(node),
|
|
385
|
+
typedName: resolver.resolveQueryParamsTypedName(node)
|
|
386
|
+
}) : null,
|
|
387
|
+
headerParams.length > 0 ? renderSchemaType({
|
|
388
|
+
node: buildGroupedParamsSchema({
|
|
389
|
+
params: headerParams,
|
|
390
|
+
parentName: resolver.resolveHeaderParamsName(node)
|
|
391
|
+
}),
|
|
392
|
+
name: resolver.resolveHeaderParamsName(node),
|
|
393
|
+
typedName: resolver.resolveHeaderParamsTypedName(node)
|
|
394
|
+
}) : null
|
|
395
|
+
];
|
|
396
|
+
const legacyResponsesType = renderSchemaType({
|
|
397
|
+
node: buildLegacyResponsesSchemaNode({
|
|
398
|
+
node,
|
|
399
|
+
resolver
|
|
400
|
+
}),
|
|
401
|
+
name: resolver.resolveResponsesName(node),
|
|
402
|
+
typedName: resolver.resolveResponsesTypedName(node)
|
|
403
|
+
});
|
|
404
|
+
const legacyResponseType = renderSchemaType({
|
|
405
|
+
node: buildLegacyResponseUnionSchemaNode({
|
|
406
|
+
node,
|
|
407
|
+
resolver
|
|
408
|
+
}),
|
|
409
|
+
name: resolver.resolveResponseName(node),
|
|
410
|
+
typedName: resolver.resolveResponseTypedName(node)
|
|
411
|
+
});
|
|
412
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric.File, {
|
|
413
|
+
baseName: file.baseName,
|
|
414
|
+
path: file.path,
|
|
415
|
+
meta: file.meta,
|
|
416
|
+
banner: resolveBanner(),
|
|
417
|
+
footer: resolveFooter(),
|
|
418
|
+
children: [
|
|
419
|
+
legacyParamTypes,
|
|
420
|
+
responseTypes,
|
|
421
|
+
requestType,
|
|
422
|
+
legacyResponsesType,
|
|
423
|
+
legacyResponseType
|
|
424
|
+
]
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
const paramTypes = params.map((param) => renderSchemaType({
|
|
428
|
+
node: param.schema,
|
|
429
|
+
name: resolver.resolveParamName(node, param),
|
|
430
|
+
typedName: resolver.resolveParamTypedName(node, param)
|
|
431
|
+
}));
|
|
432
|
+
const dataType = renderSchemaType({
|
|
433
|
+
node: buildDataSchemaNode({
|
|
434
|
+
node: {
|
|
435
|
+
...node,
|
|
436
|
+
parameters: params
|
|
437
|
+
},
|
|
438
|
+
resolver
|
|
439
|
+
}),
|
|
440
|
+
name: resolver.resolveRequestConfigName(node),
|
|
441
|
+
typedName: resolver.resolveRequestConfigTypedName(node)
|
|
442
|
+
});
|
|
443
|
+
const responsesType = renderSchemaType({
|
|
444
|
+
node: buildResponsesSchemaNode({
|
|
445
|
+
node,
|
|
446
|
+
resolver
|
|
447
|
+
}),
|
|
448
|
+
name: resolver.resolveResponsesName(node),
|
|
449
|
+
typedName: resolver.resolveResponsesTypedName(node)
|
|
450
|
+
});
|
|
451
|
+
const responseType = renderSchemaType({
|
|
452
|
+
node: buildResponseUnionSchemaNode({
|
|
453
|
+
node,
|
|
454
|
+
resolver
|
|
455
|
+
}),
|
|
456
|
+
name: resolver.resolveResponseName(node),
|
|
457
|
+
typedName: resolver.resolveResponseTypedName(node),
|
|
458
|
+
description: "Union of all possible responses"
|
|
459
|
+
});
|
|
460
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric.File, {
|
|
461
|
+
baseName: file.baseName,
|
|
462
|
+
path: file.path,
|
|
463
|
+
meta: file.meta,
|
|
464
|
+
banner: resolveBanner(),
|
|
465
|
+
footer: resolveFooter(),
|
|
466
|
+
children: [
|
|
467
|
+
paramTypes,
|
|
468
|
+
responseTypes,
|
|
469
|
+
requestType,
|
|
470
|
+
dataType,
|
|
471
|
+
responsesType,
|
|
472
|
+
responseType
|
|
473
|
+
]
|
|
474
|
+
});
|
|
475
|
+
},
|
|
476
|
+
Schema({ node, adapter, options }) {
|
|
477
|
+
const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, resolver } = options;
|
|
478
|
+
const { mode, getFile, resolveBanner, resolveFooter } = (0, _kubb_core_hooks.useKubb)();
|
|
479
|
+
if (!node.name) return;
|
|
480
|
+
const imports = adapter.getImports(node, (schemaName) => ({
|
|
481
|
+
name: resolver.default(schemaName, "type"),
|
|
482
|
+
path: getFile({
|
|
483
|
+
name: schemaName,
|
|
484
|
+
extname: ".ts",
|
|
485
|
+
mode
|
|
486
|
+
}).path
|
|
487
|
+
}));
|
|
488
|
+
const isEnumSchema = node.type === "enum";
|
|
489
|
+
const typedName = require_Type.ENUM_TYPES_WITH_KEY_SUFFIX.has(enumType) && isEnumSchema ? resolver.resolveEnumKeyTypedName(node) : resolver.resolveTypedName(node.name);
|
|
490
|
+
const type = {
|
|
491
|
+
name: resolver.resolveName(node.name),
|
|
492
|
+
typedName,
|
|
493
|
+
file: getFile({
|
|
494
|
+
name: node.name,
|
|
495
|
+
extname: ".ts",
|
|
496
|
+
mode
|
|
497
|
+
})
|
|
498
|
+
};
|
|
499
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric.File, {
|
|
500
|
+
baseName: type.file.baseName,
|
|
501
|
+
path: type.file.path,
|
|
502
|
+
meta: type.file.meta,
|
|
503
|
+
banner: resolveBanner(),
|
|
504
|
+
footer: resolveFooter(),
|
|
505
|
+
children: [mode === "split" && imports.map((imp) => /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
506
|
+
root: type.file.path,
|
|
507
|
+
path: imp.path,
|
|
508
|
+
name: imp.name,
|
|
509
|
+
isTypeOnly: true
|
|
510
|
+
}, [
|
|
511
|
+
node.name,
|
|
512
|
+
imp.path,
|
|
513
|
+
imp.isTypeOnly
|
|
514
|
+
].join("-"))), /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(require_Type.Type, {
|
|
515
|
+
name: type.name,
|
|
516
|
+
typedName: type.typedName,
|
|
517
|
+
node,
|
|
518
|
+
enumType,
|
|
519
|
+
enumKeyCasing,
|
|
520
|
+
optionalType,
|
|
521
|
+
arrayType,
|
|
522
|
+
syntaxType,
|
|
523
|
+
resolver
|
|
524
|
+
})]
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
});
|
|
528
|
+
//#endregion
|
|
529
|
+
Object.defineProperty(exports, "typeGenerator", {
|
|
530
|
+
enumerable: true,
|
|
531
|
+
get: function() {
|
|
532
|
+
return typeGenerator;
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
//# sourceMappingURL=generators-DWBU-MuW.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators-DWBU-MuW.cjs","names":["pascalCase","File","Type","ENUM_TYPES_WITH_KEY_SUFFIX"],"sources":["../src/generators/utils.ts","../src/generators/typeGenerator.tsx"],"sourcesContent":["import { pascalCase } from '@internals/utils'\nimport { createProperty, createSchema, narrowSchema, transform } from '@kubb/ast'\nimport type { OperationNode, ParameterNode, SchemaNode } from '@kubb/ast/types'\nimport type { ResolverTs } from '../types.ts'\n\ntype BuildParamsSchemaOptions = {\n params: Array<ParameterNode>\n node: OperationNode\n resolver: ResolverTs\n}\n\n/**\n * Builds an `ObjectSchemaNode` for a group of parameters (path/query/header).\n * Each property is a `ref` schema pointing to the individually-resolved parameter type.\n * The ref name includes the parameter location so generated type names follow\n * the `<OperationId><Location><ParamName>` convention.\n */\nexport function buildParamsSchema({ params, node, resolver }: BuildParamsSchemaOptions): SchemaNode {\n return createSchema({\n type: 'object',\n properties: params.map((param) =>\n createProperty({\n name: param.name,\n schema: createSchema({\n type: 'ref',\n name: resolver.resolveParamName(node, param),\n optional: !param.required,\n }),\n }),\n ),\n })\n}\n\ntype BuildOperationSchemaOptions = {\n node: OperationNode\n resolver: ResolverTs\n}\n\n/**\n * Builds an `ObjectSchemaNode` representing the `<OperationId>RequestConfig` type:\n * - `data` → request body ref (optional) or `never`\n * - `pathParams` → inline object of path param refs, or `never`\n * - `queryParams` → inline object of query param refs (optional), or `never`\n * - `headerParams` → inline object of header param refs (optional), or `never`\n * - `url` → Express-style template literal (plugin-ts extension, handled by printer)\n */\nexport function buildDataSchemaNode({ node, resolver }: BuildOperationSchemaOptions): SchemaNode {\n const pathParams = node.parameters.filter((p) => p.in === 'path')\n const queryParams = node.parameters.filter((p) => p.in === 'query')\n const headerParams = node.parameters.filter((p) => p.in === 'header')\n\n return createSchema({\n type: 'object',\n deprecated: node.deprecated,\n properties: [\n createProperty({\n name: 'data',\n schema: node.requestBody?.schema\n ? createSchema({\n type: 'ref',\n name: resolver.resolveDataTypedName(node),\n optional: true,\n })\n : createSchema({ type: 'never', optional: true }),\n }),\n createProperty({\n name: 'pathParams',\n schema: pathParams.length > 0 ? buildParamsSchema({ params: pathParams, node, resolver }) : createSchema({ type: 'never', optional: true }),\n }),\n createProperty({\n name: 'queryParams',\n schema:\n queryParams.length > 0\n ? createSchema({ ...buildParamsSchema({ params: queryParams, node, resolver }), optional: true })\n : createSchema({ type: 'never', optional: true }),\n }),\n createProperty({\n name: 'headerParams',\n schema:\n headerParams.length > 0\n ? createSchema({ ...buildParamsSchema({ params: headerParams, node, resolver }), optional: true })\n : createSchema({ type: 'never', optional: true }),\n }),\n createProperty({\n name: 'url',\n schema: createSchema({ type: 'url', path: node.path }),\n }),\n ],\n })\n}\n\n/**\n * Builds an `ObjectSchemaNode` representing `<OperationId>Responses` — keyed by HTTP status code.\n * Numeric status codes produce unquoted numeric keys (e.g. `200:`).\n * All responses are included; those without a schema are represented as a ref to a `never` type.\n */\nexport function buildResponsesSchemaNode({ node, resolver }: BuildOperationSchemaOptions): SchemaNode | null {\n if (node.responses.length === 0) {\n return null\n }\n\n return createSchema({\n type: 'object',\n properties: node.responses.map((res) =>\n createProperty({\n name: String(res.statusCode),\n schema: createSchema({\n type: 'ref',\n name: resolver.resolveResponseStatusTypedName(node, res.statusCode),\n }),\n }),\n ),\n })\n}\n\n/**\n * Builds a `UnionSchemaNode` representing `<OperationId>Response` — all response types in union format.\n * Returns `null` when the operation has no responses with schemas.\n */\nexport function buildResponseUnionSchemaNode({ node, resolver }: BuildOperationSchemaOptions): SchemaNode | null {\n const responsesWithSchema = node.responses.filter((res) => res.schema)\n\n if (responsesWithSchema.length === 0) {\n return null\n }\n\n return createSchema({\n type: 'union',\n members: responsesWithSchema.map((res) =>\n createSchema({\n type: 'ref',\n name: resolver.resolveResponseStatusTypedName(node, res.statusCode),\n }),\n ),\n })\n}\n\ntype BuildGroupedParamsSchemaOptions = {\n params: Array<ParameterNode>\n /**\n * Parent type name (e.g. `FindPetsByStatusQueryParams`) used to derive enum names\n * for inline enum properties (e.g. `FindPetsByStatusQueryParamsStatusEnum`).\n */\n parentName?: string\n}\n\n/**\n * Builds an `ObjectSchemaNode` for a grouped parameters type (path/query/header) in legacy mode.\n * Each property directly embeds the parameter's schema inline (not a ref).\n * Used to generate `<OperationId>PathParams`, `<OperationId>QueryParams`, `<OperationId>HeaderParams`.\n * @deprecated Legacy only — will be removed in v6.\n */\nexport function buildGroupedParamsSchema({ params, parentName }: BuildGroupedParamsSchemaOptions): SchemaNode {\n return createSchema({\n type: 'object',\n properties: params.map((param) => {\n let schema = { ...param.schema, optional: !param.required } as SchemaNode\n // Name unnamed enum properties so they are emitted as enum declarations\n if (narrowSchema(schema, 'enum') && !schema.name && parentName) {\n schema = { ...schema, name: pascalCase([parentName, param.name, 'enum'].join(' ')) }\n }\n return createProperty({\n name: param.name,\n schema,\n })\n }),\n })\n}\n\n/**\n * Builds the legacy wrapper `ObjectSchemaNode` for `<OperationId>Mutation` / `<OperationId>Query`.\n * Structure: `{ Response, Request (mutation) | QueryParams (query), Errors }`.\n * Mirrors the v4 naming convention where this type acts as a namespace for the operation's shapes.\n *\n * @deprecated Legacy only — will be removed in v6.\n */\nexport function buildLegacyResponsesSchemaNode({ node, resolver }: BuildOperationSchemaOptions): SchemaNode | null {\n const isGet = node.method.toLowerCase() === 'get'\n const successResponses = node.responses.filter((res) => {\n const code = Number(res.statusCode)\n return !Number.isNaN(code) && code >= 200 && code < 300\n })\n const errorResponses = node.responses.filter((res) => res.statusCode === 'default' || Number(res.statusCode) >= 400)\n\n const responseSchema =\n successResponses.length > 0\n ? successResponses.length === 1\n ? createSchema({ type: 'ref', name: resolver.resolveResponseStatusTypedName(node, successResponses[0]!.statusCode) })\n : createSchema({\n type: 'union',\n members: successResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusTypedName(node, res.statusCode) })),\n })\n : createSchema({ type: 'any' })\n\n const errorsSchema =\n errorResponses.length > 0\n ? errorResponses.length === 1\n ? createSchema({ type: 'ref', name: resolver.resolveResponseStatusTypedName(node, errorResponses[0]!.statusCode) })\n : createSchema({\n type: 'union',\n members: errorResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusTypedName(node, res.statusCode) })),\n })\n : createSchema({ type: 'any' })\n\n const properties = [createProperty({ name: 'Response', schema: responseSchema })]\n\n if (!isGet && node.requestBody?.schema) {\n properties.push(\n createProperty({\n name: 'Request',\n schema: createSchema({ type: 'ref', name: resolver.resolveDataTypedName(node) }),\n }),\n )\n } else if (isGet && node.parameters.some((p) => p.in === 'query')) {\n properties.push(\n createProperty({\n name: 'QueryParams',\n schema: createSchema({ type: 'ref', name: resolver.resolveQueryParamsTypedName!(node) }),\n }),\n )\n }\n\n if (node.parameters.some((p) => p.in === 'path') && resolver.resolvePathParamsTypedName) {\n properties.push(\n createProperty({\n name: 'PathParams',\n schema: createSchema({ type: 'ref', name: resolver.resolvePathParamsTypedName(node) }),\n }),\n )\n }\n\n if (node.parameters.some((p) => p.in === 'header') && resolver.resolveHeaderParamsTypedName) {\n properties.push(\n createProperty({\n name: 'HeaderParams',\n schema: createSchema({ type: 'ref', name: resolver.resolveHeaderParamsTypedName(node) }),\n }),\n )\n }\n\n properties.push(createProperty({ name: 'Errors', schema: errorsSchema }))\n\n return createSchema({ type: 'object', properties })\n}\n\n/**\n * Builds the legacy response union for `<OperationId>MutationResponse` / `<OperationId>QueryResponse`.\n * In legacy mode this is the **success** response only (not the full union including errors).\n * Returns an `any` schema when there is no success response, matching v4 behavior.\n * @deprecated Legacy only — will be removed in v6.\n */\nexport function buildLegacyResponseUnionSchemaNode({ node, resolver }: BuildOperationSchemaOptions): SchemaNode {\n const successResponses = node.responses.filter((res) => {\n const code = Number(res.statusCode)\n return !Number.isNaN(code) && code >= 200 && code < 300\n })\n\n if (successResponses.length === 0) {\n return createSchema({ type: 'any' })\n }\n\n if (successResponses.length === 1) {\n return createSchema({ type: 'ref', name: resolver.resolveResponseStatusTypedName(node, successResponses[0]!.statusCode) })\n }\n\n return createSchema({\n type: 'union',\n members: successResponses.map((res) => createSchema({ type: 'ref', name: resolver.resolveResponseStatusTypedName(node, res.statusCode) })),\n })\n}\n\n/**\n * Names unnamed enum nodes within a schema tree based on the parent type name.\n * Used in legacy mode to ensure inline enums in response/request schemas get\n * extracted as named enum declarations (e.g. `DeletePet200Enum`).\n *\n * @deprecated Legacy only — will be removed in v6.\n */\nexport function nameUnnamedEnums(node: SchemaNode, parentName: string): SchemaNode {\n return transform(node, {\n schema(n) {\n if (n.type === 'enum' && !n.name) {\n return { ...n, name: pascalCase([parentName, 'enum'].join(' ')) }\n }\n return undefined\n },\n property(p) {\n const enumNode = narrowSchema(p.schema, 'enum')\n if (enumNode && !enumNode.name) {\n return {\n ...p,\n schema: { ...enumNode, name: pascalCase([parentName, p.name, 'enum'].join(' ')) },\n }\n }\n return undefined\n },\n })\n}\n","import { applyParamsCasing } from '@kubb/ast'\nimport type { SchemaNode } from '@kubb/ast/types'\nimport { defineGenerator } from '@kubb/core'\nimport { useKubb } from '@kubb/core/hooks'\nimport { File } from '@kubb/react-fabric'\nimport { Type } from '../components/Type.tsx'\nimport { ENUM_TYPES_WITH_KEY_SUFFIX } from '../constants.ts'\nimport type { PluginTs } from '../types'\nimport {\n buildDataSchemaNode,\n buildGroupedParamsSchema,\n buildLegacyResponsesSchemaNode,\n buildLegacyResponseUnionSchemaNode,\n buildResponsesSchemaNode,\n buildResponseUnionSchemaNode,\n nameUnnamedEnums,\n} from './utils.ts'\n\nexport const typeGenerator = defineGenerator<PluginTs>({\n name: 'typescript',\n type: 'react',\n Operation({ node, adapter, options }) {\n const { enumType, enumKeyCasing, optionalType, arrayType, syntaxType, paramsCasing, group, resolver, legacy } = options\n const { mode, getFile, resolveBanner, resolveFooter } = useKubb<PluginTs>()\n\n const file = getFile({\n name: node.operationId,\n extname: '.ts',\n mode,\n options: {\n group: group ? (group.type === 'tag' ? { tag: node.tags[0] ?? 'default' } : { path: node.path }) : undefined,\n },\n })\n const params = applyParamsCasing(node.parameters, paramsCasing)\n\n function renderSchemaType({\n node: schemaNode,\n name,\n typedName,\n description,\n keysToOmit,\n }: {\n node: SchemaNode | null\n name: string\n typedName: string\n description?: string\n keysToOmit?: Array<string>\n }) {\n if (!schemaNode) {\n return null\n }\n\n const imports = adapter.getImports(schemaNode, (schemaName) => ({\n name: resolver.default(schemaName, 'type'),\n path: getFile({ name: schemaName, extname: '.ts', mode }).path,\n }))\n\n return (\n <>\n {mode === 'split' &&\n imports.map((imp) => <File.Import key={[name, imp.path, imp.isTypeOnly].join('-')} root={file.path} path={imp.path} name={imp.name} isTypeOnly />)}\n <Type\n name={name}\n typedName={typedName}\n node={schemaNode}\n description={description}\n enumType={enumType}\n enumKeyCasing={enumKeyCasing}\n optionalType={optionalType}\n arrayType={arrayType}\n syntaxType={syntaxType}\n resolver={resolver}\n keysToOmit={keysToOmit}\n />\n </>\n )\n }\n\n const responseTypes = legacy\n ? node.responses.map((res) => {\n const responseName = resolver.resolveResponseStatusName(node, res.statusCode)\n\n return renderSchemaType({\n node: res.schema ? nameUnnamedEnums(res.schema, responseName) : res.schema,\n name: responseName,\n typedName: resolver.resolveResponseStatusTypedName(node, res.statusCode),\n description: res.description,\n keysToOmit: res.keysToOmit,\n })\n })\n : node.responses.map((res) =>\n renderSchemaType({\n node: res.schema,\n name: resolver.resolveResponseStatusName(node, res.statusCode),\n typedName: resolver.resolveResponseStatusTypedName(node, res.statusCode),\n description: res.description,\n keysToOmit: res.keysToOmit,\n }),\n )\n\n const requestType = node.requestBody?.schema\n ? renderSchemaType({\n node: legacy ? nameUnnamedEnums(node.requestBody.schema, resolver.resolveDataName(node)) : node.requestBody.schema,\n name: resolver.resolveDataName(node),\n typedName: resolver.resolveDataTypedName(node),\n description: node.requestBody.schema.description,\n keysToOmit: node.requestBody.keysToOmit,\n })\n : null\n\n if (legacy) {\n const pathParams = params.filter((p) => p.in === 'path')\n const queryParams = params.filter((p) => p.in === 'query')\n const headerParams = params.filter((p) => p.in === 'header')\n\n const legacyParamTypes = [\n pathParams.length > 0\n ? renderSchemaType({\n node: buildGroupedParamsSchema({ params: pathParams, parentName: resolver.resolvePathParamsName!(node) }),\n name: resolver.resolvePathParamsName!(node),\n typedName: resolver.resolvePathParamsTypedName!(node),\n })\n : null,\n queryParams.length > 0\n ? renderSchemaType({\n node: buildGroupedParamsSchema({ params: queryParams, parentName: resolver.resolveQueryParamsName!(node) }),\n name: resolver.resolveQueryParamsName!(node),\n typedName: resolver.resolveQueryParamsTypedName!(node),\n })\n : null,\n headerParams.length > 0\n ? renderSchemaType({\n node: buildGroupedParamsSchema({ params: headerParams, parentName: resolver.resolveHeaderParamsName!(node) }),\n name: resolver.resolveHeaderParamsName!(node),\n typedName: resolver.resolveHeaderParamsTypedName!(node),\n })\n : null,\n ]\n\n const legacyResponsesType = renderSchemaType({\n node: buildLegacyResponsesSchemaNode({ node, resolver }),\n name: resolver.resolveResponsesName(node),\n typedName: resolver.resolveResponsesTypedName(node),\n })\n\n const legacyResponseType = renderSchemaType({\n node: buildLegacyResponseUnionSchemaNode({ node, resolver }),\n name: resolver.resolveResponseName(node),\n typedName: resolver.resolveResponseTypedName(node),\n })\n\n return (\n <File baseName={file.baseName} path={file.path} meta={file.meta} banner={resolveBanner()} footer={resolveFooter()}>\n {legacyParamTypes}\n {responseTypes}\n {requestType}\n {legacyResponsesType}\n {legacyResponseType}\n </File>\n )\n }\n\n const paramTypes = params.map((param) =>\n renderSchemaType({\n node: param.schema,\n name: resolver.resolveParamName(node, param),\n typedName: resolver.resolveParamTypedName(node, param),\n }),\n )\n\n const dataType = renderSchemaType({\n node: buildDataSchemaNode({ node: { ...node, parameters: params }, resolver }),\n name: resolver.resolveRequestConfigName(node),\n typedName: resolver.resolveRequestConfigTypedName(node),\n })\n\n const responsesType = renderSchemaType({\n node: buildResponsesSchemaNode({ node, resolver }),\n name: resolver.resolveResponsesName(node),\n typedName: resolver.resolveResponsesTypedName(node),\n })\n\n const responseType = renderSchemaType({\n node: buildResponseUnionSchemaNode({ node, resolver }),\n name: resolver.resolveResponseName(node),\n typedName: resolver.resolveResponseTypedName(node),\n description: 'Union of all possible responses',\n })\n\n return (\n <File baseName={file.baseName} path={file.path} meta={file.meta} banner={resolveBanner()} footer={resolveFooter()}>\n {paramTypes}\n {responseTypes}\n {requestType}\n {dataType}\n {responsesType}\n {responseType}\n </File>\n )\n },\n Schema({ node, adapter, options }) {\n const { enumType, enumKeyCasing, syntaxType, optionalType, arrayType, resolver } = options\n const { mode, getFile, resolveBanner, resolveFooter } = useKubb<PluginTs>()\n\n if (!node.name) {\n return\n }\n\n const imports = adapter.getImports(node, (schemaName) => ({\n name: resolver.default(schemaName, 'type'),\n path: getFile({ name: schemaName, extname: '.ts', mode }).path,\n }))\n\n const isEnumSchema = node.type === 'enum'\n\n const typedName = ENUM_TYPES_WITH_KEY_SUFFIX.has(enumType) && isEnumSchema ? resolver.resolveEnumKeyTypedName(node) : resolver.resolveTypedName(node.name)\n\n const type = {\n name: resolver.resolveName(node.name),\n typedName,\n file: getFile({ name: node.name, extname: '.ts', mode }),\n } as const\n\n return (\n <File baseName={type.file.baseName} path={type.file.path} meta={type.file.meta} banner={resolveBanner()} footer={resolveFooter()}>\n {mode === 'split' &&\n imports.map((imp) => (\n <File.Import key={[node.name, imp.path, imp.isTypeOnly].join('-')} root={type.file.path} path={imp.path} name={imp.name} isTypeOnly />\n ))}\n <Type\n name={type.name}\n typedName={type.typedName}\n node={node}\n enumType={enumType}\n enumKeyCasing={enumKeyCasing}\n optionalType={optionalType}\n arrayType={arrayType}\n syntaxType={syntaxType}\n resolver={resolver}\n />\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;AAiBA,SAAgB,kBAAkB,EAAE,QAAQ,MAAM,YAAkD;AAClG,SAAA,GAAA,UAAA,cAAoB;EAClB,MAAM;EACN,YAAY,OAAO,KAAK,WAAA,GAAA,UAAA,gBACP;GACb,MAAM,MAAM;GACZ,SAAA,GAAA,UAAA,cAAqB;IACnB,MAAM;IACN,MAAM,SAAS,iBAAiB,MAAM,MAAM;IAC5C,UAAU,CAAC,MAAM;IAClB,CAAC;GACH,CAAC,CACH;EACF,CAAC;;;;;;;;;;AAgBJ,SAAgB,oBAAoB,EAAE,MAAM,YAAqD;CAC/F,MAAM,aAAa,KAAK,WAAW,QAAQ,MAAM,EAAE,OAAO,OAAO;CACjE,MAAM,cAAc,KAAK,WAAW,QAAQ,MAAM,EAAE,OAAO,QAAQ;CACnE,MAAM,eAAe,KAAK,WAAW,QAAQ,MAAM,EAAE,OAAO,SAAS;AAErE,SAAA,GAAA,UAAA,cAAoB;EAClB,MAAM;EACN,YAAY,KAAK;E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,KAAK,KAAK;EAE1J,MAAM,OAAO;GACX,MAAM,SAAS,YAAY,KAAK,KAAK;GACrC;GACA,MAAM,QAAQ;IAAE,MAAM,KAAK;IAAM,SAAS;IAAO;IAAM,CAAC;GACzD;AAED,SACE,iBAAA,GAAA,+BAAA,MAACF,mBAAAA,MAAD;GAAM,UAAU,KAAK,KAAK;GAAU,MAAM,KAAK,KAAK;GAAM,MAAM,KAAK,KAAK;GAAM,QAAQ,eAAe;GAAE,QAAQ,eAAe;aAAhI,CACG,SAAS,WACR,QAAQ,KAAK,QACX,iBAAA,GAAA,+BAAA,KAACA,mBAAAA,KAAK,QAAN;IAAmE,MAAM,KAAK,KAAK;IAAM,MAAM,IAAI;IAAM,MAAM,IAAI;IAAM,YAAA;IAAa,EAApH;IAAC,KAAK;IAAM,IAAI;IAAM,IAAI;IAAW,CAAC,KAAK,IAAI,CAAqE,CACtI,EACJ,iBAAA,GAAA,+BAAA,KAACC,aAAAA,MAAD;IACE,MAAM,KAAK;IACX,WAAW,KAAK;IACV;IACI;IACK;IACD;IACH;IACC;IACF;IACV,CAAA,CACG;;;CAGZ,CAAC"}
|
package/dist/generators.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
exports.typeGenerator =
|
|
4
|
-
exports.typeGeneratorV2 = require_plugin.typeGenerator;
|
|
2
|
+
const require_generators = require("./generators-DWBU-MuW.cjs");
|
|
3
|
+
exports.typeGenerator = require_generators.typeGenerator;
|