import { IAccessToken, IExternalResource, IIIFResource, IManifestoOptions, JSONLDResource, Service, StatusCode, TreeNode } from "./internal"; import { MediaType, ServiceProfile } from "@iiif/vocabulary/dist-commonjs"; import "isomorphic-unfetch"; export declare class Utils { static getMediaType(type: string): MediaType; static getImageQuality(profile: ServiceProfile): string; static getInexactLocale(locale: string): string; static getLocalisedValue(resource: any, locale: string): string | null; static generateTreeNodeIds(treeNode: TreeNode, index?: number): void; static normaliseType(type: string): string; static normaliseUrl(url: string): string; static normalisedUrlsMatch(url1: string, url2: string): boolean; static isImageProfile(profile: ServiceProfile): boolean; static isImageServiceType(type: string | null): boolean; static isLevel0ImageProfile(profile: ServiceProfile): boolean; static isLevel1ImageProfile(profile: ServiceProfile): boolean; static isLevel2ImageProfile(profile: ServiceProfile): boolean; static parseManifest(manifest: any, options?: IManifestoOptions | undefined): IIIFResource | null; static checkStatus(response: any): any; static loadManifest(url: string): Promise; static loadExternalResourcesAuth1(resources: IExternalResource[], openContentProviderInteraction: (service: Service) => any, openTokenService: (resource: IExternalResource, tokenService: Service) => Promise, getStoredAccessToken: (resource: IExternalResource) => Promise, userInteractedWithContentProvider: (contentProviderInteraction: any) => Promise, getContentProviderInteraction: (resource: IExternalResource, service: Service) => Promise, handleMovedTemporarily: (resource: IExternalResource) => Promise, showOutOfOptionsMessages: (resource: IExternalResource, service: Service) => void): Promise; static loadExternalResourceAuth1(resource: IExternalResource, openContentProviderInteraction: (service: Service) => any, openTokenService: (resource: IExternalResource, tokenService: Service) => Promise, getStoredAccessToken: (resource: IExternalResource) => Promise, userInteractedWithContentProvider: (contentProviderInteraction: any) => Promise, getContentProviderInteraction: (resource: IExternalResource, service: Service) => Promise, handleMovedTemporarily: (resource: IExternalResource) => Promise, showOutOfOptionsMessages: (resource: IExternalResource, service: Service) => void): Promise; static doAuthChain(resource: IExternalResource, openContentProviderInteraction: (service: Service) => any, openTokenService: (resource: IExternalResource, tokenService: Service) => Promise, userInteractedWithContentProvider: (contentProviderInteraction: any) => Promise, getContentProviderInteraction: (resource: IExternalResource, service: Service) => Promise, handleMovedTemporarily: (resource: IExternalResource) => Promise, showOutOfOptionsMessages: (resource: IExternalResource, service: Service) => void): Promise; static attemptResourceWithToken(resource: IExternalResource, openTokenService: (resource: IExternalResource, tokenService: Service) => Promise, authService: Service): Promise; static loadExternalResourcesAuth09(resources: IExternalResource[], tokenStorageStrategy: string, clickThrough: (resource: IExternalResource) => Promise, restricted: (resource: IExternalResource) => Promise, login: (resource: IExternalResource) => Promise, getAccessToken: (resource: IExternalResource, rejectOnError: boolean) => Promise, storeAccessToken: (resource: IExternalResource, token: IAccessToken, tokenStorageStrategy: string) => Promise, getStoredAccessToken: (resource: IExternalResource, tokenStorageStrategy: string) => Promise, handleResourceResponse: (resource: IExternalResource) => Promise, options?: IManifestoOptions): Promise; static loadExternalResourceAuth09(resource: IExternalResource, tokenStorageStrategy: string, clickThrough: (resource: IExternalResource) => Promise, restricted: (resource: IExternalResource) => Promise, login: (resource: IExternalResource) => Promise, getAccessToken: (resource: IExternalResource, rejectOnError: boolean) => Promise, storeAccessToken: (resource: IExternalResource, token: IAccessToken, tokenStorageStrategy: string) => Promise, getStoredAccessToken: (resource: IExternalResource, tokenStorageStrategy: string) => Promise, handleResourceResponse: (resource: IExternalResource) => Promise, options?: IManifestoOptions): Promise; static createError(name: StatusCode, message: string): Error; static createAuthorizationFailedError(): Error; static createRestrictedError(): Error; static createInternalServerError(message: string): Error; static authorize(resource: IExternalResource, tokenStorageStrategy: string, clickThrough: (resource: IExternalResource) => Promise, restricted: (resource: IExternalResource) => Promise, login: (resource: IExternalResource) => Promise, getAccessToken: (resource: IExternalResource, rejectOnError: boolean) => Promise, storeAccessToken: (resource: IExternalResource, token: IAccessToken, tokenStorageStrategy: string) => Promise, getStoredAccessToken: (resource: IExternalResource, tokenStorageStrategy: string) => Promise): Promise; private static showAuthInteraction; static getService(resource: any, profile: ServiceProfile): Service | null; static getResourceById(parentResource: JSONLDResource, id: string): JSONLDResource; /** * Does a depth first traversal of an Object, returning an Object that * matches provided k and v arguments * @example Utils.traverseAndFind({foo: 'bar'}, 'foo', 'bar') */ static traverseAndFind(object: any, k: string, v: string): object | undefined; static getServices(resource: any, { onlyService, onlyServices, skipParentResources, }?: { onlyServices?: boolean; skipParentResources?: boolean; onlyService?: boolean; }): Service[]; static getTemporalComponent(target: string): number[] | null; }