Merge branch 'INDA-330-pii-update' into 'main'
[ProtonMail-WebClient.git] / packages / sieve / fixtures / v2VacationDouble.ts
blob12d43ffb2b87d63c6e9f58c0e15aeb2f4066f3d2
1 const tree = [
2     {
3         List: ['include', 'environment', 'variables', 'comparator-i;ascii-numeric', 'spamtest'],
4         Type: 'Require',
5     },
6     {
7         List: ['fileinto', 'imap4flags', 'date', 'vacation'],
8         Type: 'Require',
9     },
10     {
11         List: ['relational'],
12         Type: 'Require',
13     },
14     {
15         Text: '# Generated: Do not run this script on spam messages',
16         Type: 'Comment',
17     },
18     {
19         If: {
20             Tests: [
21                 {
22                     Name: 'vnd.proton.spam-threshold',
23                     Keys: ['*'],
24                     Format: null,
25                     Match: {
26                         Type: 'Matches',
27                     },
28                     Type: 'Environment',
29                 },
30                 {
31                     Value: {
32                         Value: '${1}',
33                         Type: 'VariableString',
34                     },
35                     Flags: [],
36                     Format: {
37                         Type: 'ASCIINumeric',
38                     },
39                     Match: {
40                         Comparator: 'ge',
41                         Type: 'GreaterEqualsValue',
42                     },
43                     Type: 'SpamTest',
44                 },
45             ],
46             Type: 'AllOf',
47         },
48         Then: [
49             {
50                 Type: 'Return',
51             },
52         ],
53         Type: 'If',
54     },
55     {
56         If: {
57             Tests: [
58                 {
59                     DateFormat: 'date',
60                     Keys: ['2018-06-14'],
61                     Zone: {
62                         Argument: 'CET',
63                         Type: 'Zone',
64                     },
65                     Format: null,
66                     MatchOperator: {
67                         Comparator: 'gt',
68                         Type: 'GreaterValue',
69                     },
70                     Type: 'CurrentDate',
71                 },
72                 {
73                     Headers: ['To', 'Cc', 'Bcc'],
74                     Keys: ['shabanarija@protonmail.ch'],
75                     Match: {
76                         Type: 'Is',
77                     },
78                     Format: {
79                         Type: 'UnicodeCaseMap',
80                     },
81                     AddressPart: {
82                         Type: 'All',
83                     },
84                     Type: 'Address',
85                 },
86             ],
87             Type: 'AllOf',
88         },
89         Then: [
90             {
91                 Message: 'SHABAN Autoresponder message text goes here',
92                 Args: [],
93                 Type: 'Vacation',
94             },
95         ],
96         Type: 'If',
97     },
98     {
99         If: {
100             Tests: [
101                 {
102                     DateFormat: 'date',
103                     Keys: ['2018-06-14'],
104                     Zone: {
105                         Argument: 'CET',
106                         Type: 'Zone',
107                     },
108                     Format: null,
109                     MatchOperator: {
110                         Comparator: 'gt',
111                         Type: 'GreaterValue',
112                     },
113                     Type: 'CurrentDate',
114                 },
115                 {
116                     Headers: ['To', 'Cc', 'Bcc'],
117                     Keys: ['filiptest1@protonmail.com'],
118                     Match: {
119                         Type: 'Is',
120                     },
121                     Format: {
122                         Type: 'UnicodeCaseMap',
123                     },
124                     AddressPart: {
125                         Type: 'All',
126                     },
127                     Type: 'Address',
128                 },
129             ],
130             Type: 'AllOf',
131         },
132         Then: [
133             {
134                 Message: 'FT1 Autoresponder message text goes here',
135                 Args: [],
136                 Type: 'Vacation',
137             },
138         ],
139         Type: 'If',
140     },
143 export default { tree, simple: undefined };