@hey-api/openapi-ts 0.86.12 → 0.87.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.
Files changed (44) hide show
  1. package/README.md +8 -14
  2. package/dist/clients/angular/index.ts +0 -1
  3. package/dist/clients/angular/types.ts +0 -27
  4. package/dist/clients/axios/index.ts +0 -1
  5. package/dist/clients/axios/types.ts +0 -19
  6. package/dist/clients/fetch/index.ts +0 -1
  7. package/dist/clients/fetch/types.ts +0 -27
  8. package/dist/clients/next/index.ts +0 -1
  9. package/dist/clients/next/types.ts +0 -19
  10. package/dist/clients/nuxt/index.ts +0 -1
  11. package/dist/clients/nuxt/types.ts +0 -12
  12. package/dist/clients/ofetch/index.ts +0 -1
  13. package/dist/clients/ofetch/types.ts +0 -27
  14. package/dist/{types-BRmx9r9T.d.ts → config-CNi83ZTD.d.ts} +1395 -2417
  15. package/dist/{types-Dh80P1tV.d.cts → config-PWeoedFF.d.cts} +1447 -2471
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.cts +470 -25
  18. package/dist/index.d.ts +459 -16
  19. package/dist/index.js +1 -1
  20. package/dist/internal.cjs +1 -1
  21. package/dist/internal.d.cts +38 -1
  22. package/dist/internal.d.ts +38 -1
  23. package/dist/internal.js +1 -1
  24. package/dist/openApi-CCTdD3hW.cjs +19 -0
  25. package/dist/openApi-CCTdD3hW.cjs.map +1 -0
  26. package/dist/openApi-D7xrG_wR.js +19 -0
  27. package/dist/openApi-D7xrG_wR.js.map +1 -0
  28. package/dist/run.cjs +1 -1
  29. package/dist/run.cjs.map +1 -1
  30. package/dist/run.js +1 -1
  31. package/dist/run.js.map +1 -1
  32. package/dist/src-CZCpIWy7.js +11 -0
  33. package/dist/src-CZCpIWy7.js.map +1 -0
  34. package/dist/src-Cvd6zAsc.cjs +19 -0
  35. package/dist/src-Cvd6zAsc.cjs.map +1 -0
  36. package/package.json +1 -4
  37. package/dist/getSpec-1BMHZkPH.js +0 -25
  38. package/dist/getSpec-1BMHZkPH.js.map +0 -1
  39. package/dist/getSpec-xn4as4li.cjs +0 -25
  40. package/dist/getSpec-xn4as4li.cjs.map +0 -1
  41. package/dist/src-CQ_69Vcm.js +0 -1310
  42. package/dist/src-CQ_69Vcm.js.map +0 -1
  43. package/dist/src-DptUs1Ky.cjs +0 -1318
  44. package/dist/src-DptUs1Ky.cjs.map +0 -1
@@ -1,12 +1,9 @@
1
1
  import { IProject, Project, Symbol, SymbolIdentifier, SymbolIn, SymbolMeta } from "@hey-api/codegen-core";
2
- import fs from "node:fs";
3
- import ts from "typescript";
4
2
  import { RangeOptions, SemVer } from "semver";
3
+ import ts from "typescript";
5
4
 
6
- //#region rolldown:runtime
7
-
8
- //#endregion
9
5
  //#region src/plugins/shared/types/refs.d.ts
6
+
10
7
  /**
11
8
  * Ref wrapper which ensures a stable reference for a value.
12
9
  *
@@ -58,509 +55,8 @@ interface EnumExtensions {
58
55
  */
59
56
  'x-enumNames'?: ReadonlyArray<string>;
60
57
  }
61
- declare namespace types_d_exports {
62
- export { AccessLevel, FunctionParameter, FunctionTypeParameter, ObjectValue, SyntaxKindKeyword, createAnonymousFunction, createArrayLiteralExpression, createArrowFunction, createAsExpression, createAssignment, createAwaitExpression, createBlock, createConditionalExpression, createEnumDeclaration, createForOfStatement, createFunctionTypeNode, createGetAccessorDeclaration, createIndexedAccessTypeNode, createKeywordTypeNode, createLiteralTypeNode, createMappedTypeNode, createNamespaceDeclaration, createNewExpression, createNull, createObjectType, createParameterDeclaration, createPropertyAccessChain, createPropertyAccessExpression, createPropertyAssignment, createRegularExpressionLiteral, createStringLiteral, createTemplateLiteralType, createTypeAliasDeclaration, createTypeNode, createTypeOfExpression, createTypeOperatorNode, createTypeParameterDeclaration, createTypeParenthesizedNode, createTypeReferenceNode, syntaxKindKeyword, toExpression, toParameterDeclarations, toTypeParameters };
63
- }
64
- type AccessLevel = 'private' | 'protected' | 'public';
65
- type FunctionParameter = {
66
- accessLevel?: AccessLevel;
67
- default?: any;
68
- isReadOnly?: boolean;
69
- isRequired?: boolean;
70
- name: string;
71
- type?: any | ts.TypeNode;
72
- } | {
73
- destructure: ReadonlyArray<FunctionParameter>;
74
- type?: any | ts.TypeNode;
75
- };
76
- interface FunctionTypeParameter {
77
- default?: any;
78
- extends?: string | ts.TypeNode;
79
- name: string | ts.Identifier;
80
- }
81
- declare const createTypeNode: (base: any | ts.TypeNode, args?: (any | ts.TypeNode)[]) => ts.TypeNode;
82
- declare const createPropertyAccessChain: ({
83
- expression,
84
- name
85
- }: {
86
- expression: ts.Expression;
87
- name: string | ts.MemberName;
88
- }) => ts.PropertyAccessChain;
89
- declare const createPropertyAccessExpression: ({
90
- expression,
91
- isOptional,
92
- name
93
- }: {
94
- expression: string | ts.Expression;
95
- isOptional?: boolean;
96
- name: string | number | ts.MemberName;
97
- }) => ts.PropertyAccessChain | ts.PropertyAccessExpression | ts.ElementAccessExpression;
98
- declare const createNull: () => ts.NullLiteral;
99
- /**
100
- * Convert an unknown value to an expression.
101
- * @param identifiers - list of keys that are treated as identifiers.
102
- * @param shorthand - if shorthand syntax is allowed.
103
- * @param unescape - if string should be unescaped.
104
- * @param value - the unknown value.
105
- * @returns ts.Expression
106
- */
107
- declare const toExpression: <T = unknown>({
108
- identifiers,
109
- isValueAccess,
110
- shorthand,
111
- unescape,
112
- value
113
- }: {
114
- identifiers?: string[];
115
- isValueAccess?: boolean;
116
- shorthand?: boolean;
117
- unescape?: boolean;
118
- value: T;
119
- }) => ts.Expression | undefined;
120
- /**
121
- * Convert parameters to the declaration array expected by TypeScript
122
- * Compiler API.
123
- * @param parameters - the parameters to convert to declarations
124
- * @returns ts.ParameterDeclaration[]
125
- */
126
- declare const toParameterDeclarations: (parameters: ReadonlyArray<FunctionParameter>) => ts.ParameterDeclaration[];
127
- type SyntaxKindKeyword = 'any' | 'async' | 'boolean' | 'export' | 'never' | 'number' | 'private' | 'protected' | 'public' | 'readonly' | 'static' | 'string' | 'undefined' | 'unknown' | 'void';
128
- declare const syntaxKindKeyword: <T extends SyntaxKindKeyword>({
129
- keyword
130
- }: {
131
- keyword: T;
132
- }) => T extends "protected" ? ts.SyntaxKind.ProtectedKeyword : T extends "public" ? ts.SyntaxKind.PublicKeyword : T extends "private" ? ts.SyntaxKind.PrivateKeyword : T extends "export" ? ts.SyntaxKind.ExportKeyword : T extends "async" ? ts.SyntaxKind.ExportKeyword : T extends "readonly" ? ts.SyntaxKind.ExportKeyword : T extends "static" ? ts.SyntaxKind.ExportKeyword : ts.SyntaxKind.AnyKeyword | ts.SyntaxKind.BooleanKeyword | ts.SyntaxKind.NeverKeyword | ts.SyntaxKind.NumberKeyword | ts.SyntaxKind.StringKeyword | ts.SyntaxKind.UndefinedKeyword | ts.SyntaxKind.UnknownKeyword | ts.SyntaxKind.VoidKeyword;
133
- declare const createKeywordTypeNode: ({
134
- keyword
135
- }: {
136
- keyword: Extract<SyntaxKindKeyword, "any" | "boolean" | "never" | "number" | "string" | "undefined" | "unknown" | "void">;
137
- }) => ts.KeywordTypeNode<ts.SyntaxKind.VoidKeyword | ts.SyntaxKind.AnyKeyword | ts.SyntaxKind.BooleanKeyword | ts.SyntaxKind.NeverKeyword | ts.SyntaxKind.NumberKeyword | ts.SyntaxKind.StringKeyword | ts.SyntaxKind.UndefinedKeyword | ts.SyntaxKind.UnknownKeyword>;
138
- declare const toTypeParameters: (types: (FunctionTypeParameter | ts.TypeParameterDeclaration)[]) => ts.TypeParameterDeclaration[];
139
- declare const createTypeOperatorNode: ({
140
- operator,
141
- type
142
- }: {
143
- operator: "keyof" | "readonly" | "unique";
144
- type: ts.TypeNode;
145
- }) => ts.TypeOperatorNode;
146
- declare const createTypeParameterDeclaration: ({
147
- constraint,
148
- defaultType,
149
- modifiers,
150
- name
151
- }: {
152
- constraint?: ts.TypeNode;
153
- defaultType?: ts.TypeNode;
154
- modifiers?: Array<ts.Modifier>;
155
- name: string | ts.Identifier;
156
- }) => ts.TypeParameterDeclaration;
157
- declare const createMappedTypeNode: ({
158
- members,
159
- nameType,
160
- questionToken,
161
- readonlyToken,
162
- type,
163
- typeParameter
164
- }: {
165
- members?: ts.NodeArray<ts.TypeElement>;
166
- nameType?: ts.TypeNode;
167
- questionToken?: ts.QuestionToken | ts.PlusToken | ts.MinusToken;
168
- readonlyToken?: ts.ReadonlyKeyword | ts.PlusToken | ts.MinusToken;
169
- type?: ts.TypeNode;
170
- typeParameter: ts.TypeParameterDeclaration;
171
- }) => ts.MappedTypeNode;
172
- declare const createLiteralTypeNode: ({
173
- literal
174
- }: {
175
- literal: ts.LiteralTypeNode["literal"];
176
- }) => ts.LiteralTypeNode;
177
- /**
178
- * Create arrow function type expression.
179
- */
180
- declare const createArrowFunction: ({
181
- async,
182
- comment,
183
- multiLine,
184
- parameters,
185
- returnType,
186
- statements,
187
- types
188
- }: {
189
- async?: boolean;
190
- comment?: Comments;
191
- multiLine?: boolean;
192
- parameters?: ReadonlyArray<FunctionParameter>;
193
- returnType?: string | ts.TypeNode;
194
- statements?: ts.Statement[] | ts.Expression;
195
- types?: FunctionTypeParameter[];
196
- }) => ts.ArrowFunction;
197
- /**
198
- * Create anonymous function type expression.
199
- */
200
- declare const createAnonymousFunction: ({
201
- async,
202
- comment,
203
- multiLine,
204
- parameters,
205
- returnType,
206
- statements,
207
- types
208
- }: {
209
- async?: boolean;
210
- comment?: Comments;
211
- multiLine?: boolean;
212
- parameters?: FunctionParameter[];
213
- returnType?: string | ts.TypeNode;
214
- statements?: ReadonlyArray<ts.Statement>;
215
- types?: FunctionTypeParameter[];
216
- }) => ts.FunctionExpression;
217
- /**
218
- * Create Array type expression.
219
- */
220
- declare const createArrayLiteralExpression: <T>({
221
- elements,
222
- multiLine
223
- }: {
224
- /**
225
- * The array to create.
226
- */
227
- elements: T[];
228
- /**
229
- * Should the array be multi line?
230
- *
231
- * @default false
232
- */
233
- multiLine?: boolean;
234
- }) => ts.ArrayLiteralExpression;
235
- declare const createAwaitExpression: ({
236
- expression
237
- }: {
238
- expression: ts.Expression;
239
- }) => ts.AwaitExpression;
240
- declare const createFunctionTypeNode: ({
241
- parameters,
242
- returnType,
243
- typeParameters
244
- }: {
245
- parameters?: ts.ParameterDeclaration[];
246
- returnType: ts.TypeNode;
247
- typeParameters?: ts.TypeParameterDeclaration[];
248
- }) => ts.FunctionTypeNode;
249
- type ObjectValue = {
250
- assertion?: 'any' | ts.TypeNode;
251
- comments?: Comments;
252
- spread: string;
253
- } | {
254
- comments?: Comments;
255
- isValueAccess?: boolean;
256
- key: string;
257
- shorthand?: boolean;
258
- value: any;
259
- };
260
- /**
261
- * Create Object type expression.
262
- * @param comments - comments to add to each property.
263
- * @param identifier - keys that should be treated as identifiers.
264
- * @param multiLine - if the object should be multiline.
265
- * @param obj - the object to create expression with.
266
- * @param shorthand - if shorthand syntax should be used.
267
- * @param unescape - if properties strings should be unescaped.
268
- * @returns ts.ObjectLiteralExpression
269
- */
270
- declare const createObjectType: <T extends Record<string, any> | Array<ObjectValue>>({
271
- comments,
272
- identifiers,
273
- multiLine,
274
- obj,
275
- shorthand,
276
- unescape
277
- }: {
278
- comments?: Comments;
279
- identifiers?: string[];
280
- multiLine?: boolean;
281
- obj: T;
282
- shorthand?: boolean;
283
- unescape?: boolean;
284
- }) => ts.ObjectLiteralExpression;
285
- /**
286
- * Create enum declaration. Example `export enum T = { X, Y };`
287
- * @param asConst - whether to use const enums.
288
- * @param comments - comments to add to each property.
289
- * @param leadingComment - leading comment to add to enum.
290
- * @param name - the name of the enum.
291
- * @param obj - the object representing the enum.
292
- * @returns ts.EnumDeclaration
293
- */
294
- declare const createEnumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({
295
- asConst,
296
- comments: enumMemberComments,
297
- leadingComment: comments,
298
- name,
299
- obj
300
- }: {
301
- asConst: boolean;
302
- comments?: Record<string | number, Comments>;
303
- leadingComment?: Comments;
304
- name: string | ts.TypeReferenceNode;
305
- obj: T;
306
- }) => ts.EnumDeclaration;
307
- /**
308
- * Create namespace declaration. Example `export namespace MyNamespace { ... }`
309
- * @param name - the name of the namespace.
310
- * @param nodes - the nodes in the namespace.
311
- * @returns
312
- */
313
- declare const createNamespaceDeclaration: ({
314
- name,
315
- statements
316
- }: {
317
- name: string;
318
- statements: Array<ts.Statement>;
319
- }) => ts.ModuleDeclaration;
320
- declare const createIndexedAccessTypeNode: ({
321
- indexType,
322
- objectType
323
- }: {
324
- indexType: ts.TypeNode;
325
- objectType: ts.TypeNode;
326
- }) => ts.IndexedAccessTypeNode;
327
- declare const createGetAccessorDeclaration: ({
328
- modifiers,
329
- name,
330
- returnType,
331
- statements
332
- }: {
333
- modifiers?: Modifier | ReadonlyArray<Modifier>;
334
- name: string | ts.PropertyName;
335
- returnType?: string | ts.Identifier;
336
- statements: ReadonlyArray<ts.Statement>;
337
- }) => ts.GetAccessorDeclaration;
338
- declare const createStringLiteral: ({
339
- isSingleQuote,
340
- text
341
- }: {
342
- isSingleQuote?: boolean;
343
- text: string;
344
- }) => ts.StringLiteral;
345
- declare const createConditionalExpression: ({
346
- condition,
347
- whenFalse,
348
- whenTrue
349
- }: {
350
- condition: ts.Expression;
351
- whenFalse: ts.Expression;
352
- whenTrue: ts.Expression;
353
- }) => ts.ConditionalExpression;
354
- declare const createTypeOfExpression: ({
355
- text
356
- }: {
357
- text: string | ts.Identifier;
358
- }) => ts.TypeOfExpression;
359
- /**
360
- * Create a type alias declaration. Example `export type X = Y;`.
361
- * @param comment (optional) comments to add
362
- * @param name the name of the type
363
- * @param type the type
364
- * @returns ts.TypeAliasDeclaration
365
- */
366
- declare const createTypeAliasDeclaration: ({
367
- comment,
368
- exportType,
369
- name,
370
- type,
371
- typeParameters
372
- }: {
373
- comment?: Comments;
374
- exportType?: boolean;
375
- name: string | ts.TypeReferenceNode;
376
- type: string | ts.TypeNode | ts.Identifier;
377
- typeParameters?: FunctionTypeParameter[];
378
- }) => ts.TypeAliasDeclaration;
379
- declare const createTypeReferenceNode: ({
380
- typeArguments,
381
- typeName
382
- }: {
383
- typeArguments?: ts.TypeNode[];
384
- typeName: string | ts.EntityName;
385
- }) => ts.TypeReferenceNode;
386
- declare const createTypeParenthesizedNode: ({
387
- type
388
- }: {
389
- type: ts.TypeNode;
390
- }) => ts.ParenthesizedTypeNode;
391
- declare const createParameterDeclaration: ({
392
- initializer,
393
- modifiers,
394
- name,
395
- required,
396
- type
397
- }: {
398
- initializer?: ts.Expression;
399
- modifiers?: ReadonlyArray<ts.ModifierLike>;
400
- name: string | ts.BindingName;
401
- required?: boolean;
402
- type?: ts.TypeNode;
403
- }) => ts.ParameterDeclaration;
404
- declare const createNewExpression: ({
405
- argumentsArray,
406
- expression,
407
- typeArguments
408
- }: {
409
- argumentsArray?: Array<ts.Expression>;
410
- expression: ts.Expression;
411
- typeArguments?: Array<ts.TypeNode>;
412
- }) => ts.NewExpression;
413
- declare const createForOfStatement: ({
414
- awaitModifier,
415
- expression,
416
- initializer,
417
- statement
418
- }: {
419
- awaitModifier?: ts.AwaitKeyword;
420
- expression: ts.Expression;
421
- initializer: ts.ForInitializer;
422
- statement: ts.Statement;
423
- }) => ts.ForOfStatement;
424
- declare const createAssignment: ({
425
- left,
426
- right
427
- }: {
428
- left: ts.Expression;
429
- right: ts.Expression;
430
- }) => ts.AssignmentExpression<ts.EqualsToken>;
431
- declare const createBlock: ({
432
- multiLine,
433
- statements
434
- }: {
435
- multiLine?: boolean;
436
- statements: ReadonlyArray<ts.Statement>;
437
- }) => ts.Block;
438
- declare const createPropertyAssignment: ({
439
- initializer,
440
- name
441
- }: {
442
- initializer: ts.Expression;
443
- name: string | ts.PropertyName;
444
- }) => ts.PropertyAssignment;
445
- declare const createRegularExpressionLiteral: ({
446
- flags,
447
- text
448
- }: {
449
- flags?: ReadonlyArray<"g" | "i" | "m" | "s" | "u" | "y">;
450
- text: string;
451
- }) => ts.RegularExpressionLiteral;
452
- declare const createAsExpression: ({
453
- expression,
454
- type
455
- }: {
456
- expression: ts.Expression;
457
- type: ts.TypeNode;
458
- }) => ts.AsExpression;
459
- declare const createTemplateLiteralType: ({
460
- value
461
- }: {
462
- value: ReadonlyArray<string | ts.TypeNode>;
463
- }) => ts.TemplateLiteralTypeNode;
464
- //#endregion
465
- //#region src/tsc/utils.d.ts
466
- interface ImportExportItemObject<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> {
467
- alias?: Alias;
468
- asType?: boolean;
469
- name: Name;
470
- }
471
- /**
472
- * Print a TypeScript node to a string.
473
- * @param node the node to print
474
- * @returns string
475
- */
476
- declare function tsNodeToString({
477
- node,
478
- unescape
479
- }: {
480
- node: ts.Node;
481
- unescape?: boolean;
482
- }): string;
483
- type Modifier = AccessLevel | 'async' | 'export' | 'readonly' | 'static';
484
- type CommentLines = Array<string | null | false | undefined>;
485
- type CommentObject = {
486
- jsdoc?: boolean;
487
- lines: CommentLines;
488
- };
489
- type Comments = CommentLines | Array<CommentObject>;
490
- //#endregion
491
- //#region src/generate/file.d.ts
492
- type FileImportResult<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> = {
493
- asType?: boolean;
494
- name: Alias extends string ? Alias : Name;
495
- };
496
- /**
497
- * TODO: remove, it's used by legacy plugins
498
- *
499
- * @deprecated
500
- */
501
- declare class GeneratedFile {
502
- /**
503
- * Should the exports from this file be re-exported in the index barrel file?
504
- */
505
- private _exportFromIndex;
506
- private _headers;
507
- private _id;
508
- private _imports;
509
- private _items;
510
- private _name;
511
- private _path;
512
- constructor({
513
- dir,
514
- exportFromIndex,
515
- header,
516
- id,
517
- name
518
- }: {
519
- dir: string;
520
- /**
521
- * Should the exports from this file be re-exported in the index barrel file?
522
- */
523
- exportFromIndex?: boolean;
524
- header?: boolean;
525
- /**
526
- * Unique file ID. Used to generate correct relative paths to the file.
527
- * This should be refactored later as it's basically the file name unless
528
- * nested inside another folder.
529
- */
530
- id: string;
531
- name: string;
532
- });
533
- add(...nodes: Array<ts.Node | string>): void;
534
- get exportFromIndex(): boolean;
535
- get id(): string;
536
- /**
537
- * Adds an import to the provided module. Handles duplication, returns added
538
- * import. Returns the imported name. If we import an aliased export, `name`
539
- * will be equal to the specified `alias`.
540
- */
541
- import<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined>({
542
- module,
543
- ...importedItem
544
- }: ImportExportItemObject<Name, Alias> & {
545
- module: string;
546
- }): FileImportResult<Name, Alias>;
547
- isEmpty(): boolean;
548
- nameWithoutExtension(): string;
549
- remove(options?: Parameters<typeof fs.rmSync>[1]): void;
550
- /**
551
- * Removes last node form the stack. Works as undo.
552
- *
553
- * @deprecated
554
- */
555
- removeNode_LEGACY(): void;
556
- private _setName;
557
- private _toString;
558
- write(separator?: string, tsConfig?: ts.ParsedCommandLine | null): void;
559
- }
560
58
  //#endregion
561
59
  //#region src/types/utils.d.ts
562
- /** @deprecated */
563
- type Files = Record<string, GeneratedFile>;
564
60
  /**
565
61
  * Accepts a value, a function returning a value, or a function returning a promise of a value.
566
62
  */
