@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.
Files changed (37) hide show
  1. package/LICENSE +1 -1
  2. package/dist/{chunk-4IIJ3DMO.cjs → chunk-JXGMEN72.cjs} +14 -14
  3. package/dist/{chunk-4IIJ3DMO.cjs.map → chunk-JXGMEN72.cjs.map} +1 -1
  4. package/dist/{chunk-DFGEGQZV.cjs → chunk-QW2D4COV.cjs} +11 -11
  5. package/dist/{chunk-DFGEGQZV.cjs.map → chunk-QW2D4COV.cjs.map} +1 -1
  6. package/dist/{chunk-HT7TA4KW.js → chunk-YIZAKIBL.js} +6 -6
  7. package/dist/{chunk-HT7TA4KW.js.map → chunk-YIZAKIBL.js.map} +1 -1
  8. package/dist/{chunk-PB4WHVSZ.js → chunk-Z7KZM4UR.js} +11 -11
  9. package/dist/{chunk-PB4WHVSZ.js.map → chunk-Z7KZM4UR.js.map} +1 -1
  10. package/dist/components.cjs +8 -8
  11. package/dist/components.js +1 -1
  12. package/dist/generators.cjs +5 -5
  13. package/dist/generators.js +2 -2
  14. package/dist/index.cjs +5 -5
  15. package/dist/index.js +2 -2
  16. package/package.json +24 -21
  17. package/src/components/InfiniteQuery.tsx +2 -2
  18. package/src/components/InfiniteQueryOptions.tsx +4 -4
  19. package/src/components/Mutation.tsx +1 -1
  20. package/src/components/Query.tsx +2 -2
  21. package/src/components/QueryOptions.tsx +4 -4
  22. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +5 -5
  23. package/src/generators/__snapshots__/clientGetImportPath.ts +5 -5
  24. package/src/generators/__snapshots__/clientPostImportPath.ts +4 -4
  25. package/src/generators/__snapshots__/findByTags.ts +5 -5
  26. package/src/generators/__snapshots__/findByTagsObject.ts +5 -5
  27. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +5 -5
  28. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +5 -5
  29. package/src/generators/__snapshots__/findByTagsWithZod.ts +5 -5
  30. package/src/generators/__snapshots__/findInfiniteByTags.ts +5 -5
  31. package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +5 -5
  32. package/src/generators/__snapshots__/postAsQuery.ts +5 -5
  33. package/src/generators/__snapshots__/updatePetById.ts +4 -4
  34. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +4 -4
  35. package/src/generators/infiniteQueryGenerator.tsx +1 -1
  36. package/src/generators/mutationGenerator.tsx +1 -1
  37. 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 client }`
72
- : 'Partial<RequestConfig> & { client?: typeof client }',
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 client }`
114
- : 'Partial<RequestConfig> & { client?: typeof client }',
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 client }` : 'Partial<RequestConfig> & { client?: typeof client }'},
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: '{}',
@@ -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 client }` : 'Partial<RequestConfig> & { client?: typeof client }'}
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 client }` : 'Partial<RequestConfig> & { client?: typeof client }'}
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 client }`
69
- : 'Partial<RequestConfig> & { client?: typeof client }',
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 client }`
111
- : 'Partial<RequestConfig> & { client?: typeof client }',
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
24
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
25
25
  ) {
26
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from 'axios'
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 client } = {},
24
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
25
25
  ) {
26
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from 'axios'
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 client } = {},
23
+ config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
24
24
  ) {
25
- const { client: request = client, ...requestConfig } = config
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
24
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
25
25
  ) {
26
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
23
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
24
24
  ) {
25
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
24
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
25
25
  ) {
26
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
25
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
26
26
  ) {
27
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
24
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
25
25
  ) {
26
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
24
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
25
25
  ) {
26
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
24
+ config: Partial<RequestConfig> & { client?: typeof fetch } = {},
25
25
  ) {
26
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
28
+ config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
29
29
  ) {
30
- const { client: request = client, ...requestConfig } = config
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 client } = {},
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
23
+ config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
24
24
  ) {
25
- const { client: request = client, ...requestConfig } = config
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 client }
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 client from '@kubb/plugin-client/clients/axios'
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 client } = {},
23
+ config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
24
24
  ) {
25
- const { client: request = client, ...requestConfig } = config
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 client }
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={'client'} path={options.client.importPath} />
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={'client'} path={options.client.importPath} />
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={'client'} path={options.client.importPath} />
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 />}