@marcoappio/marco-config 2.0.420 → 2.0.422
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zero/index.d.ts +853 -201
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/index.js +3 -0
- package/dist/zero/permissions.d.ts +23 -0
- package/dist/zero/permissions.d.ts.map +1 -0
- package/dist/zero/permissions.js +81 -0
- package/dist/zero/queries/getAccounts.d.ts +121 -26
- package/dist/zero/queries/getAccounts.d.ts.map +1 -1
- package/dist/zero/queries/getAccounts.js +1 -1
- package/dist/zero/queries/getContacts.d.ts +121 -26
- package/dist/zero/queries/getContacts.d.ts.map +1 -1
- package/dist/zero/queries/getContacts.js +6 -7
- package/dist/zero/queries/getDrafts.d.ts +122 -27
- package/dist/zero/queries/getDrafts.d.ts.map +1 -1
- package/dist/zero/queries/getDrafts.js +6 -8
- package/dist/zero/queries/getThreads.d.ts +122 -20
- package/dist/zero/queries/getThreads.d.ts.map +1 -1
- package/dist/zero/queries/getThreads.js +10 -11
- package/dist/zero/queries/getUser.d.ts +121 -83
- package/dist/zero/queries/getUser.d.ts.map +1 -1
- package/dist/zero/queries/getUser.js +2 -5
- package/dist/zero/queries/index.d.ts +121 -19
- package/dist/zero/queries/index.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +223 -19
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +61 -51
- package/package.json +1 -1
|
@@ -30,11 +30,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
30
30
|
customType: string;
|
|
31
31
|
}, "optional"> & {
|
|
32
32
|
optional: true;
|
|
33
|
+
} & {
|
|
34
|
+
serverName: string;
|
|
33
35
|
};
|
|
34
36
|
readonly undoSendEnabled: {
|
|
35
37
|
type: "boolean";
|
|
36
38
|
optional: false;
|
|
37
39
|
customType: boolean;
|
|
40
|
+
} & {
|
|
41
|
+
serverName: string;
|
|
38
42
|
};
|
|
39
43
|
};
|
|
40
44
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -48,6 +52,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
48
52
|
type: "number";
|
|
49
53
|
optional: false;
|
|
50
54
|
customType: number;
|
|
55
|
+
} & {
|
|
56
|
+
serverName: string;
|
|
51
57
|
};
|
|
52
58
|
readonly id: {
|
|
53
59
|
type: "string";
|
|
@@ -63,6 +69,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
63
69
|
type: "string";
|
|
64
70
|
optional: false;
|
|
65
71
|
customType: string;
|
|
72
|
+
} & {
|
|
73
|
+
serverName: string;
|
|
66
74
|
};
|
|
67
75
|
};
|
|
68
76
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -76,6 +84,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
76
84
|
type: "string";
|
|
77
85
|
optional: false;
|
|
78
86
|
customType: string;
|
|
87
|
+
} & {
|
|
88
|
+
serverName: string;
|
|
79
89
|
};
|
|
80
90
|
readonly id: {
|
|
81
91
|
type: "string";
|
|
@@ -93,6 +103,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
93
103
|
type: "string";
|
|
94
104
|
optional: false;
|
|
95
105
|
customType: string;
|
|
106
|
+
} & {
|
|
107
|
+
serverName: string;
|
|
96
108
|
};
|
|
97
109
|
};
|
|
98
110
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -113,6 +125,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
113
125
|
customType: string;
|
|
114
126
|
}, "optional"> & {
|
|
115
127
|
optional: true;
|
|
128
|
+
} & {
|
|
129
|
+
serverName: string;
|
|
116
130
|
};
|
|
117
131
|
readonly id: {
|
|
118
132
|
type: "string";
|
|
@@ -123,16 +137,22 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
123
137
|
type: "string";
|
|
124
138
|
optional: false;
|
|
125
139
|
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";
|
|
140
|
+
} & {
|
|
141
|
+
serverName: string;
|
|
126
142
|
};
|
|
127
143
|
readonly mailProcessedCount: {
|
|
128
144
|
type: "number";
|
|
129
145
|
optional: false;
|
|
130
146
|
customType: number;
|
|
147
|
+
} & {
|
|
148
|
+
serverName: string;
|
|
131
149
|
};
|
|
132
150
|
readonly mailTotalCount: {
|
|
133
151
|
type: "number";
|
|
134
152
|
optional: false;
|
|
135
153
|
customType: number;
|
|
154
|
+
} & {
|
|
155
|
+
serverName: string;
|
|
136
156
|
};
|
|
137
157
|
readonly primaryAliasId: Omit<{
|
|
138
158
|
type: "string";
|
|
@@ -140,11 +160,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
140
160
|
customType: string;
|
|
141
161
|
}, "optional"> & {
|
|
142
162
|
optional: true;
|
|
163
|
+
} & {
|
|
164
|
+
serverName: string;
|
|
143
165
|
};
|
|
144
166
|
readonly userId: {
|
|
145
167
|
type: "string";
|
|
146
168
|
optional: false;
|
|
147
169
|
customType: string;
|
|
170
|
+
} & {
|
|
171
|
+
serverName: string;
|
|
148
172
|
};
|
|
149
173
|
};
|
|
150
174
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -158,11 +182,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
158
182
|
type: "string";
|
|
159
183
|
optional: false;
|
|
160
184
|
customType: string;
|
|
185
|
+
} & {
|
|
186
|
+
serverName: string;
|
|
161
187
|
};
|
|
162
188
|
readonly emailAddress: {
|
|
163
189
|
type: "string";
|
|
164
190
|
optional: false;
|
|
165
191
|
customType: string;
|
|
192
|
+
} & {
|
|
193
|
+
serverName: string;
|
|
166
194
|
};
|
|
167
195
|
readonly id: {
|
|
168
196
|
type: "string";
|
|
@@ -173,6 +201,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
173
201
|
type: "boolean";
|
|
174
202
|
optional: false;
|
|
175
203
|
customType: boolean;
|
|
204
|
+
} & {
|
|
205
|
+
serverName: string;
|
|
176
206
|
};
|
|
177
207
|
readonly name: Omit<{
|
|
178
208
|
type: "string";
|
|
@@ -193,6 +223,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
193
223
|
type: "string";
|
|
194
224
|
optional: false;
|
|
195
225
|
customType: string;
|
|
226
|
+
} & {
|
|
227
|
+
serverName: string;
|
|
196
228
|
};
|
|
197
229
|
readonly id: {
|
|
198
230
|
type: "string";
|
|
@@ -210,6 +242,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
210
242
|
customType: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH";
|
|
211
243
|
}, "optional"> & {
|
|
212
244
|
optional: true;
|
|
245
|
+
} & {
|
|
246
|
+
serverName: string;
|
|
213
247
|
};
|
|
214
248
|
};
|
|
215
249
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -223,6 +257,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
223
257
|
type: "string";
|
|
224
258
|
optional: false;
|
|
225
259
|
customType: string;
|
|
260
|
+
} & {
|
|
261
|
+
serverName: string;
|
|
226
262
|
};
|
|
227
263
|
readonly body: {
|
|
228
264
|
type: "json";
|
|
@@ -247,11 +283,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
247
283
|
customType: string;
|
|
248
284
|
}, "optional"> & {
|
|
249
285
|
optional: true;
|
|
286
|
+
} & {
|
|
287
|
+
serverName: string;
|
|
250
288
|
};
|
|
251
289
|
readonly fromEmail: {
|
|
252
290
|
type: "string";
|
|
253
291
|
optional: false;
|
|
254
292
|
customType: string;
|
|
293
|
+
} & {
|
|
294
|
+
serverName: string;
|
|
255
295
|
};
|
|
256
296
|
readonly fromName: Omit<{
|
|
257
297
|
type: "string";
|
|
@@ -259,6 +299,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
259
299
|
customType: string;
|
|
260
300
|
}, "optional"> & {
|
|
261
301
|
optional: true;
|
|
302
|
+
} & {
|
|
303
|
+
serverName: string;
|
|
262
304
|
};
|
|
263
305
|
readonly id: {
|
|
264
306
|
type: "string";
|
|
@@ -271,6 +313,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
271
313
|
customType: string;
|
|
272
314
|
}, "optional"> & {
|
|
273
315
|
optional: true;
|
|
316
|
+
} & {
|
|
317
|
+
serverName: string;
|
|
274
318
|
};
|
|
275
319
|
readonly scheduledFor: Omit<{
|
|
276
320
|
type: "number";
|
|
@@ -278,6 +322,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
278
322
|
customType: number;
|
|
279
323
|
}, "optional"> & {
|
|
280
324
|
optional: true;
|
|
325
|
+
} & {
|
|
326
|
+
serverName: string;
|
|
281
327
|
};
|
|
282
328
|
readonly status: {
|
|
283
329
|
type: "string";
|
|
@@ -300,11 +346,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
300
346
|
type: "number";
|
|
301
347
|
optional: false;
|
|
302
348
|
customType: number;
|
|
349
|
+
} & {
|
|
350
|
+
serverName: string;
|
|
303
351
|
};
|
|
304
352
|
readonly userId: {
|
|
305
353
|
type: "string";
|
|
306
354
|
optional: false;
|
|
307
355
|
customType: string;
|
|
356
|
+
} & {
|
|
357
|
+
serverName: string;
|
|
308
358
|
};
|
|
309
359
|
};
|
|
310
360
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -318,11 +368,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
318
368
|
type: "string";
|
|
319
369
|
optional: false;
|
|
320
370
|
customType: string;
|
|
371
|
+
} & {
|
|
372
|
+
serverName: string;
|
|
321
373
|
};
|
|
322
374
|
readonly emailAddress: {
|
|
323
375
|
type: "string";
|
|
324
376
|
optional: false;
|
|
325
377
|
customType: string;
|
|
378
|
+
} & {
|
|
379
|
+
serverName: string;
|
|
326
380
|
};
|
|
327
381
|
readonly id: {
|
|
328
382
|
type: "string";
|
|
@@ -346,6 +400,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
346
400
|
type: "string";
|
|
347
401
|
optional: false;
|
|
348
402
|
customType: string;
|
|
403
|
+
} & {
|
|
404
|
+
serverName: string;
|
|
349
405
|
};
|
|
350
406
|
readonly failed: {
|
|
351
407
|
type: "boolean";
|
|
@@ -356,6 +412,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
356
412
|
type: "string";
|
|
357
413
|
optional: false;
|
|
358
414
|
customType: string;
|
|
415
|
+
} & {
|
|
416
|
+
serverName: string;
|
|
359
417
|
};
|
|
360
418
|
readonly id: {
|
|
361
419
|
type: "string";
|
|
@@ -366,21 +424,29 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
366
424
|
type: "string";
|
|
367
425
|
optional: false;
|
|
368
426
|
customType: string;
|
|
427
|
+
} & {
|
|
428
|
+
serverName: string;
|
|
369
429
|
};
|
|
370
430
|
readonly totalChunks: {
|
|
371
431
|
type: "number";
|
|
372
432
|
optional: false;
|
|
373
433
|
customType: number;
|
|
434
|
+
} & {
|
|
435
|
+
serverName: string;
|
|
374
436
|
};
|
|
375
437
|
readonly totalSize: {
|
|
376
438
|
type: "number";
|
|
377
439
|
optional: false;
|
|
378
440
|
customType: number;
|
|
441
|
+
} & {
|
|
442
|
+
serverName: string;
|
|
379
443
|
};
|
|
380
444
|
readonly uploadedChunks: {
|
|
381
445
|
type: "number";
|
|
382
446
|
optional: false;
|
|
383
447
|
customType: number;
|
|
448
|
+
} & {
|
|
449
|
+
serverName: string;
|
|
384
450
|
};
|
|
385
451
|
};
|
|
386
452
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -394,6 +460,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
394
460
|
type: "string";
|
|
395
461
|
optional: false;
|
|
396
462
|
customType: string;
|
|
463
|
+
} & {
|
|
464
|
+
serverName: string;
|
|
397
465
|
};
|
|
398
466
|
readonly flagged: {
|
|
399
467
|
type: "boolean";
|
|
@@ -409,6 +477,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
409
477
|
type: "number";
|
|
410
478
|
optional: false;
|
|
411
479
|
customType: number;
|
|
480
|
+
} & {
|
|
481
|
+
serverName: string;
|
|
412
482
|
};
|
|
413
483
|
readonly seen: {
|
|
414
484
|
type: "boolean";
|
|
@@ -419,6 +489,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
419
489
|
type: "string";
|
|
420
490
|
optional: false;
|
|
421
491
|
customType: string;
|
|
492
|
+
} & {
|
|
493
|
+
serverName: string;
|
|
422
494
|
};
|
|
423
495
|
readonly words: {
|
|
424
496
|
type: "string";
|
|
@@ -437,11 +509,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
437
509
|
type: "string";
|
|
438
510
|
optional: false;
|
|
439
511
|
customType: string;
|
|
512
|
+
} & {
|
|
513
|
+
serverName: string;
|
|
440
514
|
};
|
|
441
515
|
readonly threadId: {
|
|
442
516
|
type: "string";
|
|
443
517
|
optional: false;
|
|
444
518
|
customType: string;
|
|
519
|
+
} & {
|
|
520
|
+
serverName: string;
|
|
445
521
|
};
|
|
446
522
|
};
|
|
447
523
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -455,6 +531,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
455
531
|
type: "number";
|
|
456
532
|
optional: false;
|
|
457
533
|
customType: number;
|
|
534
|
+
} & {
|
|
535
|
+
serverName: string;
|
|
458
536
|
};
|
|
459
537
|
readonly envelopeSubject: Omit<{
|
|
460
538
|
type: "string";
|
|
@@ -462,6 +540,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
462
540
|
customType: string;
|
|
463
541
|
}, "optional"> & {
|
|
464
542
|
optional: true;
|
|
543
|
+
} & {
|
|
544
|
+
serverName: string;
|
|
465
545
|
};
|
|
466
546
|
readonly id: {
|
|
467
547
|
type: "string";
|
|
@@ -472,11 +552,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
472
552
|
type: "string";
|
|
473
553
|
optional: false;
|
|
474
554
|
customType: string;
|
|
555
|
+
} & {
|
|
556
|
+
serverName: string;
|
|
475
557
|
};
|
|
476
558
|
readonly senderEmail: {
|
|
477
559
|
type: "string";
|
|
478
560
|
optional: false;
|
|
479
561
|
customType: string;
|
|
562
|
+
} & {
|
|
563
|
+
serverName: string;
|
|
480
564
|
};
|
|
481
565
|
readonly senderName: Omit<{
|
|
482
566
|
type: "string";
|
|
@@ -484,11 +568,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
484
568
|
customType: string;
|
|
485
569
|
}, "optional"> & {
|
|
486
570
|
optional: true;
|
|
571
|
+
} & {
|
|
572
|
+
serverName: string;
|
|
487
573
|
};
|
|
488
574
|
readonly threadId: {
|
|
489
575
|
type: "string";
|
|
490
576
|
optional: false;
|
|
491
577
|
customType: string;
|
|
578
|
+
} & {
|
|
579
|
+
serverName: string;
|
|
492
580
|
};
|
|
493
581
|
};
|
|
494
582
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -502,6 +590,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
502
590
|
type: "string";
|
|
503
591
|
optional: false;
|
|
504
592
|
customType: string;
|
|
593
|
+
} & {
|
|
594
|
+
serverName: string;
|
|
505
595
|
};
|
|
506
596
|
readonly id: {
|
|
507
597
|
type: "string";
|
|
@@ -519,6 +609,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
519
609
|
type: "string";
|
|
520
610
|
optional: false;
|
|
521
611
|
customType: string;
|
|
612
|
+
} & {
|
|
613
|
+
serverName: string;
|
|
522
614
|
};
|
|
523
615
|
readonly type: {
|
|
524
616
|
type: "string";
|
|
@@ -537,6 +629,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
537
629
|
type: "string";
|
|
538
630
|
optional: false;
|
|
539
631
|
customType: string;
|
|
632
|
+
} & {
|
|
633
|
+
serverName: string;
|
|
540
634
|
};
|
|
541
635
|
readonly id: {
|
|
542
636
|
type: "string";
|
|
@@ -547,6 +641,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
547
641
|
type: "string";
|
|
548
642
|
optional: false;
|
|
549
643
|
customType: string;
|
|
644
|
+
} & {
|
|
645
|
+
serverName: string;
|
|
550
646
|
};
|
|
551
647
|
readonly size: {
|
|
552
648
|
type: "number";
|
|
@@ -562,6 +658,8 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
562
658
|
type: "string";
|
|
563
659
|
optional: false;
|
|
564
660
|
customType: string;
|
|
661
|
+
} & {
|
|
662
|
+
serverName: string;
|
|
565
663
|
};
|
|
566
664
|
};
|
|
567
665
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -575,11 +673,15 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
575
673
|
type: "string";
|
|
576
674
|
optional: false;
|
|
577
675
|
customType: string;
|
|
676
|
+
} & {
|
|
677
|
+
serverName: string;
|
|
578
678
|
};
|
|
579
679
|
readonly threadMessageId: {
|
|
580
680
|
type: "string";
|
|
581
681
|
optional: false;
|
|
582
682
|
customType: string;
|
|
683
|
+
} & {
|
|
684
|
+
serverName: string;
|
|
583
685
|
};
|
|
584
686
|
};
|
|
585
687
|
primaryKey: readonly [string, ...string[]];
|
|
@@ -591,7 +693,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
591
693
|
readonly user: {
|
|
592
694
|
accounts: [{
|
|
593
695
|
readonly sourceField: string[];
|
|
594
|
-
readonly destField: ("id" | "color" | "userId" | "
|
|
696
|
+
readonly destField: ("id" | "color" | "userId" | "displayName" | "imapConnectionStatus" | "mailProcessedCount" | "mailTotalCount" | "primaryAliasId")[];
|
|
595
697
|
readonly destSchema: "account";
|
|
596
698
|
readonly cardinality: "many";
|
|
597
699
|
}];
|
|
@@ -603,7 +705,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
603
705
|
}];
|
|
604
706
|
drafts: [{
|
|
605
707
|
readonly sourceField: string[];
|
|
606
|
-
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "
|
|
708
|
+
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromAliasId" | "fromEmail")[];
|
|
607
709
|
readonly destSchema: "draft";
|
|
608
710
|
readonly cardinality: "many";
|
|
609
711
|
}];
|
|
@@ -623,7 +725,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
623
725
|
readonly userPushNotificationToken: {
|
|
624
726
|
user: [{
|
|
625
727
|
readonly sourceField: string[];
|
|
626
|
-
readonly destField: ("id" | "name" | "
|
|
728
|
+
readonly destField: ("id" | "name" | "profilePicture" | "undoSendEnabled")[];
|
|
627
729
|
readonly destSchema: "user";
|
|
628
730
|
readonly cardinality: "one";
|
|
629
731
|
}];
|
|
@@ -631,7 +733,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
631
733
|
readonly contact: {
|
|
632
734
|
user: [{
|
|
633
735
|
readonly sourceField: string[];
|
|
634
|
-
readonly destField: ("id" | "name" | "
|
|
736
|
+
readonly destField: ("id" | "name" | "profilePicture" | "undoSendEnabled")[];
|
|
635
737
|
readonly destSchema: "user";
|
|
636
738
|
readonly cardinality: "one";
|
|
637
739
|
}];
|
|
@@ -645,7 +747,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
645
747
|
}];
|
|
646
748
|
drafts: [{
|
|
647
749
|
readonly sourceField: string[];
|
|
648
|
-
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "
|
|
750
|
+
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromAliasId" | "fromEmail")[];
|
|
649
751
|
readonly destSchema: "draft";
|
|
650
752
|
readonly cardinality: "many";
|
|
651
753
|
}];
|
|
@@ -669,7 +771,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
669
771
|
}];
|
|
670
772
|
user: [{
|
|
671
773
|
readonly sourceField: string[];
|
|
672
|
-
readonly destField: ("id" | "name" | "
|
|
774
|
+
readonly destField: ("id" | "name" | "profilePicture" | "undoSendEnabled")[];
|
|
673
775
|
readonly destSchema: "user";
|
|
674
776
|
readonly cardinality: "one";
|
|
675
777
|
}];
|
|
@@ -677,7 +779,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
677
779
|
readonly accountAlias: {
|
|
678
780
|
account: [{
|
|
679
781
|
readonly sourceField: string[];
|
|
680
|
-
readonly destField: ("id" | "color" | "userId" | "
|
|
782
|
+
readonly destField: ("id" | "color" | "userId" | "displayName" | "imapConnectionStatus" | "mailProcessedCount" | "mailTotalCount" | "primaryAliasId")[];
|
|
681
783
|
readonly destSchema: "account";
|
|
682
784
|
readonly cardinality: "one";
|
|
683
785
|
}];
|
|
@@ -685,7 +787,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
685
787
|
readonly accountLabel: {
|
|
686
788
|
account: [{
|
|
687
789
|
readonly sourceField: string[];
|
|
688
|
-
readonly destField: ("id" | "color" | "userId" | "
|
|
790
|
+
readonly destField: ("id" | "color" | "userId" | "displayName" | "imapConnectionStatus" | "mailProcessedCount" | "mailTotalCount" | "primaryAliasId")[];
|
|
689
791
|
readonly destSchema: "account";
|
|
690
792
|
readonly cardinality: "one";
|
|
691
793
|
}];
|
|
@@ -696,7 +798,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
696
798
|
readonly cardinality: "many";
|
|
697
799
|
}, {
|
|
698
800
|
readonly sourceField: string[];
|
|
699
|
-
readonly destField: ("threadId" | "id" | "envelopeDate" | "
|
|
801
|
+
readonly destField: ("threadId" | "id" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
700
802
|
readonly destSchema: "threadMessage";
|
|
701
803
|
readonly cardinality: "many";
|
|
702
804
|
}];
|
|
@@ -715,7 +817,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
715
817
|
readonly draft: {
|
|
716
818
|
account: [{
|
|
717
819
|
readonly sourceField: string[];
|
|
718
|
-
readonly destField: ("id" | "color" | "userId" | "
|
|
820
|
+
readonly destField: ("id" | "color" | "userId" | "displayName" | "imapConnectionStatus" | "mailProcessedCount" | "mailTotalCount" | "primaryAliasId")[];
|
|
719
821
|
readonly destSchema: "account";
|
|
720
822
|
readonly cardinality: "one";
|
|
721
823
|
}];
|
|
@@ -733,7 +835,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
733
835
|
}];
|
|
734
836
|
user: [{
|
|
735
837
|
readonly sourceField: string[];
|
|
736
|
-
readonly destField: ("id" | "name" | "
|
|
838
|
+
readonly destField: ("id" | "name" | "profilePicture" | "undoSendEnabled")[];
|
|
737
839
|
readonly destSchema: "user";
|
|
738
840
|
readonly cardinality: "one";
|
|
739
841
|
}];
|
|
@@ -741,7 +843,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
741
843
|
readonly draftRecipient: {
|
|
742
844
|
draft: [{
|
|
743
845
|
readonly sourceField: string[];
|
|
744
|
-
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "
|
|
846
|
+
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromAliasId" | "fromEmail")[];
|
|
745
847
|
readonly destSchema: "draft";
|
|
746
848
|
readonly cardinality: "one";
|
|
747
849
|
}];
|
|
@@ -749,7 +851,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
749
851
|
readonly draftAttachment: {
|
|
750
852
|
draft: [{
|
|
751
853
|
readonly sourceField: string[];
|
|
752
|
-
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "
|
|
854
|
+
readonly destField: ("type" | "status" | "id" | "updatedAt" | "body" | "accountId" | "subject" | "scheduledFor" | "error" | "fromName" | "referencedMessageId" | "userId" | "fromAliasId" | "fromEmail")[];
|
|
753
855
|
readonly destSchema: "draft";
|
|
754
856
|
readonly cardinality: "one";
|
|
755
857
|
}];
|
|
@@ -757,7 +859,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
757
859
|
readonly thread: {
|
|
758
860
|
account: [{
|
|
759
861
|
readonly sourceField: string[];
|
|
760
|
-
readonly destField: ("id" | "color" | "userId" | "
|
|
862
|
+
readonly destField: ("id" | "color" | "userId" | "displayName" | "imapConnectionStatus" | "mailProcessedCount" | "mailTotalCount" | "primaryAliasId")[];
|
|
761
863
|
readonly destSchema: "account";
|
|
762
864
|
readonly cardinality: "one";
|
|
763
865
|
}];
|
|
@@ -774,13 +876,13 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
774
876
|
}];
|
|
775
877
|
messages: [{
|
|
776
878
|
readonly sourceField: string[];
|
|
777
|
-
readonly destField: ("threadId" | "id" | "envelopeDate" | "
|
|
879
|
+
readonly destField: ("threadId" | "id" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
778
880
|
readonly destSchema: "threadMessage";
|
|
779
881
|
readonly cardinality: "many";
|
|
780
882
|
}];
|
|
781
883
|
user: [{
|
|
782
884
|
readonly sourceField: string[];
|
|
783
|
-
readonly destField: ("id" | "name" | "
|
|
885
|
+
readonly destField: ("id" | "name" | "profilePicture" | "undoSendEnabled")[];
|
|
784
886
|
readonly destSchema: "user";
|
|
785
887
|
readonly cardinality: "one";
|
|
786
888
|
}];
|
|
@@ -833,7 +935,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
833
935
|
readonly threadMessageRecipient: {
|
|
834
936
|
message: [{
|
|
835
937
|
readonly sourceField: string[];
|
|
836
|
-
readonly destField: ("threadId" | "id" | "envelopeDate" | "
|
|
938
|
+
readonly destField: ("threadId" | "id" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
837
939
|
readonly destSchema: "threadMessage";
|
|
838
940
|
readonly cardinality: "one";
|
|
839
941
|
}];
|
|
@@ -841,7 +943,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
841
943
|
readonly threadMessageAttachment: {
|
|
842
944
|
message: [{
|
|
843
945
|
readonly sourceField: string[];
|
|
844
|
-
readonly destField: ("threadId" | "id" | "envelopeDate" | "
|
|
946
|
+
readonly destField: ("threadId" | "id" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
845
947
|
readonly destSchema: "threadMessage";
|
|
846
948
|
readonly cardinality: "one";
|
|
847
949
|
}];
|
|
@@ -855,7 +957,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
855
957
|
}];
|
|
856
958
|
message: [{
|
|
857
959
|
readonly sourceField: string[];
|
|
858
|
-
readonly destField: ("threadId" | "id" | "envelopeDate" | "
|
|
960
|
+
readonly destField: ("threadId" | "id" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
859
961
|
readonly destSchema: "threadMessage";
|
|
860
962
|
readonly cardinality: "one";
|
|
861
963
|
}];
|
|
@@ -868,13 +970,6 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
868
970
|
readonly id: string;
|
|
869
971
|
readonly name: string | null;
|
|
870
972
|
readonly userId: string;
|
|
871
|
-
} & {
|
|
872
|
-
readonly user: {
|
|
873
|
-
readonly id: string;
|
|
874
|
-
readonly name: string | null;
|
|
875
|
-
readonly profilePicture: string | null;
|
|
876
|
-
readonly undoSendEnabled: boolean;
|
|
877
|
-
} | undefined;
|
|
878
973
|
}>>;
|
|
879
974
|
export {};
|
|
880
975
|
//# sourceMappingURL=getContacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getContacts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getContacts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"getContacts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getContacts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAMlE,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE;QACN,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAgBD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BvB,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { syncedQueryWithContext } from '@rocicorp/zero';
|
|
2
2
|
import * as v from 'valibot';
|
|
3
3
|
import { z } from '../../zero/queries';
|
|
4
|
+
const MAX_LIMIT = 1000;
|
|
5
|
+
const DEFAULT_LIMIT = 50;
|
|
4
6
|
const parseArgs = (args) => {
|
|
5
7
|
const schema = v.object({
|
|
6
|
-
limit: v.number(),
|
|
8
|
+
limit: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(MAX_LIMIT)), DEFAULT_LIMIT),
|
|
7
9
|
search: v.optional(v.string()),
|
|
8
10
|
where: v.optional(v.object({
|
|
9
11
|
emailAddress: v.optional(v.string()),
|
|
@@ -13,7 +15,7 @@ const parseArgs = (args) => {
|
|
|
13
15
|
return [v.parse(schema, args[0])];
|
|
14
16
|
};
|
|
15
17
|
export const getContacts = syncedQueryWithContext('getContacts', parseArgs, ({ userId }, { search, limit, where }) => {
|
|
16
|
-
let query = z.contact.where('userId', userId).
|
|
18
|
+
let query = z.contact.where('userId', userId).orderBy('emailAddress', 'asc');
|
|
17
19
|
if (where?.emailAddress) {
|
|
18
20
|
query = query.where('emailAddress', 'ILIKE', where.emailAddress);
|
|
19
21
|
}
|
|
@@ -24,11 +26,8 @@ export const getContacts = syncedQueryWithContext('getContacts', parseArgs, ({ u
|
|
|
24
26
|
const sanitizedTerm = search.trim().toLowerCase();
|
|
25
27
|
const tokens = sanitizedTerm.split(/\s+/).filter(Boolean);
|
|
26
28
|
if (tokens.length > 0) {
|
|
27
|
-
query = query.where(({ and, or, cmp }) => and(...tokens.map(
|
|
29
|
+
query = query.where(({ and, or, cmp }) => and(...tokens.map(x => or(cmp('name', 'ILIKE', `%${x}%`), cmp('emailAddress', 'ILIKE', `%${x}%`)))));
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
query = query.limit(limit);
|
|
32
|
-
}
|
|
33
|
-
return query;
|
|
32
|
+
return query.limit(limit);
|
|
34
33
|
});
|