@kubb/plugin-vue-query 0.0.0-canary-20241104172400
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +123 -0
- package/dist/chunk-A7SD37VK.cjs +584 -0
- package/dist/chunk-A7SD37VK.cjs.map +1 -0
- package/dist/chunk-DHJLKFYS.js +827 -0
- package/dist/chunk-DHJLKFYS.js.map +1 -0
- package/dist/chunk-J4RZRRHQ.cjs +837 -0
- package/dist/chunk-J4RZRRHQ.cjs.map +1 -0
- package/dist/chunk-O4EGNKUX.js +576 -0
- package/dist/chunk-O4EGNKUX.js.map +1 -0
- package/dist/components.cjs +36 -0
- package/dist/components.cjs.map +1 -0
- package/dist/components.d.cts +150 -0
- package/dist/components.d.ts +150 -0
- package/dist/components.js +3 -0
- package/dist/components.js.map +1 -0
- package/dist/generators.cjs +21 -0
- package/dist/generators.cjs.map +1 -0
- package/dist/generators.d.cts +12 -0
- package/dist/generators.d.ts +12 -0
- package/dist/generators.js +4 -0
- package/dist/generators.js.map +1 -0
- package/dist/index.cjs +134 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +127 -0
- package/dist/index.js.map +1 -0
- package/dist/types-C8LfCZUP.d.cts +389 -0
- package/dist/types-C8LfCZUP.d.ts +389 -0
- package/package.json +102 -0
- package/src/components/InfiniteQuery.tsx +190 -0
- package/src/components/InfiniteQueryOptions.tsx +185 -0
- package/src/components/Mutation.tsx +167 -0
- package/src/components/MutationKey.tsx +54 -0
- package/src/components/Query.tsx +191 -0
- package/src/components/QueryKey.tsx +91 -0
- package/src/components/QueryOptions.tsx +152 -0
- package/src/components/index.ts +7 -0
- package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +53 -0
- package/src/generators/__snapshots__/clientGetImportPath.ts +53 -0
- package/src/generators/__snapshots__/clientPostImportPath.ts +45 -0
- package/src/generators/__snapshots__/findByTags.ts +53 -0
- package/src/generators/__snapshots__/findByTagsObject.ts +62 -0
- package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +53 -0
- package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +53 -0
- package/src/generators/__snapshots__/findByTagsWithZod.ts +53 -0
- package/src/generators/__snapshots__/findInfiniteByTags.ts +58 -0
- package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +58 -0
- package/src/generators/__snapshots__/postAsQuery.ts +52 -0
- package/src/generators/__snapshots__/updatePetById.ts +45 -0
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +45 -0
- package/src/generators/index.ts +3 -0
- package/src/generators/infiniteQueryGenerator.tsx +137 -0
- package/src/generators/mutationGenerator.tsx +116 -0
- package/src/generators/queryGenerator.tsx +129 -0
- package/src/index.ts +2 -0
- package/src/plugin.ts +149 -0
- package/src/types.ts +159 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Stijn Van Hulle
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<!-- <img src="assets/logo.png" alt="logo" width="200" height="auto" /> -->
|
|
4
|
+
<h1>@kubb/plugin-vue-query</h1>
|
|
5
|
+
|
|
6
|
+
<p>
|
|
7
|
+
Swagger integration for React-Query to generate all the different hooks based on an OpenAPI specification.
|
|
8
|
+
</p>
|
|
9
|
+
<img src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/banner.png" alt="logo" height="auto" />
|
|
10
|
+
|
|
11
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
12
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
13
|
+
[![Coverage][coverage-src]][coverage-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
15
|
+
|
|
16
|
+
<h4>
|
|
17
|
+
<a href="https://codesandbox.io/s/github/kubb-labs/kubb/tree/main//examples/typescript" target="_blank">View Demo</a>
|
|
18
|
+
<span> · </span>
|
|
19
|
+
<a href="https://kubb.dev/" target="_blank">Documentation</a>
|
|
20
|
+
<span> · </span>
|
|
21
|
+
<a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
|
|
22
|
+
<span> · </span>
|
|
23
|
+
<a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Request Feature</a>
|
|
24
|
+
</h4>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
## Supporting Kubb
|
|
28
|
+
|
|
29
|
+
Kubb uses an MIT-licensed open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider:
|
|
30
|
+
|
|
31
|
+
- [Become a Sponsor on GitHub](https://github.com/sponsors/stijnvanhulle)
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
<a href="https://github.com/sponsors/stijnvanhulle">
|
|
35
|
+
<img src="https://raw.githubusercontent.com/stijnvanhulle/sponsors/main/sponsors.svg" alt="My sponsors" />
|
|
36
|
+
</a>
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<!-- Badges -->
|
|
41
|
+
|
|
42
|
+
[npm-version-src]: https://img.shields.io/npm/v/@kubb/plugin-vue-query?flat&colorA=18181B&colorB=f58517
|
|
43
|
+
[npm-version-href]: https://npmjs.com/package/@kubb/plugin-vue-query
|
|
44
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/@kubb/plugin-vue-query?flat&colorA=18181B&colorB=f58517
|
|
45
|
+
[npm-downloads-href]: https://npmjs.com/package/@kubb/plugin-vue-query
|
|
46
|
+
[license-src]: https://img.shields.io/github/license/kubb-labs/kubb.svg?flat&colorA=18181B&colorB=f58517
|
|
47
|
+
[license-href]: https://github.com/kubb-labs/kubb/blob/main/LICENSE
|
|
48
|
+
[build-src]: https://img.shields.io/github/actions/workflow/status/kubb-labs/kubb/ci.yaml?style=flat&colorA=18181B&colorB=f58517
|
|
49
|
+
[build-href]: https://www.npmjs.com/package/@kubb/plugin-vue-query
|
|
50
|
+
[minified-src]: https://img.shields.io/bundlephobia/min/@kubb/plugin-vue-query?style=flat&colorA=18181B&colorB=f58517
|
|
51
|
+
[minified-href]: https://www.npmjs.com/package/@kubb/plugin-vue-query
|
|
52
|
+
[coverage-src]: https://img.shields.io/codecov/c/github/kubb-labs/kubb?style=flat&colorA=18181B&colorB=f58517
|
|
53
|
+
[coverage-href]: https://www.npmjs.com/package/@kubb/plugin-vue-query
|
|
54
|
+
|
|
55
|
+
## options query
|
|
56
|
+
|
|
57
|
+
### v4
|
|
58
|
+
|
|
59
|
+
UseBaseQueryOptions => react-query only
|
|
60
|
+
UseQueryOptions => vue-query only
|
|
61
|
+
CreateQueryOptions => solid-query only
|
|
62
|
+
CreateQueryOptions => svelte-query only
|
|
63
|
+
|
|
64
|
+
### v5
|
|
65
|
+
|
|
66
|
+
UseBaseQueryOptions => react-query only https://github.com/TanStack/query/blob/ce1305c27e7ac7988656d171d882a665a286cc6a/packages/react-query/src/types.ts#L18
|
|
67
|
+
QueryObserverOptions => vue-query only https://github.com/TanStack/query/blob/main/packages/vue-query/src/useQuery.ts#L24
|
|
68
|
+
UseQueryOptions => solid-query only
|
|
69
|
+
|
|
70
|
+
## result query
|
|
71
|
+
|
|
72
|
+
### v4
|
|
73
|
+
|
|
74
|
+
UseQueryResult => react-query only
|
|
75
|
+
UseQueryReturnType => vue-query only
|
|
76
|
+
CreateQueryResult => solid-query only
|
|
77
|
+
CreateQueryResult => svelte-query only
|
|
78
|
+
|
|
79
|
+
### v5
|
|
80
|
+
|
|
81
|
+
UseQueryResult => react-query only
|
|
82
|
+
UseQueryReturnType => vue-query only
|
|
83
|
+
|
|
84
|
+
## queryOptions() query
|
|
85
|
+
|
|
86
|
+
### v5
|
|
87
|
+
|
|
88
|
+
queryOptions => react-query only
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
{
|
|
92
|
+
query: {
|
|
93
|
+
types: {
|
|
94
|
+
options: 'UseBaseQueryOptions'
|
|
95
|
+
result: 'UseQueryResult'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## options mutation
|
|
102
|
+
|
|
103
|
+
### v4
|
|
104
|
+
|
|
105
|
+
UseMutationOptions => react-query only
|
|
106
|
+
VueMutationObserverOptions => vue-query only
|
|
107
|
+
|
|
108
|
+
### v5
|
|
109
|
+
|
|
110
|
+
UseMutationOptions => react-query only
|
|
111
|
+
MutationObserverOptions => vue-query only
|
|
112
|
+
|
|
113
|
+
## result mutation
|
|
114
|
+
|
|
115
|
+
### v4
|
|
116
|
+
|
|
117
|
+
UseMutationResult => react-query only
|
|
118
|
+
UseMutationReturnType => vue-query only
|
|
119
|
+
|
|
120
|
+
### v5
|
|
121
|
+
|
|
122
|
+
UseMutationResult => react-query only
|
|
123
|
+
UseMutationReturnType => vue-query only
|