import type { RealtimeOptions, RealtimeSecret, Realtime as RealtimeState } from "../../client/types.gen.js"; import type { CallOptions, RequestContext } from "../context.js"; import { type Outcome } from "../result.js"; export type RealtimeGetParams = { projectId: string; branchId: string; }; export type RealtimeEnableParams = RealtimeGetParams & RealtimeOptions; export type RealtimeDisableParams = RealtimeGetParams; export type RealtimeSecretParams = RealtimeGetParams; export type RealtimeRotateSecretParams = RealtimeGetParams; /** * Branch-scoped Realtime. Enable, disable, and rotate are asynchronous: with * `waitForReadiness` they poll {@link Realtime.get} until `pending` is `false`, otherwise * they resolve once the API has queued the change. */ export declare class Realtime { #private; constructor(ctx: RequestContext); /** @apiCall GET /projects/{project_id}/branches/{branch_id}/realtime */ get(params: RealtimeGetParams): Promise>; get(params: RealtimeGetParams, opts: CallOptions): Promise>; /** * Enable Realtime, or apply new options to a branch that already has it. Waits until * the change is applied unless `waitForReadiness` is `false`. * * @apiCall POST /projects/{project_id}/branches/{branch_id}/realtime */ enable(params: RealtimeEnableParams): Promise>; enable(params: RealtimeEnableParams, opts: CallOptions): Promise>; /** * Disable Realtime and discard the branch's shared secret. * * @apiCall DELETE /projects/{project_id}/branches/{branch_id}/realtime */ disable(params: RealtimeDisableParams): Promise>; disable(params: RealtimeDisableParams, opts: CallOptions): Promise>; /** * Read the server-only secret the application backend seals Realtime queries with. * * @apiCall GET /projects/{project_id}/branches/{branch_id}/realtime/secret */ secret(params: RealtimeSecretParams): Promise>; secret(params: RealtimeSecretParams, opts: CallOptions): Promise>; /** * Replace the shared secret. `secret()` returns the new value once `pending` is `false`. * * @apiCall POST /projects/{project_id}/branches/{branch_id}/realtime/rotate_secret */ rotateSecret(params: RealtimeRotateSecretParams): Promise>; rotateSecret(params: RealtimeRotateSecretParams, opts: CallOptions): Promise>; } //# sourceMappingURL=realtime.d.ts.map