@marcoappio/marco-config 2.0.487 → 2.0.489
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zero/index.d.ts +103 -103
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.js +20 -24
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +63 -63
- package/dist/zero/queries/getAccounts.d.ts +6 -6
- package/dist/zero/queries/getContacts.d.ts +6 -6
- package/dist/zero/queries/getDrafts.d.ts +6 -6
- package/dist/zero/queries/getThread.d.ts +6 -6
- package/dist/zero/queries/getThreadList.d.ts +6 -6
- package/dist/zero/queries/getThreads.d.ts +6 -6
- package/dist/zero/queries/getUser.d.ts +6 -6
- package/dist/zero/queries/index.d.ts +6 -6
- package/dist/zero/schema.d.ts +61 -61
- package/dist/zero/schema.js +8 -8
- package/package.json +1 -1
package/dist/zero/index.d.ts
CHANGED
|
@@ -870,8 +870,8 @@ export declare const marcoZero: {
|
|
|
870
870
|
} & {
|
|
871
871
|
primaryKey: ["id"];
|
|
872
872
|
};
|
|
873
|
-
readonly
|
|
874
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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
|
|
1940
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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
|
|
2972
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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
|
|
4026
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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
|
|
5103
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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
|
|
6159
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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
|
|
7231
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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
|
|
8304
|
-
name: "
|
|
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: "
|
|
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: "
|
|
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
|
|
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: "
|
|
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: {
|
|
@@ -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;AAEnF,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,
|
|
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;AAEnF,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,CAoG9B,CAAA;AAED,eAAO,MAAM,oBAAoB,cACpB,QAAQ,GAAG,SAAS,cACnB,sBAAsB,KACjC,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAiQxC,CAAA"}
|
|
@@ -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.
|
|
11
|
+
tx.query.threadLabel.where('threadId', threadId).run(),
|
|
12
12
|
]);
|
|
13
13
|
if (!targetLabel) {
|
|
14
14
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
@@ -22,15 +22,13 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
22
22
|
for (const label of threadLabels) {
|
|
23
23
|
if (label.labelId === targetLabel.id)
|
|
24
24
|
continue;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
threadLabelDeletePromises.push(tx.mutate.threadMessageLabelUid.delete({
|
|
25
|
+
sourceLocations.push({
|
|
26
|
+
labelId: label.labelId,
|
|
27
|
+
threadMessageId: label.threadMessageId,
|
|
28
|
+
uid: label.uid,
|
|
29
|
+
uidValidity: label.uidValidity,
|
|
30
|
+
});
|
|
31
|
+
threadLabelDeletePromises.push(tx.mutate.threadLabel.delete({
|
|
34
32
|
accountId: thread.accountId,
|
|
35
33
|
labelId: label.labelId,
|
|
36
34
|
threadMessageId: label.threadMessageId,
|
|
@@ -51,7 +49,7 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
51
49
|
const messages = await tx.query.threadMessage.where('threadId', threadId).run();
|
|
52
50
|
const baseTimestamp = Date.now();
|
|
53
51
|
await Promise.all([
|
|
54
|
-
...messages.map((message, i) => tx.mutate.
|
|
52
|
+
...messages.map((message, i) => tx.mutate.threadLabel.insert({
|
|
55
53
|
accountId: thread.accountId,
|
|
56
54
|
labelId: targetLabel.id,
|
|
57
55
|
lastSyncedAt: 0,
|
|
@@ -113,11 +111,11 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
113
111
|
: []),
|
|
114
112
|
]);
|
|
115
113
|
}
|
|
116
|
-
const existingChecks = await Promise.all(messages.map(message => tx.query.
|
|
114
|
+
const existingChecks = await Promise.all(messages.map(message => tx.query.threadLabel.where('threadMessageId', message.id).where('labelId', label.id).one().run()));
|
|
117
115
|
const messagesToInsert = messages.filter((_, i) => !existingChecks[i]);
|
|
118
116
|
const baseTimestamp = Date.now();
|
|
119
117
|
if (messagesToInsert.length > 0) {
|
|
120
|
-
await Promise.all(messagesToInsert.map((message, i) => tx.mutate.
|
|
118
|
+
await Promise.all(messagesToInsert.map((message, i) => tx.mutate.threadLabel.insert({
|
|
121
119
|
accountId: thread.accountId,
|
|
122
120
|
labelId: label.id,
|
|
123
121
|
lastSyncedAt: 0,
|
|
@@ -127,7 +125,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
127
125
|
uidValidity: label.uidValidity ?? 0,
|
|
128
126
|
})));
|
|
129
127
|
}
|
|
130
|
-
const allLabels = await tx.query.
|
|
128
|
+
const allLabels = await tx.query.threadLabel.where('threadId', threadId).run();
|
|
131
129
|
await tx.mutate.thread.update({
|
|
132
130
|
id: threadId,
|
|
133
131
|
labelIdList: buildLabelIdList([...new Set(allLabels.map(x => x.labelId))]),
|
|
@@ -165,7 +163,7 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
165
163
|
}
|
|
166
164
|
const [label, existingLabels] = await Promise.all([
|
|
167
165
|
tx.query.accountLabel.where('accountId', thread.accountId).where('path', args.labelPath).one().run(),
|
|
168
|
-
tx.query.
|
|
166
|
+
tx.query.threadLabel.where('threadId', threadId).run(),
|
|
169
167
|
]);
|
|
170
168
|
if (!label) {
|
|
171
169
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
@@ -175,19 +173,17 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
175
173
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
176
174
|
}
|
|
177
175
|
for (const existing of labelsForThisLabel) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
});
|
|
185
|
-
}
|
|
176
|
+
allSourceLocations.push({
|
|
177
|
+
labelId: existing.labelId,
|
|
178
|
+
threadMessageId: existing.threadMessageId,
|
|
179
|
+
uid: existing.uid,
|
|
180
|
+
uidValidity: existing.uidValidity,
|
|
181
|
+
});
|
|
186
182
|
}
|
|
187
183
|
const currentLabelIds = new Set(threadsUtils.parseLabelIdList(thread.labelIdList));
|
|
188
184
|
currentLabelIds.delete(label.id);
|
|
189
185
|
await Promise.all([
|
|
190
|
-
...labelsForThisLabel.map(existing => tx.mutate.
|
|
186
|
+
...labelsForThisLabel.map(existing => tx.mutate.threadLabel.delete({
|
|
191
187
|
accountId: thread.accountId,
|
|
192
188
|
labelId: label.id,
|
|
193
189
|
threadMessageId: existing.threadMessageId,
|