Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / shared / lib / interfaces / calendar / Calendar.ts
blob7263ac9e1db8e2b1b367fe21d72c315bc3141ee8
1 import type {
2     CALENDAR_DISPLAY,
3     CALENDAR_SHARE_BUSY_TIME_SLOTS,
4     CALENDAR_TYPE,
5     NOTIFICATION_TYPE_API,
6     SETTINGS_VIEW,
7 } from '../../calendar/constants';
8 import type { Nullable } from '../utils';
9 import type { CalendarKey } from './CalendarKey';
10 import type { CalendarMember, CalendarOwner } from './CalendarMember';
11 import type { NotificationModel } from './Notification';
12 import type { Passphrase } from './Passphrase';
14 export interface Calendar {
15     ID: string;
16     Type: CALENDAR_TYPE;
19 export interface CalendarWithOwnMembers extends Calendar {
20     Owner: CalendarOwner;
21     Members: CalendarMember[];
24 export interface VisualCalendar extends CalendarWithOwnMembers {
25     Name: string;
26     Description: string;
27     Color: string;
28     Display: CALENDAR_DISPLAY;
29     Email: string;
30     Flags: number;
31     Permissions: number;
32     Priority: number;
35 export interface CalendarUserSettings {
36     DefaultCalendarID: Nullable<string>;
37     WeekLength: number;
38     DisplayWeekNumber: number;
39     AutoDetectPrimaryTimezone: number;
40     PrimaryTimezone: string;
41     DisplaySecondaryTimezone: number;
42     SecondaryTimezone: Nullable<string>;
43     ViewPreference: SETTINGS_VIEW;
44     InviteLocale: Nullable<string>;
45     AutoImportInvite: number;
48 export interface CalendarNotificationSettings {
49     Type: NOTIFICATION_TYPE_API;
50     Trigger: string;
53 export interface CalendarSettings {
54     ID: string;
55     CalendarID: string;
56     DefaultEventDuration: number;
57     DefaultPartDayNotifications: CalendarNotificationSettings[];
58     DefaultFullDayNotifications: CalendarNotificationSettings[];
59     MakesUserBusy: CALENDAR_SHARE_BUSY_TIME_SLOTS;
62 export interface CalendarBootstrap {
63     Keys: CalendarKey[];
64     Passphrase: Passphrase;
65     Members: CalendarMember[];
66     CalendarSettings: CalendarSettings;
69 export interface CalendarAddressOptions {
70     value: string;
71     text: string;
74 export interface CalendarSelectOption {
75     id: string;
76     name: string;
77     color: string;
80 export interface CalendarViewModelFull {
81     calendarID: string;
82     name: string;
83     members: CalendarMember[];
84     display: boolean;
85     description: string;
86     color: string;
87     addressID: string;
88     addressOptions: CalendarAddressOptions[];
89     duration: number;
90     defaultPartDayNotification: NotificationModel;
91     defaultFullDayNotification: NotificationModel;
92     partDayNotifications: NotificationModel[];
93     fullDayNotifications: NotificationModel[];
94     url?: string;
95     type: CALENDAR_TYPE;
96     shareBusySlots: CALENDAR_SHARE_BUSY_TIME_SLOTS;
99 export interface CalendarErrors {
100     name?: string;
101     description?: string;
104 export interface HolidaysDirectoryCalendar {
105     CalendarID: string;
106     Country: string;
107     CountryCode: string;
108     Hidden: boolean;
109     Language: string;
110     LanguageCode: string;
111     Passphrase: string;
112     SessionKey: {
113         Key: string;
114         Algorithm: string;
115     };
116     Timezones: string[];
119 export interface VideoConferenceMeetingCreation {
120     VideoConference: {
121         ID: string;
122         URL: string;
123         Password?: string;
124     };