/***** START WARNING - IF YOU USE THIS CODE WITH MAPBOX MAPPING APIS, REMOVAL OR
* MODIFICATION OF THE FOLLOWING CODE VIOLATES THE MAPBOX TERMS OF SERVICE  ******
* The following code is used to access Mapbox's Mapping APIs. Removal or modification
* of this code when used with Mapbox's Mapping APIs can result in higher fees and/or
* termination of your account with Mapbox.
*
* Under the Mapbox Terms of Service, you may not use this code to access Mapbox
* Mapping APIs other than through Mapbox SDKs.
*
* The Mapping APIs documentation is available at https://docs.mapbox.com/api/maps/#maps
* and the Mapbox Terms of Service are available at https://www.mapbox.com/tos/
******************************************************************************/
import { IResourceType } from './ajax';
import type { RequestParameters } from './ajax';
import type { Cancelable } from '../types/cancelable';
import type { TileJSON } from '../types/tilejson';
declare type ResourceTypeEnum = keyof IResourceType;
export declare type RequestTransformFunction = (url: string, resourceType?: ResourceTypeEnum) => RequestParameters;
declare type UrlObject = {
    protocol: string;
    authority: string;
    path: string;
    params: Array<string>;
};
export declare class RequestManager {
    _skuToken: string;
    _skuTokenExpiresAt: number;
    _transformRequestFn: RequestTransformFunction | undefined | null;
    _customAccessToken: string | undefined | null;
    constructor(transformRequestFn?: RequestTransformFunction, customAccessToken?: string);
    _createSkuToken(): void;
    _isSkuTokenExpired(): boolean;
    transformRequest(url: string, type: ResourceTypeEnum): RequestParameters;
    normalizeStyleURL(url: string, accessToken?: string): string;
    normalizeGlyphsURL(url: string, accessToken?: string): string;
    normalizeSourceURL(url: string, accessToken?: string): string;
    normalizeSpriteURL(url: string, format: string, extension: string, accessToken?: string): string;
    normalizeTileURL(tileURL: string, tileSize?: number | null): string;
    canonicalizeTileURL(url: string, removeAccessToken: boolean): string;
    canonicalizeTileset(tileJSON: TileJSON, sourceURL?: string): any[];
    _makeAPIURL(urlObject: UrlObject, accessToken: string | null | void): string;
    setTransformRequest(transformRequest: RequestTransformFunction): void;
}
declare function isMapboxURL(url: string): boolean;
declare function isMapboxHTTPURL(url: string): boolean;
declare function hasCacheDefeatingSku(url: string): boolean;
export { isMapboxURL, isMapboxHTTPURL, hasCacheDefeatingSku };
declare type TelemetryEventType = 'appUserTurnstile' | 'map.load';
declare class TelemetryEvent {
    eventData: any;
    anonId: string | undefined | null;
    queue: Array<any>;
    type: TelemetryEventType;
    pendingRequest: Cancelable | undefined | null;
    _customAccessToken: string | undefined | null;
    constructor(type: TelemetryEventType);
    getStorageKey(domain?: string | null): string;
    fetchEventData(): void;
    saveEventData(): void;
    processRequests(_?: string | null): void;
    postEvent(timestamp: number, additionalPayload: {
        [_: string]: any;
    }, callback: (err?: Error | null) => void, customAccessToken?: string | null): void;
    queueRequest(event: number | {
        id: number;
        timestamp: number;
    }, customAccessToken?: string | null): void;
}
export declare class MapLoadEvent extends TelemetryEvent {
    readonly success: {
        [_: number]: boolean;
    };
    skuToken: string;
    constructor();
    postMapLoadEvent(tileUrls: Array<string>, mapId: number, skuToken: string, customAccessToken: string): void;
    processRequests(customAccessToken?: string | null): void;
}
export declare class TurnstileEvent extends TelemetryEvent {
    constructor(customAccessToken?: string | null);
    postTurnstileEvent(tileUrls: Array<string>, customAccessToken?: string | null): void;
    processRequests(customAccessToken?: string | null): any;
}
export declare const postTurnstileEvent: any;
export declare const postMapLoadEvent: any;
/***** END WARNING - REMOVAL OR MODIFICATION OF THE
PRECEDING CODE VIOLATES THE MAPBOX TERMS OF SERVICE  ******/
//# sourceMappingURL=mapbox.d.ts.map