import { Connection } from "./connection"; export declare enum EdgeWorkerNames { CLOUDFLARE = "cloudflare" } export declare enum StreamConstants { PERSISTENT = "persistent" } export type wsCallbackObj = { onopen?: () => void; onclose?: () => void; onerror?: (e: Error) => void; onmessage: (msg: string) => Promise | boolean | void; }; export declare class Stream { private _connection; name: string; global: boolean; isCollectionStream: boolean; topic: string; constructor(connection: Connection, name: string, local?: boolean, isCollectionStream?: boolean); getOtp(): Promise; createStream(): Promise; backlog(): Promise; clearBacklog(): Promise; getStreamStatistics(): Promise; deleteSubscription(subscription: string): Promise; expireMessages(expireTimeInSeconds: number): Promise; clearSubscriptionBacklog(subscription: string): Promise; getSubscriptionList(): Promise; deleteStream(force?: boolean): Promise; consumer(subscriptionName: string, dcName: string, params?: { [key: string]: any; }, edgeWorkerName?: EdgeWorkerNames): any; producer(dcName: string, params?: { [key: string]: any; }, edgeWorkerName?: EdgeWorkerNames): any; publishMessage(message: any): Promise; getMessageTtl(): Promise; setMessageTtl(ttl?: number): Promise; deleteSubscriptions(subscription: string): Promise; } //# sourceMappingURL=stream.d.ts.map