@remit/config-format 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,840 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "kind": {
6
+ "type": "string",
7
+ "const": "reader.config"
8
+ },
9
+ "schemaVersion": {
10
+ "type": "number",
11
+ "const": 1
12
+ },
13
+ "generator": {
14
+ "description": "Which reader wrote this file, and when.",
15
+ "type": "object",
16
+ "properties": {
17
+ "app": {
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "version": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "exportedAt": {
26
+ "type": "string",
27
+ "format": "date-time",
28
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
29
+ }
30
+ },
31
+ "required": [
32
+ "app",
33
+ "version",
34
+ "exportedAt"
35
+ ],
36
+ "additionalProperties": false
37
+ },
38
+ "provenance": {
39
+ "description": "The instance this file was exported from. Never applied.",
40
+ "type": "object",
41
+ "properties": {
42
+ "accountConfigId": {
43
+ "type": "string",
44
+ "format": "uuid",
45
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
46
+ },
47
+ "instance": {
48
+ "type": "string"
49
+ }
50
+ },
51
+ "required": [
52
+ "accountConfigId",
53
+ "instance"
54
+ ],
55
+ "additionalProperties": false
56
+ },
57
+ "accountConfig": {
58
+ "type": "object",
59
+ "properties": {
60
+ "name": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "required": [
65
+ "name"
66
+ ],
67
+ "additionalProperties": false
68
+ },
69
+ "accounts": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "properties": {
74
+ "accountId": {
75
+ "type": "string",
76
+ "format": "uuid",
77
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
78
+ },
79
+ "email": {
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "username": {
84
+ "type": "string",
85
+ "minLength": 1
86
+ },
87
+ "authType": {
88
+ "type": "string",
89
+ "enum": [
90
+ "password",
91
+ "oauthMicrosoft"
92
+ ]
93
+ },
94
+ "credentials": {
95
+ "type": "object",
96
+ "properties": {
97
+ "required": {
98
+ "type": "string",
99
+ "enum": [
100
+ "password",
101
+ "oauth"
102
+ ]
103
+ },
104
+ "provider": {
105
+ "type": "string",
106
+ "const": "microsoft"
107
+ }
108
+ },
109
+ "required": [
110
+ "required"
111
+ ],
112
+ "additionalProperties": false
113
+ },
114
+ "isActive": {
115
+ "type": "boolean"
116
+ },
117
+ "imap": {
118
+ "type": "object",
119
+ "properties": {
120
+ "host": {
121
+ "type": "string",
122
+ "minLength": 1
123
+ },
124
+ "port": {
125
+ "type": "integer",
126
+ "minimum": 1,
127
+ "maximum": 65535
128
+ },
129
+ "tls": {
130
+ "type": "boolean"
131
+ },
132
+ "startTls": {
133
+ "type": "boolean"
134
+ }
135
+ },
136
+ "required": [
137
+ "host",
138
+ "port",
139
+ "tls",
140
+ "startTls"
141
+ ],
142
+ "additionalProperties": false
143
+ },
144
+ "smtp": {
145
+ "type": "object",
146
+ "properties": {
147
+ "enabled": {
148
+ "type": "boolean"
149
+ },
150
+ "host": {
151
+ "type": "string"
152
+ },
153
+ "port": {
154
+ "type": "integer",
155
+ "minimum": 1,
156
+ "maximum": 65535
157
+ },
158
+ "tls": {
159
+ "type": "boolean"
160
+ },
161
+ "startTls": {
162
+ "type": "boolean"
163
+ },
164
+ "username": {
165
+ "type": "string"
166
+ }
167
+ },
168
+ "required": [
169
+ "enabled",
170
+ "host",
171
+ "port",
172
+ "tls",
173
+ "startTls",
174
+ "username"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ "displayName": {
179
+ "type": "string"
180
+ },
181
+ "muted": {
182
+ "anyOf": [
183
+ {
184
+ "type": "object",
185
+ "properties": {
186
+ "value": {
187
+ "type": "boolean"
188
+ },
189
+ "setAt": {
190
+ "type": "integer",
191
+ "minimum": -9007199254740991,
192
+ "maximum": 9007199254740991
193
+ },
194
+ "setBy": {
195
+ "type": "string"
196
+ },
197
+ "expiresAt": {
198
+ "type": "integer",
199
+ "minimum": -9007199254740991,
200
+ "maximum": 9007199254740991
201
+ },
202
+ "reason": {
203
+ "type": "string"
204
+ }
205
+ },
206
+ "required": [
207
+ "value",
208
+ "setAt"
209
+ ],
210
+ "additionalProperties": false
211
+ },
212
+ {
213
+ "type": "null"
214
+ }
215
+ ]
216
+ },
217
+ "composeLanguages": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "string",
221
+ "minLength": 1
222
+ }
223
+ },
224
+ "signature": {
225
+ "type": "object",
226
+ "properties": {
227
+ "plainText": {
228
+ "type": "string"
229
+ },
230
+ "html": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "required": [
235
+ "plainText",
236
+ "html"
237
+ ],
238
+ "additionalProperties": false
239
+ },
240
+ "folderRoles": {
241
+ "type": "array",
242
+ "items": {
243
+ "type": "object",
244
+ "properties": {
245
+ "role": {
246
+ "type": "string",
247
+ "enum": [
248
+ "Inbox",
249
+ "Drafts",
250
+ "Sent",
251
+ "Archive",
252
+ "Junk",
253
+ "Trash",
254
+ "All",
255
+ "Flagged"
256
+ ]
257
+ },
258
+ "folderPath": {
259
+ "type": "string",
260
+ "minLength": 1,
261
+ "maxLength": 512
262
+ }
263
+ },
264
+ "required": [
265
+ "role",
266
+ "folderPath"
267
+ ],
268
+ "additionalProperties": false
269
+ }
270
+ },
271
+ "folderOverrides": {
272
+ "type": "array",
273
+ "items": {
274
+ "type": "object",
275
+ "properties": {
276
+ "folderPath": {
277
+ "type": "string",
278
+ "minLength": 1,
279
+ "maxLength": 512
280
+ },
281
+ "displayName": {
282
+ "type": "string"
283
+ },
284
+ "muted": {
285
+ "anyOf": [
286
+ {
287
+ "type": "object",
288
+ "properties": {
289
+ "value": {
290
+ "type": "boolean"
291
+ },
292
+ "setAt": {
293
+ "type": "integer",
294
+ "minimum": -9007199254740991,
295
+ "maximum": 9007199254740991
296
+ },
297
+ "setBy": {
298
+ "type": "string"
299
+ },
300
+ "expiresAt": {
301
+ "type": "integer",
302
+ "minimum": -9007199254740991,
303
+ "maximum": 9007199254740991
304
+ },
305
+ "reason": {
306
+ "type": "string"
307
+ }
308
+ },
309
+ "required": [
310
+ "value",
311
+ "setAt"
312
+ ],
313
+ "additionalProperties": false
314
+ },
315
+ {
316
+ "type": "null"
317
+ }
318
+ ]
319
+ }
320
+ },
321
+ "required": [
322
+ "folderPath",
323
+ "displayName",
324
+ "muted"
325
+ ],
326
+ "additionalProperties": false
327
+ }
328
+ },
329
+ "pinnedFolders": {
330
+ "type": "array",
331
+ "items": {
332
+ "type": "string",
333
+ "minLength": 1,
334
+ "maxLength": 512
335
+ }
336
+ }
337
+ },
338
+ "required": [
339
+ "accountId",
340
+ "email",
341
+ "username",
342
+ "authType",
343
+ "credentials",
344
+ "isActive",
345
+ "imap",
346
+ "smtp",
347
+ "displayName",
348
+ "muted",
349
+ "composeLanguages",
350
+ "signature",
351
+ "folderRoles",
352
+ "folderOverrides",
353
+ "pinnedFolders"
354
+ ],
355
+ "additionalProperties": false
356
+ }
357
+ },
358
+ "labels": {
359
+ "type": "array",
360
+ "items": {
361
+ "type": "object",
362
+ "properties": {
363
+ "name": {
364
+ "type": "string",
365
+ "minLength": 1,
366
+ "maxLength": 140
367
+ },
368
+ "color": {
369
+ "type": "string",
370
+ "enum": [
371
+ "Default",
372
+ "Red",
373
+ "Orange",
374
+ "Yellow",
375
+ "Green",
376
+ "Teal",
377
+ "Blue",
378
+ "Purple",
379
+ "Gray"
380
+ ]
381
+ }
382
+ },
383
+ "required": [
384
+ "name",
385
+ "color"
386
+ ],
387
+ "additionalProperties": false
388
+ }
389
+ },
390
+ "filters": {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "object",
394
+ "properties": {
395
+ "name": {
396
+ "type": "string",
397
+ "minLength": 1,
398
+ "maxLength": 256
399
+ },
400
+ "scope": {
401
+ "type": "string",
402
+ "enum": [
403
+ "Standing",
404
+ "Temporary"
405
+ ]
406
+ },
407
+ "expiresAt": {
408
+ "anyOf": [
409
+ {
410
+ "type": "string",
411
+ "format": "date-time",
412
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"
413
+ },
414
+ {
415
+ "type": "null"
416
+ }
417
+ ]
418
+ },
419
+ "matchOperator": {
420
+ "type": "string",
421
+ "enum": [
422
+ "And",
423
+ "Or"
424
+ ]
425
+ },
426
+ "literalClauses": {
427
+ "type": "array",
428
+ "items": {
429
+ "type": "object",
430
+ "properties": {
431
+ "field": {
432
+ "type": "string",
433
+ "enum": [
434
+ "From",
435
+ "Subject",
436
+ "HasWords",
437
+ "ListId",
438
+ "FromDomain"
439
+ ]
440
+ },
441
+ "value": {
442
+ "type": "string",
443
+ "minLength": 1,
444
+ "maxLength": 256
445
+ }
446
+ },
447
+ "required": [
448
+ "field",
449
+ "value"
450
+ ],
451
+ "additionalProperties": false
452
+ }
453
+ },
454
+ "actionLabelName": {
455
+ "anyOf": [
456
+ {
457
+ "type": "string",
458
+ "minLength": 1,
459
+ "maxLength": 140
460
+ },
461
+ {
462
+ "type": "null"
463
+ }
464
+ ]
465
+ },
466
+ "actionFolder": {
467
+ "anyOf": [
468
+ {
469
+ "type": "object",
470
+ "properties": {
471
+ "accountId": {
472
+ "type": "string",
473
+ "format": "uuid",
474
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
475
+ },
476
+ "folderPath": {
477
+ "type": "string",
478
+ "minLength": 1,
479
+ "maxLength": 512
480
+ }
481
+ },
482
+ "required": [
483
+ "accountId",
484
+ "folderPath"
485
+ ],
486
+ "additionalProperties": false
487
+ },
488
+ {
489
+ "type": "null"
490
+ }
491
+ ]
492
+ },
493
+ "anchor": {
494
+ "anyOf": [
495
+ {
496
+ "type": "object",
497
+ "properties": {
498
+ "sourceText": {
499
+ "type": "string",
500
+ "minLength": 1,
501
+ "maxLength": 512
502
+ },
503
+ "embeddingId": {
504
+ "type": "string",
505
+ "minLength": 1
506
+ },
507
+ "sourceMessageId": {
508
+ "type": "string",
509
+ "format": "uuid",
510
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
511
+ }
512
+ },
513
+ "required": [
514
+ "sourceText",
515
+ "embeddingId",
516
+ "sourceMessageId"
517
+ ],
518
+ "additionalProperties": false
519
+ },
520
+ {
521
+ "type": "null"
522
+ }
523
+ ]
524
+ }
525
+ },
526
+ "required": [
527
+ "name",
528
+ "scope",
529
+ "expiresAt",
530
+ "matchOperator",
531
+ "literalClauses",
532
+ "actionLabelName",
533
+ "actionFolder",
534
+ "anchor"
535
+ ],
536
+ "additionalProperties": false
537
+ }
538
+ },
539
+ "addressFlags": {
540
+ "type": "array",
541
+ "items": {
542
+ "type": "object",
543
+ "properties": {
544
+ "normalizedEmail": {
545
+ "type": "string",
546
+ "minLength": 1
547
+ },
548
+ "displayName": {
549
+ "type": "string"
550
+ },
551
+ "flags": {
552
+ "type": "object",
553
+ "properties": {
554
+ "trusted": {
555
+ "type": "object",
556
+ "properties": {
557
+ "value": {
558
+ "type": "boolean"
559
+ },
560
+ "setAt": {
561
+ "type": "integer",
562
+ "minimum": -9007199254740991,
563
+ "maximum": 9007199254740991
564
+ },
565
+ "setBy": {
566
+ "type": "string"
567
+ },
568
+ "expiresAt": {
569
+ "type": "integer",
570
+ "minimum": -9007199254740991,
571
+ "maximum": 9007199254740991
572
+ },
573
+ "reason": {
574
+ "type": "string"
575
+ }
576
+ },
577
+ "required": [
578
+ "value",
579
+ "setAt"
580
+ ],
581
+ "additionalProperties": false
582
+ },
583
+ "blocked": {
584
+ "type": "object",
585
+ "properties": {
586
+ "value": {
587
+ "type": "boolean"
588
+ },
589
+ "setAt": {
590
+ "type": "integer",
591
+ "minimum": -9007199254740991,
592
+ "maximum": 9007199254740991
593
+ },
594
+ "setBy": {
595
+ "type": "string"
596
+ },
597
+ "expiresAt": {
598
+ "type": "integer",
599
+ "minimum": -9007199254740991,
600
+ "maximum": 9007199254740991
601
+ },
602
+ "reason": {
603
+ "type": "string"
604
+ }
605
+ },
606
+ "required": [
607
+ "value",
608
+ "setAt"
609
+ ],
610
+ "additionalProperties": false
611
+ },
612
+ "muted": {
613
+ "type": "object",
614
+ "properties": {
615
+ "value": {
616
+ "type": "boolean"
617
+ },
618
+ "setAt": {
619
+ "type": "integer",
620
+ "minimum": -9007199254740991,
621
+ "maximum": 9007199254740991
622
+ },
623
+ "setBy": {
624
+ "type": "string"
625
+ },
626
+ "expiresAt": {
627
+ "type": "integer",
628
+ "minimum": -9007199254740991,
629
+ "maximum": 9007199254740991
630
+ },
631
+ "reason": {
632
+ "type": "string"
633
+ }
634
+ },
635
+ "required": [
636
+ "value",
637
+ "setAt"
638
+ ],
639
+ "additionalProperties": false
640
+ },
641
+ "vip": {
642
+ "type": "object",
643
+ "properties": {
644
+ "value": {
645
+ "type": "boolean"
646
+ },
647
+ "setAt": {
648
+ "type": "integer",
649
+ "minimum": -9007199254740991,
650
+ "maximum": 9007199254740991
651
+ },
652
+ "setBy": {
653
+ "type": "string"
654
+ },
655
+ "expiresAt": {
656
+ "type": "integer",
657
+ "minimum": -9007199254740991,
658
+ "maximum": 9007199254740991
659
+ },
660
+ "reason": {
661
+ "type": "string"
662
+ }
663
+ },
664
+ "required": [
665
+ "value",
666
+ "setAt"
667
+ ],
668
+ "additionalProperties": false
669
+ },
670
+ "category": {
671
+ "type": "object",
672
+ "properties": {
673
+ "value": {
674
+ "type": "string",
675
+ "enum": [
676
+ "uncategorized",
677
+ "personal",
678
+ "newsletter",
679
+ "marketing",
680
+ "automated",
681
+ "transactional",
682
+ "social"
683
+ ]
684
+ },
685
+ "setAt": {
686
+ "type": "integer",
687
+ "minimum": -9007199254740991,
688
+ "maximum": 9007199254740991
689
+ },
690
+ "setBy": {
691
+ "type": "string"
692
+ },
693
+ "expiresAt": {
694
+ "type": "integer",
695
+ "minimum": -9007199254740991,
696
+ "maximum": 9007199254740991
697
+ },
698
+ "reason": {
699
+ "type": "string"
700
+ }
701
+ },
702
+ "required": [
703
+ "value",
704
+ "setAt"
705
+ ],
706
+ "additionalProperties": false
707
+ },
708
+ "autoArchive": {
709
+ "type": "object",
710
+ "properties": {
711
+ "value": {
712
+ "type": "boolean"
713
+ },
714
+ "setAt": {
715
+ "type": "integer",
716
+ "minimum": -9007199254740991,
717
+ "maximum": 9007199254740991
718
+ },
719
+ "setBy": {
720
+ "type": "string"
721
+ },
722
+ "expiresAt": {
723
+ "type": "integer",
724
+ "minimum": -9007199254740991,
725
+ "maximum": 9007199254740991
726
+ },
727
+ "reason": {
728
+ "type": "string"
729
+ }
730
+ },
731
+ "required": [
732
+ "value",
733
+ "setAt"
734
+ ],
735
+ "additionalProperties": false
736
+ },
737
+ "unsubscribed": {
738
+ "type": "object",
739
+ "properties": {
740
+ "value": {
741
+ "type": "boolean"
742
+ },
743
+ "setAt": {
744
+ "type": "integer",
745
+ "minimum": -9007199254740991,
746
+ "maximum": 9007199254740991
747
+ },
748
+ "setBy": {
749
+ "type": "string"
750
+ },
751
+ "expiresAt": {
752
+ "type": "integer",
753
+ "minimum": -9007199254740991,
754
+ "maximum": 9007199254740991
755
+ },
756
+ "reason": {
757
+ "type": "string"
758
+ }
759
+ },
760
+ "required": [
761
+ "value",
762
+ "setAt"
763
+ ],
764
+ "additionalProperties": false
765
+ }
766
+ },
767
+ "additionalProperties": false
768
+ }
769
+ },
770
+ "required": [
771
+ "normalizedEmail",
772
+ "displayName",
773
+ "flags"
774
+ ],
775
+ "additionalProperties": false
776
+ }
777
+ },
778
+ "clientPreferences": {
779
+ "type": "object",
780
+ "properties": {
781
+ "theme": {
782
+ "type": "string"
783
+ },
784
+ "density": {
785
+ "type": "string"
786
+ },
787
+ "defaultComposerFormat": {
788
+ "type": "string"
789
+ },
790
+ "savedSearches": {
791
+ "type": "array",
792
+ "items": {
793
+ "type": "object",
794
+ "properties": {
795
+ "name": {
796
+ "type": "string",
797
+ "minLength": 1
798
+ },
799
+ "query": {
800
+ "type": "string"
801
+ }
802
+ },
803
+ "required": [
804
+ "name",
805
+ "query"
806
+ ],
807
+ "additionalProperties": false
808
+ }
809
+ }
810
+ },
811
+ "required": [
812
+ "theme",
813
+ "density",
814
+ "defaultComposerFormat",
815
+ "savedSearches"
816
+ ],
817
+ "additionalProperties": false
818
+ },
819
+ "messageDecisions": {
820
+ "description": "Reserved for a later schema version; must be empty in v1.",
821
+ "maxItems": 0,
822
+ "type": "array",
823
+ "items": {}
824
+ }
825
+ },
826
+ "required": [
827
+ "kind",
828
+ "schemaVersion",
829
+ "generator",
830
+ "provenance",
831
+ "accountConfig",
832
+ "accounts",
833
+ "labels",
834
+ "filters",
835
+ "addressFlags"
836
+ ],
837
+ "additionalProperties": false,
838
+ "$id": "https://schemas.remit.email/reader-config.v1.schema.json",
839
+ "title": "reader configuration document, v1"
840
+ }