export type ProxyLookupType = "domain" | "routing" | "access"; export interface ProjectLookupEnvironment { id: string; name: string; domains?: string[]; active_release_id?: string | null; protected?: boolean; } export interface ProjectRoutingLookupResult { id: string; slug: string; environments: ProjectLookupEnvironment[]; } export interface ProjectAccessLookupResult { id: string; slug: string; users?: Array<{ id: string; }>; environments: ProjectLookupEnvironment[]; } export interface DomainLookupResult extends ProjectRoutingLookupResult { users?: Array<{ id: string; }>; } interface ProjectMetadataLogger { debug(message: string, extra?: Record): void; } export interface ProjectMetadataClientOptions { apiBaseUrl: string; fetchImpl?: typeof fetch; logger?: ProjectMetadataLogger; timeoutMs?: number; maxInflight?: number; } export interface ProjectMetadataLookupOptions { signal?: AbortSignal; } export interface ProjectMetadataClient { lookupDomain(lookupKey: string, token: string, options?: ProjectMetadataLookupOptions): Promise; lookupRouting(lookupKey: string, token: string, options?: ProjectMetadataLookupOptions): Promise; lookupAccess(lookupKey: string, token: string, includeUsers: boolean, options?: ProjectMetadataLookupOptions): Promise; } export declare class ProxyLookupAuthError extends Error { readonly lookupType: ProxyLookupType; readonly status: 401 | 403; constructor(lookupType: ProxyLookupType, status: 401 | 403); } export interface ProxyLookupFailureUpstreamContext { /** HTTP status returned by the metadata API for the failed lookup. */ upstreamStatus?: number; } export declare class ProxyLookupFailure extends Error { readonly lookupType: ProxyLookupType; readonly publicStatus: 502 | 503 | 504; readonly upstreamStatus?: number; constructor(lookupType: ProxyLookupType, publicStatus: 502 | 503 | 504, message: string, options?: ErrorOptions & ProxyLookupFailureUpstreamContext); } export declare function normalizeProjectLookupKey(value: string): string; export declare function createProjectMetadataClient(options: ProjectMetadataClientOptions): ProjectMetadataClient; export declare const PROJECT_METADATA_RESPONSE_LIMIT_BYTES: number; export {}; //# sourceMappingURL=project-metadata-client.d.ts.map