/** * The three ways `buildApiContracts` refuses to emit a green, wrong `apiContracts` table. * * All three share one rule: an entry that is PRESENT but incomplete is worse than an absent one. * Every other entry in the table is complete, so a consumer has no reason to suspect the one that * lost a field — it just computes a confidently wrong URL, or draws a service with no queues. * * Each aggregates EVERY offender into one message rather than throwing on the first: an author who * moved a constants module broke five decorators at once and wants all five named in one run. * * Split out of api-scanner.ts, which owns the scan itself and is at its file-size limit. */ import { EmptiedApiContract, UndeclaredExternalCaller, UnresolvedEndpointPath } from './api-relations'; /** * A routed contract whose `@ApiPath` argument the scan could not read. Fatal on purpose: shipping the * entry without its basePath is what made `/whatsapp/test` render as `/test` in a downstream runbook. */ export declare class MissingBasePathError extends Error { readonly contracts: readonly string[]; constructor(contracts: readonly string[]); } /** * `@Endpoint` paths the scan could not read. Fatal for the same reason MissingBasePathError is: the * two arguments are the two halves of ONE url. An http client builds its request as * `basePath + path`, so a contract shipped without a method's path is missing routing information, * and the consumer computes a confidently wrong URL. Skipping the method instead was worse still — * a class whose every path was an unreadable constant lost every method and vanished from the graph. */ export declare class UnresolvedEndpointPathError extends Error { readonly paths: readonly UnresolvedEndpointPath[]; constructor(paths: readonly UnresolvedEndpointPath[]); } /** * `external` endpoints whose CALLER the scan could not read. Fatal, like the two above, because the * alternative is a diagram that lies by omission: the inbound box exists solely to name the system * calling us from outside, and with nothing to name it falls back to restating our own contract * name — which the reader already sees on the service box the arrow points at. * * `@Endpoint`'s TS overloads make `calledBy` a compile error to omit, so a scan reaching here saw a * JS caller, an `as any`, a cross-module constant this parser-only pass cannot fold, or a * `callerKind` that is not one of the declared kinds. */ export declare class UndeclaredExternalCallerError extends Error { readonly callers: readonly UndeclaredExternalCaller[]; constructor(callers: readonly UndeclaredExternalCaller[]); } /** * Contract classes that declared `@Endpoint` methods and kept none of them. Fatal because the * alternative is the silent drop the api scan exists to close: buildApiContracts legitimately skips * a zero-method class (a vendor seam has no routes), and a class gutted by unreadable decorator * arguments used the very same exit — which is how a service lost two real Cloud Tasks queues and an * inbound webhook without a single line of output. */ export declare class EmptiedApiContractError extends Error { readonly contracts: readonly EmptiedApiContract[]; constructor(contracts: readonly EmptiedApiContract[]); }