@workos/oagen 0.30.1 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +4 -12
  2. package/dist/cli/index.d.mts +1 -1
  3. package/dist/cli/index.mjs +3003 -664
  4. package/dist/cli/index.mjs.map +1 -1
  5. package/dist/compat/index.d.mts +85 -36
  6. package/dist/compat/index.d.mts.map +1 -1
  7. package/dist/compat/index.mjs +33 -23
  8. package/dist/compat/index.mjs.map +1 -1
  9. package/dist/{diff-DMFiDAI6.mjs → diff-CAsypxXV.mjs} +109 -89
  10. package/dist/{diff-DMFiDAI6.mjs.map → diff-CAsypxXV.mjs.map} +1 -1
  11. package/dist/differ-B0DSuKUZ.d.mts +72 -0
  12. package/dist/differ-B0DSuKUZ.d.mts.map +1 -0
  13. package/dist/index.d.mts +129 -61
  14. package/dist/index.d.mts.map +1 -1
  15. package/dist/index.mjs +2992 -563
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/{overlay-BhXruu32.mjs → overlay-Dj3WWlNP.mjs} +45 -38
  18. package/dist/overlay-Dj3WWlNP.mjs.map +1 -0
  19. package/dist/scripts/smoke/baseline.d.mts +1 -1
  20. package/dist/scripts/smoke/baseline.mjs +2848 -537
  21. package/dist/scripts/smoke/baseline.mjs.map +1 -1
  22. package/dist/scripts/smoke/sdk-test.d.mts +1 -1
  23. package/dist/scripts/smoke/sdk-test.mjs +4 -2
  24. package/dist/scripts/smoke/sdk-test.mjs.map +1 -1
  25. package/dist/smoke.d.mts +259 -36
  26. package/dist/smoke.d.mts.map +1 -1
  27. package/dist/smoke.mjs +2848 -537
  28. package/dist/smoke.mjs.map +1 -1
  29. package/dist/{tree-sitter-C6HB4OrC.mjs → tree-sitter-C7Hk-NDu.mjs} +36 -7
  30. package/dist/tree-sitter-C7Hk-NDu.mjs.map +1 -0
  31. package/dist/{types-yrBidOg3.d.mts → types-I7W7CNl1.d.mts} +227 -9
  32. package/dist/types-I7W7CNl1.d.mts.map +1 -0
  33. package/dist/verify/index.d.mts +7 -8
  34. package/dist/verify/index.d.mts.map +1 -1
  35. package/dist/verify/index.mjs +24 -14
  36. package/dist/verify/index.mjs.map +1 -1
  37. package/docs/architecture/emitter-contract.md +1 -0
  38. package/docs/architecture/ir-types.md +175 -17
  39. package/docs/cli.md +13 -13
  40. package/package.json +3 -3
  41. package/skills/check-emitter-parity/SKILL.md +15 -1
  42. package/dist/differ-DHldxZMr.d.mts +0 -123
  43. package/dist/differ-DHldxZMr.d.mts.map +0 -1
  44. package/dist/overlay-BhXruu32.mjs.map +0 -1
  45. package/dist/tree-sitter-C6HB4OrC.mjs.map +0 -1
  46. package/dist/types-yrBidOg3.d.mts.map +0 -1
@@ -130,10 +130,15 @@ function assignModelsToServices(models, services, hints) {
130
130
  for (const param of [
131
131
  ...op.pathParams,
132
132
  ...op.queryParams,
133
+ ...op.bodyOwnedQueryParams ?? [],
133
134
  ...op.headerParams,
134
135
  ...op.cookieParams ?? []
135
136
  ]) for (const name of collectModelRefs(param.type)) referencedModels.add(name);
136
- if (op.pagination) for (const name of collectModelRefs(op.pagination.itemType)) referencedModels.add(name);
137
+ if (op.pagination) {
138
+ for (const name of collectModelRefs(op.pagination.itemType)) referencedModels.add(name);
139
+ for (const field of op.pagination.envelopeFields ?? []) for (const name of collectModelRefs(field.type)) referencedModels.add(name);
140
+ }
141
+ for (const header of collectResponseHeaders(op)) for (const name of collectModelRefs(header.type)) referencedModels.add(name);
137
142
  }
138
143
  const toVisit = [...referencedModels];
