import type { AbstractController } from '../../AbstractController.ts';
import type { AbstractApiController } from '../../api-contracts/AbstractApiController.ts';
import type { GatewayMetadataValue } from '../gatewayMetadata.ts';
import { type GatewayManifest } from './manifestSchema.ts';
export type BuildGatewayManifestOptions = {
    /** Logical service name written into the manifest. */
    service: string;
    /** Optional service/release version (e.g. git SHA, semver) for traceability. */
    version?: string;
    /** Service-wide metadata defaults; merged underneath controller- and route-level metadata. */
    defaults?: GatewayMetadataValue;
};
/**
 * Anything resolved from the DI container that may carry routes + gateway defaults.
 * Either `AbstractController` (REST) or `AbstractApiController` (api-contracts).
 *
 * The contract generic on `AbstractController` is erased here on purpose — the
 * manifest builder treats every route as a `RouteOptions` and reads the
 * gateway-metadata symbol regardless of contract shape.
 */
type CollectedController = {
    name: string;
    kind: 'rest';
    controller: AbstractController<any>;
} | {
    name: string;
    kind: 'api';
    controller: AbstractApiController<any>;
};
/**
 * Pure manifest builder. Takes already-resolved controllers; performs no DI.
 *
 * Used by `DIContext.buildGatewayManifest()` after it resolves controllers from
 * the container. Exposed separately for unit testing without spinning up a DI
 * context.
 */
export declare function buildGatewayManifestFrom(controllers: ReadonlyArray<CollectedController>, options: BuildGatewayManifestOptions): GatewayManifest;
export type { CollectedController };
