typed-openapi 1.1.1 → 1.2.0
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.
|
@@ -918,7 +918,7 @@ var generateTanstackQueryFile = async (ctx) => {
|
|
|
918
918
|
/** type-only property if you need easy access to the endpoint params */
|
|
919
919
|
"~endpoint": {} as TEndpoint,
|
|
920
920
|
queryKey,
|
|
921
|
-
|
|
921
|
+
queryOptions: queryOptions({
|
|
922
922
|
queryFn: async ({ queryKey, signal, }) => {
|
|
923
923
|
const res = await this.client.${method}(path, {
|
|
924
924
|
...params,
|
|
@@ -931,7 +931,7 @@ var generateTanstackQueryFile = async (ctx) => {
|
|
|
931
931
|
}),
|
|
932
932
|
mutationOptions: {
|
|
933
933
|
mutationKey: queryKey,
|
|
934
|
-
mutationFn: async (localOptions) => {
|
|
934
|
+
mutationFn: async (localOptions: TEndpoint extends { parameters: infer Parameters} ? Parameters: never) => {
|
|
935
935
|
const res = await this.client.${method}(path, {
|
|
936
936
|
...params,
|
|
937
937
|
...queryKey[0],
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -78,7 +78,7 @@ export const generateTanstackQueryFile = async (ctx: GeneratorContext & { relati
|
|
|
78
78
|
/** type-only property if you need easy access to the endpoint params */
|
|
79
79
|
"~endpoint": {} as TEndpoint,
|
|
80
80
|
queryKey,
|
|
81
|
-
|
|
81
|
+
queryOptions: queryOptions({
|
|
82
82
|
queryFn: async ({ queryKey, signal, }) => {
|
|
83
83
|
const res = await this.client.${method}(path, {
|
|
84
84
|
...params,
|
|
@@ -91,7 +91,7 @@ export const generateTanstackQueryFile = async (ctx: GeneratorContext & { relati
|
|
|
91
91
|
}),
|
|
92
92
|
mutationOptions: {
|
|
93
93
|
mutationKey: queryKey,
|
|
94
|
-
mutationFn: async (localOptions) => {
|
|
94
|
+
mutationFn: async (localOptions: TEndpoint extends { parameters: infer Parameters} ? Parameters: never) => {
|
|
95
95
|
const res = await this.client.${method}(path, {
|
|
96
96
|
...params,
|
|
97
97
|
...queryKey[0],
|