import { Org, StatusResult } from '@salesforce/core'; import { AnyJson, JsonMap } from '@salesforce/ts-types'; import { Duration } from '@salesforce/kit'; import DoceMonitor from './doceMonitor.js'; /** * Common base class for DOCe monitor that use the streaming api to listen to a streaming channel (CDC). */ export default abstract class DOCeStreaming implements DoceMonitor { private doceOrg; private wait; constructor(org: Org, wait: Duration); /** * This creates the streaming client and starts listening the desired streaming channel. * * @param channel The channel we want to listen (CDC) * @param processor The specific processor we want to use for the event */ protected startStream(channel: string, processor: (message: JsonMap) => StatusResult): Promise; abstract monitor(): Promise; }