@marcoappio/marco-config 2.0.526 → 2.0.527

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.
@@ -196,26 +196,22 @@ export declare const marcoZero: {
196
196
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
197
197
  }, undefined>, undefined>;
198
198
  readonly labelPath: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
199
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
200
199
  }, undefined>;
201
200
  delete: import("valibot").ObjectSchema<{
202
201
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
203
202
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
204
203
  }, undefined>, undefined>;
205
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
206
204
  }, undefined>;
207
205
  removeLabel: import("valibot").ObjectSchema<{
208
206
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
209
207
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
210
208
  }, undefined>, undefined>;
211
209
  readonly labelPath: import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>;
212
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
213
210
  }, undefined>;
214
211
  setArchive: import("valibot").ObjectSchema<{
215
212
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
216
213
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
217
214
  }, undefined>, undefined>;
218
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
219
215
  }, undefined>;
220
216
  setFlagged: import("valibot").ObjectSchema<{
221
217
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
@@ -227,26 +223,22 @@ export declare const marcoZero: {
227
223
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
228
224
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
229
225
  }, undefined>, undefined>;
230
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
231
226
  }, undefined>;
232
227
  setSeen: import("valibot").ObjectSchema<{
233
228
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
234
229
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
235
230
  }, undefined>, undefined>;
236
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
237
231
  readonly seen: import("valibot").BooleanSchema<undefined>;
238
232
  }, undefined>;
239
233
  setSpam: import("valibot").ObjectSchema<{
240
234
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
241
235
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
242
236
  }, undefined>, undefined>;
243
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
244
237
  }, undefined>;
245
238
  setTrash: import("valibot").ObjectSchema<{
246
239
  readonly accounts: import("valibot").RecordSchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, import("valibot").ObjectSchema<{
247
240
  readonly threadIds: import("valibot").ArraySchema<import("valibot").NonOptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").NonEmptyAction<string, undefined>, import("valibot").MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
248
241
  }, undefined>, undefined>;
249
- readonly labelUnreadCounts: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").NumberSchema<undefined>, undefined>, undefined>;
250
242
  }, undefined>;
251
243
  };
252
244
  user: {
@@ -589,9 +581,6 @@ export declare const marcoZero: {
589
581
  };
590
582
  };
591
583
  labelPath: string;
592
- labelUnreadCounts?: {
593
- [x: string]: number;
594
- } | undefined;
595
584
  }, {
596
585
  accounts: {
597
586
  [x: string]: {
@@ -599,9 +588,6 @@ export declare const marcoZero: {
599
588
  };
600
589
  };
601
590
  labelPath: string;
602
- labelUnreadCounts?: {
603
- [x: string]: number;
604
- } | undefined;
605
591
  }, {
606
592
  userId: string;
607
593
  }, unknown>;
@@ -611,18 +597,12 @@ export declare const marcoZero: {
611
597
  threadIds: string[];
612
598
  };
613
599
  };
614
- labelUnreadCounts?: {
615
- [x: string]: number;
616
- } | undefined;
617
600
  }, {
618
601
  accounts: {
619
602
  [x: string]: {
620
603
  threadIds: string[];
621
604
  };
622
605
  };
623
- labelUnreadCounts?: {
624
- [x: string]: number;
625
- } | undefined;
626
606
  }, {
627
607
  userId: string;
628
608
  }, unknown>;
@@ -633,9 +613,6 @@ export declare const marcoZero: {
633
613
  };
634
614
  };
635
615
  labelPath: string;
636
- labelUnreadCounts?: {
637
- [x: string]: number;
638
- } | undefined;
639
616
  }, {
640
617
  accounts: {
641
618
  [x: string]: {
@@ -643,9 +620,6 @@ export declare const marcoZero: {
643
620
  };
644
621
  };
645
622
  labelPath: string;
646
- labelUnreadCounts?: {
647
- [x: string]: number;
648
- } | undefined;
649
623
  }, {
650
624
  userId: string;
651
625
  }, unknown>;
@@ -655,18 +629,12 @@ export declare const marcoZero: {
655
629
  threadIds: string[];
656
630
  };
657
631
  };
