@marcoappio/marco-config 2.0.446 → 2.0.448
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 +170 -19
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.js +31 -17
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +69 -12
- package/dist/zero/queries/getAccounts.d.ts +27 -3
- package/dist/zero/queries/getAccounts.d.ts.map +1 -1
- package/dist/zero/queries/getContacts.d.ts +27 -3
- package/dist/zero/queries/getContacts.d.ts.map +1 -1
- package/dist/zero/queries/getDrafts.d.ts +27 -3
- package/dist/zero/queries/getDrafts.d.ts.map +1 -1
- package/dist/zero/queries/getThreads.d.ts +27 -3
- package/dist/zero/queries/getThreads.d.ts.map +1 -1
- package/dist/zero/queries/getThreads.js +1 -1
- package/dist/zero/queries/getUser.d.ts +27 -3
- package/dist/zero/queries/getUser.d.ts.map +1 -1
- package/dist/zero/queries/index.d.ts +27 -3
- package/dist/zero/queries/index.d.ts.map +1 -1
- package/dist/zero/schema.d.ts +35 -4
- package/dist/zero/schema.d.ts.map +1 -1
- package/dist/zero/schema.js +16 -1
- package/package.json +1 -1
package/dist/zero/index.d.ts
CHANGED
|
@@ -834,10 +834,17 @@ export declare const marcoZero: {
|
|
|
834
834
|
} & {
|
|
835
835
|
serverName: string;
|
|
836
836
|
};
|
|
837
|
+
readonly threadMessageId: {
|
|
838
|
+
type: "string";
|
|
839
|
+
optional: false;
|
|
840
|
+
customType: string;
|
|
841
|
+
} & {
|
|
842
|
+
serverName: string;
|
|
843
|
+
};
|
|
837
844
|
};
|
|
838
845
|
primaryKey: readonly [string, ...string[]];
|
|
839
846
|
} & {
|
|
840
|
-
primaryKey: ["
|
|
847
|
+
primaryKey: ["threadMessageId", "labelId"];
|
|
841
848
|
};
|
|
842
849
|
readonly threadMessage: {
|
|
843
850
|
name: "threadMessage";
|
|
@@ -1086,7 +1093,7 @@ export declare const marcoZero: {
|
|
|
1086
1093
|
}];
|
|
1087
1094
|
threads: [{
|
|
1088
1095
|
readonly sourceField: string[];
|
|
1089
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
1096
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
1090
1097
|
readonly destSchema: "threadLabel";
|
|
1091
1098
|
readonly cardinality: "many";
|
|
1092
1099
|
}, {
|
|
@@ -1147,7 +1154,7 @@ export declare const marcoZero: {
|
|
|
1147
1154
|
}];
|
|
1148
1155
|
labels: [{
|
|
1149
1156
|
readonly sourceField: string[];
|
|
1150
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
1157
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
1151
1158
|
readonly destSchema: "threadLabel";
|
|
1152
1159
|
readonly cardinality: "many";
|
|
1153
1160
|
}, {
|
|
@@ -1176,6 +1183,12 @@ export declare const marcoZero: {
|
|
|
1176
1183
|
readonly destSchema: "accountLabel";
|
|
1177
1184
|
readonly cardinality: "one";
|
|
1178
1185
|
}];
|
|
1186
|
+
message: [{
|
|
1187
|
+
readonly sourceField: string[];
|
|
1188
|
+
readonly destField: ("id" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
1189
|
+
readonly destSchema: "threadMessage";
|
|
1190
|
+
readonly cardinality: "one";
|
|
1191
|
+
}];
|
|
1179
1192
|
thread: [{
|
|
1180
1193
|
readonly sourceField: string[];
|
|
1181
1194
|
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
@@ -1190,6 +1203,17 @@ export declare const marcoZero: {
|
|
|
1190
1203
|
readonly destSchema: "threadMessageAttachment";
|
|
1191
1204
|
readonly cardinality: "many";
|
|
1192
1205
|
}];
|
|
1206
|
+
labels: [{
|
|
1207
|
+
readonly sourceField: string[];
|
|
1208
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
1209
|
+
readonly destSchema: "threadLabel";
|
|
1210
|
+
readonly cardinality: "many";
|
|
1211
|
+
}, {
|
|
1212
|
+
readonly sourceField: string[];
|
|
1213
|
+
readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
|
|
1214
|
+
readonly destSchema: "accountLabel";
|
|
1215
|
+
readonly cardinality: "many";
|
|
1216
|
+
}];
|
|
1193
1217
|
recipients: [{
|
|
1194
1218
|
readonly sourceField: string[];
|
|
1195
1219
|
readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
@@ -1775,10 +1799,17 @@ export declare const marcoZero: {
|
|
|
1775
1799
|
} & {
|
|
1776
1800
|
serverName: string;
|
|
1777
1801
|
};
|
|
1802
|
+
readonly threadMessageId: {
|
|
1803
|
+
type: "string";
|
|
1804
|
+
optional: false;
|
|
1805
|
+
customType: string;
|
|
1806
|
+
} & {
|
|
1807
|
+
serverName: string;
|
|
1808
|
+
};
|
|
1778
1809
|
};
|
|
1779
1810
|
primaryKey: readonly [string, ...string[]];
|
|
1780
1811
|
} & {
|
|
1781
|
-
primaryKey: ["
|
|
1812
|
+
primaryKey: ["threadMessageId", "labelId"];
|
|
1782
1813
|
};
|
|
1783
1814
|
readonly threadMessage: {
|
|
1784
1815
|
name: "threadMessage";
|
|
@@ -2027,7 +2058,7 @@ export declare const marcoZero: {
|
|
|
2027
2058
|
}];
|
|
2028
2059
|
threads: [{
|
|
2029
2060
|
readonly sourceField: string[];
|
|
2030
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
2061
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
2031
2062
|
readonly destSchema: "threadLabel";
|
|
2032
2063
|
readonly cardinality: "many";
|
|
2033
2064
|
}, {
|
|
@@ -2088,7 +2119,7 @@ export declare const marcoZero: {
|
|
|
2088
2119
|
}];
|
|
2089
2120
|
labels: [{
|
|
2090
2121
|
readonly sourceField: string[];
|
|
2091
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
2122
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
2092
2123
|
readonly destSchema: "threadLabel";
|
|
2093
2124
|
readonly cardinality: "many";
|
|
2094
2125
|
}, {
|
|
@@ -2117,6 +2148,12 @@ export declare const marcoZero: {
|
|
|
2117
2148
|
readonly destSchema: "accountLabel";
|
|
2118
2149
|
readonly cardinality: "one";
|
|
2119
2150
|
}];
|
|
2151
|
+
message: [{
|
|
2152
|
+
readonly sourceField: string[];
|
|
2153
|
+
readonly destField: ("id" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
2154
|
+
readonly destSchema: "threadMessage";
|
|
2155
|
+
readonly cardinality: "one";
|
|
2156
|
+
}];
|
|
2120
2157
|
thread: [{
|
|
2121
2158
|
readonly sourceField: string[];
|
|
2122
2159
|
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
@@ -2131,6 +2168,17 @@ export declare const marcoZero: {
|
|
|
2131
2168
|
readonly destSchema: "threadMessageAttachment";
|
|
2132
2169
|
readonly cardinality: "many";
|
|
2133
2170
|
}];
|
|
2171
|
+
labels: [{
|
|
2172
|
+
readonly sourceField: string[];
|
|
2173
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
2174
|
+
readonly destSchema: "threadLabel";
|
|
2175
|
+
readonly cardinality: "many";
|
|
2176
|
+
}, {
|
|
2177
|
+
readonly sourceField: string[];
|
|
2178
|
+
readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
|
|
2179
|
+
readonly destSchema: "accountLabel";
|
|
2180
|
+
readonly cardinality: "many";
|
|
2181
|
+
}];
|
|
2134
2182
|
recipients: [{
|
|
2135
2183
|
readonly sourceField: string[];
|
|
2136
2184
|
readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
@@ -2685,10 +2733,17 @@ export declare const marcoZero: {
|
|
|
2685
2733
|
} & {
|
|
2686
2734
|
serverName: string;
|
|
2687
2735
|
};
|
|
2736
|
+
readonly threadMessageId: {
|
|
2737
|
+
type: "string";
|
|
2738
|
+
optional: false;
|
|
2739
|
+
customType: string;
|
|
2740
|
+
} & {
|
|
2741
|
+
serverName: string;
|
|
2742
|
+
};
|
|
2688
2743
|
};
|
|
2689
2744
|
primaryKey: readonly [string, ...string[]];
|
|
2690
2745
|
} & {
|
|
2691
|
-
primaryKey: ["
|
|
2746
|
+
primaryKey: ["threadMessageId", "labelId"];
|
|
2692
2747
|
};
|
|
2693
2748
|
readonly threadMessage: {
|
|
2694
2749
|
name: "threadMessage";
|
|
@@ -2937,7 +2992,7 @@ export declare const marcoZero: {
|
|
|
2937
2992
|
}];
|
|
2938
2993
|
threads: [{
|
|
2939
2994
|
readonly sourceField: string[];
|
|
2940
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
2995
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
2941
2996
|
readonly destSchema: "threadLabel";
|
|
2942
2997
|
readonly cardinality: "many";
|
|
2943
2998
|
}, {
|
|
@@ -2998,7 +3053,7 @@ export declare const marcoZero: {
|
|
|
2998
3053
|
}];
|
|
2999
3054
|
labels: [{
|
|
3000
3055
|
readonly sourceField: string[];
|
|
3001
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
3056
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
3002
3057
|
readonly destSchema: "threadLabel";
|
|
3003
3058
|
readonly cardinality: "many";
|
|
3004
3059
|
}, {
|
|
@@ -3027,6 +3082,12 @@ export declare const marcoZero: {
|
|
|
3027
3082
|
readonly destSchema: "accountLabel";
|
|
3028
3083
|
readonly cardinality: "one";
|
|
3029
3084
|
}];
|
|
3085
|
+
message: [{
|
|
3086
|
+
readonly sourceField: string[];
|
|
3087
|
+
readonly destField: ("id" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
3088
|
+
readonly destSchema: "threadMessage";
|
|
3089
|
+
readonly cardinality: "one";
|
|
3090
|
+
}];
|
|
3030
3091
|
thread: [{
|
|
3031
3092
|
readonly sourceField: string[];
|
|
3032
3093
|
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
@@ -3041,6 +3102,17 @@ export declare const marcoZero: {
|
|
|
3041
3102
|
readonly destSchema: "threadMessageAttachment";
|
|
3042
3103
|
readonly cardinality: "many";
|
|
3043
3104
|
}];
|
|
3105
|
+
labels: [{
|
|
3106
|
+
readonly sourceField: string[];
|
|
3107
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
3108
|
+
readonly destSchema: "threadLabel";
|
|
3109
|
+
readonly cardinality: "many";
|
|
3110
|
+
}, {
|
|
3111
|
+
readonly sourceField: string[];
|
|
3112
|
+
readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
|
|
3113
|
+
readonly destSchema: "accountLabel";
|
|
3114
|
+
readonly cardinality: "many";
|
|
3115
|
+
}];
|
|
3044
3116
|
recipients: [{
|
|
3045
3117
|
readonly sourceField: string[];
|
|
3046
3118
|
readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
@@ -3635,10 +3707,17 @@ export declare const marcoZero: {
|
|
|
3635
3707
|
} & {
|
|
3636
3708
|
serverName: string;
|
|
3637
3709
|
};
|
|
3710
|
+
readonly threadMessageId: {
|
|
3711
|
+
type: "string";
|
|
3712
|
+
optional: false;
|
|
3713
|
+
customType: string;
|
|
3714
|
+
} & {
|
|
3715
|
+
serverName: string;
|
|
3716
|
+
};
|
|
3638
3717
|
};
|
|
3639
3718
|
primaryKey: readonly [string, ...string[]];
|
|
3640
3719
|
} & {
|
|
3641
|
-
primaryKey: ["
|
|
3720
|
+
primaryKey: ["threadMessageId", "labelId"];
|
|
3642
3721
|
};
|
|
3643
3722
|
readonly threadMessage: {
|
|
3644
3723
|
name: "threadMessage";
|
|
@@ -3887,7 +3966,7 @@ export declare const marcoZero: {
|
|
|
3887
3966
|
}];
|
|
3888
3967
|
threads: [{
|
|
3889
3968
|
readonly sourceField: string[];
|
|
3890
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
3969
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
3891
3970
|
readonly destSchema: "threadLabel";
|
|
3892
3971
|
readonly cardinality: "many";
|
|
3893
3972
|
}, {
|
|
@@ -3948,7 +4027,7 @@ export declare const marcoZero: {
|
|
|
3948
4027
|
}];
|
|
3949
4028
|
labels: [{
|
|
3950
4029
|
readonly sourceField: string[];
|
|
3951
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
4030
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
3952
4031
|
readonly destSchema: "threadLabel";
|
|
3953
4032
|
readonly cardinality: "many";
|
|
3954
4033
|
}, {
|
|
@@ -3977,6 +4056,12 @@ export declare const marcoZero: {
|
|
|
3977
4056
|
readonly destSchema: "accountLabel";
|
|
3978
4057
|
readonly cardinality: "one";
|
|
3979
4058
|
}];
|
|
4059
|
+
message: [{
|
|
4060
|
+
readonly sourceField: string[];
|
|
4061
|
+
readonly destField: ("id" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
4062
|
+
readonly destSchema: "threadMessage";
|
|
4063
|
+
readonly cardinality: "one";
|
|
4064
|
+
}];
|
|
3980
4065
|
thread: [{
|
|
3981
4066
|
readonly sourceField: string[];
|
|
3982
4067
|
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
@@ -3991,6 +4076,17 @@ export declare const marcoZero: {
|
|
|
3991
4076
|
readonly destSchema: "threadMessageAttachment";
|
|
3992
4077
|
readonly cardinality: "many";
|
|
3993
4078
|
}];
|
|
4079
|
+
labels: [{
|
|
4080
|
+
readonly sourceField: string[];
|
|
4081
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
4082
|
+
readonly destSchema: "threadLabel";
|
|
4083
|
+
readonly cardinality: "many";
|
|
4084
|
+
}, {
|
|
4085
|
+
readonly sourceField: string[];
|
|
4086
|
+
readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
|
|
4087
|
+
readonly destSchema: "accountLabel";
|
|
4088
|
+
readonly cardinality: "many";
|
|
4089
|
+
}];
|
|
3994
4090
|
recipients: [{
|
|
3995
4091
|
readonly sourceField: string[];
|
|
3996
4092
|
readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
@@ -4578,10 +4674,17 @@ export declare const marcoZero: {
|
|
|
4578
4674
|
} & {
|
|
4579
4675
|
serverName: string;
|
|
4580
4676
|
};
|
|
4677
|
+
readonly threadMessageId: {
|
|
4678
|
+
type: "string";
|
|
4679
|
+
optional: false;
|
|
4680
|
+
customType: string;
|
|
4681
|
+
} & {
|
|
4682
|
+
serverName: string;
|
|
4683
|
+
};
|
|
4581
4684
|
};
|
|
4582
4685
|
primaryKey: readonly [string, ...string[]];
|
|
4583
4686
|
} & {
|
|
4584
|
-
primaryKey: ["
|
|
4687
|
+
primaryKey: ["threadMessageId", "labelId"];
|
|
4585
4688
|
};
|
|
4586
4689
|
readonly threadMessage: {
|
|
4587
4690
|
name: "threadMessage";
|
|
@@ -4830,7 +4933,7 @@ export declare const marcoZero: {
|
|
|
4830
4933
|
}];
|
|
4831
4934
|
threads: [{
|
|
4832
4935
|
readonly sourceField: string[];
|
|
4833
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
4936
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
4834
4937
|
readonly destSchema: "threadLabel";
|
|
4835
4938
|
readonly cardinality: "many";
|
|
4836
4939
|
}, {
|
|
@@ -4891,7 +4994,7 @@ export declare const marcoZero: {
|
|
|
4891
4994
|
}];
|
|
4892
4995
|
labels: [{
|
|
4893
4996
|
readonly sourceField: string[];
|
|
4894
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
4997
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
4895
4998
|
readonly destSchema: "threadLabel";
|
|
4896
4999
|
readonly cardinality: "many";
|
|
4897
5000
|
}, {
|
|
@@ -4920,6 +5023,12 @@ export declare const marcoZero: {
|
|
|
4920
5023
|
readonly destSchema: "accountLabel";
|
|
4921
5024
|
readonly cardinality: "one";
|
|
4922
5025
|
}];
|
|
5026
|
+
message: [{
|
|
5027
|
+
readonly sourceField: string[];
|
|
5028
|
+
readonly destField: ("id" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
5029
|
+
readonly destSchema: "threadMessage";
|
|
5030
|
+
readonly cardinality: "one";
|
|
5031
|
+
}];
|
|
4923
5032
|
thread: [{
|
|
4924
5033
|
readonly sourceField: string[];
|
|
4925
5034
|
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
@@ -4934,6 +5043,17 @@ export declare const marcoZero: {
|
|
|
4934
5043
|
readonly destSchema: "threadMessageAttachment";
|
|
4935
5044
|
readonly cardinality: "many";
|
|
4936
5045
|
}];
|
|
5046
|
+
labels: [{
|
|
5047
|
+
readonly sourceField: string[];
|
|
5048
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
5049
|
+
readonly destSchema: "threadLabel";
|
|
5050
|
+
readonly cardinality: "many";
|
|
5051
|
+
}, {
|
|
5052
|
+
readonly sourceField: string[];
|
|
5053
|
+
readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
|
|
5054
|
+
readonly destSchema: "accountLabel";
|
|
5055
|
+
readonly cardinality: "many";
|
|
5056
|
+
}];
|
|
4937
5057
|
recipients: [{
|
|
4938
5058
|
readonly sourceField: string[];
|
|
4939
5059
|
readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
@@ -5526,10 +5646,17 @@ export declare const marcoZero: {
|
|
|
5526
5646
|
} & {
|
|
5527
5647
|
serverName: string;
|
|
5528
5648
|
};
|
|
5649
|
+
readonly threadMessageId: {
|
|
5650
|
+
type: "string";
|
|
5651
|
+
optional: false;
|
|
5652
|
+
customType: string;
|
|
5653
|
+
} & {
|
|
5654
|
+
serverName: string;
|
|
5655
|
+
};
|
|
5529
5656
|
};
|
|
5530
5657
|
primaryKey: readonly [string, ...string[]];
|
|
5531
5658
|
} & {
|
|
5532
|
-
primaryKey: ["
|
|
5659
|
+
primaryKey: ["threadMessageId", "labelId"];
|
|
5533
5660
|
};
|
|
5534
5661
|
readonly threadMessage: {
|
|
5535
5662
|
name: "threadMessage";
|
|
@@ -5778,7 +5905,7 @@ export declare const marcoZero: {
|
|
|
5778
5905
|
}];
|
|
5779
5906
|
threads: [{
|
|
5780
5907
|
readonly sourceField: string[];
|
|
5781
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
5908
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
5782
5909
|
readonly destSchema: "threadLabel";
|
|
5783
5910
|
readonly cardinality: "many";
|
|
5784
5911
|
}, {
|
|
@@ -5839,7 +5966,7 @@ export declare const marcoZero: {
|
|
|
5839
5966
|
}];
|
|
5840
5967
|
labels: [{
|
|
5841
5968
|
readonly sourceField: string[];
|
|
5842
|
-
readonly destField: ("labelId" | "threadId")[];
|
|
5969
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
5843
5970
|
readonly destSchema: "threadLabel";
|
|
5844
5971
|
readonly cardinality: "many";
|
|
5845
5972
|
}, {
|
|
@@ -5868,6 +5995,12 @@ export declare const marcoZero: {
|
|
|
5868
5995
|
readonly destSchema: "accountLabel";
|
|
5869
5996
|
readonly cardinality: "one";
|
|
5870
5997
|
}];
|
|
5998
|
+
message: [{
|
|
5999
|
+
readonly sourceField: string[];
|
|
6000
|
+
readonly destField: ("id" | "threadId" | "envelopeDate" | "envelopeSubject" | "previewText" | "senderEmail" | "senderName")[];
|
|
6001
|
+
readonly destSchema: "threadMessage";
|
|
6002
|
+
readonly cardinality: "one";
|
|
6003
|
+
}];
|
|
5871
6004
|
thread: [{
|
|
5872
6005
|
readonly sourceField: string[];
|
|
5873
6006
|
readonly destField: ("id" | "userId" | "accountId" | "flagged" | "latestMessageDate" | "seen" | "words")[];
|
|
@@ -5882,6 +6015,17 @@ export declare const marcoZero: {
|
|
|
5882
6015
|
readonly destSchema: "threadMessageAttachment";
|
|
5883
6016
|
readonly cardinality: "many";
|
|
5884
6017
|
}];
|
|
6018
|
+
labels: [{
|
|
6019
|
+
readonly sourceField: string[];
|
|
6020
|
+
readonly destField: ("labelId" | "threadId" | "threadMessageId")[];
|
|
6021
|
+
readonly destSchema: "threadLabel";
|
|
6022
|
+
readonly cardinality: "many";
|
|
6023
|
+
}, {
|
|
6024
|
+
readonly sourceField: string[];
|
|
6025
|
+
readonly destField: ("id" | "accountId" | "path" | "specialUse")[];
|
|
6026
|
+
readonly destSchema: "accountLabel";
|
|
6027
|
+
readonly cardinality: "many";
|
|
6028
|
+
}];
|
|
5885
6029
|
recipients: [{
|
|
5886
6030
|
readonly sourceField: string[];
|
|
5887
6031
|
readonly destField: ("type" | "id" | "name" | "emailAddress" | "threadMessageId")[];
|
|
@@ -6358,10 +6502,17 @@ export declare const marcoZero: {
|
|
|
6358
6502
|
} & {
|
|
6359
6503
|
serverName: string;
|
|
6360
6504
|
};
|
|
6505
|
+
readonly threadMessageId: {
|
|
6506
|
+
type: "string";
|
|
6507
|
+
optional: false;
|
|
6508
|
+
customType: string;
|
|
6509
|
+
} & {
|
|
6510
|
+
serverName: string;
|
|
6511
|
+
};
|
|
6361
6512
|
};
|
|
6362
6513
|
primaryKey: readonly [string, ...string[]];
|
|
6363
6514
|
} & {
|
|
6364
|
-
primaryKey: ["
|
|
6515
|
+
primaryKey: ["threadMessageId", "labelId"];
|
|
6365
6516
|
}>;
|
|
6366
6517
|
readonly threadMessage: import("@rocicorp/zero").TableBuilderWithColumns<{
|
|
6367
6518
|
name: "threadMessage";
|
package/dist/zero/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zero/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAY,MAAM,oBAAoB,eAAe,KAAG,OAAO,CAAC,IAAI,CA4C/G,CAAA;AAED,eAAO,MAAM,oBAAoB,cACpB,QAAQ,GAAG,SAAS,cACnB,sBAAsB,KACjC,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAmJxC,CAAA"}
|
|
@@ -22,15 +22,19 @@ export const setSystemLabel = async (tx, threadId, targetSpecialUse) => {
|
|
|
22
22
|
else {
|
|
23
23
|
await tx.mutate.threadLabel.delete({
|
|
24
24
|
labelId: label.labelId,
|
|
25
|
-
|
|
25
|
+
threadMessageId: label.threadMessageId,
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
if (!hasTarget) {
|
|
30
|
-
await tx.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const messages = await tx.query.threadMessage.where('threadId', threadId).run();
|
|
31
|
+
for (const message of messages) {
|
|
32
|
+
await tx.mutate.threadLabel.insert({
|
|
33
|
+
labelId: targetLabel.id,
|
|
34
|
+
threadId,
|
|
35
|
+
threadMessageId: message.id,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
};
|
|
36
40
|
export const createThreadMutators = (_authData, callbacks) => ({
|
|
@@ -48,12 +52,20 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
48
52
|
if (!label) {
|
|
49
53
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
50
54
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
await tx.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
const messages = await tx.query.threadMessage.where('threadId', threadId).run();
|
|
56
|
+
for (const message of messages) {
|
|
57
|
+
const existing = await tx.query.threadLabel
|
|
58
|
+
.where('threadMessageId', message.id)
|
|
59
|
+
.where('labelId', label.id)
|
|
60
|
+
.one()
|
|
61
|
+
.run();
|
|
62
|
+
if (!existing) {
|
|
63
|
+
await tx.mutate.threadLabel.insert({
|
|
64
|
+
labelId: label.id,
|
|
65
|
+
threadId,
|
|
66
|
+
threadMessageId: message.id,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
71
|
callbacks?.addLabel?.(args);
|
|
@@ -80,14 +92,16 @@ export const createThreadMutators = (_authData, callbacks) => ({
|
|
|
80
92
|
if (!label) {
|
|
81
93
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
82
94
|
}
|
|
83
|
-
const
|
|
84
|
-
if (
|
|
95
|
+
const existingLabels = await tx.query.threadLabel.where('threadId', threadId).where('labelId', label.id).run();
|
|
96
|
+
if (existingLabels.length === 0) {
|
|
85
97
|
throw new Error(MutationError.ENTITY_NOT_FOUND);
|
|
86
98
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
for (const existing of existingLabels) {
|
|
100
|
+
await tx.mutate.threadLabel.delete({
|
|
101
|
+
labelId: label.id,
|
|
102
|
+
threadMessageId: existing.threadMessageId,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
91
105
|
}
|
|
92
106
|
callbacks?.removeLabel?.(args);
|
|
93
107
|
},
|