import { ConnectedContext } from "../types/ConnectedContext.mjs"; import { ConnectedPlugin } from "../types/ConnectedPlugin.mjs"; import { NotificationCallbackError } from "../results/error/NotificationErrors.mjs"; import { SubscriptionCallbacks } from "./SubscriptionCallbacks.mjs"; //#region src/notifications/NotificationSubscription.d.ts /** * @internal * Abstract class for notification subscription methods. */ declare abstract class NotificationSubscription { protected resource: Plugin["types"]["resource"]; protected parentSubscription: (message: NotificationMessage) => void; protected context: ConnectedContext; protected subscriptions: Record>; private isOpen; constructor(resource: Plugin["types"]["resource"], parentSubscription: (message: NotificationMessage) => void, context: ConnectedContext); isSubscribedToNotifications(): boolean; /** * =========================================================================== * PUBLIC * =========================================================================== */ /** * @internal * subscribeToNotifications */ subscribeToNotifications(subscriptionCallbacks?: SubscriptionCallbacks): Promise; /** * @internal * unsubscribeFromNotification */ unsubscribeFromNotification(subscriptionId: string): Promise; /** * @internal * unsubscribeFromAllNotifications */ unsubscribeFromAllNotifications(): Promise; /** * =========================================================================== * HELPERS * =========================================================================== */ /** * @internal * Opens the subscription */ protected abstract open(): Promise; /** * @internal * Closes the subscription */ protected abstract close(): Promise; /** * =========================================================================== * CALLBACKS * =========================================================================== */ /** * @internal * onNotification */ protected onNotification(message: NotificationMessage): void; /** * @internal * onNotificationError */ protected onNotificationError(message: NotificationCallbackError): void; /** * @internal * setIsOpen */ protected setIsOpen(status: boolean): void; } //#endregion export { NotificationSubscription }; //# sourceMappingURL=NotificationSubscription.d.mts.map