658
- labelUnreadCounts?: {
659
- [x: string]: number;
660
- } | undefined;
661
632
  }, {
662
633
  accounts: {
663
634
  [x: string]: {
664
635
  threadIds: string[];
665
636
  };
666
637
  };
667
- labelUnreadCounts?: {
668
- [x: string]: number;
669
- } | undefined;
670
638
  }, {
671
639
  userId: string;
672
640
  }, unknown>;
@@ -693,18 +661,12 @@ export declare const marcoZero: {
693
661
  threadIds: string[];
694
662
  };
695
663
  };
696
- labelUnreadCounts?: {
697
- [x: string]: number;
698
- } | undefined;
699
664
  }, {
700
665
  accounts: {
701
666
  [x: string]: {
702
667
  threadIds: string[];
703
668
  };
704
669
  };
705
- labelUnreadCounts?: {
706
- [x: string]: number;
707
- } | undefined;
708
670
  }, {
709
671
  userId: string;
710
672
  }, unknown>;
@@ -714,9 +676,6 @@ export declare const marcoZero: {
714
676
  threadIds: string[];
715
677
  };
716
678
  };
717
- labelUnreadCounts?: {
718
- [x: string]: number;
719
- } | undefined;
720
679
  seen: boolean;
721
680
  }, {
722
681
  accounts: {
@@ -724,9 +683,6 @@ export declare const marcoZero: {
724
683
  threadIds: string[];
725
684
  };
726
685
  };
727
- labelUnreadCounts?: {
728
- [x: string]: number;
729
- } | undefined;
730
686
  seen: boolean;
731
687
  }, {
732
688
  userId: string;
@@ -737,18 +693,12 @@ export declare const marcoZero: {
737
693
  threadIds: string[];
738
694
  };
739
695
  };
740
- labelUnreadCounts?: {
741
- [x: string]: number;
742
- } | undefined;
743
696
  }, {
744
697
  accounts: {
745
698
  [x: string]: {
746
699
  threadIds: string[];
747
700
  };
748
701
  };
749
- labelUnreadCounts?: {
750
- [x: string]: number;
751
- } | undefined;
752
702
  }, {
753
703
  userId: string;
754
704
  }, unknown>;
@@ -758,18 +708,12 @@ export declare const marcoZero: {
758
708
  threadIds: string[];
759
709
  };
760
710
  };
761
- labelUnreadCounts?: {
762
- [x: string]: number;
763
- } | undefined;
764
711
  }, {
765
712
  accounts: {
766
713
  [x: string]: {
767
714
  threadIds: string[];
768
715
  };
769
716
  };
770
- labelUnreadCounts?: {
771
- [x: string]: number;
772
- } | undefined;
773
717
  }, {
774
718
  userId: string;
775
719
  }, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMZ,CAAA"}
@@ -196,26 +196,22 @@ export declare const mutatorSchemas: {
196
196
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
197
197
  }, undefined>, undefined>;
198
198
  readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
199
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
200
199
  }, undefined>;
201
200
  delete: v.ObjectSchema<{
202
201
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
203
202
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
204
203
  }, undefined>, undefined>;
205
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
206
204
  }, undefined>;
207
205
  removeLabel: v.ObjectSchema<{
208
206
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
209
207
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
210
208
  }, undefined>, undefined>;
211
209
  readonly labelPath: v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
212
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
213
210
  }, undefined>;
214
211
  setArchive: v.ObjectSchema<{
215
212
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
216
213
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
217
214
  }, undefined>, undefined>;
218
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
219
215
  }, undefined>;
220
216
  setFlagged: v.ObjectSchema<{
221
217
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
@@ -227,26 +223,22 @@ export declare const mutatorSchemas: {
227
223
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
228
224
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
229
225
  }, undefined>, undefined>;
230
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
231
226
  }, undefined>;
