Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / shared / lib / interfaces / calendar / Subscription.ts
blob1eb4848d558b056260af291b2df161963b23fd68
1 import type { VisualCalendar } from './Calendar';
3 export enum CALENDAR_SUBSCRIPTION_STATUS {
4     OK = 0,
5     ERROR = 1,
6     INVALID_ICS = 2,
7     CALENDAR_SOFT_DELETED = 3,
8     CALENDAR_NOT_FOUND = 4,
9     USER_NOT_EXIST = 5,
10     ICS_SIZE_EXCEED_LIMIT = 6,
11     SYNCHRONIZING = 7,
12     CALENDAR_MISSING_PRIMARY_KEY = 8,
13     HTTP_REQUEST_FAILED_GENERIC = 20,
14     HTTP_REQUEST_FAILED_BAD_REQUEST = 21,
15     HTTP_REQUEST_FAILED_UNAUTHORIZED = 22,
16     HTTP_REQUEST_FAILED_FORBIDDEN = 23,
17     HTTP_REQUEST_FAILED_NOT_FOUND = 24,
18     HTTP_REQUEST_FAILED_INTERNAL_SERVER_ERROR = 25,
19     HTTP_REQUEST_FAILED_TIMEOUT = 26,
20     INTERNAL_CALENDAR_URL_NOT_FOUND = 27,
21     INTERNAL_CALENDAR_UNDECRYPTABLE = 28,
22     INVALID_URL = 30,
25 export interface CalendarSubscription {
26     CalendarID: string;
27     CreateTime: number;
28     LastUpdateTime: number;
29     Status: CALENDAR_SUBSCRIPTION_STATUS;
30     URL: string;
33 export interface SubscribedCalendar extends VisualCalendar {
34     SubscriptionParameters: CalendarSubscription;
37 export interface CalendarSubscriptionResponse {
38     CalendarSubscription: CalendarSubscription;
39     Code: number;