@kubb/plugin-oas 3.16.2 → 3.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/Oas-CuqAnIw-.js +60 -0
  2. package/dist/Oas-CuqAnIw-.js.map +1 -0
  3. package/dist/Oas-Cv_pyXRM.cjs +78 -0
  4. package/dist/Oas-Cv_pyXRM.cjs.map +1 -0
  5. package/dist/OperationGenerator-CgbXErhW.d.cts +900 -0
  6. package/dist/OperationGenerator-OtLcGk2y.d.ts +900 -0
  7. package/dist/Schema-DJshqHto.d.cts +38 -0
  8. package/dist/Schema-DOXGUW1m.d.ts +38 -0
  9. package/dist/SchemaGenerator-8205BXCp.cjs +942 -0
  10. package/dist/SchemaGenerator-8205BXCp.cjs.map +1 -0
  11. package/dist/SchemaGenerator-B8Io6kky.js +930 -0
  12. package/dist/SchemaGenerator-B8Io6kky.js.map +1 -0
  13. package/dist/SchemaMapper-BaZQKrQB.js +54 -0
  14. package/dist/SchemaMapper-BaZQKrQB.js.map +1 -0
  15. package/dist/SchemaMapper-BiagBQN4.d.cts +388 -0
  16. package/dist/SchemaMapper-C2J2d3o4.d.ts +388 -0
  17. package/dist/SchemaMapper-D8J0V9Pj.cjs +66 -0
  18. package/dist/SchemaMapper-D8J0V9Pj.cjs.map +1 -0
  19. package/dist/chunk-CUT6urMc.cjs +30 -0
  20. package/dist/components.cjs +4 -19
  21. package/dist/components.d.cts +42 -35
  22. package/dist/components.d.ts +42 -35
  23. package/dist/components.js +3 -3
  24. package/dist/generators-BhLMlRNk.js +137 -0
  25. package/dist/generators-BhLMlRNk.js.map +1 -0
  26. package/dist/generators-DLH2kvlh.cjs +155 -0
  27. package/dist/generators-DLH2kvlh.cjs.map +1 -0
  28. package/dist/generators.cjs +4 -13
  29. package/dist/generators.d.cts +5 -7
  30. package/dist/generators.d.ts +5 -7
  31. package/dist/generators.js +5 -5
  32. package/dist/getFooter-BChY2kC1.cjs +43 -0
  33. package/dist/getFooter-BChY2kC1.cjs.map +1 -0
  34. package/dist/getFooter-T7_pZ6f8.js +31 -0
  35. package/dist/getFooter-T7_pZ6f8.js.map +1 -0
  36. package/dist/getSchemas-D8mP129c.cjs +67 -0
  37. package/dist/getSchemas-D8mP129c.cjs.map +1 -0
  38. package/dist/getSchemas-WoSBIxG8.js +55 -0
  39. package/dist/getSchemas-WoSBIxG8.js.map +1 -0
  40. package/dist/hooks.cjs +213 -195
  41. package/dist/hooks.cjs.map +1 -1
  42. package/dist/hooks.d.cts +91 -86
  43. package/dist/hooks.d.ts +91 -86
  44. package/dist/hooks.js +212 -193
  45. package/dist/hooks.js.map +1 -1
  46. package/dist/index.cjs +280 -342
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.cts +7 -10
  49. package/dist/index.d.ts +7 -10
  50. package/dist/index.js +274 -318
  51. package/dist/index.js.map +1 -1
  52. package/dist/mocks.cjs +802 -737
  53. package/dist/mocks.cjs.map +1 -1
  54. package/dist/mocks.d.cts +12 -11
  55. package/dist/mocks.d.ts +12 -11
  56. package/dist/mocks.js +802 -735
  57. package/dist/mocks.js.map +1 -1
  58. package/dist/parseFromConfig-CMNGsef2.cjs +33 -0
  59. package/dist/parseFromConfig-CMNGsef2.cjs.map +1 -0
  60. package/dist/parseFromConfig-yAiFK03V.js +27 -0
  61. package/dist/parseFromConfig-yAiFK03V.js.map +1 -0
  62. package/dist/utils.cjs +58 -74
  63. package/dist/utils.cjs.map +1 -1
  64. package/dist/utils.d.cts +96 -42
  65. package/dist/utils.d.ts +96 -42
  66. package/dist/utils.js +47 -46
  67. package/dist/utils.js.map +1 -1
  68. package/package.json +26 -34
  69. package/src/components/Operation.tsx +1 -2
  70. package/src/mocks/schemas.ts +39 -0
  71. package/src/utils/getBanner.ts +5 -5
  72. package/src/utils/getFooter.ts +4 -4
  73. package/dist/OperationGenerator-C7NPZtOM.d.ts +0 -288
  74. package/dist/OperationGenerator-DJE2XQ83.d.cts +0 -288
  75. package/dist/Schema-AjebpeVY.d.ts +0 -32
  76. package/dist/Schema-M6983FL1.d.cts +0 -32
  77. package/dist/SchemaMapper-B21ZmWag.d.cts +0 -275
  78. package/dist/SchemaMapper-B21ZmWag.d.ts +0 -275
  79. package/dist/chunk-6S7YFY6F.js +0 -33
  80. package/dist/chunk-6S7YFY6F.js.map +0 -1
  81. package/dist/chunk-76E35IZ2.js +0 -56
  82. package/dist/chunk-76E35IZ2.js.map +0 -1
  83. package/dist/chunk-7RFNM43R.cjs +0 -41
  84. package/dist/chunk-7RFNM43R.cjs.map +0 -1
  85. package/dist/chunk-DTD4ZUDA.cjs +0 -36
  86. package/dist/chunk-DTD4ZUDA.cjs.map +0 -1
  87. package/dist/chunk-G3FDK7YW.js +0 -35
  88. package/dist/chunk-G3FDK7YW.js.map +0 -1
  89. package/dist/chunk-JNN4JPWK.js +0 -28
  90. package/dist/chunk-JNN4JPWK.js.map +0 -1
  91. package/dist/chunk-MBX66JAT.js +0 -93
  92. package/dist/chunk-MBX66JAT.js.map +0 -1
  93. package/dist/chunk-NC5PWNEF.js +0 -866
  94. package/dist/chunk-NC5PWNEF.js.map +0 -1
  95. package/dist/chunk-PORSNYI5.js +0 -47
  96. package/dist/chunk-PORSNYI5.js.map +0 -1
  97. package/dist/chunk-QJMOOF2A.cjs +0 -97
  98. package/dist/chunk-QJMOOF2A.cjs.map +0 -1
  99. package/dist/chunk-RKHCI3WI.cjs +0 -1002
  100. package/dist/chunk-RKHCI3WI.cjs.map +0 -1
  101. package/dist/chunk-YWMMI3MO.cjs +0 -59
  102. package/dist/chunk-YWMMI3MO.cjs.map +0 -1
  103. package/dist/chunk-Z2NREI4X.cjs +0 -32
  104. package/dist/chunk-Z2NREI4X.cjs.map +0 -1
  105. package/dist/chunk-ZVFL3NXX.cjs +0 -50
  106. package/dist/chunk-ZVFL3NXX.cjs.map +0 -1
  107. package/dist/components.cjs.map +0 -1
  108. package/dist/components.js.map +0 -1
  109. package/dist/generators.cjs.map +0 -1
  110. package/dist/generators.js.map +0 -1
