import type { HelixResponse, HelixWebHookHubRequestOptions } from 'twitch'; import type { WebHookListener } from '../WebHookListener'; /** @private */ export declare type SubscriptionResultType = T extends Subscription ? O : never; /** * @hideProtected */ export declare abstract class Subscription { protected readonly _handler: (obj: T) => void; protected readonly _client: WebHookListener; private readonly _validityInSeconds; private _verified; protected _secret?: string; private _refreshTimer?; private _unsubscribeResolver?; /** @private */ protected constructor(_handler: (obj: T) => void, _client: WebHookListener, _validityInSeconds?: number); /** * Whether the subscription has been verified by Twitch. */ get verified(): boolean; /** @private */ _verify(): void; /** @private */ _generateNewCredentials(): void; /** @private */ _handleData(data: string, algoAndSignature: string): boolean; /** @private */ _handleUnsubscribe(): boolean; /** * Activates the subscription. */ start(): Promise; /** * Suspends the subscription, not removing it from the listener. */ suspend(): Promise; /** * Deactivates the subscription and removes it from the listener. */ stop(): Promise; protected _getOptions(): Promise; /** @private */ abstract get id(): string; protected abstract _subscribe(): Promise; protected abstract _unsubscribe(): Promise; protected abstract transformData(response: HelixResponse): T; private _createNewSubscription; }