@marcoappio/marco-config 2.0.419 → 2.0.420

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.
@@ -1,5 +1,4591 @@
1
1
  export declare const marcoZero: {
2
2
  readonly createMutators: (handlers: import("./mutators").MarcoZeroMutatorHandlers) => import("./mutators").MarcoZeroMutators;
3
+ readonly queries: {
4
+ readonly getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccounts", import("..").MarcoSyncedQueryContext, true, [], import("@rocicorp/zero").Query<{
5
+ tables: {
6
+ readonly user: {
7
+ name: "user";
8
+ columns: {
9
+ readonly id: {
10
+ type: "string";
11
+ optional: false;
12
+ customType: string;
13
+ };
14
+ readonly name: Omit<{
15
+ type: "string";
16
+ optional: false;
17
+ customType: string;
18
+ }, "optional"> & {
19
+ optional: true;
20
+ };
21
+ readonly profilePicture: Omit<{
22
+ type: "string";
23
+ optional: false;
24
+ customType: string;
25
+ }, "optional"> & {
26
+ optional: true;
27
+ };
28
+ readonly undoSendEnabled: {
29
+ type: "boolean";
30
+ optional: false;
31
+ customType: boolean;
32
+ };
33
+ };
34
+ primaryKey: readonly [string, ...string[]];
35
+ } & {
36
+ primaryKey: ["id"];
37
+ };
38
+ readonly userPushNotificationToken: {
39
+ name: "userPushNotificationToken";
40
+ columns: {
41
+ readonly createdAt: {
42
+ type: "number";
43
+ optional: false;
44
+ customType: number;
45
+ };
46
+ readonly id: {
47
+ type: "string";
48
+ optional: false;
49
+ customType: string;
50
+ };
51
+ readonly token: {
52
+ type: "string";
53
+ optional: false;
54
+ customType: string;
55
+ };
56
+ readonly userId: {
57
+ type: "string";
58
+ optional: false;
59
+ customType: string;
60
+ };
61
+ };
62
+ primaryKey: readonly [string, ...string[]];
63
+ } & {
64
+ primaryKey: ["id"];
65
+ };
66
+ readonly contact: {
67
+ name: "contact";
68
+ columns: {
69
+ readonly emailAddress: {
70
+ type: "string";
71
+ optional: false;
72
+ customType: string;
73
+ };
74
+ readonly id: {
75
+ type: "string";
76
+ optional: false;
77
+ customType: string;
78
+ };
79
+ readonly name: Omit<{
80
+ type: "string";
81
+ optional: false;
82
+ customType: string;
83
+ }, "optional"> & {
84
+ optional: true;
85
+ };
86
+ readonly userId: {
87
+ type: "string";
88
+ optional: false;
89
+ customType: string;
90
+ };
91
+ };
92
+ primaryKey: readonly [string, ...string[]];
93
+ } & {
94
+ primaryKey: ["id"];
95
+ };
96
+ readonly account: {
97
+ name: "account";
98
+ columns: {
99
+ readonly color: {
100
+ type: "string";
101
+ optional: false;
102
+ customType: string;
103
+ };
104
+ readonly displayName: Omit<{
105
+ type: "string";
106
+ optional: false;
107
+ customType: string;
108
+ }, "optional"> & {
109
+ optional: true;
110
+ };
111
+ readonly id: {
112
+ type: "string";
113
+ optional: false;
114
+ customType: string;
115
+ };
116
+ readonly imapConnectionStatus: {
117
+ type: "string";
118
+ optional: false;
119
+ customType: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
120
+ };
121
+ readonly mailProcessedCount: {
122
+ type: "number";
123
+ optional: false;
124
+ customType: number;
125
+ };
126
+ readonly mailTotalCount: {
127
+ type: "number";
128
+ optional: false;
129
+ customType: number;
130
+ };
131
+ readonly primaryAliasId: Omit<{
132
+ type: "string";
133
+ optional: false;
134
+ customType: string;
135
+ }, "optional"> & {
136
+ optional: true;
137
+ };
138
+ readonly userId: {
139
+ type: "string";
140
+ optional: false;
141
+ customType: string;
142
+ };
143
+ };
144
+ primaryKey: readonly [string, ...string[]];
145
+ } & {
146
+ primaryKey: ["id"];
147
+ };
148
+ readonly accountAlias: {
149
+ name: "accountAlias";
150
+ columns: {
151
+ readonly accountId: {
152
+ type: "string";
153
+ optional: false;
154
+ customType: string;
155
+ };
156
+ readonly emailAddress: {
157
+ type: "string";
158
+ optional: false;
159
+ customType: string;
160
+ };
161
+ readonly id: {
162
+ type: "string";
163
+ optional: false;
164
+ customType: string;
165
+ };
166
+ readonly isPrimary: {
167
+ type: "boolean";
168
+ optional: false;
169
+ customType: boolean;
170
+ };
171
+ readonly name: Omit<{
172
+ type: "string";
173
+ optional: false;
174
+ customType: string;
175
+ }, "optional"> & {
176
+ optional: true;
177
+ };
178
+ };
179
+ primaryKey: readonly [string, ...string[]];
180
+ } & {
181
+ primaryKey: ["id"];
182
+ };
183
+ readonly accountLabel: {
184
+ name: "accountLabel";
185
+ columns: {
186
+ readonly accountId: {
187
+ type: "string";
188
+ optional: false;
189
+ customType: string;
190
+ };
191
+ readonly id: {
192
+ type: "string";
193
+ optional: false;
194
+ customType: string;
195
+ };
196
+ readonly path: {
197
+ type: "string";
198
+ optional: false;
199
+ customType: string;
200
+ };
201
+ readonly specialUse: Omit<{
202
+ type: "string";
203
+ optional: false;
204
+ customType: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH";
205
+ }, "optional"> & {
206
+ optional: true;
207
+ };
208
+ };
209
+ primaryKey: readonly [string, ...string[]];
210
+ } & {
211
+ primaryKey: ["id"];
212
+ };
213
+ readonly draft: {
214
+ name: "draft";
215
+ columns: {
216
+ readonly accountId: {
217
+ type: "string";
218
+ optional: false;
219
+ customType: string;
220
+ };
221
+ readonly body: {
222
+ type: "json";
223
+ optional: false;
224
+ customType: {
225
+ content: string;
226
+ to: string[];
227
+ cc: string[];
228
+ bcc: string[];
229
+ };
230
+ };
231
+ readonly error: Omit<{
232
+ type: "string";
233
+ optional: false;
234
+ customType: string;
235
+ }, "optional"> & {
236
+ optional: true;
237
+ };
238
+ readonly fromAliasId: Omit<{
239
+ type: "string";
240
+ optional: false;
241
+ customType: string;
242
+ }, "optional"> & {
243
+ optional: true;
244
+ };
245
+ readonly fromEmail: {
246
+ type: "string";
247
+ optional: false;
248
+ customType: string;
249
+ };
250
+ readonly fromName: Omit<{
251
+ type: "string";
252
+ optional: false;
253
+ customType: string;
254
+ }, "optional"> & {
255
+ optional: true;
256
+ };
257
+ readonly id: {
258
+ type: "string";
259
+ optional: false;
260
+ customType: string;
261
+ };
262
+ readonly referencedMessageId: Omit<{
263
+ type: "string";
264
+ optional: false;
265
+ customType: string;
266
+ }, "optional"> & {
267
+ optional: true;
268
+ };
269
+ readonly scheduledFor: Omit<{
270
+ type: "number";
271
+ optional: false;
272
+ customType: number;
273
+ }, "optional"> & {
274
+ optional: true;
275
+ };
276
+ readonly status: {
277
+ type: "string";
278
+ optional: false;
279
+ customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
280
+ };
281
+ readonly subject: Omit<{
282
+ type: "string";
283
+ optional: false;
284
+ customType: string;
285
+ }, "optional"> & {
286
+ optional: true;
287
+ };
288
+ readonly type: {
289
+ type: "string";
290
+ optional: false;
291
+ customType: "NEW" | "REPLY" | "FORWARD";
292
+ };
293
+ readonly updatedAt: {
294
+ type: "number";
295
+ optional: false;
296
+ customType: number;
297
+ };
298
+ readonly userId: {
299
+ type: "string";
300
+ optional: false;
301
+ customType: string;
302
+ };
303
+ };
304
+ primaryKey: readonly [string, ...string[]];
305
+ } & {
306
+ primaryKey: ["id"];
307
+ };
308
+ readonly draftRecipient: {
309
+ name: "draftRecipient";
310
+ columns: {
311
+ readonly draftId: {
312
+ type: "string";
313
+ optional: false;
314
+ customType: string;
315
+ };
316
+ readonly emailAddress: {
317
+ type: "string";
318
+ optional: false;
319
+ customType: string;
320
+ };
321
+ readonly id: {
322
+ type: "string";
323
+ optional: false;
324
+ customType: string;
325
+ };
326
+ readonly type: {
327
+ type: "string";
328
+ optional: false;
329
+ customType: "bcc" | "cc" | "to";
330
+ };
331
+ };
332
+ primaryKey: readonly [string, ...string[]];
333
+ } & {
334
+ primaryKey: ["id"];
335
+ };
336
+ readonly draftAttachment: {
337
+ name: "draftAttachment";
338
+ columns: {
339
+ readonly draftId: {
340
+ type: "string";
341
+ optional: false;
342
+ customType: string;
343
+ };
344
+ readonly failed: {
345
+ type: "boolean";
346
+ optional: false;
347
+ customType: boolean;
348
+ };
349
+ readonly fileName: {
350
+ type: "string";
351
+ optional: false;
352
+ customType: string;
353
+ };
354
+ readonly id: {
355
+ type: "string";
356
+ optional: false;
357
+ customType: string;
358
+ };
359
+ readonly mimeType: {
360
+ type: "string";
361
+ optional: false;
362
+ customType: string;
363
+ };
364
+ readonly totalChunks: {
365
+ type: "number";
366
+ optional: false;
367
+ customType: number;
368
+ };
369
+ readonly totalSize: {
370
+ type: "number";
371
+ optional: false;
372
+ customType: number;
373
+ };
374
+ readonly uploadedChunks: {
375
+ type: "number";
376
+ optional: false;
377
+ customType: number;
378
+ };
379
+ };
380
+ primaryKey: readonly [string, ...string[]];
381
+ } & {
382
+ primaryKey: ["id"];
383
+ };
384
+ readonly thread: {
385
+ name: "thread";
386
+ columns: {
387
+ readonly accountId: {
388
+ type: "string";
389
+ optional: false;
390
+ customType: string;
391
+ };
392
+ readonly flagged: {
393
+ type: "boolean";
394
+ optional: false;
395
+ customType: boolean;
396
+ };
397
+ readonly id: {
398
+ type: "string";
399
+ optional: false;
400
+ customType: string;
401
+ };
402
+ readonly latestMessageDate: {
403
+ type: "number";
404
+ optional: false;
405
+ customType: number;
406
+ };
407
+ readonly seen: {
408
+ type: "boolean";
409
+ optional: false;
410
+ customType: boolean;
411
+ };
412
+ readonly userId: {
413
+ type: "string";
414
+ optional: false;
415
+ customType: string;
416
+ };
417
+ readonly words: {
418
+ type: "string";
419
+ optional: false;
420
+ customType: string;
421
+ };
422
+ };
423
+ primaryKey: readonly [string, ...string[]];
424
+ } & {
425
+ primaryKey: ["id"];
426
+ };
427
+ readonly threadLabel: {
428
+ name: "threadLabel";
429
+ columns: {
430
+ readonly labelId: {
431
+ type: "string";
432
+ optional: false;
433
+ customType: string;
434
+ };
435
+ readonly threadId: {
436
+ type: "string";
437
+ optional: false;
438
+ customType: string;
439
+ };
440
+ };
441
+ primaryKey: readonly [string, ...string[]];
442
+ } & {
443
+ primaryKey: ["threadId", "labelId"];
444
+ };
445
+ readonly threadMessage: {
446
+ name: "threadMessage";
447
+ columns: {
448
+ readonly envelopeDate: {
449
+ type: "number";
450
+ optional: false;
451
+ customType: number;
452
+ };
453
+ readonly envelopeSubject: Omit<{
454
+ type: "string";
455
+ optional: false;
456
+ customType: string;
457
+ }, "optional"> & {
458
+ optional: true;
459
+ };
460
+ readonly id: {
461
+ type: "string";
462
+ optional: false;
463
+ customType: string;
464
+ };
465
+ readonly previewText: {
466
+ type: "string";
467
+ optional: false;
468
+ customType: string;
469
+ };
470
+ readonly senderEmail: {
471
+ type: "string";
472
+ optional: false;
473
+ customType: string;
474
+ };
475
+ readonly senderName: Omit<{
476
+ type: "string";
477
+ optional: false;
478
+ customType: string;
479
+ }, "optional"> & {
480
+ optional: true;
481
+ };
482
+ readonly threadId: {
483
+ type: "string";
484
+ optional: false;
485
+ customType: string;
486
+ };
487
+ };
488
+ primaryKey: readonly [string, ...string[]];
489
+ } & {
490
+ primaryKey: ["id"];
491
+ };
492
+ readonly threadMessageRecipient: {
493
+ name: "threadMessageRecipient";
494
+ columns: {
495
+ readonly emailAddress: {
496
+ type: "string";
497
+ optional: false;
498
+ customType: string;
499
+ };
500
+ readonly id: {
501
+ type: "string";
502
+ optional: false;
503
+ customType: string;
504
+ };
505
+ readonly name: Omit<{
506
+ type: "string";
507
+ optional: false;
508
+ customType: string;
509
+ }, "optional"> & {
510
+ optional: true;
511
+ };
512
+ readonly threadMessageId: {
513
+ type: "string";
514
+ optional: false;
515
+ customType: string;
516
+ };
517
+ readonly type: {
518
+ type: "string";
519
+ optional: false;
520
+ customType: "bcc" | "cc" | "to" | "replyTo";
521
+ };
522
+ };
523
+ primaryKey: readonly [string, ...string[]];
524
+ } & {
525
+ primaryKey: ["id"];
526
+ };
527
+ readonly threadMessageAttachment: {
528
+ name: "threadMessageAttachment";
529
+ columns: {
530
+ readonly fileName: {
531
+ type: "string";
532
+ optional: false;
533
+ customType: string;
534
+ };
535
+ readonly id: {
536
+ type: "string";
537
+ optional: false;
538
+ customType: string;
539
+ };
540
+ readonly mimeType: {
541
+ type: "string";
542
+ optional: false;
543
+ customType: string;
544
+ };
545
+ readonly size: {
546
+ type: "number";
547
+ optional: false;
548
+ customType: number;
549
+ };
550
+ readonly status: {
551
+ type: "string";
552
+ optional: false;
553
+ customType: "NOT_DOWNLOADED" | "DOWNLOAD_REQUESTED" | "DOWNLOADED" | "DOWNLOAD_FAILED";
554
+ };
555
+ readonly threadMessageId: {
556
+ type: "string";
557
+ optional: false;
558
+ customType: string;
559
+ };
560
+ };
561
+ primaryKey: readonly [string, ...string[]];
562
+ } & {
563
+ primaryKey: ["id"];
564
+ };
565
+ readonly threadMessageLabel: {
566
+ name: "threadMessageLabel";
567
+ columns: {
568
+ readonly labelId: {
569
+ type: "string";
570
+ optional: false;
571
+ customType: string;
572
+ };
573
+ readonly threadMessageId: {
574
+ type: "string";
575
+ optional: false;
576
+ customType: string;
577
+ };
578
+ };
579
+ primaryKey: readonly [string, ...string[]];
580
+ } & {
581
+ primaryKey: ["threadMessageId", "labelId"];
582
+ };
583
+ };
584
+ relationships: {
585
+ readonly user: {
586
+ accounts: [{
587
+ readonly sourceField: string[];
588
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
589
+ readonly destSchema: "account";
590
+ readonly cardinality: "many";
591
+ }];
592
+ contacts: [{
593
+ readonly sourceField: string[];
594
+ readonly destField: ("id" | "name" | "emailAddress" | "userId")[];
595
+ readonly destSchema: "contact";
596
+ readonly cardinality: "many";
597
+ }];
598
+ drafts: [{
599
+ readonly sourceField: string[];
600
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
601
+ readonly destSchema: "draft";
602
+ readonly cardinality: "many";
603
+ }];
604
+ pushNotificationTokens: [{
605
+ readonly sourceField: string[];
606
+ readonly destField: ("createdAt" | "id" | "token" | "userId")[];
607
+ readonly destSchema: "userPushNotificationToken";
608
+ readonly cardinality: "many";
609
+ }];
610
+ threads: [{
611
+ readonly sourceField: string[];
612
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
613
+ readonly destSchema: "thread";
614
+ readonly cardinality: "many";
615
+ }];
616
+ };
617
+ readonly userPushNotificationToken: {
618
+ user: [{
619
+ readonly sourceField: string[];
620
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
621
+ readonly destSchema: "user";
622
+ readonly cardinality: "one";
623
+ }];
624
+ };
625
+ readonly contact: {
626
+ user: [{
627
+ readonly sourceField: string[];
628
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
629
+ readonly destSchema: "user";
630
+ readonly cardinality: "one";
631
+ }];
632
+ };
633
+ readonly account: {
634
+ aliases: [{
635
+ readonly sourceField: string[];
636
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
637
+ readonly destSchema: "accountAlias";
638
+ readonly cardinality: "many";
639
+ }];
640
+ drafts: [{
641
+ readonly sourceField: string[];
642
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
643
+ readonly destSchema: "draft";
644
+ readonly cardinality: "many";
645
+ }];
646
+ labels: [{
647
+ readonly sourceField: string[];
648
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
649
+ readonly destSchema: "accountLabel";
650
+ readonly cardinality: "many";
651
+ }];
652
+ primaryAlias: [{
653
+ readonly sourceField: string[];
654
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
655
+ readonly destSchema: "accountAlias";
656
+ readonly cardinality: "one";
657
+ }];
658
+ threads: [{
659
+ readonly sourceField: string[];
660
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
661
+ readonly destSchema: "thread";
662
+ readonly cardinality: "many";
663
+ }];
664
+ user: [{
665
+ readonly sourceField: string[];
666
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
667
+ readonly destSchema: "user";
668
+ readonly cardinality: "one";
669
+ }];
670
+ };
671
+ readonly accountAlias: {
672
+ account: [{
673
+ readonly sourceField: string[];
674
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
675
+ readonly destSchema: "account";
676
+ readonly cardinality: "one";
677
+ }];
678
+ };
679
+ readonly accountLabel: {
680
+ account: [{
681
+ readonly sourceField: string[];
682
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
683
+ readonly destSchema: "account";
684
+ readonly cardinality: "one";
685
+ }];
686
+ threadMessages: [{
687
+ readonly sourceField: string[];
688
+ readonly destField: ("labelId" | "threadMessageId")[];
689
+ readonly destSchema: "threadMessageLabel";
690
+ readonly cardinality: "many";
691
+ }, {
692
+ readonly sourceField: string[];
693
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
694
+ readonly destSchema: "threadMessage";
695
+ readonly cardinality: "many";
696
+ }];
697
+ threads: [{
698
+ readonly sourceField: string[];
699
+ readonly destField: ("threadId" | "labelId")[];
700
+ readonly destSchema: "threadLabel";
701
+ readonly cardinality: "many";
702
+ }, {
703
+ readonly sourceField: string[];
704
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
705
+ readonly destSchema: "thread";
706
+ readonly cardinality: "many";
707
+ }];
708
+ };
709
+ readonly draft: {
710
+ account: [{
711
+ readonly sourceField: string[];
712
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
713
+ readonly destSchema: "account";
714
+ readonly cardinality: "one";
715
+ }];
716
+ attachments: [{
717
+ readonly sourceField: string[];
718
+ readonly destField: ("id" | "failed" | "fileName" | "mimeType" | "totalChunks" | "totalSize" | "uploadedChunks" | "draftId")[];
719
+ readonly destSchema: "draftAttachment";
720
+ readonly cardinality: "many";
721
+ }];
722
+ recipients: [{
723
+ readonly sourceField: string[];
724
+ readonly destField: ("type" | "id" | "emailAddress" | "draftId")[];
725
+ readonly destSchema: "draftRecipient";
726
+ readonly cardinality: "many";
727
+ }];
728
+ user: [{
729
+ readonly sourceField: string[];
730
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
731
+ readonly destSchema: "user";
732
+ readonly cardinality: "one";
733
+ }];
734
+ };
735
+ readonly draftRecipient: {
736
+ draft: [{
737
+ readonly sourceField: string[];
738
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
739
+ readonly destSchema: "draft";
740
+ readonly cardinality: "one";
741
+ }];
742
+ };
743
+ readonly draftAttachment: {
744
+ draft: [{
745
+ readonly sourceField: string[];
746
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
747
+ readonly destSchema: "draft";
748
+ readonly cardinality: "one";
749
+ }];
750
+ };
751
+ readonly thread: {
752
+ account: [{
753
+ readonly sourceField: string[];
754
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
755
+ readonly destSchema: "account";
756
+ readonly cardinality: "one";
757
+ }];
758
+ labels: [{
759
+ readonly sourceField: string[];
760
+ readonly destField: ("threadId" | "labelId")[];
761
+ readonly destSchema: "threadLabel";
762
+ readonly cardinality: "many";
763
+ }, {
764
+ readonly sourceField: string[];
765
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
766
+ readonly destSchema: "accountLabel";
767
+ readonly cardinality: "many";
768
+ }];
769
+ messages: [{
770
+ readonly sourceField: string[];
771
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
772
+ readonly destSchema: "threadMessage";
773
+ readonly cardinality: "many";
774
+ }];
775
+ user: [{
776
+ readonly sourceField: string[];
777
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
778
+ readonly destSchema: "user";
779
+ readonly cardinality: "one";
780
+ }];
781
+ };
782
+ readonly threadLabel: {
783
+ label: [{
784
+ readonly sourceField: string[];
785
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
786
+ readonly destSchema: "accountLabel";
787
+ readonly cardinality: "one";
788
+ }];
789
+ thread: [{
790
+ readonly sourceField: string[];
791
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
792
+ readonly destSchema: "thread";
793
+ readonly cardinality: "one";
794
+ }];
795
+ };
796
+ readonly threadMessage: {
797
+ attachments: [{
798
+ readonly sourceField: string[];
799
+ readonly destField: ("status" | "id" | "fileName" | "mimeType" | "threadMessageId" | "size")[];
800
+ readonly destSchema: "threadMessageAttachment";
801
+ readonly cardinality: "many";
802
+ }];
803
+ labels: [{
804
+ readonly sourceField: string[];
805
+ readonly destField: ("labelId" | "threadMessageId")[];
806
+ readonly destSchema: "threadMessageLabel";
807
+ readonly cardinality: "many";
808
+ }, {
809
+ readonly sourceField: string[];
810
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
811
+ readonly destSchema: "accountLabel";
812
+ readonly cardinality: "many";
813
+ }];
814
+ recipients: [{
815
+ readonly sourceField: string[];
816
+ readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
817
+ readonly destSchema: "threadMessageRecipient";
818
+ readonly cardinality: "many";
819
+ }];
820
+ thread: [{
821
+ readonly sourceField: string[];
822
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
823
+ readonly destSchema: "thread";
824
+ readonly cardinality: "one";
825
+ }];
826
+ };
827
+ readonly threadMessageRecipient: {
828
+ message: [{
829
+ readonly sourceField: string[];
830
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
831
+ readonly destSchema: "threadMessage";
832
+ readonly cardinality: "one";
833
+ }];
834
+ };
835
+ readonly threadMessageAttachment: {
836
+ message: [{
837
+ readonly sourceField: string[];
838
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
839
+ readonly destSchema: "threadMessage";
840
+ readonly cardinality: "one";
841
+ }];
842
+ };
843
+ readonly threadMessageLabel: {
844
+ label: [{
845
+ readonly sourceField: string[];
846
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
847
+ readonly destSchema: "accountLabel";
848
+ readonly cardinality: "one";
849
+ }];
850
+ message: [{
851
+ readonly sourceField: string[];
852
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
853
+ readonly destSchema: "threadMessage";
854
+ readonly cardinality: "one";
855
+ }];
856
+ };
857
+ };
858
+ enableLegacyQueries: boolean | undefined;
859
+ enableLegacyMutators: false;
860
+ }, "account", {
861
+ readonly color: string;
862
+ readonly displayName: string | null;
863
+ readonly id: string;
864
+ readonly imapConnectionStatus: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
865
+ readonly mailProcessedCount: number;
866
+ readonly mailTotalCount: number;
867
+ readonly primaryAliasId: string | null;
868
+ readonly userId: string;
869
+ } & {
870
+ readonly aliases: readonly {
871
+ readonly accountId: string;
872
+ readonly emailAddress: string;
873
+ readonly id: string;
874
+ readonly isPrimary: boolean;
875
+ readonly name: string | null;
876
+ }[];
877
+ } & {
878
+ readonly primaryAlias: {
879
+ readonly accountId: string;
880
+ readonly emailAddress: string;
881
+ readonly id: string;
882
+ readonly isPrimary: boolean;
883
+ readonly name: string | null;
884
+ } | undefined;
885
+ } & {
886
+ readonly labels: readonly {
887
+ readonly accountId: string;
888
+ readonly id: string;
889
+ readonly path: string;
890
+ readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
891
+ }[];
892
+ } & {
893
+ readonly user: {
894
+ readonly id: string;
895
+ readonly name: string | null;
896
+ readonly profilePicture: string | null;
897
+ readonly undoSendEnabled: boolean;
898
+ } | undefined;
899
+ }>>;
900
+ readonly getContacts: import("@rocicorp/zero").SyncedQuery<"getContacts", import("..").MarcoSyncedQueryContext, true, [{
901
+ limit: number;
902
+ search?: string;
903
+ where?: {
904
+ emailAddress?: string;
905
+ name?: string;
906
+ };
907
+ }], import("@rocicorp/zero").Query<{
908
+ tables: {
909
+ readonly user: {
910
+ name: "user";
911
+ columns: {
912
+ readonly id: {
913
+ type: "string";
914
+ optional: false;
915
+ customType: string;
916
+ };
917
+ readonly name: Omit<{
918
+ type: "string";
919
+ optional: false;
920
+ customType: string;
921
+ }, "optional"> & {
922
+ optional: true;
923
+ };
924
+ readonly profilePicture: Omit<{
925
+ type: "string";
926
+ optional: false;
927
+ customType: string;
928
+ }, "optional"> & {
929
+ optional: true;
930
+ };
931
+ readonly undoSendEnabled: {
932
+ type: "boolean";
933
+ optional: false;
934
+ customType: boolean;
935
+ };
936
+ };
937
+ primaryKey: readonly [string, ...string[]];
938
+ } & {
939
+ primaryKey: ["id"];
940
+ };
941
+ readonly userPushNotificationToken: {
942
+ name: "userPushNotificationToken";
943
+ columns: {
944
+ readonly createdAt: {
945
+ type: "number";
946
+ optional: false;
947
+ customType: number;
948
+ };
949
+ readonly id: {
950
+ type: "string";
951
+ optional: false;
952
+ customType: string;
953
+ };
954
+ readonly token: {
955
+ type: "string";
956
+ optional: false;
957
+ customType: string;
958
+ };
959
+ readonly userId: {
960
+ type: "string";
961
+ optional: false;
962
+ customType: string;
963
+ };
964
+ };
965
+ primaryKey: readonly [string, ...string[]];
966
+ } & {
967
+ primaryKey: ["id"];
968
+ };
969
+ readonly contact: {
970
+ name: "contact";
971
+ columns: {
972
+ readonly emailAddress: {
973
+ type: "string";
974
+ optional: false;
975
+ customType: string;
976
+ };
977
+ readonly id: {
978
+ type: "string";
979
+ optional: false;
980
+ customType: string;
981
+ };
982
+ readonly name: Omit<{
983
+ type: "string";
984
+ optional: false;
985
+ customType: string;
986
+ }, "optional"> & {
987
+ optional: true;
988
+ };
989
+ readonly userId: {
990
+ type: "string";
991
+ optional: false;
992
+ customType: string;
993
+ };
994
+ };
995
+ primaryKey: readonly [string, ...string[]];
996
+ } & {
997
+ primaryKey: ["id"];
998
+ };
999
+ readonly account: {
1000
+ name: "account";
1001
+ columns: {
1002
+ readonly color: {
1003
+ type: "string";
1004
+ optional: false;
1005
+ customType: string;
1006
+ };
1007
+ readonly displayName: Omit<{
1008
+ type: "string";
1009
+ optional: false;
1010
+ customType: string;
1011
+ }, "optional"> & {
1012
+ optional: true;
1013
+ };
1014
+ readonly id: {
1015
+ type: "string";
1016
+ optional: false;
1017
+ customType: string;
1018
+ };
1019
+ readonly imapConnectionStatus: {
1020
+ type: "string";
1021
+ optional: false;
1022
+ customType: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
1023
+ };
1024
+ readonly mailProcessedCount: {
1025
+ type: "number";
1026
+ optional: false;
1027
+ customType: number;
1028
+ };
1029
+ readonly mailTotalCount: {
1030
+ type: "number";
1031
+ optional: false;
1032
+ customType: number;
1033
+ };
1034
+ readonly primaryAliasId: Omit<{
1035
+ type: "string";
1036
+ optional: false;
1037
+ customType: string;
1038
+ }, "optional"> & {
1039
+ optional: true;
1040
+ };
1041
+ readonly userId: {
1042
+ type: "string";
1043
+ optional: false;
1044
+ customType: string;
1045
+ };
1046
+ };
1047
+ primaryKey: readonly [string, ...string[]];
1048
+ } & {
1049
+ primaryKey: ["id"];
1050
+ };
1051
+ readonly accountAlias: {
1052
+ name: "accountAlias";
1053
+ columns: {
1054
+ readonly accountId: {
1055
+ type: "string";
1056
+ optional: false;
1057
+ customType: string;
1058
+ };
1059
+ readonly emailAddress: {
1060
+ type: "string";
1061
+ optional: false;
1062
+ customType: string;
1063
+ };
1064
+ readonly id: {
1065
+ type: "string";
1066
+ optional: false;
1067
+ customType: string;
1068
+ };
1069
+ readonly isPrimary: {
1070
+ type: "boolean";
1071
+ optional: false;
1072
+ customType: boolean;
1073
+ };
1074
+ readonly name: Omit<{
1075
+ type: "string";
1076
+ optional: false;
1077
+ customType: string;
1078
+ }, "optional"> & {
1079
+ optional: true;
1080
+ };
1081
+ };
1082
+ primaryKey: readonly [string, ...string[]];
1083
+ } & {
1084
+ primaryKey: ["id"];
1085
+ };
1086
+ readonly accountLabel: {
1087
+ name: "accountLabel";
1088
+ columns: {
1089
+ readonly accountId: {
1090
+ type: "string";
1091
+ optional: false;
1092
+ customType: string;
1093
+ };
1094
+ readonly id: {
1095
+ type: "string";
1096
+ optional: false;
1097
+ customType: string;
1098
+ };
1099
+ readonly path: {
1100
+ type: "string";
1101
+ optional: false;
1102
+ customType: string;
1103
+ };
1104
+ readonly specialUse: Omit<{
1105
+ type: "string";
1106
+ optional: false;
1107
+ customType: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH";
1108
+ }, "optional"> & {
1109
+ optional: true;
1110
+ };
1111
+ };
1112
+ primaryKey: readonly [string, ...string[]];
1113
+ } & {
1114
+ primaryKey: ["id"];
1115
+ };
1116
+ readonly draft: {
1117
+ name: "draft";
1118
+ columns: {
1119
+ readonly accountId: {
1120
+ type: "string";
1121
+ optional: false;
1122
+ customType: string;
1123
+ };
1124
+ readonly body: {
1125
+ type: "json";
1126
+ optional: false;
1127
+ customType: {
1128
+ content: string;
1129
+ to: string[];
1130
+ cc: string[];
1131
+ bcc: string[];
1132
+ };
1133
+ };
1134
+ readonly error: Omit<{
1135
+ type: "string";
1136
+ optional: false;
1137
+ customType: string;
1138
+ }, "optional"> & {
1139
+ optional: true;
1140
+ };
1141
+ readonly fromAliasId: Omit<{
1142
+ type: "string";
1143
+ optional: false;
1144
+ customType: string;
1145
+ }, "optional"> & {
1146
+ optional: true;
1147
+ };
1148
+ readonly fromEmail: {
1149
+ type: "string";
1150
+ optional: false;
1151
+ customType: string;
1152
+ };
1153
+ readonly fromName: Omit<{
1154
+ type: "string";
1155
+ optional: false;
1156
+ customType: string;
1157
+ }, "optional"> & {
1158
+ optional: true;
1159
+ };
1160
+ readonly id: {
1161
+ type: "string";
1162
+ optional: false;
1163
+ customType: string;
1164
+ };
1165
+ readonly referencedMessageId: Omit<{
1166
+ type: "string";
1167
+ optional: false;
1168
+ customType: string;
1169
+ }, "optional"> & {
1170
+ optional: true;
1171
+ };
1172
+ readonly scheduledFor: Omit<{
1173
+ type: "number";
1174
+ optional: false;
1175
+ customType: number;
1176
+ }, "optional"> & {
1177
+ optional: true;
1178
+ };
1179
+ readonly status: {
1180
+ type: "string";
1181
+ optional: false;
1182
+ customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
1183
+ };
1184
+ readonly subject: Omit<{
1185
+ type: "string";
1186
+ optional: false;
1187
+ customType: string;
1188
+ }, "optional"> & {
1189
+ optional: true;
1190
+ };
1191
+ readonly type: {
1192
+ type: "string";
1193
+ optional: false;
1194
+ customType: "NEW" | "REPLY" | "FORWARD";
1195
+ };
1196
+ readonly updatedAt: {
1197
+ type: "number";
1198
+ optional: false;
1199
+ customType: number;
1200
+ };
1201
+ readonly userId: {
1202
+ type: "string";
1203
+ optional: false;
1204
+ customType: string;
1205
+ };
1206
+ };
1207
+ primaryKey: readonly [string, ...string[]];
1208
+ } & {
1209
+ primaryKey: ["id"];
1210
+ };
1211
+ readonly draftRecipient: {
1212
+ name: "draftRecipient";
1213
+ columns: {
1214
+ readonly draftId: {
1215
+ type: "string";
1216
+ optional: false;
1217
+ customType: string;
1218
+ };
1219
+ readonly emailAddress: {
1220
+ type: "string";
1221
+ optional: false;
1222
+ customType: string;
1223
+ };
1224
+ readonly id: {
1225
+ type: "string";
1226
+ optional: false;
1227
+ customType: string;
1228
+ };
1229
+ readonly type: {
1230
+ type: "string";
1231
+ optional: false;
1232
+ customType: "bcc" | "cc" | "to";
1233
+ };
1234
+ };
1235
+ primaryKey: readonly [string, ...string[]];
1236
+ } & {
1237
+ primaryKey: ["id"];
1238
+ };
1239
+ readonly draftAttachment: {
1240
+ name: "draftAttachment";
1241
+ columns: {
1242
+ readonly draftId: {
1243
+ type: "string";
1244
+ optional: false;
1245
+ customType: string;
1246
+ };
1247
+ readonly failed: {
1248
+ type: "boolean";
1249
+ optional: false;
1250
+ customType: boolean;
1251
+ };
1252
+ readonly fileName: {
1253
+ type: "string";
1254
+ optional: false;
1255
+ customType: string;
1256
+ };
1257
+ readonly id: {
1258
+ type: "string";
1259
+ optional: false;
1260
+ customType: string;
1261
+ };
1262
+ readonly mimeType: {
1263
+ type: "string";
1264
+ optional: false;
1265
+ customType: string;
1266
+ };
1267
+ readonly totalChunks: {
1268
+ type: "number";
1269
+ optional: false;
1270
+ customType: number;
1271
+ };
1272
+ readonly totalSize: {
1273
+ type: "number";
1274
+ optional: false;
1275
+ customType: number;
1276
+ };
1277
+ readonly uploadedChunks: {
1278
+ type: "number";
1279
+ optional: false;
1280
+ customType: number;
1281
+ };
1282
+ };
1283
+ primaryKey: readonly [string, ...string[]];
1284
+ } & {
1285
+ primaryKey: ["id"];
1286
+ };
1287
+ readonly thread: {
1288
+ name: "thread";
1289
+ columns: {
1290
+ readonly accountId: {
1291
+ type: "string";
1292
+ optional: false;
1293
+ customType: string;
1294
+ };
1295
+ readonly flagged: {
1296
+ type: "boolean";
1297
+ optional: false;
1298
+ customType: boolean;
1299
+ };
1300
+ readonly id: {
1301
+ type: "string";
1302
+ optional: false;
1303
+ customType: string;
1304
+ };
1305
+ readonly latestMessageDate: {
1306
+ type: "number";
1307
+ optional: false;
1308
+ customType: number;
1309
+ };
1310
+ readonly seen: {
1311
+ type: "boolean";
1312
+ optional: false;
1313
+ customType: boolean;
1314
+ };
1315
+ readonly userId: {
1316
+ type: "string";
1317
+ optional: false;
1318
+ customType: string;
1319
+ };
1320
+ readonly words: {
1321
+ type: "string";
1322
+ optional: false;
1323
+ customType: string;
1324
+ };
1325
+ };
1326
+ primaryKey: readonly [string, ...string[]];
1327
+ } & {
1328
+ primaryKey: ["id"];
1329
+ };
1330
+ readonly threadLabel: {
1331
+ name: "threadLabel";
1332
+ columns: {
1333
+ readonly labelId: {
1334
+ type: "string";
1335
+ optional: false;
1336
+ customType: string;
1337
+ };
1338
+ readonly threadId: {
1339
+ type: "string";
1340
+ optional: false;
1341
+ customType: string;
1342
+ };
1343
+ };
1344
+ primaryKey: readonly [string, ...string[]];
1345
+ } & {
1346
+ primaryKey: ["threadId", "labelId"];
1347
+ };
1348
+ readonly threadMessage: {
1349
+ name: "threadMessage";
1350
+ columns: {
1351
+ readonly envelopeDate: {
1352
+ type: "number";
1353
+ optional: false;
1354
+ customType: number;
1355
+ };
1356
+ readonly envelopeSubject: Omit<{
1357
+ type: "string";
1358
+ optional: false;
1359
+ customType: string;
1360
+ }, "optional"> & {
1361
+ optional: true;
1362
+ };
1363
+ readonly id: {
1364
+ type: "string";
1365
+ optional: false;
1366
+ customType: string;
1367
+ };
1368
+ readonly previewText: {
1369
+ type: "string";
1370
+ optional: false;
1371
+ customType: string;
1372
+ };
1373
+ readonly senderEmail: {
1374
+ type: "string";
1375
+ optional: false;
1376
+ customType: string;
1377
+ };
1378
+ readonly senderName: Omit<{
1379
+ type: "string";
1380
+ optional: false;
1381
+ customType: string;
1382
+ }, "optional"> & {
1383
+ optional: true;
1384
+ };
1385
+ readonly threadId: {
1386
+ type: "string";
1387
+ optional: false;
1388
+ customType: string;
1389
+ };
1390
+ };
1391
+ primaryKey: readonly [string, ...string[]];
1392
+ } & {
1393
+ primaryKey: ["id"];
1394
+ };
1395
+ readonly threadMessageRecipient: {
1396
+ name: "threadMessageRecipient";
1397
+ columns: {
1398
+ readonly emailAddress: {
1399
+ type: "string";
1400
+ optional: false;
1401
+ customType: string;
1402
+ };
1403
+ readonly id: {
1404
+ type: "string";
1405
+ optional: false;
1406
+ customType: string;
1407
+ };
1408
+ readonly name: Omit<{
1409
+ type: "string";
1410
+ optional: false;
1411
+ customType: string;
1412
+ }, "optional"> & {
1413
+ optional: true;
1414
+ };
1415
+ readonly threadMessageId: {
1416
+ type: "string";
1417
+ optional: false;
1418
+ customType: string;
1419
+ };
1420
+ readonly type: {
1421
+ type: "string";
1422
+ optional: false;
1423
+ customType: "bcc" | "cc" | "to" | "replyTo";
1424
+ };
1425
+ };
1426
+ primaryKey: readonly [string, ...string[]];
1427
+ } & {
1428
+ primaryKey: ["id"];
1429
+ };
1430
+ readonly threadMessageAttachment: {
1431
+ name: "threadMessageAttachment";
1432
+ columns: {
1433
+ readonly fileName: {
1434
+ type: "string";
1435
+ optional: false;
1436
+ customType: string;
1437
+ };
1438
+ readonly id: {
1439
+ type: "string";
1440
+ optional: false;
1441
+ customType: string;
1442
+ };
1443
+ readonly mimeType: {
1444
+ type: "string";
1445
+ optional: false;
1446
+ customType: string;
1447
+ };
1448
+ readonly size: {
1449
+ type: "number";
1450
+ optional: false;
1451
+ customType: number;
1452
+ };
1453
+ readonly status: {
1454
+ type: "string";
1455
+ optional: false;
1456
+ customType: "NOT_DOWNLOADED" | "DOWNLOAD_REQUESTED" | "DOWNLOADED" | "DOWNLOAD_FAILED";
1457
+ };
1458
+ readonly threadMessageId: {
1459
+ type: "string";
1460
+ optional: false;
1461
+ customType: string;
1462
+ };
1463
+ };
1464
+ primaryKey: readonly [string, ...string[]];
1465
+ } & {
1466
+ primaryKey: ["id"];
1467
+ };
1468
+ readonly threadMessageLabel: {
1469
+ name: "threadMessageLabel";
1470
+ columns: {
1471
+ readonly labelId: {
1472
+ type: "string";
1473
+ optional: false;
1474
+ customType: string;
1475
+ };
1476
+ readonly threadMessageId: {
1477
+ type: "string";
1478
+ optional: false;
1479
+ customType: string;
1480
+ };
1481
+ };
1482
+ primaryKey: readonly [string, ...string[]];
1483
+ } & {
1484
+ primaryKey: ["threadMessageId", "labelId"];
1485
+ };
1486
+ };
1487
+ relationships: {
1488
+ readonly user: {
1489
+ accounts: [{
1490
+ readonly sourceField: string[];
1491
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
1492
+ readonly destSchema: "account";
1493
+ readonly cardinality: "many";
1494
+ }];
1495
+ contacts: [{
1496
+ readonly sourceField: string[];
1497
+ readonly destField: ("id" | "name" | "emailAddress" | "userId")[];
1498
+ readonly destSchema: "contact";
1499
+ readonly cardinality: "many";
1500
+ }];
1501
+ drafts: [{
1502
+ readonly sourceField: string[];
1503
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
1504
+ readonly destSchema: "draft";
1505
+ readonly cardinality: "many";
1506
+ }];
1507
+ pushNotificationTokens: [{
1508
+ readonly sourceField: string[];
1509
+ readonly destField: ("createdAt" | "id" | "token" | "userId")[];
1510
+ readonly destSchema: "userPushNotificationToken";
1511
+ readonly cardinality: "many";
1512
+ }];
1513
+ threads: [{
1514
+ readonly sourceField: string[];
1515
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
1516
+ readonly destSchema: "thread";
1517
+ readonly cardinality: "many";
1518
+ }];
1519
+ };
1520
+ readonly userPushNotificationToken: {
1521
+ user: [{
1522
+ readonly sourceField: string[];
1523
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
1524
+ readonly destSchema: "user";
1525
+ readonly cardinality: "one";
1526
+ }];
1527
+ };
1528
+ readonly contact: {
1529
+ user: [{
1530
+ readonly sourceField: string[];
1531
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
1532
+ readonly destSchema: "user";
1533
+ readonly cardinality: "one";
1534
+ }];
1535
+ };
1536
+ readonly account: {
1537
+ aliases: [{
1538
+ readonly sourceField: string[];
1539
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
1540
+ readonly destSchema: "accountAlias";
1541
+ readonly cardinality: "many";
1542
+ }];
1543
+ drafts: [{
1544
+ readonly sourceField: string[];
1545
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
1546
+ readonly destSchema: "draft";
1547
+ readonly cardinality: "many";
1548
+ }];
1549
+ labels: [{
1550
+ readonly sourceField: string[];
1551
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
1552
+ readonly destSchema: "accountLabel";
1553
+ readonly cardinality: "many";
1554
+ }];
1555
+ primaryAlias: [{
1556
+ readonly sourceField: string[];
1557
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
1558
+ readonly destSchema: "accountAlias";
1559
+ readonly cardinality: "one";
1560
+ }];
1561
+ threads: [{
1562
+ readonly sourceField: string[];
1563
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
1564
+ readonly destSchema: "thread";
1565
+ readonly cardinality: "many";
1566
+ }];
1567
+ user: [{
1568
+ readonly sourceField: string[];
1569
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
1570
+ readonly destSchema: "user";
1571
+ readonly cardinality: "one";
1572
+ }];
1573
+ };
1574
+ readonly accountAlias: {
1575
+ account: [{
1576
+ readonly sourceField: string[];
1577
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
1578
+ readonly destSchema: "account";
1579
+ readonly cardinality: "one";
1580
+ }];
1581
+ };
1582
+ readonly accountLabel: {
1583
+ account: [{
1584
+ readonly sourceField: string[];
1585
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
1586
+ readonly destSchema: "account";
1587
+ readonly cardinality: "one";
1588
+ }];
1589
+ threadMessages: [{
1590
+ readonly sourceField: string[];
1591
+ readonly destField: ("labelId" | "threadMessageId")[];
1592
+ readonly destSchema: "threadMessageLabel";
1593
+ readonly cardinality: "many";
1594
+ }, {
1595
+ readonly sourceField: string[];
1596
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
1597
+ readonly destSchema: "threadMessage";
1598
+ readonly cardinality: "many";
1599
+ }];
1600
+ threads: [{
1601
+ readonly sourceField: string[];
1602
+ readonly destField: ("threadId" | "labelId")[];
1603
+ readonly destSchema: "threadLabel";
1604
+ readonly cardinality: "many";
1605
+ }, {
1606
+ readonly sourceField: string[];
1607
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
1608
+ readonly destSchema: "thread";
1609
+ readonly cardinality: "many";
1610
+ }];
1611
+ };
1612
+ readonly draft: {
1613
+ account: [{
1614
+ readonly sourceField: string[];
1615
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
1616
+ readonly destSchema: "account";
1617
+ readonly cardinality: "one";
1618
+ }];
1619
+ attachments: [{
1620
+ readonly sourceField: string[];
1621
+ readonly destField: ("id" | "failed" | "fileName" | "mimeType" | "totalChunks" | "totalSize" | "uploadedChunks" | "draftId")[];
1622
+ readonly destSchema: "draftAttachment";
1623
+ readonly cardinality: "many";
1624
+ }];
1625
+ recipients: [{
1626
+ readonly sourceField: string[];
1627
+ readonly destField: ("type" | "id" | "emailAddress" | "draftId")[];
1628
+ readonly destSchema: "draftRecipient";
1629
+ readonly cardinality: "many";
1630
+ }];
1631
+ user: [{
1632
+ readonly sourceField: string[];
1633
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
1634
+ readonly destSchema: "user";
1635
+ readonly cardinality: "one";
1636
+ }];
1637
+ };
1638
+ readonly draftRecipient: {
1639
+ draft: [{
1640
+ readonly sourceField: string[];
1641
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
1642
+ readonly destSchema: "draft";
1643
+ readonly cardinality: "one";
1644
+ }];
1645
+ };
1646
+ readonly draftAttachment: {
1647
+ draft: [{
1648
+ readonly sourceField: string[];
1649
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
1650
+ readonly destSchema: "draft";
1651
+ readonly cardinality: "one";
1652
+ }];
1653
+ };
1654
+ readonly thread: {
1655
+ account: [{
1656
+ readonly sourceField: string[];
1657
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
1658
+ readonly destSchema: "account";
1659
+ readonly cardinality: "one";
1660
+ }];
1661
+ labels: [{
1662
+ readonly sourceField: string[];
1663
+ readonly destField: ("threadId" | "labelId")[];
1664
+ readonly destSchema: "threadLabel";
1665
+ readonly cardinality: "many";
1666
+ }, {
1667
+ readonly sourceField: string[];
1668
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
1669
+ readonly destSchema: "accountLabel";
1670
+ readonly cardinality: "many";
1671
+ }];
1672
+ messages: [{
1673
+ readonly sourceField: string[];
1674
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
1675
+ readonly destSchema: "threadMessage";
1676
+ readonly cardinality: "many";
1677
+ }];
1678
+ user: [{
1679
+ readonly sourceField: string[];
1680
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
1681
+ readonly destSchema: "user";
1682
+ readonly cardinality: "one";
1683
+ }];
1684
+ };
1685
+ readonly threadLabel: {
1686
+ label: [{
1687
+ readonly sourceField: string[];
1688
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
1689
+ readonly destSchema: "accountLabel";
1690
+ readonly cardinality: "one";
1691
+ }];
1692
+ thread: [{
1693
+ readonly sourceField: string[];
1694
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
1695
+ readonly destSchema: "thread";
1696
+ readonly cardinality: "one";
1697
+ }];
1698
+ };
1699
+ readonly threadMessage: {
1700
+ attachments: [{
1701
+ readonly sourceField: string[];
1702
+ readonly destField: ("status" | "id" | "fileName" | "mimeType" | "threadMessageId" | "size")[];
1703
+ readonly destSchema: "threadMessageAttachment";
1704
+ readonly cardinality: "many";
1705
+ }];
1706
+ labels: [{
1707
+ readonly sourceField: string[];
1708
+ readonly destField: ("labelId" | "threadMessageId")[];
1709
+ readonly destSchema: "threadMessageLabel";
1710
+ readonly cardinality: "many";
1711
+ }, {
1712
+ readonly sourceField: string[];
1713
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
1714
+ readonly destSchema: "accountLabel";
1715
+ readonly cardinality: "many";
1716
+ }];
1717
+ recipients: [{
1718
+ readonly sourceField: string[];
1719
+ readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
1720
+ readonly destSchema: "threadMessageRecipient";
1721
+ readonly cardinality: "many";
1722
+ }];
1723
+ thread: [{
1724
+ readonly sourceField: string[];
1725
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
1726
+ readonly destSchema: "thread";
1727
+ readonly cardinality: "one";
1728
+ }];
1729
+ };
1730
+ readonly threadMessageRecipient: {
1731
+ message: [{
1732
+ readonly sourceField: string[];
1733
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
1734
+ readonly destSchema: "threadMessage";
1735
+ readonly cardinality: "one";
1736
+ }];
1737
+ };
1738
+ readonly threadMessageAttachment: {
1739
+ message: [{
1740
+ readonly sourceField: string[];
1741
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
1742
+ readonly destSchema: "threadMessage";
1743
+ readonly cardinality: "one";
1744
+ }];
1745
+ };
1746
+ readonly threadMessageLabel: {
1747
+ label: [{
1748
+ readonly sourceField: string[];
1749
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
1750
+ readonly destSchema: "accountLabel";
1751
+ readonly cardinality: "one";
1752
+ }];
1753
+ message: [{
1754
+ readonly sourceField: string[];
1755
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
1756
+ readonly destSchema: "threadMessage";
1757
+ readonly cardinality: "one";
1758
+ }];
1759
+ };
1760
+ };
1761
+ enableLegacyQueries: boolean | undefined;
1762
+ enableLegacyMutators: false;
1763
+ }, "contact", {
1764
+ readonly emailAddress: string;
1765
+ readonly id: string;
1766
+ readonly name: string | null;
1767
+ readonly userId: string;
1768
+ } & {
1769
+ readonly user: {
1770
+ readonly id: string;
1771
+ readonly name: string | null;
1772
+ readonly profilePicture: string | null;
1773
+ readonly undoSendEnabled: boolean;
1774
+ } | undefined;
1775
+ }>>;
1776
+ readonly getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts", import("..").MarcoSyncedQueryContext, true, [{
1777
+ accountId?: string;
1778
+ limit?: number;
1779
+ status?: typeof import("..").DRAFT_STATUSES[number];
1780
+ }], import("@rocicorp/zero").Query<{
1781
+ tables: {
1782
+ readonly user: {
1783
+ name: "user";
1784
+ columns: {
1785
+ readonly id: {
1786
+ type: "string";
1787
+ optional: false;
1788
+ customType: string;
1789
+ };
1790
+ readonly name: Omit<{
1791
+ type: "string";
1792
+ optional: false;
1793
+ customType: string;
1794
+ }, "optional"> & {
1795
+ optional: true;
1796
+ };
1797
+ readonly profilePicture: Omit<{
1798
+ type: "string";
1799
+ optional: false;
1800
+ customType: string;
1801
+ }, "optional"> & {
1802
+ optional: true;
1803
+ };
1804
+ readonly undoSendEnabled: {
1805
+ type: "boolean";
1806
+ optional: false;
1807
+ customType: boolean;
1808
+ };
1809
+ };
1810
+ primaryKey: readonly [string, ...string[]];
1811
+ } & {
1812
+ primaryKey: ["id"];
1813
+ };
1814
+ readonly userPushNotificationToken: {
1815
+ name: "userPushNotificationToken";
1816
+ columns: {
1817
+ readonly createdAt: {
1818
+ type: "number";
1819
+ optional: false;
1820
+ customType: number;
1821
+ };
1822
+ readonly id: {
1823
+ type: "string";
1824
+ optional: false;
1825
+ customType: string;
1826
+ };
1827
+ readonly token: {
1828
+ type: "string";
1829
+ optional: false;
1830
+ customType: string;
1831
+ };
1832
+ readonly userId: {
1833
+ type: "string";
1834
+ optional: false;
1835
+ customType: string;
1836
+ };
1837
+ };
1838
+ primaryKey: readonly [string, ...string[]];
1839
+ } & {
1840
+ primaryKey: ["id"];
1841
+ };
1842
+ readonly contact: {
1843
+ name: "contact";
1844
+ columns: {
1845
+ readonly emailAddress: {
1846
+ type: "string";
1847
+ optional: false;
1848
+ customType: string;
1849
+ };
1850
+ readonly id: {
1851
+ type: "string";
1852
+ optional: false;
1853
+ customType: string;
1854
+ };
1855
+ readonly name: Omit<{
1856
+ type: "string";
1857
+ optional: false;
1858
+ customType: string;
1859
+ }, "optional"> & {
1860
+ optional: true;
1861
+ };
1862
+ readonly userId: {
1863
+ type: "string";
1864
+ optional: false;
1865
+ customType: string;
1866
+ };
1867
+ };
1868
+ primaryKey: readonly [string, ...string[]];
1869
+ } & {
1870
+ primaryKey: ["id"];
1871
+ };
1872
+ readonly account: {
1873
+ name: "account";
1874
+ columns: {
1875
+ readonly color: {
1876
+ type: "string";
1877
+ optional: false;
1878
+ customType: string;
1879
+ };
1880
+ readonly displayName: Omit<{
1881
+ type: "string";
1882
+ optional: false;
1883
+ customType: string;
1884
+ }, "optional"> & {
1885
+ optional: true;
1886
+ };
1887
+ readonly id: {
1888
+ type: "string";
1889
+ optional: false;
1890
+ customType: string;
1891
+ };
1892
+ readonly imapConnectionStatus: {
1893
+ type: "string";
1894
+ optional: false;
1895
+ customType: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
1896
+ };
1897
+ readonly mailProcessedCount: {
1898
+ type: "number";
1899
+ optional: false;
1900
+ customType: number;
1901
+ };
1902
+ readonly mailTotalCount: {
1903
+ type: "number";
1904
+ optional: false;
1905
+ customType: number;
1906
+ };
1907
+ readonly primaryAliasId: Omit<{
1908
+ type: "string";
1909
+ optional: false;
1910
+ customType: string;
1911
+ }, "optional"> & {
1912
+ optional: true;
1913
+ };
1914
+ readonly userId: {
1915
+ type: "string";
1916
+ optional: false;
1917
+ customType: string;
1918
+ };
1919
+ };
1920
+ primaryKey: readonly [string, ...string[]];
1921
+ } & {
1922
+ primaryKey: ["id"];
1923
+ };
1924
+ readonly accountAlias: {
1925
+ name: "accountAlias";
1926
+ columns: {
1927
+ readonly accountId: {
1928
+ type: "string";
1929
+ optional: false;
1930
+ customType: string;
1931
+ };
1932
+ readonly emailAddress: {
1933
+ type: "string";
1934
+ optional: false;
1935
+ customType: string;
1936
+ };
1937
+ readonly id: {
1938
+ type: "string";
1939
+ optional: false;
1940
+ customType: string;
1941
+ };
1942
+ readonly isPrimary: {
1943
+ type: "boolean";
1944
+ optional: false;
1945
+ customType: boolean;
1946
+ };
1947
+ readonly name: Omit<{
1948
+ type: "string";
1949
+ optional: false;
1950
+ customType: string;
1951
+ }, "optional"> & {
1952
+ optional: true;
1953
+ };
1954
+ };
1955
+ primaryKey: readonly [string, ...string[]];
1956
+ } & {
1957
+ primaryKey: ["id"];
1958
+ };
1959
+ readonly accountLabel: {
1960
+ name: "accountLabel";
1961
+ columns: {
1962
+ readonly accountId: {
1963
+ type: "string";
1964
+ optional: false;
1965
+ customType: string;
1966
+ };
1967
+ readonly id: {
1968
+ type: "string";
1969
+ optional: false;
1970
+ customType: string;
1971
+ };
1972
+ readonly path: {
1973
+ type: "string";
1974
+ optional: false;
1975
+ customType: string;
1976
+ };
1977
+ readonly specialUse: Omit<{
1978
+ type: "string";
1979
+ optional: false;
1980
+ customType: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH";
1981
+ }, "optional"> & {
1982
+ optional: true;
1983
+ };
1984
+ };
1985
+ primaryKey: readonly [string, ...string[]];
1986
+ } & {
1987
+ primaryKey: ["id"];
1988
+ };
1989
+ readonly draft: {
1990
+ name: "draft";
1991
+ columns: {
1992
+ readonly accountId: {
1993
+ type: "string";
1994
+ optional: false;
1995
+ customType: string;
1996
+ };
1997
+ readonly body: {
1998
+ type: "json";
1999
+ optional: false;
2000
+ customType: {
2001
+ content: string;
2002
+ to: string[];
2003
+ cc: string[];
2004
+ bcc: string[];
2005
+ };
2006
+ };
2007
+ readonly error: Omit<{
2008
+ type: "string";
2009
+ optional: false;
2010
+ customType: string;
2011
+ }, "optional"> & {
2012
+ optional: true;
2013
+ };
2014
+ readonly fromAliasId: Omit<{
2015
+ type: "string";
2016
+ optional: false;
2017
+ customType: string;
2018
+ }, "optional"> & {
2019
+ optional: true;
2020
+ };
2021
+ readonly fromEmail: {
2022
+ type: "string";
2023
+ optional: false;
2024
+ customType: string;
2025
+ };
2026
+ readonly fromName: Omit<{
2027
+ type: "string";
2028
+ optional: false;
2029
+ customType: string;
2030
+ }, "optional"> & {
2031
+ optional: true;
2032
+ };
2033
+ readonly id: {
2034
+ type: "string";
2035
+ optional: false;
2036
+ customType: string;
2037
+ };
2038
+ readonly referencedMessageId: Omit<{
2039
+ type: "string";
2040
+ optional: false;
2041
+ customType: string;
2042
+ }, "optional"> & {
2043
+ optional: true;
2044
+ };
2045
+ readonly scheduledFor: Omit<{
2046
+ type: "number";
2047
+ optional: false;
2048
+ customType: number;
2049
+ }, "optional"> & {
2050
+ optional: true;
2051
+ };
2052
+ readonly status: {
2053
+ type: "string";
2054
+ optional: false;
2055
+ customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
2056
+ };
2057
+ readonly subject: Omit<{
2058
+ type: "string";
2059
+ optional: false;
2060
+ customType: string;
2061
+ }, "optional"> & {
2062
+ optional: true;
2063
+ };
2064
+ readonly type: {
2065
+ type: "string";
2066
+ optional: false;
2067
+ customType: "NEW" | "REPLY" | "FORWARD";
2068
+ };
2069
+ readonly updatedAt: {
2070
+ type: "number";
2071
+ optional: false;
2072
+ customType: number;
2073
+ };
2074
+ readonly userId: {
2075
+ type: "string";
2076
+ optional: false;
2077
+ customType: string;
2078
+ };
2079
+ };
2080
+ primaryKey: readonly [string, ...string[]];
2081
+ } & {
2082
+ primaryKey: ["id"];
2083
+ };
2084
+ readonly draftRecipient: {
2085
+ name: "draftRecipient";
2086
+ columns: {
2087
+ readonly draftId: {
2088
+ type: "string";
2089
+ optional: false;
2090
+ customType: string;
2091
+ };
2092
+ readonly emailAddress: {
2093
+ type: "string";
2094
+ optional: false;
2095
+ customType: string;
2096
+ };
2097
+ readonly id: {
2098
+ type: "string";
2099
+ optional: false;
2100
+ customType: string;
2101
+ };
2102
+ readonly type: {
2103
+ type: "string";
2104
+ optional: false;
2105
+ customType: "bcc" | "cc" | "to";
2106
+ };
2107
+ };
2108
+ primaryKey: readonly [string, ...string[]];
2109
+ } & {
2110
+ primaryKey: ["id"];
2111
+ };
2112
+ readonly draftAttachment: {
2113
+ name: "draftAttachment";
2114
+ columns: {
2115
+ readonly draftId: {
2116
+ type: "string";
2117
+ optional: false;
2118
+ customType: string;
2119
+ };
2120
+ readonly failed: {
2121
+ type: "boolean";
2122
+ optional: false;
2123
+ customType: boolean;
2124
+ };
2125
+ readonly fileName: {
2126
+ type: "string";
2127
+ optional: false;
2128
+ customType: string;
2129
+ };
2130
+ readonly id: {
2131
+ type: "string";
2132
+ optional: false;
2133
+ customType: string;
2134
+ };
2135
+ readonly mimeType: {
2136
+ type: "string";
2137
+ optional: false;
2138
+ customType: string;
2139
+ };
2140
+ readonly totalChunks: {
2141
+ type: "number";
2142
+ optional: false;
2143
+ customType: number;
2144
+ };
2145
+ readonly totalSize: {
2146
+ type: "number";
2147
+ optional: false;
2148
+ customType: number;
2149
+ };
2150
+ readonly uploadedChunks: {
2151
+ type: "number";
2152
+ optional: false;
2153
+ customType: number;
2154
+ };
2155
+ };
2156
+ primaryKey: readonly [string, ...string[]];
2157
+ } & {
2158
+ primaryKey: ["id"];
2159
+ };
2160
+ readonly thread: {
2161
+ name: "thread";
2162
+ columns: {
2163
+ readonly accountId: {
2164
+ type: "string";
2165
+ optional: false;
2166
+ customType: string;
2167
+ };
2168
+ readonly flagged: {
2169
+ type: "boolean";
2170
+ optional: false;
2171
+ customType: boolean;
2172
+ };
2173
+ readonly id: {
2174
+ type: "string";
2175
+ optional: false;
2176
+ customType: string;
2177
+ };
2178
+ readonly latestMessageDate: {
2179
+ type: "number";
2180
+ optional: false;
2181
+ customType: number;
2182
+ };
2183
+ readonly seen: {
2184
+ type: "boolean";
2185
+ optional: false;
2186
+ customType: boolean;
2187
+ };
2188
+ readonly userId: {
2189
+ type: "string";
2190
+ optional: false;
2191
+ customType: string;
2192
+ };
2193
+ readonly words: {
2194
+ type: "string";
2195
+ optional: false;
2196
+ customType: string;
2197
+ };
2198
+ };
2199
+ primaryKey: readonly [string, ...string[]];
2200
+ } & {
2201
+ primaryKey: ["id"];
2202
+ };
2203
+ readonly threadLabel: {
2204
+ name: "threadLabel";
2205
+ columns: {
2206
+ readonly labelId: {
2207
+ type: "string";
2208
+ optional: false;
2209
+ customType: string;
2210
+ };
2211
+ readonly threadId: {
2212
+ type: "string";
2213
+ optional: false;
2214
+ customType: string;
2215
+ };
2216
+ };
2217
+ primaryKey: readonly [string, ...string[]];
2218
+ } & {
2219
+ primaryKey: ["threadId", "labelId"];
2220
+ };
2221
+ readonly threadMessage: {
2222
+ name: "threadMessage";
2223
+ columns: {
2224
+ readonly envelopeDate: {
2225
+ type: "number";
2226
+ optional: false;
2227
+ customType: number;
2228
+ };
2229
+ readonly envelopeSubject: Omit<{
2230
+ type: "string";
2231
+ optional: false;
2232
+ customType: string;
2233
+ }, "optional"> & {
2234
+ optional: true;
2235
+ };
2236
+ readonly id: {
2237
+ type: "string";
2238
+ optional: false;
2239
+ customType: string;
2240
+ };
2241
+ readonly previewText: {
2242
+ type: "string";
2243
+ optional: false;
2244
+ customType: string;
2245
+ };
2246
+ readonly senderEmail: {
2247
+ type: "string";
2248
+ optional: false;
2249
+ customType: string;
2250
+ };
2251
+ readonly senderName: Omit<{
2252
+ type: "string";
2253
+ optional: false;
2254
+ customType: string;
2255
+ }, "optional"> & {
2256
+ optional: true;
2257
+ };
2258
+ readonly threadId: {
2259
+ type: "string";
2260
+ optional: false;
2261
+ customType: string;
2262
+ };
2263
+ };
2264
+ primaryKey: readonly [string, ...string[]];
2265
+ } & {
2266
+ primaryKey: ["id"];
2267
+ };
2268
+ readonly threadMessageRecipient: {
2269
+ name: "threadMessageRecipient";
2270
+ columns: {
2271
+ readonly emailAddress: {
2272
+ type: "string";
2273
+ optional: false;
2274
+ customType: string;
2275
+ };
2276
+ readonly id: {
2277
+ type: "string";
2278
+ optional: false;
2279
+ customType: string;
2280
+ };
2281
+ readonly name: Omit<{
2282
+ type: "string";
2283
+ optional: false;
2284
+ customType: string;
2285
+ }, "optional"> & {
2286
+ optional: true;
2287
+ };
2288
+ readonly threadMessageId: {
2289
+ type: "string";
2290
+ optional: false;
2291
+ customType: string;
2292
+ };
2293
+ readonly type: {
2294
+ type: "string";
2295
+ optional: false;
2296
+ customType: "bcc" | "cc" | "to" | "replyTo";
2297
+ };
2298
+ };
2299
+ primaryKey: readonly [string, ...string[]];
2300
+ } & {
2301
+ primaryKey: ["id"];
2302
+ };
2303
+ readonly threadMessageAttachment: {
2304
+ name: "threadMessageAttachment";
2305
+ columns: {
2306
+ readonly fileName: {
2307
+ type: "string";
2308
+ optional: false;
2309
+ customType: string;
2310
+ };
2311
+ readonly id: {
2312
+ type: "string";
2313
+ optional: false;
2314
+ customType: string;
2315
+ };
2316
+ readonly mimeType: {
2317
+ type: "string";
2318
+ optional: false;
2319
+ customType: string;
2320
+ };
2321
+ readonly size: {
2322
+ type: "number";
2323
+ optional: false;
2324
+ customType: number;
2325
+ };
2326
+ readonly status: {
2327
+ type: "string";
2328
+ optional: false;
2329
+ customType: "NOT_DOWNLOADED" | "DOWNLOAD_REQUESTED" | "DOWNLOADED" | "DOWNLOAD_FAILED";
2330
+ };
2331
+ readonly threadMessageId: {
2332
+ type: "string";
2333
+ optional: false;
2334
+ customType: string;
2335
+ };
2336
+ };
2337
+ primaryKey: readonly [string, ...string[]];
2338
+ } & {
2339
+ primaryKey: ["id"];
2340
+ };
2341
+ readonly threadMessageLabel: {
2342
+ name: "threadMessageLabel";
2343
+ columns: {
2344
+ readonly labelId: {
2345
+ type: "string";
2346
+ optional: false;
2347
+ customType: string;
2348
+ };
2349
+ readonly threadMessageId: {
2350
+ type: "string";
2351
+ optional: false;
2352
+ customType: string;
2353
+ };
2354
+ };
2355
+ primaryKey: readonly [string, ...string[]];
2356
+ } & {
2357
+ primaryKey: ["threadMessageId", "labelId"];
2358
+ };
2359
+ };
2360
+ relationships: {
2361
+ readonly user: {
2362
+ accounts: [{
2363
+ readonly sourceField: string[];
2364
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
2365
+ readonly destSchema: "account";
2366
+ readonly cardinality: "many";
2367
+ }];
2368
+ contacts: [{
2369
+ readonly sourceField: string[];
2370
+ readonly destField: ("id" | "name" | "emailAddress" | "userId")[];
2371
+ readonly destSchema: "contact";
2372
+ readonly cardinality: "many";
2373
+ }];
2374
+ drafts: [{
2375
+ readonly sourceField: string[];
2376
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
2377
+ readonly destSchema: "draft";
2378
+ readonly cardinality: "many";
2379
+ }];
2380
+ pushNotificationTokens: [{
2381
+ readonly sourceField: string[];
2382
+ readonly destField: ("createdAt" | "id" | "token" | "userId")[];
2383
+ readonly destSchema: "userPushNotificationToken";
2384
+ readonly cardinality: "many";
2385
+ }];
2386
+ threads: [{
2387
+ readonly sourceField: string[];
2388
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
2389
+ readonly destSchema: "thread";
2390
+ readonly cardinality: "many";
2391
+ }];
2392
+ };
2393
+ readonly userPushNotificationToken: {
2394
+ user: [{
2395
+ readonly sourceField: string[];
2396
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
2397
+ readonly destSchema: "user";
2398
+ readonly cardinality: "one";
2399
+ }];
2400
+ };
2401
+ readonly contact: {
2402
+ user: [{
2403
+ readonly sourceField: string[];
2404
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
2405
+ readonly destSchema: "user";
2406
+ readonly cardinality: "one";
2407
+ }];
2408
+ };
2409
+ readonly account: {
2410
+ aliases: [{
2411
+ readonly sourceField: string[];
2412
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
2413
+ readonly destSchema: "accountAlias";
2414
+ readonly cardinality: "many";
2415
+ }];
2416
+ drafts: [{
2417
+ readonly sourceField: string[];
2418
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
2419
+ readonly destSchema: "draft";
2420
+ readonly cardinality: "many";
2421
+ }];
2422
+ labels: [{
2423
+ readonly sourceField: string[];
2424
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
2425
+ readonly destSchema: "accountLabel";
2426
+ readonly cardinality: "many";
2427
+ }];
2428
+ primaryAlias: [{
2429
+ readonly sourceField: string[];
2430
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
2431
+ readonly destSchema: "accountAlias";
2432
+ readonly cardinality: "one";
2433
+ }];
2434
+ threads: [{
2435
+ readonly sourceField: string[];
2436
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
2437
+ readonly destSchema: "thread";
2438
+ readonly cardinality: "many";
2439
+ }];
2440
+ user: [{
2441
+ readonly sourceField: string[];
2442
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
2443
+ readonly destSchema: "user";
2444
+ readonly cardinality: "one";
2445
+ }];
2446
+ };
2447
+ readonly accountAlias: {
2448
+ account: [{
2449
+ readonly sourceField: string[];
2450
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
2451
+ readonly destSchema: "account";
2452
+ readonly cardinality: "one";
2453
+ }];
2454
+ };
2455
+ readonly accountLabel: {
2456
+ account: [{
2457
+ readonly sourceField: string[];
2458
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
2459
+ readonly destSchema: "account";
2460
+ readonly cardinality: "one";
2461
+ }];
2462
+ threadMessages: [{
2463
+ readonly sourceField: string[];
2464
+ readonly destField: ("labelId" | "threadMessageId")[];
2465
+ readonly destSchema: "threadMessageLabel";
2466
+ readonly cardinality: "many";
2467
+ }, {
2468
+ readonly sourceField: string[];
2469
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
2470
+ readonly destSchema: "threadMessage";
2471
+ readonly cardinality: "many";
2472
+ }];
2473
+ threads: [{
2474
+ readonly sourceField: string[];
2475
+ readonly destField: ("threadId" | "labelId")[];
2476
+ readonly destSchema: "threadLabel";
2477
+ readonly cardinality: "many";
2478
+ }, {
2479
+ readonly sourceField: string[];
2480
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
2481
+ readonly destSchema: "thread";
2482
+ readonly cardinality: "many";
2483
+ }];
2484
+ };
2485
+ readonly draft: {
2486
+ account: [{
2487
+ readonly sourceField: string[];
2488
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
2489
+ readonly destSchema: "account";
2490
+ readonly cardinality: "one";
2491
+ }];
2492
+ attachments: [{
2493
+ readonly sourceField: string[];
2494
+ readonly destField: ("id" | "failed" | "fileName" | "mimeType" | "totalChunks" | "totalSize" | "uploadedChunks" | "draftId")[];
2495
+ readonly destSchema: "draftAttachment";
2496
+ readonly cardinality: "many";
2497
+ }];
2498
+ recipients: [{
2499
+ readonly sourceField: string[];
2500
+ readonly destField: ("type" | "id" | "emailAddress" | "draftId")[];
2501
+ readonly destSchema: "draftRecipient";
2502
+ readonly cardinality: "many";
2503
+ }];
2504
+ user: [{
2505
+ readonly sourceField: string[];
2506
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
2507
+ readonly destSchema: "user";
2508
+ readonly cardinality: "one";
2509
+ }];
2510
+ };
2511
+ readonly draftRecipient: {
2512
+ draft: [{
2513
+ readonly sourceField: string[];
2514
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
2515
+ readonly destSchema: "draft";
2516
+ readonly cardinality: "one";
2517
+ }];
2518
+ };
2519
+ readonly draftAttachment: {
2520
+ draft: [{
2521
+ readonly sourceField: string[];
2522
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
2523
+ readonly destSchema: "draft";
2524
+ readonly cardinality: "one";
2525
+ }];
2526
+ };
2527
+ readonly thread: {
2528
+ account: [{
2529
+ readonly sourceField: string[];
2530
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
2531
+ readonly destSchema: "account";
2532
+ readonly cardinality: "one";
2533
+ }];
2534
+ labels: [{
2535
+ readonly sourceField: string[];
2536
+ readonly destField: ("threadId" | "labelId")[];
2537
+ readonly destSchema: "threadLabel";
2538
+ readonly cardinality: "many";
2539
+ }, {
2540
+ readonly sourceField: string[];
2541
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
2542
+ readonly destSchema: "accountLabel";
2543
+ readonly cardinality: "many";
2544
+ }];
2545
+ messages: [{
2546
+ readonly sourceField: string[];
2547
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
2548
+ readonly destSchema: "threadMessage";
2549
+ readonly cardinality: "many";
2550
+ }];
2551
+ user: [{
2552
+ readonly sourceField: string[];
2553
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
2554
+ readonly destSchema: "user";
2555
+ readonly cardinality: "one";
2556
+ }];
2557
+ };
2558
+ readonly threadLabel: {
2559
+ label: [{
2560
+ readonly sourceField: string[];
2561
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
2562
+ readonly destSchema: "accountLabel";
2563
+ readonly cardinality: "one";
2564
+ }];
2565
+ thread: [{
2566
+ readonly sourceField: string[];
2567
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
2568
+ readonly destSchema: "thread";
2569
+ readonly cardinality: "one";
2570
+ }];
2571
+ };
2572
+ readonly threadMessage: {
2573
+ attachments: [{
2574
+ readonly sourceField: string[];
2575
+ readonly destField: ("status" | "id" | "fileName" | "mimeType" | "threadMessageId" | "size")[];
2576
+ readonly destSchema: "threadMessageAttachment";
2577
+ readonly cardinality: "many";
2578
+ }];
2579
+ labels: [{
2580
+ readonly sourceField: string[];
2581
+ readonly destField: ("labelId" | "threadMessageId")[];
2582
+ readonly destSchema: "threadMessageLabel";
2583
+ readonly cardinality: "many";
2584
+ }, {
2585
+ readonly sourceField: string[];
2586
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
2587
+ readonly destSchema: "accountLabel";
2588
+ readonly cardinality: "many";
2589
+ }];
2590
+ recipients: [{
2591
+ readonly sourceField: string[];
2592
+ readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
2593
+ readonly destSchema: "threadMessageRecipient";
2594
+ readonly cardinality: "many";
2595
+ }];
2596
+ thread: [{
2597
+ readonly sourceField: string[];
2598
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
2599
+ readonly destSchema: "thread";
2600
+ readonly cardinality: "one";
2601
+ }];
2602
+ };
2603
+ readonly threadMessageRecipient: {
2604
+ message: [{
2605
+ readonly sourceField: string[];
2606
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
2607
+ readonly destSchema: "threadMessage";
2608
+ readonly cardinality: "one";
2609
+ }];
2610
+ };
2611
+ readonly threadMessageAttachment: {
2612
+ message: [{
2613
+ readonly sourceField: string[];
2614
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
2615
+ readonly destSchema: "threadMessage";
2616
+ readonly cardinality: "one";
2617
+ }];
2618
+ };
2619
+ readonly threadMessageLabel: {
2620
+ label: [{
2621
+ readonly sourceField: string[];
2622
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
2623
+ readonly destSchema: "accountLabel";
2624
+ readonly cardinality: "one";
2625
+ }];
2626
+ message: [{
2627
+ readonly sourceField: string[];
2628
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
2629
+ readonly destSchema: "threadMessage";
2630
+ readonly cardinality: "one";
2631
+ }];
2632
+ };
2633
+ };
2634
+ enableLegacyQueries: boolean | undefined;
2635
+ enableLegacyMutators: false;
2636
+ }, "draft", {
2637
+ readonly accountId: string;
2638
+ readonly body: {
2639
+ content: string;
2640
+ to: string[];
2641
+ cc: string[];
2642
+ bcc: string[];
2643
+ };
2644
+ readonly error: string | null;
2645
+ readonly fromAliasId: string | null;
2646
+ readonly fromEmail: string;
2647
+ readonly fromName: string | null;
2648
+ readonly id: string;
2649
+ readonly referencedMessageId: string | null;
2650
+ readonly scheduledFor: number | null;
2651
+ readonly status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
2652
+ readonly subject: string | null;
2653
+ readonly type: "NEW" | "REPLY" | "FORWARD";
2654
+ readonly updatedAt: number;
2655
+ readonly userId: string;
2656
+ } & {
2657
+ readonly account: ({
2658
+ readonly color: string;
2659
+ readonly displayName: string | null;
2660
+ readonly id: string;
2661
+ readonly imapConnectionStatus: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
2662
+ readonly mailProcessedCount: number;
2663
+ readonly mailTotalCount: number;
2664
+ readonly primaryAliasId: string | null;
2665
+ readonly userId: string;
2666
+ } & {
2667
+ readonly aliases: readonly {
2668
+ readonly accountId: string;
2669
+ readonly emailAddress: string;
2670
+ readonly id: string;
2671
+ readonly isPrimary: boolean;
2672
+ readonly name: string | null;
2673
+ }[];
2674
+ }) | undefined;
2675
+ } & {
2676
+ readonly recipients: readonly {
2677
+ readonly draftId: string;
2678
+ readonly emailAddress: string;
2679
+ readonly id: string;
2680
+ readonly type: "bcc" | "cc" | "to";
2681
+ }[];
2682
+ } & {
2683
+ readonly attachments: readonly {
2684
+ readonly draftId: string;
2685
+ readonly failed: boolean;
2686
+ readonly fileName: string;
2687
+ readonly id: string;
2688
+ readonly mimeType: string;
2689
+ readonly totalChunks: number;
2690
+ readonly totalSize: number;
2691
+ readonly uploadedChunks: number;
2692
+ }[];
2693
+ } & {
2694
+ readonly user: {
2695
+ readonly id: string;
2696
+ readonly name: string | null;
2697
+ readonly profilePicture: string | null;
2698
+ readonly undoSendEnabled: boolean;
2699
+ } | undefined;
2700
+ }>>;
2701
+ readonly getThreads: import("@rocicorp/zero").SyncedQuery<"getThreads", import("..").MarcoSyncedQueryContext, true, [{
2702
+ limit?: number;
2703
+ search?: string;
2704
+ where?: {
2705
+ flagged?: boolean;
2706
+ labelIds?: string[];
2707
+ messageIds?: string[];
2708
+ participants?: string[];
2709
+ seen?: boolean;
2710
+ };
2711
+ }], import("@rocicorp/zero").Query<{
2712
+ tables: {
2713
+ readonly user: {
2714
+ name: "user";
2715
+ columns: {
2716
+ readonly id: {
2717
+ type: "string";
2718
+ optional: false;
2719
+ customType: string;
2720
+ };
2721
+ readonly name: Omit<{
2722
+ type: "string";
2723
+ optional: false;
2724
+ customType: string;
2725
+ }, "optional"> & {
2726
+ optional: true;
2727
+ };
2728
+ readonly profilePicture: Omit<{
2729
+ type: "string";
2730
+ optional: false;
2731
+ customType: string;
2732
+ }, "optional"> & {
2733
+ optional: true;
2734
+ };
2735
+ readonly undoSendEnabled: {
2736
+ type: "boolean";
2737
+ optional: false;
2738
+ customType: boolean;
2739
+ };
2740
+ };
2741
+ primaryKey: readonly [string, ...string[]];
2742
+ } & {
2743
+ primaryKey: ["id"];
2744
+ };
2745
+ readonly userPushNotificationToken: {
2746
+ name: "userPushNotificationToken";
2747
+ columns: {
2748
+ readonly createdAt: {
2749
+ type: "number";
2750
+ optional: false;
2751
+ customType: number;
2752
+ };
2753
+ readonly id: {
2754
+ type: "string";
2755
+ optional: false;
2756
+ customType: string;
2757
+ };
2758
+ readonly token: {
2759
+ type: "string";
2760
+ optional: false;
2761
+ customType: string;
2762
+ };
2763
+ readonly userId: {
2764
+ type: "string";
2765
+ optional: false;
2766
+ customType: string;
2767
+ };
2768
+ };
2769
+ primaryKey: readonly [string, ...string[]];
2770
+ } & {
2771
+ primaryKey: ["id"];
2772
+ };
2773
+ readonly contact: {
2774
+ name: "contact";
2775
+ columns: {
2776
+ readonly emailAddress: {
2777
+ type: "string";
2778
+ optional: false;
2779
+ customType: string;
2780
+ };
2781
+ readonly id: {
2782
+ type: "string";
2783
+ optional: false;
2784
+ customType: string;
2785
+ };
2786
+ readonly name: Omit<{
2787
+ type: "string";
2788
+ optional: false;
2789
+ customType: string;
2790
+ }, "optional"> & {
2791
+ optional: true;
2792
+ };
2793
+ readonly userId: {
2794
+ type: "string";
2795
+ optional: false;
2796
+ customType: string;
2797
+ };
2798
+ };
2799
+ primaryKey: readonly [string, ...string[]];
2800
+ } & {
2801
+ primaryKey: ["id"];
2802
+ };
2803
+ readonly account: {
2804
+ name: "account";
2805
+ columns: {
2806
+ readonly color: {
2807
+ type: "string";
2808
+ optional: false;
2809
+ customType: string;
2810
+ };
2811
+ readonly displayName: Omit<{
2812
+ type: "string";
2813
+ optional: false;
2814
+ customType: string;
2815
+ }, "optional"> & {
2816
+ optional: true;
2817
+ };
2818
+ readonly id: {
2819
+ type: "string";
2820
+ optional: false;
2821
+ customType: string;
2822
+ };
2823
+ readonly imapConnectionStatus: {
2824
+ type: "string";
2825
+ optional: false;
2826
+ customType: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
2827
+ };
2828
+ readonly mailProcessedCount: {
2829
+ type: "number";
2830
+ optional: false;
2831
+ customType: number;
2832
+ };
2833
+ readonly mailTotalCount: {
2834
+ type: "number";
2835
+ optional: false;
2836
+ customType: number;
2837
+ };
2838
+ readonly primaryAliasId: Omit<{
2839
+ type: "string";
2840
+ optional: false;
2841
+ customType: string;
2842
+ }, "optional"> & {
2843
+ optional: true;
2844
+ };
2845
+ readonly userId: {
2846
+ type: "string";
2847
+ optional: false;
2848
+ customType: string;
2849
+ };
2850
+ };
2851
+ primaryKey: readonly [string, ...string[]];
2852
+ } & {
2853
+ primaryKey: ["id"];
2854
+ };
2855
+ readonly accountAlias: {
2856
+ name: "accountAlias";
2857
+ columns: {
2858
+ readonly accountId: {
2859
+ type: "string";
2860
+ optional: false;
2861
+ customType: string;
2862
+ };
2863
+ readonly emailAddress: {
2864
+ type: "string";
2865
+ optional: false;
2866
+ customType: string;
2867
+ };
2868
+ readonly id: {
2869
+ type: "string";
2870
+ optional: false;
2871
+ customType: string;
2872
+ };
2873
+ readonly isPrimary: {
2874
+ type: "boolean";
2875
+ optional: false;
2876
+ customType: boolean;
2877
+ };
2878
+ readonly name: Omit<{
2879
+ type: "string";
2880
+ optional: false;
2881
+ customType: string;
2882
+ }, "optional"> & {
2883
+ optional: true;
2884
+ };
2885
+ };
2886
+ primaryKey: readonly [string, ...string[]];
2887
+ } & {
2888
+ primaryKey: ["id"];
2889
+ };
2890
+ readonly accountLabel: {
2891
+ name: "accountLabel";
2892
+ columns: {
2893
+ readonly accountId: {
2894
+ type: "string";
2895
+ optional: false;
2896
+ customType: string;
2897
+ };
2898
+ readonly id: {
2899
+ type: "string";
2900
+ optional: false;
2901
+ customType: string;
2902
+ };
2903
+ readonly path: {
2904
+ type: "string";
2905
+ optional: false;
2906
+ customType: string;
2907
+ };
2908
+ readonly specialUse: Omit<{
2909
+ type: "string";
2910
+ optional: false;
2911
+ customType: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH";
2912
+ }, "optional"> & {
2913
+ optional: true;
2914
+ };
2915
+ };
2916
+ primaryKey: readonly [string, ...string[]];
2917
+ } & {
2918
+ primaryKey: ["id"];
2919
+ };
2920
+ readonly draft: {
2921
+ name: "draft";
2922
+ columns: {
2923
+ readonly accountId: {
2924
+ type: "string";
2925
+ optional: false;
2926
+ customType: string;
2927
+ };
2928
+ readonly body: {
2929
+ type: "json";
2930
+ optional: false;
2931
+ customType: {
2932
+ content: string;
2933
+ to: string[];
2934
+ cc: string[];
2935
+ bcc: string[];
2936
+ };
2937
+ };
2938
+ readonly error: Omit<{
2939
+ type: "string";
2940
+ optional: false;
2941
+ customType: string;
2942
+ }, "optional"> & {
2943
+ optional: true;
2944
+ };
2945
+ readonly fromAliasId: Omit<{
2946
+ type: "string";
2947
+ optional: false;
2948
+ customType: string;
2949
+ }, "optional"> & {
2950
+ optional: true;
2951
+ };
2952
+ readonly fromEmail: {
2953
+ type: "string";
2954
+ optional: false;
2955
+ customType: string;
2956
+ };
2957
+ readonly fromName: Omit<{
2958
+ type: "string";
2959
+ optional: false;
2960
+ customType: string;
2961
+ }, "optional"> & {
2962
+ optional: true;
2963
+ };
2964
+ readonly id: {
2965
+ type: "string";
2966
+ optional: false;
2967
+ customType: string;
2968
+ };
2969
+ readonly referencedMessageId: Omit<{
2970
+ type: "string";
2971
+ optional: false;
2972
+ customType: string;
2973
+ }, "optional"> & {
2974
+ optional: true;
2975
+ };
2976
+ readonly scheduledFor: Omit<{
2977
+ type: "number";
2978
+ optional: false;
2979
+ customType: number;
2980
+ }, "optional"> & {
2981
+ optional: true;
2982
+ };
2983
+ readonly status: {
2984
+ type: "string";
2985
+ optional: false;
2986
+ customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
2987
+ };
2988
+ readonly subject: Omit<{
2989
+ type: "string";
2990
+ optional: false;
2991
+ customType: string;
2992
+ }, "optional"> & {
2993
+ optional: true;
2994
+ };
2995
+ readonly type: {
2996
+ type: "string";
2997
+ optional: false;
2998
+ customType: "NEW" | "REPLY" | "FORWARD";
2999
+ };
3000
+ readonly updatedAt: {
3001
+ type: "number";
3002
+ optional: false;
3003
+ customType: number;
3004
+ };
3005
+ readonly userId: {
3006
+ type: "string";
3007
+ optional: false;
3008
+ customType: string;
3009
+ };
3010
+ };
3011
+ primaryKey: readonly [string, ...string[]];
3012
+ } & {
3013
+ primaryKey: ["id"];
3014
+ };
3015
+ readonly draftRecipient: {
3016
+ name: "draftRecipient";
3017
+ columns: {
3018
+ readonly draftId: {
3019
+ type: "string";
3020
+ optional: false;
3021
+ customType: string;
3022
+ };
3023
+ readonly emailAddress: {
3024
+ type: "string";
3025
+ optional: false;
3026
+ customType: string;
3027
+ };
3028
+ readonly id: {
3029
+ type: "string";
3030
+ optional: false;
3031
+ customType: string;
3032
+ };
3033
+ readonly type: {
3034
+ type: "string";
3035
+ optional: false;
3036
+ customType: "bcc" | "cc" | "to";
3037
+ };
3038
+ };
3039
+ primaryKey: readonly [string, ...string[]];
3040
+ } & {
3041
+ primaryKey: ["id"];
3042
+ };
3043
+ readonly draftAttachment: {
3044
+ name: "draftAttachment";
3045
+ columns: {
3046
+ readonly draftId: {
3047
+ type: "string";
3048
+ optional: false;
3049
+ customType: string;
3050
+ };
3051
+ readonly failed: {
3052
+ type: "boolean";
3053
+ optional: false;
3054
+ customType: boolean;
3055
+ };
3056
+ readonly fileName: {
3057
+ type: "string";
3058
+ optional: false;
3059
+ customType: string;
3060
+ };
3061
+ readonly id: {
3062
+ type: "string";
3063
+ optional: false;
3064
+ customType: string;
3065
+ };
3066
+ readonly mimeType: {
3067
+ type: "string";
3068
+ optional: false;
3069
+ customType: string;
3070
+ };
3071
+ readonly totalChunks: {
3072
+ type: "number";
3073
+ optional: false;
3074
+ customType: number;
3075
+ };
3076
+ readonly totalSize: {
3077
+ type: "number";
3078
+ optional: false;
3079
+ customType: number;
3080
+ };
3081
+ readonly uploadedChunks: {
3082
+ type: "number";
3083
+ optional: false;
3084
+ customType: number;
3085
+ };
3086
+ };
3087
+ primaryKey: readonly [string, ...string[]];
3088
+ } & {
3089
+ primaryKey: ["id"];
3090
+ };
3091
+ readonly thread: {
3092
+ name: "thread";
3093
+ columns: {
3094
+ readonly accountId: {
3095
+ type: "string";
3096
+ optional: false;
3097
+ customType: string;
3098
+ };
3099
+ readonly flagged: {
3100
+ type: "boolean";
3101
+ optional: false;
3102
+ customType: boolean;
3103
+ };
3104
+ readonly id: {
3105
+ type: "string";
3106
+ optional: false;
3107
+ customType: string;
3108
+ };
3109
+ readonly latestMessageDate: {
3110
+ type: "number";
3111
+ optional: false;
3112
+ customType: number;
3113
+ };
3114
+ readonly seen: {
3115
+ type: "boolean";
3116
+ optional: false;
3117
+ customType: boolean;
3118
+ };
3119
+ readonly userId: {
3120
+ type: "string";
3121
+ optional: false;
3122
+ customType: string;
3123
+ };
3124
+ readonly words: {
3125
+ type: "string";
3126
+ optional: false;
3127
+ customType: string;
3128
+ };
3129
+ };
3130
+ primaryKey: readonly [string, ...string[]];
3131
+ } & {
3132
+ primaryKey: ["id"];
3133
+ };
3134
+ readonly threadLabel: {
3135
+ name: "threadLabel";
3136
+ columns: {
3137
+ readonly labelId: {
3138
+ type: "string";
3139
+ optional: false;
3140
+ customType: string;
3141
+ };
3142
+ readonly threadId: {
3143
+ type: "string";
3144
+ optional: false;
3145
+ customType: string;
3146
+ };
3147
+ };
3148
+ primaryKey: readonly [string, ...string[]];
3149
+ } & {
3150
+ primaryKey: ["threadId", "labelId"];
3151
+ };
3152
+ readonly threadMessage: {
3153
+ name: "threadMessage";
3154
+ columns: {
3155
+ readonly envelopeDate: {
3156
+ type: "number";
3157
+ optional: false;
3158
+ customType: number;
3159
+ };
3160
+ readonly envelopeSubject: Omit<{
3161
+ type: "string";
3162
+ optional: false;
3163
+ customType: string;
3164
+ }, "optional"> & {
3165
+ optional: true;
3166
+ };
3167
+ readonly id: {
3168
+ type: "string";
3169
+ optional: false;
3170
+ customType: string;
3171
+ };
3172
+ readonly previewText: {
3173
+ type: "string";
3174
+ optional: false;
3175
+ customType: string;
3176
+ };
3177
+ readonly senderEmail: {
3178
+ type: "string";
3179
+ optional: false;
3180
+ customType: string;
3181
+ };
3182
+ readonly senderName: Omit<{
3183
+ type: "string";
3184
+ optional: false;
3185
+ customType: string;
3186
+ }, "optional"> & {
3187
+ optional: true;
3188
+ };
3189
+ readonly threadId: {
3190
+ type: "string";
3191
+ optional: false;
3192
+ customType: string;
3193
+ };
3194
+ };
3195
+ primaryKey: readonly [string, ...string[]];
3196
+ } & {
3197
+ primaryKey: ["id"];
3198
+ };
3199
+ readonly threadMessageRecipient: {
3200
+ name: "threadMessageRecipient";
3201
+ columns: {
3202
+ readonly emailAddress: {
3203
+ type: "string";
3204
+ optional: false;
3205
+ customType: string;
3206
+ };
3207
+ readonly id: {
3208
+ type: "string";
3209
+ optional: false;
3210
+ customType: string;
3211
+ };
3212
+ readonly name: Omit<{
3213
+ type: "string";
3214
+ optional: false;
3215
+ customType: string;
3216
+ }, "optional"> & {
3217
+ optional: true;
3218
+ };
3219
+ readonly threadMessageId: {
3220
+ type: "string";
3221
+ optional: false;
3222
+ customType: string;
3223
+ };
3224
+ readonly type: {
3225
+ type: "string";
3226
+ optional: false;
3227
+ customType: "bcc" | "cc" | "to" | "replyTo";
3228
+ };
3229
+ };
3230
+ primaryKey: readonly [string, ...string[]];
3231
+ } & {
3232
+ primaryKey: ["id"];
3233
+ };
3234
+ readonly threadMessageAttachment: {
3235
+ name: "threadMessageAttachment";
3236
+ columns: {
3237
+ readonly fileName: {
3238
+ type: "string";
3239
+ optional: false;
3240
+ customType: string;
3241
+ };
3242
+ readonly id: {
3243
+ type: "string";
3244
+ optional: false;
3245
+ customType: string;
3246
+ };
3247
+ readonly mimeType: {
3248
+ type: "string";
3249
+ optional: false;
3250
+ customType: string;
3251
+ };
3252
+ readonly size: {
3253
+ type: "number";
3254
+ optional: false;
3255
+ customType: number;
3256
+ };
3257
+ readonly status: {
3258
+ type: "string";
3259
+ optional: false;
3260
+ customType: "NOT_DOWNLOADED" | "DOWNLOAD_REQUESTED" | "DOWNLOADED" | "DOWNLOAD_FAILED";
3261
+ };
3262
+ readonly threadMessageId: {
3263
+ type: "string";
3264
+ optional: false;
3265
+ customType: string;
3266
+ };
3267
+ };
3268
+ primaryKey: readonly [string, ...string[]];
3269
+ } & {
3270
+ primaryKey: ["id"];
3271
+ };
3272
+ readonly threadMessageLabel: {
3273
+ name: "threadMessageLabel";
3274
+ columns: {
3275
+ readonly labelId: {
3276
+ type: "string";
3277
+ optional: false;
3278
+ customType: string;
3279
+ };
3280
+ readonly threadMessageId: {
3281
+ type: "string";
3282
+ optional: false;
3283
+ customType: string;
3284
+ };
3285
+ };
3286
+ primaryKey: readonly [string, ...string[]];
3287
+ } & {
3288
+ primaryKey: ["threadMessageId", "labelId"];
3289
+ };
3290
+ };
3291
+ relationships: {
3292
+ readonly user: {
3293
+ accounts: [{
3294
+ readonly sourceField: string[];
3295
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
3296
+ readonly destSchema: "account";
3297
+ readonly cardinality: "many";
3298
+ }];
3299
+ contacts: [{
3300
+ readonly sourceField: string[];
3301
+ readonly destField: ("id" | "name" | "emailAddress" | "userId")[];
3302
+ readonly destSchema: "contact";
3303
+ readonly cardinality: "many";
3304
+ }];
3305
+ drafts: [{
3306
+ readonly sourceField: string[];
3307
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
3308
+ readonly destSchema: "draft";
3309
+ readonly cardinality: "many";
3310
+ }];
3311
+ pushNotificationTokens: [{
3312
+ readonly sourceField: string[];
3313
+ readonly destField: ("createdAt" | "id" | "token" | "userId")[];
3314
+ readonly destSchema: "userPushNotificationToken";
3315
+ readonly cardinality: "many";
3316
+ }];
3317
+ threads: [{
3318
+ readonly sourceField: string[];
3319
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
3320
+ readonly destSchema: "thread";
3321
+ readonly cardinality: "many";
3322
+ }];
3323
+ };
3324
+ readonly userPushNotificationToken: {
3325
+ user: [{
3326
+ readonly sourceField: string[];
3327
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
3328
+ readonly destSchema: "user";
3329
+ readonly cardinality: "one";
3330
+ }];
3331
+ };
3332
+ readonly contact: {
3333
+ user: [{
3334
+ readonly sourceField: string[];
3335
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
3336
+ readonly destSchema: "user";
3337
+ readonly cardinality: "one";
3338
+ }];
3339
+ };
3340
+ readonly account: {
3341
+ aliases: [{
3342
+ readonly sourceField: string[];
3343
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
3344
+ readonly destSchema: "accountAlias";
3345
+ readonly cardinality: "many";
3346
+ }];
3347
+ drafts: [{
3348
+ readonly sourceField: string[];
3349
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
3350
+ readonly destSchema: "draft";
3351
+ readonly cardinality: "many";
3352
+ }];
3353
+ labels: [{
3354
+ readonly sourceField: string[];
3355
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
3356
+ readonly destSchema: "accountLabel";
3357
+ readonly cardinality: "many";
3358
+ }];
3359
+ primaryAlias: [{
3360
+ readonly sourceField: string[];
3361
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
3362
+ readonly destSchema: "accountAlias";
3363
+ readonly cardinality: "one";
3364
+ }];
3365
+ threads: [{
3366
+ readonly sourceField: string[];
3367
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
3368
+ readonly destSchema: "thread";
3369
+ readonly cardinality: "many";
3370
+ }];
3371
+ user: [{
3372
+ readonly sourceField: string[];
3373
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
3374
+ readonly destSchema: "user";
3375
+ readonly cardinality: "one";
3376
+ }];
3377
+ };
3378
+ readonly accountAlias: {
3379
+ account: [{
3380
+ readonly sourceField: string[];
3381
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
3382
+ readonly destSchema: "account";
3383
+ readonly cardinality: "one";
3384
+ }];
3385
+ };
3386
+ readonly accountLabel: {
3387
+ account: [{
3388
+ readonly sourceField: string[];
3389
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
3390
+ readonly destSchema: "account";
3391
+ readonly cardinality: "one";
3392
+ }];
3393
+ threadMessages: [{
3394
+ readonly sourceField: string[];
3395
+ readonly destField: ("labelId" | "threadMessageId")[];
3396
+ readonly destSchema: "threadMessageLabel";
3397
+ readonly cardinality: "many";
3398
+ }, {
3399
+ readonly sourceField: string[];
3400
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
3401
+ readonly destSchema: "threadMessage";
3402
+ readonly cardinality: "many";
3403
+ }];
3404
+ threads: [{
3405
+ readonly sourceField: string[];
3406
+ readonly destField: ("threadId" | "labelId")[];
3407
+ readonly destSchema: "threadLabel";
3408
+ readonly cardinality: "many";
3409
+ }, {
3410
+ readonly sourceField: string[];
3411
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
3412
+ readonly destSchema: "thread";
3413
+ readonly cardinality: "many";
3414
+ }];
3415
+ };
3416
+ readonly draft: {
3417
+ account: [{
3418
+ readonly sourceField: string[];
3419
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
3420
+ readonly destSchema: "account";
3421
+ readonly cardinality: "one";
3422
+ }];
3423
+ attachments: [{
3424
+ readonly sourceField: string[];
3425
+ readonly destField: ("id" | "failed" | "fileName" | "mimeType" | "totalChunks" | "totalSize" | "uploadedChunks" | "draftId")[];
3426
+ readonly destSchema: "draftAttachment";
3427
+ readonly cardinality: "many";
3428
+ }];
3429
+ recipients: [{
3430
+ readonly sourceField: string[];
3431
+ readonly destField: ("type" | "id" | "emailAddress" | "draftId")[];
3432
+ readonly destSchema: "draftRecipient";
3433
+ readonly cardinality: "many";
3434
+ }];
3435
+ user: [{
3436
+ readonly sourceField: string[];
3437
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
3438
+ readonly destSchema: "user";
3439
+ readonly cardinality: "one";
3440
+ }];
3441
+ };
3442
+ readonly draftRecipient: {
3443
+ draft: [{
3444
+ readonly sourceField: string[];
3445
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
3446
+ readonly destSchema: "draft";
3447
+ readonly cardinality: "one";
3448
+ }];
3449
+ };
3450
+ readonly draftAttachment: {
3451
+ draft: [{
3452
+ readonly sourceField: string[];
3453
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
3454
+ readonly destSchema: "draft";
3455
+ readonly cardinality: "one";
3456
+ }];
3457
+ };
3458
+ readonly thread: {
3459
+ account: [{
3460
+ readonly sourceField: string[];
3461
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
3462
+ readonly destSchema: "account";
3463
+ readonly cardinality: "one";
3464
+ }];
3465
+ labels: [{
3466
+ readonly sourceField: string[];
3467
+ readonly destField: ("threadId" | "labelId")[];
3468
+ readonly destSchema: "threadLabel";
3469
+ readonly cardinality: "many";
3470
+ }, {
3471
+ readonly sourceField: string[];
3472
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
3473
+ readonly destSchema: "accountLabel";
3474
+ readonly cardinality: "many";
3475
+ }];
3476
+ messages: [{
3477
+ readonly sourceField: string[];
3478
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
3479
+ readonly destSchema: "threadMessage";
3480
+ readonly cardinality: "many";
3481
+ }];
3482
+ user: [{
3483
+ readonly sourceField: string[];
3484
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
3485
+ readonly destSchema: "user";
3486
+ readonly cardinality: "one";
3487
+ }];
3488
+ };
3489
+ readonly threadLabel: {
3490
+ label: [{
3491
+ readonly sourceField: string[];
3492
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
3493
+ readonly destSchema: "accountLabel";
3494
+ readonly cardinality: "one";
3495
+ }];
3496
+ thread: [{
3497
+ readonly sourceField: string[];
3498
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
3499
+ readonly destSchema: "thread";
3500
+ readonly cardinality: "one";
3501
+ }];
3502
+ };
3503
+ readonly threadMessage: {
3504
+ attachments: [{
3505
+ readonly sourceField: string[];
3506
+ readonly destField: ("status" | "id" | "fileName" | "mimeType" | "threadMessageId" | "size")[];
3507
+ readonly destSchema: "threadMessageAttachment";
3508
+ readonly cardinality: "many";
3509
+ }];
3510
+ labels: [{
3511
+ readonly sourceField: string[];
3512
+ readonly destField: ("labelId" | "threadMessageId")[];
3513
+ readonly destSchema: "threadMessageLabel";
3514
+ readonly cardinality: "many";
3515
+ }, {
3516
+ readonly sourceField: string[];
3517
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
3518
+ readonly destSchema: "accountLabel";
3519
+ readonly cardinality: "many";
3520
+ }];
3521
+ recipients: [{
3522
+ readonly sourceField: string[];
3523
+ readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
3524
+ readonly destSchema: "threadMessageRecipient";
3525
+ readonly cardinality: "many";
3526
+ }];
3527
+ thread: [{
3528
+ readonly sourceField: string[];
3529
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
3530
+ readonly destSchema: "thread";
3531
+ readonly cardinality: "one";
3532
+ }];
3533
+ };
3534
+ readonly threadMessageRecipient: {
3535
+ message: [{
3536
+ readonly sourceField: string[];
3537
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
3538
+ readonly destSchema: "threadMessage";
3539
+ readonly cardinality: "one";
3540
+ }];
3541
+ };
3542
+ readonly threadMessageAttachment: {
3543
+ message: [{
3544
+ readonly sourceField: string[];
3545
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
3546
+ readonly destSchema: "threadMessage";
3547
+ readonly cardinality: "one";
3548
+ }];
3549
+ };
3550
+ readonly threadMessageLabel: {
3551
+ label: [{
3552
+ readonly sourceField: string[];
3553
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
3554
+ readonly destSchema: "accountLabel";
3555
+ readonly cardinality: "one";
3556
+ }];
3557
+ message: [{
3558
+ readonly sourceField: string[];
3559
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
3560
+ readonly destSchema: "threadMessage";
3561
+ readonly cardinality: "one";
3562
+ }];
3563
+ };
3564
+ };
3565
+ enableLegacyQueries: boolean | undefined;
3566
+ enableLegacyMutators: false;
3567
+ }, "thread", {
3568
+ readonly accountId: string;
3569
+ readonly flagged: boolean;
3570
+ readonly id: string;
3571
+ readonly latestMessageDate: number;
3572
+ readonly seen: boolean;
3573
+ readonly userId: string;
3574
+ readonly words: string;
3575
+ } & {
3576
+ readonly messages: readonly ({
3577
+ readonly envelopeDate: number;
3578
+ readonly envelopeSubject: string | null;
3579
+ readonly id: string;
3580
+ readonly previewText: string;
3581
+ readonly senderEmail: string;
3582
+ readonly senderName: string | null;
3583
+ readonly threadId: string;
3584
+ } & {
3585
+ readonly recipients: readonly {
3586
+ readonly emailAddress: string;
3587
+ readonly id: string;
3588
+ readonly name: string | null;
3589
+ readonly threadMessageId: string;
3590
+ readonly type: "bcc" | "cc" | "to" | "replyTo";
3591
+ }[];
3592
+ } & {
3593
+ readonly attachments: readonly {
3594
+ readonly fileName: string;
3595
+ readonly id: string;
3596
+ readonly mimeType: string;
3597
+ readonly size: number;
3598
+ readonly status: "NOT_DOWNLOADED" | "DOWNLOAD_REQUESTED" | "DOWNLOADED" | "DOWNLOAD_FAILED";
3599
+ readonly threadMessageId: string;
3600
+ }[];
3601
+ } & {
3602
+ readonly labels: readonly {
3603
+ readonly accountId: string;
3604
+ readonly id: string;
3605
+ readonly path: string;
3606
+ readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
3607
+ }[];
3608
+ })[];
3609
+ } & {
3610
+ readonly labels: readonly {
3611
+ readonly accountId: string;
3612
+ readonly id: string;
3613
+ readonly path: string;
3614
+ readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
3615
+ }[];
3616
+ } & {
3617
+ readonly account: {
3618
+ readonly color: string;
3619
+ readonly displayName: string | null;
3620
+ readonly id: string;
3621
+ readonly imapConnectionStatus: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
3622
+ readonly mailProcessedCount: number;
3623
+ readonly mailTotalCount: number;
3624
+ readonly primaryAliasId: string | null;
3625
+ readonly userId: string;
3626
+ } | undefined;
3627
+ }>>;
3628
+ readonly getUser: import("@rocicorp/zero").SyncedQuery<"getUser", import("..").MarcoSyncedQueryContext, true, [], import("@rocicorp/zero").Query<{
3629
+ tables: {
3630
+ readonly user: {
3631
+ name: "user";
3632
+ columns: {
3633
+ readonly id: {
3634
+ type: "string";
3635
+ optional: false;
3636
+ customType: string;
3637
+ };
3638
+ readonly name: Omit<{
3639
+ type: "string";
3640
+ optional: false;
3641
+ customType: string;
3642
+ }, "optional"> & {
3643
+ optional: true;
3644
+ };
3645
+ readonly profilePicture: Omit<{
3646
+ type: "string";
3647
+ optional: false;
3648
+ customType: string;
3649
+ }, "optional"> & {
3650
+ optional: true;
3651
+ };
3652
+ readonly undoSendEnabled: {
3653
+ type: "boolean";
3654
+ optional: false;
3655
+ customType: boolean;
3656
+ };
3657
+ };
3658
+ primaryKey: readonly [string, ...string[]];
3659
+ } & {
3660
+ primaryKey: ["id"];
3661
+ };
3662
+ readonly userPushNotificationToken: {
3663
+ name: "userPushNotificationToken";
3664
+ columns: {
3665
+ readonly createdAt: {
3666
+ type: "number";
3667
+ optional: false;
3668
+ customType: number;
3669
+ };
3670
+ readonly id: {
3671
+ type: "string";
3672
+ optional: false;
3673
+ customType: string;
3674
+ };
3675
+ readonly token: {
3676
+ type: "string";
3677
+ optional: false;
3678
+ customType: string;
3679
+ };
3680
+ readonly userId: {
3681
+ type: "string";
3682
+ optional: false;
3683
+ customType: string;
3684
+ };
3685
+ };
3686
+ primaryKey: readonly [string, ...string[]];
3687
+ } & {
3688
+ primaryKey: ["id"];
3689
+ };
3690
+ readonly contact: {
3691
+ name: "contact";
3692
+ columns: {
3693
+ readonly emailAddress: {
3694
+ type: "string";
3695
+ optional: false;
3696
+ customType: string;
3697
+ };
3698
+ readonly id: {
3699
+ type: "string";
3700
+ optional: false;
3701
+ customType: string;
3702
+ };
3703
+ readonly name: Omit<{
3704
+ type: "string";
3705
+ optional: false;
3706
+ customType: string;
3707
+ }, "optional"> & {
3708
+ optional: true;
3709
+ };
3710
+ readonly userId: {
3711
+ type: "string";
3712
+ optional: false;
3713
+ customType: string;
3714
+ };
3715
+ };
3716
+ primaryKey: readonly [string, ...string[]];
3717
+ } & {
3718
+ primaryKey: ["id"];
3719
+ };
3720
+ readonly account: {
3721
+ name: "account";
3722
+ columns: {
3723
+ readonly color: {
3724
+ type: "string";
3725
+ optional: false;
3726
+ customType: string;
3727
+ };
3728
+ readonly displayName: Omit<{
3729
+ type: "string";
3730
+ optional: false;
3731
+ customType: string;
3732
+ }, "optional"> & {
3733
+ optional: true;
3734
+ };
3735
+ readonly id: {
3736
+ type: "string";
3737
+ optional: false;
3738
+ customType: string;
3739
+ };
3740
+ readonly imapConnectionStatus: {
3741
+ type: "string";
3742
+ optional: false;
3743
+ customType: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
3744
+ };
3745
+ readonly mailProcessedCount: {
3746
+ type: "number";
3747
+ optional: false;
3748
+ customType: number;
3749
+ };
3750
+ readonly mailTotalCount: {
3751
+ type: "number";
3752
+ optional: false;
3753
+ customType: number;
3754
+ };
3755
+ readonly primaryAliasId: Omit<{
3756
+ type: "string";
3757
+ optional: false;
3758
+ customType: string;
3759
+ }, "optional"> & {
3760
+ optional: true;
3761
+ };
3762
+ readonly userId: {
3763
+ type: "string";
3764
+ optional: false;
3765
+ customType: string;
3766
+ };
3767
+ };
3768
+ primaryKey: readonly [string, ...string[]];
3769
+ } & {
3770
+ primaryKey: ["id"];
3771
+ };
3772
+ readonly accountAlias: {
3773
+ name: "accountAlias";
3774
+ columns: {
3775
+ readonly accountId: {
3776
+ type: "string";
3777
+ optional: false;
3778
+ customType: string;
3779
+ };
3780
+ readonly emailAddress: {
3781
+ type: "string";
3782
+ optional: false;
3783
+ customType: string;
3784
+ };
3785
+ readonly id: {
3786
+ type: "string";
3787
+ optional: false;
3788
+ customType: string;
3789
+ };
3790
+ readonly isPrimary: {
3791
+ type: "boolean";
3792
+ optional: false;
3793
+ customType: boolean;
3794
+ };
3795
+ readonly name: Omit<{
3796
+ type: "string";
3797
+ optional: false;
3798
+ customType: string;
3799
+ }, "optional"> & {
3800
+ optional: true;
3801
+ };
3802
+ };
3803
+ primaryKey: readonly [string, ...string[]];
3804
+ } & {
3805
+ primaryKey: ["id"];
3806
+ };
3807
+ readonly accountLabel: {
3808
+ name: "accountLabel";
3809
+ columns: {
3810
+ readonly accountId: {
3811
+ type: "string";
3812
+ optional: false;
3813
+ customType: string;
3814
+ };
3815
+ readonly id: {
3816
+ type: "string";
3817
+ optional: false;
3818
+ customType: string;
3819
+ };
3820
+ readonly path: {
3821
+ type: "string";
3822
+ optional: false;
3823
+ customType: string;
3824
+ };
3825
+ readonly specialUse: Omit<{
3826
+ type: "string";
3827
+ optional: false;
3828
+ customType: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH";
3829
+ }, "optional"> & {
3830
+ optional: true;
3831
+ };
3832
+ };
3833
+ primaryKey: readonly [string, ...string[]];
3834
+ } & {
3835
+ primaryKey: ["id"];
3836
+ };
3837
+ readonly draft: {
3838
+ name: "draft";
3839
+ columns: {
3840
+ readonly accountId: {
3841
+ type: "string";
3842
+ optional: false;
3843
+ customType: string;
3844
+ };
3845
+ readonly body: {
3846
+ type: "json";
3847
+ optional: false;
3848
+ customType: {
3849
+ content: string;
3850
+ to: string[];
3851
+ cc: string[];
3852
+ bcc: string[];
3853
+ };
3854
+ };
3855
+ readonly error: Omit<{
3856
+ type: "string";
3857
+ optional: false;
3858
+ customType: string;
3859
+ }, "optional"> & {
3860
+ optional: true;
3861
+ };
3862
+ readonly fromAliasId: Omit<{
3863
+ type: "string";
3864
+ optional: false;
3865
+ customType: string;
3866
+ }, "optional"> & {
3867
+ optional: true;
3868
+ };
3869
+ readonly fromEmail: {
3870
+ type: "string";
3871
+ optional: false;
3872
+ customType: string;
3873
+ };
3874
+ readonly fromName: Omit<{
3875
+ type: "string";
3876
+ optional: false;
3877
+ customType: string;
3878
+ }, "optional"> & {
3879
+ optional: true;
3880
+ };
3881
+ readonly id: {
3882
+ type: "string";
3883
+ optional: false;
3884
+ customType: string;
3885
+ };
3886
+ readonly referencedMessageId: Omit<{
3887
+ type: "string";
3888
+ optional: false;
3889
+ customType: string;
3890
+ }, "optional"> & {
3891
+ optional: true;
3892
+ };
3893
+ readonly scheduledFor: Omit<{
3894
+ type: "number";
3895
+ optional: false;
3896
+ customType: number;
3897
+ }, "optional"> & {
3898
+ optional: true;
3899
+ };
3900
+ readonly status: {
3901
+ type: "string";
3902
+ optional: false;
3903
+ customType: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
3904
+ };
3905
+ readonly subject: Omit<{
3906
+ type: "string";
3907
+ optional: false;
3908
+ customType: string;
3909
+ }, "optional"> & {
3910
+ optional: true;
3911
+ };
3912
+ readonly type: {
3913
+ type: "string";
3914
+ optional: false;
3915
+ customType: "NEW" | "REPLY" | "FORWARD";
3916
+ };
3917
+ readonly updatedAt: {
3918
+ type: "number";
3919
+ optional: false;
3920
+ customType: number;
3921
+ };
3922
+ readonly userId: {
3923
+ type: "string";
3924
+ optional: false;
3925
+ customType: string;
3926
+ };
3927
+ };
3928
+ primaryKey: readonly [string, ...string[]];
3929
+ } & {
3930
+ primaryKey: ["id"];
3931
+ };
3932
+ readonly draftRecipient: {
3933
+ name: "draftRecipient";
3934
+ columns: {
3935
+ readonly draftId: {
3936
+ type: "string";
3937
+ optional: false;
3938
+ customType: string;
3939
+ };
3940
+ readonly emailAddress: {
3941
+ type: "string";
3942
+ optional: false;
3943
+ customType: string;
3944
+ };
3945
+ readonly id: {
3946
+ type: "string";
3947
+ optional: false;
3948
+ customType: string;
3949
+ };
3950
+ readonly type: {
3951
+ type: "string";
3952
+ optional: false;
3953
+ customType: "bcc" | "cc" | "to";
3954
+ };
3955
+ };
3956
+ primaryKey: readonly [string, ...string[]];
3957
+ } & {
3958
+ primaryKey: ["id"];
3959
+ };
3960
+ readonly draftAttachment: {
3961
+ name: "draftAttachment";
3962
+ columns: {
3963
+ readonly draftId: {
3964
+ type: "string";
3965
+ optional: false;
3966
+ customType: string;
3967
+ };
3968
+ readonly failed: {
3969
+ type: "boolean";
3970
+ optional: false;
3971
+ customType: boolean;
3972
+ };
3973
+ readonly fileName: {
3974
+ type: "string";
3975
+ optional: false;
3976
+ customType: string;
3977
+ };
3978
+ readonly id: {
3979
+ type: "string";
3980
+ optional: false;
3981
+ customType: string;
3982
+ };
3983
+ readonly mimeType: {
3984
+ type: "string";
3985
+ optional: false;
3986
+ customType: string;
3987
+ };
3988
+ readonly totalChunks: {
3989
+ type: "number";
3990
+ optional: false;
3991
+ customType: number;
3992
+ };
3993
+ readonly totalSize: {
3994
+ type: "number";
3995
+ optional: false;
3996
+ customType: number;
3997
+ };
3998
+ readonly uploadedChunks: {
3999
+ type: "number";
4000
+ optional: false;
4001
+ customType: number;
4002
+ };
4003
+ };
4004
+ primaryKey: readonly [string, ...string[]];
4005
+ } & {
4006
+ primaryKey: ["id"];
4007
+ };
4008
+ readonly thread: {
4009
+ name: "thread";
4010
+ columns: {
4011
+ readonly accountId: {
4012
+ type: "string";
4013
+ optional: false;
4014
+ customType: string;
4015
+ };
4016
+ readonly flagged: {
4017
+ type: "boolean";
4018
+ optional: false;
4019
+ customType: boolean;
4020
+ };
4021
+ readonly id: {
4022
+ type: "string";
4023
+ optional: false;
4024
+ customType: string;
4025
+ };
4026
+ readonly latestMessageDate: {
4027
+ type: "number";
4028
+ optional: false;
4029
+ customType: number;
4030
+ };
4031
+ readonly seen: {
4032
+ type: "boolean";
4033
+ optional: false;
4034
+ customType: boolean;
4035
+ };
4036
+ readonly userId: {
4037
+ type: "string";
4038
+ optional: false;
4039
+ customType: string;
4040
+ };
4041
+ readonly words: {
4042
+ type: "string";
4043
+ optional: false;
4044
+ customType: string;
4045
+ };
4046
+ };
4047
+ primaryKey: readonly [string, ...string[]];
4048
+ } & {
4049
+ primaryKey: ["id"];
4050
+ };
4051
+ readonly threadLabel: {
4052
+ name: "threadLabel";
4053
+ columns: {
4054
+ readonly labelId: {
4055
+ type: "string";
4056
+ optional: false;
4057
+ customType: string;
4058
+ };
4059
+ readonly threadId: {
4060
+ type: "string";
4061
+ optional: false;
4062
+ customType: string;
4063
+ };
4064
+ };
4065
+ primaryKey: readonly [string, ...string[]];
4066
+ } & {
4067
+ primaryKey: ["threadId", "labelId"];
4068
+ };
4069
+ readonly threadMessage: {
4070
+ name: "threadMessage";
4071
+ columns: {
4072
+ readonly envelopeDate: {
4073
+ type: "number";
4074
+ optional: false;
4075
+ customType: number;
4076
+ };
4077
+ readonly envelopeSubject: Omit<{
4078
+ type: "string";
4079
+ optional: false;
4080
+ customType: string;
4081
+ }, "optional"> & {
4082
+ optional: true;
4083
+ };
4084
+ readonly id: {
4085
+ type: "string";
4086
+ optional: false;
4087
+ customType: string;
4088
+ };
4089
+ readonly previewText: {
4090
+ type: "string";
4091
+ optional: false;
4092
+ customType: string;
4093
+ };
4094
+ readonly senderEmail: {
4095
+ type: "string";
4096
+ optional: false;
4097
+ customType: string;
4098
+ };
4099
+ readonly senderName: Omit<{
4100
+ type: "string";
4101
+ optional: false;
4102
+ customType: string;
4103
+ }, "optional"> & {
4104
+ optional: true;
4105
+ };
4106
+ readonly threadId: {
4107
+ type: "string";
4108
+ optional: false;
4109
+ customType: string;
4110
+ };
4111
+ };
4112
+ primaryKey: readonly [string, ...string[]];
4113
+ } & {
4114
+ primaryKey: ["id"];
4115
+ };
4116
+ readonly threadMessageRecipient: {
4117
+ name: "threadMessageRecipient";
4118
+ columns: {
4119
+ readonly emailAddress: {
4120
+ type: "string";
4121
+ optional: false;
4122
+ customType: string;
4123
+ };
4124
+ readonly id: {
4125
+ type: "string";
4126
+ optional: false;
4127
+ customType: string;
4128
+ };
4129
+ readonly name: Omit<{
4130
+ type: "string";
4131
+ optional: false;
4132
+ customType: string;
4133
+ }, "optional"> & {
4134
+ optional: true;
4135
+ };
4136
+ readonly threadMessageId: {
4137
+ type: "string";
4138
+ optional: false;
4139
+ customType: string;
4140
+ };
4141
+ readonly type: {
4142
+ type: "string";
4143
+ optional: false;
4144
+ customType: "bcc" | "cc" | "to" | "replyTo";
4145
+ };
4146
+ };
4147
+ primaryKey: readonly [string, ...string[]];
4148
+ } & {
4149
+ primaryKey: ["id"];
4150
+ };
4151
+ readonly threadMessageAttachment: {
4152
+ name: "threadMessageAttachment";
4153
+ columns: {
4154
+ readonly fileName: {
4155
+ type: "string";
4156
+ optional: false;
4157
+ customType: string;
4158
+ };
4159
+ readonly id: {
4160
+ type: "string";
4161
+ optional: false;
4162
+ customType: string;
4163
+ };
4164
+ readonly mimeType: {
4165
+ type: "string";
4166
+ optional: false;
4167
+ customType: string;
4168
+ };
4169
+ readonly size: {
4170
+ type: "number";
4171
+ optional: false;
4172
+ customType: number;
4173
+ };
4174
+ readonly status: {
4175
+ type: "string";
4176
+ optional: false;
4177
+ customType: "NOT_DOWNLOADED" | "DOWNLOAD_REQUESTED" | "DOWNLOADED" | "DOWNLOAD_FAILED";
4178
+ };
4179
+ readonly threadMessageId: {
4180
+ type: "string";
4181
+ optional: false;
4182
+ customType: string;
4183
+ };
4184
+ };
4185
+ primaryKey: readonly [string, ...string[]];
4186
+ } & {
4187
+ primaryKey: ["id"];
4188
+ };
4189
+ readonly threadMessageLabel: {
4190
+ name: "threadMessageLabel";
4191
+ columns: {
4192
+ readonly labelId: {
4193
+ type: "string";
4194
+ optional: false;
4195
+ customType: string;
4196
+ };
4197
+ readonly threadMessageId: {
4198
+ type: "string";
4199
+ optional: false;
4200
+ customType: string;
4201
+ };
4202
+ };
4203
+ primaryKey: readonly [string, ...string[]];
4204
+ } & {
4205
+ primaryKey: ["threadMessageId", "labelId"];
4206
+ };
4207
+ };
4208
+ relationships: {
4209
+ readonly user: {
4210
+ accounts: [{
4211
+ readonly sourceField: string[];
4212
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
4213
+ readonly destSchema: "account";
4214
+ readonly cardinality: "many";
4215
+ }];
4216
+ contacts: [{
4217
+ readonly sourceField: string[];
4218
+ readonly destField: ("id" | "name" | "emailAddress" | "userId")[];
4219
+ readonly destSchema: "contact";
4220
+ readonly cardinality: "many";
4221
+ }];
4222
+ drafts: [{
4223
+ readonly sourceField: string[];
4224
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
4225
+ readonly destSchema: "draft";
4226
+ readonly cardinality: "many";
4227
+ }];
4228
+ pushNotificationTokens: [{
4229
+ readonly sourceField: string[];
4230
+ readonly destField: ("createdAt" | "id" | "token" | "userId")[];
4231
+ readonly destSchema: "userPushNotificationToken";
4232
+ readonly cardinality: "many";
4233
+ }];
4234
+ threads: [{
4235
+ readonly sourceField: string[];
4236
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
4237
+ readonly destSchema: "thread";
4238
+ readonly cardinality: "many";
4239
+ }];
4240
+ };
4241
+ readonly userPushNotificationToken: {
4242
+ user: [{
4243
+ readonly sourceField: string[];
4244
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
4245
+ readonly destSchema: "user";
4246
+ readonly cardinality: "one";
4247
+ }];
4248
+ };
4249
+ readonly contact: {
4250
+ user: [{
4251
+ readonly sourceField: string[];
4252
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
4253
+ readonly destSchema: "user";
4254
+ readonly cardinality: "one";
4255
+ }];
4256
+ };
4257
+ readonly account: {
4258
+ aliases: [{
4259
+ readonly sourceField: string[];
4260
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
4261
+ readonly destSchema: "accountAlias";
4262
+ readonly cardinality: "many";
4263
+ }];
4264
+ drafts: [{
4265
+ readonly sourceField: string[];
4266
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
4267
+ readonly destSchema: "draft";
4268
+ readonly cardinality: "many";
4269
+ }];
4270
+ labels: [{
4271
+ readonly sourceField: string[];
4272
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
4273
+ readonly destSchema: "accountLabel";
4274
+ readonly cardinality: "many";
4275
+ }];
4276
+ primaryAlias: [{
4277
+ readonly sourceField: string[];
4278
+ readonly destField: ("id" | "name" | "emailAddress" | "accountId" | "isPrimary")[];
4279
+ readonly destSchema: "accountAlias";
4280
+ readonly cardinality: "one";
4281
+ }];
4282
+ threads: [{
4283
+ readonly sourceField: string[];
4284
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
4285
+ readonly destSchema: "thread";
4286
+ readonly cardinality: "many";
4287
+ }];
4288
+ user: [{
4289
+ readonly sourceField: string[];
4290
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
4291
+ readonly destSchema: "user";
4292
+ readonly cardinality: "one";
4293
+ }];
4294
+ };
4295
+ readonly accountAlias: {
4296
+ account: [{
4297
+ readonly sourceField: string[];
4298
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
4299
+ readonly destSchema: "account";
4300
+ readonly cardinality: "one";
4301
+ }];
4302
+ };
4303
+ readonly accountLabel: {
4304
+ account: [{
4305
+ readonly sourceField: string[];
4306
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
4307
+ readonly destSchema: "account";
4308
+ readonly cardinality: "one";
4309
+ }];
4310
+ threadMessages: [{
4311
+ readonly sourceField: string[];
4312
+ readonly destField: ("labelId" | "threadMessageId")[];
4313
+ readonly destSchema: "threadMessageLabel";
4314
+ readonly cardinality: "many";
4315
+ }, {
4316
+ readonly sourceField: string[];
4317
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
4318
+ readonly destSchema: "threadMessage";
4319
+ readonly cardinality: "many";
4320
+ }];
4321
+ threads: [{
4322
+ readonly sourceField: string[];
4323
+ readonly destField: ("threadId" | "labelId")[];
4324
+ readonly destSchema: "threadLabel";
4325
+ readonly cardinality: "many";
4326
+ }, {
4327
+ readonly sourceField: string[];
4328
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
4329
+ readonly destSchema: "thread";
4330
+ readonly cardinality: "many";
4331
+ }];
4332
+ };
4333
+ readonly draft: {
4334
+ account: [{
4335
+ readonly sourceField: string[];
4336
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
4337
+ readonly destSchema: "account";
4338
+ readonly cardinality: "one";
4339
+ }];
4340
+ attachments: [{
4341
+ readonly sourceField: string[];
4342
+ readonly destField: ("id" | "failed" | "fileName" | "mimeType" | "totalChunks" | "totalSize" | "uploadedChunks" | "draftId")[];
4343
+ readonly destSchema: "draftAttachment";
4344
+ readonly cardinality: "many";
4345
+ }];
4346
+ recipients: [{
4347
+ readonly sourceField: string[];
4348
+ readonly destField: ("type" | "id" | "emailAddress" | "draftId")[];
4349
+ readonly destSchema: "draftRecipient";
4350
+ readonly cardinality: "many";
4351
+ }];
4352
+ user: [{
4353
+ readonly sourceField: string[];
4354
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
4355
+ readonly destSchema: "user";
4356
+ readonly cardinality: "one";
4357
+ }];
4358
+ };
4359
+ readonly draftRecipient: {
4360
+ draft: [{
4361
+ readonly sourceField: string[];
4362
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
4363
+ readonly destSchema: "draft";
4364
+ readonly cardinality: "one";
4365
+ }];
4366
+ };
4367
+ readonly draftAttachment: {
4368
+ draft: [{
4369
+ readonly sourceField: string[];
4370
+ readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromEmail" | "fromAliasId")[];
4371
+ readonly destSchema: "draft";
4372
+ readonly cardinality: "one";
4373
+ }];
4374
+ };
4375
+ readonly thread: {
4376
+ account: [{
4377
+ readonly sourceField: string[];
4378
+ readonly destField: ("id" | "color" | "userId" | "mailProcessedCount" | "mailTotalCount" | "displayName" | "imapConnectionStatus" | "primaryAliasId")[];
4379
+ readonly destSchema: "account";
4380
+ readonly cardinality: "one";
4381
+ }];
4382
+ labels: [{
4383
+ readonly sourceField: string[];
4384
+ readonly destField: ("threadId" | "labelId")[];
4385
+ readonly destSchema: "threadLabel";
4386
+ readonly cardinality: "many";
4387
+ }, {
4388
+ readonly sourceField: string[];
4389
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
4390
+ readonly destSchema: "accountLabel";
4391
+ readonly cardinality: "many";
4392
+ }];
4393
+ messages: [{
4394
+ readonly sourceField: string[];
4395
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
4396
+ readonly destSchema: "threadMessage";
4397
+ readonly cardinality: "many";
4398
+ }];
4399
+ user: [{
4400
+ readonly sourceField: string[];
4401
+ readonly destField: ("id" | "name" | "undoSendEnabled" | "profilePicture")[];
4402
+ readonly destSchema: "user";
4403
+ readonly cardinality: "one";
4404
+ }];
4405
+ };
4406
+ readonly threadLabel: {
4407
+ label: [{
4408
+ readonly sourceField: string[];
4409
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
4410
+ readonly destSchema: "accountLabel";
4411
+ readonly cardinality: "one";
4412
+ }];
4413
+ thread: [{
4414
+ readonly sourceField: string[];
4415
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
4416
+ readonly destSchema: "thread";
4417
+ readonly cardinality: "one";
4418
+ }];
4419
+ };
4420
+ readonly threadMessage: {
4421
+ attachments: [{
4422
+ readonly sourceField: string[];
4423
+ readonly destField: ("status" | "id" | "fileName" | "mimeType" | "threadMessageId" | "size")[];
4424
+ readonly destSchema: "threadMessageAttachment";
4425
+ readonly cardinality: "many";
4426
+ }];
4427
+ labels: [{
4428
+ readonly sourceField: string[];
4429
+ readonly destField: ("labelId" | "threadMessageId")[];
4430
+ readonly destSchema: "threadMessageLabel";
4431
+ readonly cardinality: "many";
4432
+ }, {
4433
+ readonly sourceField: string[];
4434
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
4435
+ readonly destSchema: "accountLabel";
4436
+ readonly cardinality: "many";
4437
+ }];
4438
+ recipients: [{
4439
+ readonly sourceField: string[];
4440
+ readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
4441
+ readonly destSchema: "threadMessageRecipient";
4442
+ readonly cardinality: "many";
4443
+ }];
4444
+ thread: [{
4445
+ readonly sourceField: string[];
4446
+ readonly destField: ("id" | "accountId" | "flagged" | "seen" | "userId" | "latestMessageDate" | "words")[];
4447
+ readonly destSchema: "thread";
4448
+ readonly cardinality: "one";
4449
+ }];
4450
+ };
4451
+ readonly threadMessageRecipient: {
4452
+ message: [{
4453
+ readonly sourceField: string[];
4454
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
4455
+ readonly destSchema: "threadMessage";
4456
+ readonly cardinality: "one";
4457
+ }];
4458
+ };
4459
+ readonly threadMessageAttachment: {
4460
+ message: [{
4461
+ readonly sourceField: string[];
4462
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
4463
+ readonly destSchema: "threadMessage";
4464
+ readonly cardinality: "one";
4465
+ }];
4466
+ };
4467
+ readonly threadMessageLabel: {
4468
+ label: [{
4469
+ readonly sourceField: string[];
4470
+ readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
4471
+ readonly destSchema: "accountLabel";
4472
+ readonly cardinality: "one";
4473
+ }];
4474
+ message: [{
4475
+ readonly sourceField: string[];
4476
+ readonly destField: ("threadId" | "id" | "envelopeDate" | "previewText" | "senderEmail" | "envelopeSubject" | "senderName")[];
4477
+ readonly destSchema: "threadMessage";
4478
+ readonly cardinality: "one";
4479
+ }];
4480
+ };
4481
+ };
4482
+ enableLegacyQueries: boolean | undefined;
4483
+ enableLegacyMutators: false;
4484
+ }, "user", {
4485
+ readonly id: string;
4486
+ readonly name: string | null;
4487
+ readonly profilePicture: string | null;
4488
+ readonly undoSendEnabled: boolean;
4489
+ } & {
4490
+ readonly accounts: readonly ({
4491
+ readonly color: string;
4492
+ readonly displayName: string | null;
4493
+ readonly id: string;
4494
+ readonly imapConnectionStatus: "AWAITING_CONNECTION" | "CONNECTED" | "CONNECTION_FAILED_AUTHENTICATION_ERROR" | "CONNECTION_FAILED_CONNECTION_ERROR" | "CONNECTION_FAILED_OAUTH_EXCHANGE_ERROR" | "CONNECTION_FAILED_QUOTA_ERROR" | "CONNECTION_FAILED_UNKNOWN_ERROR";
4495
+ readonly mailProcessedCount: number;
4496
+ readonly mailTotalCount: number;
4497
+ readonly primaryAliasId: string | null;
4498
+ readonly userId: string;
4499
+ } & {
4500
+ readonly aliases: readonly {
4501
+ readonly accountId: string;
4502
+ readonly emailAddress: string;
4503
+ readonly id: string;
4504
+ readonly isPrimary: boolean;
4505
+ readonly name: string | null;
4506
+ }[];
4507
+ } & {
4508
+ readonly primaryAlias: {
4509
+ readonly accountId: string;
4510
+ readonly emailAddress: string;
4511
+ readonly id: string;
4512
+ readonly isPrimary: boolean;
4513
+ readonly name: string | null;
4514
+ } | undefined;
4515
+ } & {
4516
+ readonly labels: readonly {
4517
+ readonly accountId: string;
4518
+ readonly id: string;
4519
+ readonly path: string;
4520
+ readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
4521
+ }[];
4522
+ })[];
4523
+ } & {
4524
+ readonly contacts: readonly {
4525
+ readonly emailAddress: string;
4526
+ readonly id: string;
4527
+ readonly name: string | null;
4528
+ readonly userId: string;
4529
+ }[];
4530
+ } & {
4531
+ readonly drafts: readonly ({
4532
+ readonly accountId: string;
4533
+ readonly body: {
4534
+ content: string;
4535
+ to: string[];
4536
+ cc: string[];
4537
+ bcc: string[];
4538
+ };
4539
+ readonly error: string | null;
4540
+ readonly fromAliasId: string | null;
4541
+ readonly fromEmail: string;
4542
+ readonly fromName: string | null;
4543
+ readonly id: string;
4544
+ readonly referencedMessageId: string | null;
4545
+ readonly scheduledFor: number | null;
4546
+ readonly status: "DRAFT" | "SEND_REQUESTED" | "SEND_CONFIRMED" | "SEND_FAILED";
4547
+ readonly subject: string | null;
4548
+ readonly type: "NEW" | "REPLY" | "FORWARD";
4549
+ readonly updatedAt: number;
4550
+ readonly userId: string;
4551
+ } & {
4552
+ readonly recipients: readonly {
4553
+ readonly draftId: string;
4554
+ readonly emailAddress: string;
4555
+ readonly id: string;
4556
+ readonly type: "bcc" | "cc" | "to";
4557
+ }[];
4558
+ } & {
4559
+ readonly attachments: readonly {
4560
+ readonly draftId: string;
4561
+ readonly failed: boolean;
4562
+ readonly fileName: string;
4563
+ readonly id: string;
4564
+ readonly mimeType: string;
4565
+ readonly totalChunks: number;
4566
+ readonly totalSize: number;
4567
+ readonly uploadedChunks: number;
4568
+ }[];
4569
+ })[];
4570
+ } & {
4571
+ readonly pushNotificationTokens: readonly {
4572
+ readonly createdAt: number;
4573
+ readonly id: string;
4574
+ readonly token: string;
4575
+ readonly userId: string;
4576
+ }[];
4577
+ } & {
4578
+ readonly threads: readonly {
4579
+ readonly accountId: string;
4580
+ readonly flagged: boolean;
4581
+ readonly id: string;
4582
+ readonly latestMessageDate: number;
4583
+ readonly seen: boolean;
4584
+ readonly userId: string;
4585
+ readonly words: string;
4586
+ }[];
4587
+ }>>;
4588
+ };
3
4589
  readonly schema: {
4
4590
  tables: {
5
4591
  readonly user: {
@@ -1443,6 +6029,7 @@ export { accountMutatorDefinitions } from './mutators/account';
1443
6029
  export { draftMutatorDefinitions } from './mutators/draft';
1444
6030
  export { threadMutatorDefinitions } from './mutators/thread';
1445
6031
  export { userMutatorDefinitions } from './mutators/user';
6032
+ export { getUser } from './queries';
1446
6033
  export type { MarcoZeroSchema } from './schema';
1447
6034
  export { schema, zeroTables } from './schema';
1448
6035
  //# sourceMappingURL=index.d.ts.map