Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / activation / src / tests / data / prepareState.ts
blob951d03b8a4a5915584170f203f7d9c6a82e4e956
1 import {
2     ImportProvider,
3     ImportType,
4     MailImportDestinationFolder,
5     MailImportGmailCategories,
6     TIME_PERIOD,
7 } from '@proton/activation/src/interface';
8 import type { OauthDraftState } from '@proton/activation/src/logic/draft/oauthDraft/oauthDraft.interface';
10 import { generateMockAddress } from './addresses';
12 export const prepareState: OauthDraftState = {
13     step: 'started',
14     provider: ImportProvider.GOOGLE,
15     mailImport: {
16         step: 'prepare-import',
17         products: [ImportType.MAIL, ImportType.CALENDAR, ImportType.CONTACTS],
18         importerData: {
19             importerId: 'importerId',
20             importedEmail: 'easyflavien@gmail.com',
21             emails: {
22                 fields: {
23                     importAddress: generateMockAddress(0, true),
24                     importPeriod: TIME_PERIOD.LAST_3_MONTHS,
25                     importCategoriesDestination: MailImportDestinationFolder.INBOX,
26                     importLabel: {
27                         Name: 'gmail.com 09-01-2023 09:34',
28                         Color: '#3CBB3A',
29                         Type: 1,
30                     },
31                     mapping: [
32                         {
33                             id: 'Inbox',
34                             providerPath: ['Inbox'],
35                             checked: true,
36                             color: '#B4A40E',
37                             folderParentID: undefined,
38                             systemFolder: MailImportDestinationFolder.INBOX,
39                             isSystemFolderChild: false,
40                             category: undefined,
41                             folderChildIDS: [],
42                             protonPath: ['Inbox'],
43                             separator: '/',
44                             size: 0,
45                         },
46                         {
47                             id: 'Forums',
48                             providerPath: ['Forums'],
49                             category: MailImportGmailCategories.FORUMS,
50                             checked: true,
51                             folderParentID: undefined,
52                             color: '#DB60D6',
53                             systemFolder: MailImportDestinationFolder.INBOX,
54                             isSystemFolderChild: false,
55                             folderChildIDS: [],
56                             protonPath: ['Forums'],
57                             separator: '/',
58                             size: 0,
59                         },
60                         {
61                             id: 'Updates',
62                             providerPath: ['Updates'],
63                             category: MailImportGmailCategories.UPDATES,
64                             checked: true,
65                             color: '#A839A4',
66                             folderParentID: undefined,
67                             systemFolder: MailImportDestinationFolder.INBOX,
68                             isSystemFolderChild: false,
69                             folderChildIDS: [],
70                             protonPath: ['Updates'],
71                             separator: '/',
72                             size: 0,
73                         },
74                         {
75                             id: 'Promotions',
76                             providerPath: ['Promotions'],
77                             category: MailImportGmailCategories.PROMOTIONS,
78                             checked: true,
79                             color: '#5252CC',
80                             folderParentID: undefined,
81                             systemFolder: MailImportDestinationFolder.INBOX,
82                             isSystemFolderChild: false,
83                             folderChildIDS: [],
84                             protonPath: ['Promotions'],
85                             separator: '/',
86                             size: 0,
87                         },
88                         {
89                             id: 'Social',
90                             providerPath: ['Social'],
91                             category: MailImportGmailCategories.SOCIAL,
92                             checked: true,
93                             color: '#B4A40E',
94                             folderParentID: undefined,
95                             systemFolder: MailImportDestinationFolder.INBOX,
96                             isSystemFolderChild: false,
97                             folderChildIDS: [],
98                             protonPath: ['Social'],
99                             separator: '/',
100                             size: 0,
101                         },
102                         {
103                             id: 'Sent',
104                             providerPath: ['Sent'],
105                             checked: true,
106                             color: '#5252CC',
107                             category: undefined,
108                             folderParentID: undefined,
109                             systemFolder: MailImportDestinationFolder.SENT,
110                             isSystemFolderChild: false,
111                             folderChildIDS: [],
112                             protonPath: ['Sent'],
113                             separator: '/',
114                             size: 0,
115                         },
116                         {
117                             id: 'Drafts',
118                             providerPath: ['Drafts'],
119                             checked: true,
120                             color: '#DB60D6',
121                             category: undefined,
122                             folderParentID: undefined,
123                             systemFolder: MailImportDestinationFolder.DRAFTS,
124                             isSystemFolderChild: false,
125                             folderChildIDS: [],
126                             protonPath: ['Drafts'],
127                             separator: '/',
128                             size: 0,
129                         },
130                         {
131                             id: 'Starred',
132                             providerPath: ['Starred'],
133                             checked: true,
134                             color: '#5252CC',
135                             category: undefined,
136                             folderParentID: undefined,
137                             systemFolder: MailImportDestinationFolder.STARRED,
138                             isSystemFolderChild: false,
139                             folderChildIDS: [],
140                             protonPath: ['Starred'],
141                             separator: '/',
142                             size: 0,
143                         },
144                         {
145                             id: 'Important',
146                             providerPath: ['Important'],
147                             checked: true,
148                             color: '#8080FF',
149                             folderChildIDS: [],
150                             category: undefined,
151                             systemFolder: undefined,
152                             isSystemFolderChild: false,
153                             folderParentID: undefined,
154                             protonPath: ['Important'],
155                             separator: '/',
156                             size: 0,
157                         },
158                         {
159                             id: 'Schedule',
160                             providerPath: ['Schedule'],
161                             checked: true,
162                             color: '#1DA583',
163                             folderChildIDS: [],
164                             category: undefined,
166                             systemFolder: undefined,
167                             isSystemFolderChild: false,
168                             folderParentID: undefined,
169                             protonPath: ['Schedule'],
170                             separator: '/',
171                             size: 0,
172                         },
173                         {
174                             id: 'test',
175                             providerPath: ['test'],
176                             checked: true,
177                             color: '#807304',
178                             category: undefined,
180                             systemFolder: undefined,
181                             isSystemFolderChild: false,
182                             folderParentID: undefined,
183                             folderChildIDS: ['test/Schedule', 'test/Schedule/hello', 'test/Scheduled'],
184                             protonPath: ['test'],
185                             separator: '/',
186                             size: 0,
187                         },
188                         {
189                             id: 'test/Schedule',
190                             providerPath: ['test', 'Schedule'],
191                             checked: true,
192                             color: '#807304',
193                             category: undefined,
195                             systemFolder: undefined,
196                             isSystemFolderChild: false,
197                             folderParentID: undefined,
198                             folderChildIDS: ['test/Schedule/hello'],
199                             protonPath: ['test-Schedule'],
200                             separator: '/',
201                             size: 0,
202                         },
203                         {
204                             id: 'test/Schedule/hello',
205                             providerPath: ['test', 'Schedule', 'hello'],
206                             checked: true,
207                             color: '#807304',
208                             folderChildIDS: [],
209                             category: undefined,
211                             systemFolder: undefined,
212                             isSystemFolderChild: false,
213                             folderParentID: 'test/Schedule',
214                             protonPath: ['test-Schedule-hello'],
215                             separator: '/',
216                             size: 0,
217                         },
218                         {
219                             id: 'test/Scheduled',
220                             providerPath: ['test', 'Scheduled'],
221                             checked: true,
222                             color: '#807304',
223                             folderChildIDS: [],
224                             category: undefined,
226                             systemFolder: undefined,
227                             isSystemFolderChild: false,
228                             folderParentID: 'test',
229                             protonPath: ['test-Scheduled'],
230                             separator: '/',
231                             size: 0,
232                         },
233                     ],
234                 },
235             },
236             calendars: {
237                 calendars: [
238                     {
239                         id: 'easyflavien@gmail.com',
240                         source: 'easyflavien@gmail.com',
241                         description: '',
242                         checked: true,
243                     },
244                     {
245                         id: '5245558e2814165719009b25011d988f038c0d7ab37e1509cb7641e5f893f6f5@group.calendar.google.com',
246                         source: 'Agenda temp',
247                         description: '',
248                         checked: true,
249                     },
250                     {
251                         id: '571814dc052c54d2dda066ea0694ea43658b395dbc46d7c4bdcedea8aa91a958@group.calendar.google.com',
252                         source: 'Meeting',
253                         description: 'test',
254                         checked: true,
255                     },
256                 ],
257             },
258             contacts: {},
259         },
260     },