@kubb/plugin-client 5.0.0-alpha.3 → 5.0.0-alpha.5
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 { r as PluginClient } from "./types-
|
|
2
|
+
import { r as PluginClient } from "./types-DBQdg-BV.js";
|
|
3
3
|
import { OperationSchemas } from "@kubb/plugin-oas";
|
|
4
4
|
import { FunctionParams } from "@kubb/react-fabric";
|
|
5
5
|
import { Operation } from "@kubb/oas";
|
package/dist/generators.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { r as PluginClient } from "./types-
|
|
3
|
-
import {
|
|
4
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
2
|
+
import { r as PluginClient } from "./types-DBQdg-BV.js";
|
|
3
|
+
import { AsyncEventEmitter, Config, FileMetaBase, Generator, Group, KubbEvents, Output, Plugin, PluginFactoryOptions, PluginManager, ResolveNameParams } from "@kubb/core";
|
|
5
4
|
import { HttpMethod, Oas, Operation, SchemaObject, contentType } from "@kubb/oas";
|
|
6
5
|
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
7
|
-
import {
|
|
8
|
-
import { KubbFile } from "@kubb/fabric-core/types";
|
|
6
|
+
import { Fabric, KubbFile } from "@kubb/fabric-core/types";
|
|
9
7
|
|
|
10
8
|
//#region ../plugin-oas/src/types.d.ts
|
|
11
9
|
type GetOasOptions = {
|
|
@@ -93,8 +91,8 @@ type ByContentType = {
|
|
|
93
91
|
type: 'contentType';
|
|
94
92
|
pattern: string | RegExp;
|
|
95
93
|
};
|
|
96
|
-
type Exclude = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
97
|
-
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
94
|
+
type Exclude = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
95
|
+
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
98
96
|
type Override<TOptions> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
99
97
|
options: Partial<TOptions>;
|
|
100
98
|
};
|
|
@@ -133,7 +131,7 @@ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = P
|
|
|
133
131
|
method: HttpMethod;
|
|
134
132
|
operation: Operation;
|
|
135
133
|
}>>;
|
|
136
|
-
build(...generators: Array<Generator<TPluginOptions
|
|
134
|
+
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
137
135
|
}
|
|
138
136
|
//#endregion
|
|
139
137
|
//#region ../plugin-oas/src/SchemaMapper.d.ts
|
|
@@ -423,48 +421,33 @@ declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGe
|
|
|
423
421
|
static deepSearch<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): Array<SchemaKeywordMapper[T]>;
|
|
424
422
|
static find<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
|
|
425
423
|
static combineObjects(tree: Schema[] | undefined): Schema[];
|
|
426
|
-
build(...generators: Array<Generator<TPluginOptions
|
|
424
|
+
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
427
425
|
}
|
|
428
426
|
//#endregion
|
|
429
427
|
//#region ../plugin-oas/src/generators/createGenerator.d.ts
|
|
430
|
-
type CoreGenerator<TOptions extends PluginFactoryOptions
|
|
428
|
+
type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
431
429
|
name: string;
|
|
432
430
|
type: 'core';
|
|
433
|
-
version:
|
|
434
|
-
operations: (props: OperationsProps<TOptions
|
|
435
|
-
operation: (props: OperationProps<TOptions
|
|
436
|
-
schema: (props: SchemaProps<TOptions
|
|
431
|
+
version: '1';
|
|
432
|
+
operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
433
|
+
operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
434
|
+
schema: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
437
435
|
};
|
|
438
436
|
//#endregion
|
|
439
437
|
//#region ../plugin-oas/src/generators/types.d.ts
|
|
440
|
-
type
|
|
441
|
-
type OperationsV1Props<TOptions extends PluginFactoryOptions> = {
|
|
438
|
+
type OperationsProps<TOptions extends PluginFactoryOptions> = {
|
|
442
439
|
config: Config;
|
|
443
440
|
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
444
441
|
plugin: Plugin<TOptions>;
|
|
445
442
|
operations: Array<Operation>;
|
|
446
443
|
};
|
|
447
|
-
type
|
|
448
|
-
config: Config;
|
|
449
|
-
adapter: Adapter;
|
|
450
|
-
options: Plugin<TOptions>['options'];
|
|
451
|
-
nodes: Array<OperationNode>;
|
|
452
|
-
};
|
|
453
|
-
type OperationV1Props<TOptions extends PluginFactoryOptions> = {
|
|
444
|
+
type OperationProps<TOptions extends PluginFactoryOptions> = {
|
|
454
445
|
config: Config;
|
|
455
446
|
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
456
447
|
plugin: Plugin<TOptions>;
|
|
457
448
|
operation: Operation;
|
|
458
449
|
};
|
|
459
|
-
type
|
|
460
|
-
config: Config;
|
|
461
|
-
adapter: Adapter;
|
|
462
|
-
options: Plugin<TOptions>['options'];
|
|
463
|
-
node: OperationNode;
|
|
464
|
-
};
|
|
465
|
-
type OperationsProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? OperationsV2Props<TOptions> : OperationsV1Props<TOptions>;
|
|
466
|
-
type OperationProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? OperationV2Props<TOptions> : OperationV1Props<TOptions>;
|
|
467
|
-
type SchemaV1Props<TOptions extends PluginFactoryOptions> = {
|
|
450
|
+
type SchemaProps<TOptions extends PluginFactoryOptions> = {
|
|
468
451
|
config: Config;
|
|
469
452
|
generator: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
|
|
470
453
|
plugin: Plugin<TOptions>;
|
|
@@ -474,39 +457,32 @@ type SchemaV1Props<TOptions extends PluginFactoryOptions> = {
|
|
|
474
457
|
value: SchemaObject;
|
|
475
458
|
};
|
|
476
459
|
};
|
|
477
|
-
type
|
|
478
|
-
config: Config;
|
|
479
|
-
options: Plugin<TOptions>['options'];
|
|
480
|
-
node: SchemaNode;
|
|
481
|
-
adapter: Adapter;
|
|
482
|
-
};
|
|
483
|
-
type SchemaProps<TOptions extends PluginFactoryOptions, TVersion extends Version = '1'> = TVersion extends '2' ? SchemaV2Props<TOptions> : SchemaV1Props<TOptions>;
|
|
484
|
-
type Generator<TOptions extends PluginFactoryOptions, TVersion extends Version = Version> = CoreGenerator<TOptions, TVersion> | ReactGenerator<TOptions, TVersion>;
|
|
460
|
+
type Generator$1<TOptions extends PluginFactoryOptions> = CoreGenerator<TOptions> | ReactGenerator<TOptions> | Generator<TOptions>;
|
|
485
461
|
//#endregion
|
|
486
462
|
//#region ../plugin-oas/src/generators/createReactGenerator.d.ts
|
|
487
|
-
type ReactGenerator<TOptions extends PluginFactoryOptions
|
|
463
|
+
type ReactGenerator<TOptions extends PluginFactoryOptions> = {
|
|
488
464
|
name: string;
|
|
489
465
|
type: 'react';
|
|
490
|
-
version:
|
|
491
|
-
Operations: (props: OperationsProps<TOptions
|
|
492
|
-
Operation: (props: OperationProps<TOptions
|
|
493
|
-
Schema: (props: SchemaProps<TOptions
|
|
466
|
+
version: '1';
|
|
467
|
+
Operations: (props: OperationsProps<TOptions>) => FabricReactNode;
|
|
468
|
+
Operation: (props: OperationProps<TOptions>) => FabricReactNode;
|
|
469
|
+
Schema: (props: SchemaProps<TOptions>) => FabricReactNode;
|
|
494
470
|
};
|
|
495
471
|
//#endregion
|
|
496
472
|
//#region src/generators/classClientGenerator.d.ts
|
|
497
|
-
declare const classClientGenerator: ReactGenerator<PluginClient
|
|
473
|
+
declare const classClientGenerator: ReactGenerator<PluginClient>;
|
|
498
474
|
//#endregion
|
|
499
475
|
//#region src/generators/clientGenerator.d.ts
|
|
500
|
-
declare const clientGenerator: ReactGenerator<PluginClient
|
|
476
|
+
declare const clientGenerator: ReactGenerator<PluginClient>;
|
|
501
477
|
//#endregion
|
|
502
478
|
//#region src/generators/groupedClientGenerator.d.ts
|
|
503
|
-
declare const groupedClientGenerator: ReactGenerator<PluginClient
|
|
479
|
+
declare const groupedClientGenerator: ReactGenerator<PluginClient>;
|
|
504
480
|
//#endregion
|
|
505
481
|
//#region src/generators/operationsGenerator.d.ts
|
|
506
|
-
declare const operationsGenerator: ReactGenerator<PluginClient
|
|
482
|
+
declare const operationsGenerator: ReactGenerator<PluginClient>;
|
|
507
483
|
//#endregion
|
|
508
484
|
//#region src/generators/staticClassClientGenerator.d.ts
|
|
509
|
-
declare const staticClassClientGenerator: ReactGenerator<PluginClient
|
|
485
|
+
declare const staticClassClientGenerator: ReactGenerator<PluginClient>;
|
|
510
486
|
//#endregion
|
|
511
487
|
export { classClientGenerator, clientGenerator, groupedClientGenerator, operationsGenerator, staticClassClientGenerator };
|
|
512
488
|
//# 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 PluginClient, t as ClientImportPath } from "./types-
|
|
2
|
+
import { n as Options, r as PluginClient, t as ClientImportPath } from "./types-DBQdg-BV.js";
|
|
3
3
|
import * as _kubb_core0 from "@kubb/core";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
2
|
import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
|
|
3
3
|
import { Exclude, Include, Override, ResolvePathOptions } from "@kubb/plugin-oas";
|
|
4
|
-
import { Generator } from "@kubb/plugin-oas/generators";
|
|
4
|
+
import { Generator as Generator$1 } from "@kubb/plugin-oas/generators";
|
|
5
5
|
import { Oas, contentType } from "@kubb/oas";
|
|
6
6
|
|
|
7
7
|
//#region src/types.d.ts
|
|
@@ -145,7 +145,7 @@ type Options = {
|
|
|
145
145
|
/**
|
|
146
146
|
* Define some generators next to the client generators
|
|
147
147
|
*/
|
|
148
|
-
generators?: Array<Generator<PluginClient>>;
|
|
148
|
+
generators?: Array<Generator$1<PluginClient>>;
|
|
149
149
|
} & ClientImportPath;
|
|
150
150
|
type ResolvedOptions = {
|
|
151
151
|
output: Output<Oas>;
|
|
@@ -166,4 +166,4 @@ type ResolvedOptions = {
|
|
|
166
166
|
type PluginClient = PluginFactoryOptions<'plugin-client', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
167
167
|
//#endregion
|
|
168
168
|
export { Options as n, PluginClient as r, ClientImportPath as t };
|
|
169
|
-
//# sourceMappingURL=types-
|
|
169
|
+
//# sourceMappingURL=types-DBQdg-BV.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-client",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.5",
|
|
4
4
|
"description": "API client generator plugin for Kubb, creating type-safe HTTP clients (Axios, Fetch) from OpenAPI specifications for making API requests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-client",
|
|
@@ -108,21 +108,21 @@
|
|
|
108
108
|
}
|
|
109
109
|
],
|
|
110
110
|
"dependencies": {
|
|
111
|
-
"@kubb/fabric-core": "0.
|
|
112
|
-
"@kubb/react-fabric": "0.
|
|
113
|
-
"@kubb/core": "5.0.0-alpha.
|
|
114
|
-
"@kubb/oas": "5.0.0-alpha.
|
|
115
|
-
"@kubb/plugin-oas": "5.0.0-alpha.
|
|
116
|
-
"@kubb/plugin-ts": "5.0.0-alpha.
|
|
117
|
-
"@kubb/plugin-zod": "5.0.0-alpha.
|
|
111
|
+
"@kubb/fabric-core": "0.14.0",
|
|
112
|
+
"@kubb/react-fabric": "0.14.0",
|
|
113
|
+
"@kubb/core": "5.0.0-alpha.5",
|
|
114
|
+
"@kubb/oas": "5.0.0-alpha.5",
|
|
115
|
+
"@kubb/plugin-oas": "5.0.0-alpha.5",
|
|
116
|
+
"@kubb/plugin-ts": "5.0.0-alpha.5",
|
|
117
|
+
"@kubb/plugin-zod": "5.0.0-alpha.5"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"axios": "^1.13.6",
|
|
121
121
|
"@internals/utils": "0.0.0"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
|
-
"@kubb/fabric-core": "0.
|
|
125
|
-
"@kubb/react-fabric": "0.
|
|
124
|
+
"@kubb/fabric-core": "0.14.0",
|
|
125
|
+
"@kubb/react-fabric": "0.14.0",
|
|
126
126
|
"axios": "^1.7.2"
|
|
127
127
|
},
|
|
128
128
|
"peerDependenciesMeta": {
|