@marcoappio/marco-config 2.0.472 → 2.0.474

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.
@@ -884,6 +884,13 @@ export declare const marcoZero: {
884
884
  } & {
885
885
  serverName: string;
886
886
  };
887
+ readonly latestMessageDate: {
888
+ type: "number";
889
+ optional: false;
890
+ customType: number;
891
+ } & {
892
+ serverName: string;
893
+ };
887
894
  readonly threadId: {
888
895
  type: "string";
889
896
  optional: false;
@@ -1209,7 +1216,7 @@ export declare const marcoZero: {
1209
1216
  }];
1210
1217
  threadByLabel: [{
1211
1218
  readonly sourceField: string[];
1212
- readonly destField: ("labelId" | "threadId")[];
1219
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
1213
1220
  readonly destSchema: "threadByLabel";
1214
1221
  readonly cardinality: "many";
1215
1222
  }];
@@ -1892,6 +1899,13 @@ export declare const marcoZero: {
1892
1899
  } & {
1893
1900
  serverName: string;
1894
1901
  };
1902
+ readonly latestMessageDate: {
1903
+ type: "number";
1904
+ optional: false;
1905
+ customType: number;
1906
+ } & {
1907
+ serverName: string;
1908
+ };
1895
1909
  readonly threadId: {
1896
1910
  type: "string";
1897
1911
  optional: false;
@@ -2217,7 +2231,7 @@ export declare const marcoZero: {
2217
2231
  }];
2218
2232
  threadByLabel: [{
2219
2233
  readonly sourceField: string[];
2220
- readonly destField: ("labelId" | "threadId")[];
2234
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
2221
2235
  readonly destSchema: "threadByLabel";
2222
2236
  readonly cardinality: "many";
2223
2237
  }];
@@ -2866,6 +2880,13 @@ export declare const marcoZero: {
2866
2880
  } & {
2867
2881
  serverName: string;
2868
2882
  };
2883
+ readonly latestMessageDate: {
2884
+ type: "number";
2885
+ optional: false;
2886
+ customType: number;
2887
+ } & {
2888
+ serverName: string;
2889
+ };
2869
2890
  readonly threadId: {
2870
2891
  type: "string";
2871
2892
  optional: false;
@@ -3191,7 +3212,7 @@ export declare const marcoZero: {
3191
3212
  }];
3192
3213
  threadByLabel: [{
3193
3214
  readonly sourceField: string[];
3194
- readonly destField: ("labelId" | "threadId")[];
3215
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
3195
3216
  readonly destSchema: "threadByLabel";
3196
3217
  readonly cardinality: "many";
3197
3218
  }];
@@ -3317,12 +3338,12 @@ export declare const marcoZero: {
3317
3338
  }[];
3318
3339
  }>>;
