@kubb/plugin-swr 4.33.0 → 4.33.2
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-zfsAL4Ba.js → components-DRDGvgXG.js} +252 -82
- package/dist/components-DRDGvgXG.js.map +1 -0
- package/dist/{components-DajZAUqg.cjs → components-jd0l9XKn.cjs} +258 -76
- package/dist/components-jd0l9XKn.cjs.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.ts +4 -65
- package/dist/components.js +1 -1
- package/dist/{generators-CRTAyuzy.cjs → generators-9FlcwxK4.cjs} +2 -2
- package/dist/{generators-CRTAyuzy.cjs.map → generators-9FlcwxK4.cjs.map} +1 -1
- package/dist/{generators-ikbzqdK0.js → generators-ClWZJ-YG.js} +2 -2
- package/dist/{generators-ikbzqdK0.js.map → generators-ClWZJ-YG.js.map} +1 -1
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +43 -7
- package/dist/generators.js +1 -1
- package/dist/index.cjs +6 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/{types-CqiRxZve.d.ts → types-D5nI1xDO.d.ts} +71 -4
- package/package.json +11 -7
- package/src/components/MutationKey.tsx +1 -54
- package/src/components/QueryKey.tsx +1 -85
- package/src/plugin.ts +1 -1
- package/src/types.ts +4 -9
- package/dist/components-DajZAUqg.cjs.map +0 -1
- package/dist/components-zfsAL4Ba.js.map +0 -1
|
@@ -28,17 +28,187 @@ let _kubb_oas = require("@kubb/oas");
|
|
|
28
28
|
let _kubb_plugin_client_components = require("@kubb/plugin-client/components");
|
|
29
29
|
let _kubb_plugin_oas_utils = require("@kubb/plugin-oas/utils");
|
|
30
30
|
let _kubb_react_fabric = require("@kubb/react-fabric");
|
|
31
|
-
let _kubb_core_utils = require("@kubb/core/utils");
|
|
32
31
|
let _kubb_react_fabric_jsx_runtime = require("@kubb/react-fabric/jsx-runtime");
|
|
33
|
-
//#region src/
|
|
32
|
+
//#region ../../internals/utils/src/casing.ts
|
|
33
|
+
/**
|
|
34
|
+
* Shared implementation for camelCase and PascalCase conversion.
|
|
35
|
+
* Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)
|
|
36
|
+
* and capitalizes each word according to `pascal`.
|
|
37
|
+
*
|
|
38
|
+
* When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.
|
|
39
|
+
*/
|
|
40
|
+
function toCamelOrPascal(text, pascal) {
|
|
41
|
+
return text.trim().replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/(\d)([a-z])/g, "$1 $2").split(/[\s\-_./\\:]+/).filter(Boolean).map((word, i) => {
|
|
42
|
+
if (word.length > 1 && word === word.toUpperCase()) return word;
|
|
43
|
+
if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1);
|
|
44
|
+
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
45
|
+
}).join("").replace(/[^a-zA-Z0-9]/g, "");
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Splits `text` on `.` and applies `transformPart` to each segment.
|
|
49
|
+
* The last segment receives `isLast = true`, all earlier segments receive `false`.
|
|
50
|
+
* Segments are joined with `/` to form a file path.
|
|
51
|
+
*/
|
|
52
|
+
function applyToFileParts(text, transformPart) {
|
|
53
|
+
const parts = text.split(".");
|
|
54
|
+
return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join("/");
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Converts `text` to camelCase.
|
|
58
|
+
* When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* camelCase('hello-world') // 'helloWorld'
|
|
62
|
+
* camelCase('pet.petId', { isFile: true }) // 'pet/petId'
|
|
63
|
+
*/
|
|
64
|
+
function camelCase(text, { isFile, prefix = "", suffix = "" } = {}) {
|
|
65
|
+
if (isFile) return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? {
|
|
66
|
+
prefix,
|
|
67
|
+
suffix
|
|
68
|
+
} : {}));
|
|
69
|
+
return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Converts `text` to PascalCase.
|
|
73
|
+
* When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* pascalCase('hello-world') // 'HelloWorld'
|
|
77
|
+
* pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'
|
|
78
|
+
*/
|
|
79
|
+
function pascalCase(text, { isFile, prefix = "", suffix = "" } = {}) {
|
|
80
|
+
if (isFile) return applyToFileParts(text, (part, isLast) => isLast ? pascalCase(part, {
|
|
81
|
+
prefix,
|
|
82
|
+
suffix
|
|
83
|
+
}) : camelCase(part));
|
|
84
|
+
return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true);
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region ../../internals/utils/src/reserved.ts
|
|
88
|
+
/**
|
|
89
|
+
* Returns `true` when `name` is a syntactically valid JavaScript variable name.
|
|
90
|
+
*/
|
|
91
|
+
function isValidVarName(name) {
|
|
92
|
+
try {
|
|
93
|
+
new Function(`var ${name}`);
|
|
94
|
+
} catch {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region ../../internals/utils/src/urlPath.ts
|
|
101
|
+
/**
|
|
102
|
+
* Parses and transforms an OpenAPI/Swagger path string into various URL formats.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* const p = new URLPath('/pet/{petId}')
|
|
106
|
+
* p.URL // '/pet/:petId'
|
|
107
|
+
* p.template // '`/pet/${petId}`'
|
|
108
|
+
*/
|
|
109
|
+
var URLPath = class {
|
|
110
|
+
/** The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`. */
|
|
111
|
+
path;
|
|
112
|
+
#options;
|
|
113
|
+
constructor(path, options = {}) {
|
|
114
|
+
this.path = path;
|
|
115
|
+
this.#options = options;
|
|
116
|
+
}
|
|
117
|
+
/** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */
|
|
118
|
+
get URL() {
|
|
119
|
+
return this.toURLPath();
|
|
120
|
+
}
|
|
121
|
+
/** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`). */
|
|
122
|
+
get isURL() {
|
|
123
|
+
try {
|
|
124
|
+
return !!new URL(this.path).href;
|
|
125
|
+
} catch {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Converts the OpenAPI path to a TypeScript template literal string.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* new URLPath('/pet/{petId}').template // '`/pet/${petId}`'
|
|
134
|
+
* new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'
|
|
135
|
+
*/
|
|
136
|
+
get template() {
|
|
137
|
+
return this.toTemplateString();
|
|
138
|
+
}
|
|
139
|
+
/** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set. */
|
|
140
|
+
get object() {
|
|
141
|
+
return this.toObject();
|
|
142
|
+
}
|
|
143
|
+
/** Returns a map of path parameter names, or `undefined` when the path has no parameters. */
|
|
144
|
+
get params() {
|
|
145
|
+
return this.getParams();
|
|
146
|
+
}
|
|
147
|
+
#transformParam(raw) {
|
|
148
|
+
const param = isValidVarName(raw) ? raw : camelCase(raw);
|
|
149
|
+
return this.#options.casing === "camelcase" ? camelCase(param) : param;
|
|
150
|
+
}
|
|
151
|
+
/** Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name. */
|
|
152
|
+
#eachParam(fn) {
|
|
153
|
+
for (const match of this.path.matchAll(/\{([^}]+)\}/g)) {
|
|
154
|
+
const raw = match[1];
|
|
155
|
+
fn(raw, this.#transformParam(raw));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
toObject({ type = "path", replacer, stringify } = {}) {
|
|
159
|
+
const object = {
|
|
160
|
+
url: type === "path" ? this.toURLPath() : this.toTemplateString({ replacer }),
|
|
161
|
+
params: this.getParams()
|
|
162
|
+
};
|
|
163
|
+
if (stringify) {
|
|
164
|
+
if (type === "template") return JSON.stringify(object).replaceAll("'", "").replaceAll(`"`, "");
|
|
165
|
+
if (object.params) return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll("'", "").replaceAll(`"`, "")} }`;
|
|
166
|
+
return `{ url: '${object.url}' }`;
|
|
167
|
+
}
|
|
168
|
+
return object;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Converts the OpenAPI path to a TypeScript template literal string.
|
|
172
|
+
* An optional `replacer` can transform each extracted parameter name before interpolation.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'
|
|
176
|
+
*/
|
|
177
|
+
toTemplateString({ prefix = "", replacer } = {}) {
|
|
178
|
+
return `\`${prefix}${this.path.split(/\{([^}]+)\}/).map((part, i) => {
|
|
179
|
+
if (i % 2 === 0) return part;
|
|
180
|
+
const param = this.#transformParam(part);
|
|
181
|
+
return `\${${replacer ? replacer(param) : param}}`;
|
|
182
|
+
}).join("")}\``;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Extracts all `{param}` segments from the path and returns them as a key-value map.
|
|
186
|
+
* An optional `replacer` transforms each parameter name in both key and value positions.
|
|
187
|
+
* Returns `undefined` when no path parameters are found.
|
|
188
|
+
*/
|
|
189
|
+
getParams(replacer) {
|
|
190
|
+
const params = {};
|
|
191
|
+
this.#eachParam((_raw, param) => {
|
|
192
|
+
const key = replacer ? replacer(param) : param;
|
|
193
|
+
params[key] = key;
|
|
194
|
+
});
|
|
195
|
+
return Object.keys(params).length > 0 ? params : void 0;
|
|
196
|
+
}
|
|
197
|
+
/** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */
|
|
198
|
+
toURLPath() {
|
|
199
|
+
return this.path.replace(/\{([^}]+)\}/g, ":$1");
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region ../../internals/tanstack-query/src/components/MutationKey.tsx
|
|
34
204
|
function getParams$4({}) {
|
|
35
205
|
return _kubb_react_fabric.FunctionParams.factory({});
|
|
36
206
|
}
|
|
37
207
|
__name(getParams$4, "getParams");
|
|
38
208
|
const getTransformer$1 = /* @__PURE__ */ __name(({ operation, casing }) => {
|
|
39
|
-
return [`{ url: '${new
|
|
209
|
+
return [`{ url: '${new URLPath(operation.path, { casing }).toURLPath()}' }`];
|
|
40
210
|
}, "getTransformer");
|
|
41
|
-
function MutationKey({ name, typeSchemas,
|
|
211
|
+
function MutationKey({ name, typeSchemas, pathParamsType, paramsCasing, operation, typeName, transformer = getTransformer$1 }) {
|
|
42
212
|
const params = getParams$4({
|
|
43
213
|
pathParamsType,
|
|
44
214
|
typeSchemas
|
|
@@ -74,8 +244,76 @@ function MutationKey({ name, typeSchemas, paramsCasing, pathParamsType, operatio
|
|
|
74
244
|
MutationKey.getParams = getParams$4;
|
|
75
245
|
MutationKey.getTransformer = getTransformer$1;
|
|
76
246
|
//#endregion
|
|
247
|
+
//#region ../../internals/tanstack-query/src/components/QueryKey.tsx
|
|
248
|
+
function getParams$3({ pathParamsType, paramsCasing, typeSchemas }) {
|
|
249
|
+
return _kubb_react_fabric.FunctionParams.factory({
|
|
250
|
+
pathParams: typeSchemas.pathParams?.name ? {
|
|
251
|
+
mode: pathParamsType === "object" ? "object" : "inlineSpread",
|
|
252
|
+
children: (0, _kubb_plugin_oas_utils.getPathParams)(typeSchemas.pathParams, {
|
|
253
|
+
typed: true,
|
|
254
|
+
casing: paramsCasing
|
|
255
|
+
})
|
|
256
|
+
} : void 0,
|
|
257
|
+
data: typeSchemas.request?.name ? {
|
|
258
|
+
type: typeSchemas.request?.name,
|
|
259
|
+
optional: (0, _kubb_oas.isOptional)(typeSchemas.request?.schema)
|
|
260
|
+
} : void 0,
|
|
261
|
+
params: typeSchemas.queryParams?.name ? {
|
|
262
|
+
type: typeSchemas.queryParams?.name,
|
|
263
|
+
optional: (0, _kubb_oas.isOptional)(typeSchemas.queryParams?.schema)
|
|
264
|
+
} : void 0
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
__name(getParams$3, "getParams");
|
|
268
|
+
const getTransformer = ({ operation, schemas, casing }) => {
|
|
269
|
+
return [
|
|
270
|
+
new URLPath(operation.path, { casing }).toObject({
|
|
271
|
+
type: "path",
|
|
272
|
+
stringify: true
|
|
273
|
+
}),
|
|
274
|
+
schemas.queryParams?.name ? "...(params ? [params] : [])" : void 0,
|
|
275
|
+
schemas.request?.name ? "...(data ? [data] : [])" : void 0
|
|
276
|
+
].filter(Boolean);
|
|
277
|
+
};
|
|
278
|
+
function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer = getTransformer }) {
|
|
279
|
+
const params = getParams$3({
|
|
280
|
+
pathParamsType,
|
|
281
|
+
typeSchemas,
|
|
282
|
+
paramsCasing
|
|
283
|
+
});
|
|
284
|
+
const keys = transformer({
|
|
285
|
+
operation,
|
|
286
|
+
schemas: typeSchemas,
|
|
287
|
+
casing: paramsCasing
|
|
288
|
+
});
|
|
289
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Source, {
|
|
290
|
+
name,
|
|
291
|
+
isExportable: true,
|
|
292
|
+
isIndexable: true,
|
|
293
|
+
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Function.Arrow, {
|
|
294
|
+
name,
|
|
295
|
+
export: true,
|
|
296
|
+
params: params.toConstructor(),
|
|
297
|
+
singleLine: true,
|
|
298
|
+
children: `[${keys.join(", ")}] as const`
|
|
299
|
+
})
|
|
300
|
+
}), /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Source, {
|
|
301
|
+
name: typeName,
|
|
302
|
+
isExportable: true,
|
|
303
|
+
isIndexable: true,
|
|
304
|
+
isTypeOnly: true,
|
|
305
|
+
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Type, {
|
|
306
|
+
name: typeName,
|
|
307
|
+
export: true,
|
|
308
|
+
children: `ReturnType<typeof ${name}>`
|
|
309
|
+
})
|
|
310
|
+
})] });
|
|
311
|
+
}
|
|
312
|
+
QueryKey.getParams = getParams$3;
|
|
313
|
+
QueryKey.getTransformer = getTransformer;
|
|
314
|
+
//#endregion
|
|
77
315
|
//#region src/components/Mutation.tsx
|
|
78
|
-
function getParams$
|
|
316
|
+
function getParams$2({ pathParamsType, paramsCasing, dataReturnType, typeSchemas, mutationKeyTypeName }) {
|
|
79
317
|
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
80
318
|
const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
|
|
81
319
|
const TExtraArg = typeSchemas.request?.name || "never";
|
|
@@ -107,7 +345,7 @@ function getParams$3({ pathParamsType, paramsCasing, dataReturnType, typeSchemas
|
|
|
107
345
|
}
|
|
108
346
|
});
|
|
109
347
|
}
|
|
110
|
-
__name(getParams$
|
|
348
|
+
__name(getParams$2, "getParams");
|
|
111
349
|
function getTriggerParams({ dataReturnType, typeSchemas, mutationKeyTypeName, mutationArgTypeName }) {
|
|
112
350
|
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
113
351
|
const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
|
|
@@ -226,7 +464,7 @@ function Mutation({ name, clientName, mutationKeyName, mutationKeyTypeName, para
|
|
|
226
464
|
`${mutationKeyTypeName} | null`,
|
|
227
465
|
typeSchemas.request?.name
|
|
228
466
|
].filter(Boolean);
|
|
229
|
-
const params = getParams$
|
|
467
|
+
const params = getParams$2({
|
|
230
468
|
paramsCasing,
|
|
231
469
|
pathParamsType,
|
|
232
470
|
dataReturnType,
|
|
@@ -258,74 +496,6 @@ function Mutation({ name, clientName, mutationKeyName, mutationKeyTypeName, para
|
|
|
258
496
|
});
|
|
259
497
|
}
|
|
260
498
|
//#endregion
|
|
261
|
-
//#region src/components/QueryKey.tsx
|
|
262
|
-
function getParams$2({ pathParamsType, paramsCasing, typeSchemas }) {
|
|
263
|
-
return _kubb_react_fabric.FunctionParams.factory({
|
|
264
|
-
pathParams: {
|
|
265
|
-
mode: pathParamsType === "object" ? "object" : "inlineSpread",
|
|
266
|
-
children: (0, _kubb_plugin_oas_utils.getPathParams)(typeSchemas.pathParams, {
|
|
267
|
-
typed: true,
|
|
268
|
-
casing: paramsCasing
|
|
269
|
-
})
|
|
270
|
-
},
|
|
271
|
-
data: typeSchemas.request?.name ? {
|
|
272
|
-
type: typeSchemas.request?.name,
|
|
273
|
-
optional: (0, _kubb_oas.isOptional)(typeSchemas.request?.schema)
|
|
274
|
-
} : void 0,
|
|
275
|
-
params: typeSchemas.queryParams?.name ? {
|
|
276
|
-
type: typeSchemas.queryParams?.name,
|
|
277
|
-
optional: (0, _kubb_oas.isOptional)(typeSchemas.queryParams?.schema)
|
|
278
|
-
} : void 0
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
__name(getParams$2, "getParams");
|
|
282
|
-
const getTransformer = ({ operation, schemas, casing }) => {
|
|
283
|
-
return [
|
|
284
|
-
new _kubb_core_utils.URLPath(operation.path, { casing }).toObject({
|
|
285
|
-
type: "path",
|
|
286
|
-
stringify: true
|
|
287
|
-
}),
|
|
288
|
-
schemas.queryParams?.name ? "...(params ? [params] : [])" : void 0,
|
|
289
|
-
schemas.request?.name ? "...(data ? [data] : [])" : void 0
|
|
290
|
-
].filter(Boolean);
|
|
291
|
-
};
|
|
292
|
-
function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer = getTransformer }) {
|
|
293
|
-
const params = getParams$2({
|
|
294
|
-
pathParamsType,
|
|
295
|
-
paramsCasing,
|
|
296
|
-
typeSchemas
|
|
297
|
-
});
|
|
298
|
-
const keys = transformer({
|
|
299
|
-
operation,
|
|
300
|
-
schemas: typeSchemas,
|
|
301
|
-
casing: paramsCasing
|
|
302
|
-
});
|
|
303
|
-
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Source, {
|
|
304
|
-
name,
|
|
305
|
-
isExportable: true,
|
|
306
|
-
isIndexable: true,
|
|
307
|
-
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Function.Arrow, {
|
|
308
|
-
name,
|
|
309
|
-
export: true,
|
|
310
|
-
params: params.toConstructor(),
|
|
311
|
-
singleLine: true,
|
|
312
|
-
children: `[${keys.join(", ")}] as const`
|
|
313
|
-
})
|
|
314
|
-
}), /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Source, {
|
|
315
|
-
name: typeName,
|
|
316
|
-
isExportable: true,
|
|
317
|
-
isIndexable: true,
|
|
318
|
-
isTypeOnly: true,
|
|
319
|
-
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Type, {
|
|
320
|
-
name: typeName,
|
|
321
|
-
export: true,
|
|
322
|
-
children: `ReturnType<typeof ${name}>`
|
|
323
|
-
})
|
|
324
|
-
})] });
|
|
325
|
-
}
|
|
326
|
-
QueryKey.getParams = getParams$2;
|
|
327
|
-
QueryKey.getTransformer = getTransformer;
|
|
328
|
-
//#endregion
|
|
329
499
|
//#region src/components/QueryOptions.tsx
|
|
330
500
|
function getParams$1({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
|
|
331
501
|
if (paramsType === "object") {
|
|
@@ -594,5 +764,17 @@ Object.defineProperty(exports, "__toESM", {
|
|
|
594
764
|
return __toESM;
|
|
595
765
|
}
|
|
596
766
|
});
|
|
767
|
+
Object.defineProperty(exports, "camelCase", {
|
|
768
|
+
enumerable: true,
|
|
769
|
+
get: function() {
|
|
770
|
+
return camelCase;
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
Object.defineProperty(exports, "pascalCase", {
|
|
774
|
+
enumerable: true,
|
|
775
|
+
get: function() {
|
|
776
|
+
return pascalCase;
|
|
777
|
+
}
|
|
778
|
+
});
|
|
597
779
|
|
|
598
|
-
//# sourceMappingURL=components-
|
|
780
|
+
//# sourceMappingURL=components-jd0l9XKn.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-jd0l9XKn.cjs","names":["#options","#transformParam","#eachParam","getParams","FunctionParams","getTransformer","File","Function","Type","getParams","FunctionParams","File","Function","Type","getParams","FunctionParams","Client","File","Type","Function","getParams","FunctionParams","Client","File","Function","FunctionParams","File","Function"],"sources":["../../../internals/utils/src/casing.ts","../../../internals/utils/src/reserved.ts","../../../internals/utils/src/urlPath.ts","../../../internals/tanstack-query/src/components/MutationKey.tsx","../../../internals/tanstack-query/src/components/QueryKey.tsx","../src/components/Mutation.tsx","../src/components/QueryOptions.tsx","../src/components/Query.tsx"],"sourcesContent":["type Options = {\n /** When `true`, dot-separated segments are split on `.` and joined with `/` after casing. */\n isFile?: boolean\n /** Text prepended before casing is applied. */\n prefix?: string\n /** Text appended before casing is applied. */\n suffix?: string\n}\n\n/**\n * Shared implementation for camelCase and PascalCase conversion.\n * Splits on common word boundaries (spaces, hyphens, underscores, dots, slashes, colons)\n * and capitalizes each word according to `pascal`.\n *\n * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.\n */\nfunction toCamelOrPascal(text: string, pascal: boolean): string {\n const normalized = text\n .trim()\n .replace(/([a-z\\d])([A-Z])/g, '$1 $2')\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2')\n .replace(/(\\d)([a-z])/g, '$1 $2')\n\n const words = normalized.split(/[\\s\\-_./\\\\:]+/).filter(Boolean)\n\n return words\n .map((word, i) => {\n const allUpper = word.length > 1 && word === word.toUpperCase()\n if (allUpper) return word\n if (i === 0 && !pascal) return word.charAt(0).toLowerCase() + word.slice(1)\n return word.charAt(0).toUpperCase() + word.slice(1)\n })\n .join('')\n .replace(/[^a-zA-Z0-9]/g, '')\n}\n\n/**\n * Splits `text` on `.` and applies `transformPart` to each segment.\n * The last segment receives `isLast = true`, all earlier segments receive `false`.\n * Segments are joined with `/` to form a file path.\n */\nfunction applyToFileParts(text: string, transformPart: (part: string, isLast: boolean) => string): string {\n const parts = text.split('.')\n return parts.map((part, i) => transformPart(part, i === parts.length - 1)).join('/')\n}\n\n/**\n * Converts `text` to camelCase.\n * When `isFile` is `true`, dot-separated segments are each cased independently and joined with `/`.\n *\n * @example\n * camelCase('hello-world') // 'helloWorld'\n * camelCase('pet.petId', { isFile: true }) // 'pet/petId'\n */\nexport function camelCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => camelCase(part, isLast ? { prefix, suffix } : {}))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, false)\n}\n\n/**\n * Converts `text` to PascalCase.\n * When `isFile` is `true`, the last dot-separated segment is PascalCased and earlier segments are camelCased.\n *\n * @example\n * pascalCase('hello-world') // 'HelloWorld'\n * pascalCase('pet.petId', { isFile: true }) // 'pet/PetId'\n */\nexport function pascalCase(text: string, { isFile, prefix = '', suffix = '' }: Options = {}): string {\n if (isFile) {\n return applyToFileParts(text, (part, isLast) => (isLast ? pascalCase(part, { prefix, suffix }) : camelCase(part)))\n }\n\n return toCamelOrPascal(`${prefix} ${text} ${suffix}`, true)\n}\n\n/**\n * Converts `text` to snake_case.\n *\n * @example\n * snakeCase('helloWorld') // 'hello_world'\n * snakeCase('Hello-World') // 'hello_world'\n */\nexport function snakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n const processed = `${prefix} ${text} ${suffix}`.trim()\n return processed\n .replace(/([a-z])([A-Z])/g, '$1_$2')\n .replace(/[\\s\\-.]+/g, '_')\n .replace(/[^a-zA-Z0-9_]/g, '')\n .toLowerCase()\n .split('_')\n .filter(Boolean)\n .join('_')\n}\n\n/**\n * Converts `text` to SCREAMING_SNAKE_CASE.\n *\n * @example\n * screamingSnakeCase('helloWorld') // 'HELLO_WORLD'\n */\nexport function screamingSnakeCase(text: string, { prefix = '', suffix = '' }: Omit<Options, 'isFile'> = {}): string {\n return snakeCase(text, { prefix, suffix }).toUpperCase()\n}\n","/**\n * JavaScript and Java reserved words.\n * @link https://github.com/jonschlinkert/reserved/blob/master/index.js\n */\nconst reservedWords = [\n 'abstract',\n 'arguments',\n 'boolean',\n 'break',\n 'byte',\n 'case',\n 'catch',\n 'char',\n 'class',\n 'const',\n 'continue',\n 'debugger',\n 'default',\n 'delete',\n 'do',\n 'double',\n 'else',\n 'enum',\n 'eval',\n 'export',\n 'extends',\n 'false',\n 'final',\n 'finally',\n 'float',\n 'for',\n 'function',\n 'goto',\n 'if',\n 'implements',\n 'import',\n 'in',\n 'instanceof',\n 'int',\n 'interface',\n 'let',\n 'long',\n 'native',\n 'new',\n 'null',\n 'package',\n 'private',\n 'protected',\n 'public',\n 'return',\n 'short',\n 'static',\n 'super',\n 'switch',\n 'synchronized',\n 'this',\n 'throw',\n 'throws',\n 'transient',\n 'true',\n 'try',\n 'typeof',\n 'var',\n 'void',\n 'volatile',\n 'while',\n 'with',\n 'yield',\n 'Array',\n 'Date',\n 'hasOwnProperty',\n 'Infinity',\n 'isFinite',\n 'isNaN',\n 'isPrototypeOf',\n 'length',\n 'Math',\n 'name',\n 'NaN',\n 'Number',\n 'Object',\n 'prototype',\n 'String',\n 'toString',\n 'undefined',\n 'valueOf',\n]\n\n/**\n * Prefixes a word with `_` when it is a reserved JavaScript/Java identifier\n * or starts with a digit.\n */\nexport function transformReservedWord(word: string): string {\n const firstChar = word.charCodeAt(0)\n if (word && (reservedWords.includes(word) || (firstChar >= 48 && firstChar <= 57))) {\n return `_${word}`\n }\n return word\n}\n\n/**\n * Returns `true` when `name` is a syntactically valid JavaScript variable name.\n */\nexport function isValidVarName(name: string): boolean {\n try {\n new Function(`var ${name}`)\n } catch {\n return false\n }\n return true\n}\n","import { camelCase } from './casing.ts'\nimport { isValidVarName } from './reserved.ts'\n\nexport type URLObject = {\n /** The resolved URL string (Express-style or template literal, depending on context). */\n url: string\n /** Extracted path parameters as a key-value map, or `undefined` when the path has none. */\n params?: Record<string, string>\n}\n\ntype ObjectOptions = {\n /** Controls whether the `url` is rendered as an Express path or a template literal. Defaults to `'path'`. */\n type?: 'path' | 'template'\n /** Optional transform applied to each extracted parameter name. */\n replacer?: (pathParam: string) => string\n /** When `true`, the result is serialized to a string expression instead of a plain object. */\n stringify?: boolean\n}\n\n/** Supported identifier casing strategies for path parameters. */\ntype PathCasing = 'camelcase'\n\ntype Options = {\n /** Casing strategy applied to path parameter names. Defaults to the original identifier. */\n casing?: PathCasing\n}\n\n/**\n * Parses and transforms an OpenAPI/Swagger path string into various URL formats.\n *\n * @example\n * const p = new URLPath('/pet/{petId}')\n * p.URL // '/pet/:petId'\n * p.template // '`/pet/${petId}`'\n */\nexport class URLPath {\n /** The raw OpenAPI/Swagger path string, e.g. `/pet/{petId}`. */\n path: string\n\n #options: Options\n\n constructor(path: string, options: Options = {}) {\n this.path = path\n this.#options = options\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n get URL(): string {\n return this.toURLPath()\n }\n\n /** Returns `true` when `path` is a fully-qualified URL (e.g. starts with `https://`). */\n get isURL(): boolean {\n try {\n return !!new URL(this.path).href\n } catch {\n return false\n }\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n *\n * @example\n * new URLPath('/pet/{petId}').template // '`/pet/${petId}`'\n * new URLPath('/account/monetary-accountID').template // '`/account/${monetaryAccountId}`'\n */\n get template(): string {\n return this.toTemplateString()\n }\n\n /** Returns the path and its extracted params as a structured `URLObject`, or as a stringified expression when `stringify` is set. */\n get object(): URLObject | string {\n return this.toObject()\n }\n\n /** Returns a map of path parameter names, or `undefined` when the path has no parameters. */\n get params(): Record<string, string> | undefined {\n return this.getParams()\n }\n\n #transformParam(raw: string): string {\n const param = isValidVarName(raw) ? raw : camelCase(raw)\n return this.#options.casing === 'camelcase' ? camelCase(param) : param\n }\n\n /** Iterates over every `{param}` token in `path`, calling `fn` with the raw token and transformed name. */\n #eachParam(fn: (raw: string, param: string) => void): void {\n for (const match of this.path.matchAll(/\\{([^}]+)\\}/g)) {\n const raw = match[1]!\n fn(raw, this.#transformParam(raw))\n }\n }\n\n toObject({ type = 'path', replacer, stringify }: ObjectOptions = {}): URLObject | string {\n const object = {\n url: type === 'path' ? this.toURLPath() : this.toTemplateString({ replacer }),\n params: this.getParams(),\n }\n\n if (stringify) {\n if (type === 'template') {\n return JSON.stringify(object).replaceAll(\"'\", '').replaceAll(`\"`, '')\n }\n\n if (object.params) {\n return `{ url: '${object.url}', params: ${JSON.stringify(object.params).replaceAll(\"'\", '').replaceAll(`\"`, '')} }`\n }\n\n return `{ url: '${object.url}' }`\n }\n\n return object\n }\n\n /**\n * Converts the OpenAPI path to a TypeScript template literal string.\n * An optional `replacer` can transform each extracted parameter name before interpolation.\n *\n * @example\n * new URLPath('/pet/{petId}').toTemplateString() // '`/pet/${petId}`'\n */\n toTemplateString({ prefix = '', replacer }: { prefix?: string; replacer?: (pathParam: string) => string } = {}): string {\n const parts = this.path.split(/\\{([^}]+)\\}/)\n const result = parts\n .map((part, i) => {\n if (i % 2 === 0) return part\n const param = this.#transformParam(part)\n return `\\${${replacer ? replacer(param) : param}}`\n })\n .join('')\n\n return `\\`${prefix}${result}\\``\n }\n\n /**\n * Extracts all `{param}` segments from the path and returns them as a key-value map.\n * An optional `replacer` transforms each parameter name in both key and value positions.\n * Returns `undefined` when no path parameters are found.\n */\n getParams(replacer?: (pathParam: string) => string): Record<string, string> | undefined {\n const params: Record<string, string> = {}\n\n this.#eachParam((_raw, param) => {\n const key = replacer ? replacer(param) : param\n params[key] = key\n })\n\n return Object.keys(params).length > 0 ? params : undefined\n }\n\n /** Converts the OpenAPI path to Express-style colon syntax, e.g. `/pet/{petId}` → `/pet/:petId`. */\n toURLPath(): string {\n return this.path.replace(/\\{([^}]+)\\}/g, ':$1')\n }\n}\n","import { URLPath } from '@internals/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { File, Function, FunctionParams, Type } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { ParamsCasing, PathParamsType, Transformer } from '../types.ts'\n\ntype Props = {\n name: string\n typeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: ParamsCasing\n pathParamsType: PathParamsType\n transformer: Transformer | undefined\n}\n\ntype GetParamsProps = {\n pathParamsType: PathParamsType\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({}: GetParamsProps) {\n return FunctionParams.factory({})\n}\n\nconst getTransformer: Transformer = ({ operation, casing }) => {\n const path = new URLPath(operation.path, { casing })\n\n return [`{ url: '${path.toURLPath()}' }`]\n}\n\nexport function MutationKey({ name, typeSchemas, pathParamsType, paramsCasing, operation, typeName, transformer = getTransformer }: Props): FabricReactNode {\n const params = getParams({ pathParamsType, typeSchemas })\n const keys = transformer({ operation, schemas: typeSchemas, casing: paramsCasing })\n\n return (\n <>\n <File.Source name={name} isExportable isIndexable>\n <Function.Arrow name={name} export params={params.toConstructor()} singleLine>\n {`[${keys.join(', ')}] as const`}\n </Function.Arrow>\n </File.Source>\n <File.Source name={typeName} isExportable isIndexable isTypeOnly>\n <Type name={typeName} export>\n {`ReturnType<typeof ${name}>`}\n </Type>\n </File.Source>\n </>\n )\n}\n\nMutationKey.getParams = getParams\nMutationKey.getTransformer = getTransformer\n","import { URLPath } from '@internals/utils'\nimport { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams, Type } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { ParamsCasing, PathParamsType, Transformer } from '../types.ts'\n\ntype Props = {\n name: string\n typeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: ParamsCasing\n pathParamsType: PathParamsType\n transformer: Transformer | undefined\n}\n\ntype GetParamsProps = {\n paramsCasing: ParamsCasing\n pathParamsType: PathParamsType\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ pathParamsType, paramsCasing, typeSchemas }: GetParamsProps) {\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n })\n}\n\nconst getTransformer: Transformer = ({ operation, schemas, casing }) => {\n const path = new URLPath(operation.path, { casing })\n const keys = [\n path.toObject({\n type: 'path',\n stringify: true,\n }),\n schemas.queryParams?.name ? '...(params ? [params] : [])' : undefined,\n schemas.request?.name ? '...(data ? [data] : [])' : undefined,\n ].filter(Boolean)\n\n return keys\n}\n\nexport function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer = getTransformer }: Props): FabricReactNode {\n const params = getParams({ pathParamsType, typeSchemas, paramsCasing })\n const keys = transformer({\n operation,\n schemas: typeSchemas,\n casing: paramsCasing,\n })\n\n return (\n <>\n <File.Source name={name} isExportable isIndexable>\n <Function.Arrow name={name} export params={params.toConstructor()} singleLine>\n {`[${keys.join(', ')}] as const`}\n </Function.Arrow>\n </File.Source>\n <File.Source name={typeName} isExportable isIndexable isTypeOnly>\n <Type name={typeName} export>\n {`ReturnType<typeof ${name}>`}\n </Type>\n </File.Source>\n </>\n )\n}\n\nQueryKey.getParams = getParams\nQueryKey.getTransformer = getTransformer\n","import { isOptional, type Operation } from '@kubb/oas'\nimport { Client } from '@kubb/plugin-client/components'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams, Type } from '@kubb/react-fabric'\nimport type { FabricReactNode, Params } from '@kubb/react-fabric/types'\nimport type { PluginSwr } from '../types.ts'\nimport { MutationKey } from './MutationKey.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n typeName: string\n clientName: string\n mutationKeyName: string\n mutationKeyTypeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']\n paramsType: PluginSwr['resolvedOptions']['paramsType']\n dataReturnType: PluginSwr['resolvedOptions']['client']['dataReturnType']\n pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']\n /**\n * When true, mutation parameters are passed via trigger() instead of as hook arguments\n * @default false\n */\n paramsToTrigger?: boolean\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']\n pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']\n dataReturnType: PluginSwr['resolvedOptions']['client']['dataReturnType']\n typeSchemas: OperationSchemas\n mutationKeyTypeName: string\n}\n\n// Original getParams - used when paramsToTrigger is false (default)\nfunction getParams({ pathParamsType, paramsCasing, dataReturnType, typeSchemas, mutationKeyTypeName }: GetParamsProps) {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const TExtraArg = typeSchemas.request?.name || 'never'\n\n return FunctionParams.factory({\n pathParams: {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n },\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n options: {\n type: `\n{\n mutation?: SWRMutationConfiguration<${TData}, ${TError}, ${mutationKeyTypeName} | null, ${TExtraArg}> & { throwOnError?: boolean },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }` : 'Partial<RequestConfig> & { client?: Client }'},\n shouldFetch?: boolean,\n}\n`,\n default: '{}',\n },\n })\n}\n\ntype GetTriggerParamsProps = {\n dataReturnType: PluginSwr['resolvedOptions']['client']['dataReturnType']\n typeSchemas: OperationSchemas\n mutationKeyTypeName: string\n mutationArgTypeName: string\n}\n\n// New getParams - used when paramsToTrigger is true\nfunction getTriggerParams({ dataReturnType, typeSchemas, mutationKeyTypeName, mutationArgTypeName }: GetTriggerParamsProps) {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n return FunctionParams.factory({\n options: {\n type: `\n{\n mutation?: SWRMutationConfiguration<${TData}, ${TError}, ${mutationKeyTypeName} | null, ${mutationArgTypeName}> & { throwOnError?: boolean },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }` : 'Partial<RequestConfig> & { client?: Client }'},\n shouldFetch?: boolean,\n}\n`,\n default: '{}',\n },\n })\n}\n\ntype GetMutationParamsProps = {\n paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']\n typeSchemas: OperationSchemas\n}\n\nfunction getMutationParams({ paramsCasing, typeSchemas }: GetMutationParamsProps) {\n return FunctionParams.factory({\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n })\n}\n\nexport function Mutation({\n name,\n clientName,\n mutationKeyName,\n mutationKeyTypeName,\n paramsType,\n paramsCasing,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n operation,\n paramsToTrigger = false,\n}: Props): FabricReactNode {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n const mutationKeyParams = MutationKey.getParams({\n pathParamsType,\n typeSchemas,\n })\n\n const clientParams = Client.getParams({\n paramsCasing,\n paramsType,\n typeSchemas,\n pathParamsType,\n isConfigurable: true,\n })\n\n // Use the new trigger-based approach when paramsToTrigger is true\n if (paramsToTrigger) {\n // Build the mutation params type (for arg destructuring)\n const mutationParams = getMutationParams({\n paramsCasing,\n typeSchemas,\n })\n\n // Get the arg type name\n const mutationArgTypeName = `${mutationKeyTypeName.replace('MutationKey', '')}MutationArg`\n\n // Check if there are any mutation params (path, data, params, headers)\n const hasMutationParams = Object.keys(mutationParams.params).length > 0\n\n // Build the arg type for useSWRMutation\n const argParams = FunctionParams.factory({\n data: {\n mode: 'object',\n children: Object.entries(mutationParams.params).reduce((acc, [key, value]) => {\n if (value) {\n acc[key] = {\n ...value,\n type: undefined,\n }\n }\n return acc\n }, {} as Params),\n },\n })\n\n const params = getTriggerParams({\n dataReturnType,\n typeSchemas,\n mutationKeyTypeName,\n mutationArgTypeName,\n })\n\n const generics = [TData, TError, `${mutationKeyTypeName} | null`, mutationArgTypeName].filter(Boolean)\n\n const mutationArg = mutationParams.toConstructor()\n\n return (\n <>\n <File.Source name={mutationArgTypeName} isExportable isIndexable isTypeOnly>\n <Type name={mutationArgTypeName} export>\n {hasMutationParams ? `{${mutationArg}}` : 'never'}\n </Type>\n </File.Source>\n <File.Source name={name} isExportable isIndexable>\n <Function\n name={name}\n export\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n >\n {`\n const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {}\n const mutationKey = ${mutationKeyName}(${mutationKeyParams.toCall()})\n\n return useSWRMutation<${generics.join(', ')}>(\n shouldFetch ? mutationKey : null,\n async (_url${hasMutationParams ? `, { arg: ${argParams.toCall()} }` : ''}) => {\n return ${clientName}(${clientParams.toCall()})\n },\n mutationOptions\n )\n `}\n </Function>\n </File.Source>\n </>\n )\n }\n\n // Original behavior (default)\n const generics = [\n TData,\n TError,\n `${mutationKeyTypeName} | null`,\n typeSchemas.request?.name, // TExtraArg - the arg type for useSWRMutation\n ].filter(Boolean)\n\n const params = getParams({\n paramsCasing,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n mutationKeyTypeName,\n })\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function\n name={name}\n export\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n >\n {`\n const { mutation: mutationOptions, client: config = {}, shouldFetch = true } = options ?? {}\n const mutationKey = ${mutationKeyName}(${mutationKeyParams.toCall()})\n\n return useSWRMutation<${generics.join(', ')}>(\n shouldFetch ? mutationKey : null,\n async (_url${typeSchemas.request?.name ? ', { arg: data }' : ''}) => {\n return ${clientName}(${clientParams.toCall()})\n },\n mutationOptions\n )\n `}\n </Function>\n </File.Source>\n )\n}\n","import { getDefaultValue, isOptional } from '@kubb/oas'\nimport { Client } from '@kubb/plugin-client/components'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginSwr } from '../types.ts'\n\ntype Props = {\n name: string\n clientName: string\n typeSchemas: OperationSchemas\n paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']\n paramsType: PluginSwr['resolvedOptions']['paramsType']\n pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']\n}\n\ntype GetParamsProps = {\n paramsType: PluginSwr['resolvedOptions']['paramsType']\n paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']\n pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing })\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...pathParams,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n config: {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n config: {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }`\n : 'Partial<RequestConfig> & { client?: Client }',\n default: '{}',\n },\n })\n}\n\nexport function QueryOptions({ name, clientName, typeSchemas, paramsCasing, paramsType, pathParamsType }: Props): FabricReactNode {\n const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas })\n const clientParams = Client.getParams({\n paramsCasing,\n paramsType,\n typeSchemas,\n pathParamsType,\n isConfigurable: true,\n })\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function name={name} export params={params.toConstructor()}>\n {`\n return {\n fetcher: async () => {\n return ${clientName}(${clientParams.toCall()})\n },\n }\n `}\n </Function>\n </File.Source>\n )\n}\n\nQueryOptions.getParams = getParams\n","import { getDefaultValue, isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react-fabric'\nimport type { FabricReactNode } from '@kubb/react-fabric/types'\nimport type { PluginSwr } from '../types.ts'\nimport { QueryKey } from './QueryKey.tsx'\nimport { QueryOptions } from './QueryOptions.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n queryOptionsName: string\n queryKeyName: string\n queryKeyTypeName: string\n typeSchemas: OperationSchemas\n paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']\n paramsType: PluginSwr['resolvedOptions']['paramsType']\n pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']\n dataReturnType: PluginSwr['resolvedOptions']['client']['dataReturnType']\n operation: Operation\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginSwr['resolvedOptions']['paramsCasing']\n paramsType: PluginSwr['resolvedOptions']['paramsType']\n pathParamsType: PluginSwr['resolvedOptions']['pathParamsType']\n dataReturnType: PluginSwr['resolvedOptions']['client']['dataReturnType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps) {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n if (paramsType === 'object') {\n const pathParams = getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing })\n\n const children = {\n ...pathParams,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n }\n\n // Check if all children are optional or undefined\n const allChildrenAreOptional = Object.values(children).every((child) => !child || child.optional)\n\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children,\n default: allChildrenAreOptional ? '{}' : undefined,\n },\n options: {\n type: `\n{\n query?: Parameters<typeof useSWR<${[TData, TError].join(', ')}>>[2],\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }` : 'Partial<RequestConfig> & { client?: Client }'},\n shouldFetch?: boolean,\n immutable?: boolean\n}\n`,\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n default: getDefaultValue(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n options: {\n type: `\n{\n query?: Parameters<typeof useSWR<${[TData, TError].join(', ')}>>[2],\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: Client }` : 'Partial<RequestConfig> & { client?: Client }'},\n shouldFetch?: boolean,\n immutable?: boolean\n}\n`,\n default: '{}',\n },\n })\n}\n\nexport function Query({\n name,\n typeSchemas,\n queryKeyName,\n queryKeyTypeName,\n queryOptionsName,\n operation,\n dataReturnType,\n paramsType,\n paramsCasing,\n pathParamsType,\n}: Props): FabricReactNode {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const generics = [TData, TError, `${queryKeyTypeName} | null`]\n\n const queryKeyParams = QueryKey.getParams({\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n const params = getParams({\n paramsCasing,\n paramsType,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n })\n\n const queryOptionsParams = QueryOptions.getParams({\n paramsCasing,\n paramsType,\n pathParamsType,\n typeSchemas,\n })\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function\n name={name}\n export\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n >\n {`\n const { query: queryOptions, client: config = {}, shouldFetch = true, immutable } = options ?? {}\n\n const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})\n\n return useSWR<${generics.join(', ')}>(\n shouldFetch ? queryKey : null,\n {\n ...${queryOptionsName}(${queryOptionsParams.toCall()}),\n ...(immutable ? {\n revalidateIfStale: false,\n revalidateOnFocus: false,\n revalidateOnReconnect: false\n } : { }),\n ...queryOptions\n }\n )\n `}\n </Function>\n </File.Source>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,SAAS,gBAAgB,MAAc,QAAyB;AAS9D,QARmB,KAChB,MAAM,CACN,QAAQ,qBAAqB,QAAQ,CACrC,QAAQ,yBAAyB,QAAQ,CACzC,QAAQ,gBAAgB,QAAQ,CAEV,MAAM,gBAAgB,CAAC,OAAO,QAAQ,CAG5D,KAAK,MAAM,MAAM;AAEhB,MADiB,KAAK,SAAS,KAAK,SAAS,KAAK,aAAa,CACjD,QAAO;AACrB,MAAI,MAAM,KAAK,CAAC,OAAQ,QAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;AAC3E,SAAO,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;GACnD,CACD,KAAK,GAAG,CACR,QAAQ,iBAAiB,GAAG;;;;;;;AAQjC,SAAS,iBAAiB,MAAc,eAAkE;CACxG,MAAM,QAAQ,KAAK,MAAM,IAAI;AAC7B,QAAO,MAAM,KAAK,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QAAN;EAAmB;EAAM,cAAA;EAAa,aAAA;YACpC,iBAAA,GAAA,+BAAA,KAACC,mBAAAA,UAAD;GACQ;GACN,QAAA;GACA,QAAQ,OAAO,eAAe;GAC9B,OAAO,EACL,WAAA,GAAA,uBAAA,aAAsB,UAAU,EACjC;aAEA;;;0BAGiB,aAAa,GAAG,eAAe,QAAQ,CAAC;;uBAE3C,SAAS,KAAK,KAAK,CAAC;;;eAG5B,iBAAiB,GAAG,mBAAmB,QAAQ,CAAC;;;;;;;;;;GAU9C,CAAA;EACC,CAAA"}
|
package/dist/components.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_components = require("./components-
|
|
2
|
+
const require_components = require("./components-jd0l9XKn.cjs");
|
|
3
3
|
exports.Mutation = require_components.Mutation;
|
|
4
4
|
exports.MutationKey = require_components.MutationKey;
|
|
5
5
|
exports.Query = require_components.Query;
|
package/dist/components.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { n as PluginSwr, r as
|
|
2
|
+
import { i as MutationKey, n as PluginSwr, r as QueryKey } from "./types-D5nI1xDO.js";
|
|
3
3
|
import { OperationSchemas } from "@kubb/plugin-oas";
|
|
4
4
|
import { Operation } from "@kubb/oas";
|
|
5
5
|
import { FunctionParams } from "@kubb/react-fabric";
|
|
6
6
|
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
7
7
|
|
|
8
8
|
//#region src/components/Mutation.d.ts
|
|
9
|
-
type Props$
|
|
9
|
+
type Props$2 = {
|
|
10
10
|
/**
|
|
11
11
|
* Name of the function
|
|
12
12
|
*/
|
|
@@ -39,38 +39,10 @@ declare function Mutation({
|
|
|
39
39
|
typeSchemas,
|
|
40
40
|
operation,
|
|
41
41
|
paramsToTrigger
|
|
42
|
-
}: Props$
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/components/MutationKey.d.ts
|
|
45
|
-
type Props$3 = {
|
|
46
|
-
name: string;
|
|
47
|
-
typeName: string;
|
|
48
|
-
typeSchemas: OperationSchemas;
|
|
49
|
-
operation: Operation;
|
|
50
|
-
paramsCasing: PluginSwr['resolvedOptions']['paramsCasing'];
|
|
51
|
-
pathParamsType: PluginSwr['resolvedOptions']['pathParamsType'];
|
|
52
|
-
transformer: Transformer | undefined;
|
|
53
|
-
};
|
|
54
|
-
type GetParamsProps$2 = {
|
|
55
|
-
pathParamsType: PluginSwr['resolvedOptions']['pathParamsType'];
|
|
56
|
-
typeSchemas: OperationSchemas;
|
|
57
|
-
};
|
|
58
|
-
declare function MutationKey({
|
|
59
|
-
name,
|
|
60
|
-
typeSchemas,
|
|
61
|
-
paramsCasing,
|
|
62
|
-
pathParamsType,
|
|
63
|
-
operation,
|
|
64
|
-
typeName,
|
|
65
|
-
transformer
|
|
66
|
-
}: Props$3): FabricReactNode;
|
|
67
|
-
declare namespace MutationKey {
|
|
68
|
-
var getParams: ({}: GetParamsProps$2) => FunctionParams;
|
|
69
|
-
var getTransformer: Transformer;
|
|
70
|
-
}
|
|
42
|
+
}: Props$2): FabricReactNode;
|
|
71
43
|
//#endregion
|
|
72
44
|
//#region src/components/Query.d.ts
|
|
73
|
-
type Props$
|
|
45
|
+
type Props$1 = {
|
|
74
46
|
/**
|
|
75
47
|
* Name of the function
|
|
76
48
|
*/
|
|
@@ -96,40 +68,7 @@ declare function Query({
|
|
|
96
68
|
paramsType,
|
|
97
69
|
paramsCasing,
|
|
98
70
|
pathParamsType
|
|
99
|
-
}: Props$2): FabricReactNode;
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/components/QueryKey.d.ts
|
|
102
|
-
type Props$1 = {
|
|
103
|
-
name: string;
|
|
104
|
-
typeName: string;
|
|
105
|
-
typeSchemas: OperationSchemas;
|
|
106
|
-
operation: Operation;
|
|
107
|
-
paramsCasing: PluginSwr['resolvedOptions']['paramsCasing'];
|
|
108
|
-
pathParamsType: PluginSwr['resolvedOptions']['pathParamsType'];
|
|
109
|
-
transformer: Transformer | undefined;
|
|
110
|
-
};
|
|
111
|
-
type GetParamsProps$1 = {
|
|
112
|
-
paramsCasing: PluginSwr['resolvedOptions']['paramsCasing'];
|
|
113
|
-
pathParamsType: PluginSwr['resolvedOptions']['pathParamsType'];
|
|
114
|
-
typeSchemas: OperationSchemas;
|
|
115
|
-
};
|
|
116
|
-
declare function QueryKey({
|
|
117
|
-
name,
|
|
118
|
-
typeSchemas,
|
|
119
|
-
paramsCasing,
|
|
120
|
-
pathParamsType,
|
|
121
|
-
operation,
|
|
122
|
-
typeName,
|
|
123
|
-
transformer
|
|
124
71
|
}: Props$1): FabricReactNode;
|
|
125
|
-
declare namespace QueryKey {
|
|
126
|
-
var getParams: ({
|
|
127
|
-
pathParamsType,
|
|
128
|
-
paramsCasing,
|
|
129
|
-
typeSchemas
|
|
130
|
-
}: GetParamsProps$1) => FunctionParams;
|
|
131
|
-
var getTransformer: Transformer;
|
|
132
|
-
}
|
|
133
72
|
//#endregion
|
|
134
73
|
//#region src/components/QueryOptions.d.ts
|
|
135
74
|
type Props = {
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MutationKey, i as
|
|
1
|
+
import { a as MutationKey, i as QueryKey, n as QueryOptions, r as Mutation, t as Query } from "./components-DRDGvgXG.js";
|
|
2
2
|
export { Mutation, MutationKey, Query, QueryKey, QueryOptions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_components = require("./components-
|
|
1
|
+
const require_components = require("./components-jd0l9XKn.cjs");
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
node_path = require_components.__toESM(node_path);
|
|
4
4
|
let _kubb_plugin_client = require("@kubb/plugin-client");
|
|
@@ -407,4 +407,4 @@ Object.defineProperty(exports, "queryGenerator", {
|
|
|
407
407
|
}
|
|
408
408
|
});
|
|
409
409
|
|
|
410
|
-
//# sourceMappingURL=generators-
|
|
410
|
+
//# sourceMappingURL=generators-9FlcwxK4.cjs.map
|