@kubb/plugin-react-query 5.0.0-alpha.2 → 5.0.0-alpha.4
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/components.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { a as MutationKey, i as QueryKey, r as PluginReactQuery, t as Infinite } from "./types
|
|
2
|
+
import { a as MutationKey, i as QueryKey, r as PluginReactQuery, t as Infinite } from "./types-D5S7Ny9r.js";
|
|
3
3
|
import { OperationSchemas } from "@kubb/plugin-oas";
|
|
4
4
|
import { Operation } from "@kubb/oas";
|
|
5
5
|
import { FunctionParams } from "@kubb/react-fabric";
|
package/dist/generators.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { r as PluginReactQuery } from "./types
|
|
3
|
-
import { AsyncEventEmitter, Config, FileMetaBase, Group, KubbEvents, Output, Plugin, PluginFactoryOptions, PluginManager, ResolveNameParams } from "@kubb/core";
|
|
2
|
+
import { r as PluginReactQuery } from "./types-D5S7Ny9r.js";
|
|
3
|
+
import { AsyncEventEmitter, Config, FileMetaBase, Generator, Group, KubbEvents, Output, Plugin, PluginFactoryOptions, PluginManager, ResolveNameParams } from "@kubb/core";
|
|
4
4
|
import { HttpMethod, Oas, Operation, SchemaObject, contentType } from "@kubb/oas";
|
|
5
5
|
import { Fabric } from "@kubb/react-fabric";
|
|
6
6
|
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
7
|
-
import { OperationNode, SchemaNode } from "@kubb/ast/types";
|
|
8
7
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
9
8
|
|
|
10
9
|
//#region ../plugin-oas/src/types.d.ts
|
|
@@ -93,8 +92,8 @@ type ByContentType = {
|
|
|
93
92
|
type: 'contentType';
|
|
94
93
|
pattern: string | RegExp;
|
|
95
94
|
};
|
|
96
|
-
type Exclude = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
97
|
-
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
95
|
+
type Exclude = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
96
|
+
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
98
97
|
type Override<TOptions> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
99
98
|
options: Partial<TOptions>;
|
|
100
99
|
};
|
|
@@ -133,7 +132,7 @@ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = P
|
|
|
133
132
|
method: HttpMethod;
|
|
134
133
|
operation: Operation;
|
|
135
134
|
}>>;
|
|
136
|
-
build(...generators: Array<Generator<TPluginOptions
|
|
135
|
+
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
137
136
|
}
|
|
138
137
|
//#endregion
|
|
139
138
|
//#region ../plugin-oas/src/SchemaMapper.d.ts
|
|
@@ -423,46 +422,33 @@ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGe
|
|
|
423
422
|
static deepSearch<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): Array<SchemaKeywordMapper[T]>;
|
|
424
423
|
static find<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
|
|
425
424
|
static combineObjects(tree: Schema[] | undefined): Schema[];
|
|
426
|
-
build(...generators: Array<Generator<TPluginOptions
|
|
425
|
+
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
427
426
|
}
|
|
428
427
|
//#endregion
|
|
429
428
|
//#region ../plugin-oas/src/generators/createGenerator.d.ts
|
|
430
|
-
type CoreGenerator<TOptions extends PluginFactoryOptions
|
|
429
|
+
type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
431
430
|
name: string;
|
|
432
431
|
type: 'core';
|
|
433
|
-
version:
|
|
434
|
-
operations: (props: OperationsProps<TOptions
|
|
435
|
-
operation: (props: OperationProps<TOptions
|
|
436
|
-
schema: (props: SchemaProps<TOptions
|
|
432
|
+
version: '1';
|
|
433
|
+
operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
434
|
+
operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
435
|
+
schema: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
437
436
|
};
|
|
438
437
|
//#endregion
|
|
439
438
|
//#region ../plugin-oas/src/generators/types.d.ts
|
|
440
|
-
type
|
|
441
|
-
type OperationsV1Props<TOptions extends PluginFactoryOptions> = {
|
|
439
|
+
type OperationsProps<TOptions extends PluginFactoryOptions> = {
|
|
442
440
|
config: Config;
|
|
443
441
|
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
444
442
|
plugin: Plugin<TOptions>;
|
|
445
443
|
operations: Array<Operation>;
|
|
446
444
|
};
|
|
447
|
-
type
|
|
448
|
-
config: Config;
|
|
449
|
-
plugin: Plugin<TOptions>;
|
|
450
|
-
nodes: Array<OperationNode>;
|
|
451
|
-
};
|
|
452
|
-
type OperationV1Props<TOptions extends PluginFactoryOptions> = {
|
|
445
|
+
type OperationProps<TOptions extends PluginFactoryOptions> = {
|
|
453
446
|
config: Config;
|
|
454
447
|
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
455
448
|
plugin: Plugin<TOptions>;
|
|
456
449
|
operation: Operation;
|
|
457
450
|
};
|
|
458
|
-
type
|
|
459
|
-
config: Config;
|
|
460
|
-
plugin: Plugin<TOptions>;
|
|
461
|
-
node: OperationNode;
|
|
462
|
-
};
|
|
463
|
-
type OperationsProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? OperationsV2Props<TOptions> : OperationsV1Props<TOptions>;
|
|
464
|
-
type OperationProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? OperationV2Props<TOptions> : OperationV1Props<TOptions>;
|
|
465
|
-
type SchemaV1Props<TOptions extends PluginFactoryOptions> = {
|
|
451
|
+
type SchemaProps<TOptions extends PluginFactoryOptions> = {
|
|
466
452
|
config: Config;
|
|
467
453
|
generator: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
|
|
468
454
|
plugin: Plugin<TOptions>;
|
|
@@ -472,44 +458,38 @@ type SchemaV1Props<TOptions extends PluginFactoryOptions> = {
|
|
|
472
458
|
value: SchemaObject;
|
|
473
459
|
};
|
|
474
460
|
};
|
|
475
|
-
type
|
|
476
|
-
config: Config;
|
|
477
|
-
plugin: Plugin<TOptions>;
|
|
478
|
-
node: SchemaNode;
|
|
479
|
-
};
|
|
480
|
-
type SchemaProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? SchemaV2Props<TOptions> : SchemaV1Props<TOptions>;
|
|
481
|
-
type Generator<TOptions extends PluginFactoryOptions, TVersion extends Version = Version> = CoreGenerator<TOptions, TVersion> | ReactGenerator<TOptions, TVersion>;
|
|
461
|
+
type Generator$1<TOptions extends PluginFactoryOptions> = CoreGenerator<TOptions> | ReactGenerator<TOptions> | Generator<TOptions>;
|
|
482
462
|
//#endregion
|
|
483
463
|
//#region ../plugin-oas/src/generators/createReactGenerator.d.ts
|
|
484
|
-
type ReactGenerator<TOptions extends PluginFactoryOptions
|
|
464
|
+
type ReactGenerator<TOptions extends PluginFactoryOptions> = {
|
|
485
465
|
name: string;
|
|
486
466
|
type: 'react';
|
|
487
|
-
version:
|
|
488
|
-
Operations: (props: OperationsProps<TOptions
|
|
489
|
-
Operation: (props: OperationProps<TOptions
|
|
490
|
-
Schema: (props: SchemaProps<TOptions
|
|
467
|
+
version: '1';
|
|
468
|
+
Operations: (props: OperationsProps<TOptions>) => FabricReactNode;
|
|
469
|
+
Operation: (props: OperationProps<TOptions>) => FabricReactNode;
|
|
470
|
+
Schema: (props: SchemaProps<TOptions>) => FabricReactNode;
|
|
491
471
|
};
|
|
492
472
|
//#endregion
|
|
493
473
|
//#region src/generators/customHookOptionsFileGenerator.d.ts
|
|
494
|
-
declare const customHookOptionsFileGenerator: ReactGenerator<PluginReactQuery
|
|
474
|
+
declare const customHookOptionsFileGenerator: ReactGenerator<PluginReactQuery>;
|
|
495
475
|
//#endregion
|
|
496
476
|
//#region src/generators/hookOptionsGenerator.d.ts
|
|
497
|
-
declare const hookOptionsGenerator: ReactGenerator<PluginReactQuery
|
|
477
|
+
declare const hookOptionsGenerator: ReactGenerator<PluginReactQuery>;
|
|
498
478
|
//#endregion
|
|
499
479
|
//#region src/generators/infiniteQueryGenerator.d.ts
|
|
500
|
-
declare const infiniteQueryGenerator: ReactGenerator<PluginReactQuery
|
|
480
|
+
declare const infiniteQueryGenerator: ReactGenerator<PluginReactQuery>;
|
|
501
481
|
//#endregion
|
|
502
482
|
//#region src/generators/mutationGenerator.d.ts
|
|
503
|
-
declare const mutationGenerator: ReactGenerator<PluginReactQuery
|
|
483
|
+
declare const mutationGenerator: ReactGenerator<PluginReactQuery>;
|
|
504
484
|
//#endregion
|
|
505
485
|
//#region src/generators/queryGenerator.d.ts
|
|
506
|
-
declare const queryGenerator: ReactGenerator<PluginReactQuery
|
|
486
|
+
declare const queryGenerator: ReactGenerator<PluginReactQuery>;
|
|
507
487
|
//#endregion
|
|
508
488
|
//#region src/generators/suspenseInfiniteQueryGenerator.d.ts
|
|
509
|
-
declare const suspenseInfiniteQueryGenerator: ReactGenerator<PluginReactQuery
|
|
489
|
+
declare const suspenseInfiniteQueryGenerator: ReactGenerator<PluginReactQuery>;
|
|
510
490
|
//#endregion
|
|
511
491
|
//#region src/generators/suspenseQueryGenerator.d.ts
|
|
512
|
-
declare const suspenseQueryGenerator: ReactGenerator<PluginReactQuery
|
|
492
|
+
declare const suspenseQueryGenerator: ReactGenerator<PluginReactQuery>;
|
|
513
493
|
//#endregion
|
|
514
494
|
export { customHookOptionsFileGenerator, hookOptionsGenerator, infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseInfiniteQueryGenerator, suspenseQueryGenerator };
|
|
515
495
|
//# sourceMappingURL=generators.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { n as Options, r as PluginReactQuery } from "./types
|
|
2
|
+
import { n as Options, r as PluginReactQuery } from "./types-D5S7Ny9r.js";
|
|
3
3
|
import * as _kubb_core0 from "@kubb/core";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin.d.ts
|
|
@@ -4,7 +4,7 @@ import { ClientImportPath, PluginClient } from "@kubb/plugin-client";
|
|
|
4
4
|
import { Exclude, Include, OperationSchemas, Override, ResolvePathOptions } from "@kubb/plugin-oas";
|
|
5
5
|
import { HttpMethod, Oas, Operation, contentType } from "@kubb/oas";
|
|
6
6
|
import { FunctionParams } from "@kubb/react-fabric";
|
|
7
|
-
import { Generator } from "@kubb/plugin-oas/generators";
|
|
7
|
+
import { Generator as Generator$1 } from "@kubb/plugin-oas/generators";
|
|
8
8
|
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
9
9
|
|
|
10
10
|
//#region ../../internals/tanstack-query/src/types.d.ts
|
|
@@ -243,7 +243,7 @@ type Options = {
|
|
|
243
243
|
/**
|
|
244
244
|
* Define some generators next to the react-query generators
|
|
245
245
|
*/
|
|
246
|
-
generators?: Array<Generator<PluginReactQuery>>;
|
|
246
|
+
generators?: Array<Generator$1<PluginReactQuery>>;
|
|
247
247
|
};
|
|
248
248
|
type ResolvedOptions = {
|
|
249
249
|
output: Output<Oas>;
|
|
@@ -267,4 +267,4 @@ type ResolvedOptions = {
|
|
|
267
267
|
type PluginReactQuery = PluginFactoryOptions<'plugin-react-query', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
268
268
|
//#endregion
|
|
269
269
|
export { MutationKey$1 as a, QueryKey$1 as i, Options as n, PluginReactQuery as r, Infinite as t };
|
|
270
|
-
//# sourceMappingURL=types
|
|
270
|
+
//# sourceMappingURL=types-D5S7Ny9r.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-react-query",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.4",
|
|
4
4
|
"description": "React Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for React applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-query",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"@kubb/fabric-core": "0.13.3",
|
|
75
75
|
"@kubb/react-fabric": "0.13.3",
|
|
76
76
|
"remeda": "^2.33.6",
|
|
77
|
-
"@kubb/core": "5.0.0-alpha.
|
|
78
|
-
"@kubb/oas": "5.0.0-alpha.
|
|
79
|
-
"@kubb/plugin-client": "5.0.0-alpha.
|
|
80
|
-
"@kubb/plugin-oas": "5.0.0-alpha.
|
|
81
|
-
"@kubb/plugin-ts": "5.0.0-alpha.
|
|
82
|
-
"@kubb/plugin-zod": "5.0.0-alpha.
|
|
77
|
+
"@kubb/core": "5.0.0-alpha.4",
|
|
78
|
+
"@kubb/oas": "5.0.0-alpha.4",
|
|
79
|
+
"@kubb/plugin-client": "5.0.0-alpha.4",
|
|
80
|
+
"@kubb/plugin-oas": "5.0.0-alpha.4",
|
|
81
|
+
"@kubb/plugin-ts": "5.0.0-alpha.4",
|
|
82
|
+
"@kubb/plugin-zod": "5.0.0-alpha.4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@kubb/fabric-core": "0.13.3",
|