@hey-api/openapi-python 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,8 @@
1
- import { a as PydanticPlugin, c as HeyApiClientHttpxPlugin, n as plugins_d_exports, o as PydanticResolvers, s as HeyApiSdkPlugin } from "./plugins-BDUY2dP5.mjs";
2
- import { Logger, Logger as Logger$1, Version } from "@hey-api/codegen-core";
3
- import { AnyPluginName, BaseUserConfig, BaseUserOutput, Coercer, CoercerMap, ConfigTable, Context, DefinePlugin, IR, OpenApi, OpenApiMetaObject, OpenApiOperationObject, OpenApiParameterObject, OpenApiRequestBodyObject, OpenApiResponseObject, OpenApiSchemaObject, OperationPath, OperationStrategy, Plugin, Plugin as Plugin$1, PluginConfigMap, PluginContext, PluginInstance, PluginNames, SymbolFactory, TableDirectives, UserPostProcessor, applyNaming, coerce, defaultPaginationKeywords, defineConfig as defineConfigTable, definePluginConfig, toCase, utils } from "@hey-api/shared";
4
- import { AnyString, LazyOrAsync, MaybeArray } from "@hey-api/types";
1
+ import { t as plugins_d_exports } from "./plugins.mjs";
2
+ import { AnalysisContext, BindingKind, File, FromRef, Language, Logger, Node as Node$1, NodeName as NodeName$1, NodeNameSanitizer, NodeRelationship, NodeScope, ProjectMeta, Ref, Symbol, Version } from "@hey-api/codegen-core";
3
+ import { AnyPluginName, BaseUserConfig, BaseUserOutput, Casing, Coercer, CoercerMap, ConfigTable, Context, DefinePlugin as DefinePlugin$1, DefinePlugin as DefinePlugin$2, FeatureToggle, IR, IR as IR$1, NameTransformer, NamingConfig, NamingOptions, NamingRule, OpenApi, OpenApiMetaObject, OpenApiOperationObject, OpenApiParameterObject, OpenApiRequestBodyObject, OpenApiResponseObject, OpenApiSchemaObject, OperationPath, OperationPathStrategy, OperationStrategy, OperationsStrategy, Plugin, Plugin as Plugin$1, PluginConfigMap, PluginContext, PluginInstance, PluginInstance as PluginInstance$1, PluginNames, SchemaVisitorContext, SchemaWithType, SymbolFactory, TableDirectives, UserPostProcessor, Walker, applyNaming, coerce, defaultPaginationKeywords, defineConfig as defineConfigTable, definePluginConfig, toCase, utils } from "@hey-api/shared";
4
+ import { AnyString, LazyOrAsync, MaybeArray, MaybeFunc } from "@hey-api/types";
5
+ import { LinguistLanguages } from "@hey-api/spec-types";
5
6
 
6
7
  //#region src/config/output/postprocess.d.ts
7
8
  declare const postProcessors: {
@@ -81,24 +82,2893 @@ type UserConfig = BaseUserConfig<UserOutput> & {
81
82
  } }[PluginNames]>;
82
83
  };
83
84
  //#endregion
