@kubb/plugin-vue-query 3.13.1 → 3.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/LICENSE +1 -1
- package/dist/{chunk-4IIJ3DMO.cjs → chunk-JXGMEN72.cjs} +14 -14
- package/dist/{chunk-4IIJ3DMO.cjs.map → chunk-JXGMEN72.cjs.map} +1 -1
- package/dist/{chunk-DFGEGQZV.cjs → chunk-QW2D4COV.cjs} +11 -11
- package/dist/{chunk-DFGEGQZV.cjs.map → chunk-QW2D4COV.cjs.map} +1 -1
- package/dist/{chunk-HT7TA4KW.js → chunk-YIZAKIBL.js} +6 -6
- package/dist/{chunk-HT7TA4KW.js.map → chunk-YIZAKIBL.js.map} +1 -1
- package/dist/{chunk-PB4WHVSZ.js → chunk-Z7KZM4UR.js} +11 -11
- package/dist/{chunk-PB4WHVSZ.js.map → chunk-Z7KZM4UR.js.map} +1 -1
- package/dist/components.cjs +8 -8
- package/dist/components.js +1 -1
- package/dist/generators.cjs +5 -5
- package/dist/generators.js +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.js +2 -2
- package/package.json +24 -21
- package/src/components/InfiniteQuery.tsx +2 -2
- package/src/components/InfiniteQueryOptions.tsx +4 -4
- package/src/components/Mutation.tsx +1 -1
- package/src/components/Query.tsx +2 -2
- package/src/components/QueryOptions.tsx +4 -4
- package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +5 -5
- package/src/generators/__snapshots__/clientGetImportPath.ts +5 -5
- package/src/generators/__snapshots__/clientPostImportPath.ts +4 -4
- package/src/generators/__snapshots__/findByTags.ts +5 -5
- package/src/generators/__snapshots__/findByTagsObject.ts +5 -5
- package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +5 -5
- package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +5 -5
- package/src/generators/__snapshots__/findByTagsWithZod.ts +5 -5
- package/src/generators/__snapshots__/findInfiniteByTags.ts +5 -5
- package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +5 -5
- package/src/generators/__snapshots__/postAsQuery.ts +5 -5
- package/src/generators/__snapshots__/updatePetById.ts +4 -4
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +4 -4
- package/src/generators/infiniteQueryGenerator.tsx +1 -1
- package/src/generators/mutationGenerator.tsx +1 -1
- package/src/generators/queryGenerator.tsx +1 -1
|
@@ -68,8 +68,8 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
68
68
|
},
|
|
69
69
|
config: {
|
|
70
70
|
type: typeSchemas.request?.name
|
|
71
|
-
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof
|
|
72
|
-
: 'Partial<RequestConfig> & { client?: typeof
|
|
71
|
+
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`
|
|
72
|
+
: 'Partial<RequestConfig> & { client?: typeof fetch }',
|
|
73
73
|
default: '{}',
|
|
74
74
|
},
|
|
75
75
|
})
|
|
@@ -110,8 +110,8 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
110
110
|
: undefined,
|
|
111
111
|
config: {
|
|
112
112
|
type: typeSchemas.request?.name
|
|
113
|
-
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof
|
|
114
|
-
: 'Partial<RequestConfig> & { client?: typeof
|
|
113
|
+
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`
|
|
114
|
+
: 'Partial<RequestConfig> & { client?: typeof fetch }',
|
|
115
115
|
default: '{}',
|
|
116
116
|
},
|
|
117
117
|
})
|
|
@@ -73,7 +73,7 @@ function getParams({ paramsCasing, dataReturnType, typeSchemas }: GetParamsProps
|
|
|
73
73
|
type: `
|
|
74
74
|
{
|
|
75
75
|
mutation?: MutationObserverOptions<${[TData, TError, TRequest ? `{${TRequest}}` : 'void', 'TContext'].join(', ')}> & { client?: QueryClient },
|
|
76
|
-
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof
|
|
76
|
+
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'},
|
|
77
77
|
}
|
|
78
78
|
`,
|
|
79
79
|
default: '{}',
|
package/src/components/Query.tsx
CHANGED
|
@@ -74,7 +74,7 @@ function getParams({ paramsCasing, paramsType, pathParamsType, dataReturnType, t
|
|
|
74
74
|
type: `
|
|
75
75
|
{
|
|
76
76
|
query?: Partial<QueryObserverOptions<${[TData, TError, 'TData', 'TQueryData', 'TQueryKey'].join(', ')}>> & { client?: QueryClient },
|
|
77
|
-
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof
|
|
77
|
+
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}
|
|
78
78
|
}
|
|
79
79
|
`,
|
|
80
80
|
default: '{}',
|
|
@@ -119,7 +119,7 @@ function getParams({ paramsCasing, paramsType, pathParamsType, dataReturnType, t
|
|
|
119
119
|
type: `
|
|
120
120
|
{
|
|
121
121
|
query?: Partial<QueryObserverOptions<${[TData, TError, 'TData', 'TQueryData', 'TQueryKey'].join(', ')}>> & { client?: QueryClient },
|
|
122
|
-
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof
|
|
122
|
+
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}
|
|
123
123
|
}
|
|
124
124
|
`,
|
|
125
125
|
default: '{}',
|
|
@@ -65,8 +65,8 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
65
65
|
},
|
|
66
66
|
config: {
|
|
67
67
|
type: typeSchemas.request?.name
|
|
68
|
-
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof
|
|
69
|
-
: 'Partial<RequestConfig> & { client?: typeof
|
|
68
|
+
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`
|
|
69
|
+
: 'Partial<RequestConfig> & { client?: typeof fetch }',
|
|
70
70
|
default: '{}',
|
|
71
71
|
},
|
|
72
72
|
})
|
|
@@ -107,8 +107,8 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
107
107
|
: undefined,
|
|
108
108
|
config: {
|
|
109
109
|
type: typeSchemas.request?.name
|
|
110
|
-
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof
|
|
111
|
-
: 'Partial<RequestConfig> & { client?: typeof
|
|
110
|
+
? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`
|
|
111
|
+
: 'Partial<RequestConfig> & { client?: typeof fetch }',
|
|
112
112
|
default: '{}',
|
|
113
113
|
},
|
|
114
114
|
})
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -21,9 +21,9 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
21
21
|
export async function findPetsByTags(
|
|
22
22
|
headers: FindPetsByTagsHeaderParams,
|
|
23
23
|
params?: FindPetsByTagsQueryParams,
|
|
24
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
24
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
25
25
|
) {
|
|
26
|
-
const { client: request =
|
|
26
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
28
28
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
29
29
|
method: 'GET',
|
|
@@ -38,7 +38,7 @@ export async function findPetsByTags(
|
|
|
38
38
|
export function findPetsByTagsQueryOptions(
|
|
39
39
|
headers: MaybeRef<FindPetsByTagsQueryParams>,
|
|
40
40
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
41
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
42
|
) {
|
|
43
43
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
44
44
|
return queryOptions<
|
|
@@ -71,7 +71,7 @@ export function useFindPetsByTags<
|
|
|
71
71
|
query?: Partial<QueryObserverOptions<ResponseConfig<FindPetsByTagsQueryResponse>, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
72
72
|
client?: QueryClient
|
|
73
73
|
}
|
|
74
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
74
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
75
75
|
} = {},
|
|
76
76
|
) {
|
|
77
77
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from 'axios'
|
|
6
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { RequestConfig, ResponseErrorConfig } from 'axios'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -21,9 +21,9 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
21
21
|
export async function findPetsByTags(
|
|
22
22
|
headers: FindPetsByTagsHeaderParams,
|
|
23
23
|
params?: FindPetsByTagsQueryParams,
|
|
24
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
24
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
25
25
|
) {
|
|
26
|
-
const { client: request =
|
|
26
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
28
28
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
29
29
|
method: 'GET',
|
|
@@ -38,7 +38,7 @@ export async function findPetsByTags(
|
|
|
38
38
|
export function findPetsByTagsQueryOptions(
|
|
39
39
|
headers: MaybeRef<FindPetsByTagsQueryParams>,
|
|
40
40
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
41
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
42
|
) {
|
|
43
43
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
44
44
|
return queryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey>({
|
|
@@ -66,7 +66,7 @@ export function useFindPetsByTags<
|
|
|
66
66
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
67
67
|
client?: QueryClient
|
|
68
68
|
}
|
|
69
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
69
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
70
70
|
} = {},
|
|
71
71
|
) {
|
|
72
72
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from 'axios'
|
|
6
6
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
7
7
|
import type { RequestConfig, ResponseErrorConfig } from 'axios'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -20,9 +20,9 @@ export async function updatePetWithForm(
|
|
|
20
20
|
petId: UpdatePetWithFormPathParams['petId'],
|
|
21
21
|
data?: UpdatePetWithFormMutationRequest,
|
|
22
22
|
params?: UpdatePetWithFormQueryParams,
|
|
23
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
23
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
24
24
|
) {
|
|
25
|
-
const { client: request =
|
|
25
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
26
26
|
|
|
27
27
|
const requestData = updatePetWithFormMutationRequest.parse(data)
|
|
28
28
|
const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationRequest>({
|
|
@@ -51,7 +51,7 @@ export function useUpdatePetWithForm<TContext>(
|
|
|
51
51
|
},
|
|
52
52
|
TContext
|
|
53
53
|
> & { client?: QueryClient }
|
|
54
|
-
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
54
|
+
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch }
|
|
55
55
|
} = {},
|
|
56
56
|
) {
|
|
57
57
|
const { mutation = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -21,9 +21,9 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
21
21
|
export async function findPetsByTags(
|
|
22
22
|
headers: FindPetsByTagsHeaderParams,
|
|
23
23
|
params?: FindPetsByTagsQueryParams,
|
|
24
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
24
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
25
25
|
) {
|
|
26
|
-
const { client: request =
|
|
26
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
28
28
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
29
29
|
method: 'GET',
|
|
@@ -38,7 +38,7 @@ export async function findPetsByTags(
|
|
|
38
38
|
export function findPetsByTagsQueryOptions(
|
|
39
39
|
headers: MaybeRef<FindPetsByTagsQueryParams>,
|
|
40
40
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
41
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
42
|
) {
|
|
43
43
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
44
44
|
return queryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey>({
|
|
@@ -66,7 +66,7 @@ export function useFindPetsByTags<
|
|
|
66
66
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
67
67
|
client?: QueryClient
|
|
68
68
|
}
|
|
69
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
69
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
70
70
|
} = {},
|
|
71
71
|
) {
|
|
72
72
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -20,9 +20,9 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
20
20
|
*/
|
|
21
21
|
export async function findPetsByTags(
|
|
22
22
|
{ headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams },
|
|
23
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
23
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
24
24
|
) {
|
|
25
|
-
const { client: request =
|
|
25
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
26
26
|
|
|
27
27
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
28
28
|
method: 'GET',
|
|
@@ -36,7 +36,7 @@ export async function findPetsByTags(
|
|
|
36
36
|
|
|
37
37
|
export function findPetsByTagsQueryOptions(
|
|
38
38
|
{ headers, params }: { headers: MaybeRef<FindPetsByTagsQueryParams>; params?: MaybeRef<FindPetsByTagsQueryParams> },
|
|
39
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
39
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
40
40
|
) {
|
|
41
41
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
42
42
|
return queryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey>({
|
|
@@ -63,7 +63,7 @@ export function useFindPetsByTags<
|
|
|
63
63
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
64
64
|
client?: QueryClient
|
|
65
65
|
}
|
|
66
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
66
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
67
67
|
} = {},
|
|
68
68
|
) {
|
|
69
69
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -21,9 +21,9 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
21
21
|
export async function findPetsByTags(
|
|
22
22
|
headers: FindPetsByTagsHeaderParams,
|
|
23
23
|
params?: FindPetsByTagsQueryParams,
|
|
24
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
24
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
25
25
|
) {
|
|
26
|
-
const { client: request =
|
|
26
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
28
28
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
29
29
|
method: 'GET',
|
|
@@ -38,7 +38,7 @@ export async function findPetsByTags(
|
|
|
38
38
|
export function findPetsByTagsQueryOptions(
|
|
39
39
|
headers: MaybeRef<FindPetsByTagsQueryParams>,
|
|
40
40
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
41
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
42
|
) {
|
|
43
43
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
44
44
|
return queryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey>({
|
|
@@ -66,7 +66,7 @@ export function useFindPetsByTags<
|
|
|
66
66
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
67
67
|
client?: QueryClient
|
|
68
68
|
}
|
|
69
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
69
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
70
70
|
} = {},
|
|
71
71
|
) {
|
|
72
72
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -22,9 +22,9 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
25
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
26
26
|
) {
|
|
27
|
-
const { client: request =
|
|
27
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
29
29
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
30
30
|
method: 'GET',
|
|
@@ -39,7 +39,7 @@ export async function findPetsByTags(
|
|
|
39
39
|
export function findPetsByTagsQueryOptions(
|
|
40
40
|
headers: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
41
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
42
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
42
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
43
43
|
) {
|
|
44
44
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
45
45
|
return queryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey>({
|
|
@@ -67,7 +67,7 @@ export function useFindPetsByTags<
|
|
|
67
67
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
68
68
|
client?: QueryClient
|
|
69
69
|
}
|
|
70
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
70
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
71
71
|
} = {},
|
|
72
72
|
) {
|
|
73
73
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -21,9 +21,9 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
21
21
|
export async function findPetsByTags(
|
|
22
22
|
headers: FindPetsByTagsHeaderParams,
|
|
23
23
|
params?: FindPetsByTagsQueryParams,
|
|
24
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
24
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
25
25
|
) {
|
|
26
|
-
const { client: request =
|
|
26
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
28
28
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
29
29
|
method: 'GET',
|
|
@@ -38,7 +38,7 @@ export async function findPetsByTags(
|
|
|
38
38
|
export function findPetsByTagsQueryOptions(
|
|
39
39
|
headers: MaybeRef<FindPetsByTagsQueryParams>,
|
|
40
40
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
41
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
42
|
) {
|
|
43
43
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
44
44
|
return queryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey>({
|
|
@@ -66,7 +66,7 @@ export function useFindPetsByTags<
|
|
|
66
66
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
67
67
|
client?: QueryClient
|
|
68
68
|
}
|
|
69
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
69
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
70
70
|
} = {},
|
|
71
71
|
) {
|
|
72
72
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -21,9 +21,9 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
|
|
|
21
21
|
export async function findPetsByTagsInfinite(
|
|
22
22
|
headers: FindPetsByTagsHeaderParams,
|
|
23
23
|
params?: FindPetsByTagsQueryParams,
|
|
24
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
24
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
25
25
|
) {
|
|
26
|
-
const { client: request =
|
|
26
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
28
28
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
29
29
|
method: 'GET',
|
|
@@ -38,7 +38,7 @@ export async function findPetsByTagsInfinite(
|
|
|
38
38
|
export function findPetsByTagsInfiniteQueryOptions(
|
|
39
39
|
headers: MaybeRef<FindPetsByTagsHeaderParams>,
|
|
40
40
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
41
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
42
|
) {
|
|
43
43
|
const queryKey = findPetsByTagsInfiniteQueryKey(params)
|
|
44
44
|
return infiniteQueryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey, number>({
|
|
@@ -73,7 +73,7 @@ export function useFindPetsByTagsInfinite<
|
|
|
73
73
|
query?: Partial<InfiniteQueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryKey>> & {
|
|
74
74
|
client?: QueryClient
|
|
75
75
|
}
|
|
76
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
76
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
77
77
|
} = {},
|
|
78
78
|
) {
|
|
79
79
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryReturnType } from '@tanstack/react-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -21,9 +21,9 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
|
|
|
21
21
|
export async function findPetsByTagsInfinite(
|
|
22
22
|
headers: FindPetsByTagsHeaderParams,
|
|
23
23
|
params?: FindPetsByTagsQueryParams,
|
|
24
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
24
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
25
25
|
) {
|
|
26
|
-
const { client: request =
|
|
26
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
28
28
|
const res = await request<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, unknown>({
|
|
29
29
|
method: 'GET',
|
|
@@ -38,7 +38,7 @@ export async function findPetsByTagsInfinite(
|
|
|
38
38
|
export function findPetsByTagsInfiniteQueryOptions(
|
|
39
39
|
headers: MaybeRef<FindPetsByTagsHeaderParams>,
|
|
40
40
|
params?: MaybeRef<FindPetsByTagsQueryParams>,
|
|
41
|
-
config: Partial<RequestConfig> & { client?: typeof
|
|
41
|
+
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
42
|
) {
|
|
43
43
|
const queryKey = findPetsByTagsInfiniteQueryKey(params)
|
|
44
44
|
return infiniteQueryOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, FindPetsByTagsQueryResponse, typeof queryKey, number>({
|
|
@@ -73,7 +73,7 @@ export function useFindPetsByTagsInfinite<
|
|
|
73
73
|
query?: Partial<InfiniteQueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryKey>> & {
|
|
74
74
|
client?: QueryClient
|
|
75
75
|
}
|
|
76
|
-
client?: Partial<RequestConfig> & { client?: typeof
|
|
76
|
+
client?: Partial<RequestConfig> & { client?: typeof fetch }
|
|
77
77
|
} = {},
|
|
78
78
|
) {
|
|
79
79
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from 'custom-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -25,9 +25,9 @@ export async function updatePetWithForm(
|
|
|
25
25
|
petId: UpdatePetWithFormPathParams['petId'],
|
|
26
26
|
data?: UpdatePetWithFormMutationRequest,
|
|
27
27
|
params?: UpdatePetWithFormQueryParams,
|
|
28
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
28
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
29
29
|
) {
|
|
30
|
-
const { client: request =
|
|
30
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
31
31
|
|
|
32
32
|
const requestData = updatePetWithFormMutationRequest.parse(data)
|
|
33
33
|
const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationRequest>({
|
|
@@ -44,7 +44,7 @@ export function updatePetWithFormQueryOptions(
|
|
|
44
44
|
petId: MaybeRef<UpdatePetWithFormPathParams['petId']>,
|
|
45
45
|
data?: MaybeRef<UpdatePetWithFormMutationRequest>,
|
|
46
46
|
params?: MaybeRef<UpdatePetWithFormQueryParams>,
|
|
47
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
47
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
48
48
|
) {
|
|
49
49
|
const queryKey = updatePetWithFormQueryKey(petId, data, params)
|
|
50
50
|
return queryOptions<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationResponse, typeof queryKey>({
|
|
@@ -73,7 +73,7 @@ export function useUpdatePetWithForm<
|
|
|
73
73
|
query?: Partial<QueryObserverOptions<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, TData, TQueryData, TQueryKey>> & {
|
|
74
74
|
client?: QueryClient
|
|
75
75
|
}
|
|
76
|
-
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
76
|
+
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch }
|
|
77
77
|
} = {},
|
|
78
78
|
) {
|
|
79
79
|
const { query: { client: queryClient, ...queryOptions } = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -20,9 +20,9 @@ export async function updatePetWithForm(
|
|
|
20
20
|
petId: UpdatePetWithFormPathParams['petId'],
|
|
21
21
|
data?: UpdatePetWithFormMutationRequest,
|
|
22
22
|
params?: UpdatePetWithFormQueryParams,
|
|
23
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
23
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
24
24
|
) {
|
|
25
|
-
const { client: request =
|
|
25
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
26
26
|
|
|
27
27
|
const requestData = updatePetWithFormMutationRequest.parse(data)
|
|
28
28
|
const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationRequest>({
|
|
@@ -51,7 +51,7 @@ export function useUpdatePetWithForm<TContext>(
|
|
|
51
51
|
},
|
|
52
52
|
TContext
|
|
53
53
|
> & { client?: QueryClient }
|
|
54
|
-
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
54
|
+
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch }
|
|
55
55
|
} = {},
|
|
56
56
|
) {
|
|
57
57
|
const { mutation = {}, client: config = {} } = options ?? {}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
8
8
|
import type { MaybeRef } from 'vue'
|
|
@@ -20,9 +20,9 @@ export async function updatePetWithForm(
|
|
|
20
20
|
{ petId }: { petId: UpdatePetWithFormPathParams['petId'] },
|
|
21
21
|
data?: UpdatePetWithFormMutationRequest,
|
|
22
22
|
params?: UpdatePetWithFormQueryParams,
|
|
23
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
23
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
|
|
24
24
|
) {
|
|
25
|
-
const { client: request =
|
|
25
|
+
const { client: request = fetch, ...requestConfig } = config
|
|
26
26
|
|
|
27
27
|
const requestData = updatePetWithFormMutationRequest.parse(data)
|
|
28
28
|
const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, UpdatePetWithFormMutationRequest>({
|
|
@@ -51,7 +51,7 @@ export function useUpdatePetWithForm<TContext>(
|
|
|
51
51
|
},
|
|
52
52
|
TContext
|
|
53
53
|
> & { client?: QueryClient }
|
|
54
|
-
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof
|
|
54
|
+
client?: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch }
|
|
55
55
|
} = {},
|
|
56
56
|
) {
|
|
57
57
|
const { mutation = {}, client: config = {} } = options ?? {}
|
|
@@ -86,7 +86,7 @@ export const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
86
86
|
)}
|
|
87
87
|
<File.Import name={['unref']} path="vue" />
|
|
88
88
|
<File.Import name={['MaybeRef']} path="vue" isTypeOnly />
|
|
89
|
-
<File.Import name={'
|
|
89
|
+
<File.Import name={'fetch'} path={options.client.importPath} />
|
|
90
90
|
{hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}
|
|
91
91
|
<File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
92
92
|
{options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}
|
|
@@ -80,7 +80,7 @@ export const mutationGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
80
80
|
<File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={mutation.file.path} path={zod.file.path} />
|
|
81
81
|
)}
|
|
82
82
|
<File.Import name={['MaybeRef']} path="vue" isTypeOnly />
|
|
83
|
-
<File.Import name={'
|
|
83
|
+
<File.Import name={'fetch'} path={options.client.importPath} />
|
|
84
84
|
{!!hasClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}
|
|
85
85
|
<File.Import name={['RequestConfig', 'ResponseConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
86
86
|
<File.Import
|
|
@@ -84,7 +84,7 @@ export const queryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
84
84
|
)}
|
|
85
85
|
<File.Import name={['unref']} path="vue" />
|
|
86
86
|
<File.Import name={['MaybeRef']} path="vue" isTypeOnly />
|
|
87
|
-
<File.Import name={'
|
|
87
|
+
<File.Import name={'fetch'} path={options.client.importPath} />
|
|
88
88
|
{!!hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}
|
|
89
89
|
<File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
90
90
|
{options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}
|