export interface WaitView { id: string; match: { method?: string; path?: string; field?: { path: string; equals: string; }; }; /** 'url' delivers to callbackUrl; 'email'/'push' notify the owner. */ destination?: 'url' | 'email' | 'push'; /** Only fire on requests whose inbound signature verified 'valid'. */ requireVerified?: boolean; callbackUrl: string | null; /** Delivery transform: template delivered instead of the capture envelope. */ transform?: { body: string; contentType?: string | null; } | null; /** Script transform: user JS run per match in a no-egress isolate. */ script?: { source: string; contentType?: string | null; } | null; scriptSha?: string; /** 'paused' = the callback kept failing; remove and re-add to reset. */ status: 'active' | 'paused'; createdAt: string; /** Null: the rule lives until removed. */ expiresAt: string | null; deliveredCount: number; lastDelivery?: { at: string; ok: boolean; method: string; path: string; }; lastError?: string; /** Present only on create responses. */ secret?: string; } export declare class WaitError extends Error { status: number; constructor(message: string, status: number); } /** Recover the connect token for a session this CLI is running. */ export declare function sessionToken(subdomain: string, override?: string): string | null; export declare function createWait(subdomain: string, token: string, body: { /** 'url' (default) delivers to callbackUrl; 'email'/'push' notify the owner. */ destination?: 'url' | 'email' | 'push'; /** Only fire on requests whose inbound signature verified 'valid'. */ requireVerified?: boolean; callbackUrl?: string; ttl?: string; match?: WaitView['match']; transform?: { body: string; contentType?: string; }; script?: { source: string; contentType?: string; }; }): Promise; /** * Replace the endpoint's dynamic response rules (full array; null clears). * The default response is the no-match fallback. */ export declare function setRespondRules(subdomain: string, token: string, rules: unknown[] | null): Promise; /** * Replace the endpoint's default public response (status/body/content-type/ * headers/delay), applied by the server to every request no rule claims. */ export declare function updateRespond(subdomain: string, token: string, respond: { status?: number; body?: string; contentType?: string; headers?: Record | null; delayMs?: number | null; }): Promise; /** Drift Watch agent-API client: GET state, PATCH config, resolve findings. */ export declare function driftFetch(subdomain: string, token: string, opts?: { method?: string; path?: string; body?: unknown; }): Promise>; export declare function listWaits(subdomain: string, token: string): Promise; export declare function cancelWait(subdomain: string, token: string, id: string): Promise; /** Parse `--field event.type=payment.succeeded` into a match clause. */ export declare function parseFieldOption(raw: string): { path: string; equals: string; } | null; /** * Parse one `--match k=v` clause: `method=POST` and `path=/stripe` hit the * request line; any other key is a dot-path equality into the JSON body * (e.g. `event.type=payment.succeeded`). */ export declare function parseMatchOption(raw: string): Partial | null; /** Fold repeated `--match` clauses into a single match object. */ export declare function buildMatch(clauses: string[]): WaitView['match'] | null;