85
+ //#region src/plugins/@hey-api/client-httpx/types.d.ts
86
+ type UserConfig$3 = Plugin$1.Name<'@hey-api/client-httpx'> & {
87
+ /**
88
+ * Set a default base URL when creating the client? You can set `baseUrl`
89
+ * to a string which will be used as the base URL. If your input defines
90
+ * server(s), you can set `baseUrl` to a number to pick a specific server
91
+ * to use as the base URL. You can disable setting the base URL by setting
92
+ * `baseUrl` to `false`. By default, `baseUrl` is `true` and it will try to
93
+ * use the first defined server value. If there's none, we won't set a
94
+ * base URL.
95
+ *
96
+ * If the matched URL contains template literals, it will be ignored.
97
+ *
98
+ * @default true
99
+ */
100
+ baseUrl?: string | number | boolean;
101
+ };
102
+ type Config$2 = Plugin$1.Name<'@hey-api/client-httpx'> & {
103
+ baseUrl: string | number | boolean;
104
+ };
105
+ type HeyApiClientHttpxPlugin = DefinePlugin$2<UserConfig$3, Config$2>;
106
+ //#endregion
107
+ //#region src/plugins/types.d.ts
108
+ type PluginClientNames = '@hey-api/client-aiohttp' | '@hey-api/client-httpx' | '@hey-api/client-requests' | '@hey-api/client-urllib3';
109
+ //#endregion
110
+ //#region src/py-compiler/nodes/kinds.d.ts
111
+ declare enum PyNodeKind {
112
+ Assignment = "Assignment",
113
+ AsyncExpression = "AsyncExpression",
114
+ AugmentedAssignment = "AugmentedAssignment",
115
+ AwaitExpression = "AwaitExpression",
116
+ BinaryExpression = "BinaryExpression",
117
+ Block = "Block",
118
+ BreakStatement = "BreakStatement",
119
+ CallExpression = "CallExpression",
120
+ ClassDeclaration = "ClassDeclaration",
121
+ Comment = "Comment",
122
+ ContinueStatement = "ContinueStatement",
123
+ DictComprehension = "DictComprehension",
124
+ DictExpression = "DictExpression",
125
+ EmptyStatement = "EmptyStatement",
126
+ ExceptClause = "ExceptClause",
127
+ ExpressionStatement = "ExpressionStatement",
128
+ FStringExpression = "FStringExpression",
129
+ ForStatement = "ForStatement",
130
+ FunctionDeclaration = "FunctionDeclaration",
131
+ FunctionParameter = "FunctionParameter",
132
+ GeneratorExpression = "GeneratorExpression",
133
+ Identifier = "Identifier",
134
+ IfStatement = "IfStatement",
135
+ ImportStatement = "ImportStatement",
136
+ KeywordArgument = "KeywordArgument",
137
+ LambdaExpression = "LambdaExpression",
138
+ ListComprehension = "ListComprehension",
139
+ ListExpression = "ListExpression",
140
+ Literal = "Literal",
141
+ MemberExpression = "MemberExpression",
142
+ RStringExpression = "RStringExpression",
143
+ RaiseStatement = "RaiseStatement",
144
+ ReturnStatement = "ReturnStatement",
145
+ SetComprehension = "SetComprehension",
146
+ SetExpression = "SetExpression",
147
+ SourceFile = "SourceFile",
148
+ SubscriptExpression = "SubscriptExpression",
149
+ SubscriptSlice = "SubscriptSlice",
150
+ TryStatement = "TryStatement",
151
+ TupleExpression = "TupleExpression",
152
+ WhileStatement = "WhileStatement",
153
+ WithItem = "WithItem",
154
+ WithStatement = "WithStatement",
155
+ YieldExpression = "YieldExpression",
156
+ YieldFromExpression = "YieldFromExpression"
157
+ }
158
+ //#endregion
159
+ //#region src/py-compiler/nodes/statements/block.d.ts
160
+ interface PyBlock extends PyNodeBase {
161
+ kind: PyNodeKind.Block;
162
+ statements: ReadonlyArray<PyStatement>;
163
+ }
164
+ declare function createBlock(statements: ReadonlyArray<PyStatement>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyBlock;
165
+ //#endregion
166
+ //#region src/py-compiler/nodes/declarations/class.d.ts
167
+ interface PyClassDeclaration extends PyNodeBase {
168
+ baseClasses?: ReadonlyArray<PyNode>;
169
+ body: PyBlock;
170
+ decorators?: ReadonlyArray<PyExpression>;
171
+ docstring?: string;
172
+ kind: PyNodeKind.ClassDeclaration;
173
+ name: string;
174
+ }
175
+ declare function createClassDeclaration(name: string, body: ReadonlyArray<PyStatement>, decorators?: ReadonlyArray<PyExpression>, baseClasses?: ReadonlyArray<PyNode>, docstring?: string, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyClassDeclaration;
176
+ //#endregion
177
+ //#region src/py-compiler/nodes/declarations/function-parameter.d.ts
178
+ interface PyFunctionParameter extends PyNodeBase {
179
+ defaultValue?: PyExpression;
180
+ kind: PyNodeKind.FunctionParameter;
181
+ name: string;
182
+ type?: PyExpression;
183
+ }
184
+ declare function createFunctionParameter(name: string, type?: PyExpression, defaultValue?: PyExpression, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyFunctionParameter;
185
+ //#endregion
186
+ //#region src/py-compiler/nodes/declarations/function.d.ts
187
+ interface PyFunctionDeclaration extends PyNodeBase {
188
+ body: PyBlock;
189
+ decorators?: ReadonlyArray<PyExpression>;
190
+ docstring?: string;
191
+ kind: PyNodeKind.FunctionDeclaration;
192
+ modifiers?: ReadonlyArray<PyExpression>;
193
+ name: string;
194
+ parameters: ReadonlyArray<PyFunctionParameter>;
195
+ returnType?: PyExpression;
196
+ }
197
+ declare function createFunctionDeclaration(name: string, parameters: ReadonlyArray<PyFunctionParameter>, returnType: PyExpression | undefined, body: ReadonlyArray<PyStatement>, decorators?: ReadonlyArray<PyExpression>, docstring?: string, modifiers?: ReadonlyArray<PyExpression>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyFunctionDeclaration;
198
+ //#endregion
199
+ //#region src/py-compiler/nodes/statements/assignment.d.ts
200
+ interface PyAssignment extends PyNodeBase {
201
+ kind: PyNodeKind.Assignment;
202
+ target: PyExpression;
203
+ type?: PyExpression;
204
+ value?: PyExpression;
205
+ }
206
+ declare function createAssignment(target: PyExpression, type?: PyExpression, value?: PyExpression, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyAssignment;
207
+ //#endregion
208
+ //#region src/py-compiler/nodes/statements/augmented-assignment.d.ts
209
+ type PyAugmentedOperator = '+=' | '-=' | '*=' | '/=' | '//=' | '%=' | '**=' | '&=' | '|=' | '^=' | '>>=' | '<<=';
210
+ interface PyAugmentedAssignment extends PyNodeBase {
211
+ kind: PyNodeKind.AugmentedAssignment;
212
+ operator: PyAugmentedOperator;
213
+ target: PyExpression;
214
+ value: PyExpression;
215
+ }
216
+ declare function createAugmentedAssignment(target: PyExpression, operator: PyAugmentedOperator, value: PyExpression): PyAugmentedAssignment;
217
+ //#endregion
218
+ //#region src/py-compiler/nodes/statements/break.d.ts
219
+ interface PyBreakStatement extends PyNodeBase {
220
+ kind: PyNodeKind.BreakStatement;
221
+ }
222
+ declare function createBreakStatement(): PyBreakStatement;
223
+ //#endregion
224
+ //#region src/py-compiler/nodes/statements/continue.d.ts
225
+ interface PyContinueStatement extends PyNodeBase {
226
+ kind: PyNodeKind.ContinueStatement;
227
+ }
228
+ declare function createContinueStatement(): PyContinueStatement;
229
+ //#endregion
230
+ //#region src/py-compiler/nodes/statements/empty.d.ts
231
+ interface PyEmptyStatement extends PyNodeBase {
232
+ kind: PyNodeKind.EmptyStatement;
233
+ }
234
+ declare function createEmptyStatement(): PyEmptyStatement;
235
+ //#endregion
236
+ //#region src/py-compiler/nodes/statements/expression.d.ts
237
+ interface PyExpressionStatement extends PyNodeBase {
238
+ expression: PyExpression;
239
+ kind: PyNodeKind.ExpressionStatement;
240
+ }
241
+ declare function createExpressionStatement(expression: PyExpression): PyExpressionStatement;
242
+ //#endregion
243
+ //#region src/py-compiler/nodes/statements/for.d.ts
244
+ interface PyForStatement extends PyNodeBase {
245
+ body: PyBlock;
246
+ elseBlock?: PyBlock;
247
+ iterable: PyExpression;
248
+ kind: PyNodeKind.ForStatement;
249
+ target: PyExpression;
250
+ }
251
+ declare function createForStatement(target: PyExpression, iterable: PyExpression, body: ReadonlyArray<PyStatement>, elseBlock?: ReadonlyArray<PyStatement>): PyForStatement;
252
+ //#endregion
253
+ //#region src/py-compiler/nodes/statements/if.d.ts
254
+ interface PyIfStatement extends PyNodeBase {
255
+ condition: PyExpression;
256
+ elseBlock?: PyBlock | PyIfStatement;
257
+ kind: PyNodeKind.IfStatement;
258
+ thenBlock: PyBlock;
259
+ }
260
+ declare function createIfStatement(condition: PyExpression, thenBlock: ReadonlyArray<PyStatement>, elseBlock?: ReadonlyArray<PyStatement> | PyIfStatement, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyIfStatement;
261
+ //#endregion
262
+ //#region src/py-compiler/nodes/statements/import.d.ts
263
+ interface PyImportStatement extends PyNodeBase {
264
+ isFrom: boolean;
265
+ kind: PyNodeKind.ImportStatement;
266
+ module: string;
267
+ names?: ReadonlyArray<{
268
+ alias?: string;
269
+ name: string;
270
+ }>;
271
+ }
272
+ declare function createImportStatement(module: string, names?: ReadonlyArray<{
273
+ alias?: string;
274
+ name: string;
275
+ }>, isFrom?: boolean): PyImportStatement;
276
+ //#endregion
277
+ //#region src/py-compiler/nodes/statements/raise.d.ts
278
+ interface PyRaiseStatement extends PyNodeBase {
279
+ expression?: PyExpression;
280
+ kind: PyNodeKind.RaiseStatement;
281
+ }
282
+ declare function createRaiseStatement(expression?: PyExpression): PyRaiseStatement;
283
+ //#endregion
284
+ //#region src/py-compiler/nodes/statements/return.d.ts
285
+ interface PyReturnStatement extends PyNodeBase {
286
+ expression?: PyExpression;
287
+ kind: PyNodeKind.ReturnStatement;
288
+ }
289
+ declare function createReturnStatement(expression?: PyExpression): PyReturnStatement;
290
+ //#endregion
291
+ //#region src/py-compiler/nodes/expressions/identifier.d.ts
292
+ interface PyIdentifier extends PyNodeBase {
293
+ kind: PyNodeKind.Identifier;
294
+ name: string;
295
+ }
296
+ declare function createIdentifier(name: string, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyIdentifier;
297
+ //#endregion
298
+ //#region src/py-compiler/nodes/statements/except.d.ts
299
+ interface PyExceptClause extends PyNodeBase {
300
+ block: PyBlock;
301
+ exceptionName?: PyIdentifier;
302
+ exceptionType?: PyExpression;
303
+ kind: PyNodeKind.ExceptClause;
304
+ }
305
+ declare function createExceptClause(block: ReadonlyArray<PyStatement>, exceptionType?: PyExpression, exceptionName?: PyIdentifier): PyExceptClause;
306
+ //#endregion
307
+ //#region src/py-compiler/nodes/statements/try.d.ts
308
+ interface PyTryStatement extends PyNodeBase {
309
+ elseBlock?: PyBlock;
310
+ exceptClauses?: ReadonlyArray<PyExceptClause>;
311
+ finallyBlock?: PyBlock;
312
+ kind: PyNodeKind.TryStatement;
313
+ tryBlock: PyBlock;
314
+ }
315
+ declare function createTryStatement(tryBlock: ReadonlyArray<PyStatement>, exceptClauses?: ReadonlyArray<PyExceptClause>, elseBlock?: ReadonlyArray<PyStatement>, finallyBlock?: ReadonlyArray<PyStatement>): PyTryStatement;
316
+ //#endregion
317
+ //#region src/py-compiler/nodes/statements/while.d.ts
318
+ interface PyWhileStatement extends PyNodeBase {
319
+ body: PyBlock;
320
+ condition: PyExpression;
321
+ elseBlock?: PyBlock;
322
+ kind: PyNodeKind.WhileStatement;
323
+ }
324
+ declare function createWhileStatement(condition: PyExpression, body: ReadonlyArray<PyStatement>, elseBlock?: ReadonlyArray<PyStatement>): PyWhileStatement;
325
+ //#endregion
326
+ //#region src/py-compiler/nodes/statements/with-item.d.ts
327
+ interface PyWithItem extends PyNodeBase {
328
+ alias?: PyExpression;
329
+ contextExpr: PyExpression;
330
+ kind: PyNodeKind.WithItem;
331
+ }
332
+ declare function createWithItem(contextExpr: PyExpression, alias?: PyExpression, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyWithItem;
333
+ //#endregion
334
+ //#region src/py-compiler/nodes/statements/with.d.ts
335
+ interface PyWithStatement extends PyNodeBase {
336
+ body: PyBlock;
337
+ items: ReadonlyArray<PyWithItem>;
338
+ kind: PyNodeKind.WithStatement;
339
+ modifiers?: ReadonlyArray<PyExpression>;
340
+ }
341
+ declare function createWithStatement(items: ReadonlyArray<PyWithItem>, body: ReadonlyArray<PyStatement>, modifiers?: ReadonlyArray<PyExpression>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyWithStatement;
342
+ //#endregion
343
+ //#region src/py-compiler/nodes/structure/comment.d.ts
344
+ interface PyComment extends PyNodeBase {
345
+ kind: PyNodeKind.Comment;
346
+ text: string;
347
+ }
348
+ declare function createComment(text: string): PyComment;
349
+ //#endregion
350
+ //#region src/py-compiler/nodes/statement.d.ts
351
+ type PyStatement = PyAssignment | PyAugmentedAssignment | PyBreakStatement | PyClassDeclaration | PyComment | PyContinueStatement | PyEmptyStatement | PyExpressionStatement | PyForStatement | PyFunctionDeclaration | PyFunctionParameter | PyIfStatement | PyImportStatement | PyRaiseStatement | PyReturnStatement | PyTryStatement | PyWhileStatement | PyWithStatement;
352
+ //#endregion
353
+ //#region src/py-compiler/nodes/structure/source-file.d.ts
354
+ interface PySourceFile extends PyNodeBase {
355
+ docstring?: string;
356
+ kind: PyNodeKind.SourceFile;
357
+ statements: ReadonlyArray<PyNode>;
358
+ }
359
+ declare function createSourceFile(statements: ReadonlyArray<PyNode>, docstring?: string, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PySourceFile;
360
+ //#endregion
361
+ //#region src/py-compiler/nodes/base.d.ts
362
+ interface PyNodeBase {
363
+ kind: PyNodeKind;
364
+ leadingComments?: ReadonlyArray<string>;
365
+ trailingComments?: ReadonlyArray<string>;
366
+ }
367
+ type PyNode = PyBlock | PyExpression | PySourceFile | PyStatement;
368
+ //#endregion
369
+ //#region src/py-compiler/nodes/expressions/comprehensions/dict.d.ts
370
+ interface PyDictComprehension extends PyComprehensionNode {
371
+ key: PyExpression;
372
+ kind: PyNodeKind.DictComprehension;
373
+ value: PyExpression;
374
+ }
375
+ declare function createDictComprehension(key: PyExpression, value: PyExpression, target: PyExpression, iterable: PyExpression, ifs?: ReadonlyArray<PyExpression>, isAsync?: boolean): PyDictComprehension;
376
+ //#endregion
377
+ //#region src/py-compiler/nodes/expressions/comprehensions/list.d.ts
378
+ interface PyListComprehension extends PyComprehensionNode {
379
+ element: PyExpression;
380
+ kind: PyNodeKind.ListComprehension;
381
+ }
382
+ declare function createListComprehension(element: PyExpression, target: PyExpression, iterable: PyExpression, ifs?: ReadonlyArray<PyExpression>, isAsync?: boolean): PyListComprehension;
383
+ //#endregion
384
+ //#region src/py-compiler/nodes/expressions/comprehensions/set.d.ts
385
+ interface PySetComprehension extends PyComprehensionNode {
386
+ element: PyExpression;
387
+ kind: PyNodeKind.SetComprehension;
388
+ }
389
+ declare function createSetComprehension(element: PyExpression, target: PyExpression, iterable: PyExpression, ifs?: ReadonlyArray<PyExpression>, isAsync?: boolean): PySetComprehension;
390
+ //#endregion
391
+ //#region src/py-compiler/nodes/comprehension.d.ts
392
+ type PyComprehension = PyDictComprehension | PyListComprehension | PySetComprehension;
393
+ interface PyComprehensionNode extends PyNodeBase {
394
+ ifs?: ReadonlyArray<PyExpression>;
395
+ isAsync?: boolean;
396
+ iterable: PyExpression;
397
+ target: PyExpression;
398
+ }
399
+ //#endregion
400
+ //#region src/py-compiler/nodes/expressions/async.d.ts
401
+ interface PyAsyncExpression extends PyNodeBase {
402
+ expression: PyExpression;
403
+ kind: PyNodeKind.AsyncExpression;
404
+ }
405
+ declare function createAsyncExpression(expression: PyExpression): PyAsyncExpression;
406
+ //#endregion
407
+ //#region src/py-compiler/nodes/expressions/await.d.ts
408
+ interface PyAwaitExpression extends PyNodeBase {
409
+ expression: PyExpression;
410
+ kind: PyNodeKind.AwaitExpression;
411
+ }
412
+ declare function createAwaitExpression(expression: PyExpression): PyAwaitExpression;
413
+ //#endregion
414
+ //#region src/py-compiler/nodes/expressions/binary.d.ts
415
+ type PyBinaryOperator = '+' | '-' | '*' | '/' | '//' | '%' | '**' | '==' | '!=' | '>' | '>=' | '<' | '<=' | 'is' | 'is not' | 'in' | 'not in' | 'and' | 'or' | '|' | '&' | '^' | '<<' | '>>';
416
+ interface PyBinaryExpression extends PyNodeBase {
417
+ kind: PyNodeKind.BinaryExpression;
418
+ left: PyExpression;
419
+ operator: PyBinaryOperator;
420
+ right: PyExpression;
421
+ }
422
+ declare function createBinaryExpression(left: PyExpression, operator: PyBinaryOperator, right: PyExpression, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyBinaryExpression;
423
+ //#endregion
424
+ //#region src/py-compiler/nodes/expressions/call.d.ts
425
+ interface PyCallExpression extends PyNodeBase {
426
+ args: ReadonlyArray<PyExpression>;
427
+ callee: PyExpression;
428
+ kind: PyNodeKind.CallExpression;
429
+ }
430
+ declare function createCallExpression(callee: PyExpression, args: ReadonlyArray<PyExpression>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyCallExpression;
431
+ //#endregion
432
+ //#region src/py-compiler/nodes/expressions/dict.d.ts
433
+ interface PyDictExpression extends PyNodeBase {
434
+ entries: ReadonlyArray<{
435
+ key: PyExpression;
436
+ value: PyExpression;
437
+ }>;
438
+ kind: PyNodeKind.DictExpression;
439
+ }
440
+ declare function createDictExpression(entries: ReadonlyArray<{
441
+ key: PyExpression;
442
+ value: PyExpression;
443
+ }>): PyDictExpression;
444
+ //#endregion
445
+ //#region src/py-compiler/nodes/expressions/f-string.d.ts
446
+ interface PyFStringExpression extends PyNodeBase {
447
+ kind: PyNodeKind.FStringExpression;
448
+ parts: Array<string | PyExpression>;
449
+ }
450
+ declare function createFStringExpression(parts: Array<string | PyExpression>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyFStringExpression;
451
+ //#endregion
452
+ //#region src/py-compiler/nodes/expressions/generator.d.ts
453
+ interface PyGeneratorExpression extends PyNodeBase {
454
+ element: PyExpression;
455
+ ifs?: ReadonlyArray<PyExpression>;
456
+ isAsync?: boolean;
457
+ iterable: PyExpression;
458
+ kind: PyNodeKind.GeneratorExpression;
459
+ target: PyExpression;
460
+ }
461
+ declare function createGeneratorExpression(element: PyExpression, target: PyExpression, iterable: PyExpression, ifs?: ReadonlyArray<PyExpression>, isAsync?: boolean, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyGeneratorExpression;
462
+ //#endregion
463
+ //#region src/py-compiler/nodes/expressions/keyword-arg.d.ts
464
+ interface PyKeywordArgument extends PyNodeBase {
465
+ kind: PyNodeKind.KeywordArgument;
466
+ name: string;
467
+ value: PyExpression;
468
+ }
469
+ declare function createKeywordArgument(name: string, value: PyExpression, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyKeywordArgument;
470
+ //#endregion
471
+ //#region src/py-compiler/nodes/expressions/lambda.d.ts
472
+ interface PyLambdaExpression extends PyNodeBase {
473
+ expression: PyExpression;
474
+ kind: PyNodeKind.LambdaExpression;
475
+ parameters: ReadonlyArray<PyFunctionParameter>;
476
+ }
477
+ declare function createLambdaExpression(parameters: ReadonlyArray<PyFunctionParameter>, expression: PyExpression): PyLambdaExpression;
478
+ //#endregion
479
+ //#region src/py-compiler/nodes/expressions/list.d.ts
480
+ interface PyListExpression extends PyNodeBase {
481
+ elements: ReadonlyArray<PyNode>;
482
+ kind: PyNodeKind.ListExpression;
483
+ }
484
+ declare function createListExpression(elements: ReadonlyArray<PyNode>): PyListExpression;
485
+ //#endregion
486
+ //#region src/py-compiler/nodes/expressions/literal.d.ts
487
+ type PyLiteralValue = string | number | boolean | null;
488
+ interface PyLiteral extends PyNodeBase {
489
+ kind: PyNodeKind.Literal;
490
+ value: PyLiteralValue;
491
+ }
492
+ declare function createLiteral(value: PyLiteralValue, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyLiteral;
493
+ //#endregion
494
+ //#region src/py-compiler/nodes/expressions/member.d.ts
495
+ interface PyMemberExpression extends PyNodeBase {
496
+ kind: PyNodeKind.MemberExpression;
497
+ member: PyIdentifier;
498
+ object: PyExpression;
499
+ }
500
+ declare function createMemberExpression(object: PyExpression, member: PyIdentifier, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyMemberExpression;
501
+ //#endregion
502
+ //#region src/py-compiler/nodes/expressions/r-string.d.ts
503
+ interface PyRStringExpression extends PyNodeBase {
504
+ kind: PyNodeKind.RStringExpression;
505
+ value: string;
506
+ }
507
+ declare function createRStringExpression(value: string, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): PyRStringExpression;
508
+ //#endregion
509
+ //#region src/py-compiler/nodes/expressions/set.d.ts
510
+ interface PySetExpression extends PyNodeBase {
511
+ elements: ReadonlyArray<PyExpression>;
512
+ kind: PyNodeKind.SetExpression;
513
+ }
514
+ declare function createSetExpression(elements: ReadonlyArray<PyExpression>): PySetExpression;
515
+ //#endregion
516
+ //#region src/py-compiler/nodes/expressions/subscript.d.ts
517
+ interface PySubscriptExpression extends PyNodeBase {
518
+ kind: PyNodeKind.SubscriptExpression;
519
+ slice: PyExpression;
520
+ value: PyExpression;
521
+ }
522
+ declare function createSubscriptExpression(value: PyExpression, slice: PyExpression): PySubscriptExpression;
523
+ //#endregion
524
+ //#region src/py-compiler/nodes/expressions/subscript-slice.d.ts
525
+ interface PySubscriptSlice extends PyNodeBase {
526
+ elements: ReadonlyArray<PyExpression>;
527
+ kind: PyNodeKind.SubscriptSlice;
528
+ }
529
+ declare function createSubscriptSlice(elements: ReadonlyArray<PyExpression>): PySubscriptSlice;
530
+ //#endregion
531
+ //#region src/py-compiler/nodes/expressions/tuple.d.ts
532
+ interface PyTupleExpression extends PyNodeBase {
533
+ elements: ReadonlyArray<PyExpression>;
534
+ kind: PyNodeKind.TupleExpression;
535
+ }
536
+ declare function createTupleExpression(elements: ReadonlyArray<PyExpression>): PyTupleExpression;
537
+ //#endregion
538
+ //#region src/py-compiler/nodes/expressions/yield.d.ts
539
+ interface PyYieldExpression extends PyNodeBase {
540
+ kind: PyNodeKind.YieldExpression;
541
+ value?: PyExpression;
542
+ }
543
+ declare function createYieldExpression(value?: PyExpression): PyYieldExpression;
544
+ //#endregion
545
+ //#region src/py-compiler/nodes/expressions/yield-from.d.ts
546
+ interface PyYieldFromExpression extends PyNodeBase {
547
+ expression: PyExpression;
548
+ kind: PyNodeKind.YieldFromExpression;
549
+ }
550
+ declare function createYieldFromExpression(expression: PyExpression): PyYieldFromExpression;
551
+ //#endregion
552
+ //#region src/py-compiler/nodes/expression.d.ts
553
+ type PyExpression = PyAsyncExpression | PyAwaitExpression | PyBinaryExpression | PyCallExpression | PyComprehension | PyDictExpression | PyFStringExpression | PyGeneratorExpression | PyIdentifier | PyKeywordArgument | PyLambdaExpression | PyListExpression | PyLiteral | PyMemberExpression | PyRStringExpression | PySetExpression | PySubscriptExpression | PySubscriptSlice | PyTupleExpression | PyYieldExpression | PyYieldFromExpression;
554
+ //#endregion
555
+ //#region src/py-compiler/printer.d.ts
556
+ type QuoteStyle = 'single' | 'double';
557
+ type QuoteFallback = 'avoid-escape' | 'escape';
558
+ interface PyPrinterOptions {
559
+ /**
560
+ * Number of spaces per indentation level.
561
+ *
562
+ * @default 4
563
+ */
564
+ indentSize?: number;
565
+ /**
566
+ * How to handle strings that contain the preferred quote character.
567
+ * - `'avoid-escape'`: switch to the alternative quote style to avoid
568
+ * escaping, unless the string contains both quote characters
569
+ * - `'escape'`: always use the preferred quote style, escaping conflicts
570
+ * with a backslash
571
+ *
572
+ * @default 'avoid-escape'
573
+ */
574
+ quoteConflict?: QuoteFallback;
575
+ /**
576
+ * Preferred string quote character.
577
+ *
578
+ * @default 'double'
579
+ */
580
+ quoteStyle?: QuoteStyle;
581
+ }
582
+ declare function createPrinter(options?: PyPrinterOptions): {
583
+ printFile: (node: PyNode) => string;
584
+ };
585
+ declare function printAst(node: PyNode): string;
586
+ //#endregion
587
+ //#region src/py-compiler/index.d.ts
588
+ declare namespace py {
589
+ type Node = PyNode;
590
+ type NodeBase = PyNodeBase;
591
+ type NodeKind = PyNodeKind;
592
+ type Expression = PyExpression;
593
+ type Statement = PyStatement;
594
+ type SourceFile = PySourceFile;
595
+ type Comment = PyComment;
596
+ type ClassDeclaration = PyClassDeclaration;
597
+ type FunctionDeclaration = PyFunctionDeclaration;
598
+ type FunctionParameter = PyFunctionParameter;
599
+ type Assignment = PyAssignment;
600
+ type AugmentedAssignment = PyAugmentedAssignment;
601
+ type AugmentedOperator = PyAugmentedOperator;
602
+ type Block = PyBlock;
603
+ type BreakStatement = PyBreakStatement;
604
+ type ContinueStatement = PyContinueStatement;
605
+ type EmptyStatement = PyEmptyStatement;
606
+ type ExceptClause = PyExceptClause;
607
+ type ExpressionStatement = PyExpressionStatement;
608
+ type ForStatement = PyForStatement;
609
+ type IfStatement = PyIfStatement;
610
+ type ImportStatement = PyImportStatement;
611
+ type RaiseStatement = PyRaiseStatement;
612
+ type ReturnStatement = PyReturnStatement;
613
+ type TryStatement = PyTryStatement;
614
+ type WhileStatement = PyWhileStatement;
615
+ type WithItem = PyWithItem;
616
+ type WithStatement = PyWithStatement;
617
+ type AsyncExpression = PyAsyncExpression;
618
+ type AwaitExpression = PyAwaitExpression;
619
+ type BinaryExpression = PyBinaryExpression;
620
+ type BinaryOperator = PyBinaryOperator;
621
+ type CallExpression = PyCallExpression;
622
+ type DictExpression = PyDictExpression;
623
+ type FStringExpression = PyFStringExpression;
624
+ type GeneratorExpression = PyGeneratorExpression;
625
+ type Identifier = PyIdentifier;
626
+ type KeywordArgument = PyKeywordArgument;
627
+ type LambdaExpression = PyLambdaExpression;
628
+ type ListExpression = PyListExpression;
629
+ type Literal = PyLiteral;
630
+ type MemberExpression = PyMemberExpression;
631
+ type RStringExpression = PyRStringExpression;
632
+ type SetExpression = PySetExpression;
633
+ type SubscriptExpression = PySubscriptExpression;
634
+ type SubscriptSlice = PySubscriptSlice;
635
+ type TupleExpression = PyTupleExpression;
636
+ type YieldExpression = PyYieldExpression;
637
+ type YieldFromExpression = PyYieldFromExpression;
638
+ type Comprehension = PyComprehension;
639
+ type ComprehensionNode = PyComprehensionNode;
640
+ type DictComprehension = PyDictComprehension;
641
+ type ListComprehension = PyListComprehension;
642
+ type SetComprehension = PySetComprehension;
643
+ type PrinterOptions = PyPrinterOptions;
644
+ type LiteralValue = PyLiteralValue;
645
+ }
646
+ declare const py: {
647
+ readonly PyNodeKind: typeof PyNodeKind;
648
+ readonly createPrinter: typeof createPrinter;
649
+ readonly factory: {
650
+ createAssignment: typeof createAssignment;
651
+ createAsyncExpression: typeof createAsyncExpression;
652
+ createAugmentedAssignment: typeof createAugmentedAssignment;
653
+ createAwaitExpression: typeof createAwaitExpression;
654
+ createBinaryExpression: typeof createBinaryExpression;
655
+ createBlock: typeof createBlock;
656
+ createBreakStatement: typeof createBreakStatement;
657
+ createCallExpression: typeof createCallExpression;
658
+ createClassDeclaration: typeof createClassDeclaration;
659
+ createComment: typeof createComment;
660
+ createContinueStatement: typeof createContinueStatement;
661
+ createDictComprehension: typeof createDictComprehension;
662
+ createDictExpression: typeof createDictExpression;
663
+ createEmptyStatement: typeof createEmptyStatement;
664
+ createExceptClause: typeof createExceptClause;
665
+ createExpressionStatement: typeof createExpressionStatement;
666
+ createFStringExpression: typeof createFStringExpression;
667
+ createForStatement: typeof createForStatement;
668
+ createFunctionDeclaration: typeof createFunctionDeclaration;
669
+ createFunctionParameter: typeof createFunctionParameter;
670
+ createGeneratorExpression: typeof createGeneratorExpression;
671
+ createIdentifier: typeof createIdentifier;
672
+ createIfStatement: typeof createIfStatement;
673
+ createImportStatement: typeof createImportStatement;
674
+ createKeywordArgument: typeof createKeywordArgument;
675
+ createLambdaExpression: typeof createLambdaExpression;
676
+ createListComprehension: typeof createListComprehension;
677
+ createListExpression: typeof createListExpression;
678
+ createLiteral: typeof createLiteral;
679
+ createMemberExpression: typeof createMemberExpression;
680
+ createRStringExpression: typeof createRStringExpression;
681
+ createRaiseStatement: typeof createRaiseStatement;
682
+ createReturnStatement: typeof createReturnStatement;
683
+ createSetComprehension: typeof createSetComprehension;
684
+ createSetExpression: typeof createSetExpression;
685
+ createSourceFile: typeof createSourceFile;
686
+ createSubscriptExpression: typeof createSubscriptExpression;
687
+ createSubscriptSlice: typeof createSubscriptSlice;
688
+ createTryStatement: typeof createTryStatement;
689
+ createTupleExpression: typeof createTupleExpression;
690
+ createWhileStatement: typeof createWhileStatement;
691
+ createWithItem: typeof createWithItem;
692
+ createWithStatement: typeof createWithStatement;
693
+ createYieldExpression: typeof createYieldExpression;
694
+ createYieldFromExpression: typeof createYieldFromExpression;
695
+ };
696
+ readonly printAst: typeof printAst;
697
+ };
698
+ //#endregion
699
+ //#region src/py-dsl/mixins/types.d.ts
700
+ type BaseCtor<T extends py.Node> = abstract new (...args: Array<any>) => PyDsl<T>;
701
+ type DropFirst<T extends Array<any>> = T extends [any, ...infer Rest] ? Rest : never;
702
+ type MixinCtor<T extends BaseCtor<any>, K> = abstract new (...args: Array<any>) => InstanceType<T> & K;
703
+ //#endregion
704
+ //#region src/py-dsl/expr/attr.d.ts
705
+ type AttrLeft = NodeName$1 | MaybePyDsl<py.Expression>;
706
+ type AttrCtor = (left: AttrLeft, right: NodeName$1) => AttrPyDsl;
707
+ declare const Mixed$36: MixinCtor<abstract new () => PyDsl<PyMemberExpression, "python">, ExprMethods>;
708
+ declare class AttrPyDsl extends Mixed$36 {
709
+ readonly '~dsl' = "AttrPyDsl";
710
+ protected left: Ref<AttrLeft>;
711
+ constructor(left: AttrLeft, right: NodeName$1);
712
+ analyze(ctx: AnalysisContext): void;
713
+ /** Returns true when all required builder calls are present. */
714
+ get isValid(): boolean;
715
+ toAst(): PyMemberExpression;
716
+ $validate(): asserts this is this & {
717
+ left: MaybePyDsl<py.Expression>;
718
+ };
719
+ private missingRequiredCalls;
720
+ }
721
+ //#endregion
722
+ //#region src/py-dsl/expr/binary.d.ts
723
+ type BinaryCtor = (left: MaybePyDsl<py.Expression>, op: PyBinaryOperator, right: MaybePyDsl<py.Expression>) => BinaryPyDsl;
724
+ declare const Mixed$35: abstract new () => PyDsl<PyBinaryExpression, "python">;
725
+ declare class BinaryPyDsl extends Mixed$35 {
726
+ readonly '~dsl' = "BinaryPyDsl";
727
+ protected _left?: Ref<MaybePyDsl<py.Expression>>;
728
+ protected _op?: PyBinaryOperator;
729
+ protected _right?: Ref<MaybePyDsl<py.Expression>>;
730
+ constructor(left: MaybePyDsl<py.Expression>, op: PyBinaryOperator, right: MaybePyDsl<py.Expression>);
731
+ analyze(ctx: AnalysisContext): void;
732
+ /** Returns true when all required builder calls are present. */
733
+ get isValid(): boolean;
734
+ and(right: MaybePyDsl<py.Expression>): this;
735
+ div(right: MaybePyDsl<py.Expression>): this;
736
+ eq(right: MaybePyDsl<py.Expression>): this;
737
+ floordiv(right: MaybePyDsl<py.Expression>): this;
738
+ gt(right: MaybePyDsl<py.Expression>): this;
739
+ gte(right: MaybePyDsl<py.Expression>): this;
740
+ in_(right: MaybePyDsl<py.Expression>): this;
741
+ is(right: MaybePyDsl<py.Expression>): this;
742
+ isNot(right: MaybePyDsl<py.Expression>): this;
743
+ lt(right: MaybePyDsl<py.Expression>): this;
744
+ lte(right: MaybePyDsl<py.Expression>): this;
745
+ minus(right: MaybePyDsl<py.Expression>): this;
746
+ mod(right: MaybePyDsl<py.Expression>): this;
747
+ neq(right: MaybePyDsl<py.Expression>): this;
748
+ notIn(right: MaybePyDsl<py.Expression>): this;
749
+ or(right: MaybePyDsl<py.Expression>): this;
750
+ plus(right: MaybePyDsl<py.Expression>): this;
751
+ pow(right: MaybePyDsl<py.Expression>): this;
752
+ times(right: MaybePyDsl<py.Expression>): this;
753
+ toAst(): PyBinaryExpression;
754
+ $validate(): asserts this is this & {
755
+ _left: MaybePyDsl<py.Expression>;
756
+ _op: PyBinaryOperator;
757
+ _right: MaybePyDsl<py.Expression>;
758
+ };
759
+ private missingRequiredCalls;
760
+ private opAndExpr;
761
+ }
762
+ //#endregion
763
+ //#region src/py-dsl/expr/expr.d.ts
764
+ type ExprId = NodeName$1 | MaybePyDsl<py.Expression>;
765
+ type ExprCtor = (id: ExprId) => ExprPyDsl;
766
+ declare const Mixed$34: MixinCtor<abstract new () => PyDsl<PyExpression, "python">, ExprMethods>;
767
+ declare class ExprPyDsl extends Mixed$34 {
768
+ readonly '~dsl' = "ExprPyDsl";
769
+ protected _exprInput: Ref<ExprId>;
770
+ constructor(id: ExprId);
771
+ analyze(ctx: AnalysisContext): void;
772
+ toAst(): any;
773
+ }
774
+ //#endregion
775
+ //#region src/py-dsl/mixins/layout.d.ts
776
+ interface LayoutMethods extends Node$1 {
777
+ /** Computes whether output should be multiline based on layout setting and element count. */
778
+ $multiline(count: number): boolean;
779
+ /** Sets automatic line output with optional threshold (default: 3). */
780
+ auto(threshold?: number): this;
781
+ /** Sets single line output. */
782
+ inline(): this;
783
+ /** Sets multi line output. */
784
+ pretty(): this;
785
+ }
786
+ //#endregion
787
+ //#region src/py-dsl/expr/subscript.d.ts
788
+ type SubscriptExpr = NodeName$1 | MaybePyDsl<py.Expression>;
789
+ type SubscriptCtor = (value: SubscriptExpr, ...slices: Array<SubscriptExpr>) => SubscriptPyDsl;
790
+ declare const Mixed$33: MixinCtor<abstract new () => PyDsl<PySubscriptExpression, "python">, LayoutMethods>;
791
+ declare class SubscriptPyDsl extends Mixed$33 {
792
+ readonly '~dsl' = "SubscriptPyDsl";
793
+ protected _slices: Array<Ref<SubscriptExpr>>;
794
+ protected _value: Ref<SubscriptExpr>;
795
+ constructor(value: SubscriptExpr, ...slices: Array<SubscriptExpr>);
796
+ analyze(ctx: AnalysisContext): void;
797
+ toAst(): PySubscriptExpression;
798
+ }
799
+ //#endregion
800
+ //#region src/py-dsl/expr/tuple.d.ts
801
+ type TupleElement = NodeName$1 | MaybePyDsl<py.Expression>;
802
+ type TupleCtor = (...elements: Array<TupleElement>) => TuplePyDsl;
803
+ declare const Mixed$32: MixinCtor<abstract new () => PyDsl<PyTupleExpression, "python">, LayoutMethods>;
804
+ declare class TuplePyDsl extends Mixed$32 {
805
+ readonly '~dsl' = "TuplePyDsl";
806
+ protected _elements: Array<Ref<TupleElement>>;
807
+ constructor(...elements: Array<TupleElement>);
808
+ analyze(ctx: AnalysisContext): void;
809
+ element(expr: TupleElement): this;
810
+ elements(...exprs: ReadonlyArray<TupleElement>): this;
811
+ toAst(): PyTupleExpression;
812
+ }
813
+ //#endregion
814
+ //#region src/py-dsl/stmt/return.d.ts
815
+ type ReturnExpr = NodeName$1 | MaybePyDsl<py.Expression>;
816
+ type ReturnCtor = (expr?: ReturnExpr) => ReturnPyDsl;
817
+ declare const Mixed$31: abstract new () => PyDsl<PyReturnStatement, "python">;
818
+ declare class ReturnPyDsl extends Mixed$31 {
819
+ readonly '~dsl' = "ReturnPyDsl";
820
+ protected _returnExpr?: Ref<ReturnExpr>;
821
+ constructor(expr?: ReturnExpr);
822
+ analyze(ctx: AnalysisContext): void;
823
+ toAst(): PyReturnStatement;
824
+ }
825
+ //#endregion
826
+ //#region src/py-dsl/utils/factories.d.ts
827
+ type Ctor = (...args: Array<any>) => any;
828
+ type Factory<T extends Ctor> = {
829
+ (...args: Parameters<T>): ReturnType<T>; /** Sets the implementation of this factory. */
830
+ set(fn: T): void;
831
+ };
832
+ declare const f: {
833
+ /** Factory for creating property access expressions (e.g., `obj.foo`). */attr: Factory<AttrCtor>; /** Factory for creating binary expressions (e.g., `a + b`). */
834
+ binary: Factory<BinaryCtor>; /** Factory for creating function or method call expressions (e.g., `fn(arg)`). */
835
+ call: Factory<CallCtor>; /** Factory for creating expression nodes. */
836
+ expr: Factory<ExprCtor>; /** Factory for creating return statements. */
837
+ return: Factory<ReturnCtor>; /** Factory for creating slice expressions. */
838
+ slice: Factory<SubscriptCtor>; /** Factory for creating tuple expressions. */
839
+ tuple: Factory<TupleCtor>;
840
+ };
841
+ //#endregion
842
+ //#region src/py-dsl/mixins/expr.d.ts
843
+ interface ExprMethods extends Node$1 {
844
+ /** Accesses a property on the current expression (e.g., `this.foo`). */
845
+ attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;
846
+ /** Calls the current expression (e.g., `fn(arg1, arg2)`). */
847
+ call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;
848
+ /** Produces a `return` statement returning the current expression. */
849
+ return(): ReturnType<typeof f.return>;
850
+ /** Produces a subscript/slice expression (e.g., `expr[args]`). */
851
+ slice(...args: DropFirst<Parameters<typeof f.slice>>): ReturnType<typeof f.slice>;
852
+ }
853
+ //#endregion
854
+ //#region src/py-dsl/mixins/args.d.ts
855
+ type Arg = NodeName$1 | MaybePyDsl<py.Expression>;
856
+ interface ArgsMethods extends Node$1 {
857
+ /** Renders the arguments into an array of `Expression`s. */
858
+ $args(): ReadonlyArray<py.Expression>;
859
+ /** Adds a single expression argument. */
860
+ arg(arg: Arg | undefined): this;
861
+ /** Adds one or more expression arguments. */
862
+ args(...args: ReadonlyArray<Arg | undefined>): this;
863
+ }
864
+ //#endregion
865
+ //#region src/py-dsl/expr/call.d.ts
866
+ type CallArgs = ReadonlyArray<CallCallee | undefined>;
867
+ type CallCallee = NodeName$1 | MaybePyDsl<py.Expression>;
868
+ type CallCtor = (callee: CallCallee, ...args: CallArgs) => CallPyDsl;
869
+ declare const Mixed$30: MixinCtor<MixinCtor<abstract new () => PyDsl<PyCallExpression, "python">, ExprMethods>, ArgsMethods>;
870
+ declare class CallPyDsl extends Mixed$30 {
871
+ readonly '~dsl' = "CallPyDsl";
872
+ protected _callee: Ref<CallCallee>;
873
+ constructor(callee: CallCallee, ...args: CallArgs);
874
+ analyze(ctx: AnalysisContext): void;
875
+ /** Returns true when all required builder calls are present. */
876
+ get isValid(): boolean;
877
+ toAst(): PyCallExpression;
878
+ $validate(): asserts this is this & {
879
+ _callee: MaybePyDsl<py.Expression>;
880
+ };
881
+ private missingRequiredCalls;
882
+ }
883
+ //#endregion
884
+ //#region src/py-dsl/utils/context.d.ts
885
+ type NodeChain = ReadonlyArray<PyDsl>;
886
+ interface AccessOptions {
887
+ /** The access context. */
888
+ context?: 'example';
889
+ /** Enable debug mode. */
890
+ debug?: boolean;
891
+ /** Transform function for each node in the access chain. */
892
+ transform?: (node: PyDsl, index: number, chain: NodeChain) => PyDsl;
893
+ }
894
+ interface ExampleOptions {
895
+ /** Import kind for the root node. */
896
+ importKind?: BindingKind;
897
+ /** Import name for the root node. */
898
+ importName?: string;
899
+ /** Setup to run before calling the example. */
900
+ importSetup?: MaybeFunc<(ctx: DollarPyDsl & {
901
+ /** The imported expression. */node: PyDsl<py.Expression>;
902
+ }) => PyDsl<py.Expression>>;
903
+ /** Module to import from. */
904
+ moduleName?: string;
905
+ /** Example request payload. */
906
+ payload?: MaybeFunc<(ctx: DollarPyDsl) => CallArgs | CallArgs[number]>;
907
+ /** Variable name for setup node. */
908
+ setupName?: string;
909
+ }
910
+ /**
911
+ * Fold a structural chain to an access chain by removing
912
+ * non-accessor nodes.
913
+ */
914
+ declare class PyDslContext {}
915
+ //#endregion
916
+ //#region src/py-dsl/base.d.ts
917
+ declare abstract class PyDsl<T extends py.Node = py.Node, L extends Language = 'python'> implements Node$1<T, L> {
918
+ analyze(_: AnalysisContext): void;
919
+ clone(): this;
920
+ exported?: boolean;
921
+ file?: File;
922
+ get name(): Node$1['name'];
923
+ readonly nameSanitizer?: NodeNameSanitizer;
924
+ language: L;
925
+ meta: Required<ProjectMeta>[L];
926
+ parent?: Node$1;
927
+ root: boolean;
928
+ scope?: NodeScope;
929
+ structuralChildren?: Map<PyDsl, NodeRelationship>;
930
+ structuralParents?: Map<PyDsl, NodeRelationship>;
931
+ symbol?: Symbol;
932
+ toAst(): T;
933
+ readonly '~brand': any;
934
+ /** Branding property to identify the DSL class at runtime. */
935
+ abstract readonly '~dsl': AnyString;
936
+ /** Conditionally applies a callback to this builder. */
937
+ $if<T extends PyDsl, V, R extends PyDsl = T>(this: T, value: V, ifTrue: (self: T, v: Exclude<V, false | null | undefined>) => R | void, ifFalse?: (self: T, v: Extract<V, false | null | undefined>) => R | void): R | T;
938
+ $if<T extends PyDsl, V, R extends PyDsl = T>(this: T, value: V, ifTrue: (v: Exclude<V, false | null | undefined>) => R | void, ifFalse?: (v: Extract<V, false | null | undefined>) => R | void): R | T;
939
+ $if<T extends PyDsl, V, R extends PyDsl = T>(this: T, value: V, ifTrue: () => R | void, ifFalse?: () => R | void): R | T;
940
+ /** Access patterns for this node. */
941
+ toAccessNode?(node: this, options: AccessOptions, ctx: {
942
+ /** The full chain. */chain: ReadonlyArray<PyDsl>; /** Position in the chain (0 = root). */
943
+ index: number; /** Is this the leaf node? */
944
+ isLeaf: boolean; /** Is this the root node? */
945
+ isRoot: boolean; /** Total length of the chain. */
946
+ length: number;
947
+ }): PyDsl | undefined;
948
+ protected $maybeId<T extends string | py.Expression>(expr: T): T extends string ? py.Identifier : T;
949
+ protected $name(name: Ref<NodeName$1>): string;
950
+ protected $node<I>(value: I): NodeOfMaybe<I>;
951
+ private _name?;
952
+ /** Unwraps nested nodes into raw Python AST. */
953
+ private unwrap;
954
+ }
955
+ type NodeOfMaybe<I> = undefined extends I ? NodeOf<NonNullable<FromRef<I>>> | undefined : NodeOf<FromRef<I>>;
956
+ type NodeOf<I> = I extends ReadonlyArray<infer U> ? ReadonlyArray<U extends PyDsl<infer N> ? N : U> : I extends string ? py.Expression : I extends PyDsl<infer N> ? N : I extends py.Node ? I : never;
957
+ type MaybePyDsl<T> = [T] extends [PyDsl<infer U>] ? U | PyDsl<U> : [T] extends [py.Node] ? T | PyDsl<T> : never;
958
+ //#endregion
959
+ //#region src/py-dsl/layout/doc.d.ts
960
+ type DocMaybeLazy<T> = ((ctx: PyDslContext) => T) | T;
961
+ type DocFn = (d: DocPyDsl) => void;
962
+ type DocLines = DocMaybeLazy<MaybeArray<string>>;
963
+ declare class DocPyDsl extends PyDsl<py.Comment> {
964
+ readonly '~dsl' = "DocPyDsl";
965
+ protected _lines: Array<DocLines>;
966
+ constructor(lines?: DocLines, fn?: DocFn);
967
+ analyze(ctx: AnalysisContext): void;
968
+ add(lines: DocLines): this;
969
+ resolve(): string | undefined;
970
+ toAst(): PyComment;
971
+ }
972
+ //#endregion
973
+ //#region src/py-dsl/layout/hint.d.ts
974
+ type HintMaybeLazy<T> = ((ctx: PyDslContext) => T) | T;
975
+ type HintFn = (d: HintPyDsl) => void;
976
+ type HintLines = HintMaybeLazy<MaybeArray<string>>;
977
+ declare class HintPyDsl extends PyDsl<py.Comment> {
978
+ readonly '~dsl' = "HintPyDsl";
979
+ protected _lines: Array<HintLines>;
980
+ constructor(lines?: HintLines, fn?: HintFn);
981
+ analyze(ctx: AnalysisContext): void;
982
+ add(lines: HintLines): this;
983
+ apply<T extends py.Node>(node: T): T;
984
+ toAst(): PyComment;
985
+ private _resolveLines;
986
+ }
987
+ //#endregion
988
+ //#region src/py-dsl/mixins/do.d.ts
989
+ type DoExpr = MaybePyDsl<py.Expression | py.Statement>;
990
+ interface DoMethods extends Node$1 {
991
+ /** Renders the collected `.do()` calls into an array of `py.Statement` nodes. */
992
+ $do(): ReadonlyArray<py.Statement>;
993
+ _do: Array<DoExpr>;
994
+ /** Adds one or more expressions/statements to the body. */
995
+ do(...items: ReadonlyArray<DoExpr>): this;
996
+ }
997
+ //#endregion
998
+ //#region src/py-dsl/stmt/if.d.ts
999
+ type IfCondition = string | MaybePyDsl<py.Expression>;
1000
+ declare const Mixed$29: MixinCtor<abstract new () => PyDsl<PyIfStatement, "python">, DoMethods>;
1001
+ declare class IfPyDsl extends Mixed$29 {
1002
+ readonly '~dsl' = "IfPyDsl";
1003
+ protected _condition?: IfCondition;
1004
+ protected _else?: Array<DoExpr>;
1005
+ constructor(condition?: IfCondition);
1006
+ analyze(ctx: AnalysisContext): void;
1007
+ /** Returns true when all required builder calls are present. */
1008
+ get isValid(): boolean;
1009
+ condition(condition: IfCondition): this;
1010
+ otherwise(...items: Array<DoExpr>): this;
1011
+ toAst(): PyIfStatement;
1012
+ $validate(): asserts this is this & {
1013
+ _condition: IfCondition;
1014
+ };
1015
+ private missingRequiredCalls;
1016
+ }
1017
+ //#endregion
1018
+ //#region src/py-dsl/utils/r-string.d.ts
1019
+ declare class RString {
1020
+ readonly value: string;
1021
+ readonly '~brand': "RString";
1022
+ constructor(value: string);
1023
+ }
1024
+ //#endregion
1025
+ //#region src/py-dsl/expr/kwarg.d.ts
1026
+ type KwargValue = string | number | boolean | null | RString | MaybePyDsl<py.Expression>;
1027
+ declare const Mixed$28: abstract new () => PyDsl<PyKeywordArgument, "python">;
1028
+ declare class KwargPyDsl extends Mixed$28 {
1029
+ readonly '~dsl' = "KwargPyDsl";
1030
+ protected _value: KwargValue;
1031
+ constructor(name: NodeName$1, value: KwargValue);
1032
+ get key(): string;
1033
+ toAst(): PyKeywordArgument;
1034
+ private $valueToNode;
1035
+ }
1036
+ //#endregion
1037
+ //#region src/py-dsl/utils/lazy.d.ts
1038
+ type LazyThunk<T extends py.Node> = (ctx: PyDslContext) => PyDsl<T>;
1039
+ declare class LazyPyDsl<T extends py.Node = py.Node> extends PyDsl<T> {
1040
+ readonly '~dsl' = "LazyPyDsl";
1041
+ private _thunk;
1042
+ private _result?;
1043
+ constructor(thunk: LazyThunk<T>);
1044
+ analyze(ctx: AnalysisContext): void;
1045
+ toResult(): PyDsl<T>;
1046
+ toAst(): T;
1047
+ }
1048
+ //#endregion
1049
+ //#region src/py-dsl/decl/param.d.ts
1050
+ type ParamDefaultValue = NodeName$1 | py.Expression | undefined;
1051
+ type ParamFn = (p: ParamPyDsl) => void;
1052
+ type ParamName = NodeName$1 | ParamFn;
1053
+ type ParamType = NodeName$1 | PyDsl<py.Expression> | undefined;
1054
+ type ParamCtor = (name: ParamName, fn?: ParamFn) => ParamPyDsl;
1055
+ declare class ParamPyDsl extends PyDsl<py.FunctionParameter> {
1056
+ readonly '~dsl' = "ParamPyDsl";
1057
+ protected _defaultValue?: Ref<ParamDefaultValue>;
1058
+ protected _type?: Ref<ParamType>;
1059
+ constructor(name: ParamName, fn?: ParamFn);
1060
+ analyze(ctx: AnalysisContext): void;
1061
+ /** Sets the parameter default value. */
1062
+ default(value: ParamDefaultValue): this;
1063
+ get isValid(): boolean;
1064
+ /** Sets the parameter type. */
1065
+ type(type: ParamType): this;
1066
+ toAst(): PyFunctionParameter;
1067
+ $validate(): asserts this;
1068
+ private missingRequiredCalls;
1069
+ }
1070
+ //#endregion
1071
+ //#region src/py-dsl/mixins/modifiers.d.ts
1072
+ type Modifiers = {
1073
+ /**
1074
+ * Checks if specified modifier is present.
1075
+ *
1076
+ * @param modifier - The modifier to check.
1077
+ * @returns True if modifier is present, false otherwise.
1078
+ */
1079
+ hasModifier(modifier: Modifier): boolean;
1080
+ modifiers: Array<py.Expression>;
1081
+ };
1082
+ type Modifier = 'async';
1083
+ interface AsyncMethods extends Modifiers {
1084
+ /**
1085
+ * Adds an `async` keyword modifier if condition is true.
1086
+ *
1087
+ * @param condition - Whether to add modifier (default: true).
1088
+ * @returns The target object for chaining.
1089
+ */
1090
+ async(condition?: boolean): this;
1091
+ }
1092
+ interface ExportMethods extends Modifiers {
1093
+ /**
1094
+ * Adds the `export` keyword modifier if the condition is true.
1095
+ *
1096
+ * @param condition - Whether to add the modifier (default: true).
1097
+ * @returns The target object for chaining.
1098
+ */
1099
+ export(condition?: boolean): this;
1100
+ }
1101
+ //#endregion
1102
+ //#region src/py-dsl/mixins/doc.d.ts
1103
+ interface DocMethods extends Node$1 {
1104
+ $docs(): string | undefined;
1105
+ doc(lines?: DocLines, fn?: DocFn): this;
1106
+ }
1107
+ //#endregion
1108
+ //#region src/py-dsl/mixins/decorator.d.ts
1109
+ type DecoratorArg = MaybePyDsl<py.Expression>;
1110
+ type DecoratorName = NodeName$1 | MaybePyDsl<py.Expression>;
1111
+ interface DecoratorMethods extends Node {
1112
+ $decorators(): ReadonlyArray<py.Expression>;
1113
+ decorator(name: DecoratorName, ...args: ReadonlyArray<DecoratorArg>): this;
1114
+ }
1115
+ //#endregion
1116
+ //#region src/py-dsl/utils/name.d.ts
1117
+ declare function safeRuntimeName(name: string): string;
1118
+ declare function safeKeywordName(name: string): string;
1119
+ //#endregion
1120
+ //#region src/py-dsl/decl/class.d.ts
1121
+ type ClassBody = Array<PyDsl<py.Statement>>;
1122
+ declare const Mixed$27: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => PyDsl<PyClassDeclaration, "python">, LayoutMethods>, ExportMethods>, DocMethods>, DecoratorMethods>;
1123
+ declare class ClassPyDsl extends Mixed$27 {
1124
+ readonly '~dsl' = "ClassPyDsl";
1125
+ readonly nameSanitizer: typeof safeRuntimeName;
1126
+ protected baseClasses: Array<Ref<NodeName$1 | SubscriptExpr>>;
1127
+ protected body: ClassBody;
1128
+ constructor(name: NodeName$1);
1129
+ analyze(ctx: AnalysisContext): void;
1130
+ /** Returns true when all required builder calls are present. */
1131
+ get isValid(): boolean;
1132
+ /** Returns true if the class has any members. */
1133
+ get hasBody(): boolean;
1134
+ /** Adds one or more class members (fields, methods, etc.). */
1135
+ do(...items: ClassBody): this;
1136
+ /** Records base classes to extend from. */
1137
+ extends(...baseClass: ReadonlyArray<NodeName$1 | SubscriptExpr>): this;
1138
+ /** Inserts an empty line between members for formatting. */
1139
+ newline(): this;
1140
+ toAst(): PyClassDeclaration;
1141
+ $validate(): asserts this;
1142
+ private missingRequiredCalls;
1143
+ }
1144
+ //#endregion
1145
+ //#region src/py-dsl/decl/enum.d.ts
1146
+ type EnumMember = {
1147
+ name: NodeName$1;
1148
+ value: number | string | boolean;
1149
+ };
1150
+ declare const Mixed$26: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => PyDsl<PyClassDeclaration, "python">, LayoutMethods>, ExportMethods>, DocMethods>, DecoratorMethods>;
1151
+ declare class EnumPyDsl extends Mixed$26 {
1152
+ readonly '~dsl' = "EnumPyDsl";
1153
+ readonly nameSanitizer: typeof safeRuntimeName;
1154
+ private _decision?;
1155
+ private _members;
1156
+ constructor(name: NodeName$1);
1157
+ members(...members: ReadonlyArray<EnumMember>): this;
1158
+ analyze(ctx: AnalysisContext): void;
1159
+ /** Returns true when all required builder calls are present. */
1160
+ get isValid(): boolean;
1161
+ toAst(): PyClassDeclaration;
1162
+ $validate(): asserts this;
1163
+ private missingRequiredCalls;
1164
+ }
1165
+ //#endregion
1166
+ //#region src/py-dsl/mixins/value.d.ts
1167
+ type ValueExpr = NodeName$1 | MaybePyDsl<py.Expression>;
1168
+ interface ValueMethods extends Node$1 {
1169
+ $value(): py.Expression | undefined;
1170
+ /** Sets the initializer expression (e.g., `= expr`). */
1171
+ assign(expr: ValueExpr): this;
1172
+ }
1173
+ //#endregion
1174
+ //#region src/py-dsl/decl/field.d.ts
1175
+ declare const Mixed$25: MixinCtor<abstract new () => PyDsl<PyAssignment, "python">, ValueMethods>;
1176
+ type FieldType = NodeName$1 | MaybePyDsl<py.Expression>;
1177
+ declare class FieldPyDsl extends Mixed$25 {
1178
+ readonly '~dsl' = "FieldPyDsl";
1179
+ readonly nameSanitizer: typeof safeKeywordName;
1180
+ protected _type?: Ref<FieldType>;
1181
+ constructor(name?: NodeName$1);
1182
+ analyze(ctx: AnalysisContext): void;
1183
+ /** Returns true when all required builder calls are present. */
1184
+ get isValid(): boolean;
1185
+ /** Sets the type annotation for the field. */
1186
+ type(type: FieldType): this;
1187
+ toAst(): PyAssignment;
1188
+ $validate(): asserts this;
1189
+ protected $_type(): py.Expression | undefined;
1190
+ private missingRequiredCalls;
1191
+ }
1192
+ //#endregion
1193
+ //#region src/py-dsl/mixins/returns.d.ts
1194
+ interface ReturnsMethods extends Node$1 {
1195
+ $returns(): py.Expression | undefined;
1196
+ returns(type: NodeName$1 | py.Expression): this;
1197
+ }
1198
+ //#endregion
1199
+ //#region src/py-dsl/mixins/param.d.ts
1200
+ interface ParamMethods extends Node$1 {
1201
+ /** Renders the parameters into an array of `FunctionParameter`s. */
1202
+ $params(): ReadonlyArray<py.FunctionParameter>;
1203
+ /** Adds a parameter. */
1204
+ param(...args: Parameters<ParamCtor>): this;
1205
+ /** Adds multiple parameters. */
1206
+ params(...params: ReadonlyArray<MaybePyDsl<py.FunctionParameter>>): this;
1207
+ }
1208
+ //#endregion
1209
+ //#region src/py-dsl/decl/func.d.ts
1210
+ declare const Mixed$24: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => PyDsl<PyFunctionDeclaration, "python">, ReturnsMethods>, ParamMethods>, LayoutMethods>, ExportMethods>, DoMethods>, DocMethods>, DecoratorMethods>, AsyncMethods>;
1211
+ declare class FuncPyDsl extends Mixed$24 {
1212
+ readonly '~dsl' = "FuncPyDsl";
1213
+ readonly nameSanitizer: typeof safeRuntimeName;
1214
+ constructor(name: NodeName$1, fn?: (f: FuncPyDsl) => void);
1215
+ analyze(ctx: AnalysisContext): void;
1216
+ /** Returns true when all required builder calls are present. */
1217
+ get isValid(): boolean;
1218
+ toAst(): PyFunctionDeclaration;
1219
+ $validate(): asserts this;
1220
+ private missingRequiredCalls;
1221
+ }
1222
+ //#endregion
1223
+ //#region src/py-dsl/decl/method.d.ts
1224
+ declare const Mixed$23: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => PyDsl<PyFunctionDeclaration, "python">, ReturnsMethods>, ParamMethods>, LayoutMethods>, DoMethods>, DocMethods>, DecoratorMethods>, AsyncMethods>;
1225
+ declare class MethodPyDsl extends Mixed$23 {
1226
+ readonly '~dsl' = "MethodPyDsl";
1227
+ readonly nameSanitizer: typeof safeKeywordName;
1228
+ constructor(name: NodeName$1, fn?: (f: MethodPyDsl) => void);
1229
+ analyze(ctx: AnalysisContext): void;
1230
+ /** Returns true when all required builder calls are present. */
1231
+ get isValid(): boolean;
1232
+ toAst(): PyFunctionDeclaration;
1233
+ $validate(): asserts this;
1234
+ private missingRequiredCalls;
1235
+ }
1236
+ //#endregion
1237
+ //#region src/py-dsl/expr/dict.d.ts
1238
+ declare const Mixed$22: MixinCtor<abstract new () => PyDsl<PyDictExpression, "python">, LayoutMethods>;
1239
+ declare class DictPyDsl extends Mixed$22 {
1240
+ readonly '~dsl' = "DictPyDsl";
1241
+ protected _entries: Array<{
1242
+ key: MaybePyDsl<py.Expression>;
1243
+ value: MaybePyDsl<py.Expression>;
1244
+ }>;
1245
+ constructor(...entries: Array<{
1246
+ key: MaybePyDsl<py.Expression>;
1247
+ value: MaybePyDsl<py.Expression>;
1248
+ }>);
1249
+ analyze(ctx: AnalysisContext): void;
1250
+ entry(key: MaybePyDsl<py.Expression>, value: MaybePyDsl<py.Expression>): this;
1251
+ entries(...entries: ReadonlyArray<{
1252
+ key: MaybePyDsl<py.Expression>;
1253
+ value: MaybePyDsl<py.Expression>;
1254
+ }>): this;
1255
+ toAst(): PyDictExpression;
1256
+ }
1257
+ //#endregion
1258
+ //#region src/py-dsl/expr/identifier.d.ts
1259
+ declare const Mixed$21: abstract new () => PyDsl<PyIdentifier, "python">;
1260
+ declare class IdPyDsl extends Mixed$21 {
1261
+ readonly '~dsl' = "IdPyDsl";
1262
+ constructor(name: NodeName$1);
1263
+ analyze(ctx: AnalysisContext): void;
1264
+ toAst(): PyIdentifier;
1265
+ }
1266
+ //#endregion
1267
+ //#region src/py-dsl/expr/list.d.ts
1268
+ declare const Mixed$20: MixinCtor<abstract new () => PyDsl<PyListExpression, "python">, LayoutMethods>;
1269
+ declare class ListPyDsl extends Mixed$20 {
1270
+ readonly '~dsl' = "ListPyDsl";
1271
+ protected _elements: Array<MaybePyDsl<py.Expression>>;
1272
+ constructor(...elements: Array<MaybePyDsl<py.Expression>>);
1273
+ analyze(ctx: AnalysisContext): void;
1274
+ element(expr: MaybePyDsl<py.Expression>): this;
1275
+ elements(...exprs: ReadonlyArray<MaybePyDsl<py.Expression>>): this;
1276
+ toAst(): PyListExpression;
1277
+ }
1278
+ //#endregion
1279
+ //#region src/py-dsl/expr/literal.d.ts
1280
+ declare const Mixed$19: abstract new () => PyDsl<PyLiteral, "python">;
1281
+ declare class LiteralPyDsl extends Mixed$19 {
1282
+ readonly '~dsl' = "LiteralPyDsl";
1283
+ protected value: py.LiteralValue;
1284
+ constructor(value: py.LiteralValue);
1285
+ analyze(_ctx: AnalysisContext): void;
1286
+ toAst(): PyLiteral;
1287
+ }
1288
+ //#endregion
1289
+ //#region src/py-dsl/expr/set.d.ts
1290
+ declare const Mixed$18: MixinCtor<abstract new () => PyDsl<PySetExpression, "python">, LayoutMethods>;
1291
+ declare class SetPyDsl extends Mixed$18 {
1292
+ readonly '~dsl' = "SetPyDsl";
1293
+ protected _elements: Array<MaybePyDsl<py.Expression>>;
1294
+ constructor(...elements: Array<MaybePyDsl<py.Expression>>);
1295
+ analyze(ctx: AnalysisContext): void;
1296
+ element(expr: MaybePyDsl<py.Expression>): this;
1297
+ elements(...exprs: ReadonlyArray<MaybePyDsl<py.Expression>>): this;
1298
+ toAst(): PySetExpression;
1299
+ }
1300
+ //#endregion
1301
+ //#region src/py-dsl/layout/newline.d.ts
1302
+ declare class NewlinePyDsl extends PyDsl<py.EmptyStatement> {
1303
+ readonly '~dsl' = "NewlinePyDsl";
1304
+ analyze(ctx: AnalysisContext): void;
1305
+ toAst(): PyEmptyStatement;
1306
+ }
1307
+ //#endregion
1308
+ //#region src/py-dsl/stmt/block.d.ts
1309
+ declare const Mixed$17: MixinCtor<MixinCtor<abstract new () => PyDsl<PyBlock, "python">, LayoutMethods>, DoMethods>;
1310
+ declare class BlockPyDsl extends Mixed$17 {
1311
+ readonly '~dsl' = "BlockPyDsl";
1312
+ constructor(...items: Array<DoExpr>);
1313
+ analyze(ctx: AnalysisContext): void;
1314
+ toAst(): PyBlock;
1315
+ }
1316
+ //#endregion
1317
+ //#region src/py-dsl/stmt/break.d.ts
1318
+ declare const Mixed$16: abstract new () => PyDsl<PyBreakStatement, "python">;
1319
+ declare class BreakPyDsl extends Mixed$16 {
1320
+ readonly '~dsl' = "BreakPyDsl";
1321
+ analyze(_ctx: AnalysisContext): void;
1322
+ toAst(): PyBreakStatement;
1323
+ }
1324
+ //#endregion
1325
+ //#region src/py-dsl/stmt/continue.d.ts
1326
+ declare const Mixed$15: abstract new () => PyDsl<PyContinueStatement, "python">;
1327
+ declare class ContinuePyDsl extends Mixed$15 {
1328
+ readonly '~dsl' = "ContinuePyDsl";
1329
+ analyze(_ctx: AnalysisContext): void;
1330
+ toAst(): PyContinueStatement;
1331
+ }
1332
+ //#endregion
1333
+ //#region src/py-dsl/stmt/for.d.ts
1334
+ declare const Mixed$14: abstract new () => PyDsl<PyForStatement, "python">;
1335
+ declare class ForPyDsl extends Mixed$14 {
1336
+ readonly '~dsl' = "ForPyDsl";
1337
+ protected _body?: Array<DoExpr>;
1338
+ protected _else?: Array<DoExpr>;
1339
+ protected _iterable?: MaybePyDsl<py.Expression>;
1340
+ protected _target?: MaybePyDsl<py.Expression>;
1341
+ constructor(target: MaybePyDsl<py.Expression>, iterable: MaybePyDsl<py.Expression>, ...body: Array<DoExpr>);
1342
+ analyze(ctx: AnalysisContext): void;
1343
+ /** Returns true when all required builder calls are present. */
1344
+ get isValid(): boolean;
1345
+ body(...items: Array<DoExpr>): this;
1346
+ else(...items: Array<DoExpr>): this;
1347
+ toAst(): PyForStatement;
1348
+ $validate(): asserts this is this & {
1349
+ _body: Array<DoExpr>;
1350
+ _iterable: MaybePyDsl<py.Expression>;
1351
+ _target: MaybePyDsl<py.Expression>;
1352
+ };
1353
+ private missingRequiredCalls;
1354
+ }
1355
+ //#endregion
1356
+ //#region src/py-dsl/stmt/import.d.ts
1357
+ type ImportName = {
1358
+ alias?: string;
1359
+ name: string;
1360
+ };
1361
+ declare const Mixed$13: abstract new () => PyDsl<PyImportStatement, "python">;
1362
+ declare class ImportPyDsl extends Mixed$13 {
1363
+ readonly '~dsl' = "ImportPyDsl";
1364
+ protected isFrom: boolean;
1365
+ protected module: string;
1366
+ protected names?: ReadonlyArray<ImportName>;
1367
+ constructor(module: string);
1368
+ constructor(module: string, isFrom: boolean);
1369
+ constructor(module: string, names: ReadonlyArray<ImportName>, isFrom: boolean);
1370
+ static from(module: string, names?: ReadonlyArray<ImportName>): ImportPyDsl;
1371
+ static direct(module: string): ImportPyDsl;
1372
+ analyze(_ctx: AnalysisContext): void;
1373
+ toAst(): PyImportStatement;
1374
+ }
1375
+ //#endregion
1376
+ //#region src/py-dsl/stmt/raise.d.ts
1377
+ declare const Mixed$12: abstract new () => PyDsl<PyRaiseStatement, "python">;
1378
+ declare class RaisePyDsl extends Mixed$12 {
1379
+ readonly '~dsl' = "RaisePyDsl";
1380
+ protected _error?: string | MaybePyDsl<py.Expression>;
1381
+ constructor(error?: string | MaybePyDsl<py.Expression>);
1382
+ analyze(ctx: AnalysisContext): void;
1383
+ toAst(): PyRaiseStatement;
1384
+ }
1385
+ //#endregion
1386
+ //#region src/py-dsl/stmt/stmt.d.ts
1387
+ declare const Mixed$11: abstract new () => PyDsl<PyStatement, "python">;
1388
+ declare class StmtPyDsl extends Mixed$11 {
1389
+ readonly '~dsl' = "StmtPyDsl";
1390
+ protected _inner: py.Expression | py.Statement | PyDsl<any>;
1391
+ constructor(inner: py.Expression | py.Statement | PyDsl<any>);
1392
+ analyze(ctx: AnalysisContext): void;
1393
+ toAst(): PyStatement;
1394
+ }
1395
+ //#endregion
1396
+ //#region src/py-dsl/stmt/try.d.ts
1397
+ declare const Mixed$10: abstract new () => PyDsl<PyTryStatement, "python">;
1398
+ type ExceptType = string | MaybePyDsl<py.Expression>;
1399
+ interface ExceptEntry {
1400
+ body: Array<DoExpr>;
1401
+ name?: Ref<NodeName$1>;
1402
+ types: Array<ExceptType>;
1403
+ }
1404
+ declare class TryPyDsl extends Mixed$10 {
1405
+ readonly '~dsl' = "TryPyDsl";
1406
+ /**
1407
+ * Ordered list of except clauses. We also keep a lookup map
1408
+ * (`_exceptIndex`) keyed by the normalised type key so that
1409
+ * repeated `.except()` calls with the same type set merge their
1410
+ * body statements instead of creating duplicate clauses.
1411
+ */
1412
+ protected _excepts: Array<ExceptEntry>;
1413
+ protected _exceptIndex: Map<string, number>;
1414
+ protected _finally?: Array<DoExpr>;
1415
+ protected _try?: Array<DoExpr>;
1416
+ constructor(...tryBlock: Array<DoExpr>);
1417
+ analyze(ctx: AnalysisContext): void;
1418
+ /** Returns true when all required builder calls are present. */
1419
+ get isValid(): boolean;
1420
+ /**
1421
+ * Add (or merge into) an except clause.
1422
+ *
1423
+ * ```ts
1424
+ * $.try(...)
1425
+ * .except('ValueError', 'e', body1, body2) // except ValueError as e:
1426
+ * .except(['TypeError', 'KeyError'], 'e', ...) // except (TypeError, KeyError) as e:
1427
+ * .except('ValueError', moreBody) // merges into first clause
1428
+ * ```
1429
+ *
1430
+ * @param types Single exception type or array of types.
1431
+ * @param nameOrBody Either the `as` variable name (`NodeName`) or the
1432
+ * first body expression. If it looks like a `NodeName` (string that
1433
+ * is a valid Python identifier and is *not* a DSL node), it is treated
1434
+ * as the name; pass body items after it.
1435
+ * @param body Remaining body statements.
1436
+ */
1437
+ except(types: MaybeArray<ExceptType>, nameOrBody?: NodeName$1 | DoExpr, ...body: Array<DoExpr>): this;
1438
+ /** Add a bare `except:` clause (catches everything). */
1439
+ exceptAll(...body: Array<DoExpr>): this;
1440
+ finally(...items: Array<DoExpr>): this;
1441
+ try(...items: Array<DoExpr>): this;
1442
+ toAst(): PyTryStatement;
1443
+ $validate(): asserts this is this & {
1444
+ _try: Array<DoExpr>;
1445
+ };
1446
+ private missingRequiredCalls;
1447
+ /**
1448
+ * Heuristic: a value is a `NodeName` (intended as the `as` variable)
1449
+ * if it is a plain string matching a Python identifier pattern, or a
1450
+ * Symbol.
1451
+ */
1452
+ private _isNodeName;
1453
+ }
1454
+ //#endregion
1455
+ //#region src/py-dsl/stmt/var.d.ts
1456
+ declare const Mixed$9: MixinCtor<abstract new () => PyDsl<PyAssignment, "python">, ValueMethods>;
1457
+ type VarType = NodeName$1 | MaybePyDsl<py.Expression>;
1458
+ declare class VarPyDsl extends Mixed$9 {
1459
+ readonly '~dsl' = "VarPyDsl";
1460
+ readonly nameSanitizer: typeof safeRuntimeName;
1461
+ protected _type?: Ref<VarType>;
1462
+ constructor(name?: NodeName$1);
1463
+ analyze(ctx: AnalysisContext): void;
1464
+ /** Returns true when all required builder calls are present. */
1465
+ get isValid(): boolean;
1466
+ /** Sets the type annotation for the variable. */
1467
+ type(type: VarType): this;
1468
+ toAst(): PyAssignment;
1469
+ $validate(): asserts this;
1470
+ protected $_type(): py.Expression | undefined;
1471
+ private missingRequiredCalls;
1472
+ }
1473
+ //#endregion
1474
+ //#region src/py-dsl/stmt/while.d.ts
1475
+ declare const Mixed$8: abstract new () => PyDsl<PyWhileStatement, "python">;
1476
+ declare class WhilePyDsl extends Mixed$8 {
1477
+ readonly '~dsl' = "WhilePyDsl";
1478
+ protected _body?: Array<DoExpr>;
1479
+ protected _condition?: MaybePyDsl<py.Expression>;
1480
+ protected _else?: Array<DoExpr>;
1481
+ constructor(condition: MaybePyDsl<py.Expression>, ...body: Array<DoExpr>);
1482
+ analyze(ctx: AnalysisContext): void;
1483
+ /** Returns true when all required builder calls are present. */
1484
+ get isValid(): boolean;
1485
+ body(...items: Array<DoExpr>): this;
1486
+ else(...items: Array<DoExpr>): this;
1487
+ toAst(): PyWhileStatement;
1488
+ $validate(): asserts this is this & {
1489
+ _body: Array<DoExpr>;
1490
+ _condition: MaybePyDsl<py.Expression>;
1491
+ };
1492
+ private missingRequiredCalls;
1493
+ }
1494
+ //#endregion
1495
+ //#region src/py-dsl/stmt/with.d.ts
1496
+ declare const Mixed$7: abstract new () => PyDsl<PyWithStatement, "python">;
1497
+ type WithItemInput = MaybePyDsl<py.Expression> | {
1498
+ alias?: MaybePyDsl<py.Expression>;
1499
+ context: MaybePyDsl<py.Expression>;
1500
+ };
1501
+ declare class WithPyDsl extends Mixed$7 {
1502
+ readonly '~dsl' = "WithPyDsl";
1503
+ protected _body?: Array<DoExpr>;
1504
+ protected _items: Array<WithItemInput>;
1505
+ protected _modifier?: MaybePyDsl<py.Expression>;
1506
+ constructor(...items: Array<WithItemInput>);
1507
+ analyze(ctx: AnalysisContext): void;
1508
+ /** Returns true when all required builder calls are present. */
1509
+ get isValid(): boolean;
1510
+ body(...items: Array<DoExpr>): this;
1511
+ item(item: WithItemInput): this;
1512
+ modifier(expr: MaybePyDsl<py.Expression>): this;
1513
+ async(): this;
1514
+ toAst(): PyWithStatement;
1515
+ $validate(): asserts this is this & {
1516
+ _body: Array<DoExpr>;
1517
+ };
1518
+ private missingRequiredCalls;
1519
+ }
1520
+ //#endregion
1521
+ //#region src/py-dsl/type/or.d.ts
1522
+ declare const Mixed$6: abstract new () => PyDsl<PyExpression, "python">;
1523
+ type Type$1 = NodeName$1 | MaybePyDsl<py.Expression>;
1524
+ declare class TypeOrPyDsl extends Mixed$6 {
1525
+ readonly '~dsl' = "TypeOrPyDsl";
1526
+ scope: NodeScope;
1527
+ protected _types: Array<Ref<Type$1>>;
1528
+ private _decision?;
1529
+ constructor(...nodes: Array<Type$1>);
1530
+ analyze(ctx: AnalysisContext): void;
1531
+ types(...nodes: Array<Type$1>): this;
1532
+ toAst(): any;
1533
+ $validate(): asserts this;
1534
+ private $flatten;
1535
+ private $flattenRefs;
1536
+ }
1537
+ //#endregion
1538
+ //#region src/py-dsl/type/tuple.d.ts
1539
+ declare const Mixed$5: abstract new () => PyDsl<PyExpression, "python">;
1540
+ type Type = NodeName$1 | MaybePyDsl<py.Expression>;
1541
+ declare class TypeTuplePyDsl extends Mixed$5 {
1542
+ readonly '~dsl' = "TypeTuplePyDsl";
1543
+ scope: NodeScope;
1544
+ protected _items: Array<Ref<Type>>;
1545
+ private _decision?;
1546
+ constructor(...nodes: Array<Type>);
1547
+ analyze(ctx: AnalysisContext): void;
1548
+ items(...nodes: Array<Type>): this;
1549
+ toAst(): any;
1550
+ $validate(): asserts this;
1551
+ private $flatten;
1552
+ private $flattenRefs;
1553
+ }
1554
+ //#endregion
1555
+ //#region src/py-dsl/index.d.ts
1556
+ declare const $$1: ((id: any) => ExprPyDsl) & {
1557
+ /** Creates an array literal expression (e.g., `[1, 2, 3]`). */
1558
+ /** Creates an `as` type assertion expression (e.g., `value as Type`). */
1559
+ /** Creates a property access expression (e.g., `obj.foo`). */
1560
+ attr: (left: any, right: NodeName$1) => AttrPyDsl;
1561
+ /** Creates an await expression (e.g., `await promise`). */
1562
+ /** Creates a binary expression (e.g., `a + b`). */
1563
+ binary: (left: PyExpression | PyDsl<PyExpression, "python">, op: PyBinaryOperator, right: PyExpression | PyDsl<PyExpression, "python">) => BinaryPyDsl; /** Creates a statement block. */
1564
+ block: (...args: ConstructorParameters<typeof BlockPyDsl>) => BlockPyDsl; /** Creates a break statement. */
1565
+ break: () => BreakPyDsl; /** Creates a function or method call expression (e.g., `fn(arg)`). */
1566
+ call: (callee: any, ...args: any[]) => CallPyDsl; /** Creates a class declaration or expression. */
1567
+ class: (name: NodeName$1) => ClassPyDsl; /** Creates a continue statement. */
1568
+ continue: () => ContinuePyDsl;
1569
+ /** Creates a decorator expression (e.g., `@decorator`). */
1570
+ /** Creates a dictionary expression (e.g., `{ 'a': 1 }`). */
1571
+ dict: (...args: ConstructorParameters<typeof DictPyDsl>) => DictPyDsl; /** Creates a Python docstring (`"""..."""`). */
1572
+ doc: (lines?: DocLines | undefined, fn?: DocFn | undefined) => DocPyDsl; /** Creates an enum declaration. */
1573
+ enum: (name: NodeName$1) => EnumPyDsl; /** Creates a general expression node. */
1574
+ expr: (id: any) => ExprPyDsl; /** Creates a field declaration in a class body. */
1575
+ field: (name?: any) => FieldPyDsl; /** Creates a for statement (e.g., `for x in items:`). */
1576
+ for: (target: PyExpression | PyDsl<PyExpression, "python">, iterable: PyExpression | PyDsl<PyExpression, "python">, ...body: (PyExpression | PyStatement | PyDsl<PyExpression | PyStatement, "python">)[]) => ForPyDsl;
1577
+ /** Converts a runtime value into a corresponding expression node. */
1578
+ /** Creates a function declaration. */
1579
+ func: {
1580
+ (name: NodeName$1): FuncPyDsl;
1581
+ (name: NodeName$1, fn: (f: FuncPyDsl) => void): FuncPyDsl;
1582
+ };
1583
+ /** Creates a getter method declaration. */
1584
+ /** Creates a Python comment (`# ...`). */
1585
+ hint: (lines?: HintLines | undefined, fn?: HintFn | undefined) => HintPyDsl; /** Creates an identifier (e.g., `foo`). */
1586
+ id: (name: NodeName$1) => IdPyDsl; /** Creates an if statement. */
1587
+ if: (condition?: IfCondition | undefined) => IfPyDsl; /** Creates an import statement. */
1588
+ import: (module: string, names: readonly {
1589
+ alias?: string;
1590
+ name: string;
1591
+ }[], isFrom: boolean) => ImportPyDsl;
1592
+ /** Creates an initialization block or statement. */
1593
+ /** Creates a keyword argument expression (e.g., `name=value`). */
1594
+ kwarg: (name: NodeName$1, value: KwargValue) => KwargPyDsl; /** Creates a lazy, context-aware node with deferred evaluation. */
1595
+ lazy: <T extends py.Node>(thunk: LazyThunk<T>) => LazyPyDsl<T>; /** Creates a list expression (e.g., `[1, 2, 3]`). */
1596
+ list: (...args: ConstructorParameters<typeof ListPyDsl>) => ListPyDsl; /** Creates a literal value (e.g., string, number, boolean). */
1597
+ literal: (value: PyLiteralValue) => LiteralPyDsl;
1598
+ /** Creates an enum member declaration. */
1599
+ /** Creates a method declaration in a class body. */
1600
+ method: {
1601
+ (name: NodeName$1): MethodPyDsl;
1602
+ (name: NodeName$1, fn: (f: MethodPyDsl) => void): MethodPyDsl;
1603
+ };
1604
+ /** Creates a negation expression (`-x`). */
1605
+ /** Creates a new expression (e.g., `new ClassName()`). */
1606
+ /** Creates a newline (for formatting purposes). */
1607
+ newline: () => NewlinePyDsl;
1608
+ /** Creates a logical NOT expression (`!x`). */
1609
+ /** Creates an object literal expression. */
1610
+ /** Creates a parameter declaration for functions or methods. */
1611
+ param: (name: any, fn?: ParamFn | undefined) => ParamPyDsl;
1612
+ /** Creates a pattern for destructuring or matching. */
1613
+ /** Creates a prefix unary expression (e.g., `-x`, `!x`, `~x`). */
1614
+ /** Creates an object literal property (e.g., `{ foo: bar }`). */
1615
+ /** Creates a raise statement. */
1616
+ raise: (error?: string | PyExpression | PyDsl<PyExpression, "python"> | undefined) => RaisePyDsl;
1617
+ /** Creates a regular expression literal (e.g., `/foo/gi`). */
1618
+ /** Creates a return statement. */
1619
+ return: (expr?: any) => ReturnPyDsl; /** Creates a set expression (e.g., `{1, 2, 3}`). */
1620
+ set: (...args: ConstructorParameters<typeof SetPyDsl>) => SetPyDsl;
1621
+ /** Creates a setter method declaration. */
1622
+ /** Wraps an expression or statement-like value into a `StmtPyDsl`. */
1623
+ stmt: (inner: PyExpression | PyStatement | PyDsl<any, "python">) => StmtPyDsl; /** Creates a subscript expression (e.g., `obj[index]` or `Type[Param]`). */
1624
+ subscript: (value: any, ...slices: any[]) => SubscriptPyDsl;
1625
+ /** Creates a template literal expression. */
1626
+ /** Creates a ternary conditional expression (if ? then : else). */
1627
+ /** Creates a syntax token (e.g., `?`, `readonly`, `+`, `-`). */
1628
+ /** Creates a try/except/finally statement. */
1629
+ try: (...args: ConstructorParameters<typeof TryPyDsl>) => TryPyDsl; /** Creates a tuple expression (e.g., `(1, 2, 3)`). */
1630
+ tuple: (...args: ConstructorParameters<typeof TuplePyDsl>) => TuplePyDsl; /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */
1631
+ type: {
1632
+ /** Creates a type alias declaration (e.g., `type Foo = Bar`). */
1633
+ /** Creates an intersection type (e.g., `A & B`). */
1634
+ /** Creates a qualified type reference (e.g., Foo.Bar). */
1635
+ /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */
1636
+ /** Converts a runtime value into a corresponding type expression node. */
1637
+ /** Creates a function type node (e.g., `(a: string) => number`). */
1638
+ /** Creates an indexed-access type (e.g., `Foo<T>[K]`). */
1639
+ /** Creates a literal type node (e.g., 'foo', 42, or true). */
1640
+ /** Creates a mapped type (e.g., `{ [K in keyof T]: U }`). */
1641
+ /** Creates a type literal node (e.g., { foo: string }). */
1642
+ /** Creates a type operator node (e.g., `readonly T`, `keyof T`, `unique T`). */
1643
+ /** Creates a union type (e.g., `A | B | C`). */
1644
+ or: (...args: ConstructorParameters<typeof TypeOrPyDsl>) => TypeOrPyDsl;
1645
+ /** Creates a type parameter (e.g., `<T>`). */
1646
+ /** Creates a type query node (e.g., `typeof Foo`). */
1647
+ /** Builds a TypeScript template literal *type* (e.g., `${Foo}-${Bar}` as a type). */
1648
+ /** Creates a tuple type (e.g., [A, B, C]). */
1649
+ tuple: (...args: ConstructorParameters<typeof TypeTuplePyDsl>) => TypeTuplePyDsl;
1650
+ };
1651
+ /** Creates a `typeof` expression (e.g., `typeof value`). */
1652
+ /** Creates a variable assignment. */
1653
+ var: (name?: any) => VarPyDsl; /** Creates a while statement (e.g., `while x:`). */
1654
+ while: (condition: PyExpression | PyDsl<PyExpression, "python">, ...body: (PyExpression | PyStatement | PyDsl<PyExpression | PyStatement, "python">)[]) => WhilePyDsl; /** Creates a with statement (e.g., `with open(f) as file:`). */
1655
+ with: (...args: ConstructorParameters<typeof WithPyDsl>) => WithPyDsl;
1656
+ };
1657
+ type DollarPyDsl = {
1658
+ /**
1659
+ * Entry point to the Python DSL.
1660
+ *
1661
+ * `$` creates a general expression node by default, but also exposes
1662
+ * builders for all other constructs.
1663
+ *
1664
+ * Example:
1665
+ * ```ts
1666
+ * const node = $('console').attr('log').call($.literal('Hello'));
1667
+ * ```
1668
+ *
1669
+ * Returns:
1670
+ * - A new `ExprPyDsl` instance when called directly.
1671
+ * - The `pyDsl` object for constructing more specific nodes.
1672
+ */
1673
+ $: typeof $$1;
1674
+ };
1675
+ //#endregion
1676
+ //#region src/plugins/@hey-api/sdk/examples.d.ts
1677
+ type UserExamplesConfig = Omit<ExampleOptions, 'payload'> & {
1678
+ /**
1679
+ * Whether this feature is enabled.
1680
+ *
1681
+ * @default true
1682
+ */
1683
+ enabled?: boolean;
1684
+ /**
1685
+ * The programming language for the generated examples.
1686
+ *
1687
+ * This is used to display the language label in code blocks in
1688
+ * documentation UIs.
1689
+ *
1690
+ * @default 'Python'
1691
+ */
1692
+ language?: LinguistLanguages;
1693
+ /**
1694
+ * Example request payload.
1695
+ */
1696
+ payload?: MaybeFunc<(operation: IR$1.OperationObject, ctx: DollarPyDsl) => CallArgs | CallArgs[number]>;
1697
+ /**
1698
+ * Transform the generated example string.
1699
+ *
1700
+ * @param example The generated example string.
1701
+ * @param operation The operation the example was generated for.
1702
+ * @returns The final example string.
1703
+ */
1704
+ transform?: (example: string, operation: IR$1.OperationObject) => string;
1705
+ };
1706
+ type ExamplesConfig = Omit<ExampleOptions, 'payload'> & FeatureToggle & {
1707
+ /**
1708
+ * The programming language for the generated examples.
1709
+ *
1710
+ * This is used to display the language label in code blocks in
1711
+ * documentation UIs.
1712
+ */
1713
+ language: LinguistLanguages;
1714
+ /**
1715
+ * Example request payload.
1716
+ */
1717
+ payload?: MaybeFunc<(operation: IR$1.OperationObject, ctx: DollarPyDsl) => CallArgs | CallArgs[number]>;
1718
+ /**
1719
+ * Transform the generated example string.
1720
+ *
1721
+ * @param example The generated example string.
1722
+ * @param operation The operation the example was generated for.
1723
+ * @returns The final example string.
1724
+ */
1725
+ transform?: (example: string, operation: IR$1.OperationObject) => string;
1726
+ };
1727
+ //#endregion
1728
+ //#region src/plugins/@hey-api/sdk/imports.d.ts
1729
+ declare function sdkImports(plugin: PluginInstance$1): {
1730
+ Client: any;
1731
+ buildClientParams: any;
1732
+ funcTools: {
1733
+ cachedProperty: any;
1734
+ };
1735
+ typing: {
1736
+ Annotated: any;
1737
+ Any: any;
1738
+ Literal: any;
1739
+ NoReturn: any;
1740
+ Optional: any;
1741
+ Tuple: any;
1742
+ TypeAlias: any;
1743
+ Union: any;
1744
+ };
1745
+ };
1746
+ type SdkImports = ReturnType<typeof sdkImports>;
1747
+ //#endregion
1748
+ //#region src/plugins/@hey-api/sdk/operations/types.d.ts
1749
+ interface UserOperationsConfig {
1750
+ /**
1751
+ * Type of container for grouped operations.
1752
+ *
1753
+ * Ignored when `strategy` is `'flat'`.
1754
+ *
1755
+ * - `'class'` - Class with methods
1756
+ *
1757
+ * @default 'class'
1758
+ */
1759
+ container?: 'class';
1760
+ /**
1761
+ * Customize container names.
1762
+ *
1763
+ * For `'single'` strategy, this sets the root container name.
1764
+ * For `'byTags'` strategy, this transforms tag names.
1765
+ *
1766
+ * @default 'Sdk' for `'single'` strategy
1767
+ *
1768
+ * @example
1769
+ * // Set root name for single strategy
1770
+ * containerName: 'MyApi'
1771
+ *
1772
+ * @example
1773
+ * // Transform tag names with suffix
1774
+ * containerName: '{{name}}Service'
1775
+ *
1776
+ * @example
1777
+ * // With casing
1778
+ * containerName: { name: '{{name}}Service', casing: 'PascalCase' }
1779
+ */
1780
+ containerName?: NamingRule;
1781
+ /**
1782
+ * Customize method/function names.
1783
+ *
1784
+ * Applied to the final segment of the path (the method name).
1785
+ */
1786
+ methodName?: NamingRule;
1787
+ /**
1788
+ * How methods are attached to class containers.
1789
+ *
1790
+ * Only applies when `container` is `'class'`.
1791
+ *
1792
+ * - `'instance'` - Instance methods, requires `new ClassName(config)`
1793
+ *
1794
+ * @default 'instance'
1795
+ */
1796
+ methods?: 'instance';
1797
+ /**
1798
+ * How to derive nesting structure from operations.
1799
+ *
1800
+ * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)
1801
+ * - `'id'` - Use operation id as-is, no nesting
1802
+ * - Custom function for full control
1803
+ *
1804
+ * @default 'operationId'
1805
+ */
1806
+ nesting?: 'operationId' | 'id' | OperationPathStrategy;
1807
+ /**
1808
+ * Delimiters for splitting operationId.
1809
+ *
1810
+ * Only applies when `nesting` is `'operationId'`.
1811
+ *
1812
+ * @default /[./]/
1813
+ */
1814
+ nestingDelimiters?: RegExp;
1815
+ /**
1816
+ * Customize nesting segment names.
1817
+ *
1818
+ * Applied to intermediate path segments (not the method name).
1819
+ */
1820
+ segmentName?: NamingRule;
1821
+ /**
1822
+ * Grouping strategy.
1823
+ *
1824
+ * - `'byTags'` - One container per operation tag
1825
+ * - `'single'` - All operations in one container
1826
+ * - Custom function for full control
1827
+ *
1828
+ * @default 'single'
1829
+ */
1830
+ strategy?: Exclude<OperationsStrategy, 'flat'>;
1831
+ /**
1832
+ * Default container name for operations without tags.
1833
+ *
1834
+ * Only applies when `strategy` is `'byTags'`.
1835
+ *
1836
+ * @default 'default'
1837
+ */
1838
+ strategyDefaultTag?: string;
1839
+ }
1840
+ interface OperationsConfig {
1841
+ /**
1842
+ * Type of container for grouped operations.
1843
+ *
1844
+ * Ignored when `strategy` is `'flat'`.
1845
+ *
1846
+ * - `'class'` - Class with methods
1847
+ */
1848
+ container: 'class';
1849
+ /**
1850
+ * Customize container names.
1851
+ *
1852
+ * For `'single'` strategy, this sets the root container name.
1853
+ * For `'byTags'` strategy, this transforms tag names.
1854
+ *
1855
+ * @default 'Sdk' for `'single'` strategy
1856
+ *
1857
+ * @example
1858
+ * // Set root name for single strategy
1859
+ * containerName: 'MyApi'
1860
+ *
1861
+ * @example
1862
+ * // Transform tag names with suffix
1863
+ * containerName: '{{name}}Service'
1864
+ *
1865
+ * @example
1866
+ * // With casing
1867
+ * containerName: { name: '{{name}}Service', case: 'PascalCase' }
1868
+ */
1869
+ containerName: NamingConfig;
1870
+ /**
1871
+ * Customize method/function names.
1872
+ *
1873
+ * Applied to the final segment of the path (the method name).
1874
+ */
1875
+ methodName: NamingConfig;
1876
+ /**
1877
+ * How methods are attached to class containers.
1878
+ *
1879
+ * Only applies when `container` is `'class'`.
1880
+ *
1881
+ * - `'instance'` - Instance methods, requires `new ClassName(config)`
1882
+ */
1883
+ methods: 'instance';
1884
+ /**
1885
+ * How to derive nesting structure from operations.
1886
+ *
1887
+ * - `'operationId'` - Split operationId by delimiters (e.g., `users.list` → `Users.list()`)
1888
+ * - `'id'` - Use operation id as-is, no nesting
1889
+ * - Custom function for full control
1890
+ */
1891
+ nesting: 'operationId' | 'id' | OperationPathStrategy;
1892
+ /**
1893
+ * Delimiters for splitting operationId.
1894
+ *
1895
+ * Only applies when `nesting` is `'operationId'`.
1896
+ */
1897
+ nestingDelimiters: RegExp;
1898
+ /**
1899
+ * Customize nesting segment names.
1900
+ *
1901
+ * Applied to intermediate path segments (not the method name).
1902
+ */
1903
+ segmentName: NamingConfig;
1904
+ /**
1905
+ * Grouping strategy.
1906
+ *
1907
+ * - `'byTags'` - One container per operation tag
1908
+ * - `'single'` - All operations in one container
1909
+ * - Custom function for full control
1910
+ */
1911
+ strategy: Exclude<OperationsStrategy, 'flat'>;
1912
+ /**
1913
+ * Default container name for operations without tags.
1914
+ *
1915
+ * Only applies when `strategy` is `'byTags'`.
1916
+ */
1917
+ strategyDefaultTag: string;
1918
+ }
1919
+ //#endregion
1920
+ //#region src/plugins/@hey-api/sdk/types.d.ts
1921
+ type UserConfig$2 = Plugin$1.Name<'@hey-api/python-sdk'> & Plugin$1.Hooks & Plugin$1.UserComments & Plugin$1.UserExports & {
1922
+ /**
1923
+ * Use an internal client instance to send HTTP requests? This is useful if
1924
+ * you don't want to manually pass the client to each SDK function.
1925
+ *
1926
+ * You can customize the selected client output through its plugin. You can
1927
+ * also set `client` to `true` to automatically choose the client from your
1928
+ * defined plugins. If we can't detect a client plugin when using `true`, we
1929
+ * will default to `@hey-api/client-httpx`.
1930
+ *
1931
+ * @default true
1932
+ */
1933
+ client?: PluginClientNames | boolean;
1934
+ /**
1935
+ * Generate code examples for SDK operations and attach them to the
1936
+ * input source (e.g., via `x-codeSamples`).
1937
+ *
1938
+ * Set to `false` to disable example generation entirely, or provide an
1939
+ * object for fine-grained control over the output and post-processing.
1940
+ *
1941
+ * @default false
1942
+ */
1943
+ examples?: boolean | UserExamplesConfig;
1944
+ /**
1945
+ * Define the structure of generated SDK operations.
1946
+ *
1947
+ * String shorthand:
1948
+ * - `'byTags'` – one container per operation tag
1949
+ * - `'single'` – all operations in a single container
1950
+ * - custom function for full control
1951
+ *
1952
+ * Use the object form for advanced configuration.
1953
+ *
1954
+ * @default 'single'
1955
+ */
1956
+ operations?: Exclude<OperationsStrategy, 'flat'> | UserOperationsConfig;
1957
+ /**
1958
+ * Define how request parameters are structured in generated SDK methods.
1959
+ *
1960
+ * - `'flat'` merges parameters into a single object.
1961
+ * - `'grouped'` separates parameters by transport layer.
1962
+ *
1963
+ * Use `'flat'` for simpler calls or `'grouped'` for stricter typing and code clarity.
1964
+ *
1965
+ * @default 'grouped'
1966
+ */
1967
+ paramsStructure?: 'flat' | 'grouped';
1968
+ };
1969
+ type Config$1 = Plugin$1.Name<'@hey-api/python-sdk'> & Plugin$1.Hooks & Plugin$1.Comments & Plugin$1.Exports & {
1970
+ /**
1971
+ * Use an internal client instance to send HTTP requests? This is useful if
1972
+ * you don't want to manually pass the client to each SDK function.
1973
+ *
1974
+ * You can customize the selected client output through its plugin. You can
1975
+ * also set `client` to `true` to automatically choose the client from your
1976
+ * defined plugins. If we can't detect a client plugin when using `true`, we
1977
+ * will default to `@hey-api/client-httpx`.
1978
+ *
1979
+ * @default true
1980
+ */
1981
+ client: PluginClientNames | false;
1982
+ /**
1983
+ * Configuration for generating SDK code examples.
1984
+ */
1985
+ examples: ExamplesConfig;
1986
+ /**
1987
+ * Define the structure of generated SDK operations.
1988
+ */
1989
+ operations: OperationsConfig;
1990
+ /**
1991
+ * Define how request parameters are structured in generated SDK methods.
1992
+ *
1993
+ * - `'flat'` merges parameters into a single object.
1994
+ * - `'grouped'` separates parameters by transport layer.
1995
+ *
1996
+ * Use `'flat'` for simpler calls or `'grouped'` for stricter typing and code clarity.
1997
+ *
1998
+ * @default 'grouped'
1999
+ */
2000
+ paramsStructure: 'flat' | 'grouped';
2001
+ };
2002
+ type HeyApiSdkPlugin = DefinePlugin$2<UserConfig$2, Config$1, never, SdkImports>;
2003
+ //#endregion
2004
+ //#region src/plugins/pydantic/imports.d.ts
2005
+ declare function pydanticImports(plugin: PluginInstance$1): {
2006
+ datetime: {
2007
+ date: any;
2008
+ datetime: any;
2009
+ time: any;
2010
+ timedelta: any;
2011
+ };
2012
+ enum: {
2013
+ Enum: any;
2014
+ IntEnum: any;
2015
+ StrEnum: any;
2016
+ };
2017
+ typing: {
2018
+ Annotated: any;
2019
+ Any: any;
2020
+ Literal: any;
2021
+ NoReturn: any;
2022
+ Optional: any;
2023
+ Tuple: any;
2024
+ TypeAlias: any;
2025
+ Union: any;
2026
+ };
2027
+ uuid: {
2028
+ UUID: any;
2029
+ };
2030
+ AnyUrl: any;
2031
+ BaseModel: any;
2032
+ ConfigDict: any;
2033
+ EmailStr: any;
2034
+ Field: any;
2035
+ RootModel: any;
2036
+ dataclass: any;
2037
+ };
2038
+ type PydanticImports = ReturnType<typeof pydanticImports>;
2039
+ //#endregion
2040
+ //#region src/plugins/pydantic/dsl/decl/enum.d.ts
2041
+ declare const Mixed$4: MixinCtor<abstract new () => PyDsl<PyClassDeclaration, "python">, DocMethods>;
2042
+ declare class PydanticEnumDsl extends Mixed$4 {
2043
+ readonly '~dsl' = "PydanticEnumDsl";
2044
+ private _dsl?;
2045
+ private _members;
2046
+ constructor(name: NodeName$1);
2047
+ members(...members: ReadonlyArray<EnumMember>): this;
2048
+ _build(): ReturnType<typeof $$1.enum>;
2049
+ analyze(ctx: AnalysisContext): void;
2050
+ toAst(): PyClassDeclaration;
2051
+ }
2052
+ //#endregion
2053
+ //#region src/py-dsl/mixins/optional.d.ts
2054
+ interface OptionalMethods extends Node$1 {
2055
+ _optional?: boolean;
2056
+ /** Marks the node as optional when the condition is true. */
2057
+ optional(condition?: boolean): this;
2058
+ /** Marks the node as required when the condition is true. */
2059
+ required(condition?: boolean): this;
2060
+ }
2061
+ //#endregion
2062
+ //#region src/plugins/pydantic/dsl/expr/constraints.d.ts
2063
+ interface PydanticFieldConstraints {
2064
+ description?: string;
2065
+ /** Greater than or equal constraint for numbers. */
2066
+ ge?: number;
2067
+ /** Greater than constraint for numbers. */
2068
+ gt?: number;
2069
+ /** Less than or equal constraint for numbers. */
2070
+ le?: number;
2071
+ /** Less than constraint for numbers. */
2072
+ lt?: number;
2073
+ /** Maximum length constraint for strings/arrays. */
2074
+ max_length?: number;
2075
+ /** Minimum length constraint for strings/arrays. */
2076
+ min_length?: number;
2077
+ /** Multiple of constraint for numbers. */
2078
+ multiple_of?: number;
2079
+ /** Regex pattern constraint for strings. */
2080
+ pattern?: RString;
2081
+ title?: string;
2082
+ }
2083
+ declare class PydanticConstraintsDsl {
2084
+ readonly '~dsl' = "PydanticConstraintsDsl";
2085
+ private _values;
2086
+ get hasValidationConstraints(): boolean;
2087
+ get isEmpty(): boolean;
2088
+ get values(): Readonly<PydanticFieldConstraints>;
2089
+ description(text: string): this;
2090
+ ge(n: number): this;
2091
+ gt(n: number): this;
2092
+ le(n: number): this;
2093
+ lt(n: number): this;
2094
+ maxLength(n: number): this;
2095
+ merge(other: PydanticConstraintsDsl): PydanticConstraintsDsl;
2096
+ minLength(n: number): this;
2097
+ multipleOf(n: number): this;
2098
+ pattern(p: string): this;
2099
+ title(text: string): this;
2100
+ }
2101
+ //#endregion
2102
+ //#region src/plugins/pydantic/dsl/expr/constrained-type.d.ts
2103
+ declare class PydanticConstrainedTypeDsl {
2104
+ readonly '~dsl' = "PydanticConstrainedTypeDsl";
2105
+ readonly constraints: PydanticConstraintsDsl;
2106
+ readonly type: NodeName$1 | MaybePyDsl<py.Expression>;
2107
+ constructor(type: NodeName$1 | MaybePyDsl<py.Expression>, constraints?: PydanticConstraintsDsl);
2108
+ mergeConstraints(constraints: PydanticConstraintsDsl): this;
2109
+ }
2110
+ //#endregion
2111
+ //#region src/plugins/pydantic/dsl/decl/field.d.ts
2112
+ declare const Mixed$3: MixinCtor<abstract new () => PyDsl<PyStatement, "python">, OptionalMethods>;
2113
+ declare class PydanticFieldDsl extends Mixed$3 {
2114
+ readonly '~dsl' = "PydanticFieldDsl";
2115
+ protected plugin: PydanticPlugin['Instance'];
2116
+ private _decision?;
2117
+ private _fieldArgs?;
2118
+ private _pythonName;
2119
+ private _wireName;
2120
+ private _alias?;
2121
+ private _default;
2122
+ private _defaultFactory?;
2123
+ private _deprecated?;
2124
+ private _discriminator?;
2125
+ private _dsl?;
2126
+ private _constrainedType?;
2127
+ private _nullable?;
2128
+ private _unionMembers?;
2129
+ constructor(plugin: PydanticPlugin['Instance'], name: string);
2130
+ get hasAlias(): boolean;
2131
+ alias(name: string): this;
2132
+ default(value: unknown): this;
2133
+ defaultFactory(factory: string): this;
2134
+ deprecated(value: boolean): this;
2135
+ discriminator(field: string): this;
2136
+ metadata(constrainedType: PydanticConstrainedTypeDsl): this;
2137
+ nullable(value: boolean): this;
2138
+ type(constrainedType: PydanticConstrainedTypeDsl | Array<PydanticConstrainedTypeDsl>): this;
2139
+ private _buildUnionVarType;
2140
+ private _constraintsToKwargs;
2141
+ _build(): ReturnType<typeof $$1.field>;
2142
+ analyze(ctx: AnalysisContext): void;
2143
+ toAst(): PyAssignment;
2144
+ }
2145
+ //#endregion
2146
+ //#region src/plugins/pydantic/shared/types.d.ts
2147
+ /** Return type for toType converters. */
2148
+ interface PydanticType {
2149
+ /** Discriminator property name, present when this type is a discriminated union. */
2150
+ discriminator?: string;
2151
+ /** Pre-resolved node. */
2152
+ node?: PydanticNode;
2153
+ type?: ReturnType<typeof $.constrainedType>;
2154
+ /** Per-member constrained types for union fields. Present only on union results. */
2155
+ unionMembers?: Array<ReturnType<typeof $.constrainedType>>;
2156
+ }
2157
+ /** Metadata that flows through schema walking. */
2158
+ interface PydanticMeta {
2159
+ /** Default value from schema. */
2160
+ default?: unknown;
2161
+ /** Whether this or any child contains a forward reference. */
2162
+ hasForwardReference: boolean;
2163
+ /** Does this schema explicitly allow null? */
2164
+ nullable: boolean;
2165
+ /** Is this schema read-only? */
2166
+ readonly: boolean;
2167
+ }
2168
+ /** Result from walking a schema node. */
2169
+ interface PydanticResult extends PydanticType {
2170
+ meta: PydanticMeta;
2171
+ }
2172
+ interface PydanticModelConfig {
2173
+ extra?: 'allow' | 'forbid' | 'ignore';
2174
+ populate_by_name?: boolean;
2175
+ }
2176
+ /** Discriminated union of all finalized schema outputs. */
2177
+ type PydanticNode = {
2178
+ kind: 'alias';
2179
+ type: ReturnType<typeof $.constrainedType>;
2180
+ } | {
2181
+ kind: 'enum';
2182
+ members: Array<EnumMember>;
2183
+ } | {
2184
+ config?: PydanticModelConfig;
2185
+ fields: Array<ReturnType<typeof $.field>>;
2186
+ kind: 'model';
2187
+ } | {
2188
+ discriminator?: string;
2189
+ kind: 'rootModel';
2190
+ type: ReturnType<typeof $.constrainedType>;
2191
+ };
2192
+ //#endregion
2193
+ //#region src/plugins/pydantic/dsl/decl/model.d.ts
2194
+ declare const Mixed$2: MixinCtor<abstract new () => PyDsl<PyClassDeclaration, "python">, DocMethods>;
2195
+ declare class PydanticModelDsl extends Mixed$2 {
2196
+ readonly '~dsl' = "PydanticModelDsl";
2197
+ protected plugin: PydanticPlugin['Instance'];
2198
+ private _bases;
2199
+ private _configKwargs;
2200
+ private _dsl?;
2201
+ private _fields;
2202
+ constructor(plugin: PydanticPlugin['Instance'], name: NodeName$1);
2203
+ config(options: PydanticModelConfig): this;
2204
+ extends(base: NodeName$1): this;
2205
+ fields(...fields: ReadonlyArray<PydanticFieldDsl>): this;
2206
+ _build(): ReturnType<typeof $$1.class>;
2207
+ analyze(ctx: AnalysisContext): void;
2208
+ toAst(): PyClassDeclaration;
2209
+ }
2210
+ //#endregion
2211
+ //#region src/plugins/pydantic/dsl/decl/root-model.d.ts
2212
+ declare const Mixed$1: MixinCtor<abstract new () => PyDsl<PyClassDeclaration, "python">, DocMethods>;
2213
+ declare class PydanticRootModelDsl extends Mixed$1 {
2214
+ readonly '~dsl' = "PydanticRootModelDsl";
2215
+ protected plugin: PydanticPlugin['Instance'];
2216
+ private _discriminator?;
2217
+ private _dsl?;
2218
+ private _type?;
2219
+ constructor(plugin: PydanticPlugin['Instance'], name: NodeName$1);
2220
+ type(constrainedType: PydanticConstrainedTypeDsl): this;
2221
+ discriminator(field: string): this;
2222
+ _build(): ReturnType<typeof $$1.class>;
2223
+ analyze(ctx: AnalysisContext): void;
2224
+ toAst(): PyClassDeclaration;
2225
+ }
2226
+ //#endregion
2227
+ //#region src/plugins/pydantic/dsl/decl/type-alias.d.ts
2228
+ declare const Mixed: abstract new () => PyDsl<PyStatement, "python">;
2229
+ declare class PydanticTypeAliasDsl extends Mixed {
2230
+ readonly '~dsl' = "PydanticTypeAliasDsl";
2231
+ readonly aliased?: PydanticConstrainedTypeDsl;
2232
+ protected plugin: PydanticPlugin['Instance'];
2233
+ private _dsl?;
2234
+ constructor(plugin: PydanticPlugin['Instance'], name: NodeName$1, aliased?: PydanticConstrainedTypeDsl);
2235
+ _build(): ReturnType<typeof $$1.var>;
2236
+ analyze(ctx: AnalysisContext): void;
2237
+ toAst(): PyAssignment;
2238
+ }
2239
+ //#endregion
2240
+ //#region src/plugins/pydantic/dsl/index.d.ts
2241
+ declare const $: ((plugin: DefinePlugin<any, any, never, {
2242
+ datetime: {
2243
+ date: any;
2244
+ datetime: any;
2245
+ time: any;
2246
+ timedelta: any;
2247
+ };
2248
+ enum: {
2249
+ Enum: any;
2250
+ IntEnum: any;
2251
+ StrEnum: any;
2252
+ };
2253
+ typing: {
2254
+ Annotated: any;
2255
+ Any: any;
2256
+ Literal: any;
2257
+ NoReturn: any;
2258
+ Optional: any;
2259
+ Tuple: any;
2260
+ TypeAlias: any;
2261
+ Union: any;
2262
+ };
2263
+ uuid: {
2264
+ UUID: any;
2265
+ };
2266
+ AnyUrl: any;
2267
+ BaseModel: any;
2268
+ ConfigDict: any;
2269
+ EmailStr: any;
2270
+ Field: any;
2271
+ RootModel: any;
2272
+ dataclass: any;
2273
+ }>, name: NodeName) => PydanticModelDsl) & {
2274
+ /** Constrained type: a type with attached validation constraints and metadata. */constrainedType: (type: any, constraints?: PydanticConstraintsDsl | undefined) => PydanticConstrainedTypeDsl; /** Constraints bag: validation constraints and field metadata. */
2275
+ constraints: () => PydanticConstraintsDsl; /** Pydantic enum class. */
2276
+ enum: (name: NodeName) => PydanticEnumDsl; /** Pydantic field. */
2277
+ field: (plugin: DefinePlugin<any, any, never, {
2278
+ datetime: {
2279
+ date: any;
2280
+ datetime: any;
2281
+ time: any;
2282
+ timedelta: any;
2283
+ };
2284
+ enum: {
2285
+ Enum: any;
2286
+ IntEnum: any;
2287
+ StrEnum: any;
2288
+ };
2289
+ typing: {
2290
+ Annotated: any;
2291
+ Any: any;
2292
+ Literal: any;
2293
+ NoReturn: any;
2294
+ Optional: any;
2295
+ Tuple: any;
2296
+ TypeAlias: any;
2297
+ Union: any;
2298
+ };
2299
+ uuid: {
2300
+ UUID: any;
2301
+ };
2302
+ AnyUrl: any;
2303
+ BaseModel: any;
2304
+ ConfigDict: any;
2305
+ EmailStr: any;
2306
+ Field: any;
2307
+ RootModel: any;
2308
+ dataclass: any;
2309
+ }>, name: string) => PydanticFieldDsl; /** Pydantic model class. */
2310
+ model: (plugin: DefinePlugin<any, any, never, {
2311
+ datetime: {
2312
+ date: any;
2313
+ datetime: any;
2314
+ time: any;
2315
+ timedelta: any;
2316
+ };
2317
+ enum: {
2318
+ Enum: any;
2319
+ IntEnum: any;
2320
+ StrEnum: any;
2321
+ };
2322
+ typing: {
2323
+ Annotated: any;
2324
+ Any: any;
2325
+ Literal: any;
2326
+ NoReturn: any;
2327
+ Optional: any;
2328
+ Tuple: any;
2329
+ TypeAlias: any;
2330
+ Union: any;
2331
+ };
2332
+ uuid: {
2333
+ UUID: any;
2334
+ };
2335
+ AnyUrl: any;
2336
+ BaseModel: any;
2337
+ ConfigDict: any;
2338
+ EmailStr: any;
2339
+ Field: any;
2340
+ RootModel: any;
2341
+ dataclass: any;
2342
+ }>, name: NodeName) => PydanticModelDsl; /** Pydantic RootModel class. */
2343
+ rootModel: (plugin: DefinePlugin<any, any, never, {
2344
+ datetime: {
2345
+ date: any;
2346
+ datetime: any;
2347
+ time: any;
2348
+ timedelta: any;
2349
+ };
2350
+ enum: {
2351
+ Enum: any;
2352
+ IntEnum: any;
2353
+ StrEnum: any;
2354
+ };
2355
+ typing: {
2356
+ Annotated: any;
2357
+ Any: any;
2358
+ Literal: any;
2359
+ NoReturn: any;
2360
+ Optional: any;
2361
+ Tuple: any;
2362
+ TypeAlias: any;
2363
+ Union: any;
2364
+ };
2365
+ uuid: {
2366
+ UUID: any;
2367
+ };
2368
+ AnyUrl: any;
2369
+ BaseModel: any;
2370
+ ConfigDict: any;
2371
+ EmailStr: any;
2372
+ Field: any;
2373
+ RootModel: any;
2374
+ dataclass: any;
2375
+ }>, name: NodeName) => PydanticRootModelDsl; /** Pydantic type alias. */
2376
+ typeAlias: (plugin: DefinePlugin<any, any, never, {
2377
+ datetime: {
2378
+ date: any;
2379
+ datetime: any;
2380
+ time: any;
2381
+ timedelta: any;
2382
+ };
2383
+ enum: {
2384
+ Enum: any;
2385
+ IntEnum: any;
2386
+ StrEnum: any;
2387
+ };
2388
+ typing: {
2389
+ Annotated: any;
2390
+ Any: any;
2391
+ Literal: any;
2392
+ NoReturn: any;
2393
+ Optional: any;
2394
+ Tuple: any;
2395
+ TypeAlias: any;
2396
+ Union: any;
2397
+ };
2398
+ uuid: {
2399
+ UUID: any;
2400
+ };
2401
+ AnyUrl: any;
2402
+ BaseModel: any;
2403
+ ConfigDict: any;
2404
+ EmailStr: any;
2405
+ Field: any;
2406
+ RootModel: any;
2407
+ dataclass: any;
2408
+ }>, name: NodeName, aliased?: PydanticConstrainedTypeDsl | undefined) => PydanticTypeAliasDsl;
2409
+ };
2410
+ //#endregion
2411
+ //#region src/plugins/pydantic/resolvers.d.ts
2412
+ type PydanticResolvers = Plugin$1.Resolvers<{
2413
+ /**
2414
+ * Resolver for array schemas.
2415
+ *
2416
+ * Allows customization of how array types are rendered.
2417
+ *
2418
+ * Returning `undefined` will execute the default resolver logic.
2419
+ */
2420
+ array?: (ctx: ArrayResolverContext) => PydanticType | undefined;
2421
+ /**
2422
+ * Resolver for boolean schemas.
2423
+ *
2424
+ * Allows customization of how boolean types are rendered.
2425
+ *
2426
+ * Returning `undefined` will execute the default resolver logic.
2427
+ */
2428
+ boolean?: (ctx: BooleanResolverContext) => PydanticType | undefined;
2429
+ /**
2430
+ * Resolver for enum schemas.
2431
+ *
2432
+ * Allows customization of how enum types are rendered.
2433
+ *
2434
+ * Returning `undefined` will execute the default resolver logic.
2435
+ */
2436
+ enum?: (ctx: EnumResolverContext) => PydanticType | undefined;
2437
+ /**
2438
+ * Resolver for intersection schemas.
2439
+ *
2440
+ * Allows customization of how intersection types are rendered.
2441
+ *
2442
+ * Returning `undefined` will execute the default resolver logic.
2443
+ */
2444
+ intersection?: (ctx: IntersectionResolverContext) => PydanticType | undefined;
2445
+ /**
2446
+ * Resolver for never schemas.
2447
+ *
2448
+ * Allows customization of how never types are rendered.
2449
+ *
2450
+ * Returning `undefined` will execute the default resolver logic.
2451
+ */
2452
+ never?: (ctx: NeverResolverContext) => PydanticType | undefined;
2453
+ /**
2454
+ * Resolver for null schemas.
2455
+ *
2456
+ * Allows customization of how null types are rendered.
2457
+ *
2458
+ * Returning `undefined` will execute the default resolver logic.
2459
+ */
2460
+ null?: (ctx: NullResolverContext) => PydanticType | undefined;
2461
+ /**
2462
+ * Resolver for number schemas.
2463
+ *
2464
+ * Allows customization of how number types are rendered.
2465
+ *
2466
+ * Returning `undefined` will execute the default resolver logic.
2467
+ */
2468
+ number?: (ctx: NumberResolverContext) => PydanticType | undefined;
2469
+ /**
2470
+ * Resolver for object schemas.
2471
+ *
2472
+ * Allows customization of how object types are rendered.
2473
+ *
2474
+ * Returning `undefined` will execute the default resolver logic.
2475
+ */
2476
+ object?: (ctx: ObjectResolverContext) => PydanticType | undefined;
2477
+ /**
2478
+ * Resolver for string schemas.
2479
+ *
2480
+ * Allows customization of how string types are rendered.
2481
+ *
2482
+ * Returning `undefined` will execute the default resolver logic.
2483
+ */
2484
+ string?: (ctx: StringResolverContext) => PydanticType | undefined;
2485
+ /**
2486
+ * Resolver for tuple schemas.
2487
+ *
2488
+ * Allows customization of how tuple types are rendered.
2489
+ *
2490
+ * Returning `undefined` will execute the default resolver logic.
2491
+ */
2492
+ tuple?: (ctx: TupleResolverContext) => PydanticType | undefined;
2493
+ /**
2494
+ * Resolver for undefined schemas.
2495
+ *
2496
+ * Allows customization of how undefined types are rendered.
2497
+ *
2498
+ * Returning `undefined` will execute the default resolver logic.
2499
+ */
2500
+ undefined?: (ctx: UndefinedResolverContext) => PydanticType | undefined;
2501
+ /**
2502
+ * Resolver for union schemas.
2503
+ *
2504
+ * Allows customization of how union types are rendered.
2505
+ *
2506
+ * Returning `undefined` will execute the default resolver logic.
2507
+ */
2508
+ union?: (ctx: UnionResolverContext) => PydanticType | undefined;
2509
+ /**
2510
+ * Resolver for unknown schemas.
2511
+ *
2512
+ * Allows customization of how unknown types are rendered.
2513
+ *
2514
+ * Returning `undefined` will execute the default resolver logic.
2515
+ */
2516
+ unknown?: (ctx: UnknownResolverContext) => PydanticType | undefined;
2517
+ /**
2518
+ * Resolver for void schemas.
2519
+ *
2520
+ * Allows customization of how void types are rendered.
2521
+ *
2522
+ * Returning `undefined` will execute the default resolver logic.
2523
+ */
2524
+ void?: (ctx: VoidResolverContext) => PydanticType | undefined;
2525
+ }>;
2526
+ interface BaseContext extends DollarPyDsl, SchemaVisitorContext<PydanticPlugin['Instance']> {}
2527
+ interface ArrayResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2528
+ base: (ctx: ArrayResolverContext) => PydanticType;
2529
+ }> {
2530
+ applyModifiers: (result: PydanticResult, opts?: {
2531
+ optional?: boolean;
2532
+ }) => PydanticResult;
2533
+ childResults: Array<PydanticResult>;
2534
+ schema: SchemaWithType<'array'>;
2535
+ walk: Walker<PydanticResult, PydanticPlugin['Instance']>;
2536
+ }
2537
+ interface BooleanResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2538
+ base: (ctx: BooleanResolverContext) => PydanticType;
2539
+ const: (ctx: BooleanResolverContext) => PydanticType | undefined;
2540
+ }> {
2541
+ schema: SchemaWithType<'boolean'>;
2542
+ }
2543
+ interface EnumResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2544
+ base: (ctx: EnumResolverContext) => PydanticType;
2545
+ items: (ctx: EnumResolverContext) => {
2546
+ enumMembers: Array<EnumMember>;
2547
+ isNullable: boolean;
2548
+ };
2549
+ }> {
2550
+ schema: SchemaWithType<'enum'>;
2551
+ }
2552
+ interface IntersectionResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2553
+ base: (ctx: IntersectionResolverContext) => PydanticType;
2554
+ }> {
2555
+ applyModifiers: (result: PydanticResult, opts?: {
2556
+ optional?: boolean;
2557
+ }) => PydanticResult;
2558
+ childResults: Array<PydanticResult>;
2559
+ parentSchema: IR$1.SchemaObject;
2560
+ schema: IR$1.SchemaObject;
2561
+ }
2562
+ interface NeverResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2563
+ base: (ctx: NeverResolverContext) => PydanticType;
2564
+ }> {
2565
+ schema: SchemaWithType<'never'>;
2566
+ }
2567
+ interface NullResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2568
+ base: (ctx: NullResolverContext) => PydanticType;
2569
+ }> {
2570
+ schema: SchemaWithType<'null'>;
2571
+ }
2572
+ interface NumberResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2573
+ base: (ctx: NumberResolverContext) => PydanticType;
2574
+ const: (ctx: NumberResolverContext) => PydanticType | undefined;
2575
+ }> {
2576
+ schema: SchemaWithType<'integer' | 'number'>;
2577
+ }
2578
+ interface ObjectResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2579
+ additionalProperties: (ctx: ObjectResolverContext) => PydanticType | null | undefined;
2580
+ base: (ctx: ObjectResolverContext) => PydanticType;
2581
+ fields: (ctx: ObjectResolverContext) => Array<ReturnType<typeof $.field>>;
2582
+ }> {
2583
+ _childResults: Array<PydanticResult>;
2584
+ applyModifiers: (result: PydanticResult, opts: {
2585
+ optional?: boolean;
2586
+ }) => PydanticResult;
2587
+ schema: SchemaWithType<'object'>;
2588
+ walk: Walker<PydanticResult, PydanticPlugin['Instance']>;
2589
+ }
2590
+ interface StringResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2591
+ base: (ctx: StringResolverContext) => PydanticType;
2592
+ const: (ctx: StringResolverContext) => PydanticType | undefined;
2593
+ format: (ctx: StringResolverContext) => PydanticType | undefined;
2594
+ }> {
2595
+ schema: SchemaWithType<'string'>;
2596
+ }
2597
+ interface TupleResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2598
+ base: (ctx: TupleResolverContext) => PydanticType;
2599
+ const: (ctx: TupleResolverContext) => PydanticType | undefined;
2600
+ }> {
2601
+ applyModifiers: (result: PydanticResult, opts?: {
2602
+ optional?: boolean;
2603
+ }) => PydanticResult;
2604
+ childResults: Array<PydanticResult>;
2605
+ schema: SchemaWithType<'tuple'>;
2606
+ walk: Walker<PydanticResult, PydanticPlugin['Instance']>;
2607
+ }
2608
+ interface UndefinedResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2609
+ base: (ctx: UndefinedResolverContext) => PydanticType;
2610
+ }> {
2611
+ schema: SchemaWithType<'undefined'>;
2612
+ }
2613
+ interface UnionResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2614
+ base: (ctx: UnionResolverContext) => PydanticType;
2615
+ }> {
2616
+ applyModifiers: (result: PydanticResult, opts?: {
2617
+ optional?: boolean;
2618
+ }) => PydanticResult;
2619
+ childResults: Array<PydanticResult>;
2620
+ parentSchema: IR$1.SchemaObject;
2621
+ schema: IR$1.SchemaObject;
2622
+ schemas: ReadonlyArray<IR$1.SchemaObject>;
2623
+ }
2624
+ interface UnknownResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2625
+ base: (ctx: UnknownResolverContext) => PydanticType;
2626
+ }> {
2627
+ schema: SchemaWithType<'unknown'>;
2628
+ }
2629
+ interface VoidResolverContext extends BaseContext, Plugin$1.ResolverNodes<{
2630
+ base: (ctx: VoidResolverContext) => PydanticType;
2631
+ }> {
2632
+ schema: SchemaWithType<'void'>;
2633
+ }
2634
+ //#endregion
2635
+ //#region src/plugins/pydantic/types.d.ts
2636
+ type UserConfig$1 = Plugin$1.Name<'pydantic'> & Plugin$1.Hooks & Plugin$1.UserComments & Plugin$1.UserExports & PydanticResolvers & {
2637
+ /**
2638
+ * Casing convention for generated names.
2639
+ *
2640
+ * @default 'PascalCase'
2641
+ */
2642
+ case?: Casing;
2643
+ /**
2644
+ * Configuration for reusable schema definitions.
2645
+ *
2646
+ * Controls generation of shared Pydantic models that can be referenced
2647
+ * across requests and responses.
2648
+ *
2649
+ * Can be:
2650
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2651
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2652
+ * - `object`: Full configuration object
2653
+ *
2654
+ * @default true
2655
+ */
2656
+ definitions?: boolean | NameTransformer | {
2657
+ /**
2658
+ * Casing convention for generated names.
2659
+ *
2660
+ * @default 'PascalCase'
2661
+ */
2662
+ case?: Casing;
2663
+ /**
2664
+ * Whether this feature is enabled.
2665
+ *
2666
+ * @default true
2667
+ */
2668
+ enabled?: boolean;
2669
+ /**
2670
+ * Naming pattern for generated names.
2671
+ *
2672
+ * @default '{{name}}'
2673
+ */
2674
+ name?: NameTransformer;
2675
+ };
2676
+ /**
2677
+ * How to generate enum types.
2678
+ *
2679
+ * - `'enum'`: Generate Python Enum classes (e.g., `class Status(str, Enum): ...`)
2680
+ * - `'literal'`: Generate Literal type hints (e.g., `Literal["pending", "active"]`)
2681
+ *
2682
+ * @default 'enum'
2683
+ */
2684
+ enums?: 'enum' | 'literal';
2685
+ /**
2686
+ * How to render field constraints.
2687
+ *
2688
+ * - `'field'`: `foo: Optional[int] = Field(default=None, ge=0, le=100)`
2689
+ * - `'annotated'`: `foo: Annotated[Optional[int], Field(ge=0, le=100)] = None`
2690
+ *
2691
+ * @default 'field'
2692
+ */
2693
+ fieldStyle?: 'annotated' | 'field';
2694
+ /**
2695
+ * Model type to generate.
2696
+ *
2697
+ * - `'BaseModel'`: Pydantic `BaseModel` subclass.
2698
+ * - `'dataclass'`: Pydantic `@dataclass` decorator.
2699
+ *
2700
+ * @default 'BaseModel'
2701
+ */
2702
+ modelType?: 'BaseModel' | 'dataclass';
2703
+ /**
2704
+ * Configuration for request-specific Pydantic models.
2705
+ *
2706
+ * Controls generation of Pydantic models for request bodies,
2707
+ * query parameters, path parameters, and headers.
2708
+ *
2709
+ * Can be:
2710
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2711
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2712
+ * - `object`: Full configuration object
2713
+ *
2714
+ * @default true
2715
+ */
2716
+ requests?: boolean | NameTransformer | {
2717
+ /**
2718
+ * Configuration for request body Pydantic models.
2719
+ *
2720
+ * Can be:
2721
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2722
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2723
+ * - `object`: Full configuration object
2724
+ *
2725
+ * @default true
2726
+ */
2727
+ body?: boolean | NameTransformer | {
2728
+ /**
2729
+ * Casing convention for generated names.
2730
+ *
2731
+ * @default 'PascalCase'
2732
+ */
2733
+ case?: Casing;
2734
+ /**
2735
+ * Whether this feature is enabled.
2736
+ *
2737
+ * @default true
2738
+ */
2739
+ enabled?: boolean;
2740
+ /**
2741
+ * Naming pattern for generated names.
2742
+ *
2743
+ * @default '{{name}}Body'
2744
+ */
2745
+ name?: NameTransformer;
2746
+ };
2747
+ /**
2748
+ * Casing convention for generated names.
2749
+ *
2750
+ * @default 'PascalCase'
2751
+ */
2752
+ case?: Casing;
2753
+ /**
2754
+ * Whether this feature is enabled.
2755
+ *
2756
+ * @default true
2757
+ */
2758
+ enabled?: boolean;
2759
+ /**
2760
+ * Configuration for request headers Pydantic models.
2761
+ *
2762
+ * Can be:
2763
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2764
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2765
+ * - `object`: Full configuration object
2766
+ *
2767
+ * @default true
2768
+ */
2769
+ headers?: boolean | NameTransformer | {
2770
+ /**
2771
+ * Casing convention for generated names.
2772
+ *
2773
+ * @default 'PascalCase'
2774
+ */
2775
+ case?: Casing;
2776
+ /**
2777
+ * Whether this feature is enabled.
2778
+ *
2779
+ * @default true
2780
+ */
2781
+ enabled?: boolean;
2782
+ /**
2783
+ * Naming pattern for generated names.
2784
+ *
2785
+ * @default '{{name}}Headers'
2786
+ */
2787
+ name?: NameTransformer;
2788
+ };
2789
+ /**
2790
+ * Naming pattern for generated names.
2791
+ *
2792
+ * @default '{{name}}Request'
2793
+ */
2794
+ name?: NameTransformer;
2795
+ /**
2796
+ * Configuration for request path parameters Pydantic models.
2797
+ *
2798
+ * Can be:
2799
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2800
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2801
+ * - `object`: Full configuration object
2802
+ *
2803
+ * @default true
2804
+ */
2805
+ path?: boolean | NameTransformer | {
2806
+ /**
2807
+ * Casing convention for generated names.
2808
+ *
2809
+ * @default 'PascalCase'
2810
+ */
2811
+ case?: Casing;
2812
+ /**
2813
+ * Whether this feature is enabled.
2814
+ *
2815
+ * @default true
2816
+ */
2817
+ enabled?: boolean;
2818
+ /**
2819
+ * Naming pattern for generated names.
2820
+ *
2821
+ * @default '{{name}}Path'
2822
+ */
2823
+ name?: NameTransformer;
2824
+ };
2825
+ /**
2826
+ * Configuration for request query parameters Pydantic models.
2827
+ *
2828
+ * Can be:
2829
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2830
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2831
+ * - `object`: Full configuration object
2832
+ *
2833
+ * @default true
2834
+ */
2835
+ query?: boolean | NameTransformer | {
2836
+ /**
2837
+ * Casing convention for generated names.
2838
+ *
2839
+ * @default 'PascalCase'
2840
+ */
2841
+ case?: Casing;
2842
+ /**
2843
+ * Whether this feature is enabled.
2844
+ *
2845
+ * @default true
2846
+ */
2847
+ enabled?: boolean;
2848
+ /**
2849
+ * Naming pattern for generated names.
2850
+ *
2851
+ * @default '{{name}}Query'
2852
+ */
2853
+ name?: NameTransformer;
2854
+ };
2855
+ };
2856
+ /**
2857
+ * Configuration for response-specific Pydantic models.
2858
+ *
2859
+ * Controls generation of Pydantic models for response bodies,
2860
+ * error responses, and status codes.
2861
+ *
2862
+ * Can be:
2863
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2864
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2865
+ * - `object`: Full configuration object
2866
+ *
2867
+ * @default true
2868
+ */
2869
+ responses?: boolean | NameTransformer | {
2870
+ /**
2871
+ * Casing convention for generated names.
2872
+ *
2873
+ * @default 'PascalCase'
2874
+ */
2875
+ case?: Casing;
2876
+ /**
2877
+ * Whether this feature is enabled.
2878
+ *
2879
+ * @default true
2880
+ */
2881
+ enabled?: boolean;
2882
+ /**
2883
+ * Naming pattern for generated names.
2884
+ *
2885
+ * @default '{{name}}Response'
2886
+ */
2887
+ name?: NameTransformer;
2888
+ };
2889
+ /**
2890
+ * Enable strict mode for Pydantic models?
2891
+ *
2892
+ * When enabled, extra fields not defined in the schema will be rejected.
2893
+ *
2894
+ * This adds `model_config = ConfigDict(extra='forbid')`
2895
+ * to generated models.
2896
+ *
2897
+ * Note: {@link strict} has no effect when `modelType` is `'dataclass'`
2898
+ * as `ConfigDict` is not supported for dataclasses.
2899
+ *
2900
+ * @default false
2901
+ */
2902
+ strict?: boolean;
2903
+ /**
2904
+ * Configuration for webhook-specific Pydantic models.
2905
+ *
2906
+ * Controls generation of Pydantic models for webhook payloads.
2907
+ *
2908
+ * Can be:
2909
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
2910
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
2911
+ * - `object`: Full configuration object
2912
+ *
2913
+ * @default true
2914
+ */
2915
+ webhooks?: boolean | NameTransformer | {
2916
+ /**
2917
+ * Casing convention for generated names.
2918
+ *
2919
+ * @default 'PascalCase'
2920
+ */
2921
+ case?: Casing;
2922
+ /**
2923
+ * Whether this feature is enabled.
2924
+ *
2925
+ * @default true
2926
+ */
2927
+ enabled?: boolean;
2928
+ /**
2929
+ * Naming pattern for generated names.
2930
+ *
2931
+ * @default '{{name}}Webhook'
2932
+ */
2933
+ name?: NameTransformer;
2934
+ };
2935
+ };
2936
+ type Config = Plugin$1.Name<'pydantic'> & Plugin$1.Hooks & Plugin$1.Comments & Plugin$1.Exports & PydanticResolvers & {
2937
+ /** Casing convention for generated names. */case: Casing; /** Configuration for reusable schema definitions. */
2938
+ definitions: NamingOptions & FeatureToggle; /** How to generate enum types. */
2939
+ enums: 'enum' | 'literal'; /** How to render field constraints. */
2940
+ fieldStyle: 'annotated' | 'field'; /** Model type to generate. */
2941
+ modelType: 'BaseModel' | 'dataclass'; /** Configuration for request-specific Pydantic models. */
2942
+ requests: NamingOptions & FeatureToggle & {
2943
+ /** Configuration for request body Zod schemas. */body: NamingOptions & FeatureToggle; /** Configuration for request headers Zod schemas. */
2944
+ headers: NamingOptions & FeatureToggle; /** Configuration for request path parameters Zod schemas. */
2945
+ path: NamingOptions & FeatureToggle; /** Configuration for request query parameters Zod schemas. */
2946
+ query: NamingOptions & FeatureToggle;
2947
+ }; /** Configuration for response-specific Pydantic models. */
2948
+ responses: NamingOptions & FeatureToggle; /** Enable strict mode for Pydantic models? */
2949
+ strict: boolean; /** Configuration for webhook-specific Pydantic models. */
2950
+ webhooks: NamingOptions & FeatureToggle;
2951
+ };
2952
+ type PydanticPlugin = DefinePlugin$2<UserConfig$1, Config, never, PydanticImports>;
2953
+ //#endregion
84
2954
  //#region src/symbols/enum.d.ts
85
2955
  declare function ENUM(factory: SymbolFactory): {
86
- Enum: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
87
- IntEnum: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
88
- StrEnum: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
2956
+ Enum: any;
2957
+ IntEnum: any;
2958
+ StrEnum: any;
89
2959
  };
90
2960
  type EnumSymbols = ReturnType<typeof ENUM>;
91
2961
  //#endregion
92
2962
  //#region src/symbols/typing.d.ts
93
2963
  declare function TYPING(factory: SymbolFactory): {
94
- Annotated: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
95
- Any: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
96
- Literal: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
97
- NoReturn: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
98
- Optional: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
99
- Tuple: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
100
- TypeAlias: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
101
- Union: import("@hey-api/codegen-core").Symbol<import("@hey-api/codegen-core").Node<unknown, import("@hey-api/codegen-core").Language>>;
2964
+ Annotated: any;
2965
+ Any: any;
2966
+ Literal: any;
2967
+ NoReturn: any;
2968
+ Optional: any;
2969
+ Tuple: any;
2970
+ TypeAlias: any;
2971
+ Union: any;
102
2972
  };
103
2973
  type TypingSymbols = ReturnType<typeof TYPING>;
104
2974
  //#endregion
@@ -108,7 +2978,7 @@ type TypingSymbols = ReturnType<typeof TYPING>;
108
2978
  *
109
2979
  * @param userConfig User provided {@link UserConfig} configuration(s).
110
2980
  */
111
- declare function createClient(userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: Logger$1): Promise<ReadonlyArray<Context>>;
2981
+ declare function createClient(userConfig?: LazyOrAsync<MaybeArray<UserConfig>>, logger?: any): Promise<ReadonlyArray<Context>>;
112
2982
  //#endregion
113
2983
  //#region src/plugins/config.d.ts
114
2984
  /**
@@ -168,5 +3038,5 @@ declare namespace Plugins {
168
3038
  }
169
3039
  }
170
3040
  //#endregion
171
- export { type AnyPluginName, type Coercer, type CoercerMap, type ConfigTable, type DefinePlugin, type IR, Logger, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, OperationPath, OperationStrategy, type Plugin, type PluginContext, type PluginInstance, Plugins, type TableDirectives, type UserConfig, applyNaming, coerce, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, defineConfigTable, definePluginConfig, plugins_d_exports as plugins, toCase, utils };
3041
+ export { type AnyPluginName, type Coercer, type CoercerMap, type ConfigTable, type DefinePlugin$1 as DefinePlugin, type IR, Logger, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, OperationPath, OperationStrategy, type Plugin, type PluginContext, type PluginInstance, Plugins, type TableDirectives, type UserConfig, applyNaming, coerce, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, defineConfigTable, definePluginConfig, plugins_d_exports as plugins, toCase, utils };
172
3042
  //# sourceMappingURL=index.d.mts.map