Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / shared / lib / interfaces / calendar / EventManager.ts
blob2845a150c42f4cb5d5ab06a700330d076f689660
1 import type { EVENT_ACTIONS } from '../../constants';
2 import type {
3     Calendar,
4     CalendarAlarm,
5     CalendarEventWithoutBlob,
6     CalendarMember,
7     CalendarSubscription,
8     CalendarUrl,
9     CalendarWithOwnMembers,
10 } from './index';
12 export interface CalendarAlarmEventManagerDelete {
13     ID: string;
14     Action: EVENT_ACTIONS.DELETE;
16 export interface CalendarAlarmEventManagerUpdate {
17     ID: string;
18     Action: EVENT_ACTIONS.UPDATE;
19     Alarm: CalendarAlarm;
21 export interface CalendarAlarmEventManagerCreate {
22     ID: string;
23     Action: EVENT_ACTIONS.CREATE;
24     Alarm: CalendarAlarm;
26 export type CalendarAlarmEventManager =
27     | CalendarAlarmEventManagerDelete
28     | CalendarAlarmEventManagerUpdate
29     | CalendarAlarmEventManagerCreate;
31 export interface CalendarUrlEventManagerDelete {
32     ID: string;
33     Action: EVENT_ACTIONS.DELETE;
35 export interface CalendarUrlEventManagerUpdate {
36     ID: string;
37     Action: EVENT_ACTIONS.UPDATE;
38     CalendarUrl: CalendarUrl;
40 export interface CalendarUrlEventManagerCreate {
41     ID: string;
42     Action: EVENT_ACTIONS.CREATE;
43     CalendarUrl: CalendarUrl;
45 export type CalendarUrlEventManager =
46     | CalendarUrlEventManagerDelete
47     | CalendarUrlEventManagerUpdate
48     | CalendarUrlEventManagerCreate;
50 export interface CalendarSubscriptionEventManagerDelete {
51     ID: string;
52     Action: EVENT_ACTIONS.DELETE;
54 export interface CalendarSubscriptionEventManagerUpdate {
55     ID: string;
56     Action: EVENT_ACTIONS.UPDATE;
57     CalendarSubscription: CalendarSubscription;
59 export interface CalendarSubscriptionEventManagerCreate {
60     ID: string;
61     Action: EVENT_ACTIONS.CREATE;
62     CalendarSubscription: CalendarSubscription;
64 export type CalendarSubscriptionEventManager =
65     | CalendarSubscriptionEventManagerDelete
66     | CalendarSubscriptionEventManagerUpdate
67     | CalendarSubscriptionEventManagerCreate;
69 export interface CalendarMemberEventManagerDelete {
70     ID: string;
71     Action: EVENT_ACTIONS.DELETE;
73 export interface CalendarMemberEventManagerUpdate {
74     ID: string;
75     Action: EVENT_ACTIONS.UPDATE;
76     Member: CalendarMember;
78 export interface CalendarMemberEventManagerCreate {
79     ID: string;
80     Action: EVENT_ACTIONS.CREATE;
81     Member: CalendarMember;
84 export type CalendarMemberEventManager =
85     | CalendarMemberEventManagerDelete
86     | CalendarMemberEventManagerUpdate
87     | CalendarMemberEventManagerCreate;
89 export interface CalendarEventManagerDelete {
90     ID: string;
91     Action: EVENT_ACTIONS.DELETE;
93 export interface CalendarEventManagerUpdate {
94     ID: string;
95     Action: EVENT_ACTIONS.UPDATE;
96     Calendar: Calendar;
98 export interface CalendarEventManagerCreate {
99     ID: string;
100     Action: EVENT_ACTIONS.CREATE;
101     Calendar: CalendarWithOwnMembers;
104 export interface CalendarEventsEventManagerDelete {
105     ID: string;
106     Action: EVENT_ACTIONS.DELETE;
108 export interface CalendarEventsEventManagerUpdate {
109     ID: string;
110     Action: EVENT_ACTIONS.UPDATE;
111     Event: CalendarEventWithoutBlob;
113 export interface CalendarEventsEventManagerCreate {
114     ID: string;
115     Action: EVENT_ACTIONS.CREATE;
116     Event: CalendarEventWithoutBlob;
118 export type CalendarEventsEventManager =
119     | CalendarEventsEventManagerDelete
120     | CalendarEventsEventManagerUpdate
121     | CalendarEventsEventManagerCreate;
123 export type CalendarEventManager = CalendarEventManagerCreate | CalendarEventManagerUpdate | CalendarEventManagerDelete;