@@ -1463,7 +959,7 @@ interface LinkObject$1 {
1463
959
  * $ref: "#/components/examples/frog-example"
1464
960
  * ```
1465
961
  */
1466
- interface MediaTypeObject$2 {
962
+ interface MediaTypeObject$1 {
1467
963
  /**
1468
964
  * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
1469
965
  */
@@ -1753,7 +1249,7 @@ interface ParameterObject {
1753
1249
  /**
1754
1250
  * A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
1755
1251
  */
1756
- content?: Record<string, MediaTypeObject$2>;
1252
+ content?: Record<string, MediaTypeObject$1>;
1757
1253
  /**
1758
1254
  * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
1759
1255
  */
@@ -2042,7 +1538,7 @@ interface RequestBodyObject {
2042
1538
  /**
2043
1539
  * **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
2044
1540
  */
2045
- content: Record<string, MediaTypeObject$2>;
1541
+ content: Record<string, MediaTypeObject$1>;
2046
1542
  /**
2047
1543
  * A brief description of the request body. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2048
1544
  */
@@ -2117,7 +1613,7 @@ interface ResponseObject {
2117
1613
  /**
2118
1614
  * A map containing descriptions of potential response payloads. The key is a media type or {@link https://datatracker.ietf.org/doc/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
2119
1615
  */
2120
- content?: Record<string, MediaTypeObject$2>;
1616
+ content?: Record<string, MediaTypeObject$1>;
2121
1617
  /**
2122
1618
  * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
2123
1619
  */
@@ -3299,11 +2795,8 @@ type WalkOptions<T extends string = string> = {
3299
2795
  type StringCase = 'camelCase' | 'PascalCase' | 'preserve' | 'snake_case' | 'SCREAMING_SNAKE_CASE';
3300
2796
  type StringName = string | ((name: string) => string);
3301
2797
  //#endregion
3302
- //#region src/plugins/@angular/common/api.d.ts
3303
- type IApi$20 = any;
3304
- //#endregion
3305
2798
  //#region src/plugins/@angular/common/types.d.ts
3306
- type UserConfig$27 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
2799
+ type UserConfig$22 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
3307
2800
  /**
3308
2801
  * Should the exports from the generated files be re-exported in the index
3309
2802
  * barrel file?
@@ -3371,7 +2864,7 @@ type UserConfig$27 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
3371
2864
  methodNameBuilder?: (operation: IR.OperationObject) => string;
3372
2865
  };
3373
2866
  };
3374
- type Config$13 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
2867
+ type Config$14 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
3375
2868
  /**
3376
2869
  * Should the exports from the generated files be re-exported in the index
3377
2870
  * barrel file?
@@ -3434,13 +2927,10 @@ type Config$13 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
3434
2927
  methodNameBuilder: (operation: IR.OperationObject) => string;
3435
2928
  };
3436
2929
  };
3437
- type AngularCommonPlugin = DefinePlugin<UserConfig$27, Config$13, IApi$20>;
3438
- //#endregion
3439
- //#region src/plugins/@hey-api/client-axios/api.d.ts
3440
- type IApi$19 = any;
2930
+ type AngularCommonPlugin = DefinePlugin<UserConfig$22, Config$14>;
3441
2931
  //#endregion
3442
2932
  //#region src/plugins/@hey-api/client-axios/types.d.ts
3443
- type UserConfig$26 = Plugin.Name<'@hey-api/client-axios'> & Client$2.Config & {
2933
+ type UserConfig$21 = Plugin.Name<'@hey-api/client-axios'> & Client.Config & {
3444
2934
  /**
3445
2935
  * Throw an error instead of returning it in the response?
3446
2936
  *
@@ -3448,13 +2938,10 @@ type UserConfig$26 = Plugin.Name<'@hey-api/client-axios'> & Client$2.Config & {
3448
2938
  */
3449
2939
  throwOnError?: boolean;
3450
2940
  };
3451
- type HeyApiClientAxiosPlugin = DefinePlugin<UserConfig$26, UserConfig$26, IApi$19>;
3452
- //#endregion
3453
- //#region src/plugins/@hey-api/client-fetch/api.d.ts
3454
- type IApi$18 = any;
2941
+ type HeyApiClientAxiosPlugin = DefinePlugin<UserConfig$21, UserConfig$21>;
3455
2942
  //#endregion
3456
2943
  //#region src/plugins/@hey-api/client-fetch/types.d.ts
3457
- type UserConfig$25 = Plugin.Name<'@hey-api/client-fetch'> & Client$2.Config & {
2944
+ type UserConfig$20 = Plugin.Name<'@hey-api/client-fetch'> & Client.Config & {
3458
2945
  /**
3459
2946
  * Throw an error instead of returning it in the response?
3460
2947
  *
@@ -3462,13 +2949,10 @@ type UserConfig$25 = Plugin.Name<'@hey-api/client-fetch'> & Client$2.Config & {
3462
2949
  */
3463
2950
  throwOnError?: boolean;
3464
2951
  };
3465
- type HeyApiClientFetchPlugin = DefinePlugin<UserConfig$25, UserConfig$25, IApi$18>;
3466
- //#endregion
3467
- //#region src/plugins/@hey-api/client-next/api.d.ts
3468
- type IApi$17 = any;
2952
+ type HeyApiClientFetchPlugin = DefinePlugin<UserConfig$20, UserConfig$20>;
3469
2953
  //#endregion
3470
2954
  //#region src/plugins/@hey-api/client-next/types.d.ts
3471
- type UserConfig$24 = Plugin.Name<'@hey-api/client-next'> & Client$2.Config & {
2955
+ type UserConfig$19 = Plugin.Name<'@hey-api/client-next'> & Client.Config & {
3472
2956
  /**
3473
2957
  * Throw an error instead of returning it in the response?
3474
2958
  *
@@ -3476,20 +2960,14 @@ type UserConfig$24 = Plugin.Name<'@hey-api/client-next'> & Client$2.Config & {
3476
2960
  */
3477
2961
  throwOnError?: boolean;
3478
2962
  };
3479
- type HeyApiClientNextPlugin = DefinePlugin<UserConfig$24, UserConfig$24, IApi$17>;
3480
- //#endregion
3481
- //#region src/plugins/@hey-api/client-nuxt/api.d.ts
3482
- type IApi$16 = any;
2963
+ type HeyApiClientNextPlugin = DefinePlugin<UserConfig$19, UserConfig$19>;
3483
2964
  //#endregion
3484
2965
  //#region src/plugins/@hey-api/client-nuxt/types.d.ts
3485
- type UserConfig$23 = Plugin.Name<'@hey-api/client-nuxt'> & Client$2.Config;
3486
- type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$23, UserConfig$23, IApi$16>;
3487
- //#endregion
3488
- //#region src/plugins/@hey-api/client-ofetch/api.d.ts
3489
- type IApi$15 = any;
2966
+ type UserConfig$18 = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
2967
+ type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$18, UserConfig$18>;
3490
2968
  //#endregion
3491
2969
  //#region src/plugins/@hey-api/client-ofetch/types.d.ts
3492
- type UserConfig$22 = Plugin.Name<'@hey-api/client-ofetch'> & Client$2.Config & {
2970
+ type UserConfig$17 = Plugin.Name<'@hey-api/client-ofetch'> & Client.Config & {
3493
2971
  /**
3494
2972
  * Throw an error instead of returning it in the response?
3495
2973
  *
@@ -3497,7 +2975,7 @@ type UserConfig$22 = Plugin.Name<'@hey-api/client-ofetch'> & Client$2.Config & {
3497
2975
  */
3498
2976
  throwOnError?: boolean;
3499
2977
  };
3500
- type HeyApiClientOfetchPlugin = DefinePlugin<UserConfig$22, UserConfig$22, IApi$15>;
2978
+ type HeyApiClientOfetchPlugin = DefinePlugin<UserConfig$17, UserConfig$17>;
3501
2979
  //#endregion
3502
2980
  //#region src/plugins/@hey-api/client-core/types.d.ts
3503
2981
  interface PluginHandler {
@@ -3511,7 +2989,7 @@ interface PluginHandler {
3511
2989
  /**
3512
2990
  * Public Client API.
3513
2991
  */
3514
- declare namespace Client$2 {
2992
+ declare namespace Client {
3515
2993
  export type Config = Plugin.Hooks & {
3516
2994
  /**
3517
2995
  * Set a default base URL when creating the client? You can set `baseUrl`
@@ -3566,11 +3044,8 @@ declare namespace Client$2 {
3566
3044
  };
3567
3045
  }
3568
3046
  //#endregion
3569
- //#region src/plugins/@hey-api/client-angular/api.d.ts
3570
- type IApi$14 = any;
3571
- //#endregion
3572
3047
  //#region src/plugins/@hey-api/client-angular/types.d.ts
3573
- type UserConfig$21 = Plugin.Name<'@hey-api/client-angular'> & Client$2.Config & {
3048
+ type UserConfig$16 = Plugin.Name<'@hey-api/client-angular'> & Client.Config & {
3574
3049
  /**
3575
3050
  * Throw an error instead of returning it in the response?
3576
3051
  *
@@ -3578,27 +3053,7 @@ type UserConfig$21 = Plugin.Name<'@hey-api/client-angular'> & Client$2.Config &
3578
3053
  */
3579
3054
  throwOnError?: boolean;
3580
3055
  };
3581
- type HeyApiClientAngularPlugin = DefinePlugin<UserConfig$21, UserConfig$21, IApi$14>;
3582
- //#endregion
3583
- //#region src/plugins/@hey-api/legacy-angular/types.d.ts
3584
- type UserConfig$20 = Plugin.Name<'legacy/angular'> & Pick<Client$2.Config, 'output'>;
3585
- type HeyApiClientLegacyAngularPlugin = DefinePlugin<UserConfig$20>;
3586
- //#endregion
3587
- //#region src/plugins/@hey-api/legacy-axios/types.d.ts
3588
- type UserConfig$19 = Plugin.Name<'legacy/axios'> & Pick<Client$2.Config, 'output'>;
3589
- type HeyApiClientLegacyAxiosPlugin = DefinePlugin<UserConfig$19>;
3590
- //#endregion
3591
- //#region src/plugins/@hey-api/legacy-fetch/types.d.ts
3592
- type UserConfig$18 = Plugin.Name<'legacy/fetch'> & Pick<Client$2.Config, 'output'>;
3593
- type HeyApiClientLegacyFetchPlugin = DefinePlugin<UserConfig$18>;
3594
- //#endregion
3595
- //#region src/plugins/@hey-api/legacy-node/types.d.ts
3596
- type UserConfig$17 = Plugin.Name<'legacy/node'> & Pick<Client$2.Config, 'output'>;
3597
- type HeyApiClientLegacyNodePlugin = DefinePlugin<UserConfig$17>;
3598
- //#endregion
3599
- //#region src/plugins/@hey-api/legacy-xhr/types.d.ts
3600
- type UserConfig$16 = Plugin.Name<'legacy/xhr'> & Pick<Client$2.Config, 'output'>;
3601
- type HeyApiClientLegacyXhrPlugin = DefinePlugin<UserConfig$16>;
3056
+ type HeyApiClientAngularPlugin = DefinePlugin<UserConfig$16, UserConfig$16>;
3602
3057
  //#endregion
3603
3058
  //#region src/openApi/2.0.x/types/json-schema-draft-4.d.ts
3604
3059
  interface JsonSchemaDraft4 extends EnumExtensions {
@@ -5668,7 +5123,7 @@ interface LinkObject {
5668
5123
  *
5669
5124
  * TODO: examples
5670
5125
  */
5671
- interface MediaTypeObject$1 {
5126
+ interface MediaTypeObject {
5672
5127
  /**
5673
5128
  * A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The `encoding` field SHALL only apply to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#request-body-object Request Body Objects}, and only when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object.
5674
5129
  */
@@ -5847,7 +5302,7 @@ interface ParameterObject$1 {
5847
5302
  /**
5848
5303
  * A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry.
5849
5304
  */
5850
- content?: Record<string, MediaTypeObject$1>;
5305
+ content?: Record<string, MediaTypeObject>;
5851
5306
  /**
5852
5307
  * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`.
5853
5308
  */
@@ -6010,7 +5465,7 @@ interface RequestBodyObject$1 {
6010
5465
  /**
6011
5466
  * **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"`
6012
5467
  */
6013
- content: Record<string, MediaTypeObject$1>;
5468
+ content: Record<string, MediaTypeObject>;
6014
5469
  /**
6015
5470
  * A brief description of the request body. This could contain examples of use. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
6016
5471
  */
@@ -6031,7 +5486,7 @@ interface ResponseObject$1 {
6031
5486
  /**
6032
5487
  * A map containing descriptions of potential response payloads. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"`
6033
5488
  */
6034
- content?: Record<string, MediaTypeObject$1>;
5489
+ content?: Record<string, MediaTypeObject>;
6035
5490
  /**
6036
5491
  * **REQUIRED**. A description of the response. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
6037
5492
  */
@@ -6548,9 +6003,6 @@ interface OpenApiV3_1_XTypes {
6548
6003
  SchemaObject: SchemaObject;
6549
6004
  }
6550
6005
  //#endregion
6551
- //#region src/plugins/@hey-api/schemas/api.d.ts
6552
- type IApi$13 = any;
6553
- //#endregion
6554
6006
  //#region src/plugins/@hey-api/schemas/types.d.ts
6555
6007
  type UserConfig$15 = Plugin.Name<'@hey-api/schemas'> & Plugin.Hooks & {
6556
6008
  /**
@@ -6567,7 +6019,7 @@ type UserConfig$15 = Plugin.Name<'@hey-api/schemas'> & Plugin.Hooks & {
6567
6019
  *
6568
6020
  * @default '{{name}}Schema'
6569
6021
  */
6570
- nameBuilder?: string | ((name: string, schema: OpenApiSchema | OpenApiSchema$1 | OpenApiV2_0_XTypes['SchemaObject'] | OpenApiV3_0_XTypes['ReferenceObject'] | OpenApiV3_0_XTypes['SchemaObject'] | OpenApiV3_1_XTypes['SchemaObject']) => string);
6022
+ nameBuilder?: string | ((name: string, schema: OpenApiV2_0_XTypes['SchemaObject'] | OpenApiV3_0_XTypes['ReferenceObject'] | OpenApiV3_0_XTypes['SchemaObject'] | OpenApiV3_1_XTypes['SchemaObject']) => string);
6571
6023
  /**
6572
6024
  * Choose schema type to generate. Select 'form' if you don't want
6573
6025
  * descriptions to reduce bundle size and you plan to use schemas
@@ -6577,21 +6029,7 @@ type UserConfig$15 = Plugin.Name<'@hey-api/schemas'> & Plugin.Hooks & {
6577
6029
  */
6578
6030
  type?: 'form' | 'json';
6579
6031
  };
6580
- type HeyApiSchemasPlugin = DefinePlugin<UserConfig$15, UserConfig$15, IApi$13>;
6581
- //#endregion
6582
- //#region src/types/client.d.ts
6583
- interface Operation extends Omit<Operation$1, 'tags'> {
6584
- service: string;
6585
- }
6586
- interface Service extends Pick<Model, '$refs' | 'imports' | 'name'> {
6587
- operations: Operation[];
6588
- }
6589
- interface Client extends Omit<Client$1, 'operations'> {
6590
- services: Service[];
6591
- }
6592
- //#endregion
6593
- //#region src/plugins/@hey-api/sdk/api.d.ts
6594
- type IApi$12 = any;
6032
+ type HeyApiSchemasPlugin = DefinePlugin<UserConfig$15, UserConfig$15>;
6595
6033
  //#endregion
6596
6034
  //#region src/plugins/@hey-api/sdk/types.d.ts
6597
6035
  type UserConfig$14 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
@@ -6665,9 +6103,9 @@ type UserConfig$14 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
6665
6103
  instance?: string | boolean;
6666
6104
  /**
6667
6105
  * Customise the name of methods within the service. By default,
6668
- * {@link IR.OperationObject.id} or {@link Operation.name} is used.
6106
+ * {@link IR.OperationObject.id} is used.
6669
6107
  */
6670
- methodNameBuilder?: (operation: IR$1.OperationObject | Operation) => string;
6108
+ methodNameBuilder?: (operation: IR$1.OperationObject) => string;
6671
6109
  // TODO: parser - rename operationId option to something like inferId?: boolean
6672
6110
  /**
6673
6111
  * Use operation ID to generate operation names?
@@ -6768,7 +6206,7 @@ type UserConfig$14 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
6768
6206
  */
6769
6207
  response?: 'body' | 'response';
6770
6208
  };
6771
- type Config$12 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
6209
+ type Config$13 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
6772
6210
  /**
6773
6211
  * Group operation methods into classes? When enabled, you can select which
6774
6212
  * classes to export with `sdk.include` and/or transform their names with
@@ -6839,9 +6277,9 @@ type Config$12 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
6839
6277
  instance: string | boolean;
6840
6278
  /**
6841
6279
  * Customise the name of methods within the service. By default,
6842
- * {@link IR.OperationObject.id} or {@link Operation.name} is used.
6280
+ * {@link IR.OperationObject.id} is used.
6843
6281
  */
6844
- methodNameBuilder?: (operation: IR$1.OperationObject | Operation) => string;
6282
+ methodNameBuilder?: (operation: IR$1.OperationObject) => string;
6845
6283
  // TODO: parser - rename operationId option to something like inferId?: boolean
6846
6284
  /**
6847
6285
  * Use operation ID to generate operation names?
@@ -6924,10 +6362,7 @@ type Config$12 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
6924
6362
  */
6925
6363
  response: 'body' | 'response';
6926
6364
  };
6927
- type HeyApiSdkPlugin = DefinePlugin<UserConfig$14, Config$12, IApi$12>;
6928
- //#endregion
6929
- //#region src/plugins/@hey-api/transformers/api.d.ts
6930
- type IApi$11 = any;
6365
+ type HeyApiSdkPlugin = DefinePlugin<UserConfig$14, Config$13>;
6931
6366
  //#endregion
6932
6367
  //#region src/plugins/@hey-api/transformers/expressions.d.ts
6933
6368
  type ExpressionTransformer = ({
@@ -6979,7 +6414,7 @@ type UserConfig$13 = Plugin.Name<'@hey-api/transformers'> & Plugin.Hooks & {
6979
6414
  */
6980
6415
  typeTransformers?: ReadonlyArray<TypeTransformer>;
6981
6416
  };
6982
- type Config$11 = Plugin.Name<'@hey-api/transformers'> & Plugin.Hooks & {
6417
+ type Config$12 = Plugin.Name<'@hey-api/transformers'> & Plugin.Hooks & {
6983
6418
  /**
6984
6419
  * Convert long integers into BigInt values?
6985
6420
  *
@@ -7008,7 +6443,7 @@ type Config$11 = Plugin.Name<'@hey-api/transformers'> & Plugin.Hooks & {
7008
6443
  */
7009
6444
  typeTransformers: ReadonlyArray<TypeTransformer>;
7010
6445
  };
7011
- type HeyApiTransformersPlugin = DefinePlugin<UserConfig$13, Config$11, IApi$11>;
6446
+ type HeyApiTransformersPlugin = DefinePlugin<UserConfig$13, Config$12>;
7012
6447
  //#endregion
7013
6448
  //#region src/plugins/@hey-api/typescript/shared/types.d.ts
7014
6449
  type IrSchemaToAstOptions = {
@@ -7027,7 +6462,7 @@ declare const irSchemaToAst: ({
7027
6462
  }) => ts.TypeNode;
7028
6463
  //#endregion
7029
6464
  //#region src/plugins/@hey-api/typescript/api.d.ts
7030
- type IApi$10 = {
6465
+ type IApi$3 = {
7031
6466
  schemaToType: (args: Parameters<typeof irSchemaToAst>[0]) => ts.TypeNode;
7032
6467
  };
7033
6468
  //#endregion
@@ -7254,39 +6689,8 @@ type UserConfig$12 = Plugin.Name<'@hey-api/typescript'> & Plugin.Hooks & {
7254
6689
  */
7255
6690
  payload?: StringName;
7256
6691
  };
7257
-
7258
- // DEPRECATED OPTIONS BELOW
7259
-
7260
- /**
7261
- * **This feature works only with the legacy parser**
7262
- *
7263
- * Include only types matching regular expression.
7264
- *
7265
- * @deprecated
7266
- */
7267
- // eslint-disable-next-line typescript-sort-keys/interface
7268
- include?: string;
7269
- /**
7270
- * **This feature works only with the legacy parser**
7271
- *
7272
- * Use your preferred naming pattern
7273
- *
7274
- * @deprecated
7275
- * @default 'preserve'
7276
- */
7277
- style?: 'PascalCase' | 'preserve';
7278
- /**
7279
- * **This feature works only with the legacy parser**
7280
- *
7281
- * Generate a tree of types containing all operations? It will be named
7282
- * $OpenApiTs.
7283
- *
7284
- * @deprecated
7285
- * @default false
7286
- */
7287
- tree?: boolean;
7288
6692
  };
7289
- type Config$10 = Plugin.Name<'@hey-api/typescript'> & Plugin.Hooks & {
6693
+ type Config$11 = Plugin.Name<'@hey-api/typescript'> & Plugin.Hooks & {
7290
6694
  /**
7291
6695
  * The casing convention to use for generated names.
7292
6696
  *
@@ -7475,42 +6879,8 @@ type Config$10 = Plugin.Name<'@hey-api/typescript'> & Plugin.Hooks & {
7475
6879
  */
7476
6880
  payload: StringName;
7477
6881
  };
7478
-
7479
- // DEPRECATED OPTIONS BELOW
7480
-
7481
- /**
7482
- * **This feature works only with the legacy parser**
7483
- *
7484
- * Include only types matching regular expression.
7485
- *
7486
- * @deprecated
7487
- */
7488
- // eslint-disable-next-line typescript-sort-keys/interface
7489
- include?: string;
7490
- /**
7491
- * **This feature works only with the legacy parser**
7492
- *
7493
- * Use your preferred naming pattern
7494
- *
7495
- * @deprecated
7496
- * @default 'preserve'
7497
- */
7498
- style: 'PascalCase' | 'preserve';
7499
- /**
7500
- * **This feature works only with the legacy parser**
7501
- *
7502
- * Generate a tree of types containing all operations? It will be named
7503
- * $OpenApiTs.
7504
- *
7505
- * @deprecated
7506
- * @default false
7507
- */
7508
- tree: boolean;
7509
6882
  };
7510
- type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$12, Config$10, IApi$10>;
7511
- //#endregion
7512
- //#region src/plugins/@pinia/colada/api.d.ts
7513
- type IApi$9 = any;
6883
+ type HeyApiTypeScriptPlugin = DefinePlugin<UserConfig$12, Config$11, IApi$3>;
7514
6884
  //#endregion
7515
6885
  //#region src/plugins/@pinia/colada/types.d.ts
7516
6886
  type UserConfig$11 = Plugin.Name<'@pinia/colada'> & Plugin.Hooks & {
@@ -7691,7 +7061,7 @@ type UserConfig$11 = Plugin.Name<'@pinia/colada'> & Plugin.Hooks & {
7691
7061
  name?: StringName;
7692
7062
  };
7693
7063
  };
7694
- type Config$9 = Plugin.Name<'@pinia/colada'> & Plugin.Hooks & {
7064
+ type Config$10 = Plugin.Name<'@pinia/colada'> & Plugin.Hooks & {
7695
7065
  /**
7696
7066
  * The casing convention to use for generated names.
7697
7067
  *
@@ -7840,10 +7210,7 @@ type Config$9 = Plugin.Name<'@pinia/colada'> & Plugin.Hooks & {
7840
7210
  name: StringName;
7841
7211
  };
7842
7212
  };
7843
- type PiniaColadaPlugin = DefinePlugin<UserConfig$11, Config$9, IApi$9>;
7844
- //#endregion
7845
- //#region src/plugins/@tanstack/angular-query-experimental/api.d.ts
7846
- type IApi$8 = any;
7213
+ type PiniaColadaPlugin = DefinePlugin<UserConfig$11, Config$10>;
7847
7214
  //#endregion
7848
7215
  //#region src/plugins/@tanstack/angular-query-experimental/types.d.ts
7849
7216
  type UserConfig$10 = Plugin.Name<'@tanstack/angular-query-experimental'> & Plugin.Hooks & {
@@ -8127,7 +7494,7 @@ type UserConfig$10 = Plugin.Name<'@tanstack/angular-query-experimental'> & Plugi
8127
7494
  name?: StringName;
8128
7495
  };
8129
7496
  };
8130
- type Config$8 = Plugin.Name<'@tanstack/angular-query-experimental'> & Plugin.Hooks & {
7497
+ type Config$9 = Plugin.Name<'@tanstack/angular-query-experimental'> & Plugin.Hooks & {
8131
7498
  /**
8132
7499
  * The casing convention to use for generated names.
8133
7500
  *
@@ -8368,10 +7735,7 @@ type Config$8 = Plugin.Name<'@tanstack/angular-query-experimental'> & Plugin.Hoo
8368
7735
  name: StringName;
8369
7736
  };
8370
7737
  };
8371
- type TanStackAngularQueryPlugin = DefinePlugin<UserConfig$10, Config$8, IApi$8>;
8372
- //#endregion
8373
- //#region src/plugins/@tanstack/react-query/api.d.ts
8374
- type IApi$7 = any;
7738
+ type TanStackAngularQueryPlugin = DefinePlugin<UserConfig$10, Config$9>;
8375
7739
  //#endregion
8376
7740
  //#region src/plugins/@tanstack/react-query/types.d.ts
8377
7741
  type UserConfig$9 = Plugin.Name<'@tanstack/react-query'> & Plugin.Hooks & {
@@ -8699,7 +8063,7 @@ type UserConfig$9 = Plugin.Name<'@tanstack/react-query'> & Plugin.Hooks & {
8699
8063
  name?: StringName;
8700
8064
  };
8701
8065
  };
8702
- type Config$7 = Plugin.Name<'@tanstack/react-query'> & Plugin.Hooks & {
8066
+ type Config$8 = Plugin.Name<'@tanstack/react-query'> & Plugin.Hooks & {
8703
8067
  /**
8704
8068
  * The casing convention to use for generated names.
8705
8069
  *
@@ -8971,10 +8335,7 @@ type Config$7 = Plugin.Name<'@tanstack/react-query'> & Plugin.Hooks & {
8971
8335
  name: StringName;
8972
8336
  };
8973
8337
  };
8974
- type TanStackReactQueryPlugin = DefinePlugin<UserConfig$9, Config$7, IApi$7>;
8975
- //#endregion
8976
- //#region src/plugins/@tanstack/solid-query/api.d.ts
8977
- type IApi$6 = any;
8338
+ type TanStackReactQueryPlugin = DefinePlugin<UserConfig$9, Config$8>;
8978
8339
  //#endregion
8979
8340
  //#region src/plugins/@tanstack/solid-query/types.d.ts
8980
8341
  type UserConfig$8 = Plugin.Name<'@tanstack/solid-query'> & Plugin.Hooks & {
@@ -9259,7 +8620,7 @@ type UserConfig$8 = Plugin.Name<'@tanstack/solid-query'> & Plugin.Hooks & {
9259
8620
  name?: StringName;
9260
8621
  };
9261
8622
  };
9262
- type Config$6 = Plugin.Name<'@tanstack/solid-query'> & Plugin.Hooks & {
8623
+ type Config$7 = Plugin.Name<'@tanstack/solid-query'> & Plugin.Hooks & {
9263
8624
  /**
9264
8625
  * The casing convention to use for generated names.
9265
8626
  *
@@ -9500,10 +8861,7 @@ type Config$6 = Plugin.Name<'@tanstack/solid-query'> & Plugin.Hooks & {
9500
8861
  name: StringName;
9501
8862
  };
9502
8863
  };
9503
- type TanStackSolidQueryPlugin = DefinePlugin<UserConfig$8, Config$6, IApi$6>;
9504
- //#endregion
9505
- //#region src/plugins/@tanstack/svelte-query/api.d.ts
9506
- type IApi$5 = any;
8864
+ type TanStackSolidQueryPlugin = DefinePlugin<UserConfig$8, Config$7>;
9507
8865
  //#endregion
9508
8866
  //#region src/plugins/@tanstack/svelte-query/types.d.ts
9509
8867
  type UserConfig$7 = Plugin.Name<'@tanstack/svelte-query'> & Plugin.Hooks & {
@@ -9787,7 +9145,7 @@ type UserConfig$7 = Plugin.Name<'@tanstack/svelte-query'> & Plugin.Hooks & {
9787
9145
  name?: StringName;
9788
9146
  };
9789
9147
  };
9790
- type Config$5 = Plugin.Name<'@tanstack/svelte-query'> & Plugin.Hooks & {
9148
+ type Config$6 = Plugin.Name<'@tanstack/svelte-query'> & Plugin.Hooks & {
9791
9149
  /**
9792
9150
  * The casing convention to use for generated names.
9793
9151
  *
@@ -10028,10 +9386,7 @@ type Config$5 = Plugin.Name<'@tanstack/svelte-query'> & Plugin.Hooks & {
10028
9386
  name: StringName;
10029
9387
  };
10030
9388
  };
10031
- type TanStackSvelteQueryPlugin = DefinePlugin<UserConfig$7, Config$5, IApi$5>;
10032
- //#endregion
10033
- //#region src/plugins/@tanstack/vue-query/api.d.ts
10034
- type IApi$4 = any;
9389
+ type TanStackSvelteQueryPlugin = DefinePlugin<UserConfig$7, Config$6>;
10035
9390
  //#endregion
10036
9391
  //#region src/plugins/@tanstack/vue-query/types.d.ts
10037
9392
  type UserConfig$6 = Plugin.Name<'@tanstack/vue-query'> & Plugin.Hooks & {
@@ -10318,7 +9673,7 @@ type UserConfig$6 = Plugin.Name<'@tanstack/vue-query'> & Plugin.Hooks & {
10318
9673
  name?: StringName;
10319
9674
  };
10320
9675
  };
10321
- type Config$4 = Plugin.Name<'@tanstack/vue-query'> & Plugin.Hooks & {
9676
+ type Config$5 = Plugin.Name<'@tanstack/vue-query'> & Plugin.Hooks & {
10322
9677
  /**
10323
9678
  * The casing convention to use for generated names.
10324
9679
  *
@@ -10562,7 +9917,7 @@ type Config$4 = Plugin.Name<'@tanstack/vue-query'> & Plugin.Hooks & {
10562
9917
  name: StringName;
10563
9918
  };
10564
9919
  };
10565
- type TanStackVueQueryPlugin = DefinePlugin<UserConfig$6, Config$4, IApi$4>;
9920
+ type TanStackVueQueryPlugin = DefinePlugin<UserConfig$6, Config$5>;
10566
9921
  //#endregion
10567
9922
  //#region src/plugins/arktype/shared/types.d.ts
10568
9923
  type ValidatorArgs$2 = {
@@ -10571,7 +9926,7 @@ type ValidatorArgs$2 = {
10571
9926
  };
10572
9927
  //#endregion
10573
9928
  //#region src/plugins/arktype/api.d.ts
10574
- type IApi$3 = {
9929
+ type IApi$2 = {
10575
9930
  createRequestValidator: (args: ValidatorArgs$2) => ts.ArrowFunction | undefined;
10576
9931
  createResponseValidator: (args: ValidatorArgs$2) => ts.ArrowFunction | undefined;
10577
9932
  };
@@ -10922,7 +10277,7 @@ type UserConfig$5 = Plugin.Name<'arktype'> & Plugin.Hooks & {
10922
10277
  };
10923
10278
  };
10924
10279
  };
10925
- type Config$3 = Plugin.Name<'arktype'> & Plugin.Hooks & {
10280
+ type Config$4 = Plugin.Name<'arktype'> & Plugin.Hooks & {
10926
10281
  /**
10927
10282
  * The casing convention to use for generated names.
10928
10283
  *
@@ -11206,10 +10561,7 @@ type Config$3 = Plugin.Name<'arktype'> & Plugin.Hooks & {
11206
10561
  };
11207
10562
  };
11208
10563
  };
11209
- type ArktypePlugin = DefinePlugin<UserConfig$5, Config$3, IApi$3>;
11210
- //#endregion
11211
- //#region src/plugins/fastify/api.d.ts
11212
- type IApi$2 = any;
10564
+ type ArktypePlugin = DefinePlugin<UserConfig$5, Config$4, IApi$2>;
11213
10565
  //#endregion
11214
10566
  //#region src/plugins/fastify/types.d.ts
11215
10567
  type UserConfig$4 = Plugin.Name<'fastify'> & Plugin.Hooks & {
@@ -11221,22 +10573,10 @@ type UserConfig$4 = Plugin.Name<'fastify'> & Plugin.Hooks & {
11221
10573
  */
11222
10574
  exportFromIndex?: boolean;
11223
10575
  };
11224
- type FastifyPlugin = DefinePlugin<UserConfig$4, UserConfig$4, IApi$2>;
11225
- //#endregion
11226
- //#region src/plugins/valibot/shared/types.d.ts
11227
- type ValidatorArgs$1 = {
11228
- operation: IR$1.OperationObject;
11229
- plugin: ValibotPlugin['Instance'];
11230
- };
11231
- //#endregion
11232
- //#region src/plugins/valibot/api.d.ts
11233
- type IApi$1 = {
11234
- createRequestValidator: (args: ValidatorArgs$1) => ts.ArrowFunction | undefined;
11235
- createResponseValidator: (args: ValidatorArgs$1) => ts.ArrowFunction | undefined;
11236
- };
10576
+ type FastifyPlugin = DefinePlugin<UserConfig$4, UserConfig$4>;
11237
10577
  //#endregion
11238
- //#region src/plugins/valibot/types.d.ts
11239
- type UserConfig$3 = Plugin.Name<'valibot'> & Plugin.Hooks & {
10578
+ //#region src/plugins/swr/types.d.ts
10579
+ type UserConfig$3 = Plugin.Name<'swr'> & Plugin.Hooks & {
11240
10580
  /**
11241
10581
  * The casing convention to use for generated names.
11242
10582
  *
@@ -11244,23 +10584,36 @@ type UserConfig$3 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11244
10584
  */
11245
10585
  case?: StringCase;
11246
10586
  /**
11247
- * Add comments from input to the generated Valibot schemas?
10587
+ * Add comments from SDK functions to the generated SWR code?
10588
+ *
10589
+ * Duplicating comments this way is useful so you don't need to drill into
10590
+ * the underlying SDK function to learn what it does or whether it's
10591
+ * deprecated. You can set this option to `false` if you prefer less
10592
+ * comment duplication.
11248
10593
  *
11249
10594
  * @default true
11250
10595
  */
11251
10596
  comments?: boolean;
11252
10597
  /**
11253
- * Configuration for reusable schema definitions.
10598
+ * Should the exports from the generated files be re-exported in the index
10599
+ * barrel file?
11254
10600
  *
11255
- * Controls generation of shared Valibot schemas that can be referenced
11256
- * across requests and responses.
10601
+ * @default false
10602
+ */
10603
+ exportFromIndex?: boolean;
10604
+ /**
10605
+ * Configuration for generated infinite query key helpers.
10606
+ *
10607
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
11257
10608
  *
11258
10609
  * Can be:
11259
10610
  * - `boolean`: Shorthand for `{ enabled: boolean }`
11260
10611
  * - `string` or `function`: Shorthand for `{ name: string | function }`
11261
10612
  * - `object`: Full configuration object
10613
+ *
10614
+ * @default true
11262
10615
  */
11263
- definitions?: boolean | StringName | {
10616
+ infiniteQueryKeys?: boolean | StringName | {
11264
10617
  /**
11265
10618
  * The casing convention to use for generated names.
11266
10619
  *
@@ -11268,46 +10621,99 @@ type UserConfig$3 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11268
10621
  */
11269
10622
  case?: StringCase;
11270
10623
  /**
11271
- * Whether to generate Valibot schemas for reusable definitions.
10624
+ * Whether to generate infinite query key helpers.
11272
10625
  *
11273
10626
  * @default true
11274
10627
  */
11275
10628
  enabled?: boolean;
11276
10629
  /**
11277
- * Custom naming pattern for generated schema names. The name variable
11278
- * is obtained from the schema name.
10630
+ * Custom naming pattern for generated infinite query key names. The name variable is
10631
+ * obtained from the SDK function name.
11279
10632
  *
11280
- * @default 'v{{name}}'
10633
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
10634
+ *
10635
+ * @default '{{name}}InfiniteQueryKey'
11281
10636
  */
11282
10637
  name?: StringName;
10638
+ /**
10639
+ * Whether to include operation tags in infinite query keys.
10640
+ * This will make query keys larger but provides better cache invalidation capabilities.
10641
+ *
10642
+ * @default false
10643
+ */
10644
+ tags?: boolean;
11283
10645
  };
11284
10646
  /**
11285
- * Should the exports from the generated files be re-exported in the index
11286
- * barrel file?
10647
+ * Configuration for generated infinite query options helpers.
11287
10648
  *
11288
- * @default false
11289
- */
11290
- exportFromIndex?: boolean;
11291
- /**
11292
- * Enable Valibot metadata support? It's often useful to associate a schema
11293
- * with some additional metadata for documentation, code generation, AI
11294
- * structured outputs, form validation, and other purposes.
10649
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
11295
10650
  *
11296
- * @default false
10651
+ * Can be:
10652
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10653
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10654
+ * - `object`: Full configuration object
10655
+ *
10656
+ * @default true
11297
10657
  */
11298
- metadata?: boolean;
10658
+ infiniteQueryOptions?: boolean | StringName | {
10659
+ /**
10660
+ * The casing convention to use for generated names.
10661
+ *
10662
+ * @default 'camelCase'
10663
+ */
10664
+ case?: StringCase;
10665
+ /**
10666
+ * Whether to generate infinite query options helpers.
10667
+ *
10668
+ * @default true
10669
+ */
10670
+ enabled?: boolean;
10671
+ /**
10672
+ * Custom function to generate metadata for the operation.
10673
+ * Can return any valid meta object that will be included in the generated infinite query options.
10674
+ *
10675
+ * @param operation - The operation object containing all available metadata
10676
+ * @returns A meta object with any properties you want to include
10677
+ *
10678
+ * @example
10679
+ * ```typescript
10680
+ * meta: (operation) => ({
10681
+ * customField: operation.id,
10682
+ * isDeprecated: operation.deprecated,
10683
+ * tags: operation.tags,
10684
+ * customObject: {
10685
+ * method: operation.method,
10686
+ * path: operation.path
10687
+ * }
10688
+ * })
10689
+ * ```
10690
+ *
10691
+ * @default undefined
10692
+ */
10693
+ meta?: (operation: IR$1.OperationObject) => Record<string, unknown>;
10694
+ /**
10695
+ * Custom naming pattern for generated infinite query options names. The name variable is
10696
+ * obtained from the SDK function name.
10697
+ *
10698
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
10699
+ *
10700
+ * @default '{{name}}InfiniteOptions'
10701
+ */
10702
+ name?: StringName;
10703
+ };
11299
10704
  /**
11300
- * Configuration for request-specific Valibot schemas.
10705
+ * Configuration for generated mutation options helpers.
11301
10706
  *
11302
- * Controls generation of Valibot schemas for request bodies, query
11303
- * parameters, path parameters, and headers.
10707
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}
11304
10708
  *
11305
10709
  * Can be:
11306
10710
  * - `boolean`: Shorthand for `{ enabled: boolean }`
11307
10711
  * - `string` or `function`: Shorthand for `{ name: string | function }`
11308
10712
  * - `object`: Full configuration object
10713
+ *
10714
+ * @default true
11309
10715
  */
11310
- requests?: boolean | StringName | {
10716
+ mutationOptions?: boolean | StringName | {
11311
10717
  /**
11312
10718
  * The casing convention to use for generated names.
11313
10719
  *
@@ -11315,31 +10721,57 @@ type UserConfig$3 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11315
10721
  */
11316
10722
  case?: StringCase;
11317
10723
  /**
11318
- * Whether to generate Valibot schemas for request definitions.
10724
+ * Whether to generate mutation options helpers.
11319
10725
  *
11320
10726
  * @default true
11321
10727
  */
11322
10728
  enabled?: boolean;
11323
10729
  /**
11324
- * Custom naming pattern for generated schema names. The name variable
11325
- * is obtained from the operation name.
10730
+ * Custom function to generate metadata for the operation.
10731
+ * Can return any valid meta object that will be included in the generated mutation options.
11326
10732
  *
11327
- * @default 'v{{name}}Data'
10733
+ * @param operation - The operation object containing all available metadata
10734
+ * @returns A meta object with any properties you want to include
10735
+ *
10736
+ * @example
10737
+ * ```typescript
10738
+ * meta: (operation) => ({
10739
+ * customField: operation.id,
10740
+ * isDeprecated: operation.deprecated,
10741
+ * tags: operation.tags,
10742
+ * customObject: {
10743
+ * method: operation.method,
10744
+ * path: operation.path
10745
+ * }
10746
+ * })
10747
+ * ```
10748
+ *
10749
+ * @default undefined
10750
+ */
10751
+ meta?: (operation: IR$1.OperationObject) => Record<string, unknown>;
10752
+ /**
10753
+ * Custom naming pattern for generated mutation options names. The name variable is
10754
+ * obtained from the SDK function name.
10755
+ *
10756
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}
10757
+ *
10758
+ * @default '{{name}}Mutation'
11328
10759
  */
11329
10760
  name?: StringName;
11330
10761
  };
11331
10762
  /**
11332
- * Configuration for response-specific Valibot schemas.
10763
+ * Configuration for generated query keys.
11333
10764
  *
11334
- * Controls generation of Valibot schemas for response bodies, error
11335
- * responses, and status codes.
10765
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryKey queryKey}
11336
10766
  *
11337
10767
  * Can be:
11338
10768
  * - `boolean`: Shorthand for `{ enabled: boolean }`
11339
10769
  * - `string` or `function`: Shorthand for `{ name: string | function }`
11340
10770
  * - `object`: Full configuration object
10771
+ *
10772
+ * @default true
11341
10773
  */
11342
- responses?: boolean | StringName | {
10774
+ queryKeys?: boolean | StringName | {
11343
10775
  /**
11344
10776
  * The casing convention to use for generated names.
11345
10777
  *
@@ -11347,23 +10779,32 @@ type UserConfig$3 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11347
10779
  */
11348
10780
  case?: StringCase;
11349
10781
  /**
11350
- * Whether to generate Valibot schemas for response definitions.
10782
+ * Whether to generate query keys.
11351
10783
  *
11352
10784
  * @default true
11353
10785
  */
11354
10786
  enabled?: boolean;
11355
10787
  /**
11356
- * Custom naming pattern for generated schema names. The name variable
11357
- * is obtained from the operation name.
10788
+ * Custom naming pattern for generated query key names. The name variable is
10789
+ * obtained from the SDK function name.
11358
10790
  *
11359
- * @default 'v{{name}}Response'
10791
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys Query Keys}
10792
+ *
10793
+ * @default '{{name}}QueryKey'
11360
10794
  */
11361
10795
  name?: StringName;
10796
+ /**
10797
+ * Whether to include operation tags in query keys.
10798
+ * This will make query keys larger but provides better cache invalidation capabilities.
10799
+ *
10800
+ * @default false
10801
+ */
10802
+ tags?: boolean;
11362
10803
  };
11363
10804
  /**
11364
- * Configuration for webhook-specific Valibot schemas.
10805
+ * Configuration for generated query options helpers.
11365
10806
  *
11366
- * Controls generation of Valibot schemas for webhook payloads.
10807
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}
11367
10808
  *
11368
10809
  * Can be:
11369
10810
  * - `boolean`: Shorthand for `{ enabled: boolean }`
@@ -11372,7 +10813,7 @@ type UserConfig$3 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11372
10813
  *
11373
10814
  * @default true
11374
10815
  */
11375
- webhooks?: boolean | StringName | {
10816
+ queryOptions?: boolean | StringName | {
11376
10817
  /**
11377
10818
  * The casing convention to use for generated names.
11378
10819
  *
@@ -11380,82 +10821,111 @@ type UserConfig$3 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11380
10821
  */
11381
10822
  case?: StringCase;
11382
10823
  /**
11383
- * Whether to generate Valibot schemas for webhook definitions.
10824
+ * Whether to generate query options helpers.
11384
10825
  *
11385
10826
  * @default true
11386
10827
  */
11387
10828
  enabled?: boolean;
11388
10829
  /**
11389
- * Custom naming pattern for generated schema names. The name variable
11390
- * is obtained from the webhook key.
10830
+ * Whether to export generated symbols.
11391
10831
  *
11392
- * @default 'v{{name}}WebhookRequest'
10832
+ * @default true
10833
+ */
10834
+ exported?: boolean;
10835
+ /**
10836
+ * Custom function to generate metadata for the operation.
10837
+ * Can return any valid meta object that will be included in the generated query options.
10838
+ *
10839
+ * @param operation - The operation object containing all available metadata
10840
+ * @returns A meta object with any properties you want to include
10841
+ *
10842
+ * @example
10843
+ * ```typescript
10844
+ * meta: (operation) => ({
10845
+ * customField: operation.id,
10846
+ * isDeprecated: operation.deprecated,
10847
+ * tags: operation.tags,
10848
+ * customObject: {
10849
+ * method: operation.method,
10850
+ * path: operation.path
10851
+ * }
10852
+ * })
10853
+ * ```
10854
+ *
10855
+ * @default undefined
10856
+ */
10857
+ meta?: (operation: IR$1.OperationObject) => Record<string, unknown>;
10858
+ /**
10859
+ * Custom naming pattern for generated query options names. The name variable is
10860
+ * obtained from the SDK function name.
10861
+ *
10862
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}
10863
+ *
10864
+ * @default '{{name}}Options'
11393
10865
  */
11394
10866
  name?: StringName;
11395
10867
  };
11396
- };
11397
- type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11398
10868
  /**
11399
- * The casing convention to use for generated names.
10869
+ * Configuration for generated `useSwr()` function helpers.
11400
10870
  *
11401
- * @default 'camelCase'
11402
- */
11403
- case: StringCase;
11404
- /**
11405
- * Add comments from input to the generated Valibot schemas?
10871
+ * See {@link https://swr.vercel.app/docs/api API}
11406
10872
  *
11407
- * @default true
11408
- */
11409
- comments: boolean;
11410
- /**
11411
- * Configuration for reusable schema definitions.
10873
+ * Can be:
10874
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10875
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10876
+ * - `object`: Full configuration object
11412
10877
  *
11413
- * Controls generation of shared Valibot schemas that can be referenced
11414
- * across requests and responses.
10878
+ * @default true
11415
10879
  */
11416
- definitions: {
10880
+ useSwr?: boolean | StringName | {
11417
10881
  /**
11418
10882
  * The casing convention to use for generated names.
11419
10883
  *
11420
10884
  * @default 'camelCase'
11421
10885
  */
11422
- case: StringCase;
10886
+ case?: StringCase;
11423
10887
  /**
11424
- * Whether to generate Valibot schemas for reusable definitions.
10888
+ * Whether to generate `useSwr()` function helpers.
11425
10889
  *
11426
10890
  * @default true
11427
10891
  */
11428
- enabled: boolean;
10892
+ enabled?: boolean;
11429
10893
  /**
11430
- * Custom naming pattern for generated schema names. The name variable is
11431
- * obtained from the schema name.
10894
+ * Custom naming pattern for generated `useSwr()` function names. The name variable is
10895
+ * obtained from the SDK function name.
11432
10896
  *
11433
- * @default 'v{{name}}'
10897
+ * See {@link https://swr.vercel.app/docs/api API}
10898
+ *
10899
+ * @default 'use{{name}}'
11434
10900
  */
11435
- name: StringName;
10901
+ name?: StringName;
11436
10902
  };
10903
+ };
10904
+ type Config$3 = Plugin.Name<'swr'> & Plugin.Hooks & {
11437
10905
  /**
11438
- * Should the exports from the generated files be re-exported in the index
11439
- * barrel file?
10906
+ * The casing convention to use for generated names.
11440
10907
  *
11441
- * @default false
10908
+ * @default 'camelCase'
11442
10909
  */
11443
- exportFromIndex: boolean;
10910
+ case: StringCase;
11444
10911
  /**
11445
- * Enable Valibot metadata support? It's often useful to associate a schema
11446
- * with some additional metadata for documentation, code generation, AI
11447
- * structured outputs, form validation, and other purposes.
10912
+ * Add comments from SDK functions to the generated SWR code?
10913
+ *
10914
+ * @default true
10915
+ */
10916
+ comments: boolean;
10917
+ /**
10918
+ * Should the exports from the generated files be re-exported in the index barrel file?
11448
10919
  *
11449
10920
  * @default false
11450
10921
  */
11451
- metadata: boolean;
10922
+ exportFromIndex: boolean;
11452
10923
  /**
11453
- * Configuration for request-specific Valibot schemas.
10924
+ * Resolved configuration for generated infinite query key helpers.
11454
10925
  *
11455
- * Controls generation of Valibot schemas for request bodies, query
11456
- * parameters, path parameters, and headers.
10926
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
11457
10927
  */
11458
- requests: {
10928
+ infiniteQueryKeys: {
11459
10929
  /**
11460
10930
  * The casing convention to use for generated names.
11461
10931
  *
@@ -11463,26 +10933,33 @@ type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11463
10933
  */
11464
10934
  case: StringCase;
11465
10935
  /**
11466
- * Whether to generate Valibot schemas for request definitions.
10936
+ * Whether to generate infinite query key helpers.
11467
10937
  *
11468
10938
  * @default true
11469
10939
  */
11470
10940
  enabled: boolean;
11471
10941
  /**
11472
- * Custom naming pattern for generated schema names. The name variable is
11473
- * obtained from the operation name.
10942
+ * Custom naming pattern for generated infinite query key names. The name variable is obtained from the SDK function name.
11474
10943
  *
11475
- * @default 'v{{name}}Data'
10944
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
10945
+ *
10946
+ * @default '{{name}}InfiniteQueryKey'
11476
10947
  */
11477
10948
  name: StringName;
10949
+ /**
10950
+ * Whether to include operation tags in infinite query keys.
10951
+ * This will make query keys larger but provides better cache invalidation capabilities.
10952
+ *
10953
+ * @default false
10954
+ */
10955
+ tags: boolean;
11478
10956
  };
11479
10957
  /**
11480
- * Configuration for response-specific Valibot schemas.
10958
+ * Resolved configuration for generated infinite query options helpers.
11481
10959
  *
11482
- * Controls generation of Valibot schemas for response bodies, error
11483
- * responses, and status codes.
10960
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
11484
10961
  */
11485
- responses: {
10962
+ infiniteQueryOptions: {
11486
10963
  /**
11487
10964
  * The casing convention to use for generated names.
11488
10965
  *
@@ -11490,25 +10967,49 @@ type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11490
10967
  */
11491
10968
  case: StringCase;
11492
10969
  /**
11493
- * Whether to generate Valibot schemas for response definitions.
10970
+ * Whether to generate infinite query options helpers.
11494
10971
  *
11495
10972
  * @default true
11496
10973
  */
11497
10974
  enabled: boolean;
11498
10975
  /**
11499
- * Custom naming pattern for generated schema names. The name variable is
11500
- * obtained from the operation name.
10976
+ * Custom function to generate metadata for the operation.
10977
+ * Can return any valid meta object that will be included in the generated infinite query options.
11501
10978
  *
11502
- * @default 'v{{name}}Response'
11503
- */
11504
- name: StringName;
11505
- };
11506
- /**
11507
- * Configuration for webhook-specific Valibot schemas.
11508
- *
11509
- * Controls generation of Valibot schemas for webhook payloads.
11510
- */
11511
- webhooks: {
10979
+ * @param operation - The operation object containing all available metadata
10980
+ * @returns A meta object with any properties you want to include
10981
+ *
10982
+ * @example
10983
+ * ```typescript
10984
+ * meta: (operation) => ({
10985
+ * customField: operation.id,
10986
+ * isDeprecated: operation.deprecated,
10987
+ * tags: operation.tags,
10988
+ * customObject: {
10989
+ * method: operation.method,
10990
+ * path: operation.path
10991
+ * }
10992
+ * })
10993
+ * ```
10994
+ *
10995
+ * @default undefined
10996
+ */
10997
+ meta: (operation: IR$1.OperationObject) => Record<string, unknown>;
10998
+ /**
10999
+ * Custom naming pattern for generated infinite query options names. The name variable is obtained from the SDK function name.
11000
+ *
11001
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/infiniteQueryOptions infiniteQueryOptions}
11002
+ *
11003
+ * @default '{{name}}InfiniteOptions'
11004
+ */
11005
+ name: StringName;
11006
+ };
11007
+ /**
11008
+ * Resolved configuration for generated mutation options helpers.
11009
+ *
11010
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}
11011
+ */
11012
+ mutationOptions: {
11512
11013
  /**
11513
11014
  * The casing convention to use for generated names.
11514
11015
  *
@@ -11516,97 +11017,200 @@ type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11516
11017
  */
11517
11018
  case: StringCase;
11518
11019
  /**
11519
- * Whether to generate Valibot schemas for webhook definitions.
11020
+ * Whether to generate mutation options helpers.
11520
11021
  *
11521
11022
  * @default true
11522
11023
  */
11523
11024
  enabled: boolean;
11524
11025
  /**
11525
- * Custom naming pattern for generated schema names. The name variable
11526
- * is obtained from the webhook key.
11026
+ * Custom function to generate metadata for the operation.
11027
+ * Can return any valid meta object that will be included in the generated mutation options.
11527
11028
  *
11528
- * @default 'v{{name}}WebhookRequest'
11029
+ * @param operation - The operation object containing all available metadata
11030
+ * @returns A meta object with any properties you want to include
11031
+ *
11032
+ * @example
11033
+ * ```typescript
11034
+ * meta: (operation) => ({
11035
+ * customField: operation.id,
11036
+ * isDeprecated: operation.deprecated,
11037
+ * tags: operation.tags,
11038
+ * customObject: {
11039
+ * method: operation.method,
11040
+ * path: operation.path
11041
+ * }
11042
+ * })
11043
+ * ```
11044
+ *
11045
+ * @default undefined
11046
+ */
11047
+ meta: (operation: IR$1.OperationObject) => Record<string, unknown>;
11048
+ /**
11049
+ * Custom naming pattern for generated mutation options names. The name variable is obtained from the SDK function name.
11050
+ *
11051
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/useMutation useMutation}
11052
+ *
11053
+ * @default '{{name}}Mutation'
11529
11054
  */
11530
11055
  name: StringName;
11531
11056
  };
11532
- };
11533
- type ValibotPlugin = DefinePlugin<UserConfig$3, Config$2, IApi$1>;
11534
- //#endregion
11535
- //#region src/plugins/zod/shared/types.d.ts
11536
- type ValidatorArgs = {
11537
- operation: IR$1.OperationObject;
11538
- plugin: ZodPlugin['Instance'];
11539
- };
11540
- //#endregion
11541
- //#region src/plugins/zod/api.d.ts
11542
- type IApi = {
11543
- createRequestValidator: (args: ValidatorArgs) => ts.ArrowFunction | undefined;
11544
- createResponseValidator: (args: ValidatorArgs) => ts.ArrowFunction | undefined;
11545
- };
11546
- //#endregion
11547
- //#region src/plugins/zod/types.d.ts
11548
- type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11549
- /**
11550
- * The casing convention to use for generated names.
11551
- *
11552
- * @default 'camelCase'
11553
- */
11554
- case?: StringCase;
11555
11057
  /**
11556
- * Add comments from input to the generated Zod schemas?
11058
+ * Resolved configuration for generated query keys.
11557
11059
  *
11558
- * @default true
11060
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys Query Keys}
11559
11061
  */
11560
- comments?: boolean;
11062
+ queryKeys: {
11063
+ /**
11064
+ * The casing convention to use for generated names.
11065
+ *
11066
+ * @default 'camelCase'
11067
+ */
11068
+ case: StringCase;
11069
+ /**
11070
+ * Whether to generate query keys.
11071
+ *
11072
+ * @default true
11073
+ */
11074
+ enabled: boolean;
11075
+ /**
11076
+ * Custom naming pattern for generated query key names. The name variable is obtained from the SDK function name.
11077
+ *
11078
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/guides/query-keys Query Keys}
11079
+ *
11080
+ * @default '{{name}}QueryKey'
11081
+ */
11082
+ name: StringName;
11083
+ /**
11084
+ * Whether to include operation tags in query keys.
11085
+ * This will make query keys larger but provides better cache invalidation capabilities.
11086
+ *
11087
+ * @default false
11088
+ */
11089
+ tags: boolean;
11090
+ };
11561
11091
  /**
11562
- * The compatibility version to target for generated output.
11563
- *
11564
- * Can be:
11565
- * - `4`: [Zod 4](https://zod.dev/packages/zod) (default).
11566
- * - `3`: [Zod 3](https://v3.zod.dev/).
11567
- * - `'mini'`: [Zod Mini](https://zod.dev/packages/mini).
11092
+ * Resolved configuration for generated query options helpers.
11568
11093
  *
11569
- * @default 4
11094
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}
11570
11095
  */
11571
- compatibilityVersion?: 3 | 4 | 'mini';
11096
+ queryOptions: {
11097
+ /**
11098
+ * The casing convention to use for generated names.
11099
+ *
11100
+ * @default 'camelCase'
11101
+ */
11102
+ case: StringCase;
11103
+ /**
11104
+ * Whether to generate query options helpers.
11105
+ *
11106
+ * @default true
11107
+ */
11108
+ enabled: boolean;
11109
+ /**
11110
+ * Whether to export generated symbols.
11111
+ *
11112
+ * @default true
11113
+ */
11114
+ exported: boolean;
11115
+ /**
11116
+ * Custom function to generate metadata for the operation.
11117
+ * Can return any valid meta object that will be included in the generated query options.
11118
+ *
11119
+ * @param operation - The operation object containing all available metadata
11120
+ * @returns A meta object with any properties you want to include
11121
+ *
11122
+ * @example
11123
+ * ```typescript
11124
+ * meta: (operation) => ({
11125
+ * customField: operation.id,
11126
+ * isDeprecated: operation.deprecated,
11127
+ * tags: operation.tags,
11128
+ * customObject: {
11129
+ * method: operation.method,
11130
+ * path: operation.path
11131
+ * }
11132
+ * })
11133
+ * ```
11134
+ *
11135
+ * @default undefined
11136
+ */
11137
+ meta: (operation: IR$1.OperationObject) => Record<string, unknown>;
11138
+ /**
11139
+ * Custom naming pattern for generated query options names. The name variable is obtained from the SDK function name.
11140
+ *
11141
+ * See {@link https://tanstack.com/query/v5/docs/framework/react/reference/queryOptions queryOptions}
11142
+ *
11143
+ * @default '{{name}}Options'
11144
+ */
11145
+ name: StringName;
11146
+ };
11572
11147
  /**
11573
- * Configuration for date handling in generated Zod schemas.
11148
+ * Configuration for generated `useSwr()` function helpers.
11574
11149
  *
11575
- * Controls how date values are processed and validated using Zod's
11576
- * date validation features.
11150
+ * See {@link https://swr.vercel.app/docs/api API}
11577
11151
  */
11578
- dates?: {
11152
+ useSwr: {
11579
11153
  /**
11580
- * Whether to allow unqualified (timezone-less) datetimes:
11154
+ * The casing convention to use for generated names.
11581
11155
  *
11582
- * When enabled, Zod will accept datetime strings without timezone information.
11583
- * When disabled, Zod will require timezone information in datetime strings.
11156
+ * @default 'camelCase'
11157
+ */
11158
+ case: StringCase;
11159
+ /**
11160
+ * Whether to generate `useSwr()` function helpers.
11584
11161
  *
11585
- * @default false
11162
+ * @default true
11586
11163
  */
11587
- local?: boolean;
11164
+ enabled: boolean;
11588
11165
  /**
11589
- * Whether to include timezone offset information when handling dates.
11166
+ * Custom naming pattern for generated `useSwr()` function names. The name variable is
11167
+ * obtained from the SDK function name.
11590
11168
  *
11591
- * When enabled, date strings will preserve timezone information.
11592
- * When disabled, dates will be treated as local time.
11169
+ * See {@link https://swr.vercel.app/docs/api API}
11593
11170
  *
11594
- * @default false
11171
+ * @default 'use{{name}}'
11595
11172
  */
11596
- offset?: boolean;
11173
+ name: StringName;
11597
11174
  };
11175
+ };
11176
+ type SwrPlugin = DefinePlugin<UserConfig$3, Config$3>;
11177
+ //#endregion
11178
+ //#region src/plugins/valibot/shared/types.d.ts
11179
+ type ValidatorArgs$1 = {
11180
+ operation: IR$1.OperationObject;
11181
+ plugin: ValibotPlugin['Instance'];
11182
+ };
11183
+ //#endregion
11184
+ //#region src/plugins/valibot/api.d.ts
11185
+ type IApi$1 = {
11186
+ createRequestValidator: (args: ValidatorArgs$1) => ts.ArrowFunction | undefined;
11187
+ createResponseValidator: (args: ValidatorArgs$1) => ts.ArrowFunction | undefined;
11188
+ };
11189
+ //#endregion
11190
+ //#region src/plugins/valibot/types.d.ts
11191
+ type UserConfig$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11192
+ /**
11193
+ * The casing convention to use for generated names.
11194
+ *
11195
+ * @default 'camelCase'
11196
+ */
11197
+ case?: StringCase;
11198
+ /**
11199
+ * Add comments from input to the generated Valibot schemas?
11200
+ *
11201
+ * @default true
11202
+ */
11203
+ comments?: boolean;
11598
11204
  /**
11599
11205
  * Configuration for reusable schema definitions.
11600
11206
  *
11601
- * Controls generation of shared Zod schemas that can be referenced across
11602
- * requests and responses.
11207
+ * Controls generation of shared Valibot schemas that can be referenced
11208
+ * across requests and responses.
11603
11209
  *
11604
11210
  * Can be:
11605
11211
  * - `boolean`: Shorthand for `{ enabled: boolean }`
11606
11212
  * - `string` or `function`: Shorthand for `{ name: string | function }`
11607
11213
  * - `object`: Full configuration object
11608
- *
11609
- * @default true
11610
11214
  */
11611
11215
  definitions?: boolean | StringName | {
11612
11216
  /**
@@ -11616,7 +11220,7 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11616
11220
  */
11617
11221
  case?: StringCase;
11618
11222
  /**
11619
- * Whether to generate Zod schemas for reusable definitions.
11223
+ * Whether to generate Valibot schemas for reusable definitions.
11620
11224
  *
11621
11225
  * @default true
11622
11226
  */
@@ -11625,47 +11229,9 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11625
11229
  * Custom naming pattern for generated schema names. The name variable
11626
11230
  * is obtained from the schema name.
11627
11231
  *
11628
- * @default 'z{{name}}'
11232
+ * @default 'v{{name}}'
11629
11233
  */
11630
11234
  name?: StringName;
11631
- /**
11632
- * Configuration for TypeScript type generation from Zod schemas.
11633
- *
11634
- * Controls generation of TypeScript types based on the generated Zod schemas.
11635
- */
11636
- types?: {
11637
- /**
11638
- * Configuration for `infer` types.
11639
- *
11640
- * Can be:
11641
- * - `boolean`: Shorthand for `{ enabled: boolean }`
11642
- * - `string` or `function`: Shorthand for `{ name: string | function }`
11643
- * - `object`: Full configuration object
11644
- *
11645
- * @default false
11646
- */
11647
- infer?: boolean | StringName | {
11648
- /**
11649
- * The casing convention to use for generated type names.
11650
- *
11651
- * @default 'PascalCase'
11652
- */
11653
- case?: StringCase;
11654
- /**
11655
- * Whether to generate TypeScript types from Zod schemas.
11656
- *
11657
- * @default true
11658
- */
11659
- enabled?: boolean;
11660
- /**
11661
- * Custom naming pattern for generated type names. The name variable is
11662
- * obtained from the Zod schema name.
11663
- *
11664
- * @default '{{name}}ZodType'
11665
- */
11666
- name?: StringName;
11667
- };
11668
- };
11669
11235
  };
11670
11236
  /**
11671
11237
  * Should the exports from the generated files be re-exported in the index
@@ -11675,25 +11241,23 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11675
11241
  */
11676
11242
  exportFromIndex?: boolean;
11677
11243
  /**
11678
- * Enable Zod metadata support? It's often useful to associate a schema with
11679
- * some additional metadata for documentation, code generation, AI
11244
+ * Enable Valibot metadata support? It's often useful to associate a schema
11245
+ * with some additional metadata for documentation, code generation, AI
11680
11246
  * structured outputs, form validation, and other purposes.
11681
11247
  *
11682
11248
  * @default false
11683
11249
  */
11684
11250
  metadata?: boolean;
11685
11251
  /**
11686
- * Configuration for request-specific Zod schemas.
11252
+ * Configuration for request-specific Valibot schemas.
11687
11253
  *
11688
- * Controls generation of Zod schemas for request bodies, query parameters, path
11689
- * parameters, and headers.
11254
+ * Controls generation of Valibot schemas for request bodies, query
11255
+ * parameters, path parameters, and headers.
11690
11256
  *
11691
11257
  * Can be:
11692
11258
  * - `boolean`: Shorthand for `{ enabled: boolean }`
11693
11259
  * - `string` or `function`: Shorthand for `{ name: string | function }`
11694
11260
  * - `object`: Full configuration object
11695
- *
11696
- * @default true
11697
11261
  */
11698
11262
  requests?: boolean | StringName | {
11699
11263
  /**
@@ -11703,7 +11267,7 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11703
11267
  */
11704
11268
  case?: StringCase;
11705
11269
  /**
11706
- * Whether to generate Zod schemas for request definitions.
11270
+ * Whether to generate Valibot schemas for request definitions.
11707
11271
  *
11708
11272
  * @default true
11709
11273
  */
@@ -11712,60 +11276,20 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11712
11276
  * Custom naming pattern for generated schema names. The name variable
11713
11277
  * is obtained from the operation name.
11714
11278
  *
11715
- * @default 'z{{name}}Data'
11279
+ * @default 'v{{name}}Data'
11716
11280
  */
11717
11281
  name?: StringName;
11718
- /**
11719
- * Configuration for TypeScript type generation from Zod schemas.
11720
- *
11721
- * Controls generation of TypeScript types based on the generated Zod schemas.
11722
- */
11723
- types?: {
11724
- /**
11725
- * Configuration for `infer` types.
11726
- *
11727
- * Can be:
11728
- * - `boolean`: Shorthand for `{ enabled: boolean }`
11729
- * - `string` or `function`: Shorthand for `{ name: string | function }`
11730
- * - `object`: Full configuration object
11731
- *
11732
- * @default false
11733
- */
11734
- infer?: boolean | StringName | {
11735
- /**
11736
- * The casing convention to use for generated type names.
11737
- *
11738
- * @default 'PascalCase'
11739
- */
11740
- case?: StringCase;
11741
- /**
11742
- * Whether to generate TypeScript types from Zod schemas.
11743
- *
11744
- * @default true
11745
- */
11746
- enabled?: boolean;
11747
- /**
11748
- * Custom naming pattern for generated type names. The name variable is
11749
- * obtained from the Zod schema name.
11750
- *
11751
- * @default '{{name}}DataZodType'
11752
- */
11753
- name?: StringName;
11754
- };
11755
- };
11756
11282
  };
11757
11283
  /**
11758
- * Configuration for response-specific Zod schemas.
11284
+ * Configuration for response-specific Valibot schemas.
11759
11285
  *
11760
- * Controls generation of Zod schemas for response bodies, error responses,
11761
- * and status codes.
11286
+ * Controls generation of Valibot schemas for response bodies, error
11287
+ * responses, and status codes.
11762
11288
  *
11763
11289
  * Can be:
11764
11290
  * - `boolean`: Shorthand for `{ enabled: boolean }`
11765
11291
  * - `string` or `function`: Shorthand for `{ name: string | function }`
11766
11292
  * - `object`: Full configuration object
11767
- *
11768
- * @default true
11769
11293
  */
11770
11294
  responses?: boolean | StringName | {
11771
11295
  /**
@@ -11775,7 +11299,7 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11775
11299
  */
11776
11300
  case?: StringCase;
11777
11301
  /**
11778
- * Whether to generate Zod schemas for response definitions.
11302
+ * Whether to generate Valibot schemas for response definitions.
11779
11303
  *
11780
11304
  * @default true
11781
11305
  */
@@ -11784,83 +11308,14 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11784
11308
  * Custom naming pattern for generated schema names. The name variable
11785
11309
  * is obtained from the operation name.
11786
11310
  *
11787
- * @default 'z{{name}}Response'
11311
+ * @default 'v{{name}}Response'
11788
11312
  */
11789
11313
  name?: StringName;
11790
- /**
11791
- * Configuration for TypeScript type generation from Zod schemas.
11792
- *
11793
- * Controls generation of TypeScript types based on the generated Zod schemas.
11794
- */
11795
- types?: {
11796
- /**
11797
- * Configuration for `infer` types.
11798
- *
11799
- * Can be:
11800
- * - `boolean`: Shorthand for `{ enabled: boolean }`
11801
- * - `string` or `function`: Shorthand for `{ name: string | function }`
11802
- * - `object`: Full configuration object
11803
- *
11804
- * @default false
11805
- */
11806
- infer?: boolean | StringName | {
11807
- /**
11808
- * The casing convention to use for generated type names.
11809
- *
11810
- * @default 'PascalCase'
11811
- */
11812
- case?: StringCase;
11813
- /**
11814
- * Whether to generate TypeScript types from Zod schemas.
11815
- *
11816
- * @default true
11817
- */
11818
- enabled?: boolean;
11819
- /**
11820
- * Custom naming pattern for generated type names. The name variable is
11821
- * obtained from the Zod schema name.
11822
- *
11823
- * @default '{{name}}ResponseZodType'
11824
- */
11825
- name?: StringName;
11826
- };
11827
- };
11828
- };
11829
- /**
11830
- * Configuration for TypeScript type generation from Zod schemas.
11831
- *
11832
- * Controls generation of TypeScript types based on the generated Zod schemas.
11833
- */
11834
- types?: {
11835
- /**
11836
- * Configuration for `infer` types.
11837
- *
11838
- * Can be:
11839
- * - `boolean`: Shorthand for `{ enabled: boolean }`
11840
- * - `string` or `function`: Shorthand for `{ name: string | function }`
11841
- * - `object`: Full configuration object
11842
- *
11843
- * @default false
11844
- */
11845
- infer?: boolean | StringName | {
11846
- /**
11847
- * The casing convention to use for generated type names.
11848
- *
11849
- * @default 'PascalCase'
11850
- */
11851
- case?: StringCase;
11852
- /**
11853
- * Whether to generate TypeScript types from Zod schemas.
11854
- *
11855
- * @default true
11856
- */
11857
- enabled?: boolean;
11858
- };
11859
11314
  };
11860
11315
  /**
11861
- * Configuration for webhook-specific Zod schemas.
11316
+ * Configuration for webhook-specific Valibot schemas.
11862
11317
  *
11863
- * Controls generation of Zod schemas for webhook payloads.
11318
+ * Controls generation of Valibot schemas for webhook payloads.
11864
11319
  *
11865
11320
  * Can be:
11866
11321
  * - `boolean`: Shorthand for `{ enabled: boolean }`
@@ -11877,7 +11332,7 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11877
11332
  */
11878
11333
  case?: StringCase;
11879
11334
  /**
11880
- * Whether to generate Zod schemas for webhook definitions.
11335
+ * Whether to generate Valibot schemas for webhook definitions.
11881
11336
  *
11882
11337
  * @default true
11883
11338
  */
@@ -11886,50 +11341,12 @@ type UserConfig$2 = Plugin.Name<'zod'> & Plugin.Hooks & {
11886
11341
  * Custom naming pattern for generated schema names. The name variable
11887
11342
  * is obtained from the webhook key.
11888
11343
  *
11889
- * @default 'z{{name}}WebhookRequest'
11344
+ * @default 'v{{name}}WebhookRequest'
11890
11345
  */
11891
11346
  name?: StringName;
11892
- /**
11893
- * Configuration for TypeScript type generation from Zod schemas.
11894
- *
11895
- * Controls generation of TypeScript types based on the generated Zod schemas.
11896
- */
11897
- types?: {
11898
- /**
11899
- * Configuration for `infer` types.
11900
- *
11901
- * Can be:
11902
- * - `boolean`: Shorthand for `{ enabled: boolean }`
11903
- * - `string` or `function`: Shorthand for `{ name: string | function }`
11904
- * - `object`: Full configuration object
11905
- *
11906
- * @default false
11907
- */
11908
- infer?: boolean | StringName | {
11909
- /**
11910
- * The casing convention to use for generated type names.
11911
- *
11912
- * @default 'PascalCase'
11913
- */
11914
- case?: StringCase;
11915
- /**
11916
- * Whether to generate TypeScript types from Zod schemas.
11917
- *
11918
- * @default true
11919
- */
11920
- enabled?: boolean;
11921
- /**
11922
- * Custom naming pattern for generated type names. The name variable is
11923
- * obtained from the Zod schema name.
11924
- *
11925
- * @default '{{name}}WebhookRequestZodType'
11926
- */
11927
- name?: StringName;
11928
- };
11929
- };
11930
11347
  };
11931
11348
  };
11932
- type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
11349
+ type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11933
11350
  /**
11934
11351
  * The casing convention to use for generated names.
11935
11352
  *
@@ -11937,53 +11354,16 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
11937
11354
  */
11938
11355
  case: StringCase;
11939
11356
  /**
11940
- * Add comments from input to the generated Zod schemas?
11357
+ * Add comments from input to the generated Valibot schemas?
11941
11358
  *
11942
11359
  * @default true
11943
11360
  */
11944
11361
  comments: boolean;
11945
- /**
11946
- * The compatibility version to target for generated output.
11947
- *
11948
- * Can be:
11949
- * - `4`: [Zod 4](https://zod.dev/packages/zod) (default).
11950
- * - `3`: [Zod 3](https://v3.zod.dev/).
11951
- * - `'mini'`: [Zod Mini](https://zod.dev/packages/mini).
11952
- *
11953
- * @default 4
11954
- */
11955
- compatibilityVersion: 3 | 4 | 'mini';
11956
- /**
11957
- * Configuration for date handling in generated Zod schemas.
11958
- *
11959
- * Controls how date values are processed and validated using Zod's
11960
- * date validation features.
11961
- */
11962
- dates: {
11963
- /**
11964
- * Whether to allow unqualified (timezone-less) datetimes:
11965
- *
11966
- * When enabled, Zod will accept datetime strings without timezone information.
11967
- * When disabled, Zod will require timezone information in datetime strings.
11968
- *
11969
- * @default false
11970
- */
11971
- local: boolean;
11972
- /**
11973
- * Whether to include timezone offset information when handling dates.
11974
- *
11975
- * When enabled, date strings will preserve timezone information.
11976
- * When disabled, dates will be treated as local time.
11977
- *
11978
- * @default false
11979
- */
11980
- offset: boolean;
11981
- };
11982
11362
  /**
11983
11363
  * Configuration for reusable schema definitions.
11984
11364
  *
11985
- * Controls generation of shared Zod schemas that can be referenced across
11986
- * requests and responses.
11365
+ * Controls generation of shared Valibot schemas that can be referenced
11366
+ * across requests and responses.
11987
11367
  */
11988
11368
  definitions: {
11989
11369
  /**
@@ -11993,7 +11373,7 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
11993
11373
  */
11994
11374
  case: StringCase;
11995
11375
  /**
11996
- * Whether to generate Zod schemas for reusable definitions.
11376
+ * Whether to generate Valibot schemas for reusable definitions.
11997
11377
  *
11998
11378
  * @default true
11999
11379
  */
@@ -12002,40 +11382,9 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12002
11382
  * Custom naming pattern for generated schema names. The name variable is
12003
11383
  * obtained from the schema name.
12004
11384
  *
12005
- * @default 'z{{name}}'
11385
+ * @default 'v{{name}}'
12006
11386
  */
12007
11387
  name: StringName;
12008
- /**
12009
- * Configuration for TypeScript type generation from Zod schemas.
12010
- *
12011
- * Controls generation of TypeScript types based on the generated Zod schemas.
12012
- */
12013
- types: {
12014
- /**
12015
- * Configuration for `infer` types.
12016
- */
12017
- infer: {
12018
- /**
12019
- * The casing convention to use for generated type names.
12020
- *
12021
- * @default 'PascalCase'
12022
- */
12023
- case: StringCase;
12024
- /**
12025
- * Whether to generate TypeScript types from Zod schemas.
12026
- *
12027
- * @default true
12028
- */
12029
- enabled: boolean;
12030
- /**
12031
- * Custom naming pattern for generated type names. The name variable is
12032
- * obtained from the Zod schema name.
12033
- *
12034
- * @default '{{name}}ZodType'
12035
- */
12036
- name: StringName;
12037
- };
12038
- };
12039
11388
  };
12040
11389
  /**
12041
11390
  * Should the exports from the generated files be re-exported in the index
@@ -12045,18 +11394,18 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12045
11394
  */
12046
11395
  exportFromIndex: boolean;
12047
11396
  /**
12048
- * Enable Zod metadata support? It's often useful to associate a schema with
12049
- * some additional metadata for documentation, code generation, AI
11397
+ * Enable Valibot metadata support? It's often useful to associate a schema
11398
+ * with some additional metadata for documentation, code generation, AI
12050
11399
  * structured outputs, form validation, and other purposes.
12051
11400
  *
12052
11401
  * @default false
12053
11402
  */
12054
11403
  metadata: boolean;
12055
11404
  /**
12056
- * Configuration for request-specific Zod schemas.
11405
+ * Configuration for request-specific Valibot schemas.
12057
11406
  *
12058
- * Controls generation of Zod schemas for request bodies, query parameters, path
12059
- * parameters, and headers.
11407
+ * Controls generation of Valibot schemas for request bodies, query
11408
+ * parameters, path parameters, and headers.
12060
11409
  */
12061
11410
  requests: {
12062
11411
  /**
@@ -12066,7 +11415,7 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12066
11415
  */
12067
11416
  case: StringCase;
12068
11417
  /**
12069
- * Whether to generate Zod schemas for request definitions.
11418
+ * Whether to generate Valibot schemas for request definitions.
12070
11419
  *
12071
11420
  * @default true
12072
11421
  */
@@ -12075,46 +11424,15 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12075
11424
  * Custom naming pattern for generated schema names. The name variable is
12076
11425
  * obtained from the operation name.
12077
11426
  *
12078
- * @default 'z{{name}}Data'
11427
+ * @default 'v{{name}}Data'
12079
11428
  */
12080
11429
  name: StringName;
12081
- /**
12082
- * Configuration for TypeScript type generation from Zod schemas.
12083
- *
12084
- * Controls generation of TypeScript types based on the generated Zod schemas.
12085
- */
12086
- types: {
12087
- /**
12088
- * Configuration for `infer` types.
12089
- */
12090
- infer: {
12091
- /**
12092
- * The casing convention to use for generated type names.
12093
- *
12094
- * @default 'PascalCase'
12095
- */
12096
- case: StringCase;
12097
- /**
12098
- * Whether to generate TypeScript types from Zod schemas.
12099
- *
12100
- * @default true
12101
- */
12102
- enabled: boolean;
12103
- /**
12104
- * Custom naming pattern for generated type names. The name variable is
12105
- * obtained from the Zod schema name.
12106
- *
12107
- * @default '{{name}}DataZodType'
12108
- */
12109
- name: StringName;
12110
- };
12111
- };
12112
11430
  };
12113
11431
  /**
12114
- * Configuration for response-specific Zod schemas.
11432
+ * Configuration for response-specific Valibot schemas.
12115
11433
  *
12116
- * Controls generation of Zod schemas for response bodies, error responses,
12117
- * and status codes.
11434
+ * Controls generation of Valibot schemas for response bodies, error
11435
+ * responses, and status codes.
12118
11436
  */
12119
11437
  responses: {
12120
11438
  /**
@@ -12124,7 +11442,7 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12124
11442
  */
12125
11443
  case: StringCase;
12126
11444
  /**
12127
- * Whether to generate Zod schemas for response definitions.
11445
+ * Whether to generate Valibot schemas for response definitions.
12128
11446
  *
12129
11447
  * @default true
12130
11448
  */
@@ -12133,1292 +11451,1053 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12133
11451
  * Custom naming pattern for generated schema names. The name variable is
12134
11452
  * obtained from the operation name.
12135
11453
  *
12136
- * @default 'z{{name}}Response'
11454
+ * @default 'v{{name}}Response'
12137
11455
  */
12138
11456
  name: StringName;
11457
+ };
11458
+ /**
11459
+ * Configuration for webhook-specific Valibot schemas.
11460
+ *
11461
+ * Controls generation of Valibot schemas for webhook payloads.
11462
+ */
11463
+ webhooks: {
12139
11464
  /**
12140
- * Configuration for TypeScript type generation from Zod schemas.
11465
+ * The casing convention to use for generated names.
12141
11466
  *
12142
- * Controls generation of TypeScript types based on the generated Zod schemas.
11467
+ * @default 'camelCase'
12143
11468
  */
12144
- types: {
12145
- /**
12146
- * Configuration for `infer` types.
12147
- */
12148
- infer: {
12149
- /**
12150
- * The casing convention to use for generated type names.
12151
- *
12152
- * @default 'PascalCase'
12153
- */
12154
- case: StringCase;
12155
- /**
12156
- * Whether to generate TypeScript types from Zod schemas.
12157
- *
12158
- * @default true
12159
- */
12160
- enabled: boolean;
12161
- /**
12162
- * Custom naming pattern for generated type names. The name variable is
12163
- * obtained from the Zod schema name.
12164
- *
12165
- * @default '{{name}}ResponseZodType'
12166
- */
12167
- name: StringName;
12168
- };
12169
- };
11469
+ case: StringCase;
11470
+ /**
11471
+ * Whether to generate Valibot schemas for webhook definitions.
11472
+ *
11473
+ * @default true
11474
+ */
11475
+ enabled: boolean;
11476
+ /**
11477
+ * Custom naming pattern for generated schema names. The name variable
11478
+ * is obtained from the webhook key.
11479
+ *
11480
+ * @default 'v{{name}}WebhookRequest'
11481
+ */
11482
+ name: StringName;
12170
11483
  };
11484
+ };
11485
+ type ValibotPlugin = DefinePlugin<UserConfig$2, Config$2, IApi$1>;
11486
+ //#endregion
11487
+ //#region src/plugins/zod/shared/types.d.ts
11488
+ type ValidatorArgs = {
11489
+ operation: IR$1.OperationObject;
11490
+ plugin: ZodPlugin['Instance'];
11491
+ };
11492
+ //#endregion
11493
+ //#region src/plugins/zod/api.d.ts
11494
+ type IApi = {
11495
+ createRequestValidator: (args: ValidatorArgs) => ts.ArrowFunction | undefined;
11496
+ createResponseValidator: (args: ValidatorArgs) => ts.ArrowFunction | undefined;
11497
+ };
11498
+ //#endregion
11499
+ //#region src/plugins/zod/types.d.ts
11500
+ type UserConfig$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12171
11501
  /**
12172
- * Configuration for TypeScript type generation from Zod schemas.
11502
+ * The casing convention to use for generated names.
12173
11503
  *
12174
- * Controls generation of TypeScript types based on the generated Zod schemas.
11504
+ * @default 'camelCase'
12175
11505
  */
12176
- types: {
11506
+ case?: StringCase;
11507
+ /**
11508
+ * Add comments from input to the generated Zod schemas?
11509
+ *
11510
+ * @default true
11511
+ */
11512
+ comments?: boolean;
11513
+ /**
11514
+ * The compatibility version to target for generated output.
11515
+ *
11516
+ * Can be:
11517
+ * - `4`: [Zod 4](https://zod.dev/packages/zod) (default).
11518
+ * - `3`: [Zod 3](https://v3.zod.dev/).
11519
+ * - `'mini'`: [Zod Mini](https://zod.dev/packages/mini).
11520
+ *
11521
+ * @default 4
11522
+ */
11523
+ compatibilityVersion?: 3 | 4 | 'mini';
11524
+ /**
11525
+ * Configuration for date handling in generated Zod schemas.
11526
+ *
11527
+ * Controls how date values are processed and validated using Zod's
11528
+ * date validation features.
11529
+ */
11530
+ dates?: {
12177
11531
  /**
12178
- * Configuration for `infer` types.
11532
+ * Whether to allow unqualified (timezone-less) datetimes:
11533
+ *
11534
+ * When enabled, Zod will accept datetime strings without timezone information.
11535
+ * When disabled, Zod will require timezone information in datetime strings.
11536
+ *
11537
+ * @default false
12179
11538
  */
12180
- infer: {
12181
- /**
12182
- * The casing convention to use for generated type names.
12183
- *
12184
- * @default 'PascalCase'
12185
- */
12186
- case: StringCase;
12187
- /**
12188
- * Whether to generate TypeScript types from Zod schemas.
12189
- *
12190
- * @default true
12191
- */
12192
- enabled: boolean;
12193
- };
11539
+ local?: boolean;
11540
+ /**
11541
+ * Whether to include timezone offset information when handling dates.
11542
+ *
11543
+ * When enabled, date strings will preserve timezone information.
11544
+ * When disabled, dates will be treated as local time.
11545
+ *
11546
+ * @default false
11547
+ */
11548
+ offset?: boolean;
12194
11549
  };
12195
11550
  /**
12196
- * Configuration for webhook-specific Zod schemas.
11551
+ * Configuration for reusable schema definitions.
12197
11552
  *
12198
- * Controls generation of Zod schemas for webhook payloads.
11553
+ * Controls generation of shared Zod schemas that can be referenced across
11554
+ * requests and responses.
11555
+ *
11556
+ * Can be:
11557
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11558
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11559
+ * - `object`: Full configuration object
11560
+ *
11561
+ * @default true
12199
11562
  */
12200
- webhooks: {
11563
+ definitions?: boolean | StringName | {
12201
11564
  /**
12202
11565
  * The casing convention to use for generated names.
12203
11566
  *
12204
11567
  * @default 'camelCase'
12205
11568
  */
12206
- case: StringCase;
11569
+ case?: StringCase;
12207
11570
  /**
12208
- * Whether to generate Zod schemas for webhook definitions.
11571
+ * Whether to generate Zod schemas for reusable definitions.
12209
11572
  *
12210
11573
  * @default true
12211
11574
  */
12212
- enabled: boolean;
11575
+ enabled?: boolean;
12213
11576
  /**
12214
- * Custom naming pattern for generated schema names. The name variable is
12215
- * is obtained from the webhook key.
11577
+ * Custom naming pattern for generated schema names. The name variable
11578
+ * is obtained from the schema name.
12216
11579
  *
12217
- * @default 'z{{name}}WebhookRequest'
11580
+ * @default 'z{{name}}'
12218
11581
  */
12219
- name: StringName;
11582
+ name?: StringName;
12220
11583
  /**
12221
11584
  * Configuration for TypeScript type generation from Zod schemas.
12222
11585
  *
12223
11586
  * Controls generation of TypeScript types based on the generated Zod schemas.
12224
11587
  */
12225
- types: {
11588
+ types?: {
12226
11589
  /**
12227
11590
  * Configuration for `infer` types.
11591
+ *
11592
+ * Can be:
11593
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11594
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11595
+ * - `object`: Full configuration object
11596
+ *
11597
+ * @default false
12228
11598
  */
12229
- infer: {
11599
+ infer?: boolean | StringName | {
12230
11600
  /**
12231
11601
  * The casing convention to use for generated type names.
12232
11602
  *
12233
11603
  * @default 'PascalCase'
12234
11604
  */
12235
- case: StringCase;
11605
+ case?: StringCase;
12236
11606
  /**
12237
11607
  * Whether to generate TypeScript types from Zod schemas.
12238
11608
  *
12239
11609
  * @default true
12240
11610
  */
12241
- enabled: boolean;
11611
+ enabled?: boolean;
12242
11612
  /**
12243
11613
  * Custom naming pattern for generated type names. The name variable is
12244
11614
  * obtained from the Zod schema name.
12245
11615
  *
12246
- * @default '{{name}}WebhookRequestZodType'
11616
+ * @default '{{name}}ZodType'
12247
11617
  */
12248
- name: StringName;
11618
+ name?: StringName;
12249
11619
  };
12250
11620
  };
12251
11621
  };
12252
- };
12253
- type ZodPlugin = DefinePlugin<UserConfig$2, Config$1, IApi>;
12254
- //#endregion
12255
- //#region src/plugins/config.d.ts
12256
- interface PluginConfigMap {
12257
- '@angular/common': AngularCommonPlugin['Types'];
12258
- '@hey-api/client-angular': HeyApiClientAngularPlugin['Types'];
12259
- '@hey-api/client-axios': HeyApiClientAxiosPlugin['Types'];
12260
- '@hey-api/client-fetch': HeyApiClientFetchPlugin['Types'];
12261
- '@hey-api/client-next': HeyApiClientNextPlugin['Types'];
12262
- '@hey-api/client-nuxt': HeyApiClientNuxtPlugin['Types'];
12263
- '@hey-api/client-ofetch': HeyApiClientOfetchPlugin['Types'];
12264
- '@hey-api/schemas': HeyApiSchemasPlugin['Types'];
12265
- '@hey-api/sdk': HeyApiSdkPlugin['Types'];
12266
- '@hey-api/transformers': HeyApiTransformersPlugin['Types'];
12267
- '@hey-api/typescript': HeyApiTypeScriptPlugin['Types'];
12268
- '@pinia/colada': PiniaColadaPlugin['Types'];
12269
- '@tanstack/angular-query-experimental': TanStackAngularQueryPlugin['Types'];
12270
- '@tanstack/react-query': TanStackReactQueryPlugin['Types'];
12271
- '@tanstack/solid-query': TanStackSolidQueryPlugin['Types'];
12272
- '@tanstack/svelte-query': TanStackSvelteQueryPlugin['Types'];
12273
- '@tanstack/vue-query': TanStackVueQueryPlugin['Types'];
12274
- arktype: ArktypePlugin['Types'];
12275
- fastify: FastifyPlugin['Types'];
12276
- 'legacy/angular': HeyApiClientLegacyAngularPlugin['Types'];
12277
- 'legacy/axios': HeyApiClientLegacyAxiosPlugin['Types'];
12278
- 'legacy/fetch': HeyApiClientLegacyFetchPlugin['Types'];
12279
- 'legacy/node': HeyApiClientLegacyNodePlugin['Types'];
12280
- 'legacy/xhr': HeyApiClientLegacyXhrPlugin['Types'];
12281
- valibot: ValibotPlugin['Types'];
12282
- zod: ZodPlugin['Types'];
12283
- }
12284
- //#endregion
12285
- //#region src/ir/graph.d.ts
12286
- declare const irTopLevelKinds: readonly ["operation", "parameter", "requestBody", "schema", "server", "webhook"];
12287
- type IrTopLevelKind = (typeof irTopLevelKinds)[number];
12288
- //#endregion
12289
- //#region src/openApi/types.d.ts
12290
- declare namespace OpenApi$3 {
12291
- export type V2_0_X = OpenApiV2_0_X;
12292
- export type V3_0_X = OpenApiV3_0_X;
12293
- export type V3_1_X = OpenApiV3_1_X;
12294
- }
12295
- declare namespace OpenApiMetaObject {
12296
- export type V2_0_X = OpenApiV2_0_XTypes['InfoObject'];
12297
- export type V3_0_X = OpenApiV3_0_XTypes['InfoObject'];
12298
- export type V3_1_X = OpenApiV3_1_XTypes['InfoObject'];
12299
- }
12300
- declare namespace OpenApiOperationObject {
12301
- export type V2_0_X = OpenApiV2_0_XTypes['OperationObject'];
12302
- export type V3_0_X = OpenApiV3_0_XTypes['OperationObject'];
12303
- export type V3_1_X = OpenApiV3_1_XTypes['OperationObject'];
12304
- }
12305
- declare namespace OpenApiParameterObject {
12306
- export type V3_0_X = OpenApiV3_0_XTypes['ParameterObject'] | OpenApiV3_0_XTypes['ReferenceObject'];
12307
- export type V3_1_X = OpenApiV3_1_XTypes['ParameterObject'] | OpenApiV3_1_XTypes['ReferenceObject'];
12308
- }
12309
- declare namespace OpenApiRequestBodyObject {
12310
- export type V3_0_X = OpenApiV3_0_XTypes['RequestBodyObject'] | OpenApiV3_0_XTypes['ReferenceObject'];
12311
- export type V3_1_X = OpenApiV3_1_XTypes['RequestBodyObject'] | OpenApiV3_1_XTypes['ReferenceObject'];
12312
- }
12313
- declare namespace OpenApiResponseObject {
12314
- export type V3_0_X = OpenApiV3_0_XTypes['ResponseObject'] | OpenApiV3_0_XTypes['ReferenceObject'];
12315
- export type V3_1_X = OpenApiV3_1_XTypes['ResponseObject'] | OpenApiV3_1_XTypes['ReferenceObject'];
12316
- }
12317
- declare namespace OpenApiSchemaObject {
12318
- export type V2_0_X = OpenApiV2_0_XTypes['SchemaObject'];
12319
- export type V3_0_X = OpenApiV3_0_XTypes['SchemaObject'];
12320
- export type V3_1_X = OpenApiV3_1_XTypes['SchemaObject'];
12321
- }
12322
- //#endregion
12323
- //#region src/plugins/shared/types/instance.d.ts
12324
- type BaseEvent = {
12325
- /**
12326
- * Path to the node, derived from the pointer.
12327
- */
12328
- _path: ReadonlyArray<string | number>;
12329
- /**
12330
- * Pointer to the node in the graph.
12331
- */
12332
- pointer: string;
12333
11622
  /**
12334
- * Tags associated with the node.
11623
+ * Should the exports from the generated files be re-exported in the index
11624
+ * barrel file?
11625
+ *
11626
+ * @default false
12335
11627
  */
12336
- tags?: ReadonlyArray<string>;
12337
- };
12338
- type WalkEvents = BaseEvent & ({
12339
- method: keyof IR$1.PathItemObject;
12340
- operation: IR$1.OperationObject;
12341
- path: string;
12342
- type: Extract<IrTopLevelKind, 'operation'>;
12343
- } | {
12344
- name: string;
12345
- parameter: IR$1.ParameterObject;
12346
- type: Extract<IrTopLevelKind, 'parameter'>;
12347
- } | {
12348
- name: string;
12349
- requestBody: IR$1.RequestBodyObject;
12350
- type: Extract<IrTopLevelKind, 'requestBody'>;
12351
- } | {
12352
- name: string;
12353
- schema: IR$1.SchemaObject;
12354
- type: Extract<IrTopLevelKind, 'schema'>;
12355
- } | {
12356
- server: IR$1.ServerObject;
12357
- type: Extract<IrTopLevelKind, 'server'>;
12358
- } | {
12359
- key: string;
12360
- method: keyof IR$1.PathItemObject;
12361
- operation: IR$1.OperationObject;
12362
- type: Extract<IrTopLevelKind, 'webhook'>;
12363
- });
12364
- type WalkEvent<T extends IrTopLevelKind = IrTopLevelKind> = Extract<WalkEvents, {
12365
- type: T;
12366
- }>;
12367
- //#endregion
12368
- //#region src/plugins/shared/utils/instance.d.ts
12369
- declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
12370
- api: T['api'];
12371
- config: Omit<T['resolvedConfig'], 'name' | 'output'>;
12372
- context: Context;
12373
- dependencies: Required<Plugin.Config<T>>['dependencies'];
12374
- private eventHooks;
12375
- gen: IProject;
12376
- private handler;
12377
- name: T['resolvedConfig']['name'];
12378
- output: string;
11628
+ exportFromIndex?: boolean;
12379
11629
  /**
12380
- * The package metadata and utilities for the current context, constructed
12381
- * from the provided dependencies. Used for managing package-related
12382
- * information such as name, version, and dependency resolution during
12383
- * code generation.
11630
+ * Enable Zod metadata support? It's often useful to associate a schema with
11631
+ * some additional metadata for documentation, code generation, AI
11632
+ * structured outputs, form validation, and other purposes.
11633
+ *
11634
+ * @default false
12384
11635
  */
12385
- package: Context['package'];
12386
- constructor(props: Pick<Required<Plugin.Config<T>>, 'config' | 'dependencies' | 'handler'> & {
12387
- api?: T['api'];
12388
- context: Context<OpenApi$3.V2_0_X | OpenApi$3.V3_0_X | OpenApi$3.V3_1_X>;
12389
- gen: IProject;
12390
- name: string;
12391
- output: string;
12392
- });
11636
+ metadata?: boolean;
12393
11637
  /**
12394
- * Iterates over various input elements as specified by the event types, in
12395
- * a specific order: servers, schemas, parameters, request bodies, then
12396
- * operations.
11638
+ * Configuration for request-specific Zod schemas.
12397
11639
  *
12398
- * This ensures, for example, that schemas are always processed before
12399
- * operations, which may reference them.
11640
+ * Controls generation of Zod schemas for request bodies, query parameters, path
11641
+ * parameters, and headers.
12400
11642
  *
12401
- * @template TKind - The event type(s) to yield. Defaults to all event types.
12402
- * @param events - The event types to walk over. If none are provided, all event types are included.
12403
- * @param callback - Function to execute for each event.
11643
+ * Can be:
11644
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11645
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11646
+ * - `object`: Full configuration object
12404
11647
  *
12405
- * @example
12406
- * // Iterate over all operations and schemas
12407
- * plugin.forEach('operation', 'schema', (event) => {
12408
- * if (event.type === 'operation') {
12409
- * // handle operation
12410
- * } else if (event.type === 'schema') {
12411
- * // handle schema
12412
- * }
12413
- * });
11648
+ * @default true
12414
11649
  */
12415
- forEach<TKind extends IrTopLevelKind = IrTopLevelKind>(...args: [...events: ReadonlyArray<TKind>, callback: (event: WalkEvent<TKind>) => void]): void;
12416
- forEach<TKind extends IrTopLevelKind = IrTopLevelKind>(...args: [...events: ReadonlyArray<TKind>, callback: (event: WalkEvent<TKind>) => void, options: WalkOptions<TKind>]): void;
11650
+ requests?: boolean | StringName | {
11651
+ /**
11652
+ * The casing convention to use for generated names.
11653
+ *
11654
+ * @default 'camelCase'
11655
+ */
11656
+ case?: StringCase;
11657
+ /**
11658
+ * Whether to generate Zod schemas for request definitions.
11659
+ *
11660
+ * @default true
11661
+ */
11662
+ enabled?: boolean;
11663
+ /**
11664
+ * Custom naming pattern for generated schema names. The name variable
11665
+ * is obtained from the operation name.
11666
+ *
11667
+ * @default 'z{{name}}Data'
11668
+ */
11669
+ name?: StringName;
11670
+ /**
11671
+ * Configuration for TypeScript type generation from Zod schemas.
11672
+ *
11673
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11674
+ */
11675
+ types?: {
11676
+ /**
11677
+ * Configuration for `infer` types.
11678
+ *
11679
+ * Can be:
11680
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11681
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11682
+ * - `object`: Full configuration object
11683
+ *
11684
+ * @default false
11685
+ */
11686
+ infer?: boolean | StringName | {
11687
+ /**
11688
+ * The casing convention to use for generated type names.
11689
+ *
11690
+ * @default 'PascalCase'
11691
+ */
11692
+ case?: StringCase;
11693
+ /**
11694
+ * Whether to generate TypeScript types from Zod schemas.
11695
+ *
11696
+ * @default true
11697
+ */
11698
+ enabled?: boolean;
11699
+ /**
11700
+ * Custom naming pattern for generated type names. The name variable is
11701
+ * obtained from the Zod schema name.
11702
+ *
11703
+ * @default '{{name}}DataZodType'
11704
+ */
11705
+ name?: StringName;
11706
+ };
11707
+ };
11708
+ };
12417
11709
  /**
12418
- * Retrieves a registered plugin instance by its name from the context. This
12419
- * allows plugins to access other plugins that have been registered in the
12420
- * same context, enabling cross-plugin communication and dependencies.
11710
+ * Configuration for response-specific Zod schemas.
12421
11711
  *
12422
- * @param name Plugin name as defined in the configuration.
12423
- * @returns The plugin instance if found, undefined otherwise.
12424
- */
12425
- getPlugin<TName extends keyof PluginConfigMap>(name: TName): TName extends any ? PluginInstance<PluginConfigMap[TName]> | undefined : never;
12426
- /**
12427
- * Retrieves a registered plugin instance by its name from the context. This
12428
- * allows plugins to access other plugins that have been registered in the
12429
- * same context, enabling cross-plugin communication and dependencies.
11712
+ * Controls generation of Zod schemas for response bodies, error responses,
11713
+ * and status codes.
12430
11714
  *
12431
- * @param name Plugin name as defined in the configuration.
12432
- * @returns The plugin instance if found, throw otherwise.
11715
+ * Can be:
11716
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11717
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11718
+ * - `object`: Full configuration object
11719
+ *
11720
+ * @default true
12433
11721
  */
12434
- getPluginOrThrow<TName extends keyof PluginConfigMap>(name: TName): TName extends any ? PluginInstance<PluginConfigMap[TName]> : never;
12435
- getSymbol(identifier: SymbolIdentifier): Symbol | undefined;
12436
- hooks: {
12437
- operation: {
12438
- isMutation: (operation: IR$1.OperationObject) => boolean;
12439
- isQuery: (operation: IR$1.OperationObject) => boolean;
12440
- };
12441
- };
12442
- isSymbolRegistered(identifier: SymbolIdentifier): boolean;
12443
- querySymbol(filter: SymbolMeta): Symbol | undefined;
12444
- referenceSymbol(meta: SymbolMeta): Symbol;
12445
- registerSymbol(symbol: SymbolIn): Symbol;
12446
- /**
12447
- * Executes plugin's handler function.
12448
- */
12449
- run(): Promise<void>;
12450
- setSymbolValue(symbol: Symbol, value: unknown): void;
12451
- private buildEventHooks;
12452
- private forEachError;
12453
- private getSymbolFilePath;
12454
- private isOperationKind;
12455
- }
12456
- //#endregion
12457
- //#region src/utils/logger.d.ts
12458
- declare class Logger {
12459
- private events;
12460
- private end;
11722
+ responses?: boolean | StringName | {
11723
+ /**
11724
+ * The casing convention to use for generated names.
11725
+ *
11726
+ * @default 'camelCase'
11727
+ */
11728
+ case?: StringCase;
11729
+ /**
11730
+ * Whether to generate Zod schemas for response definitions.
11731
+ *
11732
+ * @default true
11733
+ */
11734
+ enabled?: boolean;
11735
+ /**
11736
+ * Custom naming pattern for generated schema names. The name variable
11737
+ * is obtained from the operation name.
11738
+ *
11739
+ * @default 'z{{name}}Response'
11740
+ */
11741
+ name?: StringName;
11742
+ /**
11743
+ * Configuration for TypeScript type generation from Zod schemas.
11744
+ *
11745
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11746
+ */
11747
+ types?: {
11748
+ /**
11749
+ * Configuration for `infer` types.
11750
+ *
11751
+ * Can be:
11752
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11753
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11754
+ * - `object`: Full configuration object
11755
+ *
11756
+ * @default false
11757
+ */
11758
+ infer?: boolean | StringName | {
11759
+ /**
11760
+ * The casing convention to use for generated type names.
11761
+ *
11762
+ * @default 'PascalCase'
11763
+ */
11764
+ case?: StringCase;
11765
+ /**
11766
+ * Whether to generate TypeScript types from Zod schemas.
11767
+ *
11768
+ * @default true
11769
+ */
11770
+ enabled?: boolean;
11771
+ /**
11772
+ * Custom naming pattern for generated type names. The name variable is
11773
+ * obtained from the Zod schema name.
11774
+ *
11775
+ * @default '{{name}}ResponseZodType'
11776
+ */
11777
+ name?: StringName;
11778
+ };
11779
+ };
11780
+ };
12461
11781
  /**
12462
- * Recursively end all unended events in the event tree.
12463
- * This ensures all events have end marks before measuring.
11782
+ * Configuration for TypeScript type generation from Zod schemas.
11783
+ *
11784
+ * Controls generation of TypeScript types based on the generated Zod schemas.
12464
11785
  */
12465
- private endAllEvents;
12466
- report(print?: boolean): PerformanceMeasure | undefined;
12467
- private reportEvent;
12468
- private start;
12469
- private storeEvent;
12470
- timeEvent(name: string): {
12471
- mark: PerformanceMark;
12472
- timeEnd: () => void;
11786
+ types?: {
11787
+ /**
11788
+ * Configuration for `infer` types.
11789
+ *
11790
+ * Can be:
11791
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11792
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11793
+ * - `object`: Full configuration object
11794
+ *
11795
+ * @default false
11796
+ */
11797
+ infer?: boolean | StringName | {
11798
+ /**
11799
+ * The casing convention to use for generated type names.
11800
+ *
11801
+ * @default 'PascalCase'
11802
+ */
11803
+ case?: StringCase;
11804
+ /**
11805
+ * Whether to generate TypeScript types from Zod schemas.
11806
+ *
11807
+ * @default true
11808
+ */
11809
+ enabled?: boolean;
11810
+ };
12473
11811
  };
12474
- }
12475
- //#endregion
12476
- //#region src/ir/context.d.ts
12477
- declare class Context<Spec extends Record<string, any> = any> {
12478
11812
  /**
12479
- * Configuration for parsing and generating the output. This
12480
- * is a mix of user-provided and default values.
11813
+ * Configuration for webhook-specific Zod schemas.
11814
+ *
11815
+ * Controls generation of Zod schemas for webhook payloads.
11816
+ *
11817
+ * Can be:
11818
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11819
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11820
+ * - `object`: Full configuration object
11821
+ *
11822
+ * @default true
12481
11823
  */
12482
- config: Config;
11824
+ webhooks?: boolean | StringName | {
11825
+ /**
11826
+ * The casing convention to use for generated names.
11827
+ *
11828
+ * @default 'camelCase'
11829
+ */
11830
+ case?: StringCase;
11831
+ /**
11832
+ * Whether to generate Zod schemas for webhook definitions.
11833
+ *
11834
+ * @default true
11835
+ */
11836
+ enabled?: boolean;
11837
+ /**
11838
+ * Custom naming pattern for generated schema names. The name variable
11839
+ * is obtained from the webhook key.
11840
+ *
11841
+ * @default 'z{{name}}WebhookRequest'
11842
+ */
11843
+ name?: StringName;
11844
+ /**
11845
+ * Configuration for TypeScript type generation from Zod schemas.
11846
+ *
11847
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11848
+ */
11849
+ types?: {
11850
+ /**
11851
+ * Configuration for `infer` types.
11852
+ *
11853
+ * Can be:
11854
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
11855
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
11856
+ * - `object`: Full configuration object
11857
+ *
11858
+ * @default false
11859
+ */
11860
+ infer?: boolean | StringName | {
11861
+ /**
11862
+ * The casing convention to use for generated type names.
11863
+ *
11864
+ * @default 'PascalCase'
11865
+ */
11866
+ case?: StringCase;
11867
+ /**
11868
+ * Whether to generate TypeScript types from Zod schemas.
11869
+ *
11870
+ * @default true
11871
+ */
11872
+ enabled?: boolean;
11873
+ /**
11874
+ * Custom naming pattern for generated type names. The name variable is
11875
+ * obtained from the Zod schema name.
11876
+ *
11877
+ * @default '{{name}}WebhookRequestZodType'
11878
+ */
11879
+ name?: StringName;
11880
+ };
11881
+ };
11882
+ };
11883
+ };
11884
+ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12483
11885
  /**
12484
- * The code generation project instance used to manage files, symbols,
11886
+ * The casing convention to use for generated names.
11887
+ *
11888
+ * @default 'camelCase'
12485
11889
  */
12486
- gen: Project;
11890
+ case: StringCase;
12487
11891
  /**
12488
- * The dependency graph built from the intermediate representation.
11892
+ * Add comments from input to the generated Zod schemas?
11893
+ *
11894
+ * @default true
12489
11895
  */
12490
- graph: Graph | undefined;
11896
+ comments: boolean;
12491
11897
  /**
12492
- * Intermediate representation model obtained from `spec`.
11898
+ * The compatibility version to target for generated output.
11899
+ *
11900
+ * Can be:
11901
+ * - `4`: [Zod 4](https://zod.dev/packages/zod) (default).
11902
+ * - `3`: [Zod 3](https://v3.zod.dev/).
11903
+ * - `'mini'`: [Zod Mini](https://zod.dev/packages/mini).
11904
+ *
11905
+ * @default 4
12493
11906
  */
12494
- ir: IR$1.Model;
11907
+ compatibilityVersion: 3 | 4 | 'mini';
12495
11908
  /**
12496
- * Logger instance.
11909
+ * Configuration for date handling in generated Zod schemas.
11910
+ *
11911
+ * Controls how date values are processed and validated using Zod's
11912
+ * date validation features.
12497
11913
  */
12498
- logger: Logger;
11914
+ dates: {
11915
+ /**
11916
+ * Whether to allow unqualified (timezone-less) datetimes:
11917
+ *
11918
+ * When enabled, Zod will accept datetime strings without timezone information.
11919
+ * When disabled, Zod will require timezone information in datetime strings.
11920
+ *
11921
+ * @default false
11922
+ */
11923
+ local: boolean;
11924
+ /**
11925
+ * Whether to include timezone offset information when handling dates.
11926
+ *
11927
+ * When enabled, date strings will preserve timezone information.
11928
+ * When disabled, dates will be treated as local time.
11929
+ *
11930
+ * @default false
11931
+ */
11932
+ offset: boolean;
11933
+ };
12499
11934
  /**
12500
- * The package metadata and utilities for the current context, constructed
12501
- * from the provided dependencies. Used for managing package-related
12502
- * information such as name, version, and dependency resolution during
12503
- * code generation.
11935
+ * Configuration for reusable schema definitions.
11936
+ *
11937
+ * Controls generation of shared Zod schemas that can be referenced across
11938
+ * requests and responses.
12504
11939
  */
12505
- package: Package;
12506
- /**
12507
- * A map of registered plugin instances, keyed by plugin name. Plugins are
12508
- * registered through the `registerPlugin` method and can be accessed by
12509
- * their configured name from the config.
11940
+ definitions: {
11941
+ /**
11942
+ * The casing convention to use for generated names.
11943
+ *
11944
+ * @default 'camelCase'
11945
+ */
11946
+ case: StringCase;
11947
+ /**
11948
+ * Whether to generate Zod schemas for reusable definitions.
11949
+ *
11950
+ * @default true
11951
+ */
11952
+ enabled: boolean;
11953
+ /**
11954
+ * Custom naming pattern for generated schema names. The name variable is
11955
+ * obtained from the schema name.
11956
+ *
11957
+ * @default 'z{{name}}'
11958
+ */
11959
+ name: StringName;
11960
+ /**
11961
+ * Configuration for TypeScript type generation from Zod schemas.
11962
+ *
11963
+ * Controls generation of TypeScript types based on the generated Zod schemas.
11964
+ */
11965
+ types: {
11966
+ /**
11967
+ * Configuration for `infer` types.
11968
+ */
11969
+ infer: {
11970
+ /**
11971
+ * The casing convention to use for generated type names.
11972
+ *
11973
+ * @default 'PascalCase'
11974
+ */
11975
+ case: StringCase;
11976
+ /**
11977
+ * Whether to generate TypeScript types from Zod schemas.
11978
+ *
11979
+ * @default true
11980
+ */
11981
+ enabled: boolean;
11982
+ /**
11983
+ * Custom naming pattern for generated type names. The name variable is
11984
+ * obtained from the Zod schema name.
11985
+ *
11986
+ * @default '{{name}}ZodType'
11987
+ */
11988
+ name: StringName;
11989
+ };
11990
+ };
11991
+ };
11992
+ /**
11993
+ * Should the exports from the generated files be re-exported in the index
11994
+ * barrel file?
11995
+ *
11996
+ * @default false
12510
11997
  */
12511
- plugins: Partial<Record<PluginNames, PluginInstance<PluginConfigMap[keyof PluginConfigMap]>>>;
11998
+ exportFromIndex: boolean;
12512
11999
  /**
12513
- * Resolved specification from `input`.
12000
+ * Enable Zod metadata support? It's often useful to associate a schema with
12001
+ * some additional metadata for documentation, code generation, AI
12002
+ * structured outputs, form validation, and other purposes.
12003
+ *
12004
+ * @default false
12514
12005
  */
12515
- spec: Spec;
12516
- constructor({
12517
- config,
12518
- dependencies,
12519
- logger,
12520
- spec
12521
- }: {
12522
- config: Config;
12523
- dependencies: Record<string, string>;
12524
- logger: Logger;
12525
- spec: Spec;
12526
- });
12006
+ metadata: boolean;
12527
12007
  /**
12528
- * Returns a resolved and dereferenced schema from `spec`.
12008
+ * Configuration for request-specific Zod schemas.
12009
+ *
12010
+ * Controls generation of Zod schemas for request bodies, query parameters, path
12011
+ * parameters, and headers.
12529
12012
  */
12530
- dereference<T>(schema: {
12531
- $ref: string;
12532
- }): T;
12013
+ requests: {
12014
+ /**
12015
+ * The casing convention to use for generated names.
12016
+ *
12017
+ * @default 'camelCase'
12018
+ */
12019
+ case: StringCase;
12020
+ /**
12021
+ * Whether to generate Zod schemas for request definitions.
12022
+ *
12023
+ * @default true
12024
+ */
12025
+ enabled: boolean;
12026
+ /**
12027
+ * Custom naming pattern for generated schema names. The name variable is
12028
+ * obtained from the operation name.
12029
+ *
12030
+ * @default 'z{{name}}Data'
12031
+ */
12032
+ name: StringName;
12033
+ /**
12034
+ * Configuration for TypeScript type generation from Zod schemas.
12035
+ *
12036
+ * Controls generation of TypeScript types based on the generated Zod schemas.
12037
+ */
12038
+ types: {
12039
+ /**
12040
+ * Configuration for `infer` types.
12041
+ */
12042
+ infer: {
12043
+ /**
12044
+ * The casing convention to use for generated type names.
12045
+ *
12046
+ * @default 'PascalCase'
12047
+ */
12048
+ case: StringCase;
12049
+ /**
12050
+ * Whether to generate TypeScript types from Zod schemas.
12051
+ *
12052
+ * @default true
12053
+ */
12054
+ enabled: boolean;
12055
+ /**
12056
+ * Custom naming pattern for generated type names. The name variable is
12057
+ * obtained from the Zod schema name.
12058
+ *
12059
+ * @default '{{name}}DataZodType'
12060
+ */
12061
+ name: StringName;
12062
+ };
12063
+ };
12064
+ };
12533
12065
  /**
12534
- * Registers a new plugin to the global context.
12066
+ * Configuration for response-specific Zod schemas.
12535
12067
  *
12536
- * @param name Plugin name.
12537
- * @returns Registered plugin instance.
12068
+ * Controls generation of Zod schemas for response bodies, error responses,
12069
+ * and status codes.
12538
12070
  */
12539
- private registerPlugin;
12071
+ responses: {
12072
+ /**
12073
+ * The casing convention to use for generated names.
12074
+ *
12075
+ * @default 'camelCase'
12076
+ */
12077
+ case: StringCase;
12078
+ /**
12079
+ * Whether to generate Zod schemas for response definitions.
12080
+ *
12081
+ * @default true
12082
+ */
12083
+ enabled: boolean;
12084
+ /**
12085
+ * Custom naming pattern for generated schema names. The name variable is
12086
+ * obtained from the operation name.
12087
+ *
12088
+ * @default 'z{{name}}Response'
12089
+ */
12090
+ name: StringName;
12091
+ /**
12092
+ * Configuration for TypeScript type generation from Zod schemas.
12093
+ *
12094
+ * Controls generation of TypeScript types based on the generated Zod schemas.
12095
+ */
12096
+ types: {
12097
+ /**
12098
+ * Configuration for `infer` types.
12099
+ */
12100
+ infer: {
12101
+ /**
12102
+ * The casing convention to use for generated type names.
12103
+ *
12104
+ * @default 'PascalCase'
12105
+ */
12106
+ case: StringCase;
12107
+ /**
12108
+ * Whether to generate TypeScript types from Zod schemas.
12109
+ *
12110
+ * @default true
12111
+ */
12112
+ enabled: boolean;
12113
+ /**
12114
+ * Custom naming pattern for generated type names. The name variable is
12115
+ * obtained from the Zod schema name.
12116
+ *
12117
+ * @default '{{name}}ResponseZodType'
12118
+ */
12119
+ name: StringName;
12120
+ };
12121
+ };
12122
+ };
12540
12123
  /**
12541
- * Registers all plugins in the order specified by the configuration and returns
12542
- * an array of the registered PluginInstance objects. Each plugin is instantiated
12543
- * and added to the context's plugins map.
12124
+ * Configuration for TypeScript type generation from Zod schemas.
12544
12125
  *
12545
- * @returns {ReadonlyArray<PluginInstance>} An array of registered plugin instances in order.
12126
+ * Controls generation of TypeScript types based on the generated Zod schemas.
12546
12127
  */
12547
- registerPlugins(): ReadonlyArray<PluginInstance>;
12548
- resolveIrRef<T>($ref: string): T;
12128
+ types: {
12129
+ /**
12130
+ * Configuration for `infer` types.
12131
+ */
12132
+ infer: {
12133
+ /**
12134
+ * The casing convention to use for generated type names.
12135
+ *
12136
+ * @default 'PascalCase'
12137
+ */
12138
+ case: StringCase;
12139
+ /**
12140
+ * Whether to generate TypeScript types from Zod schemas.
12141
+ *
12142
+ * @default true
12143
+ */
12144
+ enabled: boolean;
12145
+ };
12146
+ };
12549
12147
  /**
12550
- * Returns a resolved reference from `spec`.
12148
+ * Configuration for webhook-specific Zod schemas.
12149
+ *
12150
+ * Controls generation of Zod schemas for webhook payloads.
12551
12151
  */
12552
- resolveRef<T>($ref: string): T;
12553
- }
12554
- //#endregion
12555
- //#region src/openApi/common/interfaces/Dictionary.d.ts
12556
- interface Dictionary<T = unknown> {
12557
- [key: string]: T;
12558
- }
12559
- //#endregion
12560
- //#region src/openApi/v3/interfaces/OpenApiReference.d.ts
12561
- /**
12562
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#reference-object
12563
- */
12564
- interface OpenApiReference {
12565
- $ref?: string;
12566
- }
12567
- //#endregion
12568
- //#region src/openApi/v3/interfaces/OpenApiExample.d.ts
12569
- /**
12570
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#example-object
12571
- */
12572
- interface OpenApiExample extends OpenApiReference {
12573
- description?: string;
12574
- externalValue?: string;
12575
- summary?: string;
12576
- value?: unknown;
12577
- }
12578
- //#endregion
12579
- //#region src/openApi/common/interfaces/WithEnumExtension.d.ts
12580
- interface WithEnumExtension {
12581
- 'x-enum-descriptions'?: ReadonlyArray<string>;
12582
- 'x-enum-varnames'?: ReadonlyArray<string>;
12583
- 'x-enumNames'?: ReadonlyArray<string>;
12584
- }
12585
- //#endregion
12586
- //#region src/openApi/v3/interfaces/OpenApiDiscriminator.d.ts
12587
- /**
12588
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#discriminator-object
12589
- */
12590
- interface OpenApiDiscriminator {
12591
- mapping?: Dictionary<string>;
12592
- propertyName: string;
12593
- }
12594
- //#endregion
12595
- //#region src/openApi/v3/interfaces/OpenApiExternalDocs.d.ts
12596
- /**
12597
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#external-documentation-object
12598
- */
12599
- interface OpenApiExternalDocs {
12600
- description?: string;
12601
- url: string;
12602
- }
12603
- //#endregion
12604
- //#region src/openApi/v3/interfaces/OpenApiXml.d.ts
12605
- /**
12606
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#xml-object
12607
- */
12608
- interface OpenApiXml$1 {
12609
- attribute?: boolean;
12610
- name?: string;
12611
- namespace?: string;
12612
- prefix?: string;
12613
- wrapped?: boolean;
12614
- }
12152
+ webhooks: {
12153
+ /**
12154
+ * The casing convention to use for generated names.
12155
+ *
12156
+ * @default 'camelCase'
12157
+ */
12158
+ case: StringCase;
12159
+ /**
12160
+ * Whether to generate Zod schemas for webhook definitions.
12161
+ *
12162
+ * @default true
12163
+ */
12164
+ enabled: boolean;
12165
+ /**
12166
+ * Custom naming pattern for generated schema names. The name variable is
12167
+ * is obtained from the webhook key.
12168
+ *
12169
+ * @default 'z{{name}}WebhookRequest'
12170
+ */
12171
+ name: StringName;
12172
+ /**
12173
+ * Configuration for TypeScript type generation from Zod schemas.
12174
+ *
12175
+ * Controls generation of TypeScript types based on the generated Zod schemas.
12176
+ */
12177
+ types: {
12178
+ /**
12179
+ * Configuration for `infer` types.
12180
+ */
12181
+ infer: {
12182
+ /**
12183
+ * The casing convention to use for generated type names.
12184
+ *
12185
+ * @default 'PascalCase'
12186
+ */
12187
+ case: StringCase;
12188
+ /**
12189
+ * Whether to generate TypeScript types from Zod schemas.
12190
+ *
12191
+ * @default true
12192
+ */
12193
+ enabled: boolean;
12194
+ /**
12195
+ * Custom naming pattern for generated type names. The name variable is
12196
+ * obtained from the Zod schema name.
12197
+ *
12198
+ * @default '{{name}}WebhookRequestZodType'
12199
+ */
12200
+ name: StringName;
12201
+ };
12202
+ };
12203
+ };
12204
+ };
12205
+ type ZodPlugin = DefinePlugin<UserConfig$1, Config$1, IApi>;
12615
12206
  //#endregion
12616
- //#region src/openApi/v3/interfaces/OpenApiSchema.d.ts
12617
- /**
12618
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object
12619
- */
12620
- interface OpenApiSchema$1 extends OpenApiReference, WithEnumExtension {
12621
- additionalProperties?: boolean | OpenApiSchema$1;
12622
- allOf?: OpenApiSchema$1[];
12623
- anyOf?: OpenApiSchema$1[];
12624
- const?: string | number | boolean | null;
12625
- default?: unknown;
12626
- deprecated?: boolean;
12627
- description?: string;
12628
- discriminator?: OpenApiDiscriminator;
12629
- enum?: (string | number)[];
12630
- example?: unknown;
12631
- exclusiveMaximum?: boolean;
12632
- exclusiveMinimum?: boolean;
12633
- externalDocs?: OpenApiExternalDocs;
12634
- format?: 'binary' | 'boolean' | 'byte' | 'date-time' | 'date' | 'double' | 'float' | 'int32' | 'int64' | 'password' | 'string';
12635
- items?: OpenApiSchema$1;
12636
- maxItems?: number;
12637
- maxLength?: number;
12638
- maxProperties?: number;
12639
- maximum?: number;
12640
- minItems?: number;
12641
- minLength?: number;
12642
- minProperties?: number;
12643
- minimum?: number;
12644
- multipleOf?: number;
12645
- not?: OpenApiSchema$1[];
12646
- nullable?: boolean;
12647
- oneOf?: OpenApiSchema$1[];
12648
- pattern?: string;
12649
- prefixItems?: OpenApiSchema$1[];
12650
- properties?: Dictionary<OpenApiSchema$1>;
12651
- readOnly?: boolean;
12652
- required?: string[];
12653
- title?: string;
12654
- type?: string | string[];
12655
- uniqueItems?: boolean;
12656
- writeOnly?: boolean;
12657
- xml?: OpenApiXml$1;
12207
+ //#region src/plugins/config.d.ts
12208
+ interface PluginConfigMap {
12209
+ '@angular/common': AngularCommonPlugin['Types'];
12210
+ '@hey-api/client-angular': HeyApiClientAngularPlugin['Types'];
12211
+ '@hey-api/client-axios': HeyApiClientAxiosPlugin['Types'];
12212
+ '@hey-api/client-fetch': HeyApiClientFetchPlugin['Types'];
12213
+ '@hey-api/client-next': HeyApiClientNextPlugin['Types'];
12214
+ '@hey-api/client-nuxt': HeyApiClientNuxtPlugin['Types'];
12215
+ '@hey-api/client-ofetch': HeyApiClientOfetchPlugin['Types'];
12216
+ '@hey-api/schemas': HeyApiSchemasPlugin['Types'];
12217
+ '@hey-api/sdk': HeyApiSdkPlugin['Types'];
12218
+ '@hey-api/transformers': HeyApiTransformersPlugin['Types'];
12219
+ '@hey-api/typescript': HeyApiTypeScriptPlugin['Types'];
12220
+ '@pinia/colada': PiniaColadaPlugin['Types'];
12221
+ '@tanstack/angular-query-experimental': TanStackAngularQueryPlugin['Types'];
12222
+ '@tanstack/react-query': TanStackReactQueryPlugin['Types'];
12223
+ '@tanstack/solid-query': TanStackSolidQueryPlugin['Types'];
12224
+ '@tanstack/svelte-query': TanStackSvelteQueryPlugin['Types'];
12225
+ '@tanstack/vue-query': TanStackVueQueryPlugin['Types'];
12226
+ arktype: ArktypePlugin['Types'];
12227
+ fastify: FastifyPlugin['Types'];
12228
+ swr: SwrPlugin['Types'];
12229
+ valibot: ValibotPlugin['Types'];
12230
+ zod: ZodPlugin['Types'];
12658
12231
  }
12659
12232
  //#endregion
12660
- //#region src/openApi/v3/interfaces/OpenApiParameter.d.ts
12661
- /**
12662
- * add only one type for now as that's needed to resolve the reported issue,
12663
- * more types should be added though
12664
- * {@link https://github.com/hey-api/openapi-ts/issues/612}
12665
- */
12666
- type MediaType = 'application/json';
12667
- /**
12668
- * encoding interface should be added, not adding it for now as it's not needed
12669
- * to resolve the issue reported
12670
- * {@link https://github.com/hey-api/openapi-ts/issues/612}
12671
- */
12672
- interface MediaTypeObject {
12673
- example?: unknown;
12674
- examples?: Dictionary<OpenApiExample>;
12675
- schema: OpenApiSchema$1;
12676
- }
12677
- /**
12678
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object
12679
- */
12680
- interface OpenApiParameter extends OpenApiReference {
12681
- allowEmptyValue?: boolean;
12682
- allowReserved?: boolean;
12683
- content?: Record<MediaType, MediaTypeObject>;
12684
- deprecated?: boolean;
12685
- description?: string;
12686
- example?: unknown;
12687
- examples?: Dictionary<OpenApiExample>;
12688
- explode?: boolean;
12689
- in: 'cookie' | 'formData' | 'header' | 'path' | 'query';
12690
- name: string;
12691
- nullable?: boolean;
12692
- required?: boolean;
12693
- schema?: OpenApiSchema$1;
12694
- style?: string;
12233
+ //#region src/utils/logger.d.ts
12234
+ declare class Logger {
12235
+ private events;
12236
+ private end;
12237
+ /**
12238
+ * Recursively end all unended events in the event tree.
12239
+ * This ensures all events have end marks before measuring.
12240
+ */
12241
+ private endAllEvents;
12242
+ report(print?: boolean): PerformanceMeasure | undefined;
12243
+ private reportEvent;
12244
+ private start;
12245
+ private storeEvent;
12246
+ timeEvent(name: string): {
12247
+ mark: PerformanceMark;
12248
+ timeEnd: () => void;
12249
+ };
12695
12250
  }
12696
12251
  //#endregion
12697
- //#region src/openApi/common/interfaces/client.d.ts
12698
- interface Enum {
12699
- customDescription?: string;
12700
- customName?: string;
12701
- description?: string;
12702
- value: string | number;
12703
- }
12704
- interface OperationParameter extends Model {
12705
- in: 'body' | 'cookie' | 'formData' | 'header' | 'path' | 'query';
12706
- mediaType: string | null;
12707
- prop: string;
12708
- }
12709
- interface OperationParameters extends Pick<Model, '$refs' | 'imports'> {
12710
- parameters: OperationParameter[];
12711
- parametersBody: OperationParameter | null;
12712
- parametersCookie: OperationParameter[];
12713
- parametersForm: OperationParameter[];
12714
- parametersHeader: OperationParameter[];
12715
- parametersPath: OperationParameter[];
12716
- parametersQuery: OperationParameter[];
12717
- }
12718
- interface OperationResponse extends Model {
12719
- code: number | 'default' | '1XX' | '2XX' | '3XX' | '4XX' | '5XX';
12720
- in: 'header' | 'response';
12721
- responseTypes: Array<'error' | 'success'>;
12722
- }
12723
- type Method = 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE';
12724
- interface Operation$1 extends OperationParameters {
12725
- deprecated: boolean;
12726
- description: string | null;
12252
+ //#region src/ir/context.d.ts
12253
+ declare class Context<Spec extends Record<string, any> = any> {
12727
12254
  /**
12728
- * The operationId from OpenAPI specification.
12255
+ * Configuration for parsing and generating the output. This
12256
+ * is a mix of user-provided and default values.
12729
12257
  */
12730
- id: string | null;
12731
- method: Method;
12732
- name: string;
12733
- path: string;
12734
- responseHeader: string | null;
12258
+ config: Config;
12735
12259
  /**
12736
- * All operation responses defined in OpenAPI specification.
12737
- * Sorted by status code.
12260
+ * The code generation project instance used to manage files, symbols,
12738
12261
  */
12739
- responses: OperationResponse[];
12740
- summary: string | null;
12741
- tags: string[] | null;
12742
- }
12743
- interface Schema {
12744
- default?: unknown;
12745
- exclusiveMaximum?: boolean;
12746
- exclusiveMinimum?: boolean;
12747
- format?: 'binary' | 'boolean' | 'byte' | 'date-time' | 'date' | 'double' | 'float' | 'int32' | 'int64' | 'password' | 'string';
12748
- isDefinition: boolean;
12749
- isNullable: boolean;
12750
- isReadOnly: boolean;
12751
- isRequired: boolean;
12752
- maxItems?: number;
12753
- maxLength?: number;
12754
- maxProperties?: number;
12755
- maximum?: number;
12756
- minItems?: number;
12757
- minLength?: number;
12758
- minProperties?: number;
12759
- minimum?: number;
12760
- multipleOf?: number;
12761
- pattern?: string;
12762
- uniqueItems?: boolean;
12763
- }
12764
- interface ModelMeta {
12262
+ gen: Project;
12765
12263
  /**
12766
- * Ref to the type in OpenAPI specification.
12264
+ * The dependency graph built from the intermediate representation.
12767
12265
  */
12768
- $ref: string;
12266
+ graph: Graph | undefined;
12769
12267
  /**
12770
- * Name passed to the initial `getModel()` call.
12268
+ * Intermediate representation model obtained from `spec`.
12771
12269
  */
12772
- name: string;
12773
- }
12774
- interface Model extends Schema {
12270
+ ir: IR$1.Model;
12775
12271
  /**
12776
- * **Experimental.** Contains list of original refs so they can be used
12777
- * to access the schema from anywhere instead of relying on string name.
12778
- * This allows us to do things like detect type of ref.
12272
+ * Logger instance.
12779
12273
  */
12780
- $refs: string[];
12781
- base: string;
12782
- deprecated?: boolean;
12783
- description: string | null;
12784
- enum: Enum[];
12785
- enums: Model[];
12786
- export: 'all-of' | 'any-of' | 'array' | 'const' | 'dictionary' | 'enum' | 'generic' | 'interface' | 'one-of' | 'reference';
12787
- imports: string[];
12788
- in: OperationParameter['in'] | OpenApiParameter['in'] | OperationResponse['in'] | '';
12789
- link: Model | Model[] | null;
12790
- meta?: ModelMeta;
12274
+ logger: Logger;
12791
12275
  /**
12792
- * @deprecated use `meta.name` instead
12276
+ * The package metadata and utilities for the current context, constructed
12277
+ * from the provided dependencies. Used for managing package-related
12278
+ * information such as name, version, and dependency resolution during
12279
+ * code generation.
12793
12280
  */
12794
- name: string;
12795
- properties: Model[];
12796
- template: string | null;
12797
- type: string;
12798
- }
12799
- interface Client$1 {
12281
+ package: Package;
12800
12282
  /**
12801
- * Configuration for parsing and generating the output. This
12802
- * is a mix of user-provided and default values.
12283
+ * A map of registered plugin instances, keyed by plugin name. Plugins are
12284
+ * registered through the `registerPlugin` method and can be accessed by
12285
+ * their configured name from the config.
12803
12286
  */
12804
- config: Config;
12805
- models: Model[];
12806
- operations: Operation$1[];
12807
- server: string;
12287
+ plugins: Partial<Record<PluginNames, PluginInstance<PluginConfigMap[keyof PluginConfigMap]>>>;
12808
12288
  /**
12809
- * Map of generated types where type names are keys. This is used to track
12810
- * uniquely generated types as we may want to deduplicate if there are
12811
- * multiple definitions with the same name but different value, or if we
12812
- * want to transform names.
12289
+ * Resolved specification from `input`.
12813
12290
  */
12814
- types: Record<string, ModelMeta>;
12815
- version: string;
12816
- }
12817
- //#endregion
12818
- //#region src/openApi/v2/interfaces/OpenApiExternalDocs.d.ts
12819
- /**
12820
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#external-documentation-object
12821
- */
12822
- interface OpenApiExternalDocs$1 {
12823
- description?: string;
12824
- url: string;
12825
- }
12826
- //#endregion
12827
- //#region src/openApi/v2/interfaces/OpenApiContact.d.ts
12828
- /**
12829
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#contact-object
12830
- */
12831
- interface OpenApiContact$1 {
12832
- email?: string;
12833
- name?: string;
12834
- url?: string;
12835
- }
12836
- //#endregion
12837
- //#region src/openApi/v2/interfaces/OpenApiLicense.d.ts
12838
- /**
12839
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#license-object
12840
- */
12841
- interface OpenApiLicense$1 {
12842
- name: string;
12843
- url?: string;
12844
- }
12845
- //#endregion
12846
- //#region src/openApi/v2/interfaces/OpenApiInfo.d.ts
12847
- /**
12848
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#info-object
12849
- */
12850
- interface OpenApiInfo$1 {
12851
- contact?: OpenApiContact$1;
12852
- description?: string;
12853
- license?: OpenApiLicense$1;
12854
- termsOfService?: string;
12855
- title: string;
12856
- version: string;
12857
- }
12858
- //#endregion
12859
- //#region src/openApi/v2/interfaces/Extensions/WithNullableExtension.d.ts
12860
- interface WithNullableExtension {
12861
- 'x-nullable'?: boolean;
12862
- }
12863
- //#endregion
12864
- //#region src/openApi/v2/interfaces/OpenApiItems.d.ts
12865
- /**
12866
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#items-object)
12867
- */
12868
- interface OpenApiItems extends WithEnumExtension {
12869
- collectionFormat?: 'csv' | 'ssv' | 'tsv' | 'pipes';
12870
- default?: unknown;
12871
- enum?: (string | number)[];
12872
- exclusiveMaximum?: number;
12873
- exclusiveMinimum?: number;
12874
- format?: 'int32' | 'int64' | 'float' | 'double' | 'string' | 'boolean' | 'byte' | 'binary' | 'date' | 'date-time' | 'password';
12875
- items?: OpenApiItems;
12876
- maxItems?: number;
12877
- maxLength?: number;
12878
- maximum?: number;
12879
- minItems?: number;
12880
- minLength?: number;
12881
- minimum?: number;
12882
- multipleOf?: number;
12883
- pattern?: string;
12884
- type?: string;
12885
- uniqueItems?: boolean;
12886
- }
12887
- //#endregion
12888
- //#region src/openApi/v2/interfaces/OpenApiReference.d.ts
12889
- /**
12890
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#reference-object
12891
- */
12892
- interface OpenApiReference$1 {
12893
- $ref?: string;
12894
- }
12895
- //#endregion
12896
- //#region src/openApi/v2/interfaces/OpenApiXml.d.ts
12897
- /**
12898
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#xml-object
12899
- */
12900
- interface OpenApiXml {
12901
- attribute?: boolean;
12902
- name?: string;
12903
- namespace?: string;
12904
- prefix?: string;
12905
- wrapped?: boolean;
12906
- }
12907
- //#endregion
12908
- //#region src/openApi/v2/interfaces/OpenApiSchema.d.ts
12909
- /**
12910
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#schema-object
12911
- */
12912
- interface OpenApiSchema extends OpenApiReference$1, WithEnumExtension, WithNullableExtension {
12913
- additionalProperties?: boolean | OpenApiSchema;
12914
- allOf?: OpenApiSchema[];
12915
- default?: unknown;
12916
- description?: string;
12917
- discriminator?: string;
12918
- enum?: (string | number)[];
12919
- example?: unknown;
12920
- exclusiveMaximum?: boolean;
12921
- exclusiveMinimum?: boolean;
12922
- externalDocs?: OpenApiExternalDocs$1;
12923
- format?: 'int32' | 'int64' | 'float' | 'double' | 'string' | 'boolean' | 'byte' | 'binary' | 'date' | 'date-time' | 'password';
12924
- items?: OpenApiSchema;
12925
- maxItems?: number;
12926
- maxLength?: number;
12927
- maxProperties?: number;
12928
- maximum?: number;
12929
- minItems?: number;
12930
- minLength?: number;
12931
- minProperties?: number;
12932
- minimum?: number;
12933
- multipleOf?: number;
12934
- pattern?: string;
12935
- properties?: Dictionary<OpenApiSchema>;
12936
- readOnly?: boolean;
12937
- required?: string[];
12938
- title?: string;
12939
- type?: string;
12940
- uniqueItems?: boolean;
12941
- xml?: OpenApiXml;
12942
- }
12943
- //#endregion
12944
- //#region src/openApi/v2/interfaces/OpenApiParameter.d.ts
12945
- /**
12946
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameter-object
12947
- */
12948
- interface OpenApiParameter$1 extends OpenApiReference$1, WithEnumExtension, WithNullableExtension {
12949
- allowEmptyValue?: boolean;
12950
- collectionFormat?: 'csv' | 'ssv' | 'tsv' | 'pipes' | 'multi';
12951
- default?: unknown;
12952
- description?: string;
12953
- enum?: (string | number)[];
12954
- exclusiveMaximum?: boolean;
12955
- exclusiveMinimum?: boolean;
12956
- format?: 'int32' | 'int64' | 'float' | 'double' | 'string' | 'boolean' | 'byte' | 'binary' | 'date' | 'date-time' | 'password';
12957
- in: 'path' | 'query' | 'header' | 'formData' | 'body';
12958
- items?: OpenApiItems;
12959
- maxItems?: number;
12960
- maxLength?: number;
12961
- maximum?: number;
12962
- minItems?: number;
12963
- minLength?: number;
12964
- minimum?: number;
12965
- multipleOf?: number;
12966
- name: string;
12967
- pattern?: string;
12968
- required?: boolean;
12969
- schema?: OpenApiSchema;
12970
- type?: string;
12971
- uniqueItems?: boolean;
12972
- }
12973
- //#endregion
12974
- //#region src/openApi/v2/interfaces/OpenApiExample.d.ts
12975
- /**
12976
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#example-object
12977
- */
12978
- interface OpenApiExample$1 {
12979
- [mimetype: string]: unknown;
12980
- }
12981
- //#endregion
12982
- //#region src/openApi/v2/interfaces/OpenApiHeader.d.ts
12983
- /**
12984
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#header-object
12985
- */
12986
- interface OpenApiHeader$1 {
12987
- collectionFormat?: 'csv' | 'ssv' | 'tsv' | 'pipes';
12988
- default?: unknown;
12989
- description?: string;
12990
- enum?: (string | number)[];
12991
- exclusiveMaximum?: boolean;
12992
- exclusiveMinimum?: boolean;
12993
- format?: 'int32' | 'int64' | 'float' | 'double' | 'string' | 'boolean' | 'byte' | 'binary' | 'date' | 'date-time' | 'password';
12994
- items?: Dictionary<OpenApiItems>;
12995
- maxItems?: number;
12996
- maxLength?: number;
12997
- maximum?: number;
12998
- minItems?: number;
12999
- minLength?: number;
13000
- minimum?: number;
13001
- multipleOf?: number;
13002
- pattern?: string;
13003
- type: 'string' | 'number' | 'integer' | 'boolean' | 'array';
13004
- uniqueItems?: boolean;
13005
- }
13006
- //#endregion
13007
- //#region src/openApi/v2/interfaces/OpenApiResponse.d.ts
13008
- /**
13009
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#response-object
13010
- */
13011
- interface OpenApiResponse$1 extends OpenApiReference$1 {
13012
- description: string;
13013
- examples?: OpenApiExample$1;
13014
- headers?: Dictionary<OpenApiHeader$1>;
13015
- schema?: OpenApiSchema & OpenApiReference$1;
13016
- }
13017
- //#endregion
13018
- //#region src/openApi/v2/interfaces/OpenApiResponses.d.ts
13019
- /**
13020
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#responses-object
13021
- */
13022
- interface Response$1 {
13023
- [httpcode: string]: OpenApiResponse$1;
13024
- }
13025
- type OpenApiResponses$1 = Response$1 & {
13026
- default?: OpenApiResponse$1;
13027
- };
13028
- //#endregion
13029
- //#region src/openApi/v2/interfaces/OpenApiSecurityRequirement.d.ts
13030
- /**
13031
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#security-requirement-object
13032
- */
13033
- interface OpenApiSecurityRequirement$1 {
13034
- [key: string]: string;
13035
- }
13036
- //#endregion
13037
- //#region src/openApi/v2/interfaces/OpenApiOperation.d.ts
13038
- /**
13039
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operation-object
13040
- */
13041
- interface OpenApiOperation$1 {
13042
- consumes?: string[];
13043
- deprecated?: boolean;
13044
- description?: string;
13045
- externalDocs?: OpenApiExternalDocs$1;
13046
- operationId?: string;
13047
- parameters?: OpenApiParameter$1[];
13048
- produces?: string[];
13049
- responses: OpenApiResponses$1;
13050
- schemes?: ('http' | 'https' | 'ws' | 'wss')[];
13051
- security?: OpenApiSecurityRequirement$1[];
13052
- summary?: string;
13053
- tags?: string[];
13054
- }
13055
- //#endregion
13056
- //#region src/openApi/v2/interfaces/OpenApiPath.d.ts
13057
- /**
13058
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-item-object
13059
- */
13060
- interface OpenApiPath$1 extends OpenApiReference$1 {
13061
- connect?: OpenApiOperation$1;
13062
- delete?: OpenApiOperation$1;
13063
- get?: OpenApiOperation$1;
13064
- head?: OpenApiOperation$1;
13065
- options?: OpenApiOperation$1;
13066
- parameters?: OpenApiParameter$1[];
13067
- patch?: OpenApiOperation$1;
13068
- post?: OpenApiOperation$1;
13069
- put?: OpenApiOperation$1;
13070
- trace?: OpenApiOperation$1;
13071
- }
13072
- //#endregion
13073
- //#region src/openApi/v2/interfaces/OpenApiSecurityScheme.d.ts
13074
- /**
13075
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#security-scheme-object
13076
- */
13077
- interface OpenApiSecurityScheme$1 {
13078
- authorizationUrl?: string;
13079
- description?: string;
13080
- flow?: 'implicit' | 'password' | 'application' | 'accessCode';
13081
- in?: 'query' | 'header';
13082
- name?: string;
13083
- scopes: Dictionary<string>;
13084
- tokenUrl?: string;
13085
- type: 'basic' | 'apiKey' | 'oauth2';
13086
- }
13087
- //#endregion
13088
- //#region src/openApi/v2/interfaces/OpenApiTag.d.ts
13089
- /**
13090
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#tag-object
13091
- */
13092
- interface OpenApiTag$1 {
13093
- description?: string;
13094
- externalDocs?: OpenApiExternalDocs$1;
13095
- name: string;
13096
- }
13097
- //#endregion
13098
- //#region src/openApi/v2/interfaces/OpenApi.d.ts
13099
- /**
13100
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md
13101
- */
13102
- interface OpenApi$1 {
13103
- basePath?: string;
13104
- consumes?: string[];
13105
- definitions?: Dictionary<OpenApiSchema>;
13106
- externalDocs?: OpenApiExternalDocs$1;
13107
- host?: string;
13108
- info: OpenApiInfo$1;
13109
- parameters?: Dictionary<OpenApiParameter$1>;
13110
- paths: Dictionary<OpenApiPath$1>;
13111
- produces?: string[];
13112
- responses?: Dictionary<OpenApiResponse$1>;
13113
- schemes?: string[];
13114
- security?: OpenApiSecurityRequirement$1[];
13115
- securityDefinitions?: Dictionary<OpenApiSecurityScheme$1>;
13116
- swagger: string;
13117
- tags?: OpenApiTag$1[];
13118
- }
13119
- //#endregion
13120
- //#region src/openApi/v3/interfaces/OpenApiHeader.d.ts
13121
- /**
13122
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#header-object
13123
- */
13124
- interface OpenApiHeader extends OpenApiReference {
13125
- allowEmptyValue?: boolean;
13126
- allowReserved?: boolean;
13127
- deprecated?: boolean;
13128
- description?: string;
13129
- example?: unknown;
13130
- examples?: Dictionary<OpenApiExample>;
13131
- explode?: boolean;
13132
- required?: boolean;
13133
- schema?: OpenApiSchema$1;
13134
- style?: string;
13135
- }
13136
- //#endregion
13137
- //#region src/openApi/v3/interfaces/OpenApiEncoding.d.ts
13138
- /**
13139
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encoding-object
13140
- */
13141
- interface OpenApiEncoding {
13142
- allowReserved?: boolean;
13143
- contentType?: string;
13144
- explode?: boolean;
13145
- headers?: Dictionary<OpenApiHeader>;
13146
- style?: string;
13147
- }
13148
- //#endregion
13149
- //#region src/openApi/v3/interfaces/OpenApiMediaType.d.ts
13150
- /**
13151
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#media-type-object
13152
- */
13153
- interface OpenApiMediaType extends OpenApiReference {
13154
- encoding?: Dictionary<OpenApiEncoding>;
13155
- example?: unknown;
13156
- examples?: Dictionary<OpenApiExample>;
13157
- schema?: OpenApiSchema$1;
13158
- }
13159
- //#endregion
13160
- //#region src/openApi/v3/interfaces/OpenApiRequestBody.d.ts
13161
- /**
13162
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#request-body-object
13163
- */
13164
- interface OpenApiRequestBody extends OpenApiReference {
13165
- content: Dictionary<OpenApiMediaType>;
13166
- description?: string;
13167
- nullable?: boolean;
13168
- required?: boolean;
13169
- 'x-body-name'?: string;
13170
- }
13171
- //#endregion
13172
- //#region src/openApi/v3/interfaces/OpenApiServerVariable.d.ts
13173
- /**
13174
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-variable-object
13175
- */
13176
- interface OpenApiServerVariable extends WithEnumExtension {
13177
- default: string;
13178
- description?: string;
13179
- enum?: (string | number)[];
13180
- }
13181
- //#endregion
13182
- //#region src/openApi/v3/interfaces/OpenApiServer.d.ts
13183
- /**
13184
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object
13185
- */
13186
- interface OpenApiServer {
13187
- description?: string;
13188
- url: string;
13189
- variables?: Dictionary<OpenApiServerVariable>;
13190
- }
13191
- //#endregion
13192
- //#region src/openApi/v3/interfaces/OpenApiLink.d.ts
13193
- /**
13194
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#link-object
13195
- */
13196
- interface OpenApiLink extends OpenApiReference {
13197
- description?: string;
13198
- operationId?: string;
13199
- operationRef?: string;
13200
- parameters?: Dictionary<unknown>;
13201
- requestBody?: unknown;
13202
- server?: OpenApiServer;
13203
- }
13204
- //#endregion
13205
- //#region src/openApi/v3/interfaces/OpenApiResponse.d.ts
13206
- /**
13207
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#response-object
13208
- */
13209
- interface OpenApiResponse extends OpenApiReference {
13210
- content?: Dictionary<OpenApiMediaType>;
13211
- description: string;
13212
- headers?: Dictionary<OpenApiHeader>;
13213
- links?: Dictionary<OpenApiLink>;
13214
- }
13215
- //#endregion
13216
- //#region src/openApi/v3/interfaces/OpenApiResponses.d.ts
13217
- /**
13218
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#responses-object
13219
- */
13220
- interface Response {
13221
- [httpcode: string]: OpenApiResponse;
13222
- }
13223
- type OpenApiResponses = OpenApiReference & Response & {
13224
- default: OpenApiResponse;
13225
- };
13226
- //#endregion
13227
- //#region src/openApi/v3/interfaces/OpenApiSecurityRequirement.d.ts
13228
- /**
13229
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-requirement-object
13230
- */
13231
- interface OpenApiSecurityRequirement {
13232
- [name: string]: string;
13233
- }
13234
- //#endregion
13235
- //#region src/openApi/v3/interfaces/OpenApiOperation.d.ts
13236
- /**
13237
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object
13238
- */
13239
- interface OpenApiOperation {
13240
- callbacks?: Dictionary<OpenApiCallback>;
13241
- deprecated?: boolean;
13242
- description?: string;
13243
- externalDocs?: OpenApiExternalDocs;
13244
- operationId?: string;
13245
- parameters?: OpenApiParameter[];
13246
- requestBody?: OpenApiRequestBody;
13247
- responses: OpenApiResponses;
13248
- security?: OpenApiSecurityRequirement[];
13249
- servers?: OpenApiServer[];
13250
- summary?: string;
13251
- tags?: string[];
13252
- }
13253
- //#endregion
13254
- //#region src/openApi/v3/interfaces/OpenApiPath.d.ts
13255
- /**
13256
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object
13257
- */
13258
- interface OpenApiPath {
13259
- connect?: OpenApiOperation;
13260
- delete?: OpenApiOperation;
13261
- description?: string;
13262
- get?: OpenApiOperation;
13263
- head?: OpenApiOperation;
13264
- options?: OpenApiOperation;
13265
- parameters?: OpenApiParameter[];
13266
- patch?: OpenApiOperation;
13267
- post?: OpenApiOperation;
13268
- put?: OpenApiOperation;
13269
- servers?: OpenApiServer[];
13270
- summary?: string;
13271
- trace?: OpenApiOperation;
13272
- }
13273
- //#endregion
13274
- //#region src/openApi/v3/interfaces/OpenApiCallback.d.ts
13275
- /**
13276
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object
13277
- */
13278
- interface Callback {
13279
- [key: string]: OpenApiPath;
13280
- }
13281
- type OpenApiCallback = OpenApiReference & Callback;
13282
- //#endregion
13283
- //#region src/openApi/v3/interfaces/OpenApiOAuthFlow.d.ts
13284
- /**
13285
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauth-flow-object
13286
- */
13287
- interface OpenApiOAuthFlow {
13288
- authorizationUrl: string;
13289
- refreshUrl?: string;
13290
- scopes: Dictionary<string>;
13291
- tokenUrl: string;
12291
+ spec: Spec;
12292
+ constructor({
12293
+ config,
12294
+ dependencies,
12295
+ logger,
12296
+ spec
12297
+ }: {
12298
+ config: Config;
12299
+ dependencies: Record<string, string>;
12300
+ logger: Logger;
12301
+ spec: Spec;
12302
+ });
12303
+ /**
12304
+ * Returns a resolved and dereferenced schema from `spec`.
12305
+ */
12306
+ dereference<T>(schema: {
12307
+ $ref: string;
12308
+ }): T;
12309
+ /**
12310
+ * Registers a new plugin to the global context.
12311
+ *
12312
+ * @param name Plugin name.
12313
+ * @returns Registered plugin instance.
12314
+ */
12315
+ private registerPlugin;
12316
+ /**
12317
+ * Registers all plugins in the order specified by the configuration and returns
12318
+ * an array of the registered PluginInstance objects. Each plugin is instantiated
12319
+ * and added to the context's plugins map.
12320
+ *
12321
+ * @returns {ReadonlyArray<PluginInstance>} An array of registered plugin instances in order.
12322
+ */
12323
+ registerPlugins(): ReadonlyArray<PluginInstance>;
12324
+ resolveIrRef<T>($ref: string): T;
12325
+ /**
12326
+ * Returns a resolved reference from `spec`.
12327
+ */
12328
+ resolveRef<T>($ref: string): T;
13292
12329
  }
13293
12330
  //#endregion
13294
- //#region src/openApi/v3/interfaces/OpenApiOAuthFlows.d.ts
13295
- /**
13296
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauth-flows-object
13297
- */
13298
- interface OpenApiOAuthFlows {
13299
- authorizationCode?: OpenApiOAuthFlow;
13300
- clientCredentials?: OpenApiOAuthFlow;
13301
- implicit?: OpenApiOAuthFlow;
13302
- password?: OpenApiOAuthFlow;
13303
- }
12331
+ //#region src/ir/graph.d.ts
12332
+ declare const irTopLevelKinds: readonly ["operation", "parameter", "requestBody", "schema", "server", "webhook"];
12333
+ type IrTopLevelKind = (typeof irTopLevelKinds)[number];
13304
12334
  //#endregion
13305
- //#region src/openApi/v3/interfaces/OpenApiSecurityScheme.d.ts
13306
- /**
13307
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object
13308
- */
13309
- interface OpenApiSecurityScheme extends OpenApiReference {
13310
- bearerFormat?: string;
13311
- description?: string;
13312
- flows?: OpenApiOAuthFlows;
13313
- in?: 'query' | 'header' | 'cookie';
13314
- name?: string;
13315
- openIdConnectUrl?: string;
13316
- scheme?: string;
13317
- type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
12335
+ //#region src/openApi/types.d.ts
12336
+ declare namespace OpenApi {
12337
+ export type V2_0_X = OpenApiV2_0_X;
12338
+ export type V3_0_X = OpenApiV3_0_X;
12339
+ export type V3_1_X = OpenApiV3_1_X;
13318
12340
  }
13319
- //#endregion
13320
- //#region src/openApi/v3/interfaces/OpenApiComponents.d.ts
13321
- /**
13322
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object
13323
- */
13324
- interface OpenApiComponents {
13325
- callbacks?: Dictionary<OpenApiCallback>;
13326
- examples?: Dictionary<OpenApiExample>;
13327
- headers?: Dictionary<OpenApiHeader>;
13328
- links?: Dictionary<OpenApiLink>;
13329
- parameters?: Dictionary<OpenApiParameter>;
13330
- requestBodies?: Dictionary<OpenApiRequestBody>;
13331
- responses?: Dictionary<OpenApiResponses>;
13332
- schemas?: Dictionary<OpenApiSchema$1>;
13333
- securitySchemes?: Dictionary<OpenApiSecurityScheme>;
12341
+ declare namespace OpenApiMetaObject {
12342
+ export type V2_0_X = OpenApiV2_0_XTypes['InfoObject'];
12343
+ export type V3_0_X = OpenApiV3_0_XTypes['InfoObject'];
12344
+ export type V3_1_X = OpenApiV3_1_XTypes['InfoObject'];
13334
12345
  }
13335
- //#endregion
13336
- //#region src/openApi/v3/interfaces/OpenApiContact.d.ts
13337
- /**
13338
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#contact-object
13339
- */
13340
- interface OpenApiContact {
13341
- email?: string;
13342
- name?: string;
13343
- url?: string;
12346
+ declare namespace OpenApiOperationObject {
12347
+ export type V2_0_X = OpenApiV2_0_XTypes['OperationObject'];
12348
+ export type V3_0_X = OpenApiV3_0_XTypes['OperationObject'];
12349
+ export type V3_1_X = OpenApiV3_1_XTypes['OperationObject'];
13344
12350
  }
13345
- //#endregion
13346
- //#region src/openApi/v3/interfaces/OpenApiLicense.d.ts
13347
- /**
13348
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#license-object
13349
- */
13350
- interface OpenApiLicense {
13351
- name: string;
13352
- url?: string;
12351
+ declare namespace OpenApiParameterObject {
12352
+ export type V3_0_X = OpenApiV3_0_XTypes['ParameterObject'] | OpenApiV3_0_XTypes['ReferenceObject'];
12353
+ export type V3_1_X = OpenApiV3_1_XTypes['ParameterObject'] | OpenApiV3_1_XTypes['ReferenceObject'];
13353
12354
  }
13354
- //#endregion
13355
- //#region src/openApi/v3/interfaces/OpenApiInfo.d.ts
13356
- /**
13357
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#info-object
13358
- */
13359
- interface OpenApiInfo {
13360
- contact?: OpenApiContact;
13361
- description?: string;
13362
- license?: OpenApiLicense;
13363
- termsOfService?: string;
13364
- title: string;
13365
- version: string;
12355
+ declare namespace OpenApiRequestBodyObject {
12356
+ export type V3_0_X = OpenApiV3_0_XTypes['RequestBodyObject'] | OpenApiV3_0_XTypes['ReferenceObject'];
12357
+ export type V3_1_X = OpenApiV3_1_XTypes['RequestBodyObject'] | OpenApiV3_1_XTypes['ReferenceObject'];
13366
12358
  }
13367
- //#endregion
13368
- //#region src/openApi/v3/interfaces/OpenApiPaths.d.ts
13369
- /**
13370
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object
13371
- */
13372
- interface OpenApiPaths {
13373
- [path: string]: OpenApiPath;
12359
+ declare namespace OpenApiResponseObject {
12360
+ export type V3_0_X = OpenApiV3_0_XTypes['ResponseObject'] | OpenApiV3_0_XTypes['ReferenceObject'];
12361
+ export type V3_1_X = OpenApiV3_1_XTypes['ResponseObject'] | OpenApiV3_1_XTypes['ReferenceObject'];
12362
+ }
12363
+ declare namespace OpenApiSchemaObject {
12364
+ export type V2_0_X = OpenApiV2_0_XTypes['SchemaObject'];
12365
+ export type V3_0_X = OpenApiV3_0_XTypes['SchemaObject'];
12366
+ export type V3_1_X = OpenApiV3_1_XTypes['SchemaObject'];
13374
12367
  }
13375
12368
  //#endregion
13376
- //#region src/openApi/v3/interfaces/OpenApiTag.d.ts
13377
- /**
13378
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#tag-object
13379
- */
13380
- interface OpenApiTag {
13381
- description?: string;
13382
- externalDocs?: OpenApiExternalDocs;
12369
+ //#region src/plugins/shared/types/instance.d.ts
12370
+ type BaseEvent = {
12371
+ /**
12372
+ * Path to the node, derived from the pointer.
12373
+ */
12374
+ _path: ReadonlyArray<string | number>;
12375
+ /**
12376
+ * Pointer to the node in the graph.
12377
+ */
12378
+ pointer: string;
12379
+ /**
12380
+ * Tags associated with the node.
12381
+ */
12382
+ tags?: ReadonlyArray<string>;
12383
+ };
12384
+ type WalkEvents = BaseEvent & ({
12385
+ method: keyof IR$1.PathItemObject;
12386
+ operation: IR$1.OperationObject;
12387
+ path: string;
12388
+ type: Extract<IrTopLevelKind, 'operation'>;
12389
+ } | {
13383
12390
  name: string;
13384
- }
12391
+ parameter: IR$1.ParameterObject;
12392
+ type: Extract<IrTopLevelKind, 'parameter'>;
12393
+ } | {
12394
+ name: string;
12395
+ requestBody: IR$1.RequestBodyObject;
12396
+ type: Extract<IrTopLevelKind, 'requestBody'>;
12397
+ } | {
12398
+ name: string;
12399
+ schema: IR$1.SchemaObject;
12400
+ type: Extract<IrTopLevelKind, 'schema'>;
12401
+ } | {
12402
+ server: IR$1.ServerObject;
12403
+ type: Extract<IrTopLevelKind, 'server'>;
12404
+ } | {
12405
+ key: string;
12406
+ method: keyof IR$1.PathItemObject;
12407
+ operation: IR$1.OperationObject;
12408
+ type: Extract<IrTopLevelKind, 'webhook'>;
12409
+ });
12410
+ type WalkEvent<T extends IrTopLevelKind = IrTopLevelKind> = Extract<WalkEvents, {
12411
+ type: T;
12412
+ }>;
13385
12413
  //#endregion
13386
- //#region src/openApi/v3/interfaces/OpenApi.d.ts
13387
- /**
13388
- * {@link} https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md
13389
- */
13390
- interface OpenApi$2 {
13391
- components?: OpenApiComponents;
13392
- externalDocs?: OpenApiExternalDocs;
13393
- info: OpenApiInfo;
13394
- openapi: string;
13395
- paths: OpenApiPaths;
13396
- security?: OpenApiSecurityRequirement[];
13397
- servers?: OpenApiServer[];
13398
- tags?: OpenApiTag[];
12414
+ //#region src/plugins/shared/utils/instance.d.ts
12415
+ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
12416
+ api: T['api'];
12417
+ config: Omit<T['resolvedConfig'], 'name'>;
12418
+ context: Context;
12419
+ dependencies: Required<Plugin.Config<T>>['dependencies'];
12420
+ private eventHooks;
12421
+ gen: IProject;
12422
+ private handler;
12423
+ name: T['resolvedConfig']['name'];
12424
+ /**
12425
+ * The package metadata and utilities for the current context, constructed
12426
+ * from the provided dependencies. Used for managing package-related
12427
+ * information such as name, version, and dependency resolution during
12428
+ * code generation.
12429
+ */
12430
+ package: Context['package'];
12431
+ constructor(props: Pick<Required<Plugin.Config<T>>, 'config' | 'dependencies' | 'handler'> & {
12432
+ api?: T['api'];
12433
+ context: Context<OpenApi.V2_0_X | OpenApi.V3_0_X | OpenApi.V3_1_X>;
12434
+ gen: IProject;
12435
+ name: string;
12436
+ });
12437
+ /**
12438
+ * Iterates over various input elements as specified by the event types, in
12439
+ * a specific order: servers, schemas, parameters, request bodies, then
12440
+ * operations.
12441
+ *
12442
+ * This ensures, for example, that schemas are always processed before
12443
+ * operations, which may reference them.
12444
+ *
12445
+ * @template TKind - The event type(s) to yield. Defaults to all event types.
12446
+ * @param events - The event types to walk over. If none are provided, all event types are included.
12447
+ * @param callback - Function to execute for each event.
12448
+ *
12449
+ * @example
12450
+ * // Iterate over all operations and schemas
12451
+ * plugin.forEach('operation', 'schema', (event) => {
12452
+ * if (event.type === 'operation') {
12453
+ * // handle operation
12454
+ * } else if (event.type === 'schema') {
12455
+ * // handle schema
12456
+ * }
12457
+ * });
12458
+ */
12459
+ forEach<TKind extends IrTopLevelKind = IrTopLevelKind>(...args: [...events: ReadonlyArray<TKind>, callback: (event: WalkEvent<TKind>) => void]): void;
12460
+ forEach<TKind extends IrTopLevelKind = IrTopLevelKind>(...args: [...events: ReadonlyArray<TKind>, callback: (event: WalkEvent<TKind>) => void, options: WalkOptions<TKind>]): void;
12461
+ /**
12462
+ * Retrieves a registered plugin instance by its name from the context. This
12463
+ * allows plugins to access other plugins that have been registered in the
12464
+ * same context, enabling cross-plugin communication and dependencies.
12465
+ *
12466
+ * @param name Plugin name as defined in the configuration.
12467
+ * @returns The plugin instance if found, undefined otherwise.
12468
+ */
12469
+ getPlugin<TName extends keyof PluginConfigMap>(name: TName): TName extends any ? PluginInstance<PluginConfigMap[TName]> | undefined : never;
12470
+ /**
12471
+ * Retrieves a registered plugin instance by its name from the context. This
12472
+ * allows plugins to access other plugins that have been registered in the
12473
+ * same context, enabling cross-plugin communication and dependencies.
12474
+ *
12475
+ * @param name Plugin name as defined in the configuration.
12476
+ * @returns The plugin instance if found, throw otherwise.
12477
+ */
12478
+ getPluginOrThrow<TName extends keyof PluginConfigMap>(name: TName): TName extends any ? PluginInstance<PluginConfigMap[TName]> : never;
12479
+ getSymbol(identifier: SymbolIdentifier): Symbol | undefined;
12480
+ hooks: {
12481
+ operation: {
12482
+ isMutation: (operation: IR$1.OperationObject) => boolean;
12483
+ isQuery: (operation: IR$1.OperationObject) => boolean;
12484
+ };
12485
+ };
12486
+ isSymbolRegistered(identifier: SymbolIdentifier): boolean;
12487
+ querySymbol(filter: SymbolMeta): Symbol | undefined;
12488
+ referenceSymbol(meta: SymbolMeta): Symbol;
12489
+ registerSymbol(symbol: SymbolIn): Symbol;
12490
+ /**
12491
+ * Executes plugin's handler function.
12492
+ */
12493
+ run(): Promise<void>;
12494
+ setSymbolValue(symbol: Symbol, value: unknown): void;
12495
+ private buildEventHooks;
12496
+ private forEachError;
12497
+ private getSymbolFilePath;
12498
+ private isOperationKind;
13399
12499
  }
13400
12500
  //#endregion
13401
- //#region src/openApi/common/interfaces/OpenApi.d.ts
13402
- type OpenApi = OpenApi$1 | OpenApi$2;
13403
- //#endregion
13404
- //#region src/openApi/index.d.ts
13405
- /**
13406
- * @internal
13407
- * Parse the resolved OpenAPI specification. This will populate and return
13408
- * `context` with intermediate representation obtained from the parsed spec.
13409
- */
13410
- declare const parseOpenApiSpec: ({
13411
- config,
13412
- dependencies,
13413
- logger,
13414
- spec
13415
- }: {
13416
- config: Config;
13417
- dependencies: Record<string, string>;
13418
- logger: Logger;
13419
- spec: unknown;
13420
- }) => Context | undefined;
13421
- //#endregion
13422
12501
  //#region src/parser/types/hooks.d.ts
13423
12502
  type Hooks = {
13424
12503
  /**
@@ -13604,11 +12683,11 @@ type Hooks = {
13604
12683
  };
13605
12684
  //#endregion
13606
12685
  //#region src/plugins/types.d.ts
13607
- type PluginClientNames = '@hey-api/client-angular' | '@hey-api/client-axios' | '@hey-api/client-fetch' | '@hey-api/client-next' | '@hey-api/client-nuxt' | '@hey-api/client-ofetch' | 'legacy/angular' | 'legacy/axios' | 'legacy/fetch' | 'legacy/node' | 'legacy/xhr';
12686
+ type PluginClientNames = '@hey-api/client-angular' | '@hey-api/client-axios' | '@hey-api/client-fetch' | '@hey-api/client-next' | '@hey-api/client-nuxt' | '@hey-api/client-ofetch';
13608
12687
  type PluginValidatorNames = 'arktype' | 'valibot' | 'zod';
13609
- type PluginNames = PluginClientNames | '@angular/common' | '@hey-api/schemas' | '@hey-api/sdk' | '@hey-api/transformers' | '@hey-api/typescript' | '@pinia/colada' | '@tanstack/angular-query-experimental' | '@tanstack/react-query' | '@tanstack/solid-query' | '@tanstack/svelte-query' | '@tanstack/vue-query' | 'fastify' | PluginValidatorNames;
12688
+ type PluginNames = PluginClientNames | '@angular/common' | '@hey-api/schemas' | '@hey-api/sdk' | '@hey-api/transformers' | '@hey-api/typescript' | '@pinia/colada' | '@tanstack/angular-query-experimental' | '@tanstack/react-query' | '@tanstack/solid-query' | '@tanstack/svelte-query' | '@tanstack/vue-query' | 'fastify' | 'swr' | PluginValidatorNames;
13610
12689
  type AnyPluginName = PluginNames | (string & {});
13611
- type PluginTag = 'client' | 'transformer' | 'validator';
12690
+ type PluginTag = 'client' | 'sdk' | 'transformer' | 'validator';
13612
12691
  type PluginContext = {
13613
12692
  package: Package;
13614
12693
  pluginByTag: <T extends AnyPluginName | boolean = AnyPluginName>(tag: PluginTag, props?: {
@@ -13639,16 +12718,14 @@ type BaseConfig = {
13639
12718
  */
13640
12719
  declare namespace Plugin {
13641
12720
  export type Config<T extends Types> = Pick<T, 'api'> & {
13642
- config: Omit<T['config'], 'name' | 'output'>;
12721
+ config: Omit<T['config'], 'name'>;
13643
12722
  /**
13644
12723
  * Dependency plugins will be always processed, regardless of whether user
13645
12724
  * explicitly defines them in their `plugins` config.
13646
12725
  */
13647
12726
  dependencies?: ReadonlyArray<AnyPluginName>;
13648
12727
  handler: Handler<T>;
13649
- handlerLegacy?: LegacyHandler<T>;
13650
12728
  name: T['config']['name'];
13651
- output?: NonNullable<T['config']['output']>;
13652
12729
  /**
13653
12730
  * Resolves static configuration values into their runtime equivalents. For
13654
12731
  * example, when `validator` is set to `true`, it figures out which plugin
@@ -13658,25 +12735,11 @@ declare namespace Plugin {
13658
12735
  dependencies: Set<AnyPluginName>;
13659
12736
  }, context: PluginContext) => void;
13660
12737
  /**
13661
- * Optional tags can be used to help with deciding plugin order and resolving
12738
+ * Tags can be used to help with deciding plugin order and resolving
13662
12739
  * plugin configuration options.
13663
12740
  */
13664
12741
  tags?: ReadonlyArray<PluginTag>;
13665
12742
  };
13666
- export type ConfigWithName<T extends Types> = Omit<Config$14<T>, 'config'> & {
13667
- config: Omit<T['config'], 'output'>;
13668
- };
13669
-
13670
- /** @deprecated use `definePluginConfig()` instead */
13671
- export type DefineConfig<Config$14 extends BaseConfig, ResolvedConfig extends BaseConfig = Config$14> = (config?: UserConfig<Omit<Config$14, 'name'>>) => Omit<Plugin.Config<Config$14, ResolvedConfig>, 'name'> & {
13672
- /**
13673
- * Cast name to `any` so it doesn't throw type error in `plugins` array.
13674
- * We could allow any `string` as plugin `name` in the object syntax, but
13675
- * that TypeScript trick would cause all string methods to appear as
13676
- * suggested auto completions, which is undesirable.
13677
- */
13678
- name: any;
13679
- };
13680
12743
 
13681
12744
  /**
13682
12745
  * Generic wrapper for plugin hooks.
@@ -13685,38 +12748,22 @@ declare namespace Plugin {
13685
12748
  export interface Name<Name extends PluginNames> {
13686
12749
  name: Name;
13687
12750
  }
13688
- export type Types<Config$14 extends BaseConfig = BaseConfig, ResolvedConfig extends BaseConfig = Config$14, Api extends BaseApi = never> = ([Api] extends [never] ? {
12751
+ export type Types<Config$15 extends BaseConfig = BaseConfig, ResolvedConfig extends BaseConfig = Config$15, Api extends BaseApi = never> = ([Api] extends [never] ? {
13689
12752
  api?: BaseApi;
13690
12753
  } : {
13691
12754
  api: Api;
13692
12755
  }) & {
13693
- config: Config$14;
12756
+ config: Config$15;
13694
12757
  resolvedConfig: ResolvedConfig;
13695
12758
  };
13696
-
13697
- /**
13698
- * Users cannot modify output file path to avoid risk of conflicts.
13699
- */
13700
- export type UserConfig<Config$14 extends BaseConfig> = Omit<Config$14, 'output'>;
13701
12759
  }
13702
- type DefinePlugin<Config$14 extends BaseConfig = BaseConfig, ResolvedConfig extends BaseConfig = Config$14, Api extends BaseApi = never> = {
13703
- Config: Plugin.Config<Plugin.Types<Config$14, ResolvedConfig, Api>>;
12760
+ type DefinePlugin<Config$15 extends BaseConfig = BaseConfig, ResolvedConfig extends BaseConfig = Config$15, Api extends BaseApi = never> = {
12761
+ Config: Plugin.Config<Plugin.Types<Config$15, ResolvedConfig, Api>>;
13704
12762
  Handler: (args: {
13705
- plugin: PluginInstance<Plugin.Types<Config$14, ResolvedConfig, Api>>;
13706
- }) => void;
13707
- Instance: PluginInstance<Plugin.Types<Config$14, ResolvedConfig, Api>>;
13708
- /**
13709
- * Plugin implementation for legacy parser.
13710
- *
13711
- * @deprecated
13712
- */
13713
- LegacyHandler: (args: {
13714
- client: Client;
13715
- files: Files;
13716
- openApi: OpenApi;
13717
- plugin: PluginInstance<Plugin.Types<Config$14, ResolvedConfig, Api>>;
12763
+ plugin: PluginInstance<Plugin.Types<Config$15, ResolvedConfig, Api>>;
13718
12764
  }) => void;
13719
- Types: Plugin.Types<Config$14, ResolvedConfig, Api>;
12765
+ Instance: PluginInstance<Plugin.Types<Config$15, ResolvedConfig, Api>>;
12766
+ Types: Plugin.Types<Config$15, ResolvedConfig, Api>;
13720
12767
  };
13721
12768
  //#endregion
13722
12769
  //#region src/types/input.d.ts
@@ -14685,7 +13732,7 @@ type Patch = {
14685
13732
  };
14686
13733
  //#endregion
14687
13734
  //#region src/types/config.d.ts
14688
- interface UserConfig$1 {
13735
+ interface UserConfig {
14689
13736
  /**
14690
13737
  * Path to the config file. Set this value if you don't use the default
14691
13738
  * config file name, or it's not located in the project root.
@@ -14745,64 +13792,15 @@ interface UserConfig$1 {
14745
13792
  *
14746
13793
  * @default ['@hey-api/typescript', '@hey-api/sdk']
14747
13794
  */
14748
- plugins?: ReadonlyArray<PluginNames | { [K in PluginNames]: Plugin.UserConfig<PluginConfigMap[K]['config']> & {
13795
+ plugins?: ReadonlyArray<PluginNames | { [K in PluginNames]: PluginConfigMap[K]['config'] & {
14749
13796
  name: K;
14750
13797
  } }[PluginNames]>;
14751
-
14752
- // DEPRECATED OPTIONS BELOW
14753
-
14754
- /**
14755
- * Manually set base in OpenAPI config instead of inferring from server value
14756
- *
14757
- * @deprecated
14758
- */
14759
- // eslint-disable-next-line typescript-sort-keys/interface
14760
- base?: string;
14761
- /**
14762
- * Opt in to the experimental parser?
14763
- *
14764
- * @deprecated
14765
- * @default true
14766
- */
14767
- experimentalParser?: boolean;
14768
- /**
14769
- * Generate core client classes?
14770
- *
14771
- * @deprecated
14772
- * @default true
14773
- */
14774
- exportCore?: boolean;
14775
- /**
14776
- * Custom client class name. Please note this option is deprecated and
14777
- * will be removed in favor of clients.
14778
- *
14779
- * @deprecated
14780
- * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-name
14781
- */
14782
- name?: string;
14783
- /**
14784
- * Path to custom request file. Please note this option is deprecated and
14785
- * will be removed in favor of clients.
14786
- *
14787
- * @deprecated
14788
- * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-request
14789
- */
14790
- request?: string;
14791
- /**
14792
- * Use options or arguments functions. Please note this option is deprecated and
14793
- * will be removed in favor of clients.
14794
- *
14795
- * @deprecated
14796
- * @default true
14797
- * @link https://heyapi.dev/openapi-ts/migrating.html#deprecated-useoptions
14798
- */
14799
- useOptions?: boolean;
14800
13798
  /**
14801
13799
  * @deprecated use `input.watch` instead
14802
13800
  */
14803
13801
  watch?: boolean | number | Watch;
14804
13802
  }
14805
- type Config = Omit<Required<UserConfig$1>, 'base' | 'input' | 'logs' | 'name' | 'output' | 'parser' | 'plugins' | 'request' | 'watch'> & Pick<UserConfig$1, 'base' | 'name' | 'request'> & {
13803
+ type Config = Omit<Required<UserConfig>, 'input' | 'logs' | 'output' | 'parser' | 'plugins' | 'watch'> & {
14806
13804
  /**
14807
13805
  * Path to the input specification.
14808
13806
  */
@@ -14818,30 +13816,8 @@ type Config = Omit<Required<UserConfig$1>, 'base' | 'input' | 'logs' | 'name' |
14818
13816
  */
14819
13817
  parser: Parser;
14820
13818
  pluginOrder: ReadonlyArray<keyof PluginConfigMap>;
14821
- plugins: { [K in PluginNames]?: Plugin.ConfigWithName<PluginConfigMap[K]> };
13819
+ plugins: { [K in PluginNames]?: Plugin.Config<PluginConfigMap[K]> };
14822
13820
  };
14823
13821
  //#endregion
14824
- //#region src/types/types.d.ts
14825
- declare namespace LegacyIR {
14826
- export type LegacyOperation = Operation;
14827
- }
14828
- interface WatchValues {
14829
- /**
14830
- * Headers to be sent with each HEAD and/or GET request. This effectively
14831
- * serves as a mechanism resolver because setting certain headers will opt
14832
- * into comparing the specifications using that method.
14833
- */
14834
- headers: Headers;
14835
- /**
14836
- * Can we send a HEAD request instead of fetching the whole specification?
14837
- * This value will be set after the first successful fetch.
14838
- */
14839
- isHeadMethodSupported?: boolean;
14840
- /**
14841
- * String content of the last successfully fetched specification.
14842
- */
14843
- lastValue?: string;
14844
- }
14845
- //#endregion
14846
- export { Modifier as A, PluginHandler as C, MaybeArray as D, LazyOrAsync as E, ObjectValue as F, SyntaxKindKeyword as I, types_d_exports as L, AccessLevel as M, FunctionParameter as N, Comments as O, FunctionTypeParameter as P, __export as R, Client$2 as S, IR$1 as T, OpenApiSchemaObject as _, Input as a, Client as b, parseOpenApiSpec as c, OpenApi$3 as d, OpenApiMetaObject as f, OpenApiResponseObject as g, OpenApiRequestBodyObject as h, UserConfig$1 as i, tsNodeToString as j, ImportExportItemObject as k, Context as l, OpenApiParameterObject as m, WatchValues as n, DefinePlugin as o, OpenApiOperationObject as p, Config as r, Plugin as s, LegacyIR as t, Logger as u, TypeTransformer as v, StringCase as w, Operation as x, ExpressionTransformer as y };
14847
- //# sourceMappingURL=types-Dh80P1tV.d.cts.map
13822
+ export { MaybeArray as S, Client as _, Plugin as a, IR$1 as b, OpenApiOperationObject as c, OpenApiResponseObject as d, OpenApiSchemaObject as f, ExpressionTransformer as g, TypeTransformer as h, DefinePlugin as i, OpenApiParameterObject as l, Logger as m, UserConfig as n, OpenApi as o, Context as p, Input as r, OpenApiMetaObject as s, Config as t, OpenApiRequestBodyObject as u, PluginHandler as v, LazyOrAsync as x, StringCase as y };
13823
+ //# sourceMappingURL=config-PWeoedFF.d.cts.map