import { IMapDidChange } from 'mobx'; import { $SchemaIdTemplate, AttributeType, ElementSchema, ElementType, SchemaId, Stage, Template, TemplateId } from '../interfaces'; import { AttributeDefinition, AttributeDefinitions, AttributeFileData, AttributeGroup, AttributeValue, ConditionalViewConfig, ElementAttributeData, ElementData, ElementFormData, ElementRaw, ElementsPrivileges, ElementsTemplates, ElementTemplateV1, LocalElement, Operation, PlatformFile, PreparedFiles } from '../interfaces/element.interface'; import { DehydratedElement } from '../interfaces/offline.interface'; import { Element } from '../models/element'; import { BatchCreateResponse, BatchMetadata } from '../services/edocu/batch'; import { ElementGetQueryParams, ElementPrivileges, ElementSearchOptions, GetElementSearch } from '../services/edocu/elements'; import { MainStore } from './mainStore'; interface InstantiateElementOptions { setToMemory: boolean; extendWithOlderData: boolean; } type SyncProgress = { done: number; failed: number; total: number; }; export declare function isValidDateString(date: string | undefined): boolean; export declare class ElementStore { static listeners: (() => void)[]; elementsTypeDataV1: Map; elementTemplatesV1: ElementsTemplates; workRecordActions: Map; elementSchemas: Map; elementTemplates: Map; privileges: ElementsPrivileges; elements: Map; syncProgress: SyncProgress | undefined; socketEventIds: string[]; main: MainStore; constructor(main: MainStore); addTypeData(type: string, typeData: AttributeDefinitions): void; addWorkRecordActions(type: string, actions: string[]): void; search(query: string, options?: ElementSearchOptions): Promise; addTemplateV1Data(type: string, organization: string, template: ElementTemplateV1): void; addPrivilegesData(type: ElementType, organization: string, privileges: ElementPrivileges): void; get(hash: string, type: ElementType, queryParams?: ElementGetQueryParams): Promise; getElementTypeData(type: string): Promise; getElementTemplateV1(type: string, organization: string): Promise; getElementSchema(type: ElementType, options?: { stage?: Stage; useStoreCache?: boolean; cache?: false; }): Promise; setSchema(schemaId: SchemaId, schema: ElementSchema): void; saveSchema(type: ElementType, schema: ElementSchema, options?: { stage?: Stage; }): Promise; addSchema(schema: Required>, options?: { stage?: Stage; }): Promise; getTemplate(type: ElementType, templateId?: string, options?: { stage?: Stage; useStoreCache?: boolean; cache?: false; strict?: boolean; }): Promise