@kubb/plugin-vue-query 3.15.0 → 3.15.1

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 (41) 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 -5
  14. package/dist/index.js +2 -2
  15. package/package.json +10 -10
  16. package/src/components/InfiniteQuery.tsx +8 -8
  17. package/src/components/InfiniteQueryOptions.tsx +8 -8
  18. package/src/components/Mutation.tsx +4 -4
  19. package/src/components/Query.tsx +8 -8
  20. package/src/components/QueryKey.tsx +3 -3
  21. package/src/components/QueryOptions.tsx +9 -9
  22. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +9 -8
  23. package/src/generators/__snapshots__/clientGetImportPath.ts +9 -8
  24. package/src/generators/__snapshots__/clientPostImportPath.ts +4 -4
  25. package/src/generators/__snapshots__/findByTags.ts +9 -8
  26. package/src/generators/__snapshots__/findByTagsObject.ts +7 -6
  27. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +9 -8
  28. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +8 -8
  29. package/src/generators/__snapshots__/findByTagsWithZod.ts +9 -8
  30. package/src/generators/__snapshots__/findInfiniteByTags.ts +6 -6
  31. package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +6 -6
  32. package/src/generators/__snapshots__/postAsQuery.ts +12 -12
  33. package/src/generators/__snapshots__/updatePetById.ts +4 -4
  34. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +4 -4
  35. package/src/generators/infiniteQueryGenerator.tsx +2 -2
  36. package/src/generators/mutationGenerator.tsx +1 -1
  37. package/src/generators/queryGenerator.tsx +2 -2
  38. package/dist/chunk-GK7FG2U6.cjs.map +0 -1
  39. package/dist/chunk-HMPC446F.js.map +0 -1
  40. package/dist/chunk-QKMSX5DE.js.map +0 -1
  41. package/dist/chunk-QRXBIFH6.cjs.map +0 -1
@@ -1,3 +1,3 @@
1
- export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions } from './chunk-QKMSX5DE.js';
1
+ export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions } from './chunk-KHEXOVSW.js';
2
2
  //# sourceMappingURL=components.js.map
3
3
  //# sourceMappingURL=components.js.map
@@ -1,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var chunkQRXBIFH6_cjs = require('./chunk-QRXBIFH6.cjs');
4
- require('./chunk-GK7FG2U6.cjs');
3
+ var chunkBBSHBY5N_cjs = require('./chunk-BBSHBY5N.cjs');
4
+ require('./chunk-ZR7DRLPY.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "infiniteQueryGenerator", {
9
9
  enumerable: true,
10
- get: function () { return chunkQRXBIFH6_cjs.infiniteQueryGenerator; }
10
+ get: function () { return chunkBBSHBY5N_cjs.infiniteQueryGenerator; }
11
11
  });
12
12
  Object.defineProperty(exports, "mutationGenerator", {
13
13
  enumerable: true,
14
- get: function () { return chunkQRXBIFH6_cjs.mutationGenerator; }
14
+ get: function () { return chunkBBSHBY5N_cjs.mutationGenerator; }
15
15
  });
16
16
  Object.defineProperty(exports, "queryGenerator", {
17
17
  enumerable: true,
18
- get: function () { return chunkQRXBIFH6_cjs.queryGenerator; }
18
+ get: function () { return chunkBBSHBY5N_cjs.queryGenerator; }
19
19
  });
20
20
  //# sourceMappingURL=generators.cjs.map
21
21
  //# sourceMappingURL=generators.cjs.map
