export interface WHIPResult { answerSDP: string; sessionURL: string; /** ETag identifying the ICE session (RFC 9725 §4.3.1); needed to PATCH it. */ etag: string; /** * Single-use credential for reattaching a later redial to this * conversation. Empty when the server cannot resume — a realtime * (speech-to-speech) session, whose history lives inside the provider. */ resumeToken: string; /** * "new", "resumed", or "expired". Anything but "resumed" on a redial means * the agent has no memory of the earlier conversation. */ resumeStatus: string; } /** * Opens a WHIP session (RFC 9725 §4.2). * * `resumeToken` is a StreamCore extension: it asks the server to reattach this * new transport to the conversation a previous connection was having, rather * than starting a fresh one. Check `resumeStatus` on the result — a token the * server no longer recognises still yields a working call, but one whose agent * remembers nothing. */ export declare function whipOffer(whipUrl: string, offerSDP: string, token?: string, resumeToken?: string): Promise; export interface WHIPRestartResult { /** The server's reply fragment, to fold into the stored remote description. */ fragment: string; /** The rotated ETag identifying the new ICE session. */ etag: string; } /** * Thrown when a PATCH is rejected. `status` lets the caller tell a retryable * failure from a terminal one — a 404 or 409 means the session is gone and no * amount of retrying will bring it back. */ export declare class WHIPRestartError extends Error { readonly status: number; /** ETag the server reported as current, present on a 412. */ readonly currentEtag: string; constructor(status: number, message: string, currentEtag?: string); /** Whether another attempt against the same session could still succeed. */ get retryable(): boolean; } /** * Sends an ICE restart to the session URL per RFC 9725 §4.4.2. * * `etag` is sent as `If-Match` so a restart racing another one is rejected * rather than applied to a generation that no longer exists. */ export declare function whipRestartIce(sessionURL: string, fragment: string, etag?: string, token?: string): Promise; export declare function whipDelete(sessionURL: string, token?: string): Promise; //# sourceMappingURL=whip.d.ts.map