3319
3340
  readonly getThreadList: import("@rocicorp/zero").SyncedQuery<"getThreadList", import("..").MarcoSyncedQueryContext, true, [{
3341
+ labelIds: [string, ...string[]];
3320
3342
  limit: number;
3321
3343
  search?: string;
3322
3344
  where?: {
3323
3345
  flagged?: boolean;
3324
3346
  id?: string;
3325
- labelIds?: string[];
3326
3347
  messageIds?: string[];
3327
3348
  participants?: string[];
3328
3349
  seen?: boolean;
@@ -3871,6 +3892,13 @@ export declare const marcoZero: {
3871
3892
  } & {
3872
3893
  serverName: string;
3873
3894
  };
3895
+ readonly latestMessageDate: {
3896
+ type: "number";
3897
+ optional: false;
3898
+ customType: number;
3899
+ } & {
3900
+ serverName: string;
3901
+ };
3874
3902
  readonly threadId: {
3875
3903
  type: "string";
3876
3904
  optional: false;
@@ -4196,7 +4224,7 @@ export declare const marcoZero: {
4196
4224
  }];
4197
4225
  threadByLabel: [{
4198
4226
  readonly sourceField: string[];
4199
- readonly destField: ("labelId" | "threadId")[];
4227
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
4200
4228
  readonly destSchema: "threadByLabel";
4201
4229
  readonly cardinality: "many";
4202
4230
  }];
@@ -4291,42 +4319,48 @@ export declare const marcoZero: {
4291
4319
  };
4292
4320
  enableLegacyQueries: boolean | undefined;
4293
4321
  enableLegacyMutators: false;
4294
- }, "thread", {
4295
- readonly accountId: string;
4296
- readonly flagged: boolean;
4297
- readonly id: string;
4298
- readonly labelIdList: string;
4322
+ }, "threadByLabel", {
4323
+ readonly labelId: string;
4299
4324
  readonly latestMessageDate: number;
4300
- readonly seen: boolean;
4301
- readonly userId: string;
4302
- readonly words: string;
4325
+ readonly threadId: string;
4303
4326
  } & {
4304
- readonly messages: readonly ({
4327
+ readonly thread: ({
4305
4328
  readonly accountId: string;
4306
- readonly envelopeDate: number;
4307
- readonly envelopeSubject: string | null;
4329
+ readonly flagged: boolean;
4308
4330
  readonly id: string;
4309
- readonly previewText: string;
4310
- readonly senderEmail: string;
4311
- readonly senderName: string | null;
4312
- readonly threadId: string;
4331
+ readonly labelIdList: string;
4332
+ readonly latestMessageDate: number;
4333
+ readonly seen: boolean;
4334
+ readonly userId: string;
4335
+ readonly words: string;
4313
4336
  } & {
4314
- readonly attachments: readonly {
4315
- readonly fileName: string;
4337
+ readonly messages: readonly ({
4338
+ readonly accountId: string;
4339
+ readonly envelopeDate: number;
4340
+ readonly envelopeSubject: string | null;
4316
4341
  readonly id: string;
4317
- readonly mimeType: string;
4318
- readonly size: number;
4319
- readonly threadMessageId: string;
4320
- }[];
4321
- })[];
4342
+ readonly previewText: string;
4343
+ readonly senderEmail: string;
4344
+ readonly senderName: string | null;
4345
+ readonly threadId: string;
4346
+ } & {
4347
+ readonly attachments: readonly {
4348
+ readonly fileName: string;
4349
+ readonly id: string;
4350
+ readonly mimeType: string;
4351
+ readonly size: number;
4352
+ readonly threadMessageId: string;
4353
+ }[];
4354
+ })[];
4355
+ }) | undefined;
4322
4356
  }>>;
4323
4357
  readonly getThreads: import("@rocicorp/zero").SyncedQuery<"getThreads", import("..").MarcoSyncedQueryContext, true, [{
4358
+ labelIds: [string, ...string[]];
4324
4359
  limit: number;
4325
4360
  search?: string;
4326
4361
  where?: {
4327
4362
  flagged?: boolean;
4328
4363
  id?: string;
4329
- labelIds?: string[];
4330
4364
  messageIds?: string[];
4331
4365
  participants?: string[];
4332
4366
  seen?: boolean;
@@ -4875,6 +4909,13 @@ export declare const marcoZero: {
4875
4909
  } & {
4876
4910
  serverName: string;
4877
4911
  };
4912
+ readonly latestMessageDate: {
4913
+ type: "number";
4914
+ optional: false;
4915
+ customType: number;
4916
+ } & {
4917
+ serverName: string;
4918
+ };
4878
4919
  readonly threadId: {
4879
4920
  type: "string";
4880
4921
  optional: false;
@@ -5200,7 +5241,7 @@ export declare const marcoZero: {
5200
5241
  }];
5201
5242
  threadByLabel: [{
5202
5243
  readonly sourceField: string[];
5203
- readonly destField: ("labelId" | "threadId")[];
5244
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
5204
5245
  readonly destSchema: "threadByLabel";
5205
5246
  readonly cardinality: "many";
5206
5247
  }];
@@ -5295,42 +5336,48 @@ export declare const marcoZero: {
5295
5336
  };
5296
5337
  enableLegacyQueries: boolean | undefined;
5297
5338
  enableLegacyMutators: false;
5298
- }, "thread", {
5299
- readonly accountId: string;
5300
- readonly flagged: boolean;
5301
- readonly id: string;
5302
- readonly labelIdList: string;
5339
+ }, "threadByLabel", {
5340
+ readonly labelId: string;
5303
5341
  readonly latestMessageDate: number;
5304
- readonly seen: boolean;
5305
- readonly userId: string;
5306
- readonly words: string;
5342
+ readonly threadId: string;
5307
5343
  } & {
5308
- readonly messages: readonly ({
5344
+ readonly thread: ({
5309
5345
  readonly accountId: string;
5310
- readonly envelopeDate: number;
5311
- readonly envelopeSubject: string | null;
5346
+ readonly flagged: boolean;
5312
5347
  readonly id: string;
5313
- readonly previewText: string;
5314
- readonly senderEmail: string;
5315
- readonly senderName: string | null;
5316
- readonly threadId: string;
5317
- } & {
5318
- readonly recipients: readonly {
5319
- readonly emailAddress: string;
5320
- readonly id: string;
5321
- readonly name: string | null;
5322
- readonly threadMessageId: string;
5323
- readonly type: "bcc" | "cc" | "to" | "replyTo";
5324
- }[];
5348
+ readonly labelIdList: string;
5349
+ readonly latestMessageDate: number;
5350
+ readonly seen: boolean;
5351
+ readonly userId: string;
5352
+ readonly words: string;
5325
5353
  } & {
5326
- readonly attachments: readonly {
5327
- readonly fileName: string;
5354
+ readonly messages: readonly ({
5355
+ readonly accountId: string;
5356
+ readonly envelopeDate: number;
5357
+ readonly envelopeSubject: string | null;
5328
5358
  readonly id: string;
5329
- readonly mimeType: string;
5330
- readonly size: number;
5331
- readonly threadMessageId: string;
5332
- }[];
5333
- })[];
5359
+ readonly previewText: string;
5360
+ readonly senderEmail: string;
5361
+ readonly senderName: string | null;
5362
+ readonly threadId: string;
5363
+ } & {
5364
+ readonly recipients: readonly {
5365
+ readonly emailAddress: string;
5366
+ readonly id: string;
5367
+ readonly name: string | null;
5368
+ readonly threadMessageId: string;
5369
+ readonly type: "bcc" | "cc" | "to" | "replyTo";
5370
+ }[];
5371
+ } & {
5372
+ readonly attachments: readonly {
5373
+ readonly fileName: string;
5374
+ readonly id: string;
5375
+ readonly mimeType: string;
5376
+ readonly size: number;
5377
+ readonly threadMessageId: string;
5378
+ }[];
5379
+ })[];
5380
+ }) | undefined;
5334
5381
  }>>;
5335
5382
  readonly getUser: import("@rocicorp/zero").SyncedQuery<"getUser", import("..").MarcoSyncedQueryContext, true, [], import("@rocicorp/zero").Query<{
5336
5383
  tables: {
@@ -5876,6 +5923,13 @@ export declare const marcoZero: {
5876
5923
  } & {
5877
5924
  serverName: string;
5878
5925
  };
5926
+ readonly latestMessageDate: {
5927
+ type: "number";
5928
+ optional: false;
5929
+ customType: number;
5930
+ } & {
5931
+ serverName: string;
5932
+ };
5879
5933
  readonly threadId: {
5880
5934
  type: "string";
5881
5935
  optional: false;
@@ -6201,7 +6255,7 @@ export declare const marcoZero: {
6201
6255
  }];
6202
6256
  threadByLabel: [{
6203
6257
  readonly sourceField: string[];
6204
- readonly destField: ("labelId" | "threadId")[];
6258
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
6205
6259
  readonly destSchema: "threadByLabel";
6206
6260
  readonly cardinality: "many";
6207
6261
  }];
@@ -6891,6 +6945,13 @@ export declare const marcoZero: {
6891
6945
  } & {
6892
6946
  serverName: string;
6893
6947
  };
6948
+ readonly latestMessageDate: {
6949
+ type: "number";
6950
+ optional: false;
6951
+ customType: number;
6952
+ } & {
6953
+ serverName: string;
6954
+ };
6894
6955
  readonly threadId: {
6895
6956
  type: "string";
6896
6957
  optional: false;
@@ -7216,7 +7277,7 @@ export declare const marcoZero: {
7216
7277
  }];
7217
7278
  threadByLabel: [{
7218
7279
  readonly sourceField: string[];
7219
- readonly destField: ("labelId" | "threadId")[];
7280
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
7220
7281
  readonly destSchema: "threadByLabel";
7221
7282
  readonly cardinality: "many";
7222
7283
  }];
@@ -7732,6 +7793,13 @@ export declare const marcoZero: {
7732
7793
  } & {
7733
7794
  serverName: string;
7734
7795
  };
7796
+ readonly latestMessageDate: {
7797
+ type: "number";
7798
+ optional: false;
7799
+ customType: number;
7800
+ } & {
7801
+ serverName: string;
7802
+ };
7735
7803
  readonly threadId: {
7736
7804
  type: "string";
7737
7805
  optional: false;
@@ -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,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,CA0G9B,CAAA;AAED,eAAO,MAAM,oBAAoB,cACpB,QAAQ,GAAG,SAAS,cACnB,sBAAsB,KACjC,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CA+OxC,CAAA"}
@@ -74,6 +74,7 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
74
74
  }
75
75
  await tx.mutate.threadByLabel.insert({
76
76
  labelId: targetLabel.id,
77
+ latestMessageDate: thread.latestMessageDate,
77
78
  threadId,
78
79
  });
79
80
  if (thread.seen === false) {
@@ -112,6 +113,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
112
113
  if (!existingThreadByLabel) {
113
114
  await tx.mutate.threadByLabel.insert({
114
115
  labelId: label.id,
116
+ latestMessageDate: thread.latestMessageDate,
115
117
  threadId,
116
118
  });
117
119
  if (thread.seen === false) {
@@ -165,6 +165,14 @@ describe('threadMutators', () => {
165
165
  const threadLabelDelete = mock(async () => { });
166
166
  const threadUpdate = mock(async () => { });
167
167
  const threadByLabelDelete = mock(async () => { });
168
+ const runThreadByLabel = mock(async () => ({
169
+ labelId: 'test-label-id-1',
170
+ latestMessageDate: 1234567890,
171
+ threadId: 'test-thread-id-1',
172
+ }));
173
+ const oneThreadByLabel = mock(() => ({ run: runThreadByLabel }));
174
+ const whereThreadByLabelThreadId = mock(() => ({ one: oneThreadByLabel }));
175
+ const whereThreadByLabel = mock(() => ({ where: whereThreadByLabelThreadId }));
168
176
  const transaction = {
169
177
  mutate: {
170
178
  accountLabel: {
@@ -187,6 +195,9 @@ describe('threadMutators', () => {
187
195
  thread: {
188
196
  where: whereThread,
189
197
  },
198
+ threadByLabel: {
199
+ where: whereThreadByLabel,
200
+ },
190
201
  threadLabel: {
191
202
  where: whereThreadLabel,
192
203
  },
@@ -251,6 +262,14 @@ describe('threadMutators', () => {
251
262
  const threadUpdate = mock(async () => { });
252
263
  const threadByLabelDelete = mock(async () => { });
253
264
  const threadByLabelInsert = mock(async () => { });
265
+ const runThreadByLabel = mock(async () => ({
266
+ labelId: 'test-inbox-label-id',
267
+ latestMessageDate: 1234567890,
268
+ threadId: 'test-thread-id-1',
269
+ }));
270
+ const oneThreadByLabel = mock(() => ({ run: runThreadByLabel }));
271
+ const whereThreadByLabelThreadId = mock(() => ({ one: oneThreadByLabel }));
272
+ const whereThreadByLabel = mock(() => ({ where: whereThreadByLabelThreadId }));
254
273
  const transaction = {
255
274
  mutate: {
256
275
  accountLabel: {
@@ -275,6 +294,9 @@ describe('threadMutators', () => {
275
294
  thread: {
276
295
  where: whereThread,
277
296
  },
297
+ threadByLabel: {
298
+ where: whereThreadByLabel,
299
+ },
278
300
  threadLabel: {
279
301
  where: whereThreadLabel,
280
302
  },
@@ -363,6 +385,14 @@ describe('threadMutators', () => {
363
385
  const threadUpdate = mock(async () => { });
364
386
  const threadByLabelDelete = mock(async () => { });
365
387
  const threadByLabelInsert = mock(async () => { });
388
+ const runThreadByLabel = mock(async () => ({
389
+ labelId: 'test-archive-label-id',
390
+ latestMessageDate: 1234567890,
391
+ threadId: 'test-thread-id-1',
392
+ }));
393
+ const oneThreadByLabel = mock(() => ({ run: runThreadByLabel }));
394
+ const whereThreadByLabelThreadId = mock(() => ({ one: oneThreadByLabel }));
395
+ const whereThreadByLabel = mock(() => ({ where: whereThreadByLabelThreadId }));
366
396
  const transaction = {
367
397
  mutate: {
368
398
  accountLabel: {
@@ -387,6 +417,9 @@ describe('threadMutators', () => {
387
417
  thread: {
388
418
  where: whereThread,
389
419
  },
420
+ threadByLabel: {
421
+ where: whereThreadByLabel,
422
+ },
390
423
  threadLabel: {
391
424
  where: whereThreadLabel,
392
425
  },
@@ -543,6 +543,13 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
543
543
  } & {
544
544
  serverName: string;
545
545
  };
546
+ readonly latestMessageDate: {
547
+ type: "number";
548
+ optional: false;
549
+ customType: number;
550
+ } & {
551
+ serverName: string;
552
+ };
546
553
  readonly threadId: {
547
554
  type: "string";
548
555
  optional: false;
@@ -868,7 +875,7 @@ export declare const getAccounts: import("@rocicorp/zero").SyncedQuery<"getAccou
868
875
  }];
869
876
  threadByLabel: [{
870
877
  readonly sourceField: string[];
871
- readonly destField: ("labelId" | "threadId")[];
878
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
872
879
  readonly destSchema: "threadByLabel";
873
880
  readonly cardinality: "many";
874
881
  }];
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEvB,CAAA"}
@@ -552,6 +552,13 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
552
552
  } & {
553
553
  serverName: string;
554
554
  };
555
+ readonly latestMessageDate: {
556
+ type: "number";
557
+ optional: false;
558
+ customType: number;
559
+ } & {
560
+ serverName: string;
561
+ };
555
562
  readonly threadId: {
556
563
  type: "string";
557
564
  optional: false;
@@ -877,7 +884,7 @@ export declare const getContacts: import("@rocicorp/zero").SyncedQuery<"getConta
877
884
  }];
878
885
  threadByLabel: [{
879
886
  readonly sourceField: string[];
880
- readonly destField: ("labelId" | "threadId")[];
887
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
881
888
  readonly destSchema: "threadByLabel";
882
889
  readonly cardinality: "many";
883
890
  }];
@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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BvB,CAAA"}
@@ -549,6 +549,13 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
549
549
  } & {
550
550
  serverName: string;
551
551
  };
552
+ readonly latestMessageDate: {
553
+ type: "number";
554
+ optional: false;
555
+ customType: number;
556
+ } & {
557
+ serverName: string;
558
+ };
552
559
  readonly threadId: {
553
560
  type: "string";
554
561
  optional: false;
@@ -874,7 +881,7 @@ export declare const getDrafts: import("@rocicorp/zero").SyncedQuery<"getDrafts"
874
881
  }];
875
882
  threadByLabel: [{
876
883
  readonly sourceField: string[];
877
- readonly destField: ("labelId" | "threadId")[];
884
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
878
885
  readonly destSchema: "threadByLabel";
879
886
  readonly cardinality: "many";
880
887
  }];
@@ -1 +1 @@
1
-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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBrB,CAAA"}
@@ -1,11 +1,11 @@
1
1
  import type { MarcoSyncedQueryContext } from '../../types';
2
2
  type GetThreadListArgs = {
3
+ labelIds: [string, ...string[]];
3
4
  limit: number;
4
5
  search?: string;
5
6
  where?: {
6
7
  flagged?: boolean;
7
8
  id?: string;
8
- labelIds?: string[];
9
9
  messageIds?: string[];
10
10
  participants?: string[];
11
11
  seen?: boolean;
@@ -555,6 +555,13 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
555
555
  } & {
556
556
  serverName: string;
557
557
  };
558
+ readonly latestMessageDate: {
559
+ type: "number";
560
+ optional: false;
561
+ customType: number;
562
+ } & {
563
+ serverName: string;
564
+ };
558
565
  readonly threadId: {
559
566
  type: "string";
560
567
  optional: false;
@@ -880,7 +887,7 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
880
887
  }];
881
888
  threadByLabel: [{
882
889
  readonly sourceField: string[];
883
- readonly destField: ("labelId" | "threadId")[];
890
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
884
891
  readonly destSchema: "threadByLabel";
885
892
  readonly cardinality: "many";
886
893
  }];
@@ -975,34 +982,40 @@ export declare const getThreadList: import("@rocicorp/zero").SyncedQuery<"getThr
975
982
  };
976
983
  enableLegacyQueries: boolean | undefined;
977
984
  enableLegacyMutators: false;
978
- }, "thread", {
979
- readonly accountId: string;
980
- readonly flagged: boolean;
981
- readonly id: string;
982
- readonly labelIdList: string;
985
+ }, "threadByLabel", {
986
+ readonly labelId: string;
983
987
  readonly latestMessageDate: number;
984
- readonly seen: boolean;
985
- readonly userId: string;
986
- readonly words: string;
988
+ readonly threadId: string;
987
989
  } & {
988
- readonly messages: readonly ({
990
+ readonly thread: ({
989
991
  readonly accountId: string;
990
- readonly envelopeDate: number;
991
- readonly envelopeSubject: string | null;
992
+ readonly flagged: boolean;
992
993
  readonly id: string;
993
- readonly previewText: string;
994
- readonly senderEmail: string;
995
- readonly senderName: string | null;
996
- readonly threadId: string;
994
+ readonly labelIdList: string;
995
+ readonly latestMessageDate: number;
996
+ readonly seen: boolean;
997
+ readonly userId: string;
998
+ readonly words: string;
997
999
  } & {
998
- readonly attachments: readonly {
999
- readonly fileName: string;
1000
+ readonly messages: readonly ({
1001
+ readonly accountId: string;
1002
+ readonly envelopeDate: number;
1003
+ readonly envelopeSubject: string | null;
1000
1004
  readonly id: string;
1001
- readonly mimeType: string;
1002
- readonly size: number;
1003
- readonly threadMessageId: string;
1004
- }[];
1005
- })[];
1005
+ readonly previewText: string;
1006
+ readonly senderEmail: string;
1007
+ readonly senderName: string | null;
1008
+ readonly threadId: string;
1009
+ } & {
1010
+ readonly attachments: readonly {
1011
+ readonly fileName: string;
1012
+ readonly id: string;
1013
+ readonly mimeType: string;
1014
+ readonly size: number;
1015
+ readonly threadMessageId: string;
1016
+ }[];
1017
+ })[];
1018
+ }) | undefined;
1006
1019
  }>>;
1007
1020
  export {};
1008
1021
  //# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 1000;
6
6
  const DEFAULT_LIMIT = 50;
7
7
  const parseArgs = (args) => {
8
8
  const schema = v.object({
9
+ labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
9
10
  limit: v.optional(v.pipe(v.number(), v.minValue(0), v.maxValue(MAX_LIMIT)), DEFAULT_LIMIT),
10
11
  search: v.optional(v.string()),
11
12
  where: v.optional(v.object({
12
13
  flagged: v.optional(v.boolean()),
13
14
  id: v.optional(v.string()),
14
- labelIds: v.optional(v.array(v.string())),
15
15
  messageIds: v.optional(v.array(v.string())),
16
16
  participants: v.optional(v.array(v.string())),
17
17
  seen: v.optional(v.boolean()),
@@ -19,40 +19,45 @@ const parseArgs = (args) => {
19
19
  });
20
20
  return [v.parse(schema, args[0])];
21
21
  };
22
- export const getThreadList = syncedQueryWithContext('getThreadList', parseArgs, ({ userId }, { search, limit, where }) => {
23
- let query = z.thread
24
- .where('userId', userId)
25
- .related('messages', x => x.related('attachments').orderBy('envelopeDate', 'asc'))
26
- .orderBy('latestMessageDate', 'desc');
27
- if (where?.id) {
28
- query = query.where('id', where.id);
29
- }
30
- if (typeof where?.flagged === 'boolean') {
31
- query = query.where('flagged', where.flagged);
32
- }
33
- if (typeof where?.seen === 'boolean') {
34
- query = query.where('seen', where.seen);
35
- }
36
- if (where?.labelIds && where.labelIds.length > 0) {
37
- for (const labelId of where.labelIds) {
38
- query = query.whereExists('threadByLabel', x => x.where('labelId', labelId));
22
+ export const getThreadList = syncedQueryWithContext('getThreadList', parseArgs, ({ userId }, { labelIds, search, limit, where }) => {
23
+ const [primaryLabelId, ...additionalLabelIds] = labelIds;
24
+ let query = z.threadByLabel
25
+ .where('labelId', primaryLabelId)
26
+ .orderBy('latestMessageDate', 'desc')
27
+ .limit(limit)
28
+ .related('thread', t => {
29
+ let threadQuery = t
30
+ .where('userId', userId)
31
+ .related('messages', m => m.related('attachments').orderBy('envelopeDate', 'asc'));
32
+ if (where?.id) {
33
+ threadQuery = threadQuery.where('id', where.id);
39
34
  }
40
- }
41
- if (where?.messageIds && where.messageIds.length > 0) {
42
- for (const messageId of where.messageIds) {
43
- query = query.whereExists('messages', x => x.where('id', messageId));
35
+ if (typeof where?.flagged === 'boolean') {
36
+ threadQuery = threadQuery.where('flagged', where.flagged);
44
37
  }
45
- }
46
- if (where?.participants && where.participants.length > 0) {
47
- for (const participant of where.participants) {
48
- query = query.whereExists('messages', x => x.whereExists('recipients', y => y.where('emailAddress', participant)));
38
+ if (typeof where?.seen === 'boolean') {
39
+ threadQuery = threadQuery.where('seen', where.seen);
49
40
  }
50
- }
51
- if (search) {
52
- const tokens = threadsUtils.processSearchTerm(search);
53
- if (tokens.length > 0) {
54
- query = query.where(({ and, cmp }) => and(...tokens.map(x => cmp('words', 'ILIKE', `%${x}%`))));
41
+ if (where?.messageIds && where.messageIds.length > 0) {
42
+ for (const messageId of where.messageIds) {
43
+ threadQuery = threadQuery.whereExists('messages', x => x.where('id', messageId));
44
+ }
45
+ }
46
+ if (where?.participants && where.participants.length > 0) {
47
+ for (const participant of where.participants) {
48
+ threadQuery = threadQuery.whereExists('messages', x => x.whereExists('recipients', y => y.where('emailAddress', participant)));
49
+ }
55
50
  }
51
+ if (search) {
52
+ const tokens = threadsUtils.processSearchTerm(search);
53
+ if (tokens.length > 0) {
54
+ threadQuery = threadQuery.where(({ and, cmp }) => and(...tokens.map(x => cmp('words', 'ILIKE', `%${x}%`))));
55
+ }
56
+ }
57
+ return threadQuery;
58
+ });
59
+ for (const additionalLabelId of additionalLabelIds) {
60
+ query = query.whereExists('thread', t => t.whereExists('threadByLabel', tbl => tbl.where('labelId', additionalLabelId)));
56
61
  }
57
- return query.limit(limit);
62
+ return query;
58
63
  });
@@ -1,11 +1,11 @@
1
1
  import type { MarcoSyncedQueryContext } from '../../types';
2
2
  type GetThreadsArgs = {
3
+ labelIds: [string, ...string[]];
3
4
  limit: number;
4
5
  search?: string;
5
6
  where?: {
6
7
  flagged?: boolean;
7
8
  id?: string;
8
- labelIds?: string[];
9
9
  messageIds?: string[];
10
10
  participants?: string[];
11
11
  seen?: boolean;
@@ -555,6 +555,13 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
555
555
  } & {
556
556
  serverName: string;
557
557
  };
558
+ readonly latestMessageDate: {
559
+ type: "number";
560
+ optional: false;
561
+ customType: number;
562
+ } & {
563
+ serverName: string;
564
+ };
558
565
  readonly threadId: {
559
566
  type: "string";
560
567
  optional: false;
@@ -880,7 +887,7 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
880
887
  }];
881
888
  threadByLabel: [{
882
889
  readonly sourceField: string[];
883
- readonly destField: ("labelId" | "threadId")[];
890
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
884
891
  readonly destSchema: "threadByLabel";
885
892
  readonly cardinality: "many";
886
893
  }];
@@ -975,42 +982,48 @@ export declare const getThreads: import("@rocicorp/zero").SyncedQuery<"getThread
975
982
  };
976
983
  enableLegacyQueries: boolean | undefined;
977
984
  enableLegacyMutators: false;
978
- }, "thread", {
979
- readonly accountId: string;
980
- readonly flagged: boolean;
981
- readonly id: string;
982
- readonly labelIdList: string;
985
+ }, "threadByLabel", {
986
+ readonly labelId: string;
983
987
  readonly latestMessageDate: number;
984
- readonly seen: boolean;
985
- readonly userId: string;
986
- readonly words: string;
988
+ readonly threadId: string;
987
989
  } & {
988
- readonly messages: readonly ({
990
+ readonly thread: ({
989
991
  readonly accountId: string;
990
- readonly envelopeDate: number;
991
- readonly envelopeSubject: string | null;
992
+ readonly flagged: boolean;
992
993
  readonly id: string;
993
- readonly previewText: string;
994
- readonly senderEmail: string;
995
- readonly senderName: string | null;
996
- readonly threadId: string;
997
- } & {
998
- readonly recipients: readonly {
999
- readonly emailAddress: string;
1000
- readonly id: string;
1001
- readonly name: string | null;
1002
- readonly threadMessageId: string;
1003
- readonly type: "bcc" | "cc" | "to" | "replyTo";
1004
- }[];
994
+ readonly labelIdList: string;
995
+ readonly latestMessageDate: number;
996
+ readonly seen: boolean;
997
+ readonly userId: string;
998
+ readonly words: string;
1005
999
  } & {
1006
- readonly attachments: readonly {
1007
- readonly fileName: string;
1000
+ readonly messages: readonly ({
1001
+ readonly accountId: string;
1002
+ readonly envelopeDate: number;
1003
+ readonly envelopeSubject: string | null;
1008
1004
  readonly id: string;
1009
- readonly mimeType: string;
1010
- readonly size: number;
1011
- readonly threadMessageId: string;
1012
- }[];
1013
- })[];
1005
+ readonly previewText: string;
1006
+ readonly senderEmail: string;
1007
+ readonly senderName: string | null;
1008
+ readonly threadId: string;
1009
+ } & {
1010
+ readonly recipients: readonly {
1011
+ readonly emailAddress: string;
1012
+ readonly id: string;
1013
+ readonly name: string | null;
1014
+ readonly threadMessageId: string;
1015
+ readonly type: "bcc" | "cc" | "to" | "replyTo";
1016
+ }[];
1017
+ } & {
1018
+ readonly attachments: readonly {
1019
+ readonly fileName: string;
1020
+ readonly id: string;
1021
+ readonly mimeType: string;
1022
+ readonly size: number;
1023
+ readonly threadMessageId: string;
1024
+ }[];
1025
+ })[];
1026
+ }) | undefined;
1014
1027
  }>>;
1015
1028
  export {};
1016
1029
  //# 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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DtB,CAAA"}
@@ -6,12 +6,12 @@ const MAX_LIMIT = 1000;
6
6
  const DEFAULT_LIMIT = 50;
7
7
  const parseArgs = (args) => {
8
8
  const schema = v.object({
9
+ labelIds: v.pipe(v.array(v.string()), v.minLength(1)),
9
10
  limit: v.optional(v.pipe(v.number(), v.minValue(0), v.maxValue(MAX_LIMIT)), DEFAULT_LIMIT),
10
11
  search: v.optional(v.string()),
11
12
  where: v.optional(v.object({
12
13
  flagged: v.optional(v.boolean()),
13
14
  id: v.optional(v.string()),
14
- labelIds: v.optional(v.array(v.string())),
15
15
  messageIds: v.optional(v.array(v.string())),
16
16
  participants: v.optional(v.array(v.string())),
17
17
  seen: v.optional(v.boolean()),
@@ -19,40 +19,45 @@ const parseArgs = (args) => {
19
19
  });
20
20
  return [v.parse(schema, args[0])];
21
21
  };
22
- export const getThreads = syncedQueryWithContext('getThreads', parseArgs, ({ userId }, { search, limit, where }) => {
23
- let query = z.thread
24
- .where('userId', userId)
25
- .related('messages', x => x.related('recipients').related('attachments').orderBy('envelopeDate', 'asc'))
26
- .orderBy('latestMessageDate', 'desc');
27
- if (where?.id) {
28
- query = query.where('id', where.id);
29
- }
30
- if (typeof where?.flagged === 'boolean') {
31
- query = query.where('flagged', where.flagged);
32
- }
33
- if (typeof where?.seen === 'boolean') {
34
- query = query.where('seen', where.seen);
35
- }
36
- if (where?.labelIds && where.labelIds.length > 0) {
37
- for (const labelId of where.labelIds) {
38
- query = query.whereExists('threadByLabel', x => x.where('labelId', labelId));
22
+ export const getThreads = syncedQueryWithContext('getThreads', parseArgs, ({ userId }, { labelIds, search, limit, where }) => {
23
+ const [primaryLabelId, ...additionalLabelIds] = labelIds;
24
+ let query = z.threadByLabel
25
+ .where('labelId', primaryLabelId)
26
+ .orderBy('latestMessageDate', 'desc')
27
+ .limit(limit)
28
+ .related('thread', t => {
29
+ let threadQuery = t
30
+ .where('userId', userId)
31
+ .related('messages', m => m.related('recipients').related('attachments').orderBy('envelopeDate', 'asc'));
32
+ if (where?.id) {
33
+ threadQuery = threadQuery.where('id', where.id);
39
34
  }
40
- }
41
- if (where?.messageIds && where.messageIds.length > 0) {
42
- for (const messageId of where.messageIds) {
43
- query = query.whereExists('messages', x => x.where('id', messageId));
35
+ if (typeof where?.flagged === 'boolean') {
36
+ threadQuery = threadQuery.where('flagged', where.flagged);
44
37
  }
45
- }
46
- if (where?.participants && where.participants.length > 0) {
47
- for (const participant of where.participants) {
48
- query = query.whereExists('messages', x => x.whereExists('recipients', y => y.where('emailAddress', participant)));
38
+ if (typeof where?.seen === 'boolean') {
39
+ threadQuery = threadQuery.where('seen', where.seen);
49
40
  }
50
- }
51
- if (search) {
52
- const tokens = threadsUtils.processSearchTerm(search);
53
- if (tokens.length > 0) {
54
- query = query.where(({ and, cmp }) => and(...tokens.map(x => cmp('words', 'ILIKE', `%${x}%`))));
41
+ if (where?.messageIds && where.messageIds.length > 0) {
42
+ for (const messageId of where.messageIds) {
43
+ threadQuery = threadQuery.whereExists('messages', x => x.where('id', messageId));
44
+ }
45
+ }
46
+ if (where?.participants && where.participants.length > 0) {
47
+ for (const participant of where.participants) {
48
+ threadQuery = threadQuery.whereExists('messages', x => x.whereExists('recipients', y => y.where('emailAddress', participant)));
49
+ }
55
50
  }
51
+ if (search) {
52
+ const tokens = threadsUtils.processSearchTerm(search);
53
+ if (tokens.length > 0) {
54
+ threadQuery = threadQuery.where(({ and, cmp }) => and(...tokens.map(x => cmp('words', 'ILIKE', `%${x}%`))));
55
+ }
56
+ }
57
+ return threadQuery;
58
+ });
59
+ for (const additionalLabelId of additionalLabelIds) {
60
+ query = query.whereExists('thread', t => t.whereExists('threadByLabel', tbl => tbl.where('labelId', additionalLabelId)));
56
61
  }
57
- return query.limit(limit);
62
+ return query;
58
63
  });
@@ -543,6 +543,13 @@ export declare const getUser: import("@rocicorp/zero").SyncedQuery<"getUser", Ma
543
543
  } & {
544
544
  serverName: string;
545
545
  };
546
+ readonly latestMessageDate: {
547
+ type: "number";
548
+ optional: false;
549
+ customType: number;
550
+ } & {
551
+ serverName: string;
552
+ };
546
553
  readonly threadId: {
547
554
  type: "string";
548
555
  optional: false;
@@ -868,7 +875,7 @@ export declare const getUser: import("@rocicorp/zero").SyncedQuery<"getUser", Ma
868
875
  }];
869
876
  threadByLabel: [{
870
877
  readonly sourceField: string[];
871
- readonly destField: ("labelId" | "threadId")[];
878
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
872
879
  readonly destSchema: "threadByLabel";
873
880
  readonly cardinality: "many";
874
881
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"getUser.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/getUser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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@ -542,6 +542,13 @@ export declare const z: import("@rocicorp/zero").SchemaQuery<{
542
542
  } & {
543
543
  serverName: string;
544
544
  };
545
+ readonly latestMessageDate: {
546
+ type: "number";
547
+ optional: false;
548
+ customType: number;
549
+ } & {
550
+ serverName: string;
551
+ };
545
552
  readonly threadId: {
546
553
  type: "string";
547
554
  optional: false;
@@ -867,7 +874,7 @@ export declare const z: import("@rocicorp/zero").SchemaQuery<{
867
874
  }];
868
875
  threadByLabel: [{
869
876
  readonly sourceField: string[];
870
- readonly destField: ("labelId" | "threadId")[];
877
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
871
878
  readonly destSchema: "threadByLabel";
872
879
  readonly cardinality: "many";
873
880
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zero/queries/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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number";
547
+ optional: false;
548
+ customType: number;
549
+ } & {
550
+ serverName: string;
551
+ };
545
552
  readonly threadId: {
546
553
  type: "string";
547
554
  optional: false;
@@ -867,7 +874,7 @@ export declare const schema: {
867
874
  }];
868
875
  threadByLabel: [{
869
876
  readonly sourceField: string[];
870
- readonly destField: ("labelId" | "threadId")[];
877
+ readonly destField: ("latestMessageDate" | "labelId" | "threadId")[];
871
878
  readonly destSchema: "threadByLabel";
872
879
  readonly cardinality: "many";
873
880
  }];
@@ -1384,6 +1391,13 @@ export declare const zeroTables: {
1384
1391
  } & {
1385
1392
  serverName: string;
1386
1393
  };
1394
+ readonly latestMessageDate: {
1395
+ type: "number";
1396
+ optional: false;
1397
+ customType: number;
1398
+ } & {
1399
+ serverName: string;
1400
+ };
1387
1401
  readonly threadId: {
1388
1402
  type: "string";
1389
1403
  optional: false;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/zero/schema.ts"],"names":[],"mappings":"AAkbA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAzVJ,MAAM;4BACX,MAAM,EAAE;4BACR,MAAM,EAAE;6BACP,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4YT,CAAA"}
@@ -115,6 +115,7 @@ const threadByLabel = table('threadByLabel')
115
115
  .from('thread_by_label')
116
116
  .columns({
117
117
  labelId: string().from('label_id'),
118
+ latestMessageDate: numeric().from('latest_message_date'),
118
119
  threadId: string().from('thread_id'),
119
120
  })
120
121
  .primaryKey('labelId', 'threadId');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
- "version": "2.0.472",
3
+ "version": "2.0.474",
4
4
  "author": "team@marcoapp.io",
5
5
  "main": "dist/index.js",
6
6
  "repository": "git@github.com:marcoappio/marco-config.git",