@kubb/plugin-react-query 5.0.0-beta.77 → 5.0.0-beta.80
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/dist/index.cjs +257 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +16 -5
- package/dist/index.js +257 -179
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Exclude, Group, Include, Output, OutputOptions, Override, PluginFactory
|
|
|
10
10
|
* body and query parameters before the call; `response` validates the success response body and,
|
|
11
11
|
* on the non-throw path, the error body.
|
|
12
12
|
*/
|
|
13
|
-
type
|
|
13
|
+
type ValidatorOptions = false | 'zod' | {
|
|
14
14
|
request?: 'zod';
|
|
15
15
|
response?: 'zod';
|
|
16
16
|
};
|
|
@@ -82,7 +82,7 @@ type Options$1 = OutputOptions & {
|
|
|
82
82
|
*
|
|
83
83
|
* @default false
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
validator?: ValidatorOptions;
|
|
86
86
|
/**
|
|
87
87
|
* Generates a class-based SDK instead of the standalone functions. Each tag client is an instance
|
|
88
88
|
* class whose constructor takes a client config and builds its own client, so every environment is
|
|
@@ -148,7 +148,7 @@ type ResolvedOptions$1 = {
|
|
|
148
148
|
override: Array<Override<ResolvedOptions$1>>;
|
|
149
149
|
group: Group | null;
|
|
150
150
|
baseURL: Options$1['baseURL'];
|
|
151
|
-
|
|
151
|
+
validator: NonNullable<Options$1['validator']>;
|
|
152
152
|
sdk: {
|
|
153
153
|
mode: Mode;
|
|
154
154
|
name: string | undefined;
|
|
@@ -470,12 +470,22 @@ type Options = OutputOptions & {
|
|
|
470
470
|
* - `'client'` — no validation. Trusts the API.
|
|
471
471
|
* - `'zod'` — pipes responses through schemas from `@kubb/plugin-zod`.
|
|
472
472
|
*/
|
|
473
|
-
|
|
473
|
+
validator?: Options$1['validator'];
|
|
474
474
|
/**
|
|
475
475
|
* Override how hook names and file paths are built. Methods you omit fall
|
|
476
476
|
* back to the default `resolverReactQuery`.
|
|
477
477
|
*/
|
|
478
478
|
resolver?: Partial<ResolverReactQuery> & ThisType<ResolverReactQuery>;
|
|
479
|
+
/**
|
|
480
|
+
* Set to `false` to skip generating `use*` hook functions. `queryOptions`,
|
|
481
|
+
* `mutationOptions`, `queryKey`, and `mutationKey` helpers are still emitted.
|
|
482
|
+
* The resulting output uses only `@tanstack/react-query` factory imports
|
|
483
|
+
* (`queryOptions`, `infiniteQueryOptions`, `mutationOptions`) that are
|
|
484
|
+
* adapter-portable across React, Vue, Solid, and Svelte.
|
|
485
|
+
*
|
|
486
|
+
* @default false
|
|
487
|
+
*/
|
|
488
|
+
hooks?: boolean;
|
|
479
489
|
/**
|
|
480
490
|
* Macros applied to each operation node before printing.
|
|
481
491
|
*/
|
|
@@ -499,7 +509,7 @@ type ResolvedOptions = {
|
|
|
499
509
|
* The resolved contract client the generators import and call.
|
|
500
510
|
*/
|
|
501
511
|
client: ResolvedClient;
|
|
502
|
-
|
|
512
|
+
validator: NonNullable<Options['validator']>;
|
|
503
513
|
/**
|
|
504
514
|
* Only used for infinite
|
|
505
515
|
*/
|
|
@@ -510,6 +520,7 @@ type ResolvedOptions = {
|
|
|
510
520
|
mutationKey: MutationKey | null;
|
|
511
521
|
mutation: NonNullable<Required<Mutation>> | false;
|
|
512
522
|
customOptions: NonNullable<Required<CustomOptions>> | null;
|
|
523
|
+
hooks: boolean;
|
|
513
524
|
resolver: ResolverReactQuery;
|
|
514
525
|
};
|
|
515
526
|
type PluginReactQuery = PluginFactoryOptions<'plugin-react-query', Options, ResolvedOptions, ResolverReactQuery>;
|