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; }; declare type ConnectorOptionsWithoutClient = { ClientClass: typeof MessengerClient; accessToken?: string; origin?: string; skipAppSecretProof?: boolean; } & CommonConnectorOptions; declare type ConnectorOptionsWithClient = { client: C; } & CommonConnectorOptions; export declare type FacebookBaseConnectorOptions = ConnectorOptionsWithoutClient | ConnectorOptionsWithClient; export default class FacebookBaseConnector { _client: Client; _appId: string; _appSecret: string; _origin: string | undefined; _skipAppSecretProof: boolean | undefined; _mapPageToAccessToken: ((pageId: string) => Promise) | null; _verifyToken: string | null; _batchConfig: BatchConfig | null; _batchQueue: FacebookBatchQueue | null; constructor(options: FacebookBaseConnectorOptions); get client(): Client; get verifyToken(): string | null; verifySignature(rawBody: string, signature: string): boolean; preprocess({ method, headers, query, rawBody, }: RequestContext): { 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