@@ -1,4 +1,4 @@
1
- export { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './chunk-HMPC446F.js';
2
- import './chunk-QKMSX5DE.js';
1
+ export { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './chunk-5RO5VZAJ.js';
2
+ import './chunk-KHEXOVSW.js';
3
3
  //# sourceMappingURL=generators.js.map
4
4
  //# sourceMappingURL=generators.js.map
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkQRXBIFH6_cjs = require('./chunk-QRXBIFH6.cjs');
4
- var chunkGK7FG2U6_cjs = require('./chunk-GK7FG2U6.cjs');
3
+ var chunkBBSHBY5N_cjs = require('./chunk-BBSHBY5N.cjs');
4
+ var chunkZR7DRLPY_cjs = require('./chunk-ZR7DRLPY.cjs');
5
5
  var path = require('path');
6
6
  var core = require('@kubb/core');
7
7
  var transformers = require('@kubb/core/transformers');
@@ -29,9 +29,9 @@ var pluginVueQuery = core.createPlugin((options) => {
29
29
  mutation = {},
30
30
  query = {},
31
31
  paramsCasing,
32
- mutationKey = chunkGK7FG2U6_cjs.MutationKey.getTransformer,
33
- queryKey = chunkGK7FG2U6_cjs.QueryKey.getTransformer,
34
- generators = [chunkQRXBIFH6_cjs.queryGenerator, chunkQRXBIFH6_cjs.infiniteQueryGenerator, chunkQRXBIFH6_cjs.mutationGenerator].filter(Boolean),
32
+ mutationKey = chunkZR7DRLPY_cjs.MutationKey.getTransformer,
33
+ queryKey = chunkZR7DRLPY_cjs.QueryKey.getTransformer,
34
+ generators = [chunkBBSHBY5N_cjs.queryGenerator, chunkBBSHBY5N_cjs.infiniteQueryGenerator, chunkBBSHBY5N_cjs.mutationGenerator].filter(Boolean),
35
35
  contentType
36
36
  } = options;
37
37
  return {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { queryGenerator, infiniteQueryGenerator, mutationGenerator } from './chunk-HMPC446F.js';
2
- import { MutationKey, QueryKey } from './chunk-QKMSX5DE.js';
1
+ import { queryGenerator, infiniteQueryGenerator, mutationGenerator } from './chunk-5RO5VZAJ.js';
2
+ import { MutationKey, QueryKey } from './chunk-KHEXOVSW.js';
3
3
  import path from 'path';
4
4
  import { createPlugin, PluginManager, FileManager } from '@kubb/core';
5
5
  import { camelCase, pascalCase } from '@kubb/core/transformers';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-vue-query",
3
- "version": "3.15.0",
3
+ "version": "3.15.1",
4
4
  "description": "Vue Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Vue.js applications.",
5
5
  "keywords": [
6
6
  "vue-query",
@@ -66,21 +66,21 @@
66
66
  ],
67
67
  "dependencies": {
68
68
  "remeda": "^2.25.0",
69
- "@kubb/core": "3.15.0",
70
- "@kubb/oas": "3.15.0",
71
- "@kubb/plugin-client": "3.15.0",
72
- "@kubb/plugin-oas": "3.15.0",
73
- "@kubb/plugin-ts": "3.15.0",
74
- "@kubb/plugin-zod": "3.15.0",
75
- "@kubb/react": "3.15.0"
69
+ "@kubb/oas": "3.15.1",
70
+ "@kubb/core": "3.15.1",
71
+ "@kubb/plugin-client": "3.15.1",
72
+ "@kubb/plugin-oas": "3.15.1",
73
+ "@kubb/plugin-ts": "3.15.1",
74
+ "@kubb/plugin-zod": "3.15.1",
75
+ "@kubb/react": "3.15.1"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@types/react": "^18.3.23",
79
79
  "react": "^18.3.1",
80
80
  "tsup": "^8.5.0",
81
81
  "typescript": "^5.8.3",
82
- "@kubb/config-ts": "3.15.0",
83
- "@kubb/config-tsup": "3.15.0"
82
+ "@kubb/config-ts": "3.15.1",
83
+ "@kubb/config-tsup": "3.15.1"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "@kubb/react": "^3.0.0"
@@ -46,25 +46,25 @@ function getParams({ paramsType, paramsCasing, pathParamsType, dataReturnType, t
46
46
  override(item) {
47
47
  return {
48
48
  ...item,
49
- type: `MaybeRef<${item.type}>`,
49
+ type: `MaybeRefOrGetter<${item.type}>`,
50
50
  }
51
51
  },
52
52
  }),
53
53
  data: typeSchemas.request?.name
54
54
  ? {
55
- type: `MaybeRef<${typeSchemas.request?.name}>`,
55
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
56
56
  optional: isOptional(typeSchemas.request?.schema),
57
57
  }
58
58
  : undefined,
59
59
  params: typeSchemas.queryParams?.name
60
60
  ? {
61
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
61
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
62
62
  optional: isOptional(typeSchemas.queryParams?.schema),
63
63
  }
64
64
  : undefined,
65
65
  headers: typeSchemas.headerParams?.name
66
66
  ? {
67
- type: `MaybeRef<${typeSchemas.headerParams?.name}>`,
67
+ type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
68
68
  optional: isOptional(typeSchemas.headerParams?.schema),
69
69
  }
70
70
  : undefined,
@@ -92,26 +92,26 @@ function getParams({ paramsType, paramsCasing, pathParamsType, dataReturnType, t
92
92
  override(item) {
93
93
  return {
94
94
  ...item,
95
- type: `MaybeRef<${item.type}>`,
95
+ type: `MaybeRefOrGetter<${item.type}>`,
96
96
  }
97
97
  },
98
98
  }),
99
99
  },
100
100
  data: typeSchemas.request?.name
101
101
  ? {
102
- type: `MaybeRef<${typeSchemas.request?.name}>`,
102
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
103
103
  optional: isOptional(typeSchemas.request?.schema),
104
104
  }
105
105
  : undefined,
106
106
  params: typeSchemas.queryParams?.name
107
107
  ? {
108
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
108
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
109
109
  optional: isOptional(typeSchemas.queryParams?.schema),
110
110
  }
111
111
  : undefined,
112
112
  headers: typeSchemas.headerParams?.name
113
113
  ? {
114
- type: `MaybeRef<${typeSchemas.headerParams?.name}>`,
114
+ type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
115
115
  optional: isOptional(typeSchemas.headerParams?.schema),
116
116
  }
117
117
  : undefined,
@@ -42,25 +42,25 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
42
42
  override(item) {
43
43
  return {
44
44
  ...item,
45
- type: `MaybeRef<${item.type}>`,
45
+ type: `MaybeRefOrGetter<${item.type}>`,
46
46
  }
47
47
  },
48
48
  }),
49
49
  data: typeSchemas.request?.name
50
50
  ? {
51
- type: `MaybeRef<${typeSchemas.request?.name}>`,
51
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
52
52
  optional: isOptional(typeSchemas.request?.schema),
53
53
  }
54
54
  : undefined,
55
55
  params: typeSchemas.queryParams?.name
56
56
  ? {
57
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
57
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
58
58
  optional: isOptional(typeSchemas.queryParams?.schema),
59
59
  }
60
60
  : undefined,
61
61
  headers: typeSchemas.headerParams?.name
62
62
  ? {
63
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
63
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
64
64
  optional: isOptional(typeSchemas.headerParams?.schema),
65
65
  }
66
66
  : undefined,
@@ -85,26 +85,26 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
85
85
  override(item) {
86
86
  return {
87
87
  ...item,
88
- type: `MaybeRef<${item.type}>`,
88
+ type: `MaybeRefOrGetter<${item.type}>`,
89
89
  }
90
90
  },
91
91
  }),
