Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / applications / drive / src / app / store / _events / interface.ts
blob9f05acfc6054d0d926f7f377a778fb9d41087c27
1 import type { EVENT_ACTIONS } from '@proton/shared/lib/constants';
2 import type { EVENT_TYPES } from '@proton/shared/lib/drive/constants';
4 import type { EncryptedLink } from '../_links';
6 export type EventHandler = (
7     volumeId: string,
8     events: DriveEvents,
9     processedEventCounter: (eventId: string, event: DriveEvent) => void
10 ) => Promise<void> | void;
12 export interface DriveEvents {
13     eventId: string;
14     events: DriveEvent[];
15     refresh: boolean;
18 export type DriveEvent = {
19     eventType: EVENT_TYPES;
20     encryptedLink: EncryptedLink;
21     data?: DriveEventData;
22     originShareId?: string;
25 type DriveEventData = {
26     externalInvitationSignup?: string;
29 export type DriveCoreEvent = {
30     DriveShareRefresh?: {
31         Action: EVENT_ACTIONS;
32     };