Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / sieve / src / constants.ts
blob6231b9bcee50817d8787d402ef447cfee6ca31ff
1 export const V1 = 1;
2 export const V2 = 2;
4 export const TEST_NODES = {
5     spamtest: [
6         {
7             Text: '# Generated: Do not run this script on spam messages',
8             Type: 'Comment',
9         },
10         {
11             If: {
12                 Tests: [
13                     {
14                         Name: 'vnd.proton.spam-threshold',
15                         Keys: ['*'],
16                         Format: null,
17                         Match: {
18                             Type: 'Matches',
19                         },
20                         Type: 'Environment',
21                     },
22                     {
23                         Value: {
24                             Value: '${1}',
25                             Type: 'VariableString',
26                         },
27                         Flags: [],
28                         Format: {
29                             Type: 'ASCIINumeric',
30                         },
31                         Match: {
32                             Comparator: 'ge',
33                             Type: 'GreaterEqualsValue',
34                         },
35                         Type: 'SpamTest',
36                     },
37                 ],
38                 Type: 'AllOf',
39             },
40             Then: [
41                 {
42                     Type: 'Return',
43                 },
44             ],
45             Type: 'If',
46         },
47     ],
48     attachment: [
49         {
50             Headers: ['X-Attached'],
51             Type: 'Exists',
52         },
53     ],
54     dollar: [
55         {
56             Name: 'dollar',
57             Value: '$',
58             Flags: [],
59             Type: 'Set',
60         },
61     ],