@remit/config-format 0.0.3 → 0.0.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/config-format",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -190,6 +190,7 @@
190
190
  "type": "boolean"
191
191
  },
192
192
  "setAt": {
193
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
193
194
  "type": "integer",
194
195
  "minimum": -9007199254740991,
195
196
  "maximum": 9007199254740991
@@ -293,6 +294,7 @@
293
294
  "type": "boolean"
294
295
  },
295
296
  "setAt": {
297
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
296
298
  "type": "integer",
297
299
  "minimum": -9007199254740991,
298
300
  "maximum": 9007199254740991
@@ -561,6 +563,7 @@
561
563
  "type": "boolean"
562
564
  },
563
565
  "setAt": {
566
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
564
567
  "type": "integer",
565
568
  "minimum": -9007199254740991,
566
569
  "maximum": 9007199254740991
@@ -590,6 +593,7 @@
590
593
  "type": "boolean"
591
594
  },
592
595
  "setAt": {
596
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
593
597
  "type": "integer",
594
598
  "minimum": -9007199254740991,
595
599
  "maximum": 9007199254740991
@@ -619,6 +623,7 @@
619
623
  "type": "boolean"
620
624
  },
621
625
  "setAt": {
626
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
622
627
  "type": "integer",
623
628
  "minimum": -9007199254740991,
624
629
  "maximum": 9007199254740991
@@ -648,6 +653,7 @@
648
653
  "type": "boolean"
649
654
  },
650
655
  "setAt": {
656
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
651
657
  "type": "integer",
652
658
  "minimum": -9007199254740991,
653
659
  "maximum": 9007199254740991
@@ -686,6 +692,7 @@
686
692
  ]
687
693
  },
688
694
  "setAt": {
695
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
689
696
  "type": "integer",
690
697
  "minimum": -9007199254740991,
691
698
  "maximum": 9007199254740991
@@ -715,6 +722,7 @@
715
722
  "type": "boolean"
716
723
  },
717
724
  "setAt": {
725
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
718
726
  "type": "integer",
719
727
  "minimum": -9007199254740991,
720
728
  "maximum": 9007199254740991
@@ -744,6 +752,7 @@
744
752
  "type": "boolean"
745
753
  },
746
754
  "setAt": {
755
+ "description": "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
747
756
  "type": "integer",
748
757
  "minimum": -9007199254740991,
749
758
  "maximum": 9007199254740991
package/src/document.ts CHANGED
@@ -24,6 +24,16 @@ const IsoDateTime = z.iso.datetime({ offset: true });
24
24
  const Port = z.int().min(1).max(65535);
25
25
  const FlagTimestamp = z.int();
26
26
 
27
+ /**
28
+ * When a flag was set. Required, with zero as the sentinel for a flag whose
29
+ * stored row predates the field: the decision is real, the moment it was made
30
+ * is not known. An exporter fills the sentinel rather than the export's own
31
+ * clock, which would date an old decision to the day it was copied.
32
+ */
33
+ const FlagSetAt = FlagTimestamp.describe(
34
+ "Epoch milliseconds the flag was set. 0 means it was set at an unknown time, on a row written before the field existed.",
35
+ );
36
+
27
37
  /**
28
38
  * An IMAP path, as the server spells it. Folders travel by path rather than by
29
39
  * id: the ids are local to the instance that wrote the file, the path is what
@@ -58,7 +68,7 @@ export const ProvenanceSchema = z
58
68
  /** The audit metadata every sender-level flag and mute carries. */
59
69
  export const FlagMetadataSchema = z.strictObject({
60
70
  value: z.boolean(),
61
- setAt: FlagTimestamp,
71
+ setAt: FlagSetAt,
62
72
  setBy: z.string().optional(),
63
73
  expiresAt: FlagTimestamp.optional(),
64
74
  reason: z.string().optional(),
@@ -68,7 +78,7 @@ export const MutedFlagSchema = FlagMetadataSchema;
68
78
 
69
79
  const CategoryFlagSchema = z.strictObject({
70
80
  value: z.enum(MessageCategory),
71
- setAt: FlagTimestamp,
81
+ setAt: FlagSetAt,
72
82
  setBy: z.string().optional(),
73
83
  expiresAt: FlagTimestamp.optional(),
74
84
  reason: z.string().optional(),
@@ -273,4 +283,3 @@ export type ConfigFilter = z.infer<typeof FilterSchema>;
273
283
  export type ConfigLabel = z.infer<typeof LabelSchema>;
274
284
  export type ConfigAddressFlagsEntry = z.infer<typeof AddressFlagsEntrySchema>;
275
285
  export type ConfigAddressFlags = z.infer<typeof AddressFlagsSchema>;
276
- export type ConfigClientPreferences = z.infer<typeof ClientPreferencesSchema>;
package/src/envelope.ts CHANGED
@@ -11,5 +11,3 @@ export const ConfigEnvelopeSchema = z.object({
11
11
  kind: z.literal(CONFIG_KIND),
12
12
  schemaVersion: z.int().min(1),
13
13
  });
14
-
15
- export type ConfigEnvelope = z.infer<typeof ConfigEnvelopeSchema>;