import { BatchConfig, FacebookBatchQueue } from 'facebook-batch';
import { JsonObject } from 'type-fest';
import { MessengerClient } from 'messaging-api-messenger';
import { RequestContext } from '../types';
declare type CommonConnectorOptions = {
    appId: string;
    appSecret: string;
    verifyToken?: string;
    batchConfig?: BatchConfig;
    mapPageToAccessToken?: (pageId: string) => Promise<string>;
};
declare type ConnectorOptionsWithoutClient = {
    ClientClass: typeof MessengerClient;
    accessToken?: string;
    origin?: string;
    skipAppSecretProof?: boolean;
} & CommonConnectorOptions;
declare type ConnectorOptionsWithClient<C extends MessengerClient> = {
    client: C;
} & CommonConnectorOptions;
export declare type FacebookBaseConnectorOptions<C extends MessengerClient> = ConnectorOptionsWithoutClient | ConnectorOptionsWithClient<C>;
export default class FacebookBaseConnector<RequestBody extends JsonObject, Client extends MessengerClient> {
    _client: Client;
    _appId: string;
    _appSecret: string;
    _origin: string | undefined;
    _skipAppSecretProof: boolean | undefined;
    _mapPageToAccessToken: ((pageId: string) => Promise<string>) | null;
    _verifyToken: string | null;
    _batchConfig: BatchConfig | null;
    _batchQueue: FacebookBatchQueue | null;
    constructor(options: FacebookBaseConnectorOptions<Client>);
    get client(): Client;
    get verifyToken(): string | null;
    verifySignature(rawBody: string, signature: string): boolean;
    preprocess({ method, headers, query, rawBody, }: RequestContext<RequestBody, {
        'x-hub-signature'?: string;
    }>): {
        shouldNext: boolean;
        response: {
            status: number;
            body: string;
        };
    } | {
        shouldNext: boolean;
        response?: undefined;
    } | {
        shouldNext: boolean;
        response: {
            status: number;
            body: {
                error: {
                    message: string;
                    request: {
                        rawBody: string;
                        headers: {
                            'x-hub-signature': string | undefined;
                        };
                    };
                };
            };
        };
    };
}
export {};
//# sourceMappingURL=FacebookBaseConnector.d.ts.map