@kubb/plugin-vue-query 5.9.0-canary.20261029T145027 → 5.9.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.
package/docs/options.md CHANGED
@@ -9,6 +9,7 @@ Pass these options to `pluginVueQuery()`. Shared options link to [Shared plugin
9
9
  | [`output`](https://kubb.dev/docs/5.x/reference/plugin-options#output) | Where files are written: `path`, `mode`, `barrel`, `banner`, `footer`. | `{ path: 'hooks', barrel: { type: 'named' } }` |
10
10
  | [`group`](https://kubb.dev/docs/5.x/reference/plugin-options#group) | Split output by tag or path: `type`, `name`. | None |
11
11
  | [`client`](#client) | Which registered client plugin the composables call. | Auto-detected |
12
+ | [`returnType`](#returntype) | Shape of the value the composables resolve to. | `'data'` |
12
13
  | [`infinite`](#infinite) | Add `useInfiniteQuery` composables for paginated reads. | `false` |
13
14
  | [`query`](#query) | Configure or disable query composables. | `{ methods: ['GET', 'QUERY'], importPath: '@tanstack/vue-query' }` |
14
15
  | [`queryKey`](#querykey) | Build the `queryKey` for each query composable. | Exported `queryKeyTransformer` |
@@ -48,6 +49,37 @@ Calls the operations generated by [`@kubb/plugin-client`](https://kubb.dev/exten
48
49
 
49
50
  ::
50
51
 
52
+ ### returnType
53
+
54
+ Shape of the value the generated composables resolve to.
55
+
56
+ | | |
57
+ | -------- | ------------------ |
58
+ | Type | `'full' \| 'data'` |
59
+ | Required | `false` |
60
+ | Default | `'data'` |
61
+
62
+ ::field-group
63
+
64
+ :::field{name="'full'"}
65
+ Returns the client's whole `RequestResult` (`{ status, data, error, contentType, request, response }`), so a composable can read the status and the response headers next to `data`. Infinite queries read the page cursor from `lastPage.data`. Needs a client plugin whose own `returnType` is `'full'` or `'plain'`; with a client `returnType: 'data'` generation stops with an error.
66
+ :::
67
+
68
+ :::field{name="'data'"}
69
+ Returns the success body.
70
+ :::
71
+
72
+ ::
73
+
74
+ ```ts
75
+ pluginVueQuery({ returnType: 'full' })
76
+
77
+ const { data: result } = useGetPetById({ path: { petId: 1 } })
78
+
79
+ const etag = result.value?.response.headers.get('ETag')
80
+ const pet = result.value?.data
81
+ ```
82
+
51
83
  ### infinite
52
84
 
53
85
  Adds `infiniteQueryOptions` and `useInfiniteQuery` for operations that declare the query parameter named in `infinite.queryParam`. Needs [`hooks: true`](#hooks).
@@ -20,7 +20,7 @@
20
20
  "dependencies": ["plugin-ts"],
21
21
  "optionalDependencies": ["plugin-zod"],
22
22
  "compatibility": {
23
- "kubb": ">=5.14.6",
23
+ "kubb": ">=5.16.0",
24
24
  "node": ">=22.22"
25
25
  },
26
26
  "role": "consumer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-vue-query",
3
- "version": "5.9.0-canary.20261029T145027",
3
+ "version": "5.9.1",
4
4
  "description": "Generate type-safe TanStack Query (Vue Query) composables with Kubb. Covers useQuery, useMutation, useInfiniteQuery, and queryOptions with Vue 3 Composition API support.",
5
5
  "keywords": [
6
6
  "code-generation",
@@ -83,16 +83,16 @@
83
83
  "registry": "https://registry.npmjs.org/"
84
84
  },
85
85
  "dependencies": {
86
- "@kubb/kit": "^5.15.2",
87
- "@kubb/plugin-ts": "^5.5.0-canary.20261029T145026",
88
- "@kubb/renderer-jsx": "^5.15.2"
86
+ "@kubb/kit": "^5.16.0",
87
+ "@kubb/plugin-ts": "^5.4.1",
88
+ "@kubb/renderer-jsx": "^5.16.0"
89
89
  },
90
90
  "devDependencies": {
91
- "@internals/client": "0.1.0-canary.20261029T145027",
92
- "@internals/shared": "0.1.0-canary.20261029T145026",
93
- "@internals/tanstack-query": "0.1.0-canary.20261029T145027",
94
- "@internals/utils": "0.1.0-canary.20261029T145026",
95
- "@tanstack/vue-query": "^5.104.5",
91
+ "@internals/client": "0.0.0",
92
+ "@internals/shared": "0.0.0",
93
+ "@internals/tanstack-query": "0.0.0",
94
+ "@internals/utils": "0.0.0",
95
+ "@tanstack/vue-query": "^5.105.3",
96
96
  "vue": "^3.5.44"
97
97
  },
98
98
  "peerDependencies": {