@kubb/plugin-vue-query 3.15.0 → 3.16.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 (44) hide show
  1. package/dist/{chunk-HMPC446F.js → chunk-5RO5VZAJ.js} +8 -8
  2. package/dist/chunk-5RO5VZAJ.js.map +1 -0
  3. package/dist/{chunk-QRXBIFH6.cjs → chunk-BBSHBY5N.cjs} +16 -16
  4. package/dist/chunk-BBSHBY5N.cjs.map +1 -0
  5. package/dist/{chunk-QKMSX5DE.js → chunk-KHEXOVSW.js} +42 -42
  6. package/dist/chunk-KHEXOVSW.js.map +1 -0
  7. package/dist/{chunk-GK7FG2U6.cjs → chunk-ZR7DRLPY.cjs} +42 -42
  8. package/dist/chunk-ZR7DRLPY.cjs.map +1 -0
  9. package/dist/components.cjs +8 -8
  10. package/dist/components.js +1 -1
  11. package/dist/generators.cjs +5 -5
  12. package/dist/generators.js +2 -2
  13. package/dist/index.cjs +5 -6
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +2 -3
  16. package/dist/index.js.map +1 -1
  17. package/package.json +11 -11
  18. package/src/components/InfiniteQuery.tsx +8 -8
  19. package/src/components/InfiniteQueryOptions.tsx +8 -8
  20. package/src/components/Mutation.tsx +4 -4
  21. package/src/components/Query.tsx +8 -8
  22. package/src/components/QueryKey.tsx +3 -3
  23. package/src/components/QueryOptions.tsx +9 -9
  24. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +9 -8
  25. package/src/generators/__snapshots__/clientGetImportPath.ts +9 -8
  26. package/src/generators/__snapshots__/clientPostImportPath.ts +4 -4
  27. package/src/generators/__snapshots__/findByTags.ts +9 -8
  28. package/src/generators/__snapshots__/findByTagsObject.ts +7 -6
  29. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +9 -8
  30. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +8 -8
  31. package/src/generators/__snapshots__/findByTagsWithZod.ts +9 -8
  32. package/src/generators/__snapshots__/findInfiniteByTags.ts +6 -6
  33. package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +6 -6
  34. package/src/generators/__snapshots__/postAsQuery.ts +12 -12
  35. package/src/generators/__snapshots__/updatePetById.ts +4 -4
  36. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +4 -4
  37. package/src/generators/infiniteQueryGenerator.tsx +2 -2
  38. package/src/generators/mutationGenerator.tsx +1 -1
  39. package/src/generators/queryGenerator.tsx +2 -2
  40. package/src/plugin.ts +0 -1
  41. package/dist/chunk-GK7FG2U6.cjs.map +0 -1
  42. package/dist/chunk-HMPC446F.js.map +0 -1
  43. package/dist/chunk-QKMSX5DE.js.map +0 -1
  44. package/dist/chunk-QRXBIFH6.cjs.map +0 -1
@@ -5,7 +5,7 @@
5
5
  import fetch from 'axios'
6
6
  import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
7
7
  import type { RequestConfig, ResponseErrorConfig } from 'axios'
8
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { useMutation } from '@tanstack/vue-query'
10
10
 
11
11
  export const updatePetWithFormMutationKey = () => [{ url: '/pet/{petId}' }] as const
