@kubb/plugin-vue-query 5.0.0-alpha.17 → 5.0.0-alpha.19
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-CEWD5RwQ.cjs → components-CFNYA4ZV.cjs} +59 -9
- package/dist/components-CFNYA4ZV.cjs.map +1 -0
- package/dist/{components--op2hxIJ.js → components-FCfsweek.js} +59 -9
- package/dist/components-FCfsweek.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-2T4XTFFP.cjs → generators-BKHawo6j.cjs} +2 -2
- package/dist/{generators-2T4XTFFP.cjs.map → generators-BKHawo6j.cjs.map} +1 -1
- package/dist/{generators-B6cv10kw.js → generators-NIxXrJZp.js} +2 -2
- package/dist/{generators-B6cv10kw.js.map → generators-NIxXrJZp.js.map} +1 -1
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +5 -501
- 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-CgDFUvfZ.d.ts → types-C4UKYw84.d.ts} +3 -3
- package/package.json +11 -11
- package/dist/components--op2hxIJ.js.map +0 -1
- package/dist/components-CEWD5RwQ.cjs.map +0 -1
package/dist/generators.d.ts
CHANGED
|
@@ -1,511 +1,15 @@
|
|
|
1
1
|
import { t as __name } from "./chunk--u3MIqq1.js";
|
|
2
|
-
import { r as PluginVueQuery } 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 PluginVueQuery } from "./types-C4UKYw84.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/infiniteQueryGenerator.d.ts
|
|
502
|
-
declare const infiniteQueryGenerator: ReactGenerator<PluginVueQuery>;
|
|
6
|
+
declare const infiniteQueryGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginVueQuery>;
|
|
503
7
|
//#endregion
|
|
504
8
|
//#region src/generators/mutationGenerator.d.ts
|
|
505
|
-
declare const mutationGenerator: ReactGenerator<PluginVueQuery>;
|
|
9
|
+
declare const mutationGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginVueQuery>;
|
|
506
10
|
//#endregion
|
|
507
11
|
//#region src/generators/queryGenerator.d.ts
|
|
508
|
-
declare const queryGenerator: ReactGenerator<PluginVueQuery>;
|
|
12
|
+
declare const queryGenerator: _kubb_plugin_oas_generators0.ReactGenerator<PluginVueQuery>;
|
|
509
13
|
//#endregion
|
|
510
14
|
export { infiniteQueryGenerator, mutationGenerator, queryGenerator };
|
|
511
15
|
//# sourceMappingURL=generators.d.ts.map
|
package/dist/generators.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as mutationGenerator, r as infiniteQueryGenerator, t as queryGenerator } from "./generators-
|
|
1
|
+
import { n as mutationGenerator, r as infiniteQueryGenerator, t as queryGenerator } from "./generators-NIxXrJZp.js";
|
|
2
2
|
export { infiniteQueryGenerator, mutationGenerator, queryGenerator };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_components = require("./components-
|
|
3
|
-
const require_generators = require("./generators-
|
|
2
|
+
const require_components = require("./components-CFNYA4ZV.cjs");
|
|
3
|
+
const require_generators = require("./generators-BKHawo6j.cjs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_components.__toESM(node_path);
|
|
6
6
|
let _kubb_core = require("@kubb/core");
|
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 PluginVueQuery } from "./types-
|
|
2
|
+
import { n as Options, r as PluginVueQuery } from "./types-C4UKYw84.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 { c as camelCase, l as pascalCase, r as MutationKey, s as QueryKey } from "./components
|
|
3
|
-
import { n as mutationGenerator, r as infiniteQueryGenerator, t as queryGenerator } from "./generators-
|
|
2
|
+
import { c as camelCase, l as pascalCase, r as MutationKey, s as QueryKey } from "./components-FCfsweek.js";
|
|
3
|
+
import { n as mutationGenerator, r as infiniteQueryGenerator, t as queryGenerator } from "./generators-NIxXrJZp.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { createPlugin, getBarrelFiles, getMode } from "@kubb/core";
|
|
6
6
|
import { pluginClientName } from "@kubb/plugin-client";
|
|
@@ -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
|
|
7
|
+
import { Generator } 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
|
|
@@ -186,7 +186,7 @@ type Options = {
|
|
|
186
186
|
/**
|
|
187
187
|
* Define some generators next to the vue-query generators
|
|
188
188
|
*/
|
|
189
|
-
generators?: Array<Generator
|
|
189
|
+
generators?: Array<Generator<PluginVueQuery>>;
|
|
190
190
|
};
|
|
191
191
|
type ResolvedOptions = {
|
|
192
192
|
output: Output<Oas>;
|
|
@@ -208,4 +208,4 @@ type ResolvedOptions = {
|
|
|
208
208
|
type PluginVueQuery = PluginFactoryOptions<'plugin-vue-query', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
209
209
|
//#endregion
|
|
210
210
|
export { Transformer as a, MutationKey$1 as i, Options as n, PluginVueQuery as r, Infinite as t };
|
|
211
|
-
//# sourceMappingURL=types-
|
|
211
|
+
//# sourceMappingURL=types-C4UKYw84.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-vue-query",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.19",
|
|
4
4
|
"description": "Vue Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Vue.js applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue-query",
|
|
@@ -73,19 +73,19 @@
|
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@kubb/fabric-core": "0.
|
|
77
|
-
"@kubb/react-fabric": "0.
|
|
76
|
+
"@kubb/fabric-core": "0.15.1",
|
|
77
|
+
"@kubb/react-fabric": "0.15.1",
|
|
78
78
|
"remeda": "^2.33.6",
|
|
79
|
-
"@kubb/core": "5.0.0-alpha.
|
|
80
|
-
"@kubb/oas": "5.0.0-alpha.
|
|
81
|
-
"@kubb/plugin-client": "5.0.0-alpha.
|
|
82
|
-
"@kubb/plugin-
|
|
83
|
-
"@kubb/plugin-
|
|
84
|
-
"@kubb/plugin-zod": "5.0.0-alpha.
|
|
79
|
+
"@kubb/core": "5.0.0-alpha.19",
|
|
80
|
+
"@kubb/oas": "5.0.0-alpha.19",
|
|
81
|
+
"@kubb/plugin-client": "5.0.0-alpha.19",
|
|
82
|
+
"@kubb/plugin-oas": "5.0.0-alpha.19",
|
|
83
|
+
"@kubb/plugin-ts": "5.0.0-alpha.19",
|
|
84
|
+
"@kubb/plugin-zod": "5.0.0-alpha.19"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@kubb/fabric-core": "0.
|
|
88
|
-
"@kubb/react-fabric": "0.
|
|
87
|
+
"@kubb/fabric-core": "0.15.1",
|
|
88
|
+
"@kubb/react-fabric": "0.15.1"
|
|
89
89
|
},
|
|
90
90
|
"engines": {
|
|
91
91
|
"node": ">=22"
|