@kubb/plugin-solid-query 4.13.0 → 4.14.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.
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{types-Ca_wmOmt.d.ts → types-B_ZUXCJi.d.cts} +5 -3
- package/dist/{types-BXtQ-Er4.d.cts → types-COok_-3x.d.ts} +5 -3
- package/package.json +9 -9
- package/src/generators/__snapshots__/clientPostImportPath.ts +74 -0
- package/src/generators/__snapshots__/updatePetById.ts +74 -0
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +74 -0
package/dist/components.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OperationSchemas, n as PluginSolidQuery, r as Transformer, s as Operation } from "./types-
|
|
1
|
+
import { a as OperationSchemas, n as PluginSolidQuery, r as Transformer, s as Operation } from "./types-B_ZUXCJi.cjs";
|
|
2
2
|
import { FunctionParams } from "@kubb/react-fabric";
|
|
3
3
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
4
4
|
|
package/dist/components.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as OperationSchemas, n as PluginSolidQuery, r as Transformer, s as Operation } from "./types-
|
|
1
|
+
import { a as OperationSchemas, n as PluginSolidQuery, r as Transformer, s as Operation } from "./types-COok_-3x.js";
|
|
2
2
|
import { FunctionParams } from "@kubb/react-fabric";
|
|
3
3
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
4
4
|
|
package/dist/generators.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ReactGenerator, n as PluginSolidQuery } from "./types-
|
|
1
|
+
import { i as ReactGenerator, n as PluginSolidQuery } from "./types-B_ZUXCJi.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/generators/mutationGenerator.d.ts
|
|
4
4
|
declare const mutationGenerator: ReactGenerator<PluginSolidQuery>;
|
package/dist/generators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ReactGenerator, n as PluginSolidQuery } from "./types-
|
|
1
|
+
import { i as ReactGenerator, n as PluginSolidQuery } from "./types-COok_-3x.js";
|
|
2
2
|
|
|
3
3
|
//#region src/generators/mutationGenerator.d.ts
|
|
4
4
|
declare const mutationGenerator: ReactGenerator<PluginSolidQuery>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PluginSolidQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-
|
|
1
|
+
import { n as PluginSolidQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-B_ZUXCJi.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
4
|
declare const pluginSolidQueryName = "plugin-solid-query";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PluginSolidQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-
|
|
1
|
+
import { n as PluginSolidQuery, o as UserPluginWithLifeCycle, t as Options } from "./types-COok_-3x.js";
|
|
2
2
|
|
|
3
3
|
//#region src/plugin.d.ts
|
|
4
4
|
declare const pluginSolidQueryName = "plugin-solid-query";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
2
1
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
3
2
|
import BaseOas from "oas";
|
|
4
3
|
import { Operation } from "oas/operation";
|
|
5
4
|
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
6
5
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
6
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
7
7
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
8
8
|
|
|
9
9
|
//#region ../oas/src/types.d.ts
|
|
@@ -181,6 +181,8 @@ interface KubbEvents {
|
|
|
181
181
|
id?: string;
|
|
182
182
|
command: string;
|
|
183
183
|
args?: readonly string[];
|
|
184
|
+
success: boolean;
|
|
185
|
+
error: Error | null;
|
|
184
186
|
}];
|
|
185
187
|
/**
|
|
186
188
|
* Emitted when a new version of Kubb is available.
|
|
@@ -1079,7 +1081,7 @@ type SchemaGeneratorOptions = {
|
|
|
1079
1081
|
dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
|
|
1080
1082
|
unknownType: 'any' | 'unknown' | 'void';
|
|
1081
1083
|
emptySchemaType: 'any' | 'unknown' | 'void';
|
|
1082
|
-
enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal';
|
|
1084
|
+
enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
|
|
1083
1085
|
enumSuffix?: string;
|
|
1084
1086
|
usedEnumNames?: Record<string, number>;
|
|
1085
1087
|
mapper?: Record<string, string>;
|
|
@@ -1425,4 +1427,4 @@ type ResolvedOptions = {
|
|
|
1425
1427
|
type PluginSolidQuery = PluginFactoryOptions<'plugin-solid-query', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
1426
1428
|
//#endregion
|
|
1427
1429
|
export { OperationSchemas as a, ReactGenerator as i, PluginSolidQuery as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options as t };
|
|
1428
|
-
//# sourceMappingURL=types-
|
|
1430
|
+
//# sourceMappingURL=types-B_ZUXCJi.d.cts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
1
2
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
2
3
|
import BaseOas from "oas";
|
|
3
4
|
import { Operation } from "oas/operation";
|
|
4
5
|
import { DiscriminatorObject, HttpMethods, OASDocument, SchemaObject } from "oas/types";
|
|
5
6
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
6
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
7
7
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
8
8
|
|
|
9
9
|
//#region ../oas/src/types.d.ts
|
|
@@ -181,6 +181,8 @@ interface KubbEvents {
|
|
|
181
181
|
id?: string;
|
|
182
182
|
command: string;
|
|
183
183
|
args?: readonly string[];
|
|
184
|
+
success: boolean;
|
|
185
|
+
error: Error | null;
|
|
184
186
|
}];
|
|
185
187
|
/**
|
|
186
188
|
* Emitted when a new version of Kubb is available.
|
|
@@ -1079,7 +1081,7 @@ type SchemaGeneratorOptions = {
|
|
|
1079
1081
|
dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
|
|
1080
1082
|
unknownType: 'any' | 'unknown' | 'void';
|
|
1081
1083
|
emptySchemaType: 'any' | 'unknown' | 'void';
|
|
1082
|
-
enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal';
|
|
1084
|
+
enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
|
|
1083
1085
|
enumSuffix?: string;
|
|
1084
1086
|
usedEnumNames?: Record<string, number>;
|
|
1085
1087
|
mapper?: Record<string, string>;
|
|
@@ -1425,4 +1427,4 @@ type ResolvedOptions = {
|
|
|
1425
1427
|
type PluginSolidQuery = PluginFactoryOptions<'plugin-solid-query', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
1426
1428
|
//#endregion
|
|
1427
1429
|
export { OperationSchemas as a, ReactGenerator as i, PluginSolidQuery as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options as t };
|
|
1428
|
-
//# sourceMappingURL=types-
|
|
1430
|
+
//# sourceMappingURL=types-COok_-3x.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-solid-query",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.14.0",
|
|
4
4
|
"description": "Solid Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Solid.js applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"solid-query",
|
|
@@ -68,17 +68,17 @@
|
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@kubb/react-fabric": "0.9.
|
|
71
|
+
"@kubb/react-fabric": "0.9.2",
|
|
72
72
|
"remeda": "^2.33.1",
|
|
73
|
-
"@kubb/core": "4.
|
|
74
|
-
"@kubb/
|
|
75
|
-
"@kubb/plugin-
|
|
76
|
-
"@kubb/
|
|
77
|
-
"@kubb/plugin-
|
|
78
|
-
"@kubb/plugin-
|
|
73
|
+
"@kubb/core": "4.14.0",
|
|
74
|
+
"@kubb/plugin-ts": "4.14.0",
|
|
75
|
+
"@kubb/plugin-zod": "4.14.0",
|
|
76
|
+
"@kubb/oas": "4.14.0",
|
|
77
|
+
"@kubb/plugin-client": "4.14.0",
|
|
78
|
+
"@kubb/plugin-oas": "4.14.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@kubb/react-fabric": "0.9.
|
|
81
|
+
"@kubb/react-fabric": "0.9.2"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=20"
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import fetch from 'axios'
|
|
6
|
+
import type { UseMutationOptions, QueryClient } from '@tanstack/solid-query'
|
|
7
|
+
import type { RequestConfig, ResponseErrorConfig } from 'axios'
|
|
8
|
+
import { useMutation } from '@tanstack/solid-query'
|
|
9
|
+
|
|
10
|
+
export const updatePetWithFormMutationKey = () => [{ url: '/pet/:petId' }] as const
|
|
11
|
+
|
|
12
|
+
export type UpdatePetWithFormMutationKey = ReturnType<typeof updatePetWithFormMutationKey>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @summary Updates a pet in the store with form data
|
|
16
|
+
* {@link /pet/:petId}
|
|
17
|
+
*/
|
|
18
|
+
export async function updatePetWithForm(
|
|
19
|
+
petId: UpdatePetWithFormPathParams['petId'],
|
|
20
|
+
data?: UpdatePetWithFormMutationRequest,
|
|
21
|
+
params?: UpdatePetWithFormQueryParams,
|
|
22
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
23
|
+
) {
|
|
24
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
25
|
+
|
|
26
|
+
const requestData = updatePetWithFormMutationRequest.parse(data)
|
|
27
|
+
|
|
28
|
+
const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationRequest>({
|
|
29
|
+
method: 'POST',
|
|
30
|
+
url: `/pet/${petId}`,
|
|
31
|
+
params,
|
|
32
|
+
data: requestData,
|
|
33
|
+
...requestConfig,
|
|
34
|
+
})
|
|
35
|
+
return updatePetWithFormMutationResponse.parse(res.data)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @summary Updates a pet in the store with form data
|
|
40
|
+
* {@link /pet/:petId}
|
|
41
|
+
*/
|
|
42
|
+
export function useUpdatePetWithForm<TContext>(
|
|
43
|
+
options: {
|
|
44
|
+
mutation?: ReturnType<
|
|
45
|
+
UseMutationOptions<
|
|
46
|
+
UpdatePetWithFormMutationResponse,
|
|
47
|
+
ResponseErrorConfig<UpdatePetWithForm405>,
|
|
48
|
+
{ petId: UpdatePetWithFormPathParams['petId']; data?: UpdatePetWithFormMutationRequest; params?: UpdatePetWithFormQueryParams },
|
|
49
|
+
TContext
|
|
50
|
+
>
|
|
51
|
+
> & { client?: QueryClient }
|
|
52
|
+
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch }
|
|
53
|
+
} = {},
|
|
54
|
+
) {
|
|
55
|
+
const { mutation = {}, client: config = {} } = options ?? {}
|
|
56
|
+
const { client: queryClient, ...mutationOptions } = mutation
|
|
57
|
+
const mutationKey = mutationOptions.mutationKey ?? updatePetWithFormMutationKey()
|
|
58
|
+
|
|
59
|
+
return useMutation<
|
|
60
|
+
UpdatePetWithFormMutationResponse,
|
|
61
|
+
ResponseErrorConfig<UpdatePetWithForm405>,
|
|
62
|
+
{ petId: UpdatePetWithFormPathParams['petId']; data?: UpdatePetWithFormMutationRequest; params?: UpdatePetWithFormQueryParams },
|
|
63
|
+
TContext
|
|
64
|
+
>(
|
|
65
|
+
() => ({
|
|
66
|
+
mutationFn: async ({ petId, data, params }) => {
|
|
67
|
+
return updatePetWithForm(petId, data, params, config)
|
|
68
|
+
},
|
|
69
|
+
mutationKey,
|
|
70
|
+
...mutationOptions,
|
|
71
|
+
}),
|
|
72
|
+
queryClient ? () => queryClient : undefined,
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
|
+
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
|
+
import type { UseMutationOptions, QueryClient } from '@tanstack/solid-query'
|
|
8
|
+
import { useMutation } from '@tanstack/solid-query'
|
|
9
|
+
|
|
10
|
+
export const updatePetWithFormMutationKey = () => [{ url: '/pet/:petId' }] as const
|
|
11
|
+
|
|
12
|
+
export type UpdatePetWithFormMutationKey = ReturnType<typeof updatePetWithFormMutationKey>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @summary Updates a pet in the store with form data
|
|
16
|
+
* {@link /pet/:petId}
|
|
17
|
+
*/
|
|
18
|
+
export async function updatePetWithForm(
|
|
19
|
+
petId: UpdatePetWithFormPathParams['petId'],
|
|
20
|
+
data?: UpdatePetWithFormMutationRequest,
|
|
21
|
+
params?: UpdatePetWithFormQueryParams,
|
|
22
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
23
|
+
) {
|
|
24
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
25
|
+
|
|
26
|
+
const requestData = updatePetWithFormMutationRequest.parse(data)
|
|
27
|
+
|
|
28
|
+
const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationRequest>({
|
|
29
|
+
method: 'POST',
|
|
30
|
+
url: `/pet/${petId}`,
|
|
31
|
+
params,
|
|
32
|
+
data: requestData,
|
|
33
|
+
...requestConfig,
|
|
34
|
+
})
|
|
35
|
+
return updatePetWithFormMutationResponse.parse(res.data)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @summary Updates a pet in the store with form data
|
|
40
|
+
* {@link /pet/:petId}
|
|
41
|
+
*/
|
|
42
|
+
export function useUpdatePetWithForm<TContext>(
|
|
43
|
+
options: {
|
|
44
|
+
mutation?: ReturnType<
|
|
45
|
+
UseMutationOptions<
|
|
46
|
+
UpdatePetWithFormMutationResponse,
|
|
47
|
+
ResponseErrorConfig<UpdatePetWithForm405>,
|
|
48
|
+
{ petId: UpdatePetWithFormPathParams['petId']; data?: UpdatePetWithFormMutationRequest; params?: UpdatePetWithFormQueryParams },
|
|
49
|
+
TContext
|
|
50
|
+
>
|
|
51
|
+
> & { client?: QueryClient }
|
|
52
|
+
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch }
|
|
53
|
+
} = {},
|
|
54
|
+
) {
|
|
55
|
+
const { mutation = {}, client: config = {} } = options ?? {}
|
|
56
|
+
const { client: queryClient, ...mutationOptions } = mutation
|
|
57
|
+
const mutationKey = mutationOptions.mutationKey ?? updatePetWithFormMutationKey()
|
|
58
|
+
|
|
59
|
+
return useMutation<
|
|
60
|
+
UpdatePetWithFormMutationResponse,
|
|
61
|
+
ResponseErrorConfig<UpdatePetWithForm405>,
|
|
62
|
+
{ petId: UpdatePetWithFormPathParams['petId']; data?: UpdatePetWithFormMutationRequest; params?: UpdatePetWithFormQueryParams },
|
|
63
|
+
TContext
|
|
64
|
+
>(
|
|
65
|
+
() => ({
|
|
66
|
+
mutationFn: async ({ petId, data, params }) => {
|
|
67
|
+
return updatePetWithForm(petId, data, params, config)
|
|
68
|
+
},
|
|
69
|
+
mutationKey,
|
|
70
|
+
...mutationOptions,
|
|
71
|
+
}),
|
|
72
|
+
queryClient ? () => queryClient : undefined,
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
|
+
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
|
+
import type { UseMutationOptions, QueryClient } from '@tanstack/solid-query'
|
|
8
|
+
import { useMutation } from '@tanstack/solid-query'
|
|
9
|
+
|
|
10
|
+
export const updatePetWithFormMutationKey = () => [{ url: '/pet/:petId' }] as const
|
|
11
|
+
|
|
12
|
+
export type UpdatePetWithFormMutationKey = ReturnType<typeof updatePetWithFormMutationKey>
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @summary Updates a pet in the store with form data
|
|
16
|
+
* {@link /pet/:petId}
|
|
17
|
+
*/
|
|
18
|
+
export async function updatePetWithForm(
|
|
19
|
+
{ petId }: { petId: UpdatePetWithFormPathParams['petId'] },
|
|
20
|
+
data?: UpdatePetWithFormMutationRequest,
|
|
21
|
+
params?: UpdatePetWithFormQueryParams,
|
|
22
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
23
|
+
) {
|
|
24
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
25
|
+
|
|
26
|
+
const requestData = updatePetWithFormMutationRequest.parse(data)
|
|
27
|
+
|
|
28
|
+
const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationRequest>({
|
|
29
|
+
method: 'POST',
|
|
30
|
+
url: `/pet/${petId}`,
|
|
31
|
+
params,
|
|
32
|
+
data: requestData,
|
|
33
|
+
...requestConfig,
|
|
34
|
+
})
|
|
35
|
+
return updatePetWithFormMutationResponse.parse(res.data)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @summary Updates a pet in the store with form data
|
|
40
|
+
* {@link /pet/:petId}
|
|
41
|
+
*/
|
|
42
|
+
export function useUpdatePetWithForm<TContext>(
|
|
43
|
+
options: {
|
|
44
|
+
mutation?: ReturnType<
|
|
45
|
+
UseMutationOptions<
|
|
46
|
+
UpdatePetWithFormMutationResponse,
|
|
47
|
+
ResponseErrorConfig<UpdatePetWithForm405>,
|
|
48
|
+
{ petId: UpdatePetWithFormPathParams['petId']; data?: UpdatePetWithFormMutationRequest; params?: UpdatePetWithFormQueryParams },
|
|
49
|
+
TContext
|
|
50
|
+
>
|
|
51
|
+
> & { client?: QueryClient }
|
|
52
|
+
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch }
|
|
53
|
+
} = {},
|
|
54
|
+
) {
|
|
55
|
+
const { mutation = {}, client: config = {} } = options ?? {}
|
|
56
|
+
const { client: queryClient, ...mutationOptions } = mutation
|
|
57
|
+
const mutationKey = mutationOptions.mutationKey ?? updatePetWithFormMutationKey()
|
|
58
|
+
|
|
59
|
+
return useMutation<
|
|
60
|
+
UpdatePetWithFormMutationResponse,
|
|
61
|
+
ResponseErrorConfig<UpdatePetWithForm405>,
|
|
62
|
+
{ petId: UpdatePetWithFormPathParams['petId']; data?: UpdatePetWithFormMutationRequest; params?: UpdatePetWithFormQueryParams },
|
|
63
|
+
TContext
|
|
64
|
+
>(
|
|
65
|
+
() => ({
|
|
66
|
+
mutationFn: async ({ petId, data, params }) => {
|
|
67
|
+
return updatePetWithForm({ petId }, data, params, config)
|
|
68
|
+
},
|
|
69
|
+
mutationKey,
|
|
70
|
+
...mutationOptions,
|
|
71
|
+
}),
|
|
72
|
+
queryClient ? () => queryClient : undefined,
|
|
73
|
+
)
|
|
74
|
+
}
|