import type { AccessFunction, AccessorsDictionary } from '../common'; import type { Entity_Documents, Organization_Name, Organization_Profile } from '../common/shared/models/internal'; import type { DocumentType } from '../common/shared/models/SupportingDocument'; import type { ImplementModuleDefinition, ModuleDefinition } from '../common/types'; import type { Events } from './events'; interface IBusinessModule extends ModuleDefinition { moduleName: 'business'; category: 'private'; moduleContext: BusinessModuleContext; moduleEvents: Events; } export type BusinessModule = ImplementModuleDefinition; export type BusinessModuleContext = { /** Has already attempted to load any existing data. This is true even when there's no data to load */ isLoading: () => boolean; /** Access public property {@link PublicAccessors} */ access: AccessFunction; /** Trigger another search for any existing data for this entity within the service. ! ATTENTION: This will cause a rewrite of any unpersisted information. */ search: () => Promise; upload: (file: File, type: DocumentType) => Promise; }; export type PublicAccessors = AccessorsDictionary<{ readonly entityId: Organization_Profile['entityId']; name?: Organization_Name; documents?: Entity_Documents; /** Internal loading state. Set to false at the start of every call of submit/search methods and set to true on completion. */ readonly isLoading: boolean; }>; export type InternalState = { organization: Organization_Profile; isLoading: boolean; }; export {}; //# sourceMappingURL=definition.d.ts.map