import { AllActions, ReduxStore } from '@hyperion-framework/store'; import { AnnotationNormalized, AnnotationPageNormalized, CanvasNormalized, CollectionItemSchemas, CollectionNormalized, ContentResource, HyperionStore, ManifestNormalized, NormalizedEntity, Reference, RequestState, TraversableEntityTypes } from '@hyperion-framework/types'; import { SerialiseConfig } from '@hyperion-framework/parser'; import { ImageServiceLoader } from '@atlas-viewer/iiif-image-api'; import { FixedSizeImage, FixedSizeImageService, ImageCandidate, ImageCandidateRequest, UnknownSizeImage, VariableSizeImage } from '@atlas-viewer/iiif-image-api'; import { Meta } from './meta'; export declare type VaultOptions = { reducers: {}; middleware: []; defaultState: {}; customFetcher: (url: string, options: T) => unknown | Promise; }; export declare class Vault { private readonly options; private readonly store; private readonly emitter; private readonly imageService; remoteFetcher: (str: string, options?: any) => Promise; staticFetcher: (str: string, json: any) => Promise; constructor(options?: Partial, store?: ReduxStore); defaultFetcher: (url: string) => Promise; modifyEntityField(entity: Reference, key: string, value: any): void; middleware: (store: ReduxStore) => (next: (action: AllActions) => HyperionStore) => (action: AllActions) => HyperionStore; serialise(entity: Reference, config: SerialiseConfig): Return; toPresentation2(entity: Reference): Return; toPresentation3(entity: Reference): Return; fromRef(reference: Reference, selector?: (state: HyperionStore, ctx: C) => R): R | T; allFromRef(references: Reference[], selector?: (state: HyperionStore, ctx: C) => R): any[]; select(selector: (state: HyperionStore) => R): R; getStore(): ReduxStore; getState(): HyperionStore; getImageService(): ImageServiceLoader; loadManifest(id: string, json?: unknown): Promise; loadCollection(id: string, json?: unknown): Promise; getThumbnail(input: string | Reference | Reference<'Collection'> | Reference<'Manifest'> | Reference<'Canvas'> | Reference<'Annotation'> | Reference<'AnnotationPage'> | Reference<'ContentResource'> | CollectionNormalized | ManifestNormalized | CanvasNormalized | AnnotationNormalized | AnnotationPageNormalized | ContentResource, request: ImageCandidateRequest, dereference?: boolean, candidates?: Array, dimensions?: { width: number; height: number; }): Promise<{ best: null | undefined | FixedSizeImage | FixedSizeImageService | VariableSizeImage | UnknownSizeImage; fallback: Array; log: string[]; }>; load(resource: string, json?: unknown): Promise; areInputsEqual(newInputs: readonly unknown[] | unknown, lastInputs: readonly unknown[] | unknown): boolean; subscribe(selector: (state: HyperionStore) => T, subscription: (state: T, vault: Vault) => void, skipInitial?: boolean): () => void; requestStatus(id: string): RequestState[any] | undefined; getResourceMeta(resource: string): Partial | undefined; getResourceMeta(resource: string, metaKey: Key): T[Key] | undefined; setMetaValue([id, meta, key]: [string, string, string], newValueOrUpdate: Value | ((oldValue: Value | undefined) => Value)): void; addEventListener(resource: Reference, event: string, listener: (e: any, resource: T) => void, scope?: string[]): ((e: any, resource: T) => void) | undefined; removeEventListener(resource: Reference, event: string, listener: (e: any, resource: T) => void): void; }