import MessageService from '../base/message.cjs';
import WebhookConnector from './connector.cjs';

/**
 * @class
 * Handles the socket connection
 * Also dispatch the action to handle data
 */
declare class WebhookService extends MessageService {
    id: string;
    connector: WebhookConnector;
    constructor(url: string);
    /**
     * @method
     * Create a connection with socketIO
     */
    connect<T>(config: RequestInit): Promise<T>;
    /**
     * @method
     * Dispose the socket connection
     */
    disconnect(config: RequestInit): Promise<void>;
    /**
     * @method
     * Handle the messages
     */
    protected message<T>(config: RequestInit, _event?: string): Promise<T>;
}

export { WebhookService as default };
