@marcoappio/marco-config 2.0.468 → 2.0.470
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/threads/index.d.ts +1 -0
- package/dist/utils/threads/index.d.ts.map +1 -1
- package/dist/utils/threads/index.js +2 -0
- package/dist/utils/threads/parseLabelIdList/index.d.ts +2 -0
- package/dist/utils/threads/parseLabelIdList/index.d.ts.map +1 -0
- package/dist/utils/threads/parseLabelIdList/index.js +1 -0
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.d.ts +2 -0
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.d.ts.map +1 -0
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.js +8 -0
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.test.d.ts +2 -0
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.test.d.ts.map +1 -0
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.test.js +18 -0
- package/dist/zero/index.d.ts +93 -55
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.js +15 -0
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +62 -2
- package/dist/zero/queries/getAccounts.d.ts +12 -5
- package/dist/zero/queries/getAccounts.d.ts.map +1 -1
- package/dist/zero/queries/getContacts.d.ts +12 -5
- package/dist/zero/queries/getContacts.d.ts.map +1 -1
- package/dist/zero/queries/getDrafts.d.ts +12 -5
- package/dist/zero/queries/getDrafts.d.ts.map +1 -1
- package/dist/zero/queries/getThreadList.d.ts +13 -15
- package/dist/zero/queries/getThreadList.d.ts.map +1 -1
- package/dist/zero/queries/getThreadList.js +1 -2
- package/dist/zero/queries/getThreads.d.ts +13 -15
- package/dist/zero/queries/getThreads.d.ts.map +1 -1
- package/dist/zero/queries/getThreads.js +1 -2
- package/dist/zero/queries/getUser.d.ts +12 -5
- package/dist/zero/queries/getUser.d.ts.map +1 -1
- package/dist/zero/queries/index.d.ts +12 -5
- package/dist/zero/queries/index.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +19 -5
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threadMutators.d.ts","sourceRoot":"","sources":["../../../../src/zero/mutators/threadMutators/threadMutators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAiB,MAAM,qBAAqB,CAAA;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,MAAM,sBAAsB,GAAG;KAClC,CAAC,IAAI,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAC1C,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAC1D,OAAO,CAAC,IAAI,CAAC;CACnB,CAAA;
|
|
1
|
+
{"version":3,"file":"threadMutators.d.ts","sourceRoot":"","sources":["../../../../src/zero/mutators/threadMutators/threadMutators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAiB,MAAM,qBAAqB,CAAA;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,MAAM,sBAAsB,GAAG;KAClC,CAAC,IAAI,MAAM,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAC1C,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAC1D,OAAO,CAAC,IAAI,CAAC;CACnB,CAAA;AAKD,eAAO,MAAM,cAAc,OACrB,WAAW,CAAC,eAAe,CAAC,YACtB,MAAM,oBACE,eAAe,KAChC,OAAO,CAAC,kBAAkB,EAAE,CAyE9B,CAAA;AAED,eAAO,MAAM,oBAAoB,cACpB,QAAQ,GAAG,SAAS,cACnB,sBAAsB,KACjC,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAmMxC,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MutationError } from '../../../types';
|
|
2
|
+
const buildLabelIdList = (labelIds) => labelIds.length === 0 ? '' : ` ${[...new Set(labelIds)].join(' ')} `;
|
|
2
3
|
export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
3
4
|
const thread = await tx.query.thread.where('id', threadId).one().run();
|
|
4
5
|
if (!thread) {
|
|
@@ -54,6 +55,10 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
}
|
|
58
|
+
await tx.mutate.thread.update({
|
|
59
|
+
id: threadId,
|
|
60
|
+
labelIdList: buildLabelIdList([targetLabel.id]),
|
|
61
|
+
});
|
|
57
62
|
return sourceLocations;
|
|
58
63
|
};
|
|
59
64
|
export const createThreadMutators = (_authData, callbacks) => ({
|
|
@@ -93,6 +98,11 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
93
98
|
insertIndex++;
|
|
94
99
|
}
|
|
95
100
|
}
|
|
101
|
+
const allLabels = await tx.query.threadLabel.where('threadId', threadId).run();
|
|
102
|
+
await tx.mutate.thread.update({
|
|
103
|
+
id: threadId,
|
|
104
|
+
labelIdList: buildLabelIdList([...new Set(allLabels.map(x => x.labelId))]),
|
|
105
|
+
});
|
|
96
106
|
}
|
|
97
107
|
callbacks?.addLabel?.({ ...args, sourceLocations: [] });
|
|
98
108
|
},
|
|
@@ -138,6 +148,11 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
138
148
|
threadMessageId: existing.threadMessageId,
|
|
139
149
|
});
|
|
140
150
|
}
|
|
151
|
+
const remainingLabels = await tx.query.threadLabel.where('threadId', threadId).run();
|
|
152
|
+
await tx.mutate.thread.update({
|
|
153
|
+
id: threadId,
|
|
154
|
+
labelIdList: buildLabelIdList([...new Set(remainingLabels.map(x => x.labelId))]),
|
|
155
|
+
});
|
|
141
156
|
}
|
|
142
157
|
callbacks?.removeLabel?.({ ...args, sourceLocations: allSourceLocations });
|
|
143
158
|
},
|
|
@@ -25,10 +25,20 @@ describe('threadMutators', () => {
|
|
|
25
25
|
const runExisting = mock(async () => null);
|
|
26
26
|
const oneExisting = mock(() => ({ run: runExisting }));
|
|
27
27
|
const whereLabelId = mock(() => ({ one: oneExisting }));
|
|
28
|
-
const
|
|
28
|
+
const runAllThreadLabels = mock(async () => [{ labelId: 'test-label-id-1', threadId: 'test-thread-id-1' }]);
|
|
29
|
+
const whereThreadLabel = mock((field) => {
|
|
30
|
+
if (field === 'threadId') {
|
|
31
|
+
return { run: runAllThreadLabels, where: whereLabelId };
|
|
32
|
+
}
|
|
33
|
+
return { where: whereLabelId };
|
|
34
|
+
});
|
|
29
35
|
const threadLabelInsert = mock(async () => { });
|
|
36
|
+
const threadUpdate = mock(async () => { });
|
|
30
37
|
const transaction = {
|
|
31
38
|
mutate: {
|
|
39
|
+
thread: {
|
|
40
|
+
update: threadUpdate,
|
|
41
|
+
},
|
|
32
42
|
threadLabel: {
|
|
33
43
|
delete: mock(async () => { }),
|
|
34
44
|
insert: threadLabelInsert,
|
|
@@ -68,6 +78,10 @@ describe('threadMutators', () => {
|
|
|
68
78
|
threadId: 'test-thread-id-1',
|
|
69
79
|
threadMessageId: 'test-message-id-2',
|
|
70
80
|
}));
|
|
81
|
+
expect(threadUpdate).toHaveBeenCalledWith({
|
|
82
|
+
id: 'test-thread-id-1',
|
|
83
|
+
labelIdList: ' test-label-id-1 ',
|
|
84
|
+
});
|
|
71
85
|
});
|
|
72
86
|
});
|
|
73
87
|
describe('delete', () => {
|
|
@@ -125,11 +139,21 @@ describe('threadMutators', () => {
|
|
|
125
139
|
const whereLabelPath = mock(() => ({ one: oneLabel }));
|
|
126
140
|
const whereLabelAccount = mock(() => ({ where: whereLabelPath }));
|
|
127
141
|
const runExisting = mock(async () => existingRecords);
|
|
142
|
+
const runRemainingLabels = mock(async () => []);
|
|
128
143
|
const whereLabelId = mock(() => ({ run: runExisting }));
|
|
129
|
-
const whereThreadLabel = mock(() =>
|
|
144
|
+
const whereThreadLabel = mock((field) => {
|
|
145
|
+
if (field === 'threadId') {
|
|
146
|
+
return { run: runRemainingLabels, where: whereLabelId };
|
|
147
|
+
}
|
|
148
|
+
return { where: whereLabelId };
|
|
149
|
+
});
|
|
130
150
|
const threadLabelDelete = mock(async () => { });
|
|
151
|
+
const threadUpdate = mock(async () => { });
|
|
131
152
|
const transaction = {
|
|
132
153
|
mutate: {
|
|
154
|
+
thread: {
|
|
155
|
+
update: threadUpdate,
|
|
156
|
+
},
|
|
133
157
|
threadLabel: {
|
|
134
158
|
delete: threadLabelDelete,
|
|
135
159
|
},
|
|
@@ -163,6 +187,10 @@ describe('threadMutators', () => {
|
|
|
163
187
|
labelId: 'test-label-id-1',
|
|
164
188
|
threadMessageId: 'test-message-id-2',
|
|
165
189
|
});
|
|
190
|
+
expect(threadUpdate).toHaveBeenCalledWith({
|
|
191
|
+
id: 'test-thread-id-1',
|
|
192
|
+
labelIdList: '',
|
|
193
|
+
});
|
|
166
194
|
});
|
|
167
195
|
});
|
|
168
196
|
describe('setArchive', () => {
|
|
@@ -192,8 +220,12 @@ describe('threadMutators', () => {
|
|
|
192
220
|
const whereMessages = mock(() => ({ run: runMessages }));
|
|
193
221
|
const threadLabelDelete = mock(async () => { });
|
|
194
222
|
const threadLabelInsert = mock(async () => { });
|
|
223
|
+
const threadUpdate = mock(async () => { });
|
|
195
224
|
const transaction = {
|
|
196
225
|
mutate: {
|
|
226
|
+
thread: {
|
|
227
|
+
update: threadUpdate,
|
|
228
|
+
},
|
|
197
229
|
threadLabel: {
|
|
198
230
|
delete: threadLabelDelete,
|
|
199
231
|
insert: threadLabelInsert,
|
|
@@ -230,6 +262,10 @@ describe('threadMutators', () => {
|
|
|
230
262
|
threadId: 'test-thread-id-1',
|
|
231
263
|
threadMessageId: 'test-message-id-1',
|
|
232
264
|
}));
|
|
265
|
+
expect(threadUpdate).toHaveBeenCalledWith({
|
|
266
|
+
id: 'test-thread-id-1',
|
|
267
|
+
labelIdList: ' test-archive-label-id ',
|
|
268
|
+
});
|
|
233
269
|
});
|
|
234
270
|
});
|
|
235
271
|
describe('setFlagged', () => {
|
|
@@ -281,8 +317,12 @@ describe('threadMutators', () => {
|
|
|
281
317
|
const whereMessages = mock(() => ({ run: runMessages }));
|
|
282
318
|
const threadLabelDelete = mock(async () => { });
|
|
283
319
|
const threadLabelInsert = mock(async () => { });
|
|
320
|
+
const threadUpdate = mock(async () => { });
|
|
284
321
|
const transaction = {
|
|
285
322
|
mutate: {
|
|
323
|
+
thread: {
|
|
324
|
+
update: threadUpdate,
|
|
325
|
+
},
|
|
286
326
|
threadLabel: {
|
|
287
327
|
delete: threadLabelDelete,
|
|
288
328
|
insert: threadLabelInsert,
|
|
@@ -319,6 +359,10 @@ describe('threadMutators', () => {
|
|
|
319
359
|
threadId: 'test-thread-id-1',
|
|
320
360
|
threadMessageId: 'test-message-id-1',
|
|
321
361
|
}));
|
|
362
|
+
expect(threadUpdate).toHaveBeenCalledWith({
|
|
363
|
+
id: 'test-thread-id-1',
|
|
364
|
+
labelIdList: ' test-inbox-label-id ',
|
|
365
|
+
});
|
|
322
366
|
});
|
|
323
367
|
});
|
|
324
368
|
describe('setSeen', () => {
|
|
@@ -424,8 +468,12 @@ describe('threadMutators', () => {
|
|
|
424
468
|
const runMessages = mock(async () => messageRecords);
|
|
425
469
|
const whereMessages = mock(() => ({ run: runMessages }));
|
|
426
470
|
const threadLabelInsert = mock(async () => { });
|
|
471
|
+
const threadUpdate = mock(async () => { });
|
|
427
472
|
const transaction = {
|
|
428
473
|
mutate: {
|
|
474
|
+
thread: {
|
|
475
|
+
update: threadUpdate,
|
|
476
|
+
},
|
|
429
477
|
threadLabel: {
|
|
430
478
|
insert: threadLabelInsert,
|
|
431
479
|
},
|
|
@@ -456,6 +504,10 @@ describe('threadMutators', () => {
|
|
|
456
504
|
threadId: 'test-thread-id-1',
|
|
457
505
|
threadMessageId: 'test-message-id-1',
|
|
458
506
|
}));
|
|
507
|
+
expect(threadUpdate).toHaveBeenCalledWith({
|
|
508
|
+
id: 'test-thread-id-1',
|
|
509
|
+
labelIdList: ' test-spam-label-id ',
|
|
510
|
+
});
|
|
459
511
|
});
|
|
460
512
|
});
|
|
461
513
|
describe('setTrash', () => {
|
|
@@ -482,8 +534,12 @@ describe('threadMutators', () => {
|
|
|
482
534
|
const runMessages = mock(async () => messageRecords);
|
|
483
535
|
const whereMessages = mock(() => ({ run: runMessages }));
|
|
484
536
|
const threadLabelInsert = mock(async () => { });
|
|
537
|
+
const threadUpdate = mock(async () => { });
|
|
485
538
|
const transaction = {
|
|
486
539
|
mutate: {
|
|
540
|
+
thread: {
|
|
541
|
+
update: threadUpdate,
|
|
542
|
+
},
|
|
487
543
|
threadLabel: {
|
|
488
544
|
insert: threadLabelInsert,
|
|
489
545
|
},
|
|
@@ -514,6 +570,10 @@ describe('threadMutators', () => {
|
|
|
514
570
|
threadId: 'test-thread-id-1',
|
|
515
571
|
threadMessageId: 'test-message-id-1',
|
|
516
572
|
}));
|
|
573
|
+
expect(threadUpdate).toHaveBeenCalledWith({
|
|
574
|
+
id: 'test-thread-id-1',
|
|
575
|
+
labelIdList: ' test-trash-label-id ',
|
|
576
|
+
});
|
|
517
577
|
});
|
|
518
578
|
});
|
|
519
579
|
});
|
|
@@ -442,6 +442,13 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
442
442
|
optional: false;
|
|
443
443
|
customType: string;
|
|
444
444
|
};
|
|
445
|
+
readonly labelIdList: {
|
|
446
|
+
type: "string";
|
|
447
|
+
optional: false;
|
|
448
|
+
customType: string;
|
|
449
|
+
} & {
|
|
450
|
+
serverName: string;
|
|
451
|
+
};
|
|
445
452
|
readonly latestMessageDate: {
|
|
446
453
|
type: "number";
|
|
447
454
|
optional: false;
|
|
@@ -699,7 +706,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
699
706
|
}];
|
|
700
707
|
threads: [{
|
|
701
708
|
readonly sourceField: string[];
|
|
702
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
709
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
703
710
|
readonly destSchema: "thread";
|
|
704
711
|
readonly cardinality: "many";
|
|
705
712
|
}];
|
|
@@ -747,7 +754,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
747
754
|
}];
|
|
748
755
|
threads: [{
|
|
749
756
|
readonly sourceField: string[];
|
|
750
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
757
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
751
758
|
readonly destSchema: "thread";
|
|
752
759
|
readonly cardinality: "many";
|
|
753
760
|
}];
|
|
@@ -780,7 +787,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
780
787
|
readonly cardinality: "many";
|
|
781
788
|
}, {
|
|
782
789
|
readonly sourceField: string[];
|
|
783
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
790
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
784
791
|
readonly destSchema: "thread";
|
|
785
792
|
readonly cardinality: "many";
|
|
786
793
|
}];
|
|
@@ -859,7 +866,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
859
866
|
}];
|
|
860
867
|
thread: [{
|
|
861
868
|
readonly sourceField: string[];
|
|
862
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
869
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
863
870
|
readonly destSchema: "thread";
|
|
864
871
|
readonly cardinality: "one";
|
|
865
872
|
}];
|
|
@@ -890,7 +897,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
|
|
|
890
897
|
}];
|
|
891
898
|
thread: [{
|
|
892
899
|
readonly sourceField: string[];
|
|
893
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
900
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
894
901
|
readonly destSchema: "thread";
|
|
895
902
|
readonly cardinality: "one";
|
|
896
903
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAccounts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getAccounts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"getAccounts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getAccounts.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEvB,CAAA"}
|
|
@@ -451,6 +451,13 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
451
451
|
optional: false;
|
|
452
452
|
customType: string;
|
|
453
453
|
};
|
|
454
|
+
readonly labelIdList: {
|
|
455
|
+
type: "string";
|
|
456
|
+
optional: false;
|
|
457
|
+
customType: string;
|
|
458
|
+
} & {
|
|
459
|
+
serverName: string;
|
|
460
|
+
};
|
|
454
461
|
readonly latestMessageDate: {
|
|
455
462
|
type: "number";
|
|
456
463
|
optional: false;
|
|
@@ -708,7 +715,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
708
715
|
}];
|
|
709
716
|
threads: [{
|
|
710
717
|
readonly sourceField: string[];
|
|
711
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
718
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
712
719
|
readonly destSchema: "thread";
|
|
713
720
|
readonly cardinality: "many";
|
|
714
721
|
}];
|
|
@@ -756,7 +763,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
756
763
|
}];
|
|
757
764
|
threads: [{
|
|
758
765
|
readonly sourceField: string[];
|
|
759
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
766
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
760
767
|
readonly destSchema: "thread";
|
|
761
768
|
readonly cardinality: "many";
|
|
762
769
|
}];
|
|
@@ -789,7 +796,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
789
796
|
readonly cardinality: "many";
|
|
790
797
|
}, {
|
|
791
798
|
readonly sourceField: string[];
|
|
792
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
799
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
793
800
|
readonly destSchema: "thread";
|
|
794
801
|
readonly cardinality: "many";
|
|
795
802
|
}];
|
|
@@ -868,7 +875,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
868
875
|
}];
|
|
869
876
|
thread: [{
|
|
870
877
|
readonly sourceField: string[];
|
|
871
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
878
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
872
879
|
readonly destSchema: "thread";
|
|
873
880
|
readonly cardinality: "one";
|
|
874
881
|
}];
|
|
@@ -899,7 +906,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
|
|
|
899
906
|
}];
|
|
900
907
|
thread: [{
|
|
901
908
|
readonly sourceField: string[];
|
|
902
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
909
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
903
910
|
readonly destSchema: "thread";
|
|
904
911
|
readonly cardinality: "one";
|
|
905
912
|
}];
|
|
@@ -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;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,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAiBD,eAAO,MAAM,WAAW
|
|
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,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;QACd,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;CACF,CAAA;AAiBD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BvB,CAAA"}
|
|
@@ -448,6 +448,13 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
448
448
|
optional: false;
|
|
449
449
|
customType: string;
|
|
450
450
|
};
|
|
451
|
+
readonly labelIdList: {
|
|
452
|
+
type: "string";
|
|
453
|
+
optional: false;
|
|
454
|
+
customType: string;
|
|
455
|
+
} & {
|
|
456
|
+
serverName: string;
|
|
457
|
+
};
|
|
451
458
|
readonly latestMessageDate: {
|
|
452
459
|
type: "number";
|
|
453
460
|
optional: false;
|
|
@@ -705,7 +712,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
705
712
|
}];
|
|
706
713
|
threads: [{
|
|
707
714
|
readonly sourceField: string[];
|
|
708
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
715
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
709
716
|
readonly destSchema: "thread";
|
|
710
717
|
readonly cardinality: "many";
|
|
711
718
|
}];
|
|
@@ -753,7 +760,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
753
760
|
}];
|
|
754
761
|
threads: [{
|
|
755
762
|
readonly sourceField: string[];
|
|
756
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
763
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
757
764
|
readonly destSchema: "thread";
|
|
758
765
|
readonly cardinality: "many";
|
|
759
766
|
}];
|
|
@@ -786,7 +793,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
786
793
|
readonly cardinality: "many";
|
|
787
794
|
}, {
|
|
788
795
|
readonly sourceField: string[];
|
|
789
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
796
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
790
797
|
readonly destSchema: "thread";
|
|
791
798
|
readonly cardinality: "many";
|
|
792
799
|
}];
|
|
@@ -865,7 +872,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
865
872
|
}];
|
|
866
873
|
thread: [{
|
|
867
874
|
readonly sourceField: string[];
|
|
868
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
875
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
869
876
|
readonly destSchema: "thread";
|
|
870
877
|
readonly cardinality: "one";
|
|
871
878
|
}];
|
|
@@ -896,7 +903,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
|
|
|
896
903
|
}];
|
|
897
904
|
thread: [{
|
|
898
905
|
readonly sourceField: string[];
|
|
899
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
906
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
900
907
|
readonly destSchema: "thread";
|
|
901
908
|
readonly cardinality: "one";
|
|
902
909
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDrafts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getDrafts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMpD,KAAK,aAAa,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;CACzC,CAAA;AAWD,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"getDrafts.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getDrafts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAMpD,KAAK,aAAa,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;CACzC,CAAA;AAWD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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|
|
457
|
+
readonly labelIdList: {
|
|
458
|
+
type: "string";
|
|
459
|
+
optional: false;
|
|
460
|
+
customType: string;
|
|
461
|
+
} & {
|
|
462
|
+
serverName: string;
|
|
463
|
+
};
|
|
457
464
|
readonly latestMessageDate: {
|
|
458
465
|
type: "number";
|
|
459
466
|
optional: false;
|
|
@@ -711,7 +718,7 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
711
718
|
}];
|
|
712
719
|
threads: [{
|
|
713
720
|
readonly sourceField: string[];
|
|
714
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
721
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
715
722
|
readonly destSchema: "thread";
|
|
716
723
|
readonly cardinality: "many";
|
|
717
724
|
}];
|
|
@@ -759,7 +766,7 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
759
766
|
}];
|
|
760
767
|
threads: [{
|
|
761
768
|
readonly sourceField: string[];
|
|
762
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
769
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
763
770
|
readonly destSchema: "thread";
|
|
764
771
|
readonly cardinality: "many";
|
|
765
772
|
}];
|
|
@@ -792,7 +799,7 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
792
799
|
readonly cardinality: "many";
|
|
793
800
|
}, {
|
|
794
801
|
readonly sourceField: string[];
|
|
795
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
802
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
796
803
|
readonly destSchema: "thread";
|
|
797
804
|
readonly cardinality: "many";
|
|
798
805
|
}];
|
|
@@ -871,7 +878,7 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
871
878
|
}];
|
|
872
879
|
thread: [{
|
|
873
880
|
readonly sourceField: string[];
|
|
874
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
881
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
875
882
|
readonly destSchema: "thread";
|
|
876
883
|
readonly cardinality: "one";
|
|
877
884
|
}];
|
|
@@ -902,7 +909,7 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
902
909
|
}];
|
|
903
910
|
thread: [{
|
|
904
911
|
readonly sourceField: string[];
|
|
905
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
912
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
906
913
|
readonly destSchema: "thread";
|
|
907
914
|
readonly cardinality: "one";
|
|
908
915
|
}];
|
|
@@ -930,6 +937,7 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
930
937
|
readonly accountId: string;
|
|
931
938
|
readonly flagged: boolean;
|
|
932
939
|
readonly id: string;
|
|
940
|
+
readonly labelIdList: string;
|
|
933
941
|
readonly latestMessageDate: number;
|
|
934
942
|
readonly seen: boolean;
|
|
935
943
|
readonly userId: string;
|
|
@@ -953,16 +961,6 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
953
961
|
readonly threadMessageId: string;
|
|
954
962
|
}[];
|
|
955
963
|
})[];
|
|
956
|
-
} & {
|
|
957
|
-
readonly labels: readonly {
|
|
958
|
-
readonly accountId: string;
|
|
959
|
-
readonly id: string;
|
|
960
|
-
readonly name: string | null;
|
|
961
|
-
readonly path: string;
|
|
962
|
-
readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
|
|
963
|
-
readonly uidValidity: number;
|
|
964
|
-
readonly unreadCount: number;
|
|
965
|
-
}[];
|
|
966
964
|
}>>;
|
|
967
965
|
export {};
|
|
968
966
|
//# sourceMappingURL=getThreadList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThreadList.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getThreadList.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAOlE,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;QACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;QACvB,IAAI,CAAC,EAAE,OAAO,CAAA;KACf,CAAA;CACF,CAAA;AAoBD,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"getThreadList.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getThreadList.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAOlE,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;QACrB,YAAY,CAAC,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;;;;;;;;;;;;;;GAmDzB,CAAA"}
|
|
@@ -23,7 +23,6 @@ export const getThreadList = syncedQueryWithContext('getThreadList', parseArgs,
|
|
|
23
23
|
let query = z.thread
|
|
24
24
|
.where('userId', userId)
|
|
25
25
|
.related('messages', x => x.related('attachments').orderBy('envelopeDate', 'asc'))
|
|
26
|
-
.related('labels')
|
|
27
26
|
.orderBy('latestMessageDate', 'desc');
|
|
28
27
|
if (where?.id) {
|
|
29
28
|
query = query.where('id', where.id);
|
|
@@ -36,7 +35,7 @@ export const getThreadList = syncedQueryWithContext('getThreadList', parseArgs,
|
|
|
36
35
|
}
|
|
37
36
|
if (where?.labelIds && where.labelIds.length > 0) {
|
|
38
37
|
for (const labelId of where.labelIds) {
|
|
39
|
-
query = query.
|
|
38
|
+
query = query.where('labelIdList', 'LIKE', `% ${labelId} %`);
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
if (where?.messageIds && where.messageIds.length > 0) {
|
|
@@ -454,6 +454,13 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
454
454
|
optional: false;
|
|
455
455
|
customType: string;
|
|
456
456
|
};
|
|
457
|
+
readonly labelIdList: {
|
|
458
|
+
type: "string";
|
|
459
|
+
optional: false;
|
|
460
|
+
customType: string;
|
|
461
|
+
} & {
|
|
462
|
+
serverName: string;
|
|
463
|
+
};
|
|
457
464
|
readonly latestMessageDate: {
|
|
458
465
|
type: "number";
|
|
459
466
|
optional: false;
|
|
@@ -711,7 +718,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
711
718
|
}];
|
|
712
719
|
threads: [{
|
|
713
720
|
readonly sourceField: string[];
|
|
714
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
721
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
715
722
|
readonly destSchema: "thread";
|
|
716
723
|
readonly cardinality: "many";
|
|
717
724
|
}];
|
|
@@ -759,7 +766,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
759
766
|
}];
|
|
760
767
|
threads: [{
|
|
761
768
|
readonly sourceField: string[];
|
|
762
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
769
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
763
770
|
readonly destSchema: "thread";
|
|
764
771
|
readonly cardinality: "many";
|
|
765
772
|
}];
|
|
@@ -792,7 +799,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
792
799
|
readonly cardinality: "many";
|
|
793
800
|
}, {
|
|
794
801
|
readonly sourceField: string[];
|
|
795
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
802
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
796
803
|
readonly destSchema: "thread";
|
|
797
804
|
readonly cardinality: "many";
|
|
798
805
|
}];
|
|
@@ -871,7 +878,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
871
878
|
}];
|
|
872
879
|
thread: [{
|
|
873
880
|
readonly sourceField: string[];
|
|
874
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
881
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
875
882
|
readonly destSchema: "thread";
|
|
876
883
|
readonly cardinality: "one";
|
|
877
884
|
}];
|
|
@@ -902,7 +909,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
902
909
|
}];
|
|
903
910
|
thread: [{
|
|
904
911
|
readonly sourceField: string[];
|
|
905
|
-
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
912
|
+
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "labelIdList" | "latestMessageDate" | "seen" | "words")[];
|
|
906
913
|
readonly destSchema: "thread";
|
|
907
914
|
readonly cardinality: "one";
|
|
908
915
|
}];
|
|
@@ -930,6 +937,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
930
937
|
readonly accountId: string;
|
|
931
938
|
readonly flagged: boolean;
|
|
932
939
|
readonly id: string;
|
|
940
|
+
readonly labelIdList: string;
|
|
933
941
|
readonly latestMessageDate: number;
|
|
934
942
|
readonly seen: boolean;
|
|
935
943
|
readonly userId: string;
|
|
@@ -961,16 +969,6 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
961
969
|
readonly threadMessageId: string;
|
|
962
970
|
}[];
|
|
963
971
|
})[];
|
|
964
|
-
} & {
|
|
965
|
-
readonly labels: readonly {
|
|
966
|
-
readonly accountId: string;
|
|
967
|
-
readonly id: string;
|
|
968
|
-
readonly name: string | null;
|
|
969
|
-
readonly path: string;
|
|
970
|
-
readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
|
|
971
|
-
readonly uidValidity: number;
|
|
972
|
-
readonly unreadCount: number;
|
|
973
|
-
}[];
|
|
974
972
|
}>>;
|
|
975
973
|
export {};
|
|
976
974
|
//# sourceMappingURL=getThreads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getThreads.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getThreads.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAOlE,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDtB,CAAA"}
|
|
@@ -23,7 +23,6 @@ export const getThreads = syncedQueryWithContext('getThreads', parseArgs, ({ use
|
|
|
23
23
|
let query = z.thread
|
|
24
24
|
.where('userId', userId)
|
|
25
25
|
.related('messages', x => x.related('recipients').related('attachments').orderBy('envelopeDate', 'asc'))
|
|
26
|
-
.related('labels')
|
|
27
26
|
.orderBy('latestMessageDate', 'desc');
|
|
28
27
|
if (where?.id) {
|
|
29
28
|
query = query.where('id', where.id);
|
|
@@ -36,7 +35,7 @@ export const getThreads = syncedQueryWithContext('getThreads', parseArgs, ({ use
|
|
|
36
35
|
}
|
|
37
36
|
if (where?.labelIds && where.labelIds.length > 0) {
|
|
38
37
|
for (const labelId of where.labelIds) {
|
|
39
|
-
query = query.
|
|
38
|
+
query = query.where('labelIdList', 'LIKE', `% ${labelId} %`);
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
if (where?.messageIds && where.messageIds.length > 0) {
|