@@ -45,9 +45,9 @@ export function useUpdatePetWithForm<TContext>(
45
45
  UpdatePetWithFormMutationResponse,
46
46
  ResponseErrorConfig<UpdatePetWithForm405>,
47
47
  {
48
- petId: MaybeRef<UpdatePetWithFormPathParams['petId']>
49
- data?: MaybeRef<UpdatePetWithFormMutationRequest>
50
- params?: MaybeRef<UpdatePetWithFormQueryParams>
48
+ petId: MaybeRefOrGetter<UpdatePetWithFormPathParams['petId']>
49
+ data?: MaybeRefOrGetter<UpdatePetWithFormMutationRequest>
50
+ params?: MaybeRefOrGetter<UpdatePetWithFormQueryParams>
51
51
  },
52
52
  TContext
53
53
  > & { client?: QueryClient }
@@ -5,11 +5,12 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { queryOptions, useQuery } from '@tanstack/react-query'
10
- import { unref } from 'vue'
10
+ import { toValue } from 'vue'
11
11
 
12
- export const findPetsByTagsQueryKey = (params?: MaybeRef<FindPetsByTagsQueryParams>) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
12
+ export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
13
+ [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
13
14
 
14
15
  export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
15
16
 
@@ -36,8 +37,8 @@ export async function findPetsByTags(
36
37
  }
37
38
 
38
39
  export function findPetsByTagsQueryOptions(
39
- headers: MaybeRef<FindPetsByTagsQueryParams>,
40
- params?: MaybeRef<FindPetsByTagsQueryParams>,
40
+ headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
42
  config: Partial<RequestConfig> & { client?: typeof fetch } = {},
42
43
  ) {
43
44
  const queryKey = findPetsByTagsQueryKey(params)
@@ -45,7 +46,7 @@ export function findPetsByTagsQueryOptions(
45
46
  queryKey,
46
47
  queryFn: async ({ signal }) => {
47
48
  config.signal = signal
48
- return findPetsByTags(unref(headers), unref(params), unref(config))
49
+ return findPetsByTags(toValue(headers), toValue(params), toValue(config))
49
50
  },
50
51
  })
51
52
  }
@@ -60,8 +61,8 @@ export function useFindPetsByTags<
60
61
  TQueryData = FindPetsByTagsQueryResponse,
61
62
  TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
62
63
  >(
63
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
64
- params?: MaybeRef<FindPetsByTagsQueryParams>,
64
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
65
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
65
66
  options: {
66
67
  query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
67
68
  client?: QueryClient
@@ -5,11 +5,12 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { queryOptions, useQuery } from '@tanstack/react-query'
10
- import { unref } from 'vue'
10
+ import { toValue } from 'vue'
11
11
 
12
- export const findPetsByTagsQueryKey = (params?: MaybeRef<FindPetsByTagsQueryParams>) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
12
+ export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
13
+ [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
13
14
 
14
15
  export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
15
16
 
@@ -35,7 +36,7 @@ export async function findPetsByTags(
35
36
  }
36
37
 
37
38
  export function findPetsByTagsQueryOptions(
38
- { headers, params }: { headers: MaybeRef<FindPetsByTagsQueryParams>; params?: MaybeRef<FindPetsByTagsQueryParams> },
39
+ { headers, params }: { headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>; params?: MaybeRefOrGetter<FindPetsByTagsQueryParams> },
39
40
  config: Partial<RequestConfig> & { client?: typeof fetch } = {},
40
41
  ) {
41
42
  const queryKey = findPetsByTagsQueryKey(params)
@@ -43,7 +44,7 @@ export function findPetsByTagsQueryOptions(
43
44
  queryKey,
44
45
  queryFn: async ({ signal }) => {
45
46
  config.signal = signal
46
- return findPetsByTags(unref({ headers: unref(headers), params: unref(params) }), unref(config))
47
+ return findPetsByTags(toValue({ headers: toValue(headers), params: toValue(params) }), toValue(config))
47
48
  },
48
49
  })
49
50
  }
@@ -58,7 +59,7 @@ export function useFindPetsByTags<
58
59
  TQueryData = FindPetsByTagsQueryResponse,
59
60
  TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
60
61
  >(
61
- { headers, params }: { headers: MaybeRef<FindPetsByTagsHeaderParams>; params?: MaybeRef<FindPetsByTagsQueryParams> },
62
+ { headers, params }: { headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>; params?: MaybeRefOrGetter<FindPetsByTagsQueryParams> },
62
63
  options: {
63
64
  query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
64
65
  client?: QueryClient
@@ -5,11 +5,12 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { queryOptions, useQuery } from '@tanstack/react-query'
10
- import { unref } from 'vue'
10
+ import { toValue } from 'vue'
11
11
 
12
- export const findPetsByTagsQueryKey = (params?: MaybeRef<FindPetsByTagsQueryParams>) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
12
+ export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
13
+ [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
13
14
 
14
15
  export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
15
16
 
@@ -36,8 +37,8 @@ export async function findPetsByTags(
36
37
  }
37
38
 
38
39
  export function findPetsByTagsQueryOptions(
39
- headers: MaybeRef<FindPetsByTagsQueryParams>,
40
- params?: MaybeRef<FindPetsByTagsQueryParams>,
40
+ headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
42
  config: Partial<RequestConfig> & { client?: typeof fetch } = {},
42
43
  ) {
43
44
  const queryKey = findPetsByTagsQueryKey(params)
@@ -45,7 +46,7 @@ export function findPetsByTagsQueryOptions(
45
46
  queryKey,
46
47
  queryFn: async ({ signal }) => {
47
48
  config.signal = signal
48
- return findPetsByTags(unref(headers), unref(params), unref(config))
49
+ return findPetsByTags(toValue(headers), toValue(params), toValue(config))
49
50
  },
50
51
  })
51
52
  }
@@ -60,8 +61,8 @@ export function useFindPetsByTags<
60
61
  TQueryData = FindPetsByTagsQueryResponse,
61
62
  TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
62
63
  >(
63
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
64
- params?: MaybeRef<FindPetsByTagsQueryParams>,
64
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
65
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
65
66
  options: {
66
67
  query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
67
68
  client?: QueryClient
@@ -5,11 +5,11 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { queryOptions, useQuery } from '@tanstack/react-query'
10
- import { unref } from 'vue'
10
+ import { toValue } from 'vue'
11
11
 
12
- export const findPetsByTagsQueryKey = (params?: MaybeRef<FindPetsByTagsQueryParams>) =>
12
+ export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
13
13
  ['test', { url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
14
14
 
15
15
  export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
@@ -37,8 +37,8 @@ export async function findPetsByTags(
37
37
  }
38
38
 
39
39
  export function findPetsByTagsQueryOptions(
40
- headers: MaybeRef<FindPetsByTagsQueryParams>,
41
- params?: MaybeRef<FindPetsByTagsQueryParams>,
40
+ headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
42
42
  config: Partial<RequestConfig> & { client?: typeof fetch } = {},
43
43
  ) {
44
44
  const queryKey = findPetsByTagsQueryKey(params)
@@ -46,7 +46,7 @@ export function findPetsByTagsQueryOptions(
46
46
  queryKey,
47
47
  queryFn: async ({ signal }) => {
48
48
  config.signal = signal
49
- return findPetsByTags(unref(headers), unref(params), unref(config))
49
+ return findPetsByTags(toValue(headers), toValue(params), toValue(config))
50
50
  },
51
51
  })
52
52
  }
@@ -61,8 +61,8 @@ export function useFindPetsByTags<
61
61
  TQueryData = FindPetsByTagsQueryResponse,
62
62
  TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
63
63
  >(
64
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
65
- params?: MaybeRef<FindPetsByTagsQueryParams>,
64
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
65
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
66
66
  options: {
67
67
  query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
68
68
  client?: QueryClient
@@ -5,11 +5,12 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { queryOptions, useQuery } from '@tanstack/react-query'
10
- import { unref } from 'vue'
10
+ import { toValue } from 'vue'
11
11
 
12
- export const findPetsByTagsQueryKey = (params?: MaybeRef<FindPetsByTagsQueryParams>) => [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
12
+ export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
13
+ [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
13
14
 
14
15
  export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
15
16
 
@@ -36,8 +37,8 @@ export async function findPetsByTags(
36
37
  }
37
38
 
38
39
  export function findPetsByTagsQueryOptions(
39
- headers: MaybeRef<FindPetsByTagsQueryParams>,
40
- params?: MaybeRef<FindPetsByTagsQueryParams>,
40
+ headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
42
  config: Partial<RequestConfig> & { client?: typeof fetch } = {},
42
43
  ) {
43
44
  const queryKey = findPetsByTagsQueryKey(params)
@@ -45,7 +46,7 @@ export function findPetsByTagsQueryOptions(
45
46
  queryKey,
46
47
  queryFn: async ({ signal }) => {
47
48
  config.signal = signal
48
- return findPetsByTags(unref(headers), unref(params), unref(config))
49
+ return findPetsByTags(toValue(headers), toValue(params), toValue(config))
49
50
  },
50
51
  })
51
52
  }
@@ -60,8 +61,8 @@ export function useFindPetsByTags<
60
61
  TQueryData = FindPetsByTagsQueryResponse,
61
62
  TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
62
63
  >(
63
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
64
- params?: MaybeRef<FindPetsByTagsQueryParams>,
64
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
65
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
65
66
  options: {
66
67
  query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
67
68
  client?: QueryClient
@@ -5,10 +5,10 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
10
10
 
11
- export const findPetsByTagsInfiniteQueryKey = (params?: MaybeRef<FindPetsByTagsQueryParams>) =>
11
+ export const findPetsByTagsInfiniteQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
12
12
  [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
13
13
 
14
14
  export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInfiniteQueryKey>
@@ -36,8 +36,8 @@ export async function findPetsByTagsInfinite(
36
36
  }
37
37
 
38
38
  export function findPetsByTagsInfiniteQueryOptions(
39
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
40
- params?: MaybeRef<FindPetsByTagsQueryParams>,
39
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
40
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
41
  config: Partial<RequestConfig> & { client?: typeof fetch } = {},
42
42
  ) {
43
43
  const queryKey = findPetsByTagsInfiniteQueryKey(params)
@@ -67,8 +67,8 @@ export function useFindPetsByTagsInfinite<
67
67
  TQueryData = FindPetsByTagsQueryResponse,
68
68
  TQueryKey extends QueryKey = FindPetsByTagsInfiniteQueryKey,
69
69
  >(
70
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
71
- params?: MaybeRef<FindPetsByTagsQueryParams>,
70
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
71
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
72
72
  options: {
73
73
  query?: Partial<InfiniteQueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryKey>> & {
74
74
  client?: QueryClient
@@ -5,10 +5,10 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
10
10
 
11
- export const findPetsByTagsInfiniteQueryKey = (params?: MaybeRef<FindPetsByTagsQueryParams>) =>
11
+ export const findPetsByTagsInfiniteQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
12
12
  [{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
13
13
 
14
14
  export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInfiniteQueryKey>
@@ -36,8 +36,8 @@ export async function findPetsByTagsInfinite(
36
36
  }
37
37
 
38
38
  export function findPetsByTagsInfiniteQueryOptions(
39
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
40
- params?: MaybeRef<FindPetsByTagsQueryParams>,
39
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
40
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
41
41
  config: Partial<RequestConfig> & { client?: typeof fetch } = {},
42
42
  ) {
43
43
  const queryKey = findPetsByTagsInfiniteQueryKey(params)
@@ -67,8 +67,8 @@ export function useFindPetsByTagsInfinite<
67
67
  TQueryData = FindPetsByTagsQueryResponse,
68
68
  TQueryKey extends QueryKey = FindPetsByTagsInfiniteQueryKey,
69
69
  >(
70
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
71
- params?: MaybeRef<FindPetsByTagsQueryParams>,
70
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
71
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
72
72
  options: {
73
73
  query?: Partial<InfiniteQueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryKey>> & {
74
74
  client?: QueryClient
@@ -5,14 +5,14 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { queryOptions, useQuery } from 'custom-query'
10
- import { unref } from 'vue'
10
+ import { toValue } from 'vue'
11
11
 
12
12
  export const updatePetWithFormQueryKey = (
13
- petId: MaybeRef<UpdatePetWithFormPathParams['petId']>,
14
- data?: MaybeRef<UpdatePetWithFormMutationRequest>,
15
- params?: MaybeRef<UpdatePetWithFormQueryParams>,
13
+ petId: MaybeRefOrGetter<UpdatePetWithFormPathParams['petId']>,
14
+ data?: MaybeRefOrGetter<UpdatePetWithFormMutationRequest>,
15
+ params?: MaybeRefOrGetter<UpdatePetWithFormQueryParams>,
16
16
  ) => [{ url: '/pet/:petId', params: { petId: petId } }, ...(params ? [params] : []), ...(data ? [data] : [])] as const
17
17
 
18
18
  export type UpdatePetWithFormQueryKey = ReturnType<typeof updatePetWithFormQueryKey>
@@ -41,9 +41,9 @@ export async function updatePetWithForm(
41
41
  }
42
42
 
43
43
  export function updatePetWithFormQueryOptions(
44
- petId: MaybeRef<UpdatePetWithFormPathParams['petId']>,
45
- data?: MaybeRef<UpdatePetWithFormMutationRequest>,
46
- params?: MaybeRef<UpdatePetWithFormQueryParams>,
44
+ petId: MaybeRefOrGetter<UpdatePetWithFormPathParams['petId']>,
45
+ data?: MaybeRefOrGetter<UpdatePetWithFormMutationRequest>,
46
+ params?: MaybeRefOrGetter<UpdatePetWithFormQueryParams>,
47
47
  config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: typeof fetch } = {},
48
48
  ) {
49
49
  const queryKey = updatePetWithFormQueryKey(petId, data, params)
@@ -52,7 +52,7 @@ export function updatePetWithFormQueryOptions(
52
52
  queryKey,
53
53
  queryFn: async ({ signal }) => {
54
54
  config.signal = signal
55
- return updatePetWithForm(unref(petId), unref(data), unref(params), unref(config))
55
+ return updatePetWithForm(toValue(petId), toValue(data), toValue(params), toValue(config))
56
56
  },
57
57
  })
58
58
  }
@@ -66,9 +66,9 @@ export function useUpdatePetWithForm<
66
66
  TQueryData = UpdatePetWithFormMutationResponse,
67
67
  TQueryKey extends QueryKey = UpdatePetWithFormQueryKey,
68
68
  >(
69
- petId: MaybeRef<UpdatePetWithFormPathParams['petId']>,
70
- data?: MaybeRef<UpdatePetWithFormMutationRequest>,
71
- params?: MaybeRef<UpdatePetWithFormQueryParams>,
69
+ petId: MaybeRefOrGetter<UpdatePetWithFormPathParams['petId']>,
70
+ data?: MaybeRefOrGetter<UpdatePetWithFormMutationRequest>,
71
+ params?: MaybeRefOrGetter<UpdatePetWithFormQueryParams>,
72
72
  options: {
73
73
  query?: Partial<QueryObserverOptions<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, TData, TQueryData, TQueryKey>> & {
74
74
  client?: QueryClient
@@ -5,7 +5,7 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { useMutation } from '@tanstack/vue-query'
10
10
 
11
11
  export const updatePetWithFormMutationKey = () => [{ url: '/pet/{petId}' }] as const
@@ -45,9 +45,9 @@ export function useUpdatePetWithForm<TContext>(
45
45
  UpdatePetWithFormMutationResponse,
46
46
  ResponseErrorConfig<UpdatePetWithForm405>,
47
47
  {
48
- petId: MaybeRef<UpdatePetWithFormPathParams['petId']>
49
- data?: MaybeRef<UpdatePetWithFormMutationRequest>
50
- params?: MaybeRef<UpdatePetWithFormQueryParams>
48
+ petId: MaybeRefOrGetter<UpdatePetWithFormPathParams['petId']>
49
+ data?: MaybeRefOrGetter<UpdatePetWithFormMutationRequest>
50
+ params?: MaybeRefOrGetter<UpdatePetWithFormQueryParams>
51
51
  },
52
52
  TContext
53
53
  > & { client?: QueryClient }
@@ -5,7 +5,7 @@
5
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
- import type { MaybeRef } from 'vue'
8
+ import type { MaybeRefOrGetter } from 'vue'
9
9
  import { useMutation } from '@tanstack/vue-query'
10
10
 
11
11
  export const updatePetWithFormMutationKey = () => [{ url: '/pet/{petId}' }] as const
@@ -45,9 +45,9 @@ export function useUpdatePetWithForm<TContext>(
45
45
  UpdatePetWithFormMutationResponse,
46
46
  ResponseErrorConfig<UpdatePetWithForm405>,
47
47
  {
48
- petId: MaybeRef<UpdatePetWithFormPathParams['petId']>
49
- data?: MaybeRef<UpdatePetWithFormMutationRequest>
50
- params?: MaybeRef<UpdatePetWithFormQueryParams>
48
+ petId: MaybeRefOrGetter<UpdatePetWithFormPathParams['petId']>
49
+ data?: MaybeRefOrGetter<UpdatePetWithFormMutationRequest>
50
+ params?: MaybeRefOrGetter<UpdatePetWithFormQueryParams>
51
51
  },
52
52
  TContext
53
53
  > & { client?: QueryClient }
@@ -84,8 +84,8 @@ export const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({
84
84
  {options.parser === 'zod' && (
85
85
  <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />
86
86
  )}
87
- <File.Import name={['unref']} path="vue" />
88
- <File.Import name={['MaybeRef']} path="vue" isTypeOnly />
87
+ <File.Import name={['toValue']} path="vue" />
88
+ <File.Import name={['MaybeRefOrGetter']} path="vue" isTypeOnly />
89
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 />
@@ -79,7 +79,7 @@ export const mutationGenerator = createReactGenerator<PluginVueQuery>({
79
79
  {options.parser === 'zod' && (
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
- <File.Import name={['MaybeRef']} path="vue" isTypeOnly />
82
+ <File.Import name={['MaybeRefOrGetter']} path="vue" isTypeOnly />
83
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 />
@@ -82,8 +82,8 @@ export const queryGenerator = createReactGenerator<PluginVueQuery>({
82
82
  {options.parser === 'zod' && (
83
83
  <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />
84
84
  )}
85
- <File.Import name={['unref']} path="vue" />
86
- <File.Import name={['MaybeRef']} path="vue" isTypeOnly />
85
+ <File.Import name={['toValue']} path="vue" />
86
+ <File.Import name={['MaybeRefOrGetter']} path="vue" isTypeOnly />
87
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 />
package/src/plugin.ts CHANGED
@@ -157,7 +157,6 @@ export const pluginVueQuery = createPlugin<PluginVueQuery>((options) => {
157
157
  type: output.barrelType ?? 'named',
158
158
  root,
159
159
  output,
160
- files: this.fileManager.files,
161
160
  meta: {
162
161
  pluginKey: this.plugin.key,
163
162
  },