@kubb/plugin-client 4.3.1 → 4.4.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/dist/{Operations-ktPlsW1u.js → Operations-CmHRmAdn.js} +3 -3
- package/dist/Operations-CmHRmAdn.js.map +1 -0
- package/dist/{Operations-CT9m1j9w.cjs → Operations-DXjVfmrY.cjs} +24 -24
- package/dist/Operations-DXjVfmrY.cjs.map +1 -0
- package/dist/chunk-DMmIE7y6.js +28 -0
- package/dist/clients/axios.d.cts +4 -4
- package/dist/clients/axios.d.ts +4 -4
- package/dist/clients/fetch.d.cts +4 -4
- package/dist/clients/fetch.d.ts +4 -4
- package/dist/components.cjs +1 -1
- package/dist/components.d.cts +9 -13
- package/dist/components.d.ts +9 -13
- package/dist/components.js +1 -1
- package/dist/{generators-BqXV2IXC.js → generators-0Sc5zPfx.js} +4 -4
- package/dist/generators-0Sc5zPfx.js.map +1 -0
- package/dist/{generators-BSxTToF6.cjs → generators-C_ySk_ES.cjs} +19 -19
- package/dist/generators-C_ySk_ES.cjs.map +1 -0
- package/dist/generators.cjs +2 -2
- package/dist/generators.d.cts +4 -4
- package/dist/generators.d.ts +4 -4
- package/dist/generators.js +2 -2
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/{types-BPLzP9R9.d.ts → types-DJmtgGu4.d.ts} +230 -328
- package/dist/{types-rIa1K280.d.cts → types-DuPfvza5.d.cts} +230 -328
- package/package.json +17 -12
- package/src/components/Client.tsx +3 -3
- package/src/components/Operations.tsx +3 -2
- package/src/components/Url.tsx +13 -2
- package/src/generators/clientGenerator.tsx +1 -1
- package/src/generators/groupedClientGenerator.tsx +2 -2
- package/src/generators/operationsGenerator.tsx +1 -1
- package/src/plugin.ts +1 -0
- package/src/types.ts +1 -1
- package/dist/Operations-CT9m1j9w.cjs.map +0 -1
- package/dist/Operations-ktPlsW1u.js.map +0 -1
- package/dist/generators-BSxTToF6.cjs.map +0 -1
- package/dist/generators-BqXV2IXC.js.map +0 -1
|
@@ -4,11 +4,11 @@ import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
|
4
4
|
import { OpenAPIV3 } from "openapi-types";
|
|
5
5
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
6
6
|
import BaseOas from "oas";
|
|
7
|
+
import { KubbFile } from "@kubb/fabric-core/types";
|
|
8
|
+
import { Fabric, FileManager } from "@kubb/react-fabric";
|
|
7
9
|
import { ConsolaInstance, LogLevel } from "consola";
|
|
8
|
-
import {
|
|
10
|
+
import { KubbNode } from "@kubb/react-fabric/types";
|
|
9
11
|
|
|
10
|
-
//#region rolldown:runtime
|
|
11
|
-
//#endregion
|
|
12
12
|
//#region ../oas/src/types.d.ts
|
|
13
13
|
type contentType = 'application/json' | (string & {});
|
|
14
14
|
type SchemaObject$1 = OasTypes.SchemaObject & {
|
|
@@ -49,130 +49,15 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
|
|
|
49
49
|
* Abstract class that contains the building blocks for plugins to create their own Generator
|
|
50
50
|
* @link idea based on https://github.com/colinhacks/zod/blob/master/src/types.ts#L137
|
|
51
51
|
*/
|
|
52
|
-
declare abstract class BaseGenerator<TOptions
|
|
52
|
+
declare abstract class BaseGenerator<TOptions = unknown, TContext = unknown> {
|
|
53
53
|
#private;
|
|
54
|
-
constructor(options?: TOptions
|
|
55
|
-
get options(): TOptions
|
|
54
|
+
constructor(options?: TOptions, context?: TContext);
|
|
55
|
+
get options(): TOptions;
|
|
56
56
|
get context(): TContext;
|
|
57
|
-
set options(options: TOptions
|
|
57
|
+
set options(options: TOptions);
|
|
58
58
|
abstract build(...params: unknown[]): unknown;
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
|
-
//#region ../core/src/fs/types.d.ts
|
|
62
|
-
type BasePath<T$1 extends string = string> = `${T$1}/`;
|
|
63
|
-
type Import = {
|
|
64
|
-
/**
|
|
65
|
-
* Import name to be used
|
|
66
|
-
* @example ["useState"]
|
|
67
|
-
* @example "React"
|
|
68
|
-
*/
|
|
69
|
-
name: string | Array<string | {
|
|
70
|
-
propertyName: string;
|
|
71
|
-
name?: string;
|
|
72
|
-
}>;
|
|
73
|
-
/**
|
|
74
|
-
* Path for the import
|
|
75
|
-
* @example '@kubb/core'
|
|
76
|
-
*/
|
|
77
|
-
path: string;
|
|
78
|
-
/**
|
|
79
|
-
* Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
|
|
80
|
-
*/
|
|
81
|
-
isTypeOnly?: boolean;
|
|
82
|
-
isNameSpace?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* When root is set it will get the path with relative getRelativePath(root, path).
|
|
85
|
-
*/
|
|
86
|
-
root?: string;
|
|
87
|
-
};
|
|
88
|
-
type Source = {
|
|
89
|
-
name?: string;
|
|
90
|
-
value?: string;
|
|
91
|
-
isTypeOnly?: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Has const or type 'export'
|
|
94
|
-
* @default false
|
|
95
|
-
*/
|
|
96
|
-
isExportable?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* When set, barrel generation will add this
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
isIndexable?: boolean;
|
|
102
|
-
};
|
|
103
|
-
type Export = {
|
|
104
|
-
/**
|
|
105
|
-
* Export name to be used.
|
|
106
|
-
* @example ["useState"]
|
|
107
|
-
* @example "React"
|
|
108
|
-
*/
|
|
109
|
-
name?: string | Array<string>;
|
|
110
|
-
/**
|
|
111
|
-
* Path for the import.
|
|
112
|
-
* @example '@kubb/core'
|
|
113
|
-
*/
|
|
114
|
-
path: string;
|
|
115
|
-
/**
|
|
116
|
-
* Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
|
|
117
|
-
*/
|
|
118
|
-
isTypeOnly?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
|
|
121
|
-
*/
|
|
122
|
-
asAlias?: boolean;
|
|
123
|
-
};
|
|
124
|
-
type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
|
|
125
|
-
type Mode = 'single' | 'split';
|
|
126
|
-
/**
|
|
127
|
-
* Name to be used to dynamicly create the baseName(based on input.path)
|
|
128
|
-
* Based on UNIX basename
|
|
129
|
-
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
130
|
-
*/
|
|
131
|
-
type BaseName = `${string}.${string}`;
|
|
132
|
-
/**
|
|
133
|
-
* Path will be full qualified path to a specified file
|
|
134
|
-
*/
|
|
135
|
-
type Path = string;
|
|
136
|
-
type AdvancedPath<T$1 extends BaseName = BaseName> = `${BasePath}${T$1}`;
|
|
137
|
-
type OptionalPath = Path | undefined | null;
|
|
138
|
-
type File<TMeta extends object = object> = {
|
|
139
|
-
/**
|
|
140
|
-
* Name to be used to create the path
|
|
141
|
-
* Based on UNIX basename, `${name}.extname`
|
|
142
|
-
* @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
|
|
143
|
-
*/
|
|
144
|
-
baseName: BaseName;
|
|
145
|
-
/**
|
|
146
|
-
* Path will be full qualified path to a specified file
|
|
147
|
-
*/
|
|
148
|
-
path: AdvancedPath<BaseName> | Path;
|
|
149
|
-
sources: Array<Source>;
|
|
150
|
-
imports?: Array<Import>;
|
|
151
|
-
exports?: Array<Export>;
|
|
152
|
-
/**
|
|
153
|
-
* Use extra meta, this is getting used to generate the barrel/index files.
|
|
154
|
-
*/
|
|
155
|
-
meta?: TMeta;
|
|
156
|
-
banner?: string;
|
|
157
|
-
footer?: string;
|
|
158
|
-
};
|
|
159
|
-
type ResolvedImport = Import;
|
|
160
|
-
type ResolvedExport = Export;
|
|
161
|
-
type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
|
|
162
|
-
/**
|
|
163
|
-
* @default object-hash
|
|
164
|
-
*/
|
|
165
|
-
id: string;
|
|
166
|
-
/**
|
|
167
|
-
* Contains the first part of the baseName, generated based on baseName
|
|
168
|
-
* @link https://nodejs.org/api/path.html#pathformatpathobject
|
|
169
|
-
*/
|
|
170
|
-
name: string;
|
|
171
|
-
extname: Extname;
|
|
172
|
-
imports: Array<ResolvedImport>;
|
|
173
|
-
exports: Array<ResolvedExport>;
|
|
174
|
-
};
|
|
175
|
-
//#endregion
|
|
176
61
|
//#region ../core/src/utils/EventEmitter.d.ts
|
|
177
62
|
declare class EventEmitter<TEvents extends Record<string, any>> {
|
|
178
63
|
#private;
|
|
@@ -222,7 +107,7 @@ type Logger = {
|
|
|
222
107
|
};
|
|
223
108
|
//#endregion
|
|
224
109
|
//#region ../core/src/utils/types.d.ts
|
|
225
|
-
type PossiblePromise<T
|
|
110
|
+
type PossiblePromise<T> = Promise<T> | T;
|
|
226
111
|
//#endregion
|
|
227
112
|
//#region ../core/src/types.d.ts
|
|
228
113
|
type InputPath = {
|
|
@@ -296,7 +181,7 @@ type Config<TInput = Input> = {
|
|
|
296
181
|
* Override the extension to the generated imports and exports, by default each plugin will add an extension
|
|
297
182
|
* @default { '.ts': '.ts'}
|
|
298
183
|
*/
|
|
299
|
-
extension?: Record<Extname, Extname | ''>;
|
|
184
|
+
extension?: Record<KubbFile.Extname, KubbFile.Extname | ''>;
|
|
300
185
|
/**
|
|
301
186
|
* Specify how `index.ts` files should be created. You can also disable the generation of barrel files here. While each plugin has its own `barrelType` option, this setting controls the creation of the root barrel file, such as` src/gen/index.ts`.
|
|
302
187
|
* @default 'named'
|
|
@@ -335,11 +220,11 @@ TName extends string = string,
|
|
|
335
220
|
/**
|
|
336
221
|
* Options of the plugin.
|
|
337
222
|
*/
|
|
338
|
-
TOptions
|
|
223
|
+
TOptions extends object = object,
|
|
339
224
|
/**
|
|
340
225
|
* Options of the plugin that can be used later on, see `options` inside your plugin config.
|
|
341
226
|
*/
|
|
342
|
-
TResolvedOptions extends object = TOptions
|
|
227
|
+
TResolvedOptions extends object = TOptions,
|
|
343
228
|
/**
|
|
344
229
|
* Context that you want to expose to other plugins.
|
|
345
230
|
*/
|
|
@@ -353,23 +238,23 @@ TResolvePathOptions extends object = object> = {
|
|
|
353
238
|
* Same behaviour like what has been done with `QueryKey` in `@tanstack/react-query`
|
|
354
239
|
*/
|
|
355
240
|
key: PluginKey<TName | string>;
|
|
356
|
-
options: TOptions
|
|
241
|
+
options: TOptions;
|
|
357
242
|
resolvedOptions: TResolvedOptions;
|
|
358
243
|
context: TContext;
|
|
359
244
|
resolvePathOptions: TResolvePathOptions;
|
|
360
245
|
};
|
|
361
246
|
type PluginKey<TName> = [name: TName, identifier?: string | number];
|
|
362
|
-
type UserPlugin<TOptions
|
|
247
|
+
type UserPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
363
248
|
/**
|
|
364
249
|
* Unique name used for the plugin
|
|
365
250
|
* The name of the plugin follows the format scope:foo-bar or foo-bar, adding scope: can avoid naming conflicts with other plugins.
|
|
366
251
|
* @example @kubb/typescript
|
|
367
252
|
*/
|
|
368
|
-
name: TOptions
|
|
253
|
+
name: TOptions['name'];
|
|
369
254
|
/**
|
|
370
255
|
* Options set for a specific plugin(see kubb.config.js), passthrough of options.
|
|
371
256
|
*/
|
|
372
|
-
options: TOptions
|
|
257
|
+
options: TOptions['resolvedOptions'];
|
|
373
258
|
/**
|
|
374
259
|
* Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
|
|
375
260
|
* Can be used to validate dependent plugins.
|
|
@@ -379,23 +264,23 @@ type UserPlugin<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions>
|
|
|
379
264
|
* Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin will be executed before these plugins.
|
|
380
265
|
*/
|
|
381
266
|
post?: Array<string>;
|
|
382
|
-
} & (TOptions
|
|
267
|
+
} & (TOptions['context'] extends never ? {
|
|
383
268
|
context?: never;
|
|
384
269
|
} : {
|
|
385
|
-
context: (this: TOptions
|
|
270
|
+
context: (this: TOptions['name'] extends 'core' ? null : Omit<PluginContext<TOptions>, 'addFile'>) => TOptions['context'];
|
|
386
271
|
});
|
|
387
|
-
type UserPluginWithLifeCycle<TOptions
|
|
388
|
-
type Plugin<TOptions
|
|
272
|
+
type UserPluginWithLifeCycle<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = UserPlugin<TOptions> & PluginLifecycle<TOptions>;
|
|
273
|
+
type Plugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
389
274
|
/**
|
|
390
275
|
* Unique name used for the plugin
|
|
391
276
|
* @example @kubb/typescript
|
|
392
277
|
*/
|
|
393
|
-
name: TOptions
|
|
278
|
+
name: TOptions['name'];
|
|
394
279
|
/**
|
|
395
280
|
* Internal key used when a developer uses more than one of the same plugin
|
|
396
281
|
* @private
|
|
397
282
|
*/
|
|
398
|
-
key: TOptions
|
|
283
|
+
key: TOptions['key'];
|
|
399
284
|
/**
|
|
400
285
|
* Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
|
|
401
286
|
* Can be used to validate dependent plugins.
|
|
@@ -408,49 +293,49 @@ type Plugin<TOptions$1 extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
|
408
293
|
/**
|
|
409
294
|
* Options set for a specific plugin(see kubb.config.js), passthrough of options.
|
|
410
295
|
*/
|
|
411
|
-
options: TOptions
|
|
412
|
-
} & (TOptions
|
|
296
|
+
options: TOptions['resolvedOptions'];
|
|
297
|
+
} & (TOptions['context'] extends never ? {
|
|
413
298
|
context?: never;
|
|
414
299
|
} : {
|
|
415
|
-
context: TOptions
|
|
300
|
+
context: TOptions['context'];
|
|
416
301
|
});
|
|
417
|
-
type PluginWithLifeCycle<TOptions
|
|
418
|
-
type PluginLifecycle<TOptions
|
|
302
|
+
type PluginWithLifeCycle<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = Plugin<TOptions> & PluginLifecycle<TOptions>;
|
|
303
|
+
type PluginLifecycle<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
419
304
|
/**
|
|
420
305
|
* Start of the lifecycle of a plugin.
|
|
421
306
|
* @type hookParallel
|
|
422
307
|
*/
|
|
423
|
-
buildStart?: (this: PluginContext<TOptions
|
|
308
|
+
buildStart?: (this: PluginContext<TOptions>, Config: Config) => PossiblePromise<void>;
|
|
424
309
|
/**
|
|
425
310
|
* Resolve to a Path based on a baseName(example: `./Pet.ts`) and directory(example: `./models`).
|
|
426
311
|
* Options can als be included.
|
|
427
312
|
* @type hookFirst
|
|
428
313
|
* @example ('./Pet.ts', './src/gen/') => '/src/gen/Pet.ts'
|
|
429
314
|
*/
|
|
430
|
-
resolvePath?: (this: PluginContext<TOptions
|
|
315
|
+
resolvePath?: (this: PluginContext<TOptions>, baseName: KubbFile.BaseName, mode?: KubbFile.Mode, options?: TOptions['resolvePathOptions']) => KubbFile.OptionalPath;
|
|
431
316
|
/**
|
|
432
317
|
* Resolve to a name based on a string.
|
|
433
318
|
* Useful when converting to PascalCase or camelCase.
|
|
434
319
|
* @type hookFirst
|
|
435
320
|
* @example ('pet') => 'Pet'
|
|
436
321
|
*/
|
|
437
|
-
resolveName?: (this: PluginContext<TOptions
|
|
322
|
+
resolveName?: (this: PluginContext<TOptions>, name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
438
323
|
/**
|
|
439
324
|
* End of the plugin lifecycle.
|
|
440
325
|
* @type hookParallel
|
|
441
326
|
*/
|
|
442
|
-
buildEnd?: (this: PluginContext<TOptions
|
|
327
|
+
buildEnd?: (this: PluginContext<TOptions>) => PossiblePromise<void>;
|
|
443
328
|
};
|
|
444
329
|
type PluginLifecycleHooks = keyof PluginLifecycle;
|
|
445
|
-
type PluginParameter<H
|
|
446
|
-
type ResolvePathParams<TOptions
|
|
330
|
+
type PluginParameter<H extends PluginLifecycleHooks> = Parameters<Required<PluginLifecycle>[H]>;
|
|
331
|
+
type ResolvePathParams<TOptions = object> = {
|
|
447
332
|
pluginKey?: Plugin['key'];
|
|
448
|
-
baseName: BaseName;
|
|
449
|
-
mode?: Mode;
|
|
333
|
+
baseName: KubbFile.BaseName;
|
|
334
|
+
mode?: KubbFile.Mode;
|
|
450
335
|
/**
|
|
451
336
|
* Options to be passed to 'resolvePath' 3th parameter
|
|
452
337
|
*/
|
|
453
|
-
options?: TOptions
|
|
338
|
+
options?: TOptions;
|
|
454
339
|
};
|
|
455
340
|
type ResolveNameParams = {
|
|
456
341
|
name: string;
|
|
@@ -463,15 +348,16 @@ type ResolveNameParams = {
|
|
|
463
348
|
*/
|
|
464
349
|
type?: 'file' | 'function' | 'type' | 'const';
|
|
465
350
|
};
|
|
466
|
-
type PluginContext<TOptions
|
|
351
|
+
type PluginContext<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
|
|
352
|
+
fabric: Fabric;
|
|
467
353
|
config: Config;
|
|
468
354
|
/**
|
|
469
355
|
* @deprecated
|
|
470
356
|
*/
|
|
471
357
|
fileManager: FileManager;
|
|
472
358
|
pluginManager: PluginManager;
|
|
473
|
-
addFile: (...file: Array<File>) => Promise<Array<ResolvedFile>>;
|
|
474
|
-
resolvePath: (params: ResolvePathParams<TOptions
|
|
359
|
+
addFile: (...file: Array<KubbFile.File>) => Promise<Array<KubbFile.ResolvedFile>>;
|
|
360
|
+
resolvePath: (params: ResolvePathParams<TOptions['resolvePathOptions']>) => KubbFile.OptionalPath;
|
|
475
361
|
resolveName: (params: ResolveNameParams) => string;
|
|
476
362
|
logger: Logger;
|
|
477
363
|
/**
|
|
@@ -481,12 +367,12 @@ type PluginContext<TOptions$1 extends PluginFactoryOptions = PluginFactoryOption
|
|
|
481
367
|
/**
|
|
482
368
|
* Current plugin
|
|
483
369
|
*/
|
|
484
|
-
plugin: Plugin<TOptions
|
|
370
|
+
plugin: Plugin<TOptions>;
|
|
485
371
|
};
|
|
486
372
|
/**
|
|
487
373
|
* Specify the export location for the files and define the behavior of the output
|
|
488
374
|
*/
|
|
489
|
-
type Output<TOptions
|
|
375
|
+
type Output<TOptions> = {
|
|
490
376
|
/**
|
|
491
377
|
* Path to the output folder or file that will contain the generated code
|
|
492
378
|
*/
|
|
@@ -499,11 +385,11 @@ type Output<TOptions$1> = {
|
|
|
499
385
|
/**
|
|
500
386
|
* Add a banner text in the beginning of every file
|
|
501
387
|
*/
|
|
502
|
-
banner?: string | ((options: TOptions
|
|
388
|
+
banner?: string | ((options: TOptions) => string);
|
|
503
389
|
/**
|
|
504
390
|
* Add a footer text in the beginning of every file
|
|
505
391
|
*/
|
|
506
|
-
footer?: string | ((options: TOptions
|
|
392
|
+
footer?: string | ((options: TOptions) => string);
|
|
507
393
|
};
|
|
508
394
|
type GroupContext = {
|
|
509
395
|
group: string;
|
|
@@ -522,20 +408,21 @@ type Group = {
|
|
|
522
408
|
//#region ../core/src/PluginManager.d.ts
|
|
523
409
|
type RequiredPluginLifecycle = Required<PluginLifecycle>;
|
|
524
410
|
type Strategy = 'hookFirst' | 'hookForPlugin' | 'hookParallel' | 'hookSeq';
|
|
525
|
-
type Executer<H
|
|
411
|
+
type Executer<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
|
|
526
412
|
message: string;
|
|
527
413
|
strategy: Strategy;
|
|
528
|
-
hookName: H
|
|
414
|
+
hookName: H;
|
|
529
415
|
plugin: Plugin;
|
|
530
416
|
parameters?: unknown[] | undefined;
|
|
531
417
|
output?: unknown;
|
|
532
418
|
};
|
|
533
|
-
type ParseResult<H
|
|
534
|
-
type SafeParseResult<H
|
|
419
|
+
type ParseResult<H extends PluginLifecycleHooks> = RequiredPluginLifecycle[H];
|
|
420
|
+
type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseResult<H>>> = {
|
|
535
421
|
result: Result;
|
|
536
422
|
plugin: Plugin;
|
|
537
423
|
};
|
|
538
424
|
type Options$2 = {
|
|
425
|
+
fabric: Fabric;
|
|
539
426
|
logger: Logger;
|
|
540
427
|
/**
|
|
541
428
|
* @default Number.POSITIVE_INFINITY
|
|
@@ -547,20 +434,16 @@ type Events = {
|
|
|
547
434
|
executed: [executer: Executer];
|
|
548
435
|
error: [error: Error];
|
|
549
436
|
};
|
|
550
|
-
type GetFileProps<TOptions
|
|
437
|
+
type GetFileProps<TOptions = object> = {
|
|
551
438
|
name: string;
|
|
552
|
-
mode?: Mode;
|
|
553
|
-
extname: Extname;
|
|
439
|
+
mode?: KubbFile.Mode;
|
|
440
|
+
extname: KubbFile.Extname;
|
|
554
441
|
pluginKey: Plugin['key'];
|
|
555
|
-
options?: TOptions
|
|
442
|
+
options?: TOptions;
|
|
556
443
|
};
|
|
557
444
|
declare class PluginManager {
|
|
558
445
|
#private;
|
|
559
446
|
readonly plugins: Set<Plugin<PluginFactoryOptions<string, object, object, any, object>>>;
|
|
560
|
-
/**
|
|
561
|
-
* @deprecated do not use from pluginManager
|
|
562
|
-
*/
|
|
563
|
-
readonly fileManager: FileManager;
|
|
564
447
|
readonly events: EventEmitter<Events>;
|
|
565
448
|
readonly config: Config;
|
|
566
449
|
readonly executed: Array<Executer>;
|
|
@@ -573,10 +456,10 @@ declare class PluginManager {
|
|
|
573
456
|
extname,
|
|
574
457
|
pluginKey,
|
|
575
458
|
options
|
|
576
|
-
}: GetFileProps<TOptions>): File<{
|
|
459
|
+
}: GetFileProps<TOptions>): KubbFile.File<{
|
|
577
460
|
pluginKey: Plugin['key'];
|
|
578
461
|
}>;
|
|
579
|
-
resolvePath: <TOptions = object>(params: ResolvePathParams<TOptions>) => OptionalPath;
|
|
462
|
+
resolvePath: <TOptions = object>(params: ResolvePathParams<TOptions>) => KubbFile.OptionalPath;
|
|
580
463
|
resolveName: (params: ResolveNameParams) => string;
|
|
581
464
|
/**
|
|
582
465
|
* Instead of calling `pluginManager.events.on` you can use `pluginManager.on`. This one also has better types.
|
|
@@ -672,7 +555,170 @@ declare class PluginManager {
|
|
|
672
555
|
type FileMetaBase = {
|
|
673
556
|
pluginKey?: Plugin['key'];
|
|
674
557
|
};
|
|
675
|
-
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region ../plugin-oas/src/generators/createReactGenerator.d.ts
|
|
560
|
+
type ReactGenerator<TOptions extends PluginFactoryOptions> = {
|
|
561
|
+
name: string;
|
|
562
|
+
type: 'react';
|
|
563
|
+
Operations: (props: OperationsProps<TOptions>) => KubbNode;
|
|
564
|
+
Operation: (props: OperationProps<TOptions>) => KubbNode;
|
|
565
|
+
Schema: (props: SchemaProps$1<TOptions>) => KubbNode;
|
|
566
|
+
};
|
|
567
|
+
//#endregion
|
|
568
|
+
//#region ../plugin-oas/src/generators/types.d.ts
|
|
569
|
+
type OperationsProps<TOptions extends PluginFactoryOptions> = {
|
|
570
|
+
/**
|
|
571
|
+
* @deprecated
|
|
572
|
+
*/
|
|
573
|
+
instance: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
574
|
+
options: TOptions['resolvedOptions'];
|
|
575
|
+
operations: Array<Operation$1>;
|
|
576
|
+
};
|
|
577
|
+
type OperationProps<TOptions extends PluginFactoryOptions> = {
|
|
578
|
+
/**
|
|
579
|
+
* @deprecated
|
|
580
|
+
*/
|
|
581
|
+
instance: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
582
|
+
options: TOptions['resolvedOptions'];
|
|
583
|
+
operation: Operation$1;
|
|
584
|
+
};
|
|
585
|
+
type SchemaProps$1<TOptions extends PluginFactoryOptions> = {
|
|
586
|
+
instance: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
|
|
587
|
+
options: TOptions['resolvedOptions'];
|
|
588
|
+
schema: {
|
|
589
|
+
name: string;
|
|
590
|
+
tree: Array<Schema>;
|
|
591
|
+
value: SchemaObject$1;
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
type Generator<TOptions extends PluginFactoryOptions> = CoreGenerator<TOptions> | ReactGenerator<TOptions>;
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region ../plugin-oas/src/generators/createGenerator.d.ts
|
|
597
|
+
type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
598
|
+
name: string;
|
|
599
|
+
type: 'core';
|
|
600
|
+
operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
601
|
+
operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
602
|
+
schema: (props: SchemaProps$1<TOptions>) => Promise<KubbFile.File[]>;
|
|
603
|
+
};
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region ../plugin-oas/src/types.d.ts
|
|
606
|
+
type ResolvePathOptions = {
|
|
607
|
+
pluginKey?: Plugin['key'];
|
|
608
|
+
group?: {
|
|
609
|
+
tag?: string;
|
|
610
|
+
path?: string;
|
|
611
|
+
};
|
|
612
|
+
type?: ResolveNameParams['type'];
|
|
613
|
+
};
|
|
614
|
+
/**
|
|
615
|
+
* `propertyName` is the ref name + resolved with the nameResolver
|
|
616
|
+
* @example import { Pet } from './Pet'
|
|
617
|
+
*
|
|
618
|
+
* `originalName` is the original name used(in PascalCase), only used to remove duplicates
|
|
619
|
+
*
|
|
620
|
+
* `pluginKey` can be used to override the current plugin being used, handy when you want to import a type/schema out of another plugin
|
|
621
|
+
* @example import a type(plugin-ts) for a mock file(swagger-faker)
|
|
622
|
+
*/
|
|
623
|
+
type Ref = {
|
|
624
|
+
propertyName: string;
|
|
625
|
+
originalName: string;
|
|
626
|
+
path: KubbFile.OptionalPath;
|
|
627
|
+
pluginKey?: Plugin['key'];
|
|
628
|
+
};
|
|
629
|
+
type Refs = Record<string, Ref>;
|
|
630
|
+
type OperationSchema = {
|
|
631
|
+
/**
|
|
632
|
+
* Converted name, contains already `PathParams`, `QueryParams`, ...
|
|
633
|
+
*/
|
|
634
|
+
name: string;
|
|
635
|
+
schema: SchemaObject$1;
|
|
636
|
+
operation?: Operation$1;
|
|
637
|
+
/**
|
|
638
|
+
* OperationName in PascalCase, only being used in OperationGenerator
|
|
639
|
+
*/
|
|
640
|
+
operationName: string;
|
|
641
|
+
description?: string;
|
|
642
|
+
statusCode?: number;
|
|
643
|
+
keys?: string[];
|
|
644
|
+
keysToOmit?: string[];
|
|
645
|
+
withData?: boolean;
|
|
646
|
+
};
|
|
647
|
+
type OperationSchemas = {
|
|
648
|
+
pathParams?: OperationSchema & {
|
|
649
|
+
keysToOmit?: never;
|
|
650
|
+
};
|
|
651
|
+
queryParams?: OperationSchema & {
|
|
652
|
+
keysToOmit?: never;
|
|
653
|
+
};
|
|
654
|
+
headerParams?: OperationSchema & {
|
|
655
|
+
keysToOmit?: never;
|
|
656
|
+
};
|
|
657
|
+
request?: OperationSchema;
|
|
658
|
+
response: OperationSchema;
|
|
659
|
+
responses: Array<OperationSchema>;
|
|
660
|
+
statusCodes?: Array<OperationSchema>;
|
|
661
|
+
errors?: Array<OperationSchema>;
|
|
662
|
+
};
|
|
663
|
+
type ByTag = {
|
|
664
|
+
type: 'tag';
|
|
665
|
+
pattern: string | RegExp;
|
|
666
|
+
};
|
|
667
|
+
type ByOperationId = {
|
|
668
|
+
type: 'operationId';
|
|
669
|
+
pattern: string | RegExp;
|
|
670
|
+
};
|
|
671
|
+
type ByPath = {
|
|
672
|
+
type: 'path';
|
|
673
|
+
pattern: string | RegExp;
|
|
674
|
+
};
|
|
675
|
+
type ByMethod = {
|
|
676
|
+
type: 'method';
|
|
677
|
+
pattern: HttpMethod | RegExp;
|
|
678
|
+
};
|
|
679
|
+
type BySchemaName = {
|
|
680
|
+
type: 'schemaName';
|
|
681
|
+
pattern: string | RegExp;
|
|
682
|
+
};
|
|
683
|
+
type ByContentType = {
|
|
684
|
+
type: 'contentType';
|
|
685
|
+
pattern: string | RegExp;
|
|
686
|
+
};
|
|
687
|
+
type Exclude$1 = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
688
|
+
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
689
|
+
type Override<TOptions> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
690
|
+
options: Partial<TOptions>;
|
|
691
|
+
};
|
|
692
|
+
//#endregion
|
|
693
|
+
//#region ../plugin-oas/src/OperationGenerator.d.ts
|
|
694
|
+
type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
695
|
+
fabric: Fabric;
|
|
696
|
+
oas: Oas;
|
|
697
|
+
exclude: Array<Exclude$1> | undefined;
|
|
698
|
+
include: Array<Include> | undefined;
|
|
699
|
+
override: Array<Override<TOptions>> | undefined;
|
|
700
|
+
contentType: contentType | undefined;
|
|
701
|
+
pluginManager: PluginManager;
|
|
702
|
+
/**
|
|
703
|
+
* Current plugin
|
|
704
|
+
*/
|
|
705
|
+
plugin: Plugin<TPluginOptions>;
|
|
706
|
+
mode: KubbFile.Mode;
|
|
707
|
+
};
|
|
708
|
+
declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>> {
|
|
709
|
+
#private;
|
|
710
|
+
getSchemas(operation: Operation$1, {
|
|
711
|
+
resolveName
|
|
712
|
+
}?: {
|
|
713
|
+
resolveName?: (name: string) => string;
|
|
714
|
+
}): OperationSchemas;
|
|
715
|
+
getOperations(): Promise<Array<{
|
|
716
|
+
path: string;
|
|
717
|
+
method: HttpMethod;
|
|
718
|
+
operation: Operation$1;
|
|
719
|
+
}>>;
|
|
720
|
+
build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
721
|
+
}
|
|
676
722
|
//#endregion
|
|
677
723
|
//#region ../plugin-oas/src/SchemaMapper.d.ts
|
|
678
724
|
type SchemaKeywordMapper = {
|
|
@@ -787,7 +833,7 @@ type SchemaKeywordMapper = {
|
|
|
787
833
|
/**
|
|
788
834
|
* Full qualified path.
|
|
789
835
|
*/
|
|
790
|
-
path: OptionalPath;
|
|
836
|
+
path: KubbFile.OptionalPath;
|
|
791
837
|
/**
|
|
792
838
|
* When true `File.Import` will be used.
|
|
793
839
|
* When false a reference will be used inside the current file.
|
|
@@ -891,105 +937,18 @@ type Schema = {
|
|
|
891
937
|
keyword: string;
|
|
892
938
|
} | SchemaKeywordMapper[keyof SchemaKeywordMapper];
|
|
893
939
|
//#endregion
|
|
894
|
-
//#region ../plugin-oas/src/types.d.ts
|
|
895
|
-
type ResolvePathOptions = {
|
|
896
|
-
pluginKey?: Plugin['key'];
|
|
897
|
-
group?: {
|
|
898
|
-
tag?: string;
|
|
899
|
-
path?: string;
|
|
900
|
-
};
|
|
901
|
-
type?: ResolveNameParams['type'];
|
|
902
|
-
};
|
|
903
|
-
/**
|
|
904
|
-
* `propertyName` is the ref name + resolved with the nameResolver
|
|
905
|
-
* @example import { Pet } from './Pet'
|
|
906
|
-
*
|
|
907
|
-
* `originalName` is the original name used(in PascalCase), only used to remove duplicates
|
|
908
|
-
*
|
|
909
|
-
* `pluginKey` can be used to override the current plugin being used, handy when you want to import a type/schema out of another plugin
|
|
910
|
-
* @example import a type(plugin-ts) for a mock file(swagger-faker)
|
|
911
|
-
*/
|
|
912
|
-
type Ref = {
|
|
913
|
-
propertyName: string;
|
|
914
|
-
originalName: string;
|
|
915
|
-
path: OptionalPath;
|
|
916
|
-
pluginKey?: Plugin['key'];
|
|
917
|
-
};
|
|
918
|
-
type Refs = Record<string, Ref>;
|
|
919
|
-
type OperationSchema = {
|
|
920
|
-
/**
|
|
921
|
-
* Converted name, contains already `PathParams`, `QueryParams`, ...
|
|
922
|
-
*/
|
|
923
|
-
name: string;
|
|
924
|
-
schema: SchemaObject$1;
|
|
925
|
-
operation?: Operation$1;
|
|
926
|
-
/**
|
|
927
|
-
* OperationName in PascalCase, only being used in OperationGenerator
|
|
928
|
-
*/
|
|
929
|
-
operationName: string;
|
|
930
|
-
description?: string;
|
|
931
|
-
statusCode?: number;
|
|
932
|
-
keys?: string[];
|
|
933
|
-
keysToOmit?: string[];
|
|
934
|
-
withData?: boolean;
|
|
935
|
-
};
|
|
936
|
-
type OperationSchemas = {
|
|
937
|
-
pathParams?: OperationSchema & {
|
|
938
|
-
keysToOmit?: never;
|
|
939
|
-
};
|
|
940
|
-
queryParams?: OperationSchema & {
|
|
941
|
-
keysToOmit?: never;
|
|
942
|
-
};
|
|
943
|
-
headerParams?: OperationSchema & {
|
|
944
|
-
keysToOmit?: never;
|
|
945
|
-
};
|
|
946
|
-
request?: OperationSchema;
|
|
947
|
-
response: OperationSchema;
|
|
948
|
-
responses: Array<OperationSchema>;
|
|
949
|
-
statusCodes?: Array<OperationSchema>;
|
|
950
|
-
errors?: Array<OperationSchema>;
|
|
951
|
-
};
|
|
952
|
-
type ByTag = {
|
|
953
|
-
type: 'tag';
|
|
954
|
-
pattern: string | RegExp;
|
|
955
|
-
};
|
|
956
|
-
type ByOperationId = {
|
|
957
|
-
type: 'operationId';
|
|
958
|
-
pattern: string | RegExp;
|
|
959
|
-
};
|
|
960
|
-
type ByPath = {
|
|
961
|
-
type: 'path';
|
|
962
|
-
pattern: string | RegExp;
|
|
963
|
-
};
|
|
964
|
-
type ByMethod = {
|
|
965
|
-
type: 'method';
|
|
966
|
-
pattern: HttpMethod | RegExp;
|
|
967
|
-
};
|
|
968
|
-
type BySchemaName = {
|
|
969
|
-
type: 'schemaName';
|
|
970
|
-
pattern: string | RegExp;
|
|
971
|
-
};
|
|
972
|
-
type ByContentType = {
|
|
973
|
-
type: 'contentType';
|
|
974
|
-
pattern: string | RegExp;
|
|
975
|
-
};
|
|
976
|
-
type Exclude$1 = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
977
|
-
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType;
|
|
978
|
-
type Override<TOptions$1> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
979
|
-
options: Partial<TOptions$1>;
|
|
980
|
-
};
|
|
981
|
-
//#endregion
|
|
982
940
|
//#region ../plugin-oas/src/SchemaGenerator.d.ts
|
|
983
|
-
type Context
|
|
941
|
+
type Context<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
942
|
+
fabric: Fabric;
|
|
984
943
|
oas: Oas;
|
|
985
944
|
pluginManager: PluginManager;
|
|
986
945
|
/**
|
|
987
946
|
* Current plugin
|
|
988
947
|
*/
|
|
989
948
|
plugin: Plugin<TPluginOptions>;
|
|
990
|
-
mode: Mode;
|
|
949
|
+
mode: KubbFile.Mode;
|
|
991
950
|
include?: Array<'schemas' | 'responses' | 'requestBodies'>;
|
|
992
|
-
override: Array<Override<TOptions
|
|
951
|
+
override: Array<Override<TOptions>> | undefined;
|
|
993
952
|
contentType?: contentType;
|
|
994
953
|
output?: string;
|
|
995
954
|
};
|
|
@@ -1012,15 +971,15 @@ type SchemaGeneratorOptions = {
|
|
|
1012
971
|
* TODO TODO add docs
|
|
1013
972
|
* @beta
|
|
1014
973
|
*/
|
|
1015
|
-
schema?: (schemaProps: SchemaProps
|
|
974
|
+
schema?: (schemaProps: SchemaProps, defaultSchemas: Schema[]) => Schema[] | undefined;
|
|
1016
975
|
};
|
|
1017
976
|
};
|
|
1018
|
-
type SchemaProps
|
|
977
|
+
type SchemaProps = {
|
|
1019
978
|
schemaObject?: SchemaObject$1;
|
|
1020
979
|
name?: string;
|
|
1021
980
|
parentName?: string;
|
|
1022
981
|
};
|
|
1023
|
-
declare class SchemaGenerator<TOptions
|
|
982
|
+
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TOptions, Context<TOptions, TPluginOptions>> {
|
|
1024
983
|
#private;
|
|
1025
984
|
refs: Refs;
|
|
1026
985
|
/**
|
|
@@ -1028,71 +987,14 @@ declare class SchemaGenerator<TOptions$1 extends SchemaGeneratorOptions = Schema
|
|
|
1028
987
|
* Delegates to getBaseTypeFromSchema internally and
|
|
1029
988
|
* optionally adds a union with null.
|
|
1030
989
|
*/
|
|
1031
|
-
parse(props: SchemaProps
|
|
990
|
+
parse(props: SchemaProps): Schema[];
|
|
1032
991
|
deepSearch<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): Array<SchemaKeywordMapper[T]>;
|
|
1033
992
|
find<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
|
|
1034
993
|
static deepSearch<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): Array<SchemaKeywordMapper[T]>;
|
|
1035
994
|
static findInObject<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
|
|
1036
995
|
static find<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
|
|
1037
996
|
static combineObjects(tree: Schema[] | undefined): Schema[];
|
|
1038
|
-
build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<File<TFileMeta>>>;
|
|
1039
|
-
}
|
|
1040
|
-
//#endregion
|
|
1041
|
-
//#region ../plugin-oas/src/generator.d.ts
|
|
1042
|
-
type OperationsProps<TOptions$1 extends PluginFactoryOptions> = {
|
|
1043
|
-
instance: Omit<OperationGenerator<TOptions$1>, 'build'>;
|
|
1044
|
-
options: TOptions$1['resolvedOptions'];
|
|
1045
|
-
operations: Array<Operation$1>;
|
|
1046
|
-
};
|
|
1047
|
-
type OperationProps<TOptions$1 extends PluginFactoryOptions> = {
|
|
1048
|
-
instance: Omit<OperationGenerator<TOptions$1>, 'build'>;
|
|
1049
|
-
options: TOptions$1['resolvedOptions'];
|
|
1050
|
-
operation: Operation$1;
|
|
1051
|
-
};
|
|
1052
|
-
type SchemaProps<TOptions$1 extends PluginFactoryOptions> = {
|
|
1053
|
-
instance: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions$1>, 'build'>;
|
|
1054
|
-
options: TOptions$1['resolvedOptions'];
|
|
1055
|
-
schema: {
|
|
1056
|
-
name: string;
|
|
1057
|
-
tree: Array<Schema>;
|
|
1058
|
-
value: SchemaObject$1;
|
|
1059
|
-
};
|
|
1060
|
-
};
|
|
1061
|
-
type GeneratorOptions<TOptions$1 extends PluginFactoryOptions> = {
|
|
1062
|
-
name: string;
|
|
1063
|
-
operations?: (this: GeneratorOptions<TOptions$1>, props: OperationsProps<TOptions$1>) => Promise<File[]>;
|
|
1064
|
-
operation?: (this: GeneratorOptions<TOptions$1>, props: OperationProps<TOptions$1>) => Promise<File[]>;
|
|
1065
|
-
schema?: (this: GeneratorOptions<TOptions$1>, props: SchemaProps<TOptions$1>) => Promise<File[]>;
|
|
1066
|
-
};
|
|
1067
|
-
type Generator<TOptions$1 extends PluginFactoryOptions> = GeneratorOptions<TOptions$1>;
|
|
1068
|
-
//#endregion
|
|
1069
|
-
//#region ../plugin-oas/src/OperationGenerator.d.ts
|
|
1070
|
-
type Context<TOptions$1, TPluginOptions extends PluginFactoryOptions> = {
|
|
1071
|
-
oas: Oas;
|
|
1072
|
-
exclude: Array<Exclude$1> | undefined;
|
|
1073
|
-
include: Array<Include> | undefined;
|
|
1074
|
-
override: Array<Override<TOptions$1>> | undefined;
|
|
1075
|
-
contentType: contentType | undefined;
|
|
1076
|
-
pluginManager: PluginManager;
|
|
1077
|
-
/**
|
|
1078
|
-
* Current plugin
|
|
1079
|
-
*/
|
|
1080
|
-
plugin: Plugin<TPluginOptions>;
|
|
1081
|
-
mode: Mode;
|
|
1082
|
-
};
|
|
1083
|
-
declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> extends BaseGenerator<TPluginOptions['resolvedOptions'], Context<TPluginOptions['resolvedOptions'], TPluginOptions>> {
|
|
1084
|
-
#private;
|
|
1085
|
-
getSchemas(operation: Operation$1, {
|
|
1086
|
-
resolveName
|
|
1087
|
-
}?: {
|
|
1088
|
-
resolveName?: (name: string) => string;
|
|
1089
|
-
}): OperationSchemas;
|
|
1090
|
-
getOperations(): Promise<Array<{
|
|
1091
|
-
path: string;
|
|
1092
|
-
method: HttpMethod;
|
|
1093
|
-
operation: Operation$1;
|
|
1094
|
-
}>>;
|
|
1095
|
-
build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<File<TFileMeta>>>;
|
|
997
|
+
build(...generators: Array<Generator<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
1096
998
|
}
|
|
1097
999
|
//#endregion
|
|
1098
1000
|
//#region src/types.d.ts
|
|
@@ -1210,5 +1112,5 @@ type ResolvedOptions = {
|
|
|
1210
1112
|
};
|
|
1211
1113
|
type PluginClient = PluginFactoryOptions<'plugin-client', Options$1, ResolvedOptions, never, ResolvePathOptions>;
|
|
1212
1114
|
//#endregion
|
|
1213
|
-
export {
|
|
1214
|
-
//# sourceMappingURL=types-
|
|
1115
|
+
export { UserPluginWithLifeCycle as a, ReactGenerator as i, PluginClient as n, Operation$1 as o, OperationSchemas as r, Options$1 as t };
|
|
1116
|
+
//# sourceMappingURL=types-DuPfvza5.d.cts.map
|