92
92
  },
93
93
  data: typeSchemas.request?.name
94
94
  ? {
95
- type: `MaybeRef<${typeSchemas.request?.name}>`,
95
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
96
96
  optional: isOptional(typeSchemas.request?.schema),
97
97
  }
98
98
  : undefined,
99
99
  params: typeSchemas.queryParams?.name
100
100
  ? {
101
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
101
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
102
102
  optional: isOptional(typeSchemas.queryParams?.schema),
103
103
  }
104
104
  : undefined,
105
105
  headers: typeSchemas.headerParams?.name
106
106
  ? {
107
- type: `MaybeRef<${typeSchemas.headerParams?.name}>`,
107
+ type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
108
108
  optional: isOptional(typeSchemas.headerParams?.schema),
109
109
  }
110
110
  : undefined,
@@ -43,25 +43,25 @@ function getParams({ paramsCasing, dataReturnType, typeSchemas }: GetParamsProps
43
43
  override(item) {
44
44
  return {
45
45
  ...item,
46
- type: `MaybeRef<${item.type}>`,
46
+ type: `MaybeRefOrGetter<${item.type}>`,
47
47
  }
48
48
  },
49
49
  }),
50
50
  data: typeSchemas.request?.name
51
51
  ? {
52
- type: `MaybeRef<${typeSchemas.request?.name}>`,
52
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
53
53
  optional: isOptional(typeSchemas.request?.schema),
54
54
  }
