@kubb/plugin-vue-query 5.0.0-beta.104 → 5.0.0-beta.106
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/index.cjs +14 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
23
23
|
}
|
|
24
24
|
return to;
|
|
25
25
|
};
|
|
26
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
27
27
|
value: mod,
|
|
28
28
|
enumerable: true
|
|
29
29
|
}) : target, mod));
|
|
@@ -430,14 +430,16 @@ function buildGroupedRequestParam(node, options) {
|
|
|
430
430
|
*/
|
|
431
431
|
function buildQueryOptionsParams(node, options) {
|
|
432
432
|
const { resolver, memberTypeWrapper } = options;
|
|
433
|
-
|
|
433
|
+
const groupedParam = buildGroupedRequestParam(node, {
|
|
434
434
|
resolver,
|
|
435
435
|
memberTypeWrapper
|
|
436
|
-
})
|
|
436
|
+
});
|
|
437
|
+
const configParam = (0, _kubb_plugin_ts.createFunctionParameter)({
|
|
437
438
|
name: "config",
|
|
438
439
|
type: `Partial<Omit<RequestConfig, 'path' | 'query' | 'body' | 'headers' | 'url'>>`,
|
|
439
440
|
default: "{}"
|
|
440
|
-
})
|
|
441
|
+
});
|
|
442
|
+
return (0, _kubb_plugin_ts.createFunctionParameters)({ params: [groupedParam, configParam].filter((param) => param !== null) });
|
|
441
443
|
}
|
|
442
444
|
/**
|
|
443
445
|
* Builds the call to a client `<op>` function inside a query/mutation hook body. The function takes
|
|
@@ -967,10 +969,11 @@ function buildInfiniteQueryParamsNode(node, options) {
|
|
|
967
969
|
}`,
|
|
968
970
|
default: "{}"
|
|
969
971
|
});
|
|
970
|
-
|
|
972
|
+
const groupedParam = buildGroupedRequestParam(node, {
|
|
971
973
|
resolver,
|
|
972
974
|
memberTypeWrapper: maybeRefOrGetter
|
|
973
|
-
})
|
|
975
|
+
});
|
|
976
|
+
return (0, _kubb_plugin_ts.createFunctionParameters)({ params: [groupedParam, optionsParam].filter((param) => param !== null) });
|
|
974
977
|
}
|
|
975
978
|
function InfiniteQuery({ name, queryKeyTypeName, queryOptionsName, queryKeyName, node, tsResolver }) {
|
|
976
979
|
const { TData, TError } = buildResponseTypes(node, tsResolver);
|
|
@@ -1039,13 +1042,14 @@ function resolveMutationRequestType(node, resolver) {
|
|
|
1039
1042
|
function buildMutationParamsNode(node, options) {
|
|
1040
1043
|
const { resolver } = options;
|
|
1041
1044
|
const { TData, TError } = buildResponseTypes(node, resolver);
|
|
1045
|
+
const TRequest = resolveMutationRequestType(node, resolver);
|
|
1042
1046
|
return (0, _kubb_plugin_ts.createFunctionParameters)({ params: [(0, _kubb_plugin_ts.createFunctionParameter)({
|
|
1043
1047
|
name: "options",
|
|
1044
1048
|
type: `{
|
|
1045
1049
|
mutation?: MutationObserverOptions<${[
|
|
1046
1050
|
TData,
|
|
1047
1051
|
TError,
|
|
1048
|
-
|
|
1052
|
+
TRequest,
|
|
1049
1053
|
"TContext"
|
|
1050
1054
|
].join(", ")}> & { client?: QueryClient },
|
|
1051
1055
|
client?: ${buildRequestConfigType(node)},
|
|
@@ -1119,10 +1123,11 @@ function buildQueryParamsNode(node, options) {
|
|
|
1119
1123
|
}`,
|
|
1120
1124
|
default: "{}"
|
|
1121
1125
|
});
|
|
1122
|
-
|
|
1126
|
+
const groupedParam = buildGroupedRequestParam(node, {
|
|
1123
1127
|
resolver,
|
|
1124
1128
|
memberTypeWrapper: maybeRefOrGetter
|
|
1125
|
-
})
|
|
1129
|
+
});
|
|
1130
|
+
return (0, _kubb_plugin_ts.createFunctionParameters)({ params: [groupedParam, optionsParam].filter((param) => param !== null) });
|
|
1126
1131
|
}
|
|
1127
1132
|
function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, node, tsResolver }) {
|
|
1128
1133
|
const { TData, TError } = buildResponseTypes(node, tsResolver);
|