import { ConversionCustomVariable, PartialErrorResponse, QueryResponse, CustomVariableInterface, CreateAudienceInput, UserListResponse, KeyValuePairList } from './types';
import { ModifiedResponse, RequestClient, DynamicFieldResponse, Features, MultiStatusResponse } from '@segment/actions-core';
import { StatsContext } from '@segment/actions-core/destination-kit';
import { HTTPError } from '@segment/actions-core';
import type { Payload as UserListPayload } from './userList/generated-types';
import type { Payload as ClickConversionPayload } from './uploadClickConversion/generated-types';
import type { Payload as ClickConversionPayload2 } from './uploadClickConversion2/generated-types';
export declare const API_VERSION = "v21";
export declare const CANARY_API_VERSION = "v21";
export declare const FLAGON_NAME = "google-enhanced-canary-version";
export declare const FLAGON_NAME_PHONE_VALIDATION_CHECK = "google-enhanced-phone-validation-check";
type GoogleAdsErrorData = {
    error: {
        code: number;
        details: [
            {
                '@type': string;
                errors: [
                    {
                        errorCode: {
                            databaseError: string;
                        };
                        message: string;
                    }
                ];
            }
        ];
        message: string;
        status: string;
    };
};
export declare class GoogleAdsError extends HTTPError {
    response: Response & {
        status: string;
        statusText: string;
        data: GoogleAdsErrorData;
    };
}
export declare function formatCustomVariables(customVariables: object, customVariableIdsResults: Array<ConversionCustomVariable>): CustomVariableInterface[];
export declare const hash: (value: string | undefined) => string | undefined;
export declare function getCustomVariables(customerId: string, auth: any, request: RequestClient, features: Features | undefined, statsContext: StatsContext | undefined): Promise<ModifiedResponse<QueryResponse[]>>;
export declare function memoizedGetCustomVariables(): (customerId: string, auth: any, request: RequestClient, features: Features | undefined, statsContext: StatsContext | undefined) => Promise<ModifiedResponse<QueryResponse[]> | undefined>;
export declare function getConversionActionId(customerId: string | undefined, auth: any, request: RequestClient, features: Features | undefined, statsContext: StatsContext | undefined): Promise<ModifiedResponse<QueryResponse[]>>;
export declare function getConversionActionDynamicData(request: RequestClient, settings: any, auth: any, features: Features | undefined, statsContext: StatsContext | undefined): Promise<DynamicFieldResponse>;
export declare function handleGoogleErrors(response: ModifiedResponse<PartialErrorResponse>): void;
export declare function convertTimestamp(timestamp: string | undefined): string | undefined;
export declare function timestampToEpochMicroseconds(timestamp: string): string | undefined;
export declare function getApiVersion(features?: Features, statsContext?: StatsContext): string;
export declare const isHashedInformation: (information: string) => boolean;
export declare const commonEmailValidation: (email: string) => string;
export declare function getListIds(request: RequestClient, settings: CreateAudienceInput['settings'], auth?: any, features?: Features | undefined, statsContext?: StatsContext): Promise<{
    choices: {
        value: string;
        label: string;
    }[];
    nextPage?: undefined;
    error?: undefined;
} | {
    choices: never[];
    nextPage: string;
    error: {
        message: string;
        code: string;
    };
}>;
export declare function createGoogleAudience(request: RequestClient, input: CreateAudienceInput, auth: CreateAudienceInput['settings']['oauth'], features?: Features | undefined, statsContext?: StatsContext): Promise<string>;
export declare function getGoogleAudience(request: RequestClient, settings: CreateAudienceInput['settings'], externalId: string, auth: CreateAudienceInput['settings']['oauth'], features?: Features | undefined, statsContext?: StatsContext): Promise<UserListResponse>;
export declare function formatToE164(phoneNumber: string, countryCode: string): string;
export declare const formatPhone: (phone: string, countryCode?: string, features?: Features, statsContext?: StatsContext) => string;
export declare const validateAndFormatToE164: (phoneNumber: string, countryCode?: string, statsContext?: StatsContext) => string;
export declare const handleUpdate: (request: RequestClient, settings: CreateAudienceInput["settings"], audienceSettings: CreateAudienceInput["audienceSettings"], payloads: UserListPayload[], hookListId: string, hookListType: string, syncMode?: string, features?: Features | undefined, statsContext?: StatsContext) => Promise<unknown>;
export declare const verifyCustomerId: (customerId: string | undefined) => string;
export declare const handlePartialFailureResponse: (partialFailureError: any, validPayloadIndicesBitmap: number[], multiStatusResponse: MultiStatusResponse, userIdentifiers: any[], failedPayloadIndices: Set<number>) => void;
export declare const createIdentifierExtractors: (features?: Features) => {
    MOBILE_ADVERTISING_ID: (payload: UserListPayload) => {
        mobileId: string;
    } | null;
    CRM_ID: (payload: UserListPayload) => {
        thirdPartyUserId: string;
    } | null;
    CONTACT_INFO: (payload: UserListPayload) => ({
        hashedEmail: string;
        hashedPhoneNumber?: undefined;
        addressInfo?: undefined;
    } | {
        hashedPhoneNumber: string;
        hashedEmail?: undefined;
        addressInfo?: undefined;
    } | {
        addressInfo: {
            hashedFirstName: string | undefined;
            hashedLastName: string | undefined;
            countryCode: string;
            postalCode: string;
        };
        hashedEmail?: undefined;
        hashedPhoneNumber?: undefined;
    })[] | null;
};
export declare const processBatchPayload: (request: RequestClient, settings: CreateAudienceInput["settings"], audienceSettings: CreateAudienceInput["audienceSettings"], payloads: UserListPayload[], hookListId: string, hookListType: string, syncMode?: string, features?: Features | undefined, statsContext?: StatsContext) => Promise<MultiStatusResponse>;
export declare const handleJobExecutionError: (executedJob: any, validPayloadIndicesBitmap: number[], multiStatusResponse: MultiStatusResponse, sentBody: string, failedPayloadIndices: Set<number>) => void;
export declare function getSessionAttributesKeyValuePairs(payload: ClickConversionPayload | ClickConversionPayload2): {
    sessionAttributesKeyValuePairs: {
        keyValuePairs: KeyValuePairList;
    };
} | {
    sessionAttributesKeyValuePairs?: undefined;
};
export {};