55
55
  : undefined,
56
56
  params: typeSchemas.queryParams?.name
57
57
  ? {
58
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
58
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
59
59
  optional: isOptional(typeSchemas.queryParams?.schema),
60
60
  }
61
61
  : undefined,
62
62
  headers: typeSchemas.headerParams?.name
63
63
  ? {
64
- type: `MaybeRef<${typeSchemas.headerParams?.name}>`,
64
+ type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
65
65
  optional: isOptional(typeSchemas.headerParams?.schema),
66
66
  }
67
67
  : undefined,
@@ -46,25 +46,25 @@ function getParams({ paramsCasing, paramsType, pathParamsType, dataReturnType, t
46
46
  override(item) {
47
47
  return {
48
48
  ...item,
49
- type: `MaybeRef<${item.type}>`,
49
+ type: `MaybeRefOrGetter<${item.type}>`,
50
50
  }
51
51
  },
52
52
  }),
53
53
  data: typeSchemas.request?.name
54
54
  ? {
55
- type: `MaybeRef<${typeSchemas.request?.name}>`,
55
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
56
56
  optional: isOptional(typeSchemas.request?.schema),
57
57
  }
58
58
  : undefined,
59
59
  params: typeSchemas.queryParams?.name
60
60
  ? {
61
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
61
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
62
62
  optional: isOptional(typeSchemas.queryParams?.schema),
63
63
  }
64
64
  : undefined,
65
65
  headers: typeSchemas.headerParams?.name
66
66
  ? {
67
- type: `MaybeRef<${typeSchemas.headerParams?.name}>`,
67
+ type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
68
68
  optional: isOptional(typeSchemas.headerParams?.schema),
69
69
  }
70
70
  : undefined,
@@ -92,26 +92,26 @@ function getParams({ paramsCasing, paramsType, pathParamsType, dataReturnType, t
92
92
  override(item) {
93
93
  return {
94
94
  ...item,
95
- type: `MaybeRef<${item.type}>`,
95
+ type: `MaybeRefOrGetter<${item.type}>`,
96
96
  }
97
97
  },
98
98
  }),
99
99
  },
100
100
  data: typeSchemas.request?.name
101
101
  ? {
102
- type: `MaybeRef<${typeSchemas.request?.name}>`,
102
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
103
103
  optional: isOptional(typeSchemas.request?.schema),
104
104
  }
105
105
  : undefined,
106
106
  params: typeSchemas.queryParams?.name
107
107
  ? {
108
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
108
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
109
109
  optional: isOptional(typeSchemas.queryParams?.schema),
110
110
  }
111
111
  : undefined,
112
112
  headers: typeSchemas.headerParams?.name
113
113
  ? {
114
- type: `MaybeRef<${typeSchemas.headerParams?.name}>`,
114
+ type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
115
115
  optional: isOptional(typeSchemas.headerParams?.schema),
116
116
  }
117
117
  : undefined,
@@ -33,20 +33,20 @@ function getParams({ pathParamsType, paramsCasing, typeSchemas }: GetParamsProps
33
33
  override(item) {
34
34
  return {
35
35
  ...item,
36
- type: `MaybeRef<${item.type}>`,
36
+ type: `MaybeRefOrGetter<${item.type}>`,
37
37
  }
38
38
  },
39
39
  }),
40
40
  },
41
41
  data: typeSchemas.request?.name
