/** * APIClaw Gateway Client - Thin HTTP client for the Intelligent Gateway * * Routes all API execution through POST /v1/execute on Convex, * replacing local executeOpenAPI / executeMetered calls. */ export interface GatewayResponse { success: boolean; provider: string; action: string; data?: any; error?: string; /** Stable machine-readable gateway error code. */ code?: string; /** Gateway request identity when one was assigned. */ requestId?: string; /** * Present when the client cannot know whether the gateway accepted the * operation. Callers must retain this key and must not create a new one for * the same logical operation. */ idempotencyKey?: string; outcomeUnknown?: boolean; retryable?: boolean; cost?: number; /** * Set when the gateway rejected the call because the workspace was missing * (authMethod=anonymous in enforce mode). Carries the signup nudge fields * so the MCP server can surface a clean message instead of raw JSON. */ authRequired?: { message: string; signupUrl: string; docsUrl?: string; }; _apiclaw?: { latencyMs: number; route: string; gateway: boolean; model?: string; authMode?: string; credentialSource?: string; }; } export interface GatewayExecuteOptions { workspaceId?: string; sessionToken?: string; stream?: boolean; routeOverride?: string; idempotencyKey?: string; } /** * Managed execution always uses the billing gateway. A local environment * switch previously allowed direct provider calls that bypassed the atomic * allowance and cost ledger, so managed routing is no longer optional. */ export declare function isGatewayEnabled(): boolean; export declare class GatewayClient { private baseUrl; private internalSecret; constructor(); execute(provider: string, action: string, params: Record, options?: GatewayExecuteOptions): Promise; /** * Perform a single fetch with timeout. Returns null on network error. */ private doFetch; } export declare function getGateway(): GatewayClient; //# sourceMappingURL=gateway-client.d.ts.map