232
227
  setSeen: v.ObjectSchema<{
233
228
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
234
229
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
235
230
  }, undefined>, undefined>;
236
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
237
231
  readonly seen: v.BooleanSchema<undefined>;
238
232
  }, undefined>;
239
233
  setSpam: v.ObjectSchema<{
240
234
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
241
235
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
242
236
  }, undefined>, undefined>;
243
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
244
237
  }, undefined>;
245
238
  setTrash: v.ObjectSchema<{
246
239
  readonly accounts: v.RecordSchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.ObjectSchema<{
247
240
  readonly threadIds: v.ArraySchema<v.NonOptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, undefined>;
248
241
  }, undefined>, undefined>;
249
- readonly labelUnreadCounts: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.NumberSchema<undefined>, undefined>, undefined>;
250
242
  }, undefined>;
251
243
  };
252
244
  user: {
@@ -1 +1 @@
1
- {"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../src/zero/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAyE5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2I1B,CAAA"}
1
+ {"version":3,"file":"mutatorSchemas.d.ts","sourceRoot":"","sources":["../../src/zero/mutatorSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAqE5B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0I1B,CAAA"}
@@ -10,15 +10,12 @@ const accountAliasSchema = v.object({
10
10
  const accountsSchema = v.record(marcoSchemas.string.required(), v.object({
11
11
  threadIds: v.array(marcoSchemas.string.required()),
12
12
  }));
13
- const labelUnreadCountsSchema = v.optional(v.record(v.string(), v.number()));
14
13
  const baseThreadSchema = v.object({
15
14
  accounts: accountsSchema,
16
- labelUnreadCounts: labelUnreadCountsSchema,
17
15
  });
18
16
  const threadChangeLabelSchema = v.object({
19
17
  accounts: accountsSchema,
20
18
  labelPath: marcoSchemas.string.required(),
21
- labelUnreadCounts: labelUnreadCountsSchema,
22
19
  });
23
20
  const draftBodySchema = v.object({
24
21
  bcc: v.array(marcoSchemas.string.email()),
@@ -175,7 +172,6 @@ export const mutatorSchemas = {
175
172
  setInbox: baseThreadSchema,
176
173
  setSeen: v.object({
177
174
  accounts: accountsSchema,
178
- labelUnreadCounts: labelUnreadCountsSchema,
179
175
  seen: v.boolean(),
180
176
  }),
181
177
  setSpam: baseThreadSchema,
@@ -286,9 +286,6 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
286
286
  };
287
287
  };
288
288
  labelPath: string;
289
- labelUnreadCounts?: {
290
- [x: string]: number;
291
- } | undefined;
292
289
  }, {
293
290
  accounts: {
294
291
  [x: string]: {
@@ -296,9 +293,6 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
296
293
  };
297
294
  };
298
295
  labelPath: string;
299
- labelUnreadCounts?: {
300
- [x: string]: number;
301
- } | undefined;
302
296
  }, Context, unknown>;
303
297
  readonly delete: import("@rocicorp/zero").MutatorDefinition<{
304
298
  accounts: {
@@ -306,18 +300,12 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
306
300
  threadIds: string[];
307
301
  };
308
302
  };
309
- labelUnreadCounts?: {
310
- [x: string]: number;
311
- } | undefined;
312
303
  }, {
313
304
  accounts: {
314
305
  [x: string]: {
315
306
  threadIds: string[];
316
307
  };
317
308
  };
318
- labelUnreadCounts?: {
319
- [x: string]: number;
320
- } | undefined;
321
309
  }, Context, unknown>;
322
310
  readonly removeLabel: import("@rocicorp/zero").MutatorDefinition<{
323
311
  accounts: {
@@ -326,9 +314,6 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
326
314
  };
327
315
  };
328
316
  labelPath: string;
329
- labelUnreadCounts?: {
330
- [x: string]: number;
331
- } | undefined;
332
317
  }, {
333
318
  accounts: {
334
319
  [x: string]: {
@@ -336,9 +321,6 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
336
321
  };
337
322
  };
338
323
  labelPath: string;
339
- labelUnreadCounts?: {
340
- [x: string]: number;
341
- } | undefined;
342
324
  }, Context, unknown>;
343
325
  readonly setArchive: import("@rocicorp/zero").MutatorDefinition<{
344
326
  accounts: {
@@ -346,18 +328,12 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
346
328
  threadIds: string[];
347
329
  };
348
330
  };
349
- labelUnreadCounts?: {
350
- [x: string]: number;
351
- } | undefined;
352
331
  }, {
353
332
  accounts: {
354
333
  [x: string]: {
355
334
  threadIds: string[];
356
335
  };
357
336
  };
358
- labelUnreadCounts?: {
359
- [x: string]: number;
360
- } | undefined;
361
337
  }, Context, unknown>;
362
338
  readonly setFlagged: import("@rocicorp/zero").MutatorDefinition<{
363
339
  accounts: {
@@ -380,18 +356,12 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
380
356
  threadIds: string[];
381
357
  };
382
358
  };
383
- labelUnreadCounts?: {
384
- [x: string]: number;
385
- } | undefined;
386
359
  }, {
387
360
  accounts: {
388
361
  [x: string]: {
389
362
  threadIds: string[];
390
363
  };
391
364
  };
392
- labelUnreadCounts?: {
393
- [x: string]: number;
394
- } | undefined;
395
365
  }, Context, unknown>;
