import type { Client } from 'pg'; /** * Fire a pg_notify on the realtime channel for a given schema.table. * * The channel format matches what emit_change uses: * `realtime:.` * * @param client - A pg Client (or PoolClient) to run the NOTIFY on * @param schema - The PostgreSQL schema name (e.g. 'public') * @param table - The table name (e.g. 'items') * @param payload - The NOTIFY payload string */ export declare function notify(client: Client, schema: string, table: string, payload: string): Promise; /** * Build a standard DML payload string in the format emit_change uses. * * @param operation - The DML operation: 'INSERT', 'UPDATE', or 'DELETE' * @param rowIds - Array of affected row IDs (UUIDs) * @returns Formatted payload string (e.g. "INSERT:uuid1,uuid2") */ export declare function buildPayload(operation: 'INSERT' | 'UPDATE' | 'DELETE', rowIds: string[]): string; /** * Build an INVALIDATE (overflow) payload. */ export declare function buildInvalidatePayload(): string; /** * Convenience: fire a DML NOTIFY for a table. * * @param client - A pg Client to run the NOTIFY on * @param schema - The PostgreSQL schema name * @param table - The table name * @param operation - The DML operation * @param rowIds - Array of affected row IDs */ export declare function notifyChange(client: Client, schema: string, table: string, operation: 'INSERT' | 'UPDATE' | 'DELETE', rowIds: string[]): Promise; /** * Convenience: fire an INVALIDATE NOTIFY for a table. */ export declare function notifyInvalidate(client: Client, schema: string, table: string): Promise;