@orval/query 6.22.0 → 6.22.1
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.js +7 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1734,7 +1734,8 @@ var SVELTE_QUERY_DEPENDENCIES = [
|
|
|
1734
1734
|
{ name: "MutationFunction" },
|
|
1735
1735
|
{ name: "CreateQueryResult" },
|
|
1736
1736
|
{ name: "CreateInfiniteQueryResult" },
|
|
1737
|
-
{ name: "QueryKey" }
|
|
1737
|
+
{ name: "QueryKey" },
|
|
1738
|
+
{ name: "InfiniteData" }
|
|
1738
1739
|
],
|
|
1739
1740
|
dependency: "@tanstack/svelte-query"
|
|
1740
1741
|
}
|
|
@@ -1855,7 +1856,8 @@ var VUE_QUERY_DEPENDENCIES = [
|
|
|
1855
1856
|
{ name: "MutationFunction" },
|
|
1856
1857
|
{ name: "QueryKey" },
|
|
1857
1858
|
{ name: "UseQueryReturnType" },
|
|
1858
|
-
{ name: "UseInfiniteQueryReturnType" }
|
|
1859
|
+
{ name: "UseInfiniteQueryReturnType" },
|
|
1860
|
+
{ name: "InfiniteData" }
|
|
1859
1861
|
],
|
|
1860
1862
|
dependency: "@tanstack/vue-query"
|
|
1861
1863
|
},
|
|
@@ -1897,7 +1899,7 @@ var getPackageByQueryClient = (packageJson, queryClient) => {
|
|
|
1897
1899
|
return (_c = (_a = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _a["@tanstack/react-query"]) != null ? _c : (_b = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _b["@tanstack/react-query"];
|
|
1898
1900
|
}
|
|
1899
1901
|
case "svelte-query": {
|
|
1900
|
-
return (_f = (_d = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _d["@
|
|
1902
|
+
return (_f = (_d = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _d["@tanstack/svelte-query"]) != null ? _f : (_e = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _e["@tanstack/svelte-query"];
|
|
1901
1903
|
}
|
|
1902
1904
|
case "vue-query": {
|
|
1903
1905
|
return (_i = (_g = packageJson == null ? void 0 : packageJson.dependencies) == null ? void 0 : _g["@tanstack/vue-query"]) != null ? _i : (_h = packageJson == null ? void 0 : packageJson.devDependencies) == null ? void 0 : _h["@tanstack/vue-query"];
|
|
@@ -2092,7 +2094,7 @@ var getQueryOptionsDefinition = ({
|
|
|
2092
2094
|
type
|
|
2093
2095
|
)}Options<${funcReturnType}, TError, TData${hasQueryV5 && (type === QueryType.INFINITE || type === QueryType.SUSPENSE_INFINITE) && queryParam && queryParams ? `, ${funcReturnType}, QueryKey, ${queryParams == null ? void 0 : queryParams.schema.name}['${queryParam}']` : ""}>${partialOptions ? ">" : ""}`;
|
|
2094
2096
|
}
|
|
2095
|
-
return `${prefix}MutationOptions<Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, import_core2.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>, TError,${definitions ? `{${definitions}}` : "
|
|
2097
|
+
return `${prefix}MutationOptions<Awaited<ReturnType<${isMutatorHook ? `ReturnType<typeof use${(0, import_core2.pascal)(operationName)}Hook>` : `typeof ${operationName}`}>>, TError,${definitions ? `{${definitions}}` : "void"}, TContext>`;
|
|
2096
2098
|
};
|
|
2097
2099
|
var generateQueryArguments = ({
|
|
2098
2100
|
operationName,
|
|
@@ -2546,7 +2548,7 @@ var generateQueryHook = async ({
|
|
|
2546
2548
|
${(mutator == null ? void 0 : mutator.isHook) ? `const ${operationName} = use${(0, import_core2.pascal)(operationName)}Hook()` : ""}
|
|
2547
2549
|
|
|
2548
2550
|
|
|
2549
|
-
const mutationFn: MutationFunction<Awaited<ReturnType<${dataType}>>, ${definitions ? `{${definitions}}` : "
|
|
2551
|
+
const mutationFn: MutationFunction<Awaited<ReturnType<${dataType}>>, ${definitions ? `{${definitions}}` : "void"}> = (${properties ? "props" : ""}) => {
|
|
2550
2552
|
${properties ? `const {${properties}} = props ?? {};` : ""}
|
|
2551
2553
|
|
|
2552
2554
|
return ${operationName}(${properties}${properties ? "," : ""}${isRequestOptions ? !mutator ? `axiosOptions` : (mutator == null ? void 0 : mutator.hasSecondArg) ? "requestOptions" : "" : ""})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orval/query",
|
|
3
|
-
"version": "6.22.
|
|
3
|
+
"version": "6.22.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"test": "vitest"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@orval/core": "6.22.
|
|
17
|
+
"@orval/core": "6.22.1",
|
|
18
18
|
"lodash.omitby": "^4.6.0",
|
|
19
19
|
"vitest": "^0.34.6"
|
|
20
20
|
},
|