import { type PlanetScaleDatabaseConnectConfig } from './clients/createPsdbV1Alpha1DatabaseClient'; interface IPlanetScaleMessagingStreamConstructor { /** * @description PlanetScale database config */ db_config: PlanetScaleDatabaseConnectConfig; /** * @description Messaging table name from which to stream */ table_name: string; /** * @description The primary key of the messaging table */ table_primary_key: PK; } /** * @class PlanetScaleMessagingStream * @description Vitess Messaging interface for a PlanetScale database */ export declare class PlanetScaleMessagingStream { readonly db_config: IPlanetScaleMessagingStreamConstructor['db_config']; readonly table_name: IPlanetScaleMessagingStreamConstructor['table_name']; readonly table_primary_key: IPlanetScaleMessagingStreamConstructor['table_primary_key']; private client; private primary_key_field; constructor({ db_config, table_name, table_primary_key, }: IPlanetScaleMessagingStreamConstructor); private getClient; private initSession; /** * @method stream * @description Stream messages from a Vitess Messaging table * @param options * @param options.read_duration_ms - Amount of time to run stream */ stream(options?: { read_duration_ms: number; }): AsyncGenerator<{ /** * @property raw_response * @description The raw response from the `stream * from {table_name}` query */ raw_response: import("./generated/psdb_pb").ExecuteResponse; /** * @property error * @description Any error encountered in streaming data from the table */ error: import("./generated/vtrpc_pb").RPCError | undefined; /** * @property messages * @description The emitted messages */ messages: Array<{ [K in PK]: string | number; } & Record>; }, void, unknown>; /** * @method ack * @description Acknowledges Vitess Messaging messages */ ack(keys: Array): Promise<{ n: number; }>; } export {};