Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / docs-core / lib / Services / DocumentLoader / StatusObserver.ts
blob3e0f889fce578e563a07e024857403d1825a0521
1 import type { AuthenticatedDocControllerInterface } from '../../AuthenticatedDocController/AuthenticatedDocControllerInterface'
2 import type { EditorControllerInterface } from '../../EditorController/EditorController'
3 import type { DocumentState, PublicDocumentState } from '../../State/DocumentState'
4 import type { EditorOrchestratorInterface } from '../Orchestrator/EditorOrchestratorInterface'
6 export type DocLoaderStatusObserver<S extends DocumentState | PublicDocumentState> = {
7   onSuccess: (result: {
8     orchestrator: EditorOrchestratorInterface
9     documentState: S
10     docController?: AuthenticatedDocControllerInterface
11     editorController: EditorControllerInterface
12   }) => void
13   onError: (error: string) => void