@remit/config-format 0.0.5 → 0.0.7

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.5",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -616,6 +616,36 @@
616
616
  ],
617
617
  "additionalProperties": false
618
618
  },
619
+ "neverSpam": {
620
+ "type": "object",
621
+ "properties": {
622
+ "value": {
623
+ "type": "boolean"
624
+ },
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.",
627
+ "type": "integer",
628
+ "minimum": -9007199254740991,
629
+ "maximum": 9007199254740991
630
+ },
631
+ "setBy": {
632
+ "type": "string"
633
+ },
634
+ "expiresAt": {
635
+ "type": "integer",
636
+ "minimum": -9007199254740991,
637
+ "maximum": 9007199254740991
638
+ },
639
+ "reason": {
640
+ "type": "string"
641
+ }
642
+ },
643
+ "required": [
644
+ "value",
645
+ "setAt"
646
+ ],
647
+ "additionalProperties": false
648
+ },
619
649
  "muted": {
620
650
  "type": "object",
621
651
  "properties": {
@@ -795,32 +825,11 @@
795
825
  },
796
826
  "density": {
797
827
  "type": "string"
798
- },
799
- "savedSearches": {
800
- "type": "array",
801
- "items": {
802
- "type": "object",
803
- "properties": {
804
- "name": {
805
- "type": "string",
806
- "minLength": 1
807
- },
808
- "query": {
809
- "type": "string"
810
- }
811
- },
812
- "required": [
813
- "name",
814
- "query"
815
- ],
816
- "additionalProperties": false
817
- }
818
828
  }
819
829
  },
820
830
  "required": [
821
831
  "theme",
822
- "density",
823
- "savedSearches"
832
+ "density"
824
833
  ],
825
834
  "additionalProperties": false
826
835
  },
@@ -249,8 +249,7 @@ test("the document schema refuses an unknown top-level section", () => {
249
249
  const source = readGoldenConfigDocument() as Record<string, unknown>;
250
250
 
251
251
  assert.equal(
252
- ReaderConfigDocumentSchema.safeParse({ ...source, savedSearches: [] })
253
- .success,
252
+ ReaderConfigDocumentSchema.safeParse({ ...source, signatures: [] }).success,
254
253
  false,
255
254
  );
256
255
  });
package/src/document.ts CHANGED
@@ -98,6 +98,7 @@ const CategoryFlagSchema = z.strictObject({
98
98
  export const AddressFlagsSchema = z.strictObject({
99
99
  trusted: FlagMetadataSchema.optional(),
100
100
  blocked: FlagMetadataSchema.optional(),
101
+ neverSpam: FlagMetadataSchema.optional(),
101
102
  muted: FlagMetadataSchema.optional(),
102
103
  vip: FlagMetadataSchema.optional(),
103
104
  category: CategoryFlagSchema.optional(),
@@ -234,11 +235,6 @@ export const FilterSchema = z.strictObject({
234
235
  anchor: FilterAnchorSchema.nullable(),
235
236
  });
236
237
 
237
- export const SavedSearchSchema = z.strictObject({
238
- name: NonEmpty,
239
- query: z.string(),
240
- });
241
-
242
238
  /**
243
239
  * Preferences the browser holds, not the server. They survive a database drop
244
240
  * already; they ride along so they also survive a change of browser. The server
@@ -247,7 +243,6 @@ export const SavedSearchSchema = z.strictObject({
247
243
  export const ClientPreferencesSchema = z.strictObject({
248
244
  theme: z.string(),
249
245
  density: z.string(),
250
- savedSearches: z.array(SavedSearchSchema),
251
246
  });
252
247
 
253
248
  /**
@@ -162,8 +162,7 @@
162
162
  ],
163
163
  "clientPreferences": {
164
164
  "theme": "dark",
165
- "density": "comfortable",
166
- "savedSearches": [{ "name": "Unpaid invoices", "query": "label:Facturen is:unread" }]
165
+ "density": "comfortable"
167
166
  },
168
167
  "messageDecisions": []
169
168
  }