@kubb/ast 5.0.0-beta.44 → 5.0.0-beta.45

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.
@@ -121,7 +121,6 @@ declare const schemaTypes: {
121
121
  */
122
122
  readonly never: "never";
123
123
  };
124
- type ScalarPrimitive = 'string' | 'number' | 'integer' | 'bigint' | 'boolean';
125
124
  /**
126
125
  * HTTP method identifiers used by operation nodes.
127
126
  *
@@ -256,11 +255,6 @@ type TypeNode = BaseNode & {
256
255
  */
257
256
  nodes?: Array<CodeNode>;
258
257
  };
259
- /**
260
- * Convenience alias for {@link TypeNode}.
261
- * @deprecated Use `TypeNode` directly.
262
- */
263
- type TypeDeclarationNode = TypeNode;
264
258
  /**
265
259
  * AST node representing a TypeScript `function` declaration.
266
260
  *
@@ -1630,15 +1624,6 @@ type HttpStatusCode = '100' | '101' | '102' | '103' | '200' | '201' | '202' | '2
1630
1624
  * ```
1631
1625
  */
1632
1626
  type StatusCode = HttpStatusCode | 'default';
1633
- /**
1634
- * Supported media type strings used in request and response bodies.
1635
- *
1636
- * @example
1637
- * ```ts
1638
- * const mediaType: MediaType = 'application/json'
1639
- * ```
1640
- */
1641
- type MediaType = 'application/json' | 'application/xml' | 'application/x-www-form-urlencoded' | 'application/octet-stream' | 'application/pdf' | 'application/zip' | 'application/graphql' | 'multipart/form-data' | 'text/plain' | 'text/html' | 'text/csv' | 'text/xml' | 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp' | 'image/svg+xml' | 'audio/mpeg' | 'video/mp4';
1642
1627
  //#endregion
1643
1628
  //#region src/nodes/response.d.ts
1644
1629
  /**
@@ -2196,10 +2181,10 @@ type ParserOptions = {
2196
2181
  dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date';
2197
2182
  /**
2198
2183
  * How `type: 'integer'` (and `format: 'int64'`) maps to TypeScript.
2199
- * - `'number'` fits most JSON APIs. Loses precision above `Number.MAX_SAFE_INTEGER`.
2200
2184
  * - `'bigint'` is exact for 64-bit IDs, but does not round-trip through JSON.
2185
+ * - `'number'` fits most JSON APIs. Loses precision above `Number.MAX_SAFE_INTEGER`.
2201
2186
  *
2202
- * @default 'number'
2187
+ * @default 'bigint'
2203
2188
  */
2204
2189
  integerType?: 'number' | 'bigint';
