import { RequestOptions, HTTPError } from '@segment/actions-core';
import { StateContext } from '@segment/actions-core/destination-kit';
import type { Settings } from './generated-types';
import type { Payload } from './triggerStudioFlow/generated-types';
interface ExternalId {
    id: string;
    type: string;
    source_id: string;
    collection: string;
    created_at: string;
    encoding: string;
}
type RequestFn = (url: string, options?: RequestOptions) => Promise<Response>;
export interface TwilioError extends HTTPError {
    response: Response & {
        data: {
            status: number;
            message: string;
            code: string;
        };
    };
}
export declare const STUDIO_BASE_URL = "https://studio.twilio.com";
export declare const PROFILE_API_BASE_URL = "https://profiles.segment.com";
export declare const DEFAULT_COOLING_OFF_PERIOD = 60;
export declare const getToAddressField: (request: RequestFn, settings: Settings, payload: Payload) => Promise<string | false>;
export declare const fetchProfileExternalIds: (request: RequestFn, settings: Settings, userId: string, anonymousId: string) => Promise<ExternalId[]>;
export declare const shouldSendToStudio: (cacheKey: string, stateContext: StateContext, coolingOffPeriod: number) => boolean;
export {};