396
366
  readonly setSeen: import("@rocicorp/zero").MutatorDefinition<{
397
367
  accounts: {
@@ -399,9 +369,6 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
399
369
  threadIds: string[];
400
370
  };
401
371
  };
402
- labelUnreadCounts?: {
403
- [x: string]: number;
404
- } | undefined;
405
372
  seen: boolean;
406
373
  }, {
407
374
  accounts: {
@@ -409,9 +376,6 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
409
376
  threadIds: string[];
410
377
  };
411
378
  };
412
- labelUnreadCounts?: {
413
- [x: string]: number;
414
- } | undefined;
415
379
  seen: boolean;
416
380
  }, Context, unknown>;
417
381
  readonly setSpam: import("@rocicorp/zero").MutatorDefinition<{
@@ -420,18 +384,12 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
420
384
  threadIds: string[];
421
385
  };
422
386
  };
423
- labelUnreadCounts?: {
424
- [x: string]: number;
425
- } | undefined;
426
387
  }, {
427
388
  accounts: {
428
389
  [x: string]: {
429
390
  threadIds: string[];
430
391
  };
431
392
  };
432
- labelUnreadCounts?: {
433
- [x: string]: number;
434
- } | undefined;
435
393
  }, Context, unknown>;
436
394
  readonly setTrash: import("@rocicorp/zero").MutatorDefinition<{
437
395
  accounts: {
@@ -439,18 +397,12 @@ export declare const mutators: import("@rocicorp/zero").MutatorRegistry<{
439
397
  threadIds: string[];
440
398
  };
441
399
  };
442
- labelUnreadCounts?: {
443
- [x: string]: number;
444
- } | undefined;
445
400
  }, {
446
401
  accounts: {
447
402
  [x: string]: {
448
403
  threadIds: string[];
449
404
  };
450
405
  };
451
- labelUnreadCounts?: {
452
- [x: string]: number;
453
- } | undefined;
454
406
  }, Context, unknown>;
455
407
  };
