import { ITopicClient } from '../../../clients/ITopicClient';
import { MomentoLogger, SubscribeCallOptions, TopicPublish, TopicSubscribe, ListWebhooks, PutWebhook, DeleteWebhook, GetWebhookSecret, RotateWebhookSecret } from '../../../index';
import { IPubsubClient } from './IPubsubClient';
import { IWebhookClient } from './IWebhookClient';
import { PutWebhookCallOptions } from '../../../utils/webhook-call-options';
interface IStreamClientWithCount {
    numActiveSubscriptions: number;
    client: IPubsubClient;
}
export declare abstract class AbstractTopicClient implements ITopicClient {
    protected readonly logger: MomentoLogger;
    protected readonly pubsubClients: IPubsubClient[];
    protected readonly pubsubStreamClients: IStreamClientWithCount[];
    protected readonly pubsubUnaryClients: IPubsubClient[];
    protected readonly webhookClient: IWebhookClient;
    private nextPubsubStreamClientIndex;
    private nextPubsubUnaryClientIndex;
    private readonly maxConcurrentSubscriptions;
    protected constructor(logger: MomentoLogger, pubsubStreamClients: IPubsubClient[], pubsubUnaryClients: IPubsubClient[], webhookClient: IWebhookClient);
    /**
     * Publishes a value to a topic.
     *
     * @param {string} cacheName - The name of the cache to containing the topic to publish to.
     * @param {string} topicName - The name of the topic to publish to.
     * @param {string | Uint8Array} value - The value to publish.
     * @returns {Promise<TopicPublish.Response>} -
     * {@link TopicPublish.Success} on success.
     * {@link TopicPublish.Error} on failure.
     */
    publish(cacheName: string, topicName: string, value: string | Uint8Array): Promise<TopicPublish.Response>;
    /**
     * Subscribes to a topic.
     *
     * @param {string} cacheName - The name of the cache to containing the topic to subscribe to.
     * @param {string} topicName - The name of the topic to subscribe to.
     * @param {SubscribeCallOptions} options - The options for the subscription. Defaults to no-op handlers.
     * @param {function} options.onItem - The callback to invoke when data is received. Defaults to no-op.
     * @param {function} options.onError - The callback to invoke when an error is received. Defaults to no-op.
     * @returns {Promise<TopicSubscribe.Response>} -
     * {@link TopicSubscribe.Subscription} on success.
     * {@link TopicSubscribe.Error} on failure.
     */
    subscribe(cacheName: string, topicName: string, options: SubscribeCallOptions): Promise<TopicSubscribe.Response>;
    /**
     * Deletes a webhook
     *
     * @param {string} cacheName - The name of the cache associated with the webhook
     * @param {string} webhookName - The name of the webhook
     * @returns {Promise<DeleteWebhook.Response>} -
     * {@link DeleteWebhook.Success} on success.
     * {@link DeleteWebhook.Error} on failure.
     */
    deleteWebhook(cacheName: string, webhookName: string): Promise<DeleteWebhook.Response>;
    /**
     * Lists webhooks associated with a cache
     *
     * @param {string} cacheName - The cache to list webhooks associated with it
     * @returns {Promise<ListWebhooks.Response>} -
     * {@link ListWebhooks.Success} on success.
     * {@link ListWebhooks.Error} on failure.
     */
    listWebhooks(cacheName: string): Promise<ListWebhooks.Response>;
    /**
     * Creates a new webhook, or updates an existing one
     *
     * @param {string} cacheName - The name of the cache to associate the webhook with
     * @param {string} webhookName - The name of the webhook
     * @param {PutWebhookCallOptions} options - The options for the webhook
     * @param {string} topicName - The name of the topic for the webhook to listen to
     * @param {WebhookDestination | string} webhookDestination - The url to associate the webhook with
     * @returns {Promise<PutWebhook.Response>} -
     * {@link PutWebhook.Success} on success.
     * {@link PutWebhook.Error} on failure.
     */
    putWebhook(cacheName: string, webhookName: string, options: PutWebhookCallOptions): Promise<PutWebhook.Response>;
    /**
     * Gets the signing secret for a webhook
     *
     * @param {string} cacheName - The name of the cache associated with the webhook
     * @param {string} webhookName - The name of the webhook
     * @returns {Promise<GetWebhookSecret.Response>} -
     * {@link GetWebhookSecret.Success} on success.
     * {@link GetWebhookSecret.Error} on failure.
     */
    getWebhookSecret(cacheName: string, webhookName: string): Promise<GetWebhookSecret.Response>;
    /**
     * Rotates the signing secret for a webhook
     *
     * @param {string} cacheName - The name of the cache associated with the webhook
     * @param {string} webhookName - The name of the webhook
     * @returns {Promise<RotateWebhookSecret.Response>} -
     * {@link RotateWebhookSecret.Success} on success.
     * {@link RotateWebhookSecret.Error} on failure.
     */
    rotateWebhookSecret(cacheName: string, webhookName: string): Promise<RotateWebhookSecret.Response>;
    protected getNextPublishClient(): IPubsubClient;
    protected getNextSubscribeClient(): {
        client: IPubsubClient;
        decrementSubscriptionCount: () => void;
    };
}
export {};
