import { CloudFrontEvent, CloudFrontRequest, ImageContentType } from "../types"; /** * Takes a url, key, path or file name and returns the file extension. */ export declare function extractFileExt(uri: string): string; /** * Takes a url, key or path and returns the filename. */ export declare function extractFilename(uri: string): string; /** * Takes a URI (can be a URL, filename or just an extension) and returns the * content-type if this is an image. If it's not an image, returns undefined. */ export declare function getImageContentType(uri: string): ImageContentType | undefined; /** * Takes a URLSearchParams and returns a querystring that will always be * returned in the same order regardless of the order of the inputs of the * search params. * * This helps make the querystring consistent regardless of the way the * URLSearchParams were constructed. */ export declare function getSortedQueryString(params: URLSearchParams): string; /** * Takes a CloudFront style `uri` (e.g. in the CloudFront Request) and returns * the S3 key. * * The `uri` component will potentially have encoded characters like `?` and * `=` that have to be decoded. */ export declare function extractKeyFromURI(uri: string): string; export declare function getSizeFromSearchParams(params: URLSearchParams): { width: number; height: number; } | null; /** * Takes a URL and returns the `uri` and `querystring` as it would appear in * a CloudFront Request. * * Useful for testing. */ export declare function getMockRequestFromURL(urlString: string): CloudFrontRequest; export declare function getMockEventFromURL(urlString: string): CloudFrontEvent;