456
408
  readonly user: {
@@ -1 +1 @@
1
- {"version":3,"file":"mutators.d.ts","sourceRoot":"","sources":["../../src/zero/mutators.ts"],"names":[],"mappings":"AAQA,KAAK,OAAO,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAmHjC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6fnB,CAAA"}
@@ -6,7 +6,7 @@ import { schema } from '../zero/schema';
6
6
  const zql = createBuilder(schema);
7
7
  const defineMutator = defineMutatorWithType();
8
8
  const buildLabelIdList = (x) => (x.length === 0 ? '' : ` ${[...new Set(x)].join(' ')} `);
9
- const setSystemLabel = async (tx, builder, threadId, targetSpecialUse, labelUnreadCounts) => {
9
+ const setSystemLabel = async (tx, builder, threadId, targetSpecialUse) => {
10
10
  const thread = await tx.run(builder.thread.where('id', threadId).one());
11
11
  if (thread) {
12
12
  const [targetLabel, messages] = await Promise.all([
@@ -33,19 +33,11 @@ const setSystemLabel = async (tx, builder, threadId, targetSpecialUse, labelUnre
33
33
  ...[...labelIdsToRemove].map(labelId => tx.mutate.threadByLabel.delete({ labelId, threadId })),
34
34
  ]);
35
35
  if (thread.seen === false && labelIdsToRemove.size > 0) {
36
- if (labelUnreadCounts) {
37
- await Promise.all([...labelIdsToRemove].map(labelId => tx.mutate.accountLabel.update({
38
- id: labelId,
39
- unreadCount: labelUnreadCounts[labelId] ?? 0,
40
- })));
41
- }
42
- else {
43
- const labelsToUpdate = await tx.run(builder.accountLabel.where('id', 'IN', [...labelIdsToRemove]));
44
- await Promise.all(labelsToUpdate.map(label => tx.mutate.accountLabel.update({
45
- id: label.id,
46
- unreadCount: Math.max(0, (label.unreadCount ?? 0) - 1),
47
- })));
48
- }
36
+ const labelsToUpdate = await tx.run(builder.accountLabel.where('id', 'IN', [...labelIdsToRemove]));
37
+ await Promise.all(labelsToUpdate.map(label => tx.mutate.accountLabel.update({
38
+ id: label.id,
39
+ unreadCount: Math.max(0, (label.unreadCount ?? 0) - 1),
40
+ })));
49
41
  }
50
42
  if (!hasTarget) {
51
43
  const baseTimestamp = Date.now();
@@ -68,9 +60,7 @@ const setSystemLabel = async (tx, builder, threadId, targetSpecialUse, labelUnre
68
60
  ? [
69
61
  tx.mutate.accountLabel.update({
70
62
  id: targetLabel.id,
71
- unreadCount: labelUnreadCounts
72
- ? (labelUnreadCounts[targetLabel.id] ?? 0)
73
- : (targetLabel.unreadCount ?? 0) + 1,
63
+ unreadCount: (targetLabel.unreadCount ?? 0) + 1,
74
64
  }),
75
65
  ]
76
66
  : []),
@@ -339,9 +329,7 @@ export const mutators = defineMutators({
339
329
  ? [
340
330
  tx.mutate.accountLabel.update({
341
331
  id: label.id,
342
- unreadCount: args.labelUnreadCounts
343
- ? (args.labelUnreadCounts[label.id] ?? 0)
344
- : (label.unreadCount ?? 0) + 1,
332
+ unreadCount: (label.unreadCount ?? 0) + 1,
345
333
  }),
346
334
  ]
347
335
  : []),
@@ -379,19 +367,11 @@ export const mutators = defineMutators({
379
367
  if (thread.seen === false) {
380
368
  const labelIds = threadsUtils.parseLabelIdList(thread.labelIdList);
381
369
  if (labelIds.length > 0) {
382
- if (args.labelUnreadCounts) {
383
- await Promise.all(labelIds.map(labelId => tx.mutate.accountLabel.update({
384
- id: labelId,
385
- unreadCount: args.labelUnreadCounts?.[labelId] ?? 0,
386
- })));
387
- }
388
- else {
389
- const labels = await tx.run(zql.accountLabel.where('id', 'IN', labelIds));
390
- await Promise.all(labels.map(x => tx.mutate.accountLabel.update({
391
- id: x.id,
392
- unreadCount: Math.max(0, (x.unreadCount ?? 0) - 1),
393
- })));
394
- }
370
+ const labels = await tx.run(zql.accountLabel.where('id', 'IN', labelIds));
371
+ await Promise.all(labels.map(x => tx.mutate.accountLabel.update({
372
+ id: x.id,
373
+ unreadCount: Math.max(0, (x.unreadCount ?? 0) - 1),
374
+ })));
395
375
  }
396
376
  }
397
377
  await tx.mutate.thread.delete({
@@ -428,9 +408,7 @@ export const mutators = defineMutators({
428
408
  ? [
429
409
  tx.mutate.accountLabel.update({
430
410
  id: label.id,
431
- unreadCount: args.labelUnreadCounts
432
- ? (args.labelUnreadCounts[label.id] ?? 0)
433
- : Math.max(0, (label.unreadCount ?? 0) - 1),
411
+ unreadCount: Math.max(0, (label.unreadCount ?? 0) - 1),
434
412
  }),
435
413
  ]
436
414
  : []),
@@ -448,7 +426,7 @@ export const mutators = defineMutators({
448
426
  setArchive: defineMutator(mutatorSchemas.thread.setArchive, async ({ tx, args }) => {
449
427
  for (const [, { threadIds }] of Object.entries(args.accounts)) {
450
428
  for (const threadId of threadIds) {
451
- await setSystemLabel(tx, zql, threadId, 'ARCHIVE', args.labelUnreadCounts);
429
+ await setSystemLabel(tx, zql, threadId, 'ARCHIVE');
452
430
  }
453
431
  }
454
432
  }),
@@ -463,46 +441,30 @@ export const mutators = defineMutators({
463
441
  setInbox: defineMutator(mutatorSchemas.thread.setInbox, async ({ tx, args }) => {
464
442
  for (const [, { threadIds }] of Object.entries(args.accounts)) {
465
443
  for (const threadId of threadIds) {
466
- await setSystemLabel(tx, zql, threadId, 'INBOX', args.labelUnreadCounts);
444
+ await setSystemLabel(tx, zql, threadId, 'INBOX');
467
445
  }
468
446
  }
469
447
  }),
470
448
  setSeen: defineMutator(mutatorSchemas.thread.setSeen, async ({ tx, args }) => {
471
449
  const allThreadIds = Object.values(args.accounts).flatMap(x => x.threadIds);
472
450
  const threads = await tx.run(zql.thread.where('id', 'IN', allThreadIds));
473
- const affectedLabelIds = new Set();
451
+ const labelCounts = new Map();
474
452
  for (const thread of threads) {
475
453
  if (thread.seen !== args.seen) {
476
454
  for (const labelId of threadsUtils.parseLabelIdList(thread.labelIdList)) {
477
- affectedLabelIds.add(labelId);
455
+ labelCounts.set(labelId, (labelCounts.get(labelId) ?? 0) + 1);
478
456
  }
479
457
  }
480
458
  }
481
- if (affectedLabelIds.size > 0) {
482
- if (args.labelUnreadCounts) {
483
- await Promise.all([...affectedLabelIds].map(labelId => tx.mutate.accountLabel.update({
484
- id: labelId,
485
- unreadCount: args.labelUnreadCounts?.[labelId] ?? 0,
486
- })));
487
- }
488
- else {
489
- const labelCounts = new Map();
490
- for (const thread of threads) {
491
- if (thread.seen !== args.seen) {
492
- for (const labelId of threadsUtils.parseLabelIdList(thread.labelIdList)) {
493
- labelCounts.set(labelId, (labelCounts.get(labelId) ?? 0) + 1);
494
- }
495
- }
496
- }
497
- const labels = await tx.run(zql.accountLabel.where('id', 'IN', [...labelCounts.keys()]));
498
- const delta = args.seen ? -1 : 1;
499
- await Promise.all(labels
500
- .filter(x => labelCounts.has(x.id))
501
- .map(x => tx.mutate.accountLabel.update({
502
- id: x.id,
503
- unreadCount: Math.max(0, (x.unreadCount ?? 0) + delta * (labelCounts.get(x.id) ?? 0)),
504
- })));
505
- }
459
+ if (labelCounts.size > 0) {
460
+ const labels = await tx.run(zql.accountLabel.where('id', 'IN', [...labelCounts.keys()]));
461
+ const delta = args.seen ? -1 : 1;
462
+ await Promise.all(labels
463
+ .filter(x => labelCounts.has(x.id))
464
+ .map(x => tx.mutate.accountLabel.update({
465
+ id: x.id,
466
+ unreadCount: Math.max(0, (x.unreadCount ?? 0) + delta * (labelCounts.get(x.id) ?? 0)),
467
+ })));
506
468
  }
507
469
  await Promise.all(allThreadIds.map(threadId => tx.mutate.thread.update({
508
470
  id: threadId,
@@ -512,14 +474,14 @@ export const mutators = defineMutators({
512
474
  setSpam: defineMutator(mutatorSchemas.thread.setSpam, async ({ tx, args }) => {
513
475
  for (const [, { threadIds }] of Object.entries(args.accounts)) {
514
476
  for (const threadId of threadIds) {
515
- await setSystemLabel(tx, zql, threadId, 'SPAM', args.labelUnreadCounts);
477
+ await setSystemLabel(tx, zql, threadId, 'SPAM');
516
478
  }
517
479
  }
518
480
  }),
519
481
  setTrash: defineMutator(mutatorSchemas.thread.setTrash, async ({ tx, args }) => {
520
482
  for (const [, { threadIds }] of Object.entries(args.accounts)) {
521
483
  for (const threadId of threadIds) {
522
- await setSystemLabel(tx, zql, threadId, 'TRASH', args.labelUnreadCounts);
484
+ await setSystemLabel(tx, zql, threadId, 'TRASH');
523
485
  }
524
486
  }
525
487
  }),
@@ -440,25 +440,6 @@ describe('mutators', () => {
440
440
  expect(tx.mutate.thread.update).not.toHaveBeenCalled();
441
441
  expect(tx.mutate.threadByLabel.insert).not.toHaveBeenCalled();
442
442
  });
443
- it('uses pre-computed labelUnreadCounts when provided', async () => {
444
- tx.run = mock()
445
- .mockResolvedValueOnce({ id: 'label-1', uidValidity: 1, unreadCount: 0 })
446
- .mockResolvedValueOnce({
447
- id: 'thread-1',
448
- labelIdList: ' label-2 ',
449
- latestMessageDate: 1234567890,
450
- seen: false,
451
- })
452
- .mockResolvedValueOnce([{ id: 'message-1' }])
453
- .mockResolvedValueOnce(null);
454
- const args = {
455
- accounts: { 'account-1': { threadIds: ['thread-1'] } },
456
- labelPath: 'INBOX',
457
- labelUnreadCounts: { 'label-1': 42 },
458
- };
459
- await mutators.thread.addLabel.fn({ args, ctx, tx: tx });
460
- expect(tx.mutate.accountLabel.update).toHaveBeenCalledWith({ id: 'label-1', unreadCount: 42 });
461
- });
462
443
  });
463
444
  describe('delete', () => {
464
445
  it('deletes threads and updates unread counts', async () => {
@@ -477,16 +458,6 @@ describe('mutators', () => {
477
458
  expect(tx.mutate.accountLabel.update).not.toHaveBeenCalled();
478
459
  expect(tx.mutate.thread.delete).toHaveBeenCalledWith({ id: 'thread-1' });
479
460
  });
480
- it('uses pre-computed labelUnreadCounts when provided', async () => {
481
- tx.run = mock().mockResolvedValueOnce({ id: 'thread-1', labelIdList: ' label-1 ', seen: false });
482
- const args = {
483
- accounts: { 'account-1': { threadIds: ['thread-1'] } },
484
- labelUnreadCounts: { 'label-1': 42 },
485
- };
486
- await mutators.thread.delete.fn({ args, ctx, tx: tx });
487
- expect(tx.mutate.accountLabel.update).toHaveBeenCalledWith({ id: 'label-1', unreadCount: 42 });
488
- expect(tx.run).toHaveBeenCalledTimes(1);
489
- });
490
461
  });
491
462
  describe('removeLabel', () => {
492
463
  it('removes a label from threads', async () => {
@@ -523,19 +494,6 @@ describe('mutators', () => {
523
494
  expect(tx.mutate.threadLabel.delete).not.toHaveBeenCalled();
524
495
  expect(tx.mutate.threadByLabel.delete).not.toHaveBeenCalled();
525
496
  });
526
- it('uses pre-computed labelUnreadCounts when provided', async () => {
527
- tx.run = mock()
528
- .mockResolvedValueOnce({ id: 'label-1', unreadCount: 5 })
529
- .mockResolvedValueOnce({ id: 'thread-1', labelIdList: ' label-1 label-2 ', seen: false })
530
- .mockResolvedValueOnce([{ id: 'message-1' }]);
531
- const args = {
532
- accounts: { 'account-1': { threadIds: ['thread-1'] } },
533
- labelPath: 'INBOX',
534
- labelUnreadCounts: { 'label-1': 42 },
535
- };
536
- await mutators.thread.removeLabel.fn({ args, ctx, tx: tx });
537
- expect(tx.mutate.accountLabel.update).toHaveBeenCalledWith({ id: 'label-1', unreadCount: 42 });
538
- });
539
497
  });
540
498
  describe('setFlagged', () => {
541
499
  it('sets flagged status', async () => {
@@ -570,17 +528,6 @@ describe('mutators', () => {
570
528
  await mutators.thread.setSeen.fn({ args, ctx, tx: tx });
571
529
  expect(tx.mutate.accountLabel.update).not.toHaveBeenCalled();
572
530
  });
573
- it('uses pre-computed labelUnreadCounts when provided', async () => {
574
- tx.run = mock().mockResolvedValueOnce([{ id: 'thread-1', labelIdList: ' label-1 ', seen: false }]);
575
- const args = {
576
- accounts: { 'account-1': { threadIds: ['thread-1'] } },
577
- labelUnreadCounts: { 'label-1': 42 },
578
- seen: true,
579
- };
580
- await mutators.thread.setSeen.fn({ args, ctx, tx: tx });
581
- expect(tx.mutate.accountLabel.update).toHaveBeenCalledWith({ id: 'label-1', unreadCount: 42 });
582
- expect(tx.run).toHaveBeenCalledTimes(1);
583
- });
584
531
  });
585
532
  const systemLabelTestCases = [
586
533
  { mutatorName: 'setArchive', specialUse: 'ARCHIVE' },
@@ -615,25 +562,6 @@ describe('mutators', () => {
615
562
  labelIdList: expect.stringContaining('new-label'),
616
563
  });
617
564
  });
618
- it(`uses pre-computed labelUnreadCounts when moving unread thread to ${specialUse}`, async () => {
619
- tx.run = mock()
620
- .mockResolvedValueOnce({
621
- accountId: 'account-1',
622
- id: 'thread-1',
623
- labelIdList: ' old-label ',
624
- latestMessageDate: 1234567890,
625
- seen: false,
626
- })
627
- .mockResolvedValueOnce({ id: 'new-label', uidValidity: 1, unreadCount: 0 })
628
- .mockResolvedValueOnce([{ id: 'message-1' }]);
629
- const args = {
630
- accounts: { 'account-1': { threadIds: ['thread-1'] } },
631
- labelUnreadCounts: { 'new-label': 10, 'old-label': 5 },
632
- };
633
- await mutators.thread[mutatorName].fn({ args, ctx, tx: tx });
634
- expect(tx.mutate.accountLabel.update).toHaveBeenCalledWith({ id: 'old-label', unreadCount: 5 });
635
- expect(tx.mutate.accountLabel.update).toHaveBeenCalledWith({ id: 'new-label', unreadCount: 10 });
636
- });
637
565
  });
638
566
  }
639
567
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.526",
3
+ "version": "2.0.527",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",