@@ -0,0 +1,388 @@
1
+ //#region ../core/src/fs/types.d.ts
2
+ type BasePath<T extends string = string> = `${T}/`;
3
+ type Import = {
4
+ /**
5
+ * Import name to be used
6
+ * @example ["useState"]
7
+ * @example "React"
8
+ */
9
+ name: string | Array<string | {
10
+ propertyName: string;
11
+ name?: string;
12
+ }>;
13
+ /**
14
+ * Path for the import
15
+ * @example '@kubb/core'
16
+ */
17
+ path: string;
18
+ /**
19
+ * Add `type` prefix to the import, this will result in: `import type { Type } from './path'`.
20
+ */
21
+ isTypeOnly?: boolean;
22
+ isNameSpace?: boolean;
23
+ /**
24
+ * When root is set it will get the path with relative getRelativePath(root, path).
25
+ */
26
+ root?: string;
27
+ };
28
+ type Source = {
29
+ name?: string;
30
+ value?: string;
31
+ isTypeOnly?: boolean;
32
+ /**
33
+ * Has const or type 'export'
34
+ * @default false
35
+ */
36
+ isExportable?: boolean;
37
+ /**
38
+ * When set, barrel generation will add this
39
+ * @default false
40
+ */
41
+ isIndexable?: boolean;
42
+ };
43
+ type Export = {
44
+ /**
45
+ * Export name to be used.
46
+ * @example ["useState"]
47
+ * @example "React"
48
+ */
49
+ name?: string | Array<string>;
50
+ /**
51
+ * Path for the import.
52
+ * @example '@kubb/core'
53
+ */
54
+ path: string;
55
+ /**
56
+ * Add `type` prefix to the export, this will result in: `export type { Type } from './path'`.
57
+ */
58
+ isTypeOnly?: boolean;
59
+ /**
60
+ * Make it possible to override the name, this will result in: `export * as aliasName from './path'`.
61
+ */
62
+ asAlias?: boolean;
63
+ };
64
+ type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`;
65
+ type Mode = 'single' | 'split';
66
+ /**
67
+ * Name to be used to dynamicly create the baseName(based on input.path)
68
+ * Based on UNIX basename
69
+ * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
70
+ */
71
+ type BaseName = `${string}.${string}`;
72
+ /**
73
+ * Path will be full qualified path to a specified file
74
+ */
75
+ type Path = string;
76
+ type AdvancedPath<T extends BaseName = BaseName> = `${BasePath}${T}`;
77
+ type OptionalPath = Path | undefined | null;
78
+ type File<TMeta extends object = object> = {
79
+ /**
80
+ * Name to be used to create the path
81
+ * Based on UNIX basename, `${name}.extname`
82
+ * @link https://nodejs.org/api/path.html#pathbasenamepath-suffix
83
+ */
84
+ baseName: BaseName;
85
+ /**
86
+ * Path will be full qualified path to a specified file
87
+ */
88
+ path: AdvancedPath<BaseName> | Path;
89
+ sources: Array<Source>;
90
+ imports?: Array<Import>;
91
+ exports?: Array<Export>;
92
+ /**
93
+ * Use extra meta, this is getting used to generate the barrel/index files.
94
+ */
95
+ meta?: TMeta;
96
+ banner?: string;
97
+ footer?: string;
98
+ };
99
+ type ResolvedImport = Import;
100
+ type ResolvedExport = Export;
101
+ type ResolvedFile<TMeta extends object = object> = File<TMeta> & {
102
+ /**
103
+ * @default object-hash
104
+ */
105
+ id: string;
106
+ /**
107
+ * Contains the first part of the baseName, generated based on baseName
108
+ * @link https://nodejs.org/api/path.html#pathformatpathobject
109
+ */
110
+ name: string;
111
+ extname: Extname;
112
+ imports: Array<ResolvedImport>;
113
+ exports: Array<ResolvedExport>;
114
+ };
115
+ //#endregion
116
+ //#region src/SchemaMapper.d.ts
117
+ type SchemaKeywordMapper = {
118
+ object: {
119
+ keyword: 'object';
120
+ args: {
121
+ properties: {
122
+ [x: string]: Schema[];
123
+ };
124
+ additionalProperties: Schema[];
125
+ strict?: boolean;
126
+ };
127
+ };
128
+ url: {
129
+ keyword: 'url';
130
+ };
131
+ readOnly: {
132
+ keyword: 'readOnly';
133
+ };
134
+ writeOnly: {
135
+ keyword: 'writeOnly';
136
+ };
137
+ uuid: {
138
+ keyword: 'uuid';
139
+ };
140
+ email: {
141
+ keyword: 'email';
142
+ };
143
+ firstName: {
144
+ keyword: 'firstName';
145
+ };
146
+ lastName: {
147
+ keyword: 'lastName';
148
+ };
149
+ phone: {
150
+ keyword: 'phone';
151
+ };
152
+ password: {
153
+ keyword: 'password';
154
+ };
155
+ date: {
156
+ keyword: 'date';
157
+ args: {
158
+ type?: 'date' | 'string';
159
+ };
160
+ };
161
+ time: {
162
+ keyword: 'time';
163
+ args: {
164
+ type?: 'date' | 'string';
165
+ };
166
+ };
167
+ datetime: {
168
+ keyword: 'datetime';
169
+ args: {
170
+ offset?: boolean;
171
+ local?: boolean;
172
+ };
173
+ };
174
+ tuple: {
175
+ keyword: 'tuple';
176
+ args: {
177
+ items: Schema[];
178
+ min?: number;
179
+ max?: number;
180
+ rest?: Schema;
181
+ };
182
+ };
183
+ array: {
184
+ keyword: 'array';
185
+ args: {
186
+ items: Schema[];
187
+ min?: number;
188
+ max?: number;
189
+ unique?: boolean;
190
+ };
191
+ };
192
+ enum: {
193
+ keyword: 'enum';
194
+ args: {
195
+ name: string;
196
+ typeName: string;
197
+ asConst: boolean;
198
+ items: Array<{
199
+ name: string | number;
200
+ format: 'string' | 'number' | 'boolean';
201
+ value?: string | number | boolean;
202
+ }>;
203
+ };
204
+ };
205
+ and: {
206
+ keyword: 'and';
207
+ args: Schema[];
208
+ };
209
+ const: {
210
+ keyword: 'const';
211
+ args: {
212
+ name: string | number;
213
+ format: 'string' | 'number' | 'boolean';
214
+ value?: string | number | boolean;
215
+ };
216
+ };
217
+ union: {
218
+ keyword: 'union';
219
+ args: Schema[];
220
+ };
221
+ ref: {
222
+ keyword: 'ref';
223
+ args: {
224
+ name: string;
225
+ $ref: string;
226
+ /**
227
+ * Full qualified path.
228
+ */
229
+ path: OptionalPath;
230
+ /**
231
+ * When true `File.Import` will be used.
232
+ * When false a reference will be used inside the current file.
233
+ */
234
+ isImportable: boolean;
235
+ };
236
+ };
237
+ matches: {
238
+ keyword: 'matches';
239
+ args?: string;
240
+ };
241
+ boolean: {
242
+ keyword: 'boolean';
243
+ };
244
+ default: {
245
+ keyword: 'default';
246
+ args: string | number | boolean;
247
+ };
248
+ string: {
249
+ keyword: 'string';
250
+ };
251
+ integer: {
252
+ keyword: 'integer';
253
+ };
254
+ number: {
255
+ keyword: 'number';
256
+ };
257
+ max: {
258
+ keyword: 'max';
259
+ args: number;
260
+ };
261
+ min: {
262
+ keyword: 'min';
263
+ args: number;
264
+ };
265
+ describe: {
266
+ keyword: 'describe';
267
+ args: string;
268
+ };
269
+ example: {
270
+ keyword: 'example';
271
+ args: string;
272
+ };
273
+ deprecated: {
274
+ keyword: 'deprecated';
275
+ };
276
+ optional: {
277
+ keyword: 'optional';
278
+ };
279
+ undefined: {
280
+ keyword: 'undefined';
281
+ };
282
+ nullish: {
283
+ keyword: 'nullish';
284
+ };
285
+ nullable: {
286
+ keyword: 'nullable';
287
+ };
288
+ null: {
289
+ keyword: 'null';
290
+ };
291
+ any: {
292
+ keyword: 'any';
293
+ };
294
+ unknown: {
295
+ keyword: 'unknown';
296
+ };
297
+ void: {
298
+ keyword: 'void';
299
+ };
300
+ blob: {
301
+ keyword: 'blob';
302
+ };
303
+ schema: {
304
+ keyword: 'schema';
305
+ args: {
306
+ type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
307
+ format?: string;
308
+ };
309
+ };
310
+ name: {
311
+ keyword: 'name';
312
+ args: string;
313
+ };
314
+ catchall: {
315
+ keyword: 'catchall';
316
+ };
317
+ interface: {
318
+ keyword: 'interface';
319
+ };
320
+ };
321
+ declare const schemaKeywords: {
322
+ any: "any";
323
+ unknown: "unknown";
324
+ number: "number";
325
+ integer: "integer";
326
+ string: "string";
327
+ boolean: "boolean";
328
+ undefined: "undefined";
329
+ nullable: "nullable";
330
+ null: "null";
331
+ nullish: "nullish";
332
+ array: "array";
333
+ tuple: "tuple";
334
+ enum: "enum";
335
+ union: "union";
336
+ datetime: "datetime";
337
+ date: "date";
338
+ email: "email";
339
+ uuid: "uuid";
340
+ url: "url";
341
+ void: "void";
342
+ default: "default";
343
+ const: "const";
344
+ and: "and";
345
+ describe: "describe";
346
+ min: "min";
347
+ max: "max";
348
+ optional: "optional";
349
+ readOnly: "readOnly";
350
+ writeOnly: "writeOnly";
351
+ object: "object";
352
+ ref: "ref";
353
+ matches: "matches";
354
+ firstName: "firstName";
355
+ lastName: "lastName";
356
+ password: "password";
357
+ phone: "phone";
358
+ blob: "blob";
359
+ deprecated: "deprecated";
360
+ example: "example";
361
+ schema: "schema";
362
+ catchall: "catchall";
363
+ time: "time";
364
+ name: "name";
365
+ interface: "interface";
366
+ };
367
+ type SchemaKeyword = keyof SchemaKeywordMapper;
368
+ type SchemaMapper<T = string | null | undefined> = { [K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined };
369
+ type SchemaKeywordBase<T> = {
370
+ keyword: SchemaKeyword;
371
+ args: T;
372
+ };
373
+ type Schema = {
374
+ keyword: string;
375
+ } | SchemaKeywordMapper[keyof SchemaKeywordMapper];
376
+ type SchemaTree = {
377
+ parent: Schema | undefined;
378
+ current: Schema;
379
+ siblings: Schema[];
380
+ /**
381
+ * this will be equal to the key of a property(object)
382
+ */
383
+ name?: string;
384
+ };
385
+ declare function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]>;
386
+ //#endregion
387
+ export { BaseName, Extname, File, Import, Mode, OptionalPath, Path, ResolvedFile, Schema, SchemaKeyword, SchemaKeywordBase, SchemaKeywordMapper, SchemaMapper, SchemaTree, isKeyword, schemaKeywords };
388
+ //# sourceMappingURL=SchemaMapper-C2J2d3o4.d.ts.map
@@ -0,0 +1,66 @@
1
+
2
+ //#region src/SchemaMapper.ts
3
+ const schemaKeywords = {
4
+ any: "any",
5
+ unknown: "unknown",
6
+ number: "number",
7
+ integer: "integer",
8
+ string: "string",
9
+ boolean: "boolean",
10
+ undefined: "undefined",
11
+ nullable: "nullable",
12
+ null: "null",
13
+ nullish: "nullish",
14
+ array: "array",
15
+ tuple: "tuple",
16
+ enum: "enum",
17
+ union: "union",
18
+ datetime: "datetime",
19
+ date: "date",
20
+ email: "email",
21
+ uuid: "uuid",
22
+ url: "url",
23
+ void: "void",
24
+ default: "default",
25
+ const: "const",
26
+ and: "and",
27
+ describe: "describe",
28
+ min: "min",
29
+ max: "max",
30
+ optional: "optional",
31
+ readOnly: "readOnly",
32
+ writeOnly: "writeOnly",
33
+ object: "object",
34
+ ref: "ref",
35
+ matches: "matches",
36
+ firstName: "firstName",
37
+ lastName: "lastName",
38
+ password: "password",
39
+ phone: "phone",
40
+ blob: "blob",
41
+ deprecated: "deprecated",
42
+ example: "example",
43
+ schema: "schema",
44
+ catchall: "catchall",
45
+ time: "time",
46
+ name: "name",
47
+ interface: "interface"
48
+ };
49
+ function isKeyword(meta, keyword) {
50
+ return meta.keyword === keyword;
51
+ }
52
+
53
+ //#endregion
54
+ Object.defineProperty(exports, 'isKeyword', {
55
+ enumerable: true,
56
+ get: function () {
57
+ return isKeyword;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, 'schemaKeywords', {
61
+ enumerable: true,
62
+ get: function () {
63
+ return schemaKeywords;
64
+ }
65
+ });
66
+ //# sourceMappingURL=SchemaMapper-D8J0V9Pj.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaMapper-D8J0V9Pj.cjs","names":["meta: T","keyword: K"],"sources":["../src/SchemaMapper.ts"],"sourcesContent":["import type { KubbFile } from '@kubb/core/fs'\n\nexport type SchemaKeywordMapper = {\n object: {\n keyword: 'object'\n args: {\n properties: { [x: string]: Schema[] }\n additionalProperties: Schema[]\n strict?: boolean\n }\n }\n url: { keyword: 'url' }\n readOnly: { keyword: 'readOnly' }\n writeOnly: { keyword: 'writeOnly' }\n uuid: { keyword: 'uuid' }\n email: { keyword: 'email' }\n firstName: { keyword: 'firstName' }\n lastName: { keyword: 'lastName' }\n phone: { keyword: 'phone' }\n password: { keyword: 'password' }\n date: { keyword: 'date'; args: { type?: 'date' | 'string' } }\n time: { keyword: 'time'; args: { type?: 'date' | 'string' } }\n datetime: { keyword: 'datetime'; args: { offset?: boolean; local?: boolean } }\n tuple: { keyword: 'tuple'; args: { items: Schema[]; min?: number; max?: number; rest?: Schema } }\n array: {\n keyword: 'array'\n args: { items: Schema[]; min?: number; max?: number; unique?: boolean }\n }\n enum: {\n keyword: 'enum'\n args: {\n name: string\n typeName: string\n asConst: boolean\n items: Array<{\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }>\n }\n }\n and: { keyword: 'and'; args: Schema[] }\n const: {\n keyword: 'const'\n args: {\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }\n }\n union: { keyword: 'union'; args: Schema[] }\n ref: {\n keyword: 'ref'\n args: {\n name: string\n $ref: string\n /**\n * Full qualified path.\n */\n path: KubbFile.OptionalPath\n /**\n * When true `File.Import` will be used.\n * When false a reference will be used inside the current file.\n */\n isImportable: boolean\n }\n }\n matches: { keyword: 'matches'; args?: string }\n boolean: { keyword: 'boolean' }\n default: { keyword: 'default'; args: string | number | boolean }\n string: { keyword: 'string' }\n integer: { keyword: 'integer' }\n number: { keyword: 'number' }\n max: { keyword: 'max'; args: number }\n min: { keyword: 'min'; args: number }\n describe: { keyword: 'describe'; args: string }\n example: { keyword: 'example'; args: string }\n deprecated: { keyword: 'deprecated' }\n optional: { keyword: 'optional' }\n undefined: { keyword: 'undefined' }\n nullish: { keyword: 'nullish' }\n nullable: { keyword: 'nullable' }\n null: { keyword: 'null' }\n any: { keyword: 'any' }\n unknown: { keyword: 'unknown' }\n void: { keyword: 'void' }\n blob: { keyword: 'blob' }\n schema: { keyword: 'schema'; args: { type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object'; format?: string } }\n name: { keyword: 'name'; args: string }\n catchall: { keyword: 'catchall' }\n interface: { keyword: 'interface' }\n}\n\nexport const schemaKeywords = {\n any: 'any',\n unknown: 'unknown',\n number: 'number',\n integer: 'integer',\n string: 'string',\n boolean: 'boolean',\n undefined: 'undefined',\n nullable: 'nullable',\n null: 'null',\n nullish: 'nullish',\n array: 'array',\n tuple: 'tuple',\n enum: 'enum',\n union: 'union',\n datetime: 'datetime',\n date: 'date',\n email: 'email',\n uuid: 'uuid',\n url: 'url',\n void: 'void',\n /* intersection */\n default: 'default',\n const: 'const',\n and: 'and',\n describe: 'describe',\n min: 'min',\n max: 'max',\n optional: 'optional',\n readOnly: 'readOnly',\n writeOnly: 'writeOnly',\n\n // custom ones\n object: 'object',\n ref: 'ref',\n matches: 'matches',\n firstName: 'firstName',\n lastName: 'lastName',\n password: 'password',\n phone: 'phone',\n blob: 'blob',\n deprecated: 'deprecated',\n example: 'example',\n schema: 'schema',\n catchall: 'catchall',\n time: 'time',\n name: 'name',\n interface: 'interface',\n} satisfies {\n [K in keyof SchemaKeywordMapper]: SchemaKeywordMapper[K]['keyword']\n}\n\nexport type SchemaKeyword = keyof SchemaKeywordMapper\n\nexport type SchemaMapper<T = string | null | undefined> = {\n [K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined\n}\n\nexport type SchemaKeywordBase<T> = {\n keyword: SchemaKeyword\n args: T\n}\n\nexport type Schema = { keyword: string } | SchemaKeywordMapper[keyof SchemaKeywordMapper]\n\nexport type SchemaTree = {\n parent: Schema | undefined\n current: Schema\n siblings: Schema[]\n /**\n * this will be equal to the key of a property(object)\n */\n name?: string\n}\n\nexport function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]> {\n return meta.keyword === keyword\n}\n"],"mappings":";;AA6FA,MAAa,iBAAiB;CAC5B,KAAK;CACL,SAAS;CACT,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,UAAU;CACV,MAAM;CACN,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACV,MAAM;CACN,OAAO;CACP,MAAM;CACN,KAAK;CACL,MAAM;CAEN,SAAS;CACT,OAAO;CACP,KAAK;CACL,UAAU;CACV,KAAK;CACL,KAAK;CACL,UAAU;CACV,UAAU;CACV,WAAW;CAGX,QAAQ;CACR,KAAK;CACL,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACP,MAAM;CACN,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,UAAU;CACV,MAAM;CACN,MAAM;CACN,WAAW;AACZ;AA2BD,SAAgB,UAAiEA,MAASC,SAAwD;AAChJ,QAAO,KAAK,YAAY;AACzB"}
@@ -0,0 +1,30 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+
23
+ //#endregion
24
+
25
+ Object.defineProperty(exports, '__toESM', {
26
+ enumerable: true,
27
+ get: function () {
28
+ return __toESM;
29
+ }
30
+ });
@@ -1,20 +1,5 @@
1
- 'use strict';
1
+ const require_Oas = require('./Oas-Cv_pyXRM.cjs');
2
2
 
3
- var chunkZ2NREI4X_cjs = require('./chunk-Z2NREI4X.cjs');
4
-
5
-
6
-
7
- Object.defineProperty(exports, "Oas", {
8
- enumerable: true,
9
- get: function () { return chunkZ2NREI4X_cjs.Oas; }
10
- });
11
- Object.defineProperty(exports, "Operation", {
12
- enumerable: true,
13
- get: function () { return chunkZ2NREI4X_cjs.Operation; }
14
- });
15
- Object.defineProperty(exports, "Schema", {
16
- enumerable: true,
17
- get: function () { return chunkZ2NREI4X_cjs.Schema; }
18
- });
19
- //# sourceMappingURL=components.cjs.map
20
- //# sourceMappingURL=components.cjs.map
3
+ exports.Oas = require_Oas.Oas;
4
+ exports.Operation = require_Oas.Operation;
5
+ exports.Schema = require_Oas.Schema;
@@ -1,46 +1,53 @@
1
- import { S as Schema } from './Schema-M6983FL1.cjs';
2
- import * as react from 'react';
3
- import { Operation as Operation$1, Oas as Oas$1 } from '@kubb/oas';
4
- import { KubbNode } from '@kubb/react/types';
5
- import { b as OperationGenerator } from './OperationGenerator-DJE2XQ83.cjs';
6
- import './SchemaMapper-B21ZmWag.cjs';
7
- import '@kubb/core/fs';
8
- import '@kubb/core';
1
+ import { KubbNode, Oas, Operation, OperationGenerator } from "./OperationGenerator-CgbXErhW.cjs";
2
+ import "./SchemaMapper-BiagBQN4.cjs";
3
+ import { Schema } from "./Schema-DJshqHto.cjs";
4
+ import * as react1 from "react";
9
5
 
6
+ //#region src/components/Operation.d.ts
10
7
  type Props$1 = {
11
- operation: Operation$1;
12
- children?: KubbNode;
8
+ operation: Operation;
9
+ children?: KubbNode;
13
10
  };
14
11
  type OperationContextProps = {
15
- operation?: Operation$1;
12
+ operation?: Operation;
16
13
  };
17
- declare function Operation({ operation, children }: Props$1): any;
18
- declare namespace Operation {
19
- var Context: react.Context<OperationContextProps>;
14
+ declare function Operation$1({
15
+ operation,
16
+ children
17
+ }: Props$1): any;
18
+ declare namespace Operation$1 {
19
+ var Context: react1.Context<OperationContextProps>;
20
20
  }
21
-
21
+ //#endregion
22
+ //#region src/components/Oas.d.ts
22
23
  type Props = {
23
- oas: Oas$1;
24
- operations?: Operation$1[];
25
- /**
26
- * @deprecated
27
- */
28
- generator?: Omit<OperationGenerator, 'build'>;
29
- children?: KubbNode;
24
+ oas: Oas;
25
+ operations?: Operation[];
26
+ /**
27
+ * @deprecated
28
+ */
29
+ generator?: Omit<OperationGenerator, 'build'>;
30
+ children?: KubbNode;
30
31
  };
31
32
  type OasContextProps = {
32
- oas?: Oas$1;
33
- operations?: Operation$1[];
34
- /**
35
- * @deprecated
36
- */
37
- generator?: Omit<OperationGenerator, 'build'>;
33
+ oas?: Oas;
34
+ operations?: Operation[];
35
+ /**
36
+ * @deprecated
37
+ */
38
+ generator?: Omit<OperationGenerator, 'build'>;
38
39
  };
39
- declare function Oas({ oas, children, operations, generator }: Props): any;
40
- declare namespace Oas {
41
- var Context: react.Context<OasContextProps>;
42
- var Operation: typeof Operation;
43
- var Schema: typeof Schema;
40
+ declare function Oas$1({
41
+ oas,
42
+ children,
43
+ operations,
44
+ generator
45
+ }: Props): any;
46
+ declare namespace Oas$1 {
47
+ var Context: react1.Context<OasContextProps>;
48
+ var Operation: typeof Operation$1;
49
+ var Schema: typeof Schema;
44
50
  }
45
-
46
- export { Oas, Operation, Schema };
51
+ //#endregion
52
+ export { Oas$1 as Oas, Operation$1 as Operation, Schema };
53
+ //# sourceMappingURL=components.d.cts.map