@marcoappio/marco-config 2.0.487 → 2.0.488

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.
@@ -870,8 +870,8 @@ export declare const marcoZero: {
870
870
  } & {
871
871
  primaryKey: ["id"];
872
872
  };
873
- readonly threadMessageLabelUid: {
874
- name: "threadMessageLabelUid";
873
+ readonly threadLabel: {
874
+ name: "threadLabel";
875
875
  columns: {
876
876
  readonly accountId: {
877
877
  type: "string";
@@ -1204,7 +1204,7 @@ export declare const marcoZero: {
1204
1204
  threads: [{
1205
1205
  readonly sourceField: string[];
1206
1206
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
1207
- readonly destSchema: "threadMessageLabelUid";
1207
+ readonly destSchema: "threadLabel";
1208
1208
  readonly cardinality: "many";
1209
1209
  }, {
1210
1210
  readonly sourceField: string[];
@@ -1251,7 +1251,7 @@ export declare const marcoZero: {
1251
1251
  labels: [{
1252
1252
  readonly sourceField: string[];
1253
1253
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
1254
- readonly destSchema: "threadMessageLabelUid";
1254
+ readonly destSchema: "threadLabel";
1255
1255
  readonly cardinality: "many";
1256
1256
  }, {
1257
1257
  readonly sourceField: string[];
@@ -1278,7 +1278,7 @@ export declare const marcoZero: {
1278
1278
  readonly cardinality: "one";
1279
1279
  }];
1280
1280
  };
1281
- readonly threadMessageLabelUid: {
1281
+ readonly threadLabel: {
1282
1282
  label: [{
1283
1283
  readonly sourceField: string[];
1284
1284
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -1322,7 +1322,7 @@ export declare const marcoZero: {
1322
1322
  labels: [{
1323
1323
  readonly sourceField: string[];
1324
1324
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
1325
- readonly destSchema: "threadMessageLabelUid";
1325
+ readonly destSchema: "threadLabel";
1326
1326
  readonly cardinality: "many";
1327
1327
  }, {
1328
1328
  readonly sourceField: string[];
@@ -1936,8 +1936,8 @@ export declare const marcoZero: {
1936
1936
  } & {
1937
1937
  primaryKey: ["id"];
1938
1938
  };
1939
- readonly threadMessageLabelUid: {
1940
- name: "threadMessageLabelUid";
1939
+ readonly threadLabel: {
1940
+ name: "threadLabel";
1941
1941
  columns: {
1942
1942
  readonly accountId: {
1943
1943
  type: "string";
@@ -2270,7 +2270,7 @@ export declare const marcoZero: {
2270
2270
  threads: [{
2271
2271
  readonly sourceField: string[];
2272
2272
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
2273
- readonly destSchema: "threadMessageLabelUid";
2273
+ readonly destSchema: "threadLabel";
2274
2274
  readonly cardinality: "many";
2275
2275
  }, {
2276
2276
  readonly sourceField: string[];
@@ -2317,7 +2317,7 @@ export declare const marcoZero: {
2317
2317
  labels: [{
2318
2318
  readonly sourceField: string[];
2319
2319
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
2320
- readonly destSchema: "threadMessageLabelUid";
2320
+ readonly destSchema: "threadLabel";
2321
2321
  readonly cardinality: "many";
2322
2322
  }, {
2323
2323
  readonly sourceField: string[];
@@ -2344,7 +2344,7 @@ export declare const marcoZero: {
2344
2344
  readonly cardinality: "one";
2345
2345
  }];
2346
2346
  };
2347
- readonly threadMessageLabelUid: {
2347
+ readonly threadLabel: {
2348
2348
  label: [{
2349
2349
  readonly sourceField: string[];
2350
2350
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -2388,7 +2388,7 @@ export declare const marcoZero: {
2388
2388
  labels: [{
2389
2389
  readonly sourceField: string[];
2390
2390
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
2391
- readonly destSchema: "threadMessageLabelUid";
2391
+ readonly destSchema: "threadLabel";
2392
2392
  readonly cardinality: "many";
2393
2393
  }, {
2394
2394
  readonly sourceField: string[];
@@ -2968,8 +2968,8 @@ export declare const marcoZero: {
2968
2968
  } & {
2969
2969
  primaryKey: ["id"];
2970
2970
  };
2971
- readonly threadMessageLabelUid: {
2972
- name: "threadMessageLabelUid";
2971
+ readonly threadLabel: {
2972
+ name: "threadLabel";
2973
2973
  columns: {
2974
2974
  readonly accountId: {
2975
2975
  type: "string";
@@ -3302,7 +3302,7 @@ export declare const marcoZero: {
3302
3302
  threads: [{
3303
3303
  readonly sourceField: string[];
3304
3304
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
3305
- readonly destSchema: "threadMessageLabelUid";
3305
+ readonly destSchema: "threadLabel";
3306
3306
  readonly cardinality: "many";
3307
3307
  }, {
3308
3308
  readonly sourceField: string[];
@@ -3349,7 +3349,7 @@ export declare const marcoZero: {
3349
3349
  labels: [{
3350
3350
  readonly sourceField: string[];
3351
3351
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
3352
- readonly destSchema: "threadMessageLabelUid";
3352
+ readonly destSchema: "threadLabel";
3353
3353
  readonly cardinality: "many";
3354
3354
  }, {
3355
3355
  readonly sourceField: string[];
@@ -3376,7 +3376,7 @@ export declare const marcoZero: {
3376
3376
  readonly cardinality: "one";
3377
3377
  }];
3378
3378
  };
3379
- readonly threadMessageLabelUid: {
3379
+ readonly threadLabel: {
3380
3380
  label: [{
3381
3381
  readonly sourceField: string[];
3382
3382
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -3420,7 +3420,7 @@ export declare const marcoZero: {
3420
3420
  labels: [{
3421
3421
  readonly sourceField: string[];
3422
3422
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
3423
- readonly destSchema: "threadMessageLabelUid";
3423
+ readonly destSchema: "threadLabel";
3424
3424
  readonly cardinality: "many";
3425
3425
  }, {
3426
3426
  readonly sourceField: string[];
@@ -4022,8 +4022,8 @@ export declare const marcoZero: {
4022
4022
  } & {
4023
4023
  primaryKey: ["id"];
4024
4024
  };
4025
- readonly threadMessageLabelUid: {
4026
- name: "threadMessageLabelUid";
4025
+ readonly threadLabel: {
4026
+ name: "threadLabel";
4027
4027
  columns: {
4028
4028
  readonly accountId: {
4029
4029
  type: "string";
@@ -4356,7 +4356,7 @@ export declare const marcoZero: {
4356
4356
  threads: [{
4357
4357
  readonly sourceField: string[];
4358
4358
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
4359
- readonly destSchema: "threadMessageLabelUid";
4359
+ readonly destSchema: "threadLabel";
4360
4360
  readonly cardinality: "many";
4361
4361
  }, {
4362
4362
  readonly sourceField: string[];
@@ -4403,7 +4403,7 @@ export declare const marcoZero: {
4403
4403
  labels: [{
4404
4404
  readonly sourceField: string[];
4405
4405
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
4406
- readonly destSchema: "threadMessageLabelUid";
4406
+ readonly destSchema: "threadLabel";
4407
4407
  readonly cardinality: "many";
4408
4408
  }, {
4409
4409
  readonly sourceField: string[];
@@ -4430,7 +4430,7 @@ export declare const marcoZero: {
4430
4430
  readonly cardinality: "one";
4431
4431
  }];
4432
4432
  };
4433
- readonly threadMessageLabelUid: {
4433
+ readonly threadLabel: {
4434
4434
  label: [{
4435
4435
  readonly sourceField: string[];
4436
4436
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -4474,7 +4474,7 @@ export declare const marcoZero: {
4474
4474
  labels: [{
4475
4475
  readonly sourceField: string[];
4476
4476
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
4477
- readonly destSchema: "threadMessageLabelUid";
4477
+ readonly destSchema: "threadLabel";
4478
4478
  readonly cardinality: "many";
4479
4479
  }, {
4480
4480
  readonly sourceField: string[];
@@ -5099,8 +5099,8 @@ export declare const marcoZero: {
5099
5099
  } & {
5100
5100
  primaryKey: ["id"];
5101
5101
  };
5102
- readonly threadMessageLabelUid: {
5103
- name: "threadMessageLabelUid";
5102
+ readonly threadLabel: {
5103
+ name: "threadLabel";
5104
5104
  columns: {
5105
5105
  readonly accountId: {
5106
5106
  type: "string";
@@ -5433,7 +5433,7 @@ export declare const marcoZero: {
5433
5433
  threads: [{
5434
5434
  readonly sourceField: string[];
5435
5435
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
5436
- readonly destSchema: "threadMessageLabelUid";
5436
+ readonly destSchema: "threadLabel";
5437
5437
  readonly cardinality: "many";
5438
5438
  }, {
5439
5439
  readonly sourceField: string[];
@@ -5480,7 +5480,7 @@ export declare const marcoZero: {
5480
5480
  labels: [{
5481
5481
  readonly sourceField: string[];
5482
5482
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
5483
- readonly destSchema: "threadMessageLabelUid";
5483
+ readonly destSchema: "threadLabel";
5484
5484
  readonly cardinality: "many";
5485
5485
  }, {
5486
5486
  readonly sourceField: string[];
@@ -5507,7 +5507,7 @@ export declare const marcoZero: {
5507
5507
  readonly cardinality: "one";
5508
5508
  }];
5509
5509
  };
5510
- readonly threadMessageLabelUid: {
5510
+ readonly threadLabel: {
5511
5511
  label: [{
5512
5512
  readonly sourceField: string[];
5513
5513
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -5551,7 +5551,7 @@ export declare const marcoZero: {
5551
5551
  labels: [{
5552
5552
  readonly sourceField: string[];
5553
5553
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
5554
- readonly destSchema: "threadMessageLabelUid";
5554
+ readonly destSchema: "threadLabel";
5555
5555
  readonly cardinality: "many";
5556
5556
  }, {
5557
5557
  readonly sourceField: string[];
@@ -6155,8 +6155,8 @@ export declare const marcoZero: {
6155
6155
  } & {
6156
6156
  primaryKey: ["id"];
6157
6157
  };
6158
- readonly threadMessageLabelUid: {
6159
- name: "threadMessageLabelUid";
6158
+ readonly threadLabel: {
6159
+ name: "threadLabel";
6160
6160
  columns: {
6161
6161
  readonly accountId: {
6162
6162
  type: "string";
@@ -6489,7 +6489,7 @@ export declare const marcoZero: {
6489
6489
  threads: [{
6490
6490
  readonly sourceField: string[];
6491
6491
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
6492
- readonly destSchema: "threadMessageLabelUid";
6492
+ readonly destSchema: "threadLabel";
6493
6493
  readonly cardinality: "many";
6494
6494
  }, {
6495
6495
  readonly sourceField: string[];
@@ -6536,7 +6536,7 @@ export declare const marcoZero: {
6536
6536
  labels: [{
6537
6537
  readonly sourceField: string[];
6538
6538
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
6539
- readonly destSchema: "threadMessageLabelUid";
6539
+ readonly destSchema: "threadLabel";
6540
6540
  readonly cardinality: "many";
6541
6541
  }, {
6542
6542
  readonly sourceField: string[];
@@ -6563,7 +6563,7 @@ export declare const marcoZero: {
6563
6563
  readonly cardinality: "one";
6564
6564
  }];
6565
6565
  };
6566
- readonly threadMessageLabelUid: {
6566
+ readonly threadLabel: {
6567
6567
  label: [{
6568
6568
  readonly sourceField: string[];
6569
6569
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -6607,7 +6607,7 @@ export declare const marcoZero: {
6607
6607
  labels: [{
6608
6608
  readonly sourceField: string[];
6609
6609
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
6610
- readonly destSchema: "threadMessageLabelUid";
6610
+ readonly destSchema: "threadLabel";
6611
6611
  readonly cardinality: "many";
6612
6612
  }, {
6613
6613
  readonly sourceField: string[];
@@ -7227,8 +7227,8 @@ export declare const marcoZero: {
7227
7227
  } & {
7228
7228
  primaryKey: ["id"];
7229
7229
  };
7230
- readonly threadMessageLabelUid: {
7231
- name: "threadMessageLabelUid";
7230
+ readonly threadLabel: {
7231
+ name: "threadLabel";
7232
7232
  columns: {
7233
7233
  readonly accountId: {
7234
7234
  type: "string";
@@ -7561,7 +7561,7 @@ export declare const marcoZero: {
7561
7561
  threads: [{
7562
7562
  readonly sourceField: string[];
7563
7563
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
7564
- readonly destSchema: "threadMessageLabelUid";
7564
+ readonly destSchema: "threadLabel";
7565
7565
  readonly cardinality: "many";
7566
7566
  }, {
7567
7567
  readonly sourceField: string[];
@@ -7608,7 +7608,7 @@ export declare const marcoZero: {
7608
7608
  labels: [{
7609
7609
  readonly sourceField: string[];
7610
7610
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
7611
- readonly destSchema: "threadMessageLabelUid";
7611
+ readonly destSchema: "threadLabel";
7612
7612
  readonly cardinality: "many";
7613
7613
  }, {
7614
7614
  readonly sourceField: string[];
@@ -7635,7 +7635,7 @@ export declare const marcoZero: {
7635
7635
  readonly cardinality: "one";
7636
7636
  }];
7637
7637
  };
7638
- readonly threadMessageLabelUid: {
7638
+ readonly threadLabel: {
7639
7639
  label: [{
7640
7640
  readonly sourceField: string[];
7641
7641
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -7679,7 +7679,7 @@ export declare const marcoZero: {
7679
7679
  labels: [{
7680
7680
  readonly sourceField: string[];
7681
7681
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
7682
- readonly destSchema: "threadMessageLabelUid";
7682
+ readonly destSchema: "threadLabel";
7683
7683
  readonly cardinality: "many";
7684
7684
  }, {
7685
7685
  readonly sourceField: string[];
@@ -8300,8 +8300,8 @@ export declare const marcoZero: {
8300
8300
  } & {
8301
8301
  primaryKey: ["id"];
8302
8302
  };
8303
- readonly threadMessageLabelUid: {
8304
- name: "threadMessageLabelUid";
8303
+ readonly threadLabel: {
8304
+ name: "threadLabel";
8305
8305
  columns: {
8306
8306
  readonly accountId: {
8307
8307
  type: "string";
@@ -8634,7 +8634,7 @@ export declare const marcoZero: {
8634
8634
  threads: [{
8635
8635
  readonly sourceField: string[];
8636
8636
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
8637
- readonly destSchema: "threadMessageLabelUid";
8637
+ readonly destSchema: "threadLabel";
8638
8638
  readonly cardinality: "many";
8639
8639
  }, {
8640
8640
  readonly sourceField: string[];
@@ -8681,7 +8681,7 @@ export declare const marcoZero: {
8681
8681
  labels: [{
8682
8682
  readonly sourceField: string[];
8683
8683
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
8684
- readonly destSchema: "threadMessageLabelUid";
8684
+ readonly destSchema: "threadLabel";
8685
8685
  readonly cardinality: "many";
8686
8686
  }, {
8687
8687
  readonly sourceField: string[];
@@ -8708,7 +8708,7 @@ export declare const marcoZero: {
8708
8708
  readonly cardinality: "one";
8709
8709
  }];
8710
8710
  };
8711
- readonly threadMessageLabelUid: {
8711
+ readonly threadLabel: {
8712
8712
  label: [{
8713
8713
  readonly sourceField: string[];
8714
8714
  readonly destField: ("id" | "name" | "accountId" | "path" | "specialUse" | "uidValidity" | "unreadCount")[];
@@ -8752,7 +8752,7 @@ export declare const marcoZero: {
8752
8752
  labels: [{
8753
8753
  readonly sourceField: string[];
8754
8754
  readonly destField: ("accountId" | "uidValidity" | "labelId" | "lastSyncedAt" | "threadId" | "threadMessageId" | "uid")[];
8755
- readonly destSchema: "threadMessageLabelUid";
8755
+ readonly destSchema: "threadLabel";
8756
8756
  readonly cardinality: "many";
8757
8757
  }, {
8758
8758
  readonly sourceField: string[];
@@ -9283,6 +9283,61 @@ export declare const marcoZero: {
9283
9283
  } & {
9284
9284
  primaryKey: ["labelId", "threadId"];
9285
9285
  }>;
9286
+ readonly threadLabel: import("@rocicorp/zero").TableBuilderWithColumns<{
9287
+ name: "threadLabel";
9288
+ columns: {
9289
+ readonly accountId: {
9290
+ type: "string";
9291
+ optional: false;
9292
+ customType: string;
9293
+ } & {
9294
+ serverName: string;
9295
+ };
9296
+ readonly labelId: {
9297
+ type: "string";
9298
+ optional: false;
9299
+ customType: string;
9300
+ } & {
9301
+ serverName: string;
9302
+ };
9303
+ readonly lastSyncedAt: {
9304
+ type: "number";
9305
+ optional: false;
9306
+ customType: number;
9307
+ } & {
9308
+ serverName: string;
9309
+ };
9310
+ readonly threadId: {
9311
+ type: "string";
9312
+ optional: false;
9313
+ customType: string;
9314
+ } & {
9315
+ serverName: string;
9316
+ };
9317
+ readonly threadMessageId: {
9318
+ type: "string";
9319
+ optional: false;
9320
+ customType: string;
9321
+ } & {
9322
+ serverName: string;
9323
+ };
9324
+ readonly uid: {
9325
+ type: "number";
9326
+ optional: false;
9327
+ customType: number;
9328
+ };
9329
+ readonly uidValidity: {
9330
+ type: "number";
9331
+ optional: false;
9332
+ customType: number;
9333
+ } & {
9334
+ serverName: string;
9335
+ };
9336
+ };
9337
+ primaryKey: readonly [string, ...string[]];
9338
+ } & {
9339
+ primaryKey: ["accountId", "labelId", "threadMessageId"];
9340
+ }>;
9286
9341
  readonly threadMessage: import("@rocicorp/zero").TableBuilderWithColumns<{
9287
9342
  name: "threadMessage";
9288
9343
  columns: {
@@ -9388,61 +9443,6 @@ export declare const marcoZero: {
9388
9443
  } & {
9389
9444
  primaryKey: ["id"];
9390
9445
  }>;
9391
- readonly threadMessageLabelUid: import("@rocicorp/zero").TableBuilderWithColumns<{
9392
- name: "threadMessageLabelUid";
9393
- columns: {
9394
- readonly accountId: {
9395
- type: "string";
9396
- optional: false;
9397
- customType: string;
9398
- } & {
9399
- serverName: string;
9400
- };
9401
- readonly labelId: {
9402
- type: "string";
9403
- optional: false;
9404
- customType: string;
9405
- } & {
9406
- serverName: string;
9407
- };
9408
- readonly lastSyncedAt: {
9409
- type: "number";
9410
- optional: false;
9411
- customType: number;
9412
- } & {
9413
- serverName: string;
9414
- };
9415
- readonly threadId: {
9416
- type: "string";
9417
- optional: false;
9418
- customType: string;
9419
- } & {
9420
- serverName: string;
9421
- };
9422
- readonly threadMessageId: {
9423
- type: "string";
9424
- optional: false;
9425
- customType: string;
9426
- } & {
9427
- serverName: string;
9428
- };
9429
- readonly uid: {
9430
- type: "number";
9431
- optional: false;
9432
- customType: number;
9433
- };
9434
- readonly uidValidity: {
9435
- type: "number";
9436
- optional: false;
9437
- customType: number;
9438
- } & {
9439
- serverName: string;
9440
- };
9441
- };
9442
- primaryKey: readonly [string, ...string[]];
9443
- } & {
9444
- primaryKey: ["accountId", "labelId", "threadMessageId"];
9445
- }>;
9446
9446
  readonly threadMessageRecipient: import("@rocicorp/zero").TableBuilderWithColumns<{
9447
9447
  name: "threadMessageRecipient";
9448
9448
  columns: {
@@ -8,7 +8,7 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
8
8
  }
9
9
  const [targetLabel, threadLabels] = await Promise.all([
10
10
  tx.query.accountLabel.where('accountId', thread.accountId).where('specialUse', targetSpecialUse).one().run(),
11
- tx.query.threadMessageLabelUid.where('threadId', threadId).run(),
11
+ tx.query.threadLabel.where('threadId', threadId).run(),
12
12
  ]);
13
13
  if (!targetLabel) {
14
14
  throw new Error(MutationError.ENTITY_NOT_FOUND);
@@ -30,7 +30,7 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
30
30
  uidValidity: label.uidValidity,
31
31
  });
32
32
  }
33
- threadLabelDeletePromises.push(tx.mutate.threadMessageLabelUid.delete({
33
+ threadLabelDeletePromises.push(tx.mutate.threadLabel.delete({
34
34
  accountId: thread.accountId,
35
35
  labelId: label.labelId,
36
36
  threadMessageId: label.threadMessageId,
@@ -51,7 +51,7 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
51
51
  const messages = await tx.query.threadMessage.where('threadId', threadId).run();
52
52
  const baseTimestamp = Date.now();
53
53
  await Promise.all([
54
- ...messages.map((message, i) => tx.mutate.threadMessageLabelUid.insert({
54
+ ...messages.map((message, i) => tx.mutate.threadLabel.insert({
55
55
  accountId: thread.accountId,
56
56
  labelId: targetLabel.id,
57
57
  lastSyncedAt: 0,
@@ -113,11 +113,11 @@ export const createThreadMutators = (_authData, callbacks) => ({
113
113
  : []),
114
114
  ]);
115
115
  }
116
- const existingChecks = await Promise.all(messages.map(message => tx.query.threadMessageLabelUid.where('threadMessageId', message.id).where('labelId', label.id).one().run()));
116
+ const existingChecks = await Promise.all(messages.map(message => tx.query.threadLabel.where('threadMessageId', message.id).where('labelId', label.id).one().run()));
117
117
  const messagesToInsert = messages.filter((_, i) => !existingChecks[i]);
118
118
  const baseTimestamp = Date.now();
119
119
  if (messagesToInsert.length > 0) {
120
- await Promise.all(messagesToInsert.map((message, i) => tx.mutate.threadMessageLabelUid.insert({
120
+ await Promise.all(messagesToInsert.map((message, i) => tx.mutate.threadLabel.insert({
121
121
  accountId: thread.accountId,
122
122
  labelId: label.id,
123
123
  lastSyncedAt: 0,
@@ -127,7 +127,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
127
127
  uidValidity: label.uidValidity ?? 0,
128
128
  })));
129
129
  }
130
- const allLabels = await tx.query.threadMessageLabelUid.where('threadId', threadId).run();
130
+ const allLabels = await tx.query.threadLabel.where('threadId', threadId).run();
131
131
  await tx.mutate.thread.update({
132
132
  id: threadId,
133
133
  labelIdList: buildLabelIdList([...new Set(allLabels.map(x => x.labelId))]),
@@ -165,7 +165,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
165
165
  }
166
166
  const [label, existingLabels] = await Promise.all([
167
167
  tx.query.accountLabel.where('accountId', thread.accountId).where('path', args.labelPath).one().run(),
168
- tx.query.threadMessageLabelUid.where('threadId', threadId).run(),
168
+ tx.query.threadLabel.where('threadId', threadId).run(),
169
169
  ]);
170
170
  if (!label) {
171
171
  throw new Error(MutationError.ENTITY_NOT_FOUND);
@@ -187,7 +187,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
187
187
  const currentLabelIds = new Set(threadsUtils.parseLabelIdList(thread.labelIdList));
188
188
  currentLabelIds.delete(label.id);
189
189
  await Promise.all([
190
- ...labelsForThisLabel.map(existing => tx.mutate.threadMessageLabelUid.delete({
190
+ ...labelsForThisLabel.map(existing => tx.mutate.threadLabel.delete({
191
191
  accountId: thread.accountId,
192
192
  labelId: label.id,
193
193
  threadMessageId: existing.threadMessageId,