@marcoappio/marco-config 2.0.469 → 2.0.471
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 +0 -20
- 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 +18 -10
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +12 -11
- package/dist/zero/queries/getThreadList.d.ts +0 -10
- package/dist/zero/queries/getThreadList.d.ts.map +1 -1
- package/dist/zero/queries/getThreadList.js +0 -1
- package/dist/zero/queries/getThreads.d.ts +0 -10
- package/dist/zero/queries/getThreads.d.ts.map +1 -1
- package/dist/zero/queries/getThreads.js +0 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export { MARCO_ENV, MarcoEnvironment, marcoPublicConfig } from './marcoPublicCon
|
|
|
3
3
|
export { marcoSchemas } from './schemas';
|
|
4
4
|
export { marcoSDK } from './sdk';
|
|
5
5
|
export * from './types';
|
|
6
|
-
export { accountUtils, labelUtils, stringPatch } from './utils';
|
|
6
|
+
export { accountUtils, labelUtils, stringPatch, threadsUtils } from './utils';
|
|
7
7
|
export { type MarcoZeroMutators, marcoZero } from './zero';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC7E,OAAO,EAAE,KAAK,iBAAiB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export { MARCO_ENV, marcoPublicConfig } from './marcoPublicConfig';
|
|
|
3
3
|
export { marcoSchemas } from './schemas';
|
|
4
4
|
export { marcoSDK } from './sdk';
|
|
5
5
|
export * from './types';
|
|
6
|
-
export { accountUtils, labelUtils, stringPatch } from './utils';
|
|
6
|
+
export { accountUtils, labelUtils, stringPatch, threadsUtils } from './utils';
|
|
7
7
|
export { marcoZero } from './zero';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/threads/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/threads/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;CAGxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/parseLabelIdList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parseLabelIdList } from './parseLabelIdList';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseLabelIdList.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/parseLabelIdList/parseLabelIdList.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,KAAG,MAAM,EAM5D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseLabelIdList.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/parseLabelIdList/parseLabelIdList.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { parseLabelIdList } from './index';
|
|
3
|
+
describe('parseLabelIdList', () => {
|
|
4
|
+
const testCases = [
|
|
5
|
+
{ description: 'parses space-separated IDs', expected: ['id1', 'id2', 'id3'], input: ' id1 id2 id3 ' },
|
|
6
|
+
{ description: 'handles single ID', expected: ['id1'], input: ' id1 ' },
|
|
7
|
+
{ description: 'handles empty string', expected: [], input: '' },
|
|
8
|
+
{ description: 'handles whitespace only', expected: [], input: ' ' },
|
|
9
|
+
{ description: 'handles no padding', expected: ['id1', 'id2'], input: 'id1 id2' },
|
|
10
|
+
{ description: 'handles extra internal spaces', expected: ['id1', 'id2'], input: 'id1 id2' },
|
|
11
|
+
{ description: 'handles UUID-style IDs', expected: ['abc-123', 'def-456'], input: ' abc-123 def-456 ' },
|
|
12
|
+
];
|
|
13
|
+
for (const { input, expected, description } of testCases) {
|
|
14
|
+
it(`should ${description}`, () => {
|
|
15
|
+
expect(parseLabelIdList(input)).toEqual(expected);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
package/dist/zero/index.d.ts
CHANGED
|
@@ -4151,16 +4151,6 @@ export declare const marcoZero: {
|
|
|
4151
4151
|
readonly threadMessageId: string;
|
|
4152
4152
|
}[];
|
|
4153
4153
|
})[];
|
|
4154
|
-
} & {
|
|
4155
|
-
readonly labels: readonly {
|
|
4156
|
-
readonly accountId: string;
|
|
4157
|
-
readonly id: string;
|
|
4158
|
-
readonly name: string | null;
|
|
4159
|
-
readonly path: string;
|
|
4160
|
-
readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
|
|
4161
|
-
readonly uidValidity: number;
|
|
4162
|
-
readonly unreadCount: number;
|
|
4163
|
-
}[];
|
|
4164
4154
|
}>>;
|
|
4165
4155
|
readonly getThreads: import("@rocicorp/zero").SyncedQuery<"getThreads", import("..").MarcoSyncedQueryContext, true, [{
|
|
4166
4156
|
limit: number;
|
|
@@ -5131,16 +5121,6 @@ export declare const marcoZero: {
|
|
|
5131
5121
|
readonly threadMessageId: string;
|
|
5132
5122
|
}[];
|
|
5133
5123
|
})[];
|
|
5134
|
-
} & {
|
|
5135
|
-
readonly labels: readonly {
|
|
5136
|
-
readonly accountId: string;
|
|
5137
|
-
readonly id: string;
|
|
5138
|
-
readonly name: string | null;
|
|
5139
|
-
readonly path: string;
|
|
5140
|
-
readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
|
|
5141
|
-
readonly uidValidity: number;
|
|
5142
|
-
readonly unreadCount: number;
|
|
5143
|
-
}[];
|
|
5144
5124
|
}>>;
|
|
5145
5125
|
readonly getUser: import("@rocicorp/zero").SyncedQuery<"getUser", import("..").MarcoSyncedQueryContext, true, [], import("@rocicorp/zero").Query<{
|
|
5146
5126
|
tables: {
|
package/dist/zero/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MutationError } from '../../../types';
|
|
2
|
+
import { threadsUtils } from '../../../utils/threads';
|
|
2
3
|
const buildLabelIdList = (labelIds) => labelIds.length === 0 ? '' : ` ${[...new Set(labelIds)].join(' ')} `;
|
|
3
4
|
export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
4
5
|
const thread = await tx.query.thread.where('id', threadId).one().run();
|
|
@@ -182,17 +183,24 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
182
183
|
callbacks?.setInbox?.({ ...args, sourceLocations: allSourceLocations });
|
|
183
184
|
},
|
|
184
185
|
setSeen: async (tx, args) => {
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
const
|
|
186
|
+
const threads = await tx.query.thread.where('id', 'IN', args.threadIds).run();
|
|
187
|
+
const labelCounts = new Map();
|
|
188
|
+
for (const thread of threads) {
|
|
189
|
+
for (const labelId of threadsUtils.parseLabelIdList(thread.labelIdList)) {
|
|
190
|
+
labelCounts.set(labelId, (labelCounts.get(labelId) ?? 0) + 1);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (labelCounts.size > 0) {
|
|
194
|
+
const labels = await tx.query.accountLabel.where('id', 'IN', [...labelCounts.keys()]).run();
|
|
189
195
|
const delta = args.seen ? -1 : 1;
|
|
190
|
-
for (const label of labels
|
|
191
|
-
const threadCount =
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
+
for (const label of labels) {
|
|
197
|
+
const threadCount = labelCounts.get(label.id);
|
|
198
|
+
if (threadCount) {
|
|
199
|
+
await tx.mutate.accountLabel.update({
|
|
200
|
+
id: label.id,
|
|
201
|
+
unreadCount: Math.max(0, (label.unreadCount ?? 0) + delta * threadCount),
|
|
202
|
+
});
|
|
203
|
+
}
|
|
196
204
|
}
|
|
197
205
|
}
|
|
198
206
|
for (const threadId of args.threadIds) {
|
|
@@ -369,13 +369,13 @@ describe('threadMutators', () => {
|
|
|
369
369
|
it('sets thread seen status and updates unread count', async () => {
|
|
370
370
|
const threadUpdate = mock(async () => { });
|
|
371
371
|
const labelUpdate = mock(async () => { });
|
|
372
|
-
const
|
|
373
|
-
{
|
|
374
|
-
{
|
|
372
|
+
const threads = [
|
|
373
|
+
{ id: 'test-thread-id-1', labelIdList: ' test-inbox-label-id ' },
|
|
374
|
+
{ id: 'test-thread-id-2', labelIdList: ' test-inbox-label-id ' },
|
|
375
375
|
];
|
|
376
376
|
const labels = [{ id: 'test-inbox-label-id', specialUse: 'INBOX', unreadCount: 5 }];
|
|
377
|
-
const
|
|
378
|
-
const
|
|
377
|
+
const runThreads = mock(async () => threads);
|
|
378
|
+
const whereThread = mock(() => ({ run: runThreads }));
|
|
379
379
|
const runLabels = mock(async () => labels);
|
|
380
380
|
const whereLabel = mock(() => ({ run: runLabels }));
|
|
381
381
|
const transaction = {
|
|
@@ -391,8 +391,8 @@ describe('threadMutators', () => {
|
|
|
391
391
|
accountLabel: {
|
|
392
392
|
where: whereLabel,
|
|
393
393
|
},
|
|
394
|
-
|
|
395
|
-
where:
|
|
394
|
+
thread: {
|
|
395
|
+
where: whereThread,
|
|
396
396
|
},
|
|
397
397
|
},
|
|
398
398
|
};
|
|
@@ -418,8 +418,9 @@ describe('threadMutators', () => {
|
|
|
418
418
|
it('skips label update when threads have no labels', async () => {
|
|
419
419
|
const threadUpdate = mock(async () => { });
|
|
420
420
|
const labelUpdate = mock(async () => { });
|
|
421
|
-
const
|
|
422
|
-
const
|
|
421
|
+
const threads = [{ id: 'test-thread-id-1', labelIdList: '' }];
|
|
422
|
+
const runThreads = mock(async () => threads);
|
|
423
|
+
const whereThread = mock(() => ({ run: runThreads }));
|
|
423
424
|
const transaction = {
|
|
424
425
|
mutate: {
|
|
425
426
|
accountLabel: {
|
|
@@ -430,8 +431,8 @@ describe('threadMutators', () => {
|
|
|
430
431
|
},
|
|
431
432
|
},
|
|
432
433
|
query: {
|
|
433
|
-
|
|
434
|
-
where:
|
|
434
|
+
thread: {
|
|
435
|
+
where: whereThread,
|
|
435
436
|
},
|
|
436
437
|
},
|
|
437
438
|
};
|
|
@@ -961,16 +961,6 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
|
|
|
961
961
|
readonly threadMessageId: string;
|
|
962
962
|
}[];
|
|
963
963
|
})[];
|
|
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
964
|
}>>;
|
|
975
965
|
export {};
|
|
976
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.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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);
|
|
@@ -969,16 +969,6 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
|
|
|
969
969
|
readonly threadMessageId: string;
|
|
970
970
|
}[];
|
|
971
971
|
})[];
|
|
972
|
-
} & {
|
|
973
|
-
readonly labels: readonly {
|
|
974
|
-
readonly accountId: string;
|
|
975
|
-
readonly id: string;
|
|
976
|
-
readonly name: string | null;
|
|
977
|
-
readonly path: string;
|
|
978
|
-
readonly specialUse: "ARCHIVE" | "INBOX" | "SENT" | "SPAM" | "TRASH" | null;
|
|
979
|
-
readonly uidValidity: number;
|
|
980
|
-
readonly unreadCount: number;
|
|
981
|
-
}[];
|
|
982
972
|
}>>;
|
|
983
973
|
export {};
|
|
984
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,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,UAAU
|
|
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,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,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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);
|