42
42
  ? {
43
- type: `MaybeRef<${typeSchemas.request?.name}>`,
43
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
44
44
  optional: isOptional(typeSchemas.request?.schema),
45
45
  }
46
46
  : undefined,
47
47
  params: typeSchemas.queryParams?.name
48
48
  ? {
49
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
49
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
50
50
  optional: isOptional(typeSchemas.queryParams?.schema),
51
51
  }
52
52
  : undefined,
@@ -39,25 +39,25 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
39
39
  override(item) {
40
40
  return {
41
41
  ...item,
42
- type: `MaybeRef<${item.type}>`,
42
+ type: `MaybeRefOrGetter<${item.type}>`,
43
43
  }
44
44
  },
45
45
  }),
46
46
  data: typeSchemas.request?.name
47
47
  ? {
48
- type: `MaybeRef<${typeSchemas.request?.name}>`,
48
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
49
49
  optional: isOptional(typeSchemas.request?.schema),
50
50
  }
51
51
  : undefined,
52
52
  params: typeSchemas.queryParams?.name
53
53
  ? {
54
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
54
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
55
55
  optional: isOptional(typeSchemas.queryParams?.schema),
56
56
  }
57
57
  : undefined,
58
58
  headers: typeSchemas.headerParams?.name
59
59
  ? {
60
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
60
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
61
61
  optional: isOptional(typeSchemas.headerParams?.schema),
62
62
  }
63
63
  : undefined,
@@ -82,26 +82,26 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
82
82
  override(item) {
83
83
  return {
84
84
  ...item,
85
- type: `MaybeRef<${item.type}>`,
85
+ type: `MaybeRefOrGetter<${item.type}>`,
86
86
  }
87
87
  },
88
88
  }),
89
89
  },
90
90
  data: typeSchemas.request?.name
91
91
  ? {
92
- type: `MaybeRef<${typeSchemas.request?.name}>`,
92
+ type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
93
93
  optional: isOptional(typeSchemas.request?.schema),
94
94
  }
95
95
  : undefined,
96
96
  params: typeSchemas.queryParams?.name
97
97
  ? {
98
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
98
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
99
99
  optional: isOptional(typeSchemas.queryParams?.schema),
100
100
  }
101
101
  : undefined,
102
102
  headers: typeSchemas.headerParams?.name
103
103
  ? {
104
- type: `MaybeRef<${typeSchemas.queryParams?.name}>`,
104
+ type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
105
105
  optional: isOptional(typeSchemas.headerParams?.schema),
106
106
  }
107
107
  : undefined,
@@ -151,7 +151,7 @@ export function QueryOptions({ name, clientName, dataReturnType, typeSchemas, pa
151
151
  config.signal = signal
152
152
  return ${clientName}(${clientParams.toCall({
153
153
  transformName(name) {
154
- return `unref(${name})`
154
+ return `toValue(${name})`
155
155
  },
156
156
  })})
157
157
  },
@@ -5,11 +5,12 @@
5
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
- 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)
@@ -50,7 +51,7 @@ export function findPetsByTagsQueryOptions(
50
51
  queryKey,
51
52
  queryFn: async ({ signal }) => {
52
53
  config.signal = signal
53
- return findPetsByTags(unref(headers), unref(params), unref(config))
54
+ return findPetsByTags(toValue(headers), toValue(params), toValue(config))
54
55
  },
55
56
  })
56
57
  }
@@ -65,8 +66,8 @@ export function useFindPetsByTags<
65
66
  TQueryData = ResponseConfig<FindPetsByTagsQueryResponse>,
66
67
  TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
67
68
  >(
68
- headers: MaybeRef<FindPetsByTagsHeaderParams>,
69
- params?: MaybeRef<FindPetsByTagsQueryParams>,
69
+ headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
70
+ params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
70
71
  options: {
71
72
  query?: Partial<QueryObserverOptions<ResponseConfig<FindPetsByTagsQueryResponse>, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
72
73
  client?: QueryClient
@@ -5,11 +5,12 @@
5
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
- 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,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