@remit/config-format 0.0.4 → 0.0.6

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.4",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -795,32 +795,11 @@
795
795
  },
796
796
  "density": {
797
797
  "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
798
  }
819
799
  },
820
800
  "required": [
821
801
  "theme",
822
- "density",
823
- "savedSearches"
802
+ "density"
824
803
  ],
825
804
  "additionalProperties": false
826
805
  },
@@ -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
@@ -234,11 +234,6 @@ export const FilterSchema = z.strictObject({
234
234
  anchor: FilterAnchorSchema.nullable(),
235
235
  });
236
236
 
237
- export const SavedSearchSchema = z.strictObject({
238
- name: NonEmpty,
239
- query: z.string(),
240
- });
241
-
242
237
  /**
243
238
  * Preferences the browser holds, not the server. They survive a database drop
244
239
  * already; they ride along so they also survive a change of browser. The server
@@ -247,7 +242,6 @@ export const SavedSearchSchema = z.strictObject({
247
242
  export const ClientPreferencesSchema = z.strictObject({
248
243
  theme: z.string(),
249
244
  density: z.string(),
250
- savedSearches: z.array(SavedSearchSchema),
251
245
  });
252
246
 
253
247
  /**
@@ -283,4 +277,3 @@ export type ConfigFilter = z.infer<typeof FilterSchema>;
283
277
  export type ConfigLabel = z.infer<typeof LabelSchema>;
284
278
  export type ConfigAddressFlagsEntry = z.infer<typeof AddressFlagsEntrySchema>;
285
279
  export type ConfigAddressFlags = z.infer<typeof AddressFlagsSchema>;
286
- 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>;
@@ -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
  }