export type AppleRelayResponse = { status: number; statusText: string; headers?: Record; body?: T; rawBody?: string; rawBodyBase64?: string; }; /** * The browser side of Limrun's Apple relay: a WebSocket that proxies * requests to Apple's login, Developer Portal and App Store Connect * endpoints while the session cookies stay on the relay. Response bytes * always come back to the browser; the relay stores nothing. */ export declare class AppleRelayWebSocketClient { private readonly apiUrl; private readonly token?; private readonly organizationId?; private socket?; private nextId; private readonly pending; constructor(apiUrl: string, token?: string | undefined, organizationId?: string | undefined); connect(): Promise; request(type: string, payload?: unknown): Promise>; close(): void; private handleMessage; private rejectPending; } export declare function openAppleRelayWebSocket(apiUrl: string, token?: string, organizationId?: string): Promise; /** Fetches the Apple account session, which primes the relay's portal cookies. */ export declare function fetchAppleAccountSession(relay: AppleRelayWebSocketClient): Promise>;