2205
2190
  /**
@@ -3592,5 +3577,5 @@ declare function containsCircularRef(node: SchemaNode | undefined, {
3592
3577
  excludeName?: string;
3593
3578
  }): boolean;
3594
3579
  //#endregion
3595
- export { update as $, ScalarSchemaType as $t, createBreak as A, FunctionParameterNode as At, createOperation as B, DateSchemaNode as Bt, PrinterFactoryOptions as C, httpMethods as Cn, HttpStatusCode as Ct, DistributiveOmit as D, ParameterNode as Dt, definePrinter as E, ParameterLocation as Et, createFunctionParameter as F, FileNode as Ft, createProperty as G, IntersectionSchemaNode as Gt, createParameter as H, EnumSchemaNode as Ht, createFunctionParameters as I, ImportNode as It, createSource as J, NumberSchemaNode as Jt, createResponse as K, Ipv4SchemaNode as Kt, createImport as L, SourceNode as Lt, createExport as M, ParameterGroupNode as Mt, createFile as N, ParamsTypeNode as Nt, UserFileNode as O, FunctionNodeType as Ot, createFunction as P, ExportNode as Pt, syncOptionality as Q, ScalarSchemaNode as Qt, createInput as R, ArraySchemaNode as Rt, Printer as S, VisitorDepth as Sn, ResponseNode as St, createPrinterFactory as T, StatusCode as Tt, createParameterGroup as U, EnumValueNode as Ut, createOutput as V, DatetimeSchemaNode as Vt, createParamsType as W, FormatStringSchemaNode as Wt, createText as X, PrimitiveSchemaType as Xt, createStreamInput as Y, ObjectSchemaNode as Yt, createType as Z, RefSchemaNode as Zt, VisitorContext as _, TypeDeclarationNode as _n, HttpMethod as _t, createDiscriminantNode as a, TimeSchemaNode as an, defineSchemaDialect as at, transform as b, NodeKind as bn, OperationNodeBase as bt, findCircularSchemas as c, PropertyNode as cn, DedupePlan as ct, AsyncVisitor as d, CodeNode as dn, Node as dt, SchemaNode as en, InferSchemaNode as et, CollectOptions as f, ConstNode as fn, InputMeta as ft, Visitor as g, TextNode as gn, GenericOperationNode as gt, TransformOptions as h, JsxNode as hn, OutputNode as ht, containsCircularRef as i, StringSchemaNode as in, SchemaDialect as it, createConst as j, FunctionParametersNode as jt, createArrowFunction as k, FunctionParamNode as kt, isStringType as l, ArrowFunctionNode as ln, applyDedupe as lt, ParentOf as m, JSDocNode as mn, InputStreamNode as mt, caseParams as n, SchemaType as nn, DispatchRule as nt, createOperationParams as o, UnionSchemaNode as on, BuildDedupePlanOptions as ot, CollectVisitor as p, FunctionNode as pn, InputNode as pt, createSchema as q, Ipv6SchemaNode as qt, collectUsedSchemaNames as r, SpecialSchemaType as rn, dispatch as rt, extractStringsFromNodes as s, UrlSchemaNode as sn, DedupeCanonical as st, OperationParamsResolver as t, SchemaNodeByType as tn, ParserOptions as tt, syncSchemaRef as u, BreakNode as un, buildDedupePlan as ut, WalkOptions as v, TypeNode as vn, HttpOperationNode as vt, PrinterPartial as w, schemaTypes as wn, MediaType as wt, walk as x, ScalarPrimitive as xn, OperationProtocol as xt, collect as y, BaseNode as yn, OperationNode as yt, createJsx as z, ComplexSchemaType as zt };
3596
- //# sourceMappingURL=types-lc8xMmUs.d.ts.map
3580
+ export { SchemaDialect as $, httpMethods as $t, createFunctionParameter as A, IntersectionSchemaNode as At, createProperty as B, TimeSchemaNode as Bt, UserFileNode as C, FileNode as Ct, createExport as D, DateSchemaNode as Dt, createConst as E, ArraySchemaNode as Et, createOperation as F, ScalarSchemaType as Ft, createText as G, CodeNode as Gt, createSchema as H, UrlSchemaNode as Ht, createOutput as I, SchemaNode as It, update as J, JSDocNode as Jt, createType as K, ConstNode as Kt, createParameter as L, SchemaNodeByType as Lt, createImport as M, ObjectSchemaNode as Mt, createInput as N, PrimitiveSchemaType as Nt, createFile as O, DatetimeSchemaNode as Ot, createJsx as P, RefSchemaNode as Pt, dispatch as Q, NodeKind as Qt, createParameterGroup as R, SchemaType as Rt, DistributiveOmit as S, ExportNode as St, createBreak as T, SourceNode as Tt, createSource as U, PropertyNode as Ut, createResponse as V, UnionSchemaNode as Vt, createStreamInput as W, ArrowFunctionNode as Wt, ParserOptions as X, TextNode as Xt, InferSchemaNode as Y, JsxNode as Yt, DispatchRule as Z, TypeNode as Zt, Printer as _, FunctionParamNode as _t, createDiscriminantNode as a, InputMeta as at, createPrinterFactory as b, ParameterGroupNode as bt, findCircularSchemas as c, OutputNode as ct, ParentOf as d, OperationNode as dt, schemaTypes as en, defineSchemaDialect as et, Visitor as f, ResponseNode as ft, walk as g, FunctionNodeType as gt, transform as h, ParameterNode as ht, containsCircularRef as i, Node as it, createFunctionParameters as j, NumberSchemaNode as jt, createFunction as k, EnumSchemaNode as kt, isStringType as l, HttpMethod as lt, collect as m, ParameterLocation as mt, caseParams as n, applyDedupe as nt, createOperationParams as o, InputNode as ot, VisitorContext as p, StatusCode as pt, syncOptionality as q, FunctionNode as qt, collectUsedSchemaNames as r, buildDedupePlan as rt, extractStringsFromNodes as s, InputStreamNode as st, OperationParamsResolver as t, DedupePlan as tt, syncSchemaRef as u, HttpOperationNode as ut, PrinterFactoryOptions as v, FunctionParameterNode as vt, createArrowFunction as w, ImportNode as wt, definePrinter as x, ParamsTypeNode as xt, PrinterPartial as y, FunctionParametersNode as yt, createParamsType as z, StringSchemaNode as zt };
3581
+ //# sourceMappingURL=types-BaaNZbSi.d.ts.map
package/dist/types.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $t as ScalarSchemaType, At as FunctionParameterNode, Bt as DateSchemaNode, C as PrinterFactoryOptions, Ct as HttpStatusCode, D as DistributiveOmit, Dt as ParameterNode, Et as ParameterLocation, Ft as FileNode, Gt as IntersectionSchemaNode, Ht as EnumSchemaNode, It as ImportNode, Jt as NumberSchemaNode, Kt as Ipv4SchemaNode, Lt as SourceNode, Mt as ParameterGroupNode, Nt as ParamsTypeNode, O as UserFileNode, Ot as FunctionNodeType, Pt as ExportNode, Qt as ScalarSchemaNode, Rt as ArraySchemaNode, S as Printer, Sn as VisitorDepth, St as ResponseNode, Tt as StatusCode, Ut as EnumValueNode, Vt as DatetimeSchemaNode, Wt as FormatStringSchemaNode, Xt as PrimitiveSchemaType, Yt as ObjectSchemaNode, Zt as RefSchemaNode, _ as VisitorContext, _n as TypeDeclarationNode, _t as HttpMethod, an as TimeSchemaNode, bn as NodeKind, bt as OperationNodeBase, cn as PropertyNode, ct as DedupePlan, d as AsyncVisitor, dn as CodeNode, dt as Node, en as SchemaNode, et as InferSchemaNode, f as CollectOptions, fn as ConstNode, ft as InputMeta, g as Visitor, gn as TextNode, gt as GenericOperationNode, h as TransformOptions, hn as JsxNode, ht as OutputNode, in as StringSchemaNode, it as SchemaDialect, jt as FunctionParametersNode, kt as FunctionParamNode, ln as ArrowFunctionNode, m as ParentOf, mn as JSDocNode, mt as InputStreamNode, nn as SchemaType, nt as DispatchRule, on as UnionSchemaNode, ot as BuildDedupePlanOptions, p as CollectVisitor, pn as FunctionNode, pt as InputNode, qt as Ipv6SchemaNode, rn as SpecialSchemaType, sn as UrlSchemaNode, st as DedupeCanonical, t as OperationParamsResolver, tn as SchemaNodeByType, tt as ParserOptions, un as BreakNode, v as WalkOptions, vn as TypeNode, vt as HttpOperationNode, w as PrinterPartial, wt as MediaType, xn as ScalarPrimitive, xt as OperationProtocol, yn as BaseNode, yt as OperationNode, zt as ComplexSchemaType } from "./types-lc8xMmUs.js";
2
- export type { ArraySchemaNode, ArrowFunctionNode, AsyncVisitor, BaseNode, BreakNode, BuildDedupePlanOptions, CodeNode, CollectOptions, CollectVisitor, ComplexSchemaType, ConstNode, DateSchemaNode, DatetimeSchemaNode, DedupeCanonical, DedupePlan, DispatchRule, DistributiveOmit, EnumSchemaNode, EnumValueNode, ExportNode, FileNode, FormatStringSchemaNode, FunctionNode, FunctionNodeType, FunctionParamNode, FunctionParameterNode, FunctionParametersNode, GenericOperationNode, HttpMethod, HttpOperationNode, HttpStatusCode, ImportNode, InferSchemaNode, InputMeta, InputNode, InputStreamNode, IntersectionSchemaNode, Ipv4SchemaNode, Ipv6SchemaNode, JSDocNode, JsxNode, MediaType, Node, NodeKind, NumberSchemaNode, ObjectSchemaNode, OperationNode, OperationNodeBase, OperationParamsResolver, OperationProtocol, OutputNode, ParameterGroupNode, ParameterLocation, ParameterNode, ParamsTypeNode, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, ResponseNode, ScalarPrimitive, ScalarSchemaNode, ScalarSchemaType, SchemaDialect, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, SpecialSchemaType, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TransformOptions, TypeDeclarationNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext, VisitorDepth, WalkOptions };
1
+ import { $ as SchemaDialect, At as IntersectionSchemaNode, Bt as TimeSchemaNode, C as UserFileNode, Ct as FileNode, Dt as DateSchemaNode, Et as ArraySchemaNode, Ft as ScalarSchemaType, Gt as CodeNode, Ht as UrlSchemaNode, It as SchemaNode, Jt as JSDocNode, Kt as ConstNode, Lt as SchemaNodeByType, Mt as ObjectSchemaNode, Nt as PrimitiveSchemaType, Ot as DatetimeSchemaNode, Pt as RefSchemaNode, Qt as NodeKind, Rt as SchemaType, S as DistributiveOmit, St as ExportNode, Tt as SourceNode, Ut as PropertyNode, Vt as UnionSchemaNode, Wt as ArrowFunctionNode, X as ParserOptions, Xt as TextNode, Y as InferSchemaNode, Yt as JsxNode, Z as DispatchRule, Zt as TypeNode, _ as Printer, _t as FunctionParamNode, at as InputMeta, bt as ParameterGroupNode, ct as OutputNode, d as ParentOf, dt as OperationNode, f as Visitor, ft as ResponseNode, gt as FunctionNodeType, ht as ParameterNode, it as Node, jt as NumberSchemaNode, kt as EnumSchemaNode, lt as HttpMethod, mt as ParameterLocation, ot as InputNode, p as VisitorContext, pt as StatusCode, qt as FunctionNode, st as InputStreamNode, t as OperationParamsResolver, tt as DedupePlan, ut as HttpOperationNode, v as PrinterFactoryOptions, vt as FunctionParameterNode, wt as ImportNode, xt as ParamsTypeNode, y as PrinterPartial, yt as FunctionParametersNode, zt as StringSchemaNode } from "./types-BaaNZbSi.js";
2
+ export type { ArraySchemaNode, ArrowFunctionNode, CodeNode, ConstNode, DateSchemaNode, DatetimeSchemaNode, DedupePlan, DispatchRule, DistributiveOmit, EnumSchemaNode, ExportNode, FileNode, FunctionNode, FunctionNodeType, FunctionParamNode, FunctionParameterNode, FunctionParametersNode, HttpMethod, HttpOperationNode, ImportNode, InferSchemaNode, InputMeta, InputNode, InputStreamNode, IntersectionSchemaNode, JSDocNode, JsxNode, Node, NodeKind, NumberSchemaNode, ObjectSchemaNode, OperationNode, OperationParamsResolver, OutputNode, ParameterGroupNode, ParameterLocation, ParameterNode, ParamsTypeNode, ParentOf, ParserOptions, PrimitiveSchemaType, Printer, PrinterFactoryOptions, PrinterPartial, PropertyNode, RefSchemaNode, ResponseNode, ScalarSchemaType, SchemaDialect, SchemaNode, SchemaNodeByType, SchemaType, SourceNode, StatusCode, StringSchemaNode, TextNode, TimeSchemaNode, TypeNode, UnionSchemaNode, UrlSchemaNode, UserFileNode, Visitor, VisitorContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/ast",
3
- "version": "5.0.0-beta.44",
3
+ "version": "5.0.0-beta.45",
4
4
  "description": "Spec-agnostic AST layer for Kubb. Defines the node tree, visitor pattern, factory functions, and type guards used across all code generation plugins.",
5
5
  "keywords": [
6
6
  "ast",
package/src/infer.ts CHANGED
@@ -30,10 +30,10 @@ export type ParserOptions = {
30
30
  dateType: false | 'string' | 'stringOffset' | 'stringLocal' | 'date'
31
31
  /**
32
32
  * How `type: 'integer'` (and `format: 'int64'`) maps to TypeScript.
33
- * - `'number'` fits most JSON APIs. Loses precision above `Number.MAX_SAFE_INTEGER`.
34
33
  * - `'bigint'` is exact for 64-bit IDs, but does not round-trip through JSON.
34
+ * - `'number'` fits most JSON APIs. Loses precision above `Number.MAX_SAFE_INTEGER`.
35
35
  *
36
- * @default 'number'
36
+ * @default 'bigint'
37
37
  */
38
38
  integerType?: 'number' | 'bigint'
39
39
  /**
package/src/nodes/code.ts CHANGED
@@ -95,12 +95,6 @@ export type TypeNode = BaseNode & {
95
95
  nodes?: Array<CodeNode>
96
96
  }
97
97
 
98
- /**
99
- * Convenience alias for {@link TypeNode}.
100
- * @deprecated Use `TypeNode` directly.
101
- */
102
- export type TypeDeclarationNode = TypeNode
103
-
104
98
  /**
105
99
  * AST node representing a TypeScript `function` declaration.
106
100
  *
package/src/nodes/file.ts CHANGED
@@ -4,7 +4,7 @@ import type { CodeNode } from './code.ts'
4
4
  /**
5
5
  * Supported file extensions.
6
6
  */
7
- export type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`
7
+ type Extname = '.ts' | '.js' | '.tsx' | '.json' | `.${string}`
8
8
 
9
9
  type ImportName = string | Array<string | { propertyName: string; name?: string }>
10
10
 
package/src/nodes/http.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * All supported HTTP status code literals as strings, as used in API specs
3
3
  * (for example, `"200"` and `"404"`).
4
4
  */
5
- export type HttpStatusCode =
5
+ type HttpStatusCode =
6
6
  // 1xx Informational
7
7
  | '100'
8
8
  | '101'
@@ -83,37 +83,3 @@ export type HttpStatusCode =
83
83
  * ```
84
84
  */
85
85
  export type StatusCode = HttpStatusCode | 'default'
86
-
87
- /**
88
- * Supported media type strings used in request and response bodies.
89
- *
90
- * @example
91
- * ```ts
92
- * const mediaType: MediaType = 'application/json'
93
- * ```
94
- */
95
- export type MediaType =
96
- // Application
97
- | 'application/json'
98
- | 'application/xml'
99
- | 'application/x-www-form-urlencoded'
100
- | 'application/octet-stream'
101
- | 'application/pdf'
102
- | 'application/zip'
103
- | 'application/graphql'
104
- // Multipart
105
- | 'multipart/form-data'
106
- // Text
107
- | 'text/plain'
108
- | 'text/html'
109
- | 'text/csv'
110
- | 'text/xml'
111
- // Image
112
- | 'image/png'
113
- | 'image/jpeg'
114
- | 'image/gif'
115
- | 'image/webp'
116
- | 'image/svg+xml'
117
- // Audio / Video
118
- | 'audio/mpeg'
119
- | 'video/mp4'
@@ -10,13 +10,13 @@ import type { ResponseNode } from './response.ts'
10
10
  import type { InputNode } from './root.ts'
11
11
  import type { SchemaNode } from './schema.ts'
12
12
 
13
- export type { BaseNode, NodeKind } from './base.ts'
14
- export type { ArrowFunctionNode, BreakNode, CodeNode, ConstNode, FunctionNode, JSDocNode, JsxNode, TextNode, TypeDeclarationNode, TypeNode } from './code.ts'
13
+ export type { NodeKind } from './base.ts'
14
+ export type { ArrowFunctionNode, BreakNode, CodeNode, ConstNode, FunctionNode, JSDocNode, JsxNode, TextNode, TypeNode } from './code.ts'
15
15
  export type { ContentNode } from './content.ts'