139
144
  while (toVisit.length > 0) {
@@ -183,6 +188,30 @@ function collectRequestBodyModels(services) {
183
188
  for (const service of services) for (const op of service.operations) if (op.requestBody) for (const name of collectModelRefs(op.requestBody)) result.add(name);
184
189
  return result;
185
190
  }
191
+ /**
192
+ * Every response header an operation declares: the primary response's, each
193
+ * alternate success entry's, and each error entry's. The primary list is the
194
+ * same array as its `successResponses` entry when both exist, so it is yielded
195
+ * once. Every pass that walks an operation's type refs (reachability, model
196
+ * assignment, ref rewriting and validation, direction, compat filtering, enum
197
+ * collection) goes through this so a type reached only through a header is
198
+ * treated the way a body or parameter type is.
199
+ */
200
+ function collectResponseHeaders(op) {
201
+ const result = [];
202
+ const seen = /* @__PURE__ */ new Set();
203
+ const lists = [
204
+ op.responseHeaders,
205
+ ...(op.successResponses ?? []).map((r) => r.headers),
206
+ ...op.errors.map((e) => e.headers)
207
+ ];
208
+ for (const list of lists) {
209
+ if (!list || seen.has(list)) continue;
210
+ seen.add(list);
211
+ result.push(...list);
212
+ }
213
+ return result;
214
+ }
186
215
  //#endregion
187
216
  //#region src/errors.ts
188
217
  /**
@@ -306,7 +335,7 @@ function splitWords(s) {
306
335
  if (!s) return [];
307
336
  return recombineCompounds(s.replace(/[^a-zA-Z0-9_\-\s.]/g, "_").replace(/([a-z])([A-Z])/g, "$1\0$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1\0$2").replace(/([a-zA-Z])(\d)/g, "$1\0$2").replace(/(\d)([a-zA-Z])/g, "$1\0$2").split(/[\0_\-\s.]+/).filter((w) => w.length > 0));
308
337
  }
309
- const ACRONYM_SET = new Set([
338
+ const ACRONYM_SET = /* @__PURE__ */ new Set([
310
339
  "SSO",
311
340
  "FGA",
312
341
  "SAML",
@@ -316,7 +345,7 @@ const ACRONYM_SET = new Set([
316
345
  "M2M"
317
346
  ]);
318
347
  function toPascalCase(s, acronyms) {
319
- const merged = acronyms ? new Set([...ACRONYM_SET, ...acronyms]) : ACRONYM_SET;
348
+ const merged = acronyms ? /* @__PURE__ */ new Set([...ACRONYM_SET, ...acronyms]) : ACRONYM_SET;
320
349
  return splitWords(s).map((w) => {
321
350
  const upper = w.toUpperCase();
322
351
  if (merged.has(upper)) return upper;
@@ -325,7 +354,7 @@ function toPascalCase(s, acronyms) {
325
354
  }).join("");
326
355
  }
327
356
  function toCamelCase(s, acronyms) {
328
- const merged = acronyms ? new Set([...ACRONYM_SET, ...acronyms]) : ACRONYM_SET;
357
+ const merged = acronyms ? /* @__PURE__ */ new Set([...ACRONYM_SET, ...acronyms]) : ACRONYM_SET;
329
358
  const words = splitWords(s);
330
359
  if (words.length === 0) return "";
331
360
  return words.map((w, i) => {
@@ -361,7 +390,7 @@ function stripListItemMarkers(name) {
361
390
  return name.replace(/ListItem/g, "").replace(/ByExternalId/g, "").replace(/ByResourceId/g, "").replace(/ForResource/g, "");
362
391
  }
363
392
  /** Words that look plural but must NOT be singularized. */
364
- const SINGULAR_SAFE_LIST = new Set([
393
+ const SINGULAR_SAFE_LIST = /* @__PURE__ */ new Set([
365
394
  "Status",
366
395
  "Address",
367
396
  "Access",
@@ -422,6 +451,6 @@ function safeParse(parser, source) {
422
451
  return parser.parse((offset) => source.slice(offset, offset + TS_SAFE_CHUNK));
423
452
  }
424
453
  //#endregion
425
- export { validateModelHints as A, assertNever as C, collectModelRefs as D, collectFieldDependencies as E, collectRequestBodyModels as O, SpecParseError as S, collectEnumRefs as T, ConfigVersionMismatchError as _, singularize as a, OagenError as b, stripListItemMarkers as c, toPascalCase as d, toSnakeCase as f, ConfigLoadError as g, ConfigError as h, normalizeJsExtension as i, walkTypeRef as j, mapTypeRef as k, toCamelCase as l, CommandError as m, ACRONYM_SET as n, splitWords as o, toUpperSnakeCase as p, cleanSchemaName as r, stripBackendPrefixes as s, safeParse as t, toKebabCase as u, ExtractorError as v, assignModelsToServices as w, RegistryError as x, InternalError as y };
454
+ export { mapTypeRef as A, assertNever as C, collectModelRefs as D, collectFieldDependencies as E, walkTypeRef as M, collectRequestBodyModels as O, SpecParseError as S, collectEnumRefs as T, ConfigVersionMismatchError as _, singularize as a, OagenError as b, stripListItemMarkers as c, toPascalCase as d, toSnakeCase as f, ConfigLoadError as g, ConfigError as h, normalizeJsExtension as i, validateModelHints as j, collectResponseHeaders as k, toCamelCase as l, CommandError as m, ACRONYM_SET as n, splitWords as o, toUpperSnakeCase as p, cleanSchemaName as r, stripBackendPrefixes as s, safeParse as t, toKebabCase as u, ExtractorError as v, assignModelsToServices as w, RegistryError as x, InternalError as y };
426
455
 
427
- //# sourceMappingURL=tree-sitter-C6HB4OrC.mjs.map
456
+ //# sourceMappingURL=tree-sitter-C7Hk-NDu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-sitter-C7Hk-NDu.mjs","names":[],"sources":["../src/ir/types.ts","../src/errors.ts","../src/utils/naming.ts","../src/utils/tree-sitter.ts"],"sourcesContent":["import type { SdkBehavior } from './sdk-behavior.js';\n\n/**\n * Authentication scheme extracted from OpenAPI `components.securitySchemes`.\n *\n * `schemeName` is the key under `components.securitySchemes`, spelled exactly as\n * in the document. The requirements under `ApiSpec.security` and\n * `Operation.security` refer to the same key, so emitters join a requirement to\n * its scheme on that field. `description` is present only when the document\n * declares one.\n */\nexport type AuthScheme = { description?: string; schemeName: string } & (\n | { kind: 'basic' }\n | { kind: 'bearer' }\n | { kind: 'apiKey'; in: 'header' | 'query' | 'cookie'; name: string }\n | { kind: 'oauth2'; flows: Record<string, unknown> }\n);\n\n/** Root IR node representing the full API surface */\n/** A server entry from the OpenAPI servers array */\nexport interface ServerEntry {\n url: string;\n description?: string;\n}\n\n/** Root IR node representing the full API surface */\nexport interface ApiSpec {\n name: string;\n version: string;\n description?: string;\n baseUrl: string;\n servers?: ServerEntry[];\n services: Service[];\n models: Model[];\n enums: Enum[];\n auth?: AuthScheme[];\n /**\n * Document-level security requirements: the default every operation uses\n * unless it declares its own `Operation.security`. Same shape and semantics\n * as that field. `undefined` when the document declares none.\n */\n security?: SecurityRequirementSet[];\n /** Language-agnostic runtime policies (retry, errors, telemetry, etc.). */\n sdk: SdkBehavior;\n}\n\n/** A service groups related operations (maps to an SDK resource class) */\nexport interface Service {\n name: string;\n description?: string;\n operations: Operation[];\n}\n\n/** One scheme a request must satisfy, with the scopes it needs. */\nexport interface SecurityRequirement {\n /** Key under `components.securitySchemes`; joins to `AuthScheme.schemeName`. */\n schemeName: string;\n scopes: string[];\n}\n\n/**\n * One alternative from an OpenAPI security requirement list: a request must\n * satisfy *every* scheme in the set together (\"all of\"). A list of sets is\n * satisfied by *any one* of them (\"either of\"). An empty set is an alternative\n * that needs no credentials at all, which is how a document makes\n * authentication optional (`security: [{ userToken: [] }, {}]`).\n */\nexport type SecurityRequirementSet = SecurityRequirement[];\n\n/** A single API operation (maps to an SDK method) */\nexport interface Operation {\n name: string;\n /**\n * The document's `summary` alone. Present only when the OpenAPI operation\n * declares one with non-whitespace content; an empty or whitespace-only\n * summary is treated as absent. Read this to use the summary as a one-line\n * label; `description` below still carries the combined form, so emitters\n * that only print `description` are unchanged.\n */\n summary?: string;\n /**\n * Doc text for the operation. When the document declares both a `summary`\n * and a `description` with content, this is `summary + \"\\n\\n\" + description`;\n * when only one has content (or both are identical), this is that one. An\n * empty or whitespace-only value is treated as absent, and text with content\n * is kept verbatim. The parts are not separable from this field alone — use\n * `summary` for that.\n */\n description?: string;\n httpMethod: HttpMethod;\n path: string;\n pathParams: Parameter[];\n queryParams: Parameter[];\n /**\n * Query parameters the spec also declares as request-body properties on a\n * body-carrying method (POST/PUT/PATCH). They travel in the body only, so\n * they are excluded from `queryParams`; they are kept here so inline enums\n * they declare stay reachable and the compat surface still sees them.\n * Emitters never serialize these to the URL.\n */\n bodyOwnedQueryParams?: Parameter[];\n headerParams: Parameter[];\n cookieParams?: Parameter[];\n requestBody?: TypeRef;\n requestBodyEncoding?: 'json' | 'form-data' | 'form-urlencoded' | 'binary' | 'text';\n response: TypeRef;\n /**\n * Headers the primary success response declares (the one `response` is the\n * body of). Present only when the spec declares at least one. Each entry of\n * `successResponses` carries its own `headers`, but that list only exists\n * when an operation has more than one 2xx, so the primary response's headers\n * need a home of their own.\n */\n responseHeaders?: ResponseHeader[];\n successResponses?: SuccessResponse[];\n errors: ErrorResponse[];\n pagination?: PaginationMeta;\n injectIdempotencyKey: boolean;\n deprecated?: boolean;\n async?: boolean;\n /**\n * Per-operation security requirements, mirroring the OpenAPI document:\n * - `undefined` — the operation declares nothing and inherits\n * `ApiSpec.security` (which may itself be `undefined`).\n * - `[]` — `security: []`: the operation needs no authentication.\n * - otherwise one `SecurityRequirementSet` per requirement object; the\n * request must satisfy any one set, and every scheme within it.\n */\n security?: SecurityRequirementSet[];\n /**\n * Mutually-exclusive parameter groups parsed from `x-mutually-exclusive-parameter-groups`.\n * Each group represents a logical choice the caller must (or may) make between\n * several subsets of query/path/header parameters. The grouped parameters remain\n * in their original arrays (queryParams, pathParams, etc.) for wire-format purposes;\n * this field adds the grouping metadata so emitters can render sum types.\n */\n parameterGroups?: ParameterGroup[];\n}\n\n/**\n * A mutually-exclusive parameter group. The caller must supply exactly one\n * variant (when `optional` is false) or may omit the group entirely (when true).\n */\nexport interface ParameterGroup {\n /** Group name from the extension (e.g. \"parent_resource\"). */\n name: string;\n /** True when the whole group may be omitted. */\n optional: boolean;\n /** Ordered variants (insertion order matches the spec). */\n variants: ParameterGroupVariant[];\n /**\n * Base name emitters must use for this group's generated wrapper type, in\n * place of `name`.\n *\n * Two operations commonly share one group name — create and update both\n * declare `protocol_options` — and emitters name the wrapper from the group\n * name alone, so both operations collapse onto one type. That is correct\n * only while their members agree. When they disagree (create's\n * `saml_options` is a `CreateConnectionSAMLOptions`, update's is a\n * `PatchConnectionSAMLOptions`) one wrapper silently forces one operation to\n * use the other operation's type.\n *\n * The parser therefore fingerprints each group's members across every\n * operation declaring it and qualifies this with the operation name\n * (`update_connection_protocol_options`) only where they genuinely diverge.\n * Groups that agree — including ones differing only by nullability, or by\n * duplicate inline enums carrying identical values — keep the bare group\n * name, so already-published wrapper types are never renamed.\n */\n wrapperName?: string;\n}\n\n/**\n * One variant within a mutually-exclusive parameter group.\n */\nexport interface ParameterGroupVariant {\n /** Variant name from the extension (e.g. \"by_id\", \"by_external_id\"). */\n name: string;\n /**\n * References to the actual parameter IR nodes. These are the same\n * objects that live in operation.queryParams / .pathParams / .headerParams --\n * shared by identity, not duplicated.\n */\n parameters: Parameter[];\n /**\n * Names of parameters that may be omitted when this variant is used —\n * optional modifiers of the variant's required fields, from the\n * extension's `optionalFields`. Absent means every parameter in the\n * variant is required with it.\n */\n optionalParameters?: string[];\n}\n\n/** Structured pagination metadata for auto-paging iterator generation */\nexport interface PaginationMeta {\n strategy: 'cursor' | 'offset' | 'link-header';\n param: string;\n limitParam?: string;\n dataPath?: string;\n itemType: TypeRef;\n /**\n * Every property the list envelope carries besides the data array, in\n * document order: the pagination companion (`list_metadata`, `pagination`,\n * `has_more`, …) and any discriminant such as `object: \"list\"`. Together\n * with `dataPath` and `itemType` this is the envelope's full shape, so an\n * emitter can type what the endpoint returns and read the page details it\n * needs for the next request without parsing the document itself.\n *\n * An inline companion object is lifted to a model. Because the same envelope\n * recurs on every list endpoint of an API, copies that agree structurally\n * share one model named from the property alone (`list_metadata` →\n * `ListMetadata`, or the component schema of that name when one exists); a\n * copy whose shape differs keeps an operation-qualified name\n * (`ListUsersListMetadata`) so it can never change another type's shape.\n *\n * Absent when the response is a bare array, or when pagination was inferred\n * from query parameters alone and no envelope was detected.\n */\n envelopeFields?: Field[];\n}\n\nexport type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'options' | 'trace';\n\n/**\n * JSON Schema validation keywords declared directly on a schema, carried so an\n * emitter can document a value's limits (\"at most 100\"), check a value before\n * sending it, or keep a generated example within range. Every member is\n * optional and present only when the document declares it; a schema with no\n * validation keyword has no `constraints` at all.\n *\n * Numeric bounds use the OpenAPI 3.1 / JSON Schema 2020-12 shape, where\n * `exclusiveMinimum` / `exclusiveMaximum` are the bound itself. OpenAPI 3.0\n * spells them as booleans that make `minimum` / `maximum` exclusive; the\n * parser normalizes that form, so `{ minimum: 0, exclusiveMinimum: true }`\n * arrives as `{ exclusiveMinimum: 0 }` with no `minimum`, and a `false` is\n * dropped. Emitters read one shape whichever version produced it.\n *\n * The keywords on the field, parameter or model schema itself are carried,\n * conjoined with those of its inline `allOf` members (a single-member\n * `allOf` is unwrapped by the parser, so its limit is the value's own; a\n * `$ref` member contributes the keywords written beside the reference while\n * the referenced model keeps its own). Limits nested inside array `items` or\n * map values are not carried. A nullable wrapper — `oneOf`/`anyOf` with a\n * single non-null, non-`$ref` branch — conjoins that branch's keywords with\n * its own; limits on a general multi-variant union are not carried.\n */\nexport interface Constraints {\n /** Inclusive lower bound (`minimum`). */\n minimum?: number;\n /** Inclusive upper bound (`maximum`). */\n maximum?: number;\n /** Exclusive lower bound as a number; the OAS 3.0 boolean form is normalized to this. */\n exclusiveMinimum?: number;\n /** Exclusive upper bound as a number; the OAS 3.0 boolean form is normalized to this. */\n exclusiveMaximum?: number;\n /** The value must be an integer multiple of this (`multipleOf`). */\n multipleOf?: number;\n /** Minimum string length in characters (`minLength`). */\n minLength?: number;\n /** Maximum string length in characters (`maxLength`). */\n maxLength?: number;\n /** ECMA-262 regular expression the string must match (`pattern`), verbatim from the document. */\n pattern?: string;\n /** Minimum number of array items (`minItems`). */\n minItems?: number;\n /** Maximum number of array items (`maxItems`). */\n maxItems?: number;\n /** Present, and `true`, when array items must be unique; `uniqueItems: false` restates the default and is dropped. */\n uniqueItems?: boolean;\n /** Minimum number of items matching the schema's `contains` (`minContains`). */\n minContains?: number;\n /** Maximum number of items matching the schema's `contains` (`maxContains`). */\n maxContains?: number;\n /** Minimum number of object properties (`minProperties`). */\n minProperties?: number;\n /** Maximum number of object properties (`maxProperties`). */\n maxProperties?: number;\n /** Property name → properties that must also be present when it is (`dependentRequired`). */\n dependentRequired?: Record<string, string[]>;\n}\n\nexport interface Parameter {\n name: string;\n type: TypeRef;\n required: boolean;\n description?: string;\n deprecated?: boolean;\n default?: unknown;\n /**\n * A single illustrative value, resolved level by level: the parameter's own\n * `example` (else the first entry of its `examples` map), then its inline\n * schema's `example` (else the first of its `examples` list), then the same\n * on the component schema its `$ref` points at. A level with neither falls\n * through; an explicit `null` is kept. Absent when no level gives one.\n */\n example?: unknown;\n /**\n * Every example value the document gives, in document order: the\n * parameter's `examples` map of Example Objects (each entry's `value`, with\n * `$ref`s resolved against `components.examples`), else the JSON Schema\n * `examples` list on its inline schema, else the list on the component\n * schema its `$ref` points at. Present only when at least one value exists.\n */\n examples?: unknown[];\n style?: 'form' | 'simple' | 'label' | 'matrix';\n explode?: boolean;\n /**\n * Validation keywords from the parameter's schema. When that schema is a\n * `$ref`, the target's keywords are merged underneath the parameter's own\n * — the per-value fallback `default` and `example` use — so a parameter\n * can be read on its own without chasing the fieldless alias model the\n * target also becomes. Absent when neither declares any.\n */\n constraints?: Constraints;\n}\n\n/** Type reference — the core type system of the IR */\nexport type TypeRef = PrimitiveType | ArrayType | ModelRef | EnumRef | UnionType | NullableType | LiteralType | MapType;\n\nexport interface PrimitiveType {\n kind: 'primitive';\n type: 'string' | 'integer' | 'number' | 'boolean' | 'unknown';\n format?: string;\n}\n\nexport interface ArrayType {\n kind: 'array';\n items: TypeRef;\n}\n\nexport interface ModelRef {\n kind: 'model';\n name: string;\n}\n\nexport interface EnumRef {\n kind: 'enum';\n name: string;\n values?: (string | number)[];\n}\n\nexport interface LiteralType {\n kind: 'literal';\n value: string | number | boolean | null;\n}\n\nexport interface UnionType {\n kind: 'union';\n variants: TypeRef[];\n discriminator?: { property: string; mapping: Record<string, string> };\n /** Which OAS composition keyword produced this union. Emitters can use this to\n * distinguish inheritance (allOf) from exclusive union (oneOf) from open union (anyOf). */\n compositionKind?: 'allOf' | 'oneOf' | 'anyOf';\n}\n\nexport interface NullableType {\n kind: 'nullable';\n inner: TypeRef;\n}\n\nexport interface MapType {\n kind: 'map';\n valueType: TypeRef;\n keyType?: TypeRef;\n}\n\n/**\n * A generic type parameter on a model.\n * Example: `DirectoryUser<TCustomAttributes = Record<string, unknown>>`\n * → `{ name: 'TCustomAttributes', default: { kind: 'map', valueType: { kind: 'primitive', type: 'unknown' } } }`\n */\nexport interface TypeParam {\n name: string;\n /** Default type when the param is not specified. */\n default?: TypeRef;\n}\n\n/** Model definition (maps to an SDK model/data class) */\nexport interface Model {\n name: string;\n description?: string;\n fields: Field[];\n /** Generic type parameters. Empty/undefined for non-generic models. */\n typeParams?: TypeParam[];\n /**\n * When set, this model is a discriminated union over allOf+oneOf variants.\n * Emitters should generate a dispatcher (factory) instead of a regular dataclass.\n * The `property` field is the discriminator key (e.g. \"event\"), and `mapping`\n * maps each discriminator value to the concrete variant model name.\n */\n discriminator?: {\n property: string;\n mapping: Record<string, string>;\n };\n /**\n * Validation keywords declared on the model's own schema — for an object\n * schema, `minProperties`, `maxProperties` and `dependentRequired`. Absent\n * when the schema declares none.\n */\n constraints?: Constraints;\n}\n\nexport interface Field {\n name: string;\n /**\n * Optional domain-facing name override. When set, emitters derive the\n * domain-side identifier (in their own casing) from this instead of `name`,\n * while serialization still uses `name` for the wire key. Lets an SDK expose\n * a wire field under a friendlier name (e.g. `connection_type` → `type`)\n * without changing the API contract. Set via the `fieldHints` config and\n * honored by any emitter that reads it.\n */\n domainName?: string;\n type: TypeRef;\n required: boolean;\n description?: string;\n readOnly?: boolean;\n writeOnly?: boolean;\n deprecated?: boolean;\n default?: unknown;\n /**\n * A single illustrative value. The field schema's `example` when present,\n * otherwise the first entry of its `examples`; when the schema is a `$ref`\n * with neither, the same taken from the component it points at. An\n * explicit `null` is kept. Absent when no level gives one.\n */\n example?: unknown;\n /**\n * Every example value the schema gives, in document order, from the JSON\n * Schema `examples` list (OAS 3.1 deprecates `example` in its favour) —\n * on the field schema, else on the component its `$ref` points at.\n * Present only when the list has at least one entry.\n */\n examples?: unknown[];\n /**\n * Validation keywords declared on the field's schema, including any\n * written beside a `$ref` (OpenAPI 3.1 allows siblings). Absent when the\n * schema declares none; a bare `$ref` yields none, since the referenced\n * model carries its own limits.\n */\n constraints?: Constraints;\n}\n\n/** Enum definition */\nexport interface Enum {\n name: string;\n values: EnumValue[];\n /** Spec-level default value (the value of `default:` on the schema). Optional. */\n default?: string | number;\n}\n\nexport interface EnumValue {\n name: string;\n value: string | number;\n description?: string;\n deprecated?: boolean;\n}\n\n/**\n * Exhaustive check helper for TypeRef switches.\n * If a new kind is added to TypeRef, any switch that doesn't handle it\n * will fail to compile because `never` won't accept the unhandled variant.\n *\n * Usage:\n * switch (ref.kind) {\n * case 'primitive': ...\n * case 'array': ...\n * // If you forget 'literal', TypeScript errors here:\n * default: assertNever(ref);\n * }\n */\nexport function assertNever(x: never): never {\n // Inline to avoid importing from ../errors.js (ir/ is layer 0, must not import upward)\n const kind = (x as TypeRef).kind;\n const err = new Error(\n `Unexpected TypeRef kind: ${kind}\\nHint: If you added a new TypeRef variant, handle it in every switch/case that calls assertNever.`,\n );\n err.name = 'InternalError';\n throw err;\n}\n\n/**\n * Generic depth-first walker for TypeRef trees.\n * Handles recursion into array/nullable/union/map children and provides\n * an exhaustive `assertNever` check so callers don't need to repeat the\n * switch boilerplate. Supply callbacks only for the leaf kinds you care about.\n */\nexport function walkTypeRef(\n ref: TypeRef,\n visitor: {\n model?: (ref: ModelRef) => void;\n enum?: (ref: EnumRef) => void;\n primitive?: (ref: PrimitiveType) => void;\n literal?: (ref: LiteralType) => void;\n },\n): void {\n switch (ref.kind) {\n case 'model':\n visitor.model?.(ref);\n break;\n case 'enum':\n visitor.enum?.(ref);\n break;\n case 'array':\n walkTypeRef(ref.items, visitor);\n break;\n case 'nullable':\n walkTypeRef(ref.inner, visitor);\n break;\n case 'union':\n for (const v of ref.variants) walkTypeRef(v, visitor);\n break;\n case 'map':\n if (ref.keyType) walkTypeRef(ref.keyType, visitor);\n walkTypeRef(ref.valueType, visitor);\n break;\n case 'literal':\n visitor.literal?.(ref);\n break;\n case 'primitive':\n visitor.primitive?.(ref);\n break;\n default:\n assertNever(ref);\n }\n}\n\n/**\n * Generic depth-first mapper for TypeRef trees.\n * Like walkTypeRef but returns a transformed value instead of void.\n * Handles recursion into array/nullable/union/map children, passing\n * already-mapped child values to the parent callback.\n */\nexport function mapTypeRef<T>(\n ref: TypeRef,\n mapper: {\n primitive: (ref: PrimitiveType) => T;\n array: (ref: ArrayType, mappedItems: T) => T;\n model: (ref: ModelRef) => T;\n enum: (ref: EnumRef) => T;\n union: (ref: UnionType, mappedVariants: T[]) => T;\n nullable: (ref: NullableType, mappedInner: T) => T;\n literal: (ref: LiteralType) => T;\n map: (ref: MapType, mappedValue: T, mappedKey?: T) => T;\n },\n): T {\n switch (ref.kind) {\n case 'primitive':\n return mapper.primitive(ref);\n case 'array':\n return mapper.array(ref, mapTypeRef(ref.items, mapper));\n case 'model':\n return mapper.model(ref);\n case 'enum':\n return mapper.enum(ref);\n case 'union':\n return mapper.union(\n ref,\n ref.variants.map((v) => mapTypeRef(v, mapper)),\n );\n case 'nullable':\n return mapper.nullable(ref, mapTypeRef(ref.inner, mapper));\n case 'literal':\n return mapper.literal(ref);\n case 'map':\n return mapper.map(\n ref,\n mapTypeRef(ref.valueType, mapper),\n ref.keyType ? mapTypeRef(ref.keyType, mapper) : undefined,\n );\n default:\n return assertNever(ref);\n }\n}\n\n// --- IR traversal utilities ---\n\n/**\n * Collect all model names referenced (directly or transitively) by a TypeRef.\n */\nexport function collectModelRefs(ref: TypeRef): string[] {\n const names: string[] = [];\n walkTypeRef(ref, { model: (r) => names.push(r.name) });\n return names;\n}\n\n/**\n * Collect all enum names referenced by a TypeRef.\n */\nexport function collectEnumRefs(ref: TypeRef): string[] {\n const names: string[] = [];\n walkTypeRef(ref, { enum: (r) => names.push(r.name) });\n return names;\n}\n\n/**\n * Collect all TypeRef-referenced model and enum names from a model's fields.\n * Returns { models, enums } sets for generating import statements.\n */\nexport function collectFieldDependencies(model: Model): {\n models: Set<string>;\n enums: Set<string>;\n} {\n const models = new Set<string>();\n const enums = new Set<string>();\n\n for (const field of model.fields) {\n for (const name of collectModelRefs(field.type)) {\n if (name !== model.name) models.add(name);\n }\n for (const name of collectEnumRefs(field.type)) {\n enums.add(name);\n }\n }\n\n return { models, enums };\n}\n\n/**\n * Assign each model to the service that first references it.\n * Models referenced by multiple services are assigned to the first.\n * Models not referenced by any service are unassigned (absent from the map).\n *\n * @param hints - Optional pin overrides keyed by IR model name → IR service\n * name. Applied after the natural assignment loop. A hint only pins a model\n * present in THIS `models` slice; the target service is resolved by name\n * downstream, so a hint pointing at a service outside `services` still lands\n * the model in the right directory. Callers may pass a PARTIAL slice (e.g.\n * discriminated-union planning, per-service barrels, or a `--services`-scoped\n * run), so this function never rejects a hint — typo validation lives in\n * {@link validateModelHints}, which runs once against the full spec.\n */\nexport function assignModelsToServices(\n models: Model[],\n services: Service[],\n hints?: Record<string, string>,\n): Map<string, string> {\n const modelToService = new Map<string, string>();\n const modelNames = new Set(models.map((m) => m.name));\n\n for (const service of services) {\n const referencedModels = new Set<string>();\n\n for (const op of service.operations) {\n if (op.requestBody) {\n for (const name of collectModelRefs(op.requestBody)) {\n referencedModels.add(name);\n }\n }\n for (const name of collectModelRefs(op.response)) {\n referencedModels.add(name);\n }\n for (const param of [\n ...op.pathParams,\n ...op.queryParams,\n ...(op.bodyOwnedQueryParams ?? []),\n ...op.headerParams,\n ...(op.cookieParams ?? []),\n ]) {\n for (const name of collectModelRefs(param.type)) {\n referencedModels.add(name);\n }\n }\n if (op.pagination) {\n for (const name of collectModelRefs(op.pagination.itemType)) {\n referencedModels.add(name);\n }\n for (const field of op.pagination.envelopeFields ?? []) {\n for (const name of collectModelRefs(field.type)) {\n referencedModels.add(name);\n }\n }\n }\n for (const header of collectResponseHeaders(op)) {\n for (const name of collectModelRefs(header.type)) {\n referencedModels.add(name);\n }\n }\n }\n\n // Transitively collect models referenced by the directly-referenced models\n const toVisit = [...referencedModels];\n while (toVisit.length > 0) {\n const name = toVisit.pop()!;\n const model = models.find((m) => m.name === name);\n if (!model) continue;\n for (const field of model.fields) {\n for (const ref of collectModelRefs(field.type)) {\n if (!referencedModels.has(ref) && modelNames.has(ref)) {\n referencedModels.add(ref);\n toVisit.push(ref);\n }\n }\n }\n }\n\n for (const name of referencedModels) {\n if (!modelToService.has(name)) {\n modelToService.set(name, service.name);\n }\n }\n }\n\n if (hints) {\n for (const [modelName, serviceName] of Object.entries(hints)) {\n // Only pin models present in THIS slice; an out-of-slice hint is applied\n // where its own slice is processed. The target service resolves by name\n // downstream, so it need not appear in this slice's `services`. Genuine\n // typos are caught up front by validateModelHints against the full spec.\n if (!modelNames.has(modelName)) continue;\n modelToService.set(modelName, serviceName);\n }\n }\n\n return modelToService;\n}\n\n/**\n * Validate model-placement hints against the FULL spec. Run once at the start of\n * generation — where the complete model/service universe is known — so typos in\n * `modelHints` fail loud even though {@link assignModelsToServices} is\n * intentionally lenient about the partial slices it may be handed.\n */\nexport function validateModelHints(models: Model[], services: Service[], hints: Record<string, string>): void {\n const modelNames = new Set(models.map((m) => m.name));\n const serviceNames = new Set(services.map((s) => s.name));\n for (const [modelName, serviceName] of Object.entries(hints)) {\n if (!modelNames.has(modelName)) {\n const err = new Error(\n `modelHints: unknown model \"${modelName}\". Hint keys must match an IR model name (post-cleanSchemaName/schemaNameTransform).`,\n );\n err.name = 'ConfigError';\n throw err;\n }\n if (!serviceNames.has(serviceName)) {\n const err = new Error(\n `modelHints: unknown service \"${serviceName}\" for model \"${modelName}\". Hint values must match an IR service name (PascalCase, derived from the operation's first tag).`,\n );\n err.name = 'ConfigError';\n throw err;\n }\n }\n}\n\n/**\n * Collect all model names referenced as request bodies across all services.\n */\nexport function collectRequestBodyModels(services: Service[]): Set<string> {\n const result = new Set<string>();\n for (const service of services) {\n for (const op of service.operations) {\n if (op.requestBody) {\n for (const name of collectModelRefs(op.requestBody)) {\n result.add(name);\n }\n }\n }\n }\n return result;\n}\n\n/**\n * Every response header an operation declares: the primary response's, each\n * alternate success entry's, and each error entry's. The primary list is the\n * same array as its `successResponses` entry when both exist, so it is yielded\n * once. Every pass that walks an operation's type refs (reachability, model\n * assignment, ref rewriting and validation, direction, compat filtering, enum\n * collection) goes through this so a type reached only through a header is\n * treated the way a body or parameter type is.\n */\nexport function collectResponseHeaders(op: Operation): ResponseHeader[] {\n const result: ResponseHeader[] = [];\n const seen = new Set<ResponseHeader[]>();\n const lists = [\n op.responseHeaders,\n ...(op.successResponses ?? []).map((r) => r.headers),\n ...op.errors.map((e) => e.headers),\n ];\n for (const list of lists) {\n if (!list || seen.has(list)) continue;\n seen.add(list);\n result.push(...list);\n }\n return result;\n}\n\n/**\n * A header a response declares, typed like a parameter. `name` is kept exactly\n * as written in the spec (e.g. `Content-Disposition`); emitters apply their\n * own casing.\n */\nexport interface ResponseHeader {\n name: string;\n type: TypeRef;\n required: boolean;\n description?: string;\n deprecated?: boolean;\n}\n\nexport interface ErrorResponse {\n statusCode: number;\n type?: TypeRef;\n /** Declared response headers. Present only when the spec declares at least one. */\n headers?: ResponseHeader[];\n}\n\n/** A successful response entry from a 2xx status code */\nexport interface SuccessResponse {\n statusCode: number;\n type: TypeRef;\n /** Declared response headers. Present only when the spec declares at least one. */\n headers?: ResponseHeader[];\n}\n","/**\n * Structured error hierarchy for oagen.\n *\n * Every error carries a human-readable `hint` that suggests a recovery action.\n * The hint is appended to the `message` so it appears in stack traces and logs.\n */\n\n/** Base class for all oagen errors. */\nexport class OagenError extends Error {\n readonly hint: string;\n\n constructor(message: string, hint: string) {\n const fullMessage = hint ? `${message}\\nHint: ${hint}` : message;\n super(fullMessage);\n this.name = 'OagenError';\n this.hint = hint;\n }\n}\n\n/** Thrown when a command should terminate with a specific exit code. */\nexport class CommandError extends OagenError {\n readonly exitCode: number;\n\n constructor(message: string, hint: string, exitCode: number) {\n super(message, hint);\n this.name = 'CommandError';\n this.exitCode = exitCode;\n }\n}\n\n/** Thrown when an OpenAPI spec cannot be parsed or has an unsupported version. */\nexport class SpecParseError extends OagenError {\n constructor(message: string, hint: string) {\n super(message, hint);\n this.name = 'SpecParseError';\n }\n}\n\n/** Thrown when configuration files (manifests, API surfaces, overlays) are missing or malformed. */\nexport class ConfigError extends OagenError {\n constructor(message: string, hint: string) {\n super(message, hint);\n this.name = 'ConfigError';\n }\n}\n\n/** Thrown when a config file exists but cannot be loaded or evaluated. */\nexport class ConfigLoadError extends ConfigError {\n constructor(message: string, hint: string) {\n super(message, hint);\n this.name = 'ConfigLoadError';\n }\n}\n\n/** Thrown when a config targets a different IR version than the installed package. */\nexport class ConfigVersionMismatchError extends ConfigError {\n constructor(message: string, hint: string) {\n super(message, hint);\n this.name = 'ConfigVersionMismatchError';\n }\n}\n\n/** Thrown when an API surface extractor encounters a problem. */\nexport class ExtractorError extends OagenError {\n constructor(message: string, hint: string) {\n super(message, hint);\n this.name = 'ExtractorError';\n }\n}\n\n/** Thrown when a requested language or extractor is not found in a registry. */\nexport class RegistryError extends OagenError {\n constructor(message: string, hint: string) {\n super(message, hint);\n this.name = 'RegistryError';\n }\n}\n\n/** Thrown for internal invariant violations that indicate a bug. */\nexport class InternalError extends OagenError {\n constructor(message: string, hint: string) {\n super(message, hint);\n this.name = 'InternalError';\n }\n}\n","/**\n * Known compound tokens that the regex-based splitter over-splits.\n * Each entry is [lowercase-word-sequence, canonical-form].\n * Sorted longest-first so greedy matching works correctly.\n */\nconst COMPOUND_WORDS: [string[], string][] = [\n [['m', '2', 'm'], 'M2M'],\n [['o', 'auth'], 'OAuth'],\n];\n\n/**\n * Recombine adjacent words that form a known compound token.\n */\nfunction recombineCompounds(words: string[]): string[] {\n const result: string[] = [];\n let i = 0;\n while (i < words.length) {\n let matched = false;\n for (const [pattern, canonical] of COMPOUND_WORDS) {\n if (i + pattern.length <= words.length) {\n const matches = pattern.every((p, j) => words[i + j].toLowerCase() === p);\n if (matches) {\n result.push(canonical);\n i += pattern.length;\n matched = true;\n break;\n }\n }\n }\n if (!matched) {\n result.push(words[i]);\n i++;\n }\n }\n return result;\n}\n\n/**\n * Split a string into words, handling:\n * - camelCase / PascalCase boundaries\n * - snake_case / kebab-case separators\n * - Consecutive capitals (e.g., \"HTTPClient\" → [\"HTTP\", \"Client\"])\n * - Numbers as word boundaries (e.g., \"OAuth2Token\" → [\"OAuth\", \"2\", \"Token\"])\n * - Known compounds are recombined (e.g., \"M2M\" stays as one word)\n */\nexport function splitWords(s: string): string[] {\n if (!s) return [];\n\n const words = s\n .replace(/[^a-zA-Z0-9_\\-\\s.]/g, '_') // replace non-alphanumeric chars with separator\n .replace(/([a-z])([A-Z])/g, '$1\\0$2') // camelCase boundary\n .replace(/([A-Z]+)([A-Z][a-z])/g, '$1\\0$2') // consecutive caps boundary\n .replace(/([a-zA-Z])(\\d)/g, '$1\\0$2') // letter to number\n .replace(/(\\d)([a-zA-Z])/g, '$1\\0$2') // number to letter\n .split(/[\\0_\\-\\s.]+/)\n .filter((w) => w.length > 0);\n\n return recombineCompounds(words);\n}\n\nexport const ACRONYM_SET = new Set(['SSO', 'FGA', 'SAML', 'SCIM', 'JWT', 'HMAC', 'M2M']);\n\nexport function toPascalCase(s: string, acronyms?: Set<string>): string {\n const merged = acronyms ? new Set([...ACRONYM_SET, ...acronyms]) : ACRONYM_SET;\n return splitWords(s)\n .map((w) => {\n const upper = w.toUpperCase();\n if (merged.has(upper)) return upper;\n // Special case: OAuth should stay as OAuth, not OAUTH\n if (upper === 'OAUTH') return 'OAuth';\n return w.charAt(0).toUpperCase() + w.slice(1).toLowerCase();\n })\n .join('');\n}\n\nexport function toCamelCase(s: string, acronyms?: Set<string>): string {\n const merged = acronyms ? new Set([...ACRONYM_SET, ...acronyms]) : ACRONYM_SET;\n const words = splitWords(s);\n if (words.length === 0) return '';\n return words\n .map((w, i) => {\n if (i === 0) return w.toLowerCase();\n const upper = w.toUpperCase();\n if (merged.has(upper)) return upper;\n if (upper === 'OAUTH') return 'OAuth';\n return w.charAt(0).toUpperCase() + w.slice(1).toLowerCase();\n })\n .join('');\n}\n\nexport function toSnakeCase(s: string): string {\n return splitWords(s)\n .map((w) => w.toLowerCase())\n .join('_');\n}\n\nexport function toKebabCase(s: string): string {\n return splitWords(s)\n .map((w) => w.toLowerCase())\n .join('-');\n}\n\nexport function toUpperSnakeCase(s: string): string {\n return splitWords(s)\n .map((w) => w.toUpperCase())\n .join('_');\n}\n\nconst BACKEND_SUFFIXES = ['Controller'];\n\nexport function stripBackendSuffixes(name: string): string {\n for (const suffix of BACKEND_SUFFIXES) {\n if (name.endsWith(suffix) && name.length > suffix.length) {\n return name.slice(0, -suffix.length);\n }\n }\n return name;\n}\n\nexport function stripBackendPrefixes(name: string): string {\n return name.replace(/Userland/g, '').replace(/Controller/g, '');\n}\n\n/**\n * Remove ListItem / ByExternalId / ByResourceId / ForResource markers from PascalCase names.\n * E.g. \"DirectoriesListItemState\" → \"DirectoriesState\"\n */\nexport function stripListItemMarkers(name: string): string {\n return name\n .replace(/ListItem/g, '')\n .replace(/ByExternalId/g, '')\n .replace(/ByResourceId/g, '')\n .replace(/ForResource/g, '');\n}\n\n/** Words that look plural but must NOT be singularized. */\nconst SINGULAR_SAFE_LIST = new Set([\n 'Status',\n 'Address',\n 'Access',\n 'Process',\n 'Progress',\n 'Success',\n 'Radius',\n 'Canvas',\n 'Alias',\n 'Basis',\n 'Bus',\n 'Species',\n 'Series',\n]);\n\n/**\n * Conservative singularize for the leading PascalCase word.\n * Only applied to the first word of a PascalCase name (the resource word).\n * - `ies` → `y` (e.g. Directories → Directory)\n * - trailing `s` for words >4 chars (e.g. Organizations → Organization)\n * Safe-listed words are never singularized.\n */\nexport function singularize(word: string): string {\n if (SINGULAR_SAFE_LIST.has(word)) return word;\n if (word.endsWith('ies') && word.length > 4) {\n return word.slice(0, -3) + 'y';\n }\n if (word.endsWith('ses') && word.length > 4) {\n // e.g. \"Processes\" — but \"Process\" is safe-listed, this handles non-safe ones\n return word.slice(0, -2);\n }\n if (word.endsWith('s') && !word.endsWith('ss') && word.length > 4) {\n return word.slice(0, -1);\n }\n return word;\n}\n\n/**\n * Compose all backend name cleaning transforms in order:\n * 1. Strip backend prefixes (Userland, Controller)\n * 2. Strip backend suffixes (Dto, DTO, Controller)\n * 3. Strip ListItem / ByExternalId markers\n * 4. Singularize leading resource word\n *\n * Must be idempotent: `cleanSchemaName(cleanSchemaName(x)) === cleanSchemaName(x)`\n */\n/** Strip `.js` extensions from import/export specifiers for dedup comparison. */\nexport function normalizeJsExtension(text: string): string {\n return text.replace(/\\.js(['\"])/g, '$1');\n}\n\nexport function cleanSchemaName(name: string): string {\n let result = stripBackendPrefixes(stripBackendSuffixes(name));\n result = stripListItemMarkers(result);\n\n // Singularize the leading PascalCase word\n const match = result.match(/^([A-Z][a-z]*)/);\n if (match) {\n const leadWord = match[1];\n const singular = singularize(leadWord);\n if (singular !== leadWord) {\n result = singular + result.slice(leadWord.length);\n }\n }\n\n return result;\n}\n","/**\n * Shared tree-sitter utilities.\n *\n * tree-sitter 0.21.x has a native binding bug: its internal UTF-16 buffer is\n * 32 768 uint16 units (32 768 characters for BMP text). When the JS input\n * callback returns a string >= 32 768 chars, `napi_get_value_string_utf16`\n * overflows and the C layer throws \"Invalid argument\". Work around this by\n * supplying a chunked callback for large sources instead of a raw string.\n */\n\nimport type Parser from 'tree-sitter';\n\nconst TS_SAFE_CHUNK = 32_767;\n\nexport function safeParse(parser: Parser, source: string): Parser.Tree {\n if (source.length < TS_SAFE_CHUNK) {\n return parser.parse(source);\n }\n return parser.parse((offset: number) => source.slice(offset, offset + TS_SAFE_CHUNK));\n}\n"],"mappings":";;;;;;;;;;;;;;AAudA,SAAgB,YAAY,GAAiB;CAE3C,MAAM,OAAQ,EAAc;CAC5B,MAAM,sBAAM,IAAI,MACd,4BAA4B,KAAK,mGACnC;CACA,IAAI,OAAO;CACX,MAAM;AACR;;;;;;;AAQA,SAAgB,YACd,KACA,SAMM;CACN,QAAQ,IAAI,MAAZ;EACE,KAAK;GACH,QAAQ,QAAQ,GAAG;GACnB;EACF,KAAK;GACH,QAAQ,OAAO,GAAG;GAClB;EACF,KAAK;GACH,YAAY,IAAI,OAAO,OAAO;GAC9B;EACF,KAAK;GACH,YAAY,IAAI,OAAO,OAAO;GAC9B;EACF,KAAK;GACH,KAAK,MAAM,KAAK,IAAI,UAAU,YAAY,GAAG,OAAO;GACpD;EACF,KAAK;GACH,IAAI,IAAI,SAAS,YAAY,IAAI,SAAS,OAAO;GACjD,YAAY,IAAI,WAAW,OAAO;GAClC;EACF,KAAK;GACH,QAAQ,UAAU,GAAG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AAEA,SAAgB,gBAAgB,MAAsB;CACpD,IAAI,SAAS,qBAAqB,qBAAqB,IAAI,CAAC;CAC5D,SAAS,qBAAqB,MAAM;CAGpC,MAAM,QAAQ,OAAO,MAAM,gBAAgB;CAC3C,IAAI,OAAO;EACT,MAAM,WAAW,MAAM;EACvB,MAAM,WAAW,YAAY,QAAQ;EACrC,IAAI,aAAa,UACf,SAAS,WAAW,OAAO,MAAM,SAAS,MAAM;CAEpD;CAEA,OAAO;AACT;;;AC/LA,MAAM,gBAAgB;AAEtB,SAAgB,UAAU,QAAgB,QAA6B;CACrE,IAAI,OAAO,SAAS,eAClB,OAAO,OAAO,MAAM,MAAM;CAE5B,OAAO,OAAO,OAAO,WAAmB,OAAO,MAAM,QAAQ,SAAS,aAAa,CAAC;AACtF"}
@@ -487,7 +487,7 @@ interface SdkBehavior {
487
487
  */
488
488
  declare function defaultSdkBehavior(): SdkBehavior;
489
489
  /** Recursive partial type for deep overrides. */
490
- type DeepPartial<T> = { [K in keyof T]?: T[K] extends (infer U)[] ? U[] : T[K] extends object ? DeepPartial<T[K]> : T[K] };
490
+ type DeepPartial<T> = { [K in keyof T]?: T[K] extends (infer U)[] ? U[] : T[K] extends object ? DeepPartial<T[K]> : T[K]; };
491
491
  /**
492
492
  * Deep-merge partial overrides into the canonical defaults.
493
493
  * Arrays replace entirely (so `retryableStatusCodes: [429]` replaces the full list,
@@ -496,8 +496,21 @@ type DeepPartial<T> = { [K in keyof T]?: T[K] extends (infer U)[] ? U[] : T[K] e
496
496
  declare function mergeSdkBehavior(overrides: DeepPartial<SdkBehavior>): SdkBehavior;
497
497
  //#endregion
498
498
  //#region src/ir/types.d.ts
499
- /** Authentication scheme extracted from OpenAPI securitySchemes */
499
+ /**
500
+ * Authentication scheme extracted from OpenAPI `components.securitySchemes`.
501
+ *
502
+ * `schemeName` is the key under `components.securitySchemes`, spelled exactly as
503
+ * in the document. The requirements under `ApiSpec.security` and
504
+ * `Operation.security` refer to the same key, so emitters join a requirement to
505
+ * its scheme on that field. `description` is present only when the document
506
+ * declares one.
507
+ */
500
508
  type AuthScheme = {
509
+ description?: string;
510
+ schemeName: string;
511
+ } & ({
512
+ kind: 'basic';
513
+ } | {
501
514
  kind: 'bearer';
502
515
  } | {
503
516
  kind: 'apiKey';
@@ -506,7 +519,7 @@ type AuthScheme = {
506
519
  } | {
507
520
  kind: 'oauth2';
508
521
  flows: Record<string, unknown>;
509
- };
522
+ });
510
523
  /** Root IR node representing the full API surface */
511
524
  /** A server entry from the OpenAPI servers array */
512
525
  interface ServerEntry {
@@ -524,6 +537,12 @@ interface ApiSpec {
524
537
  models: Model[];
525
538
  enums: Enum[];
526
539
  auth?: AuthScheme[];
540
+ /**
541
+ * Document-level security requirements: the default every operation uses
542
+ * unless it declares its own `Operation.security`. Same shape and semantics
543
+ * as that field. `undefined` when the document declares none.
544
+ */
545
+ security?: SecurityRequirementSet[];
527
546
  /** Language-agnostic runtime policies (retry, errors, telemetry, etc.). */
528
547
  sdk: SdkBehavior;
529
548
  }
@@ -533,32 +552,80 @@ interface Service {
533
552
  description?: string;
534
553
  operations: Operation[];
535
554
  }
536
- /** A single API operation (maps to an SDK method) */
537
- /** Per-operation security requirement: scheme name → scope list. */
555
+ /** One scheme a request must satisfy, with the scopes it needs. */
538
556
  interface SecurityRequirement {
557
+ /** Key under `components.securitySchemes`; joins to `AuthScheme.schemeName`. */
539
558
  schemeName: string;
540
559
  scopes: string[];
541
560
  }
561
+ /**
562
+ * One alternative from an OpenAPI security requirement list: a request must
563
+ * satisfy *every* scheme in the set together ("all of"). A list of sets is
564
+ * satisfied by *any one* of them ("either of"). An empty set is an alternative
565
+ * that needs no credentials at all, which is how a document makes
566
+ * authentication optional (`security: [{ userToken: [] }, {}]`).
567
+ */
568
+ type SecurityRequirementSet = SecurityRequirement[];
569
+ /** A single API operation (maps to an SDK method) */
542
570
  interface Operation {
543
571
  name: string;
572
+ /**
573
+ * The document's `summary` alone. Present only when the OpenAPI operation
574
+ * declares one with non-whitespace content; an empty or whitespace-only
575
+ * summary is treated as absent. Read this to use the summary as a one-line
576
+ * label; `description` below still carries the combined form, so emitters
577
+ * that only print `description` are unchanged.
578
+ */
579
+ summary?: string;
580
+ /**
581
+ * Doc text for the operation. When the document declares both a `summary`
582
+ * and a `description` with content, this is `summary + "\n\n" + description`;
583
+ * when only one has content (or both are identical), this is that one. An
584
+ * empty or whitespace-only value is treated as absent, and text with content
585
+ * is kept verbatim. The parts are not separable from this field alone — use
586
+ * `summary` for that.
587
+ */
544
588
  description?: string;
545
589
  httpMethod: HttpMethod;
546
590
  path: string;
547
591
  pathParams: Parameter[];
548
592
  queryParams: Parameter[];
593
+ /**
594
+ * Query parameters the spec also declares as request-body properties on a
595
+ * body-carrying method (POST/PUT/PATCH). They travel in the body only, so
596
+ * they are excluded from `queryParams`; they are kept here so inline enums
597
+ * they declare stay reachable and the compat surface still sees them.
598
+ * Emitters never serialize these to the URL.
599
+ */
600
+ bodyOwnedQueryParams?: Parameter[];
549
601
  headerParams: Parameter[];
550
602
  cookieParams?: Parameter[];
551
603
  requestBody?: TypeRef;
552
604
  requestBodyEncoding?: 'json' | 'form-data' | 'form-urlencoded' | 'binary' | 'text';
553
605
  response: TypeRef;
606
+ /**
607
+ * Headers the primary success response declares (the one `response` is the
608
+ * body of). Present only when the spec declares at least one. Each entry of
609
+ * `successResponses` carries its own `headers`, but that list only exists
610
+ * when an operation has more than one 2xx, so the primary response's headers
611
+ * need a home of their own.
612
+ */
613
+ responseHeaders?: ResponseHeader[];
554
614
  successResponses?: SuccessResponse[];
555
615
  errors: ErrorResponse[];
556
616
  pagination?: PaginationMeta;
557
617
  injectIdempotencyKey: boolean;
558
618
  deprecated?: boolean;
559
619
  async?: boolean;
560
- /** Per-operation security overrides. When present, overrides the global spec-level security. */
561
- security?: SecurityRequirement[];
620
+ /**
621
+ * Per-operation security requirements, mirroring the OpenAPI document:
622
+ * - `undefined` — the operation declares nothing and inherits
623
+ * `ApiSpec.security` (which may itself be `undefined`).
624
+ * - `[]` — `security: []`: the operation needs no authentication.
625
+ * - otherwise one `SecurityRequirementSet` per requirement object; the
626
+ * request must satisfy any one set, and every scheme within it.
627
+ */
628
+ security?: SecurityRequirementSet[];
562
629
  /**
563
630
  * Mutually-exclusive parameter groups parsed from `x-mutually-exclusive-parameter-groups`.
564
631
  * Each group represents a logical choice the caller must (or may) make between
@@ -627,8 +694,84 @@ interface PaginationMeta {
627
694
  limitParam?: string;
628
695
  dataPath?: string;
629
696
  itemType: TypeRef;
697
+ /**
698
+ * Every property the list envelope carries besides the data array, in
699
+ * document order: the pagination companion (`list_metadata`, `pagination`,
700
+ * `has_more`, …) and any discriminant such as `object: "list"`. Together
701
+ * with `dataPath` and `itemType` this is the envelope's full shape, so an
702
+ * emitter can type what the endpoint returns and read the page details it
703
+ * needs for the next request without parsing the document itself.
704
+ *
705
+ * An inline companion object is lifted to a model. Because the same envelope
706
+ * recurs on every list endpoint of an API, copies that agree structurally
707
+ * share one model named from the property alone (`list_metadata` →
708
+ * `ListMetadata`, or the component schema of that name when one exists); a
709
+ * copy whose shape differs keeps an operation-qualified name
710
+ * (`ListUsersListMetadata`) so it can never change another type's shape.
711
+ *
712
+ * Absent when the response is a bare array, or when pagination was inferred
713
+ * from query parameters alone and no envelope was detected.
714
+ */
715
+ envelopeFields?: Field[];
630
716
  }
631
717
  type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'head' | 'options' | 'trace';
718
+ /**
719
+ * JSON Schema validation keywords declared directly on a schema, carried so an
720
+ * emitter can document a value's limits ("at most 100"), check a value before
721
+ * sending it, or keep a generated example within range. Every member is
722
+ * optional and present only when the document declares it; a schema with no
723
+ * validation keyword has no `constraints` at all.
724
+ *
725
+ * Numeric bounds use the OpenAPI 3.1 / JSON Schema 2020-12 shape, where
726
+ * `exclusiveMinimum` / `exclusiveMaximum` are the bound itself. OpenAPI 3.0
727
+ * spells them as booleans that make `minimum` / `maximum` exclusive; the
728
+ * parser normalizes that form, so `{ minimum: 0, exclusiveMinimum: true }`
729
+ * arrives as `{ exclusiveMinimum: 0 }` with no `minimum`, and a `false` is
730
+ * dropped. Emitters read one shape whichever version produced it.
731
+ *
732
+ * The keywords on the field, parameter or model schema itself are carried,
733
+ * conjoined with those of its inline `allOf` members (a single-member
734
+ * `allOf` is unwrapped by the parser, so its limit is the value's own; a
735
+ * `$ref` member contributes the keywords written beside the reference while
736
+ * the referenced model keeps its own). Limits nested inside array `items` or
737
+ * map values are not carried. A nullable wrapper — `oneOf`/`anyOf` with a
738
+ * single non-null, non-`$ref` branch — conjoins that branch's keywords with
739
+ * its own; limits on a general multi-variant union are not carried.
740
+ */
741
+ interface Constraints {
742
+ /** Inclusive lower bound (`minimum`). */
743
+ minimum?: number;
744
+ /** Inclusive upper bound (`maximum`). */
745
+ maximum?: number;
746
+ /** Exclusive lower bound as a number; the OAS 3.0 boolean form is normalized to this. */
747
+ exclusiveMinimum?: number;
748
+ /** Exclusive upper bound as a number; the OAS 3.0 boolean form is normalized to this. */
749
+ exclusiveMaximum?: number;
750
+ /** The value must be an integer multiple of this (`multipleOf`). */
751
+ multipleOf?: number;
752
+ /** Minimum string length in characters (`minLength`). */
753
+ minLength?: number;
754
+ /** Maximum string length in characters (`maxLength`). */
755
+ maxLength?: number;
756
+ /** ECMA-262 regular expression the string must match (`pattern`), verbatim from the document. */
757
+ pattern?: string;
758
+ /** Minimum number of array items (`minItems`). */
759
+ minItems?: number;
760
+ /** Maximum number of array items (`maxItems`). */
761
+ maxItems?: number;
762
+ /** Present, and `true`, when array items must be unique; `uniqueItems: false` restates the default and is dropped. */
763
+ uniqueItems?: boolean;
764
+ /** Minimum number of items matching the schema's `contains` (`minContains`). */
765
+ minContains?: number;
766
+ /** Maximum number of items matching the schema's `contains` (`maxContains`). */
767
+ maxContains?: number;
768
+ /** Minimum number of object properties (`minProperties`). */
769
+ minProperties?: number;
770
+ /** Maximum number of object properties (`maxProperties`). */
771
+ maxProperties?: number;
772
+ /** Property name → properties that must also be present when it is (`dependentRequired`). */
773
+ dependentRequired?: Record<string, string[]>;
774
+ }
632
775
  interface Parameter {
633
776
  name: string;
634
777
  type: TypeRef;
@@ -636,9 +779,32 @@ interface Parameter {
636
779
  description?: string;
637
780
  deprecated?: boolean;
638
781
  default?: unknown;
782
+ /**
783
+ * A single illustrative value, resolved level by level: the parameter's own
784
+ * `example` (else the first entry of its `examples` map), then its inline
785
+ * schema's `example` (else the first of its `examples` list), then the same
786
+ * on the component schema its `$ref` points at. A level with neither falls
787
+ * through; an explicit `null` is kept. Absent when no level gives one.
788
+ */
639
789
  example?: unknown;
790
+ /**
791
+ * Every example value the document gives, in document order: the
792
+ * parameter's `examples` map of Example Objects (each entry's `value`, with
793
+ * `$ref`s resolved against `components.examples`), else the JSON Schema
794
+ * `examples` list on its inline schema, else the list on the component
795
+ * schema its `$ref` points at. Present only when at least one value exists.
796
+ */
797
+ examples?: unknown[];
640
798
  style?: 'form' | 'simple' | 'label' | 'matrix';
641
799
  explode?: boolean;
800
+ /**
801
+ * Validation keywords from the parameter's schema. When that schema is a
802
+ * `$ref`, the target's keywords are merged underneath the parameter's own
803
+ * — the per-value fallback `default` and `example` use — so a parameter
804
+ * can be read on its own without chasing the fieldless alias model the
805
+ * target also becomes. Absent when neither declares any.
806
+ */
807
+ constraints?: Constraints;
642
808
  }
643
809
  /** Type reference — the core type system of the IR */
644
810
  type TypeRef = PrimitiveType | ArrayType | ModelRef | EnumRef | UnionType | NullableType | LiteralType | MapType;
@@ -711,6 +877,12 @@ interface Model {
711
877
  property: string;
712
878
  mapping: Record<string, string>;
713
879
  };
880
+ /**
881
+ * Validation keywords declared on the model's own schema — for an object
882
+ * schema, `minProperties`, `maxProperties` and `dependentRequired`. Absent
883
+ * when the schema declares none.
884
+ */
885
+ constraints?: Constraints;
714
886
  }
715
887
  interface Field {
716
888
  name: string;
@@ -730,7 +902,27 @@ interface Field {
730
902
  writeOnly?: boolean;
731
903
  deprecated?: boolean;
732
904
  default?: unknown;
905
+ /**
906
+ * A single illustrative value. The field schema's `example` when present,
907
+ * otherwise the first entry of its `examples`; when the schema is a `$ref`
908
+ * with neither, the same taken from the component it points at. An
909
+ * explicit `null` is kept. Absent when no level gives one.
910
+ */
733
911
  example?: unknown;
912
+ /**
913
+ * Every example value the schema gives, in document order, from the JSON
914
+ * Schema `examples` list (OAS 3.1 deprecates `example` in its favour) —
915
+ * on the field schema, else on the component its `$ref` points at.
916
+ * Present only when the list has at least one entry.
917
+ */
918
+ examples?: unknown[];
919
+ /**
920
+ * Validation keywords declared on the field's schema, including any
921
+ * written beside a `$ref` (OpenAPI 3.1 allows siblings). Absent when the
922
+ * schema declares none; a bare `$ref` yields none, since the referenced
923
+ * model carries its own limits.
924
+ */
925
+ constraints?: Constraints;
734
926
  }
735
927
  /** Enum definition */
736
928
  interface Enum {
@@ -829,15 +1021,41 @@ declare function validateModelHints(models: Model[], services: Service[], hints:
829
1021
  * Collect all model names referenced as request bodies across all services.
830
1022
  */
831
1023
  declare function collectRequestBodyModels(services: Service[]): Set<string>;
1024
+ /**
1025
+ * Every response header an operation declares: the primary response's, each
1026
+ * alternate success entry's, and each error entry's. The primary list is the
1027
+ * same array as its `successResponses` entry when both exist, so it is yielded
1028
+ * once. Every pass that walks an operation's type refs (reachability, model
1029
+ * assignment, ref rewriting and validation, direction, compat filtering, enum
1030
+ * collection) goes through this so a type reached only through a header is
1031
+ * treated the way a body or parameter type is.
1032
+ */
1033
+ declare function collectResponseHeaders(op: Operation): ResponseHeader[];
1034
+ /**
1035
+ * A header a response declares, typed like a parameter. `name` is kept exactly
1036
+ * as written in the spec (e.g. `Content-Disposition`); emitters apply their
1037
+ * own casing.
1038
+ */
1039
+ interface ResponseHeader {
1040
+ name: string;
1041
+ type: TypeRef;
1042
+ required: boolean;
1043
+ description?: string;
1044
+ deprecated?: boolean;
1045
+ }
832
1046
  interface ErrorResponse {
833
1047
  statusCode: number;
834
1048
  type?: TypeRef;
1049
+ /** Declared response headers. Present only when the spec declares at least one. */
1050
+ headers?: ResponseHeader[];
835
1051
  }
836
1052
  /** A successful response entry from a 2xx status code */
837
1053
  interface SuccessResponse {
838
1054
  statusCode: number;
839
1055
  type: TypeRef;
1056
+ /** Declared response headers. Present only when the spec declares at least one. */
1057
+ headers?: ResponseHeader[];
840
1058
  }
841
1059
  //#endregion
842
- export { AdditiveChangeCategory as $, collectEnumRefs as A, CompatSnapshot as At, ErrorPolicy as B, ALL_LANGUAGE_IDS as Bt, Service as C, MethodOverlay as Ct, UnionType as D, ViolationSeverity as Dt, TypeRef as E, ViolationCategory as Et, validateModelHints as F, CompatTypeRef as Ft, RequestGuardPolicy as G, LogEvent as H, getDefaultPolicy as Ht, walkTypeRef as I, CompatVisibility as It, TelemetryPolicy as J, RetryPolicy as K, AiAgentEnvVar as L, LanguageId as Lt, collectModelRefs as M, CompatStability as Mt, collectRequestBodyModels as N, CompatSymbol as Nt, assertNever as O, CompatParameter as Ot, mapTypeRef as P, CompatSymbolKind as Pt, mergeSdkBehavior as Q, BackoffStrategy as R, ParameterSensitivity as Rt, ServerEntry as S, LanguageHints as St, TypeParam as T, Violation as Tt, LoggingPolicy as U, mergePolicy as Ut, IdempotencyPolicy as V, CompatPolicyHints as Vt, PaginationPolicy as W, UserAgentPolicy as X, TimeoutPolicy as Y, defaultSdkBehavior as Z, Parameter as _, ApiProperty as _t, EnumRef as a, CompatFailLevel as at, PrimitiveType as b, DiffResult as bt, Field as c, defaultSeverityForCategory as ct, MapType as d, ApiClass as dt, BreakingChangeCategory as et, Model as f, ApiEnum as ft, PaginationMeta as g, ApiParam as gt, Operation as h, ApiMethod as ht, Enum as i, CompatConfig as it, collectFieldDependencies as j, CompatSourceKind as jt, assignModelsToServices as k, CompatPassingStyle as kt, HttpMethod as l, severityMeetsThreshold as lt, NullableType as m, ApiInterface as mt, ArrayType as n, CompatChangeCategory as nt, EnumValue as o, CompatProvenance as ot, ModelRef as p, ApiField as pt, SdkBehavior as q, AuthScheme as r, CompatChangeSeverity as rt, ErrorResponse as s, SoftRiskChangeCategory as st, ApiSpec as t, CompatApproval as tt, LiteralType as u, Addition as ut, ParameterGroup as v, ApiSurface as vt, SuccessResponse as w, OverlayLookup as wt, SecurityRequirement as x, Extractor as xt, ParameterGroupVariant as y, ApiTypeAlias as yt, DeepPartial as z, apiSurfaceToSnapshot as zt };
843
- //# sourceMappingURL=types-yrBidOg3.d.mts.map
1060
+ export { TimeoutPolicy as $, UnionType as A, ViolationCategory as At, walkTypeRef as B, CompatVisibility as Bt, SecurityRequirement as C, ApiTypeAlias as Ct, SuccessResponse as D, MethodOverlay as Dt, Service as E, LanguageHints as Et, collectModelRefs as F, CompatSourceKind as Ft, IdempotencyPolicy as G, CompatPolicyHints as Gt, BackoffStrategy as H, ParameterSensitivity as Ht, collectRequestBodyModels as I, CompatStability as It, PaginationPolicy as J, LogEvent as K, getDefaultPolicy as Kt, collectResponseHeaders as L, CompatSymbol as Lt, assignModelsToServices as M, CompatParameter as Mt, collectEnumRefs as N, CompatPassingStyle as Nt, TypeParam as O, OverlayLookup as Ot, collectFieldDependencies as P, CompatSnapshot as Pt, TelemetryPolicy as Q, mapTypeRef as R, CompatSymbolKind as Rt, ResponseHeader as S, ApiSurface as St, ServerEntry as T, Extractor as Tt, DeepPartial as U, apiSurfaceToSnapshot as Ut, AiAgentEnvVar as V, LanguageId as Vt, ErrorPolicy as W, ALL_LANGUAGE_IDS as Wt, RetryPolicy as X, RequestGuardPolicy as Y, SdkBehavior as Z, PaginationMeta as _, ApiField as _t, Enum as a, CompatApproval as at, ParameterGroupVariant as b, ApiParam as bt, ErrorResponse as c, CompatConfig as ct, LiteralType as d, SoftRiskChangeCategory as dt, UserAgentPolicy as et, MapType as f, defaultSeverityForCategory as ft, Operation as g, ApiEnum as gt, NullableType as h, ApiClass as ht, Constraints as i, BreakingChangeCategory as it, assertNever as j, ViolationSeverity as jt, TypeRef as k, Violation as kt, Field as l, CompatFailLevel as lt, ModelRef as m, Addition as mt, ArrayType as n, mergeSdkBehavior as nt, EnumRef as o, CompatChangeCategory as ot, Model as p, severityMeetsThreshold as pt, LoggingPolicy as q, mergePolicy as qt, AuthScheme as r, AdditiveChangeCategory as rt, EnumValue as s, CompatChangeSeverity as st, ApiSpec as t, defaultSdkBehavior as tt, HttpMethod as u, CompatProvenance as ut, Parameter as v, ApiInterface as vt, SecurityRequirementSet as w, DiffResult as wt, PrimitiveType as x, ApiProperty as xt, ParameterGroup as y, ApiMethod as yt, validateModelHints as z, CompatTypeRef as zt };
1061
+ //# sourceMappingURL=types-I7W7CNl1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-I7W7CNl1.d.mts","names":["_$__ir_js0.CompatPassingStyle","_$__ir_js0.CompatSnapshot"],"sources":["../src/compat/policy.ts","../src/compat/ir.ts","../src/compat/types.ts","../src/compat/config.ts","../src/ir/sdk-behavior.ts","../src/ir/types.ts"],"mappings":";;UAWiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;iBA0Fc,iBAAiB,UAAU,aAAa;;iBAKxC,YAAY,UAAU,mBAAmB,WAAW,QAAQ,qBAAqB;;cAKpF,2BAA2B;;;;KChH5B;;UAGK;EACf;EACA;IACE;IACA;;;IAGA,WAAW;;EAEb,UAAU;EACV,SAAS;;;KAIC;;KAWA;;KAGA;;KAGA;;UAQK;EACf;EACA,MAAM;EACN;EACA;EACA;EACA,YAAY;EACZ,WAAW;EACX,YAAY;EACZ;EACA;EACA;IACE;IACA;;EAEF,aAAa;EACb,UAAU;;EAEV,UAAU;;EAEV;;;;EAIA;;EAEA;;;KAIU;;UASK;EACf;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT,MAAM;EACN,aAAa;;;UAIE;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;;;;;;;iBAiBc,qBAAqB,SAAS,aAAa;;;UCtI1C;EACf;EACA;EACA;EACA,SAAS,eAAe;EACxB,YAAY,eAAe;EAC3B,aAAa,eAAe;EAC5B,OAAO,eAAe;EACtB,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KAAK;EACb,aAAa,KAAK;EAClB,WAAW,KAAK;;;;;;;;iBAwCJ,WAAW,GACzB,KAAK,SACL;EACE,YAAY,KAAK,kBAAkB;EACnC,QAAQ,KAAK,WAAW,aAAa,MAAM;EAC3C,QAAQ,KAAK,aAAa;EAC1B,OAAO,KAAK,YAAY;EACxB,QAAQ,KAAK,WAAW,gBAAgB,QAAQ;EAChD,WAAW,KAAK,cAAc,aAAa,MAAM;EACjD,UAAU,KAAK,gBAAgB;EAC/B,MAAM,KAAK,SAAS,aAAa,GAAG,YAAY,MAAM;IAEvD;;;;iBAmCa,iBAAiB,KAAK;;;;iBAStB,gBAAgB,KAAK;;;;;iBAUrB,yBAAyB,OAAO;EAC9C,QAAQ;EACR,OAAO;;;;;;;;;;;;;;;;iBA+BO,uBACd,QAAQ,SACR,UAAU,WACV,QAAQ,yBACP;;;;;;;iBAuFa,mBAAmB,QAAQ,SAAS,UAAU,WAAW,OAAO;;;;iBAwBhE,yBAAyB,UAAU,YAAY;;;;;;;;;;iBAuB/C,uBAAuB,IAAI,YAAY;;;;;;UAqBtC;EACf;EACA,MAAM;EACN;EACA;EACA;;UAGe;EACf;EACA,OAAO;;EAEP,UAAU;;;UAIK;EACf;EACA,MAAM;;EAEN,UAAU"}
@@ -1,6 +1,5 @@
1
- import { Tt as Violation, Vt as CompatPolicyHints, t as ApiSpec, vt as ApiSurface } from "../types-yrBidOg3.mjs";
2
- import { t as CompatDiffResult } from "../differ-DHldxZMr.mjs";
3
-
1
+ import { Gt as CompatPolicyHints, St as ApiSurface, kt as Violation, t as ApiSpec } from "../types-I7W7CNl1.mjs";
2
+ import { t as CompatDiffResult } from "../differ-B0DSuKUZ.mjs";
4
3
  //#region src/verify/types.d.ts
5
4
  interface VerifyDiagnostics {
6
5
  compatCheck?: {
@@ -53,10 +52,10 @@ interface StalenessCheckResult {
53
52
  }
54
53
  //#endregion
55
54
  //#region src/verify/run-compat-check.d.ts
56
- declare function runCompatCheck(baseline: ApiSurface, outputDir: string, lang: string, spec?: ApiSpec, policyOverrides?: Partial<CompatPolicyHints>): Promise<CompatCheckResult>;
55
+ export declare function runCompatCheck(baseline: ApiSurface, outputDir: string, lang: string, spec?: ApiSpec, policyOverrides?: Partial<CompatPolicyHints>): Promise<CompatCheckResult>;
57
56
  //#endregion
58
57
  //#region src/verify/run-overlay-retry-loop.d.ts
59
- declare function runOverlayRetryLoop(opts: {
58
+ export declare function runOverlayRetryLoop(opts: {
60
59
  baseline: ApiSurface;
61
60
  parsedSpec: ApiSpec;
62
61
  outputDir: string;
@@ -67,10 +66,10 @@ declare function runOverlayRetryLoop(opts: {
67
66
  }): Promise<OverlayRetryResult>;
68
67
  //#endregion
69
68
  //#region src/verify/run-staleness-check.d.ts
70
- declare function runStalenessCheck(baseline: ApiSurface, oldSpec: ApiSpec, newSpec: ApiSpec, lang: string): StalenessCheckResult;
69
+ export declare function runStalenessCheck(baseline: ApiSurface, oldSpec: ApiSpec, newSpec: ApiSpec, lang: string): StalenessCheckResult;
71
70
  //#endregion
72
71
  //#region src/verify/run-smoke-check.d.ts
73
- declare function runSmokeCheck(opts: {
72
+ export declare function runSmokeCheck(opts: {
74
73
  spec?: string;
75
74
  lang: string;
76
75
  output: string;
@@ -79,5 +78,5 @@ declare function runSmokeCheck(opts: {
79
78
  smokeRunner?: string;
80
79
  }): SmokeCheckResult;
81
80
  //#endregion
82
- export { type VerifyDiagnostics, runCompatCheck, runOverlayRetryLoop, runSmokeCheck, runStalenessCheck };
81
+ export type { VerifyDiagnostics };
83
82
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/verify/types.ts","../../src/verify/run-compat-check.ts","../../src/verify/run-overlay-retry-loop.ts","../../src/verify/run-staleness-check.ts","../../src/verify/run-smoke-check.ts"],"mappings":";;;;UAGiB,iBAAA;EACf,WAAA;IACE,oBAAA;IACA,gBAAA;IACA,iBAAA;IACA,oBAAA,EAAsB,MAAA;IACtB,oBAAA,EAAsB,MAAA;IACtB,SAAA;IACA,YAAA;IACA,iBAAA;EAAA;EAEF,cAAA;IACE,gBAAA;IACA,YAAA;EAAA;EAEF,UAAA;IACE,MAAA;IACA,aAAA;IACA,aAAA;EAAA;EAEF,SAAA;IACE,QAAA;IACA,SAAA;IACA,UAAA;IACA,mBAAA;EAAA;AAAA;AAAA,UAIa,iBAAA;EACf,MAAA;EACA,IAAA,EAAM,gBAAA;EACN,YAAA;EACA,iBAAA;AAAA;AAAA,UAGe,kBAAA;EACf,MAAA;EACA,QAAA;EACA,mBAAA;EACA,YAAA,EAAc,iBAAA;AAAA;AAAA,UAGC,gBAAA;EACf,MAAA;EACA,aAAA;EACA,aAAA;EACA,YAAA;EACA,iBAAA;AAAA;AAAA,UAGe,oBAAA;EACf,UAAA,EAAY,SAAA;AAAA;;;iBCrCQ,cAAA,CACpB,QAAA,EAAU,UAAA,EACV,SAAA,UACA,IAAA,UACA,IAAA,GAAO,OAAA,EACP,eAAA,GAAkB,OAAA,CAAQ,iBAAA,IACzB,OAAA,CAAQ,iBAAA;;;iBCqCW,mBAAA,CAAoB,IAAA;EACxC,QAAA,EAAU,UAAA;EACV,UAAA,EAAY,OAAA;EACZ,SAAA;EACA,IAAA;EACA,UAAA;EACA,SAAA;EACA,OAAA,IAAW,aAAA,UAAuB,UAAA,UAAoB,cAAA;AAAA,IACpD,OAAA,CAAQ,kBAAA;;;iBC9DI,iBAAA,CACd,QAAA,EAAU,UAAA,EACV,OAAA,EAAS,OAAA,EACT,OAAA,EAAS,OAAA,EACT,IAAA,WACC,oBAAA;;;iBCca,aAAA,CAAc,IAAA;EAC5B,IAAA;EACA,IAAA;EACA,MAAA;EACA,UAAA;EACA,WAAA;EACA,WAAA;AAAA,IACE,gBAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/verify/types.ts","../../src/verify/run-compat-check.ts","../../src/verify/run-overlay-retry-loop.ts","../../src/verify/run-staleness-check.ts","../../src/verify/run-smoke-check.ts"],"mappings":";;;UAGiB;EACf;IACE;IACA;IACA;IACA,sBAAsB;IACtB,sBAAsB;IACtB;IACA;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;UAIa;EACf;EACA,MAAM;EACN;EACA;;UAGe;EACf;EACA;EACA;EACA,cAAc;;UAGC;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf,YAAY;;;;wBCrCQ,eACpB,UAAU,YACV,mBACA,cACA,OAAO,SACP,kBAAkB,QAAQ,qBACzB,QAAQ;;;wBCqCW,oBAAoB;EACxC,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA;EACA,WAAW,uBAAuB,oBAAoB;IACpD,QAAQ;;;wBC9DI,kBACd,UAAU,YACV,SAAS,SACT,SAAS,SACT,eACC;;;wBCca,cAAc;EAC5B;EACA;EACA;EACA;EACA;EACA;IACE"}