@kubb/plugin-client 5.0.0-alpha.16 → 5.0.0-alpha.18
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/{StaticClassClient-Azx6Ze4P.cjs → StaticClassClient-CIg20-rm.cjs} +64 -8
- package/dist/StaticClassClient-CIg20-rm.cjs.map +1 -0
- package/dist/{StaticClassClient-BFqabdAx.js → StaticClassClient-DsWHXZ_Z.js} +64 -8
- package/dist/StaticClassClient-DsWHXZ_Z.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/{generators-C7Uz42d2.js → generators-BoX8SMR4.js} +2 -2
- package/dist/{generators-C7Uz42d2.js.map → generators-BoX8SMR4.js.map} +1 -1
- package/dist/{generators-BE4MB_JK.cjs → generators-DFGNl_kh.cjs} +2 -2
- package/dist/{generators-BE4MB_JK.cjs.map → generators-DFGNl_kh.cjs.map} +1 -1
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +7 -503
- package/dist/generators.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{types-DBQdg-BV.d.ts → types-CdM4DK1M.d.ts} +3 -3
- package/package.json +10 -10
- package/dist/StaticClassClient-Azx6Ze4P.cjs.map +0 -1
- package/dist/StaticClassClient-BFqabdAx.js.map +0 -1
package/dist/generators.d.ts
CHANGED
|
@@ -1,517 +1,21 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { r as PluginClient } from "./types-
|
|
3
|
-
import
|
|
4
|
-
import { HttpMethod, Oas, Operation, SchemaObject, contentType } from "@kubb/oas";
|
|
5
|
-
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
6
|
-
import { Fabric, KubbFile } from "@kubb/fabric-core/types";
|
|
2
|
+
import { r as PluginClient } from "./types-CdM4DK1M.js";
|
|
3
|
+
import * as _kubb_plugin_oas_generators0 from "@kubb/plugin-oas/generators";
|
|
7
4
|
|
|
8
|
-
//#region ../../internals/utils/src/asyncEventEmitter.d.ts
|
|
9
|
-
/** A function that can be registered as an event listener, synchronous or async. */
|
|
10
|
-
type AsyncListener<TArgs extends unknown[]> = (...args: TArgs) => void | Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* A typed EventEmitter that awaits all async listeners before resolving.
|
|
13
|
-
* Wraps Node's `EventEmitter` with full TypeScript event-map inference.
|
|
14
|
-
*/
|
|
15
|
-
declare class AsyncEventEmitter<TEvents extends { [K in keyof TEvents]: unknown[] }> {
|
|
16
|
-
#private;
|
|
17
|
-
/**
|
|
18
|
-
* `maxListener` controls the maximum number of listeners per event before Node emits a memory-leak warning.
|
|
19
|
-
* @default 10
|
|
20
|
-
*/
|
|
21
|
-
constructor(maxListener?: number);
|
|
22
|
-
/**
|
|
23
|
-
* Emits an event and awaits all registered listeners in parallel.
|
|
24
|
-
* Throws if any listener rejects, wrapping the cause with the event name and serialized arguments.
|
|
25
|
-
*/
|
|
26
|
-
emit<TEventName extends keyof TEvents & string>(eventName: TEventName, ...eventArgs: TEvents[TEventName]): Promise<void>;
|
|
27
|
-
/** Registers a persistent listener for the given event. */
|
|
28
|
-
on<TEventName extends keyof TEvents & string>(eventName: TEventName, handler: AsyncListener<TEvents[TEventName]>): void;
|
|
29
|
-
/** Registers a one-shot listener that removes itself after the first invocation. */
|
|
30
|
-
onOnce<TEventName extends keyof TEvents & string>(eventName: TEventName, handler: AsyncListener<TEvents[TEventName]>): void;
|
|
31
|
-
/** Removes a previously registered listener. */
|
|
32
|
-
off<TEventName extends keyof TEvents & string>(eventName: TEventName, handler: AsyncListener<TEvents[TEventName]>): void;
|
|
33
|
-
/** Removes all listeners from every event channel. */
|
|
34
|
-
removeAll(): void;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region ../plugin-oas/src/types.d.ts
|
|
38
|
-
type GetOasOptions = {
|
|
39
|
-
validate?: boolean;
|
|
40
|
-
};
|
|
41
|
-
type Context$2 = {
|
|
42
|
-
getOas(options?: GetOasOptions): Promise<Oas>;
|
|
43
|
-
getBaseURL(): Promise<string | undefined>;
|
|
44
|
-
};
|
|
45
|
-
declare global {
|
|
46
|
-
namespace Kubb {
|
|
47
|
-
interface PluginContext extends Context$2 {}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* `propertyName` is the ref name + resolved with the nameResolver
|
|
52
|
-
* @example import { Pet } from './Pet'
|
|
53
|
-
*
|
|
54
|
-
* `originalName` is the original name used(in PascalCase), only used to remove duplicates
|
|
55
|
-
*
|
|
56
|
-
* `pluginName` can be used to override the current plugin being used, handy when you want to import a type/schema out of another plugin
|
|
57
|
-
* @example import a type(plugin-ts) for a mock file(swagger-faker)
|
|
58
|
-
*/
|
|
59
|
-
type Ref = {
|
|
60
|
-
propertyName: string;
|
|
61
|
-
originalName: string;
|
|
62
|
-
path: KubbFile.Path;
|
|
63
|
-
pluginName?: string;
|
|
64
|
-
};
|
|
65
|
-
type Refs = Record<string, Ref>;
|
|
66
|
-
type OperationSchema = {
|
|
67
|
-
/**
|
|
68
|
-
* Converted name, contains already `PathParams`, `QueryParams`, ...
|
|
69
|
-
*/
|
|
70
|
-
name: string;
|
|
71
|
-
schema: SchemaObject;
|
|
72
|
-
operation?: Operation;
|
|
73
|
-
/**
|
|
74
|
-
* OperationName in PascalCase, only being used in OperationGenerator
|
|
75
|
-
*/
|
|
76
|
-
operationName: string;
|
|
77
|
-
description?: string;
|
|
78
|
-
statusCode?: number;
|
|
79
|
-
keys?: string[];
|
|
80
|
-
keysToOmit?: string[];
|
|
81
|
-
withData?: boolean;
|
|
82
|
-
};
|
|
83
|
-
type OperationSchemas = {
|
|
84
|
-
pathParams?: OperationSchema & {
|
|
85
|
-
keysToOmit?: never;
|
|
86
|
-
};
|
|
87
|
-
queryParams?: OperationSchema & {
|
|
88
|
-
keysToOmit?: never;
|
|
89
|
-
};
|
|
90
|
-
headerParams?: OperationSchema & {
|
|
91
|
-
keysToOmit?: never;
|
|
92
|
-
};
|
|
93
|
-
request?: OperationSchema;
|
|
94
|
-
response: OperationSchema;
|
|
95
|
-
responses: Array<OperationSchema>;
|
|
96
|
-
statusCodes?: Array<OperationSchema>;
|
|
97
|
-
errors?: Array<OperationSchema>;
|
|
98
|
-
};
|
|
99
|
-
type ByTag = {
|
|
100
|
-
type: 'tag';
|
|
101
|
-
pattern: string | RegExp;
|
|
102
|
-
};
|
|
103
|
-
type ByOperationId = {
|
|
104
|
-
type: 'operationId';
|
|
105
|
-
pattern: string | RegExp;
|
|
106
|
-
};
|
|
107
|
-
type ByPath = {
|
|
108
|
-
type: 'path';
|
|
109
|
-
pattern: string | RegExp;
|
|
110
|
-
};
|
|
111
|
-
type ByMethod = {
|
|
112
|
-
type: 'method';
|
|
113
|
-
pattern: HttpMethod | RegExp;
|
|
114
|
-
};
|
|
115
|
-
type BySchemaName = {
|
|
116
|
-
type: 'schemaName';
|
|
117
|
-
pattern: string | RegExp;
|
|
118
|
-
};
|
|
119
|
-
type ByContentType = {
|
|
120
|
-
type: 'contentType';
|
|
121
|
-
pattern: string | RegExp;
|
|
122
|
-
};
|
|
123
|
-
type Exclude = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
124
|
-
type Include = ByTag | ByOperationId | ByPath | ByMethod | ByContentType | BySchemaName;
|
|
125
|
-
type Override<TOptions> = (ByTag | ByOperationId | ByPath | ByMethod | BySchemaName | ByContentType) & {
|
|
126
|
-
options: Partial<TOptions>;
|
|
127
|
-
};
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region ../plugin-oas/src/OperationGenerator.d.ts
|
|
130
|
-
type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
131
|
-
fabric: Fabric;
|
|
132
|
-
oas: Oas;
|
|
133
|
-
exclude: Array<Exclude> | undefined;
|
|
134
|
-
include: Array<Include> | undefined;
|
|
135
|
-
override: Array<Override<TOptions>> | undefined;
|
|
136
|
-
contentType: contentType | undefined;
|
|
137
|
-
driver: PluginDriver;
|
|
138
|
-
events?: AsyncEventEmitter<KubbEvents>;
|
|
139
|
-
/**
|
|
140
|
-
* Current plugin
|
|
141
|
-
*/
|
|
142
|
-
plugin: Plugin<TPluginOptions>;
|
|
143
|
-
mode: KubbFile.Mode;
|
|
144
|
-
UNSTABLE_NAMING?: true;
|
|
145
|
-
};
|
|
146
|
-
declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> {
|
|
147
|
-
#private;
|
|
148
|
-
constructor(options: TPluginOptions['resolvedOptions'], context: Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>);
|
|
149
|
-
get options(): TPluginOptions['resolvedOptions'];
|
|
150
|
-
set options(options: TPluginOptions['resolvedOptions']);
|
|
151
|
-
get context(): Context$1<TPluginOptions['resolvedOptions'], TPluginOptions>;
|
|
152
|
-
getOptions(operation: Operation, method: HttpMethod): Partial<TPluginOptions['resolvedOptions']>;
|
|
153
|
-
getSchemas(operation: Operation, {
|
|
154
|
-
resolveName
|
|
155
|
-
}?: {
|
|
156
|
-
resolveName?: (name: string) => string;
|
|
157
|
-
}): OperationSchemas;
|
|
158
|
-
getOperations(): Promise<Array<{
|
|
159
|
-
path: string;
|
|
160
|
-
method: HttpMethod;
|
|
161
|
-
operation: Operation;
|
|
162
|
-
}>>;
|
|
163
|
-
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
164
|
-
}
|
|
165
|
-
//#endregion
|
|
166
|
-
//#region ../plugin-oas/src/SchemaMapper.d.ts
|
|
167
|
-
type SchemaKeywordMapper = {
|
|
168
|
-
object: {
|
|
169
|
-
keyword: 'object';
|
|
170
|
-
args: {
|
|
171
|
-
properties: {
|
|
172
|
-
[x: string]: Schema[];
|
|
173
|
-
};
|
|
174
|
-
additionalProperties: Schema[];
|
|
175
|
-
patternProperties?: Record<string, Schema[]>;
|
|
176
|
-
strict?: boolean;
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
url: {
|
|
180
|
-
keyword: 'url';
|
|
181
|
-
};
|
|
182
|
-
readOnly: {
|
|
183
|
-
keyword: 'readOnly';
|
|
184
|
-
};
|
|
185
|
-
writeOnly: {
|
|
186
|
-
keyword: 'writeOnly';
|
|
187
|
-
};
|
|
188
|
-
uuid: {
|
|
189
|
-
keyword: 'uuid';
|
|
190
|
-
};
|
|
191
|
-
email: {
|
|
192
|
-
keyword: 'email';
|
|
193
|
-
};
|
|
194
|
-
firstName: {
|
|
195
|
-
keyword: 'firstName';
|
|
196
|
-
};
|
|
197
|
-
lastName: {
|
|
198
|
-
keyword: 'lastName';
|
|
199
|
-
};
|
|
200
|
-
phone: {
|
|
201
|
-
keyword: 'phone';
|
|
202
|
-
};
|
|
203
|
-
password: {
|
|
204
|
-
keyword: 'password';
|
|
205
|
-
};
|
|
206
|
-
date: {
|
|
207
|
-
keyword: 'date';
|
|
208
|
-
args: {
|
|
209
|
-
type?: 'date' | 'string';
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
time: {
|
|
213
|
-
keyword: 'time';
|
|
214
|
-
args: {
|
|
215
|
-
type?: 'date' | 'string';
|
|
216
|
-
};
|
|
217
|
-
};
|
|
218
|
-
datetime: {
|
|
219
|
-
keyword: 'datetime';
|
|
220
|
-
args: {
|
|
221
|
-
offset?: boolean;
|
|
222
|
-
local?: boolean;
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
tuple: {
|
|
226
|
-
keyword: 'tuple';
|
|
227
|
-
args: {
|
|
228
|
-
items: Schema[];
|
|
229
|
-
min?: number;
|
|
230
|
-
max?: number;
|
|
231
|
-
rest?: Schema;
|
|
232
|
-
};
|
|
233
|
-
};
|
|
234
|
-
array: {
|
|
235
|
-
keyword: 'array';
|
|
236
|
-
args: {
|
|
237
|
-
items: Schema[];
|
|
238
|
-
min?: number;
|
|
239
|
-
max?: number;
|
|
240
|
-
unique?: boolean;
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
enum: {
|
|
244
|
-
keyword: 'enum';
|
|
245
|
-
args: {
|
|
246
|
-
name: string;
|
|
247
|
-
typeName: string;
|
|
248
|
-
asConst: boolean;
|
|
249
|
-
items: Array<{
|
|
250
|
-
name: string | number;
|
|
251
|
-
format: 'string' | 'number' | 'boolean';
|
|
252
|
-
value?: string | number | boolean;
|
|
253
|
-
}>;
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
and: {
|
|
257
|
-
keyword: 'and';
|
|
258
|
-
args: Schema[];
|
|
259
|
-
};
|
|
260
|
-
const: {
|
|
261
|
-
keyword: 'const';
|
|
262
|
-
args: {
|
|
263
|
-
name: string | number;
|
|
264
|
-
format: 'string' | 'number' | 'boolean';
|
|
265
|
-
value?: string | number | boolean;
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
union: {
|
|
269
|
-
keyword: 'union';
|
|
270
|
-
args: Schema[];
|
|
271
|
-
};
|
|
272
|
-
ref: {
|
|
273
|
-
keyword: 'ref';
|
|
274
|
-
args: {
|
|
275
|
-
name: string;
|
|
276
|
-
$ref: string;
|
|
277
|
-
/**
|
|
278
|
-
* Full qualified path.
|
|
279
|
-
*/
|
|
280
|
-
path: KubbFile.Path;
|
|
281
|
-
/**
|
|
282
|
-
* When true `File.Import` is used.
|
|
283
|
-
* When false a reference is used inside the current file.
|
|
284
|
-
*/
|
|
285
|
-
isImportable: boolean;
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
matches: {
|
|
289
|
-
keyword: 'matches';
|
|
290
|
-
args?: string;
|
|
291
|
-
};
|
|
292
|
-
boolean: {
|
|
293
|
-
keyword: 'boolean';
|
|
294
|
-
};
|
|
295
|
-
default: {
|
|
296
|
-
keyword: 'default';
|
|
297
|
-
args: string | number | boolean;
|
|
298
|
-
};
|
|
299
|
-
string: {
|
|
300
|
-
keyword: 'string';
|
|
301
|
-
};
|
|
302
|
-
integer: {
|
|
303
|
-
keyword: 'integer';
|
|
304
|
-
};
|
|
305
|
-
bigint: {
|
|
306
|
-
keyword: 'bigint';
|
|
307
|
-
};
|
|
308
|
-
number: {
|
|
309
|
-
keyword: 'number';
|
|
310
|
-
};
|
|
311
|
-
max: {
|
|
312
|
-
keyword: 'max';
|
|
313
|
-
args: number;
|
|
314
|
-
};
|
|
315
|
-
min: {
|
|
316
|
-
keyword: 'min';
|
|
317
|
-
args: number;
|
|
318
|
-
};
|
|
319
|
-
exclusiveMaximum: {
|
|
320
|
-
keyword: 'exclusiveMaximum';
|
|
321
|
-
args: number;
|
|
322
|
-
};
|
|
323
|
-
exclusiveMinimum: {
|
|
324
|
-
keyword: 'exclusiveMinimum';
|
|
325
|
-
args: number;
|
|
326
|
-
};
|
|
327
|
-
describe: {
|
|
328
|
-
keyword: 'describe';
|
|
329
|
-
args: string;
|
|
330
|
-
};
|
|
331
|
-
example: {
|
|
332
|
-
keyword: 'example';
|
|
333
|
-
args: string;
|
|
334
|
-
};
|
|
335
|
-
deprecated: {
|
|
336
|
-
keyword: 'deprecated';
|
|
337
|
-
};
|
|
338
|
-
optional: {
|
|
339
|
-
keyword: 'optional';
|
|
340
|
-
};
|
|
341
|
-
undefined: {
|
|
342
|
-
keyword: 'undefined';
|
|
343
|
-
};
|
|
344
|
-
nullish: {
|
|
345
|
-
keyword: 'nullish';
|
|
346
|
-
};
|
|
347
|
-
nullable: {
|
|
348
|
-
keyword: 'nullable';
|
|
349
|
-
};
|
|
350
|
-
null: {
|
|
351
|
-
keyword: 'null';
|
|
352
|
-
};
|
|
353
|
-
any: {
|
|
354
|
-
keyword: 'any';
|
|
355
|
-
};
|
|
356
|
-
unknown: {
|
|
357
|
-
keyword: 'unknown';
|
|
358
|
-
};
|
|
359
|
-
void: {
|
|
360
|
-
keyword: 'void';
|
|
361
|
-
};
|
|
362
|
-
blob: {
|
|
363
|
-
keyword: 'blob';
|
|
364
|
-
};
|
|
365
|
-
schema: {
|
|
366
|
-
keyword: 'schema';
|
|
367
|
-
args: {
|
|
368
|
-
type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
|
|
369
|
-
format?: string;
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
name: {
|
|
373
|
-
keyword: 'name';
|
|
374
|
-
args: string;
|
|
375
|
-
};
|
|
376
|
-
catchall: {
|
|
377
|
-
keyword: 'catchall';
|
|
378
|
-
};
|
|
379
|
-
interface: {
|
|
380
|
-
keyword: 'interface';
|
|
381
|
-
};
|
|
382
|
-
};
|
|
383
|
-
type Schema = {
|
|
384
|
-
keyword: string;
|
|
385
|
-
} | SchemaKeywordMapper[keyof SchemaKeywordMapper];
|
|
386
|
-
//#endregion
|
|
387
|
-
//#region ../plugin-oas/src/SchemaGenerator.d.ts
|
|
388
|
-
type Context<TOptions, TPluginOptions extends PluginFactoryOptions> = {
|
|
389
|
-
fabric: Fabric;
|
|
390
|
-
oas: Oas;
|
|
391
|
-
driver: PluginDriver;
|
|
392
|
-
events?: AsyncEventEmitter<KubbEvents>;
|
|
393
|
-
/**
|
|
394
|
-
* Current plugin
|
|
395
|
-
*/
|
|
396
|
-
plugin: Plugin<TPluginOptions>;
|
|
397
|
-
mode: KubbFile.Mode;
|
|
398
|
-
include?: Array<'schemas' | 'responses' | 'requestBodies'>;
|
|
399
|
-
override: Array<Override<TOptions>> | undefined;
|
|
400
|
-
contentType?: contentType;
|
|
401
|
-
output?: string;
|
|
402
|
-
};
|
|
403
|
-
type SchemaGeneratorOptions = {
|
|
404
|
-
dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
|
|
405
|
-
integerType?: 'number' | 'bigint';
|
|
406
|
-
unknownType: 'any' | 'unknown' | 'void';
|
|
407
|
-
emptySchemaType: 'any' | 'unknown' | 'void';
|
|
408
|
-
enumType?: 'enum' | 'asConst' | 'asPascalConst' | 'constEnum' | 'literal' | 'inlineLiteral';
|
|
409
|
-
enumSuffix?: string;
|
|
410
|
-
/**
|
|
411
|
-
* @deprecated Will be removed in v5. Use `collisionDetection: true` instead to prevent enum name collisions.
|
|
412
|
-
* When `collisionDetection` is enabled, the rootName-based approach eliminates the need for numeric suffixes.
|
|
413
|
-
* @internal
|
|
414
|
-
*/
|
|
415
|
-
usedEnumNames?: Record<string, number>;
|
|
416
|
-
mapper?: Record<string, string>;
|
|
417
|
-
typed?: boolean;
|
|
418
|
-
transformers: {
|
|
419
|
-
/**
|
|
420
|
-
* Customize the names based on the type that is provided by the plugin.
|
|
421
|
-
*/
|
|
422
|
-
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
423
|
-
/**
|
|
424
|
-
* Receive schema and name(propertyName) and return Schema array.
|
|
425
|
-
* Return `undefined` to fall through to default schema generation.
|
|
426
|
-
* @beta
|
|
427
|
-
*/
|
|
428
|
-
schema?: (schemaProps: SchemaProps$1, defaultSchemas: Schema[]) => Array<Schema> | undefined;
|
|
429
|
-
};
|
|
430
|
-
};
|
|
431
|
-
type SchemaProps$1 = {
|
|
432
|
-
schema: SchemaObject | null;
|
|
433
|
-
name: string | null;
|
|
434
|
-
parentName: string | null;
|
|
435
|
-
rootName?: string | null;
|
|
436
|
-
};
|
|
437
|
-
declare class SchemaGenerator<TOptions extends SchemaGeneratorOptions = SchemaGeneratorOptions, TPluginOptions extends PluginFactoryOptions = PluginFactoryOptions, TFileMeta extends FileMetaBase = FileMetaBase> {
|
|
438
|
-
#private;
|
|
439
|
-
constructor(options: TOptions, context: Context<TOptions, TPluginOptions>);
|
|
440
|
-
get options(): TOptions;
|
|
441
|
-
set options(options: TOptions);
|
|
442
|
-
get context(): Context<TOptions, TPluginOptions>;
|
|
443
|
-
refs: Refs;
|
|
444
|
-
/**
|
|
445
|
-
* Creates a type node from a given schema.
|
|
446
|
-
* Delegates to getBaseTypeFromSchema internally and
|
|
447
|
-
* optionally adds a union with null.
|
|
448
|
-
*/
|
|
449
|
-
parse(props: SchemaProps$1): Schema[];
|
|
450
|
-
static deepSearch<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): Array<SchemaKeywordMapper[T]>;
|
|
451
|
-
static find<T extends keyof SchemaKeywordMapper>(tree: Schema[] | undefined, keyword: T): SchemaKeywordMapper[T] | undefined;
|
|
452
|
-
static combineObjects(tree: Schema[] | undefined): Schema[];
|
|
453
|
-
build(...generators: Array<Generator$1<TPluginOptions>>): Promise<Array<KubbFile.File<TFileMeta>>>;
|
|
454
|
-
}
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region ../plugin-oas/src/generators/createGenerator.d.ts
|
|
457
|
-
type CoreGenerator<TOptions extends PluginFactoryOptions> = {
|
|
458
|
-
name: string;
|
|
459
|
-
type: 'core';
|
|
460
|
-
version: '1';
|
|
461
|
-
operations: (props: OperationsProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
462
|
-
operation: (props: OperationProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
463
|
-
schema: (props: SchemaProps<TOptions>) => Promise<KubbFile.File[]>;
|
|
464
|
-
};
|
|
465
|
-
//#endregion
|
|
466
|
-
//#region ../plugin-oas/src/generators/types.d.ts
|
|
467
|
-
type OperationsProps<TOptions extends PluginFactoryOptions> = {
|
|
468
|
-
config: Config;
|
|
469
|
-
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
470
|
-
plugin: Plugin<TOptions>;
|
|
471
|
-
operations: Array<Operation>;
|
|
472
|
-
};
|
|
473
|
-
type OperationProps<TOptions extends PluginFactoryOptions> = {
|
|
474
|
-
config: Config;
|
|
475
|
-
generator: Omit<OperationGenerator<TOptions>, 'build'>;
|
|
476
|
-
plugin: Plugin<TOptions>;
|
|
477
|
-
operation: Operation;
|
|
478
|
-
};
|
|
479
|
-
type SchemaProps<TOptions extends PluginFactoryOptions> = {
|
|
480
|
-
config: Config;
|
|
481
|
-
generator: Omit<SchemaGenerator<SchemaGeneratorOptions, TOptions>, 'build'>;
|
|
482
|
-
plugin: Plugin<TOptions>;
|
|
483
|
-
schema: {
|
|
484
|
-
name: string;
|
|
485
|
-
tree: Array<Schema>;
|
|
486
|
-
value: SchemaObject;
|
|
487
|
-
};
|
|
488
|
-
};
|
|
489
|
-
type Generator$1<TOptions extends PluginFactoryOptions> = CoreGenerator<TOptions> | ReactGenerator<TOptions> | Generator<TOptions>;
|
|
490
|
-
//#endregion
|
|
491
|
-
//#region ../plugin-oas/src/generators/createReactGenerator.d.ts
|
|
492
|
-
type ReactGenerator<TOptions extends PluginFactoryOptions> = {
|
|
493
|
-
name: string;
|
|
494
|
-
type: 'react';
|
|
495
|
-
version: '1';
|
|
496
|
-
Operations: (props: OperationsProps<TOptions>) => FabricReactNode;
|
|
497
|
-
Operation: (props: OperationProps<TOptions>) => FabricReactNode;
|
|
498
|
-
Schema: (props: SchemaProps<TOptions>) => FabricReactNode;
|
|
499
|
-
};
|
|
500
|
-
//#endregion
|
|
501
5
|
//#region src/generators/classClientGenerator.d.ts
|
|
502
|
-
declare const classClientGenerator: ReactGenerator<PluginClient>;
|
|
6
|
+
declare const classClientGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginClient>;
|
|
503
7
|
//#endregion
|
|
504
8
|
//#region src/generators/clientGenerator.d.ts
|
|
505
|
-
declare const clientGenerator: ReactGenerator<PluginClient>;
|
|
9
|
+
declare const clientGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginClient>;
|
|
506
10
|
//#endregion
|
|
507
11
|
//#region src/generators/groupedClientGenerator.d.ts
|
|
508
|
-
declare const groupedClientGenerator: ReactGenerator<PluginClient>;
|
|
12
|
+
declare const groupedClientGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginClient>;
|
|
509
13
|
//#endregion
|
|
510
14
|
//#region src/generators/operationsGenerator.d.ts
|
|
511
|
-
declare const operationsGenerator: ReactGenerator<PluginClient>;
|
|
15
|
+
declare const operationsGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginClient>;
|
|
512
16
|
//#endregion
|
|
513
17
|
//#region src/generators/staticClassClientGenerator.d.ts
|
|
514
|
-
declare const staticClassClientGenerator: ReactGenerator<PluginClient>;
|
|
18
|
+
declare const staticClassClientGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginClient>;
|
|
515
19
|
//#endregion
|
|
516
20
|
export { classClientGenerator, clientGenerator, groupedClientGenerator, operationsGenerator, staticClassClientGenerator };
|
|
517
21
|
//# sourceMappingURL=generators.d.ts.map
|
package/dist/generators.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-
|
|
1
|
+
import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-BoX8SMR4.js";
|
|
2
2
|
export { classClientGenerator, clientGenerator, groupedClientGenerator, operationsGenerator, staticClassClientGenerator };
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-ByKO4r7w.cjs");
|
|
3
|
-
const require_StaticClassClient = require("./StaticClassClient-
|
|
4
|
-
const require_generators = require("./generators-
|
|
3
|
+
const require_StaticClassClient = require("./StaticClassClient-CIg20-rm.cjs");
|
|
4
|
+
const require_generators = require("./generators-DFGNl_kh.cjs");
|
|
5
5
|
const require_templates_clients_axios_source = require("./templates/clients/axios.source.cjs");
|
|
6
6
|
const require_templates_clients_fetch_source = require("./templates/clients/fetch.source.cjs");
|
|
7
7
|
const require_templates_config_source = require("./templates/config.source.cjs");
|
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-CdM4DK1M.js";
|
|
3
3
|
import * as _kubb_core0 from "@kubb/core";
|
|
4
4
|
|
|
5
5
|
//#region src/plugin.d.ts
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./chunk--u3MIqq1.js";
|
|
2
|
-
import { o as camelCase } from "./StaticClassClient-
|
|
3
|
-
import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-
|
|
2
|
+
import { o as camelCase } from "./StaticClassClient-DsWHXZ_Z.js";
|
|
3
|
+
import { a as classClientGenerator, i as clientGenerator, n as operationsGenerator, r as groupedClientGenerator, t as staticClassClientGenerator } from "./generators-BoX8SMR4.js";
|
|
4
4
|
import { source } from "./templates/clients/axios.source.js";
|
|
5
5
|
import { source as source$1 } from "./templates/clients/fetch.source.js";
|
|
6
6
|
import { source as source$2 } from "./templates/config.source.js";
|
|
@@ -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
|
|
4
|
+
import { Generator } 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
|
|
148
|
+
generators?: Array<Generator<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-CdM4DK1M.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.18",
|
|
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.15.1",
|
|
112
|
+
"@kubb/react-fabric": "0.15.1",
|
|
113
|
+
"@kubb/core": "5.0.0-alpha.18",
|
|
114
|
+
"@kubb/oas": "5.0.0-alpha.18",
|
|
115
|
+
"@kubb/plugin-oas": "5.0.0-alpha.18",
|
|
116
|
+
"@kubb/plugin-ts": "5.0.0-alpha.18",
|
|
117
|
+
"@kubb/plugin-zod": "5.0.0-alpha.18"
|
|
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.15.1",
|
|
125
|
+
"@kubb/react-fabric": "0.15.1",
|
|
126
126
|
"axios": "^1.7.2"
|
|
127
127
|
},
|
|
128
128
|
"peerDependenciesMeta": {
|