16
16
  export type { ExportNode, FileNode, ImportNode, SourceNode } from './file.ts'
17
17
  export type { FunctionNodeType, FunctionParameterNode, FunctionParametersNode, FunctionParamNode, ParameterGroupNode, ParamsTypeNode } from './function.ts'
18
- export type { HttpStatusCode, MediaType, StatusCode } from './http.ts'
19
- export type { GenericOperationNode, HttpMethod, HttpOperationNode, OperationNode, OperationNodeBase, OperationProtocol, RequestBodyNode } from './operation.ts'
18
+ export type { StatusCode } from './http.ts'
19
+ export type { GenericOperationNode, HttpMethod, HttpOperationNode, OperationNode, RequestBodyNode } from './operation.ts'
20
20
  export type { OutputNode } from './output.ts'
21
21
  export type { ParameterLocation, ParameterNode } from './parameter.ts'
22
22
  export type { PropertyNode } from './property.ts'
@@ -24,15 +24,10 @@ export type { ResponseNode } from './response.ts'
24
24
  export type { InputMeta, InputNode, InputStreamNode } from './root.ts'
25
25
  export type {
26
26
  ArraySchemaNode,
27
- ComplexSchemaType,
28
27
  DateSchemaNode,
29
28
  DatetimeSchemaNode,
30
29
  EnumSchemaNode,
31
- EnumValueNode,
32
- FormatStringSchemaNode,
33
30
  IntersectionSchemaNode,
34
- Ipv4SchemaNode,
35
- Ipv6SchemaNode,
36
31
  NumberSchemaNode,
37
32
  ObjectSchemaNode,
38
33
  PrimitiveSchemaType,
@@ -42,7 +37,6 @@ export type {
42
37
  SchemaNode,
43
38
  SchemaNodeByType,
44
39
  SchemaType,
45
- SpecialSchemaType,
46
40
  StringSchemaNode,
47
41
  TimeSchemaNode,
48
42
  UnionSchemaNode,
@@ -8,7 +8,7 @@ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' |
8
8
  /**
9
9
  * Transport an operation belongs to.
10
10
  */
11
- export type OperationProtocol = 'http'
11
+ type OperationProtocol = 'http'
12
12
 
13
13
  /**
14
14
  * AST node representing an operation request body.
@@ -53,7 +53,7 @@ export type RequestBodyNode = BaseNode & {
53
53
  /**
54
54
  * Fields shared by every operation, regardless of transport.
55
55
  */
56
- export type OperationNodeBase = BaseNode & {
56
+ type OperationNodeBase = BaseNode & {
57
57
  /**
58
58
  * Node kind.
59
59
  */
@@ -58,12 +58,12 @@ export type PrimitiveSchemaType =
58
58
  /**
59
59
  * Composite schema types.
60
60
  */
61
- export type ComplexSchemaType = 'tuple' | 'union' | 'intersection' | 'enum'
61
+ type ComplexSchemaType = 'tuple' | 'union' | 'intersection' | 'enum'
62
62
 
63
63
  /**
64
64
  * Schema types that need special handling in generators.
65
65
  */
66
- export type SpecialSchemaType = 'ref' | 'datetime' | 'time' | 'uuid' | 'email' | 'url' | 'ipv4' | 'ipv6' | 'blob'
66
+ type SpecialSchemaType = 'ref' | 'datetime' | 'time' | 'uuid' | 'email' | 'url' | 'ipv4' | 'ipv6' | 'blob'
67
67
 
68
68
  /**
69
69
  * All schema type strings.
@@ -306,7 +306,7 @@ export type IntersectionSchemaNode = CompositeSchemaNodeBase & {
306
306
  /**
307
307
  * One named enum item.
308
308
  */
309
- export type EnumValueNode = {
309
+ type EnumValueNode = {
310
310
  /**
311
311
  * Enum item name.
312
312
  */
@@ -559,7 +559,7 @@ export type UrlSchemaNode = SchemaNodeBase & {
559
559
  * const uuidSchema: FormatStringSchemaNode = { kind: 'Schema', type: 'uuid', min: 36, max: 36 }
560
560
  * ```
561
561
  */
562
- export type FormatStringSchemaNode = SchemaNodeBase & {
562
+ type FormatStringSchemaNode = SchemaNodeBase & {
563
563
  /**
564
564
  * Schema type discriminator.
565
565
  */
@@ -582,7 +582,7 @@ export type FormatStringSchemaNode = SchemaNodeBase & {
582
582
  * const ipv4Schema: Ipv4SchemaNode = { kind: 'Schema', type: 'ipv4' }
583
583
  * ```
584
584
  */
585
- export type Ipv4SchemaNode = SchemaNodeBase & {
585
+ type Ipv4SchemaNode = SchemaNodeBase & {
586
586
  /**
587
587
  * Schema type discriminator.
588
588
  */
@@ -597,7 +597,7 @@ export type Ipv4SchemaNode = SchemaNodeBase & {
597
597
  * const ipv6Schema: Ipv6SchemaNode = { kind: 'Schema', type: 'ipv6' }
598
598
  * ```
599
599
  */
600
- export type Ipv6SchemaNode = SchemaNodeBase & {
600
+ type Ipv6SchemaNode = SchemaNodeBase & {
601
601
  /**
602
602
  * Schema type discriminator.
603
603
  */
package/src/printer.ts CHANGED
@@ -13,7 +13,7 @@ import type { SchemaNode, SchemaNodeByType, SchemaType } from './nodes/index.ts'
13
13
  * }
14
14
  * ```
15
15
  */
16
- export type PrinterHandlerContext<TOutput, TOptions extends object> = {
16
+ type PrinterHandlerContext<TOutput, TOptions extends object> = {
17
17
  /**
18
18
  * Recursively transform a nested `SchemaNode` to `TOutput` using the node-level handlers.
19
19
  * Use `this.transform` inside `nodes` handlers and inside the `print` override.
@@ -37,7 +37,7 @@ export type PrinterHandlerContext<TOutput, TOptions extends object> = {
37
37
  * }
38
38
  * ```
39
39
  */
40
- export type PrinterHandler<TOutput, TOptions extends object, T extends SchemaType = SchemaType> = (
40
+ type PrinterHandler<TOutput, TOptions extends object, T extends SchemaType = SchemaType> = (
41
41
  this: PrinterHandlerContext<TOutput, TOptions>,
42
42
  node: SchemaNodeByType[T],
43
43
  ) => TOutput | null
package/src/types.ts CHANGED
@@ -1,5 +1,4 @@
1
- export type { VisitorDepth } from './constants.ts'
2
- export type { BuildDedupePlanOptions, DedupeCanonical, DedupePlan } from './dedupe.ts'
1
+ export type { DedupePlan } from './dedupe.ts'
3
2
  export type { SchemaDialect } from './dialect.ts'
4
3
  export type { DispatchRule } from './dispatch.ts'
5
4
  export type { DistributiveOmit } from './factory.ts'
@@ -7,44 +6,32 @@ export type { InferSchemaNode, ParserOptions } from './infer.ts'
7
6
  export type {
8
7
  ArraySchemaNode,
9
8
  ArrowFunctionNode,
10
- BaseNode,
11
- BreakNode,
12
9
  CodeNode,
13
- ComplexSchemaType,
14
10
  ConstNode,
15
11
  DateSchemaNode,
16
12
  DatetimeSchemaNode,
17
13
  EnumSchemaNode,
18
- EnumValueNode,
19
14
  ExportNode,
20
15
  FileNode,
21
- FormatStringSchemaNode,
22
16
  FunctionNode,
23
17
  FunctionNodeType,
24
18
  FunctionParameterNode,
25
19
  FunctionParametersNode,
26
20
  FunctionParamNode,
27
- GenericOperationNode,
28
21
  HttpMethod,
29
22
  HttpOperationNode,
30
- HttpStatusCode,
31
23
  ImportNode,
32
24
  InputMeta,
33
25
  InputNode,
34
26
  InputStreamNode,
35
27
  IntersectionSchemaNode,
36
- Ipv4SchemaNode,
37
- Ipv6SchemaNode,
38
28
  JSDocNode,
39
29
  JsxNode,
40
- MediaType,
41
30
  Node,
42
31
  NodeKind,
43
32
  NumberSchemaNode,
44
33
  ObjectSchemaNode,
45
34
  OperationNode,
46
- OperationNodeBase,
47
- OperationProtocol,
48
35
  OutputNode,
49
36
  ParameterGroupNode,
50
37
  ParameterLocation,
@@ -54,24 +41,20 @@ export type {
54
41
  PropertyNode,
55
42
  RefSchemaNode,
56
43
  ResponseNode,
57
- ScalarSchemaNode,
58
44
  ScalarSchemaType,
59
45
  SchemaNode,
60
46
  SchemaNodeByType,
61
47
  SchemaType,
62
48
  SourceNode,
63
- SpecialSchemaType,
64
49
  StatusCode,
65
50
  StringSchemaNode,
66
51
  TextNode,
67
52
  TimeSchemaNode,
68
- TypeDeclarationNode,
69
53
  TypeNode,
70
54
  UnionSchemaNode,
71
55
  UrlSchemaNode,
72
56
  } from './nodes/index.ts'
73
- export type { AsyncVisitor, CollectOptions, CollectVisitor, ParentOf, TransformOptions, Visitor, VisitorContext, WalkOptions } from './visitor.ts'
57
+ export type { ParentOf, Visitor, VisitorContext } from './visitor.ts'
74
58
  export type { Printer, PrinterFactoryOptions, PrinterPartial } from './printer.ts'
75
- export type { ScalarPrimitive } from './constants.ts'
76
59
  export type { OperationParamsResolver } from './utils/ast.ts'
77
60
  export type { UserFileNode } from './factory.ts'
package/src/utils/ast.ts CHANGED
@@ -118,7 +118,7 @@ export function createDiscriminantNode({ propertyName, value }: { propertyName:
118
118
  /**
119
119
  * Named type for a group of parameters (query or header) emitted as a single typed parameter.
120
120
  */
121
- export type ParamGroupType = {
121
+ type ParamGroupType = {
122
122
  /**
123
123
  * TypeNode for the group type.
124
124
  */
package/src/visitor.ts CHANGED
@@ -182,7 +182,7 @@ type MaybePromise<T> = T | Promise<T>
182
182
  * }
183
183
  * ```
184
184
  */
185
- export type AsyncVisitor = {
185
+ type AsyncVisitor = {
186
186
  input?(node: InputNode, context: VisitorContext<InputNode>): MaybePromise<undefined | null | InputNode>
187
187
  output?(node: OutputNode, context: VisitorContext<OutputNode>): MaybePromise<undefined | null | OutputNode>
188
188
  operation?(node: OperationNode, context: VisitorContext<OperationNode>): MaybePromise<undefined | null | OperationNode>
@@ -204,7 +204,7 @@ export type AsyncVisitor = {
204
204
  * }
205
205
  * ```
206
206
  */
207
- export type CollectVisitor<T> = {
207
+ type CollectVisitor<T> = {
208
208
  input?(node: InputNode, context: VisitorContext<InputNode>): T | null | undefined
209
209
  output?(node: OutputNode, context: VisitorContext<OutputNode>): T | null | undefined
210
210
  operation?(node: OperationNode, context: VisitorContext<OperationNode>): T | null | undefined