-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
table.go
286 lines (280 loc) · 24.7 KB
/
table.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
package table
import (
badGlobalLog "github.com/rs/zerolog/log"
)
/*
Unknown fields = I don't know what type it is supposed to be, because I only see 9 which is undefined
Trial and error works ^ check console for failed conversation within the decoder
*/
type LSTable struct {
LSMciTraceLog []*LSMciTraceLog `json:",omitempty"`
LSExecuteFirstBlockForSyncTransaction []*LSExecuteFirstBlockForSyncTransaction `json:",omitempty"`
LSTruncateMetadataThreads []*LSTruncateMetadataThreads `json:",omitempty"`
LSTruncateThreadRangeTablesForSyncGroup []*LSTruncateThreadRangeTablesForSyncGroup `json:",omitempty"`
LSUpsertSyncGroupThreadsRange []*LSUpsertSyncGroupThreadsRange `json:",omitempty"`
LSUpsertInboxThreadsRange []*LSUpsertInboxThreadsRange `json:",omitempty"`
LSUpdateThreadsRangesV2 []*LSUpdateThreadsRangesV2 `json:",omitempty"`
LSUpsertFolderSeenTimestamp []*LSUpsertFolderSeenTimestamp `json:",omitempty"`
LSSetHMPSStatus []*LSSetHMPSStatus `json:",omitempty"`
LSTruncateTablesForSyncGroup []*LSTruncateTablesForSyncGroup `json:",omitempty"`
LSDeleteThenInsertThread []*LSDeleteThenInsertThread `json:",omitempty"`
LSAddParticipantIdToGroupThread []*LSAddParticipantIdToGroupThread `json:",omitempty"`
LSClearPinnedMessages []*LSClearPinnedMessages `json:",omitempty"`
LSWriteThreadCapabilities []*LSWriteThreadCapabilities `json:",omitempty"`
LSUpsertMessage []*LSUpsertMessage `json:",omitempty"`
LSSetForwardScore []*LSSetForwardScore `json:",omitempty"`
LSSetMessageDisplayedContentTypes []*LSSetMessageDisplayedContentTypes `json:",omitempty"`
LSUpdateReadReceipt []*LSUpdateReadReceipt `json:",omitempty"`
LSInsertNewMessageRange []*LSInsertNewMessageRange `json:",omitempty"`
LSUpdateExistingMessageRange []*LSUpdateExistingMessageRange `json:",omitempty"`
LSDeleteExistingMessageRanges []*LSDeleteExistingMessageRanges `json:",omitempty"`
LSUpsertSequenceId []*LSUpsertSequenceId `json:",omitempty"`
LSVerifyContactRowExists []*LSVerifyContactRowExists `json:",omitempty"`
LSThreadsRangesQuery []*LSThreadsRangesQuery `json:",omitempty"`
LSSetRegionHint []*LSSetRegionHint `json:",omitempty"`
LSExecuteFinallyBlockForSyncTransaction []*LSExecuteFinallyBlockForSyncTransaction `json:",omitempty"`
LSRemoveTask []*LSRemoveTask `json:",omitempty"`
LSTaskExists []*LSTaskExists `json:",omitempty"`
LSDeleteThenInsertContact []*LSDeleteThenInsertContact `json:",omitempty"`
LSUpdateTypingIndicator []*LSUpdateTypingIndicator `json:",omitempty"`
LSCheckAuthoritativeMessageExists []*LSCheckAuthoritativeMessageExists `json:",omitempty"`
LSMoveThreadToInboxAndUpdateParent []*LSMoveThreadToInboxAndUpdateParent `json:",omitempty"`
LSUpdateThreadSnippet []*LSUpdateThreadSnippet `json:",omitempty"`
LSVerifyThreadExists []*LSVerifyThreadExists `json:",omitempty"`
LSBumpThread []*LSBumpThread `json:",omitempty"`
LSUpdateParticipantLastMessageSendTimestamp []*LSUpdateParticipantLastMessageSendTimestamp `json:",omitempty"`
LSInsertMessage []*LSInsertMessage `json:",omitempty"`
LSUpsertGradientColor []*LSUpsertGradientColor `json:",omitempty"`
LSUpsertTheme []*LSUpsertTheme `json:",omitempty"`
LSInsertStickerAttachment []*LSInsertStickerAttachment `json:",omitempty"`
LSUpsertReaction []*LSUpsertReaction `json:",omitempty"`
LSDeleteReaction []*LSDeleteReaction `json:",omitempty"`
LSHandleRepliesOnUnsend []*LSHandleRepliesOnUnsend `json:",omitempty"`
LSInsertXmaAttachment []*LSInsertXmaAttachment `json:",omitempty"`
LSUpdateUnsentMessageCollapsedStatus []*LSUpdateUnsentMessageCollapsedStatus `json:",omitempty"`
LSDeleteThenInsertMessage []*LSDeleteThenInsertMessage `json:",omitempty"`
LSUpdateThreadSnippetFromLastMessage []*LSUpdateThreadSnippetFromLastMessage `json:",omitempty"`
LSUpdateForRollCallMessageDeleted []*LSUpdateForRollCallMessageDeleted `json:",omitempty"`
LSInsertBlobAttachment []*LSInsertBlobAttachment `json:",omitempty"`
LSDeleteBannersByIds []*LSDeleteBannersByIds `json:",omitempty"`
LSUpdateDeliveryReceipt []*LSUpdateDeliveryReceipt `json:",omitempty"`
LSUpdateTaskQueueName []*LSUpdateTaskQueueName `json:",omitempty"`
LSUpdateTaskValue []*LSUpdateTaskValue `json:",omitempty"`
LSReplaceOptimsiticMessage []*LSReplaceOptimsiticMessage `json:",omitempty"`
LSUpdateOptimisticContextThreadKeys []*LSUpdateOptimisticContextThreadKeys `json:",omitempty"`
LSReplaceOptimisticThread []*LSReplaceOptimisticThread `json:",omitempty"`
LSApplyNewGroupThread []*LSApplyNewGroupThread `json:",omitempty"`
LSRemoveAllParticipantsForThread []*LSRemoveAllParticipantsForThread `json:",omitempty"`
LSAppendDataTraceAddon []*LSAppendDataTraceAddon `json:",omitempty"`
LSUpdateThreadInviteLinksInfo []*LSUpdateThreadInviteLinksInfo `json:",omitempty"`
LSUpdateThreadParticipantAdminStatus []*LSUpdateThreadParticipantAdminStatus `json:",omitempty"`
LSUpdateParticipantSubscribeSourceText []*LSUpdateParticipantSubscribeSourceText `json:",omitempty"`
LSOverwriteAllThreadParticipantsAdminStatus []*LSOverwriteAllThreadParticipantsAdminStatus `json:",omitempty"`
LSUpdateParticipantCapabilities []*LSUpdateParticipantCapabilities `json:",omitempty"`
LSChangeViewerStatus []*LSChangeViewerStatus `json:",omitempty"`
LSUpdateSearchQueryStatus []*LSUpdateSearchQueryStatus `json:",omitempty"`
LSInsertSearchResult []*LSInsertSearchResult `json:",omitempty"`
LSInsertSearchSection []*LSInsertSearchSection `json:",omitempty"`
LSSyncUpdateThreadName []*LSSyncUpdateThreadName `json:",omitempty"`
LSSetThreadImageURL []*LSSetThreadImageURL `json:",omitempty"`
LSSetMessageTextHasLinks []*LSSetMessageTextHasLinks `json:",omitempty"`
LSUpdateMessagesOptimisticContext []*LSUpdateMessagesOptimisticContext `json:",omitempty"`
LSMailboxTaskCompletionApiOnTaskCompletion []*LSMailboxTaskCompletionApiOnTaskCompletion `json:",omitempty"`
LSWriteCTAIdToThreadsTable []*LSWriteCTAIdToThreadsTable `json:",omitempty"`
LSQueryAdditionalGroupThreads []*LSQueryAdditionalGroupThreads `json:",omitempty"`
LSReplaceOptimisticReaction []*LSReplaceOptimisticReaction `json:",omitempty"`
LSDeleteThenInsertMessageRequest []*LSDeleteThenInsertMessageRequest `json:",omitempty"`
LSDeleteThenInsertIgThreadInfo []*LSDeleteThenInsertIgThreadInfo `json:",omitempty"`
LSDeleteThenInsertContactPresence []*LSDeleteThenInsertContactPresence `json:",omitempty"`
LSTruncatePresenceDatabase []*LSTruncatePresenceDatabase `json:",omitempty"`
LSMarkThreadRead []*LSMarkThreadRead `json:",omitempty"`
LSUpdateParentFolderReadWatermark []*LSUpdateParentFolderReadWatermark `json:",omitempty"`
LSInsertAttachmentItem []*LSInsertAttachmentItem `json:",omitempty"`
LSGetFirstAvailableAttachmentCTAID []*LSGetFirstAvailableAttachmentCTAID `json:",omitempty"`
LSInsertAttachmentCta []*LSInsertAttachmentCta `json:",omitempty"`
LSUpdateAttachmentItemCtaAtIndex []*LSUpdateAttachmentItemCtaAtIndex `json:",omitempty"`
LSUpdateAttachmentCtaAtIndexIgnoringAuthority []*LSUpdateAttachmentCtaAtIndexIgnoringAuthority `json:",omitempty"`
LSHasMatchingAttachmentCTA []*LSHasMatchingAttachmentCTA `json:",omitempty"`
LSDeleteThenInsertIGContactInfo []*LSDeleteThenInsertIGContactInfo `json:",omitempty"`
LSIssueNewTask []*LSIssueNewTask `json:",omitempty"`
LSUpdateOrInsertThread []*LSUpdateOrInsertThread `json:",omitempty"`
LSSetThreadCannotUnsendReason []*LSSetThreadCannotUnsendReason `json:",omitempty"`
LSClearLocalThreadPictureUrl []*LSClearLocalThreadPictureUrl `json:",omitempty"`
LSUpdateInviterId []*LSUpdateInviterId `json:",omitempty"`
LSAddToMemberCount []*LSAddToMemberCount `json:",omitempty"`
LSMoveThreadToArchivedFolder []*LSMoveThreadToArchivedFolder `json:",omitempty"`
LSRemoveParticipantFromThread []*LSRemoveParticipantFromThread `json:",omitempty"`
LSDeleteRtcRoomOnThread []*LSDeleteRtcRoomOnThread `json:",omitempty"`
LSUpdateThreadTheme []*LSUpdateThreadTheme `json:",omitempty"`
LSUpdateThreadApprovalMode []*LSUpdateThreadApprovalMode `json:",omitempty"`
LSRemoveAllRequestsFromAdminApprovalQueue []*LSRemoveAllRequestsFromAdminApprovalQueue `json:",omitempty"`
LSUpdateLastSyncCompletedTimestampMsToNow []*LSUpdateLastSyncCompletedTimestampMsToNow `json:",omitempty"`
LSDeleteMessage []*LSDeleteMessage `json:",omitempty"`
LSHandleRepliesOnRemove []*LSHandleRepliesOnRemove `json:",omitempty"`
LSRefreshLastActivityTimestamp []*LSRefreshLastActivityTimestamp `json:",omitempty"`
LSSetPinnedMessage []*LSSetPinnedMessage `json:",omitempty"`
LSStoryContactSyncFromBucket []*LSStoryContactSyncFromBucket `json:",omitempty"`
LSUpsertLiveLocationSharer []*LSUpsertLiveLocationSharer `json:",omitempty"`
LSDeleteLiveLocationSharer []*LSDeleteLiveLocationSharer `json:",omitempty"`
LSUpdateSharedAlbumOnMessageRecall []*LSUpdateSharedAlbumOnMessageRecall `json:",omitempty"`
LSEditMessage []*LSEditMessage `json:",omitempty"`
LSHandleRepliesOnMessageEdit []*LSHandleRepliesOnMessageEdit `json:",omitempty"`
LSUpdateThreadSnippetFromLastMessageV2 []*LSUpdateThreadSnippetFromLastMessageV2 `json:",omitempty"`
LSMarkOptimisticMessageFailed []*LSMarkOptimisticMessageFailed `json:",omitempty"`
LSUpdateSubscriptErrorMessage []*LSUpdateSubscriptErrorMessage `json:",omitempty"`
LSDeleteThenInsertBotProfileInfoCategoryV2 []*LSDeleteThenInsertBotProfileInfoCategoryV2 `json:",omitempty"`
LSDeleteThenInsertBotProfileInfoV2 []*LSDeleteThenInsertBotProfileInfoV2 `json:",omitempty"`
LSHandleSyncFailure []*LSHandleSyncFailure `json:",omitempty"`
LSDeleteThread []*LSDeleteThread `json:",omitempty"`
LSAddPollForThread []*LSAddPollForThread `json:",omitempty"`
LSAddPollOption []*LSAddPollOption `json:",omitempty"`
LSAddPollOptionV2 []*LSAddPollOption `json:",omitempty"`
LSAddPollVote []*LSAddPollVote `json:",omitempty"`
LSAddPollVoteV2 []*LSAddPollVote `json:",omitempty"`
LSUpdateThreadMuteSetting []*LSUpdateThreadMuteSetting `json:",omitempty"`
LSInsertAttachment []*LSInsertAttachment `json:",omitempty"`
LSUpdateExtraAttachmentColumns []*LSUpdateExtraAttachmentColumns `json:",omitempty"`
LSMoveThreadToE2EECutoverFolder []*LSMoveThreadToE2EECutoverFolder `json:",omitempty"`
LSHandleFailedTask []*LSHandleFailedTask `json:",omitempty"`
}
// TODO replace SPTable with struct tags
var SPTable = map[string]string{
"removeAllRequestsFromAdminApprovalQueue": "LSRemoveAllRequestsFromAdminApprovalQueue",
"updateThreadApprovalMode": "LSUpdateThreadApprovalMode",
"updateThreadTheme": "LSUpdateThreadTheme",
"deleteRtcRoomOnThread": "LSDeleteRtcRoomOnThread",
"removeParticipantFromThread": "LSRemoveParticipantFromThread",
"moveThreadToArchivedFolder": "LSMoveThreadToArchivedFolder",
"setThreadCannotUnsendReason": "LSSetThreadCannotUnsendReason",
"clearLocalThreadPictureUrl": "LSClearLocalThreadPictureUrl",
"updateInviterId": "LSUpdateInviterId",
"addToMemberCount": "LSAddToMemberCount",
"updateOrInsertThread": "LSUpdateOrInsertThread",
"issueNewTask": "LSIssueNewTask",
"deleteThenInsertIGContactInfo": "LSDeleteThenInsertIGContactInfo",
"hasMatchingAttachmentCTA": "LSHasMatchingAttachmentCTA",
"updateAttachmentCtaAtIndexIgnoringAuthority": "LSUpdateAttachmentCtaAtIndexIgnoringAuthority",
"updateAttachmentItemCtaAtIndex": "LSUpdateAttachmentItemCtaAtIndex",
"insertAttachmentCta": "LSInsertAttachmentCta",
"getFirstAvailableAttachmentCTAID": "LSGetFirstAvailableAttachmentCTAID",
"insertAttachmentItem": "LSInsertAttachmentItem",
"updateParentFolderReadWatermark": "LSUpdateParentFolderReadWatermark",
"markThreadRead": "LSMarkThreadRead",
"truncatePresenceDatabase": "LSTruncatePresenceDatabase",
"deleteThenInsertContactPresence": "LSDeleteThenInsertContactPresence",
"deleteThenInsertIgThreadInfo": "LSDeleteThenInsertIgThreadInfo",
"deleteThenInsertMessageRequest": "LSDeleteThenInsertMessageRequest",
"replaceOptimisticReaction": "LSReplaceOptimisticReaction",
"queryAdditionalGroupThreads": "LSQueryAdditionalGroupThreads",
"writeCTAIdToThreadsTable": "LSWriteCTAIdToThreadsTable",
"mailboxTaskCompletionApiOnTaskCompletion": "LSMailboxTaskCompletionApiOnTaskCompletion",
"updateMessagesOptimisticContext": "LSUpdateMessagesOptimisticContext",
"setMessageTextHasLinks": "LSSetMessageTextHasLinks",
"syncUpdateThreadName": "LSSyncUpdateThreadName",
"setThreadImageURL": "LSSetThreadImageURL",
"insertSearchSection": "LSInsertSearchSection",
"insertSearchResult": "LSInsertSearchResult",
"updateSearchQueryStatus": "LSUpdateSearchQueryStatus",
"changeViewerStatus": "LSChangeViewerStatus",
"updateParticipantCapabilities": "LSUpdateParticipantCapabilities",
"overwriteAllThreadParticipantsAdminStatus": "LSOverwriteAllThreadParticipantsAdminStatus",
"updateParticipantSubscribeSourceText": "LSUpdateParticipantSubscribeSourceText",
"updateThreadParticipantAdminStatus": "LSUpdateThreadParticipantAdminStatus",
"updateThreadInviteLinksInfo": "LSUpdateThreadInviteLinksInfo",
"appendDataTraceAddon": "LSAppendDataTraceAddon",
"removeAllParticipantsForThread": "LSRemoveAllParticipantsForThread",
"applyNewGroupThread": "LSApplyNewGroupThread",
"replaceOptimisticThread": "LSReplaceOptimisticThread",
"updateOptimisticContextThreadKeys": "LSUpdateOptimisticContextThreadKeys",
"replaceOptimsiticMessage": "LSReplaceOptimsiticMessage",
"updateTaskQueueName": "LSUpdateTaskQueueName",
"updateTaskValue": "LSUpdateTaskValue",
"updateDeliveryReceipt": "LSUpdateDeliveryReceipt",
"deleteBannersByIds": "LSDeleteBannersByIds",
"truncateTablesForSyncGroup": "LSTruncateTablesForSyncGroup",
"insertXmaAttachment": "LSInsertXmaAttachment",
"insertNewMessageRange": "LSInsertNewMessageRange",
"updateExistingMessageRange": "LSUpdateExistingMessageRange",
"threadsRangesQuery": "LSThreadsRangesQuery",
"updateThreadSnippetFromLastMessage": "LSUpdateThreadSnippetFromLastMessage",
"upsertInboxThreadsRange": "LSUpsertInboxThreadsRange",
"deleteThenInsertThread": "LSDeleteThenInsertThread",
"addParticipantIdToGroupThread": "LSAddParticipantIdToGroupThread",
"upsertMessage": "LSUpsertMessage",
"clearPinnedMessages": "LSClearPinnedMessages",
"mciTraceLog": "LSMciTraceLog",
"insertBlobAttachment": "LSInsertBlobAttachment",
"updateUnsentMessageCollapsedStatus": "LSUpdateUnsentMessageCollapsedStatus",
"executeFirstBlockForSyncTransaction": "LSExecuteFirstBlockForSyncTransaction",
"updateThreadsRangesV2": "LSUpdateThreadsRangesV2",
"upsertSyncGroupThreadsRange": "LSUpsertSyncGroupThreadsRange",
"upsertFolderSeenTimestamp": "LSUpsertFolderSeenTimestamp",
"setHMPSStatus": "LSSetHMPSStatus",
"handleRepliesOnUnsend": "LSHandleRepliesOnUnsend",
"deleteExistingMessageRanges": "LSDeleteExistingMessageRanges",
"writeThreadCapabilities": "LSWriteThreadCapabilities",
"upsertSequenceId": "LSUpsertSequenceId",
"executeFinallyBlockForSyncTransaction": "LSExecuteFinallyBlockForSyncTransaction",
"verifyContactRowExists": "LSVerifyContactRowExists",
"taskExists": "LSTaskExists",
"removeTask": "LSRemoveTask",
"deleteThenInsertMessage": "LSDeleteThenInsertMessage",
"deleteThenInsertContact": "LSDeleteThenInsertContact",
"updateTypingIndicator": "LSUpdateTypingIndicator",
"checkAuthoritativeMessageExists": "LSCheckAuthoritativeMessageExists",
"moveThreadToInboxAndUpdateParent": "LSMoveThreadToInboxAndUpdateParent",
"updateThreadSnippet": "LSUpdateThreadSnippet",
"setMessageDisplayedContentTypes": "LSSetMessageDisplayedContentTypes",
"verifyThreadExists": "LSVerifyThreadExists",
"updateReadReceipt": "LSUpdateReadReceipt",
"setForwardScore": "LSSetForwardScore",
"upsertReaction": "LSUpsertReaction",
"bumpThread": "LSBumpThread",
"updateParticipantLastMessageSendTimestamp": "LSUpdateParticipantLastMessageSendTimestamp",
"insertMessage": "LSInsertMessage",
"upsertTheme": "LSUpsertTheme",
"upsertGradientColor": "LSUpsertGradientColor",
"insertStickerAttachment": "LSInsertStickerAttachment",
"updateForRollCallMessageDeleted": "LSUpdateForRollCallMessageDeleted",
"updateLastSyncCompletedTimestampMsToNow": "LSUpdateLastSyncCompletedTimestampMsToNow",
"deleteMessage": "LSDeleteMessage",
"handleRepliesOnRemove": "LSHandleRepliesOnRemove",
"refreshLastActivityTimestamp": "LSRefreshLastActivityTimestamp",
"setPinnedMessage": "LSSetPinnedMessage",
"storyContactSyncFromBucket": "LSStoryContactSyncFromBucket",
"upsertLiveLocationSharer": "LSUpsertLiveLocationSharer",
"deleteLiveLocationSharer": "LSDeleteLiveLocationSharer",
"updateSharedAlbumOnMessageRecall": "LSUpdateSharedAlbumOnMessageRecall",
"editMessage": "LSEditMessage",
"handleRepliesOnMessageEdit": "LSHandleRepliesOnMessageEdit",
"updateThreadSnippetFromLastMessageV2": "LSUpdateThreadSnippetFromLastMessageV2",
"markOptimisticMessageFailed": "LSMarkOptimisticMessageFailed",
"updateSubscriptErrorMessage": "LSUpdateSubscriptErrorMessage",
"deleteThenInsertBotProfileInfoCategoryV2": "LSDeleteThenInsertBotProfileInfoCategoryV2",
"deleteThenInsertBotProfileInfoV2": "LSDeleteThenInsertBotProfileInfoV2",
"handleSyncFailure": "LSHandleSyncFailure",
"deleteThread": "LSDeleteThread",
"addPollOption": "LSAddPollOption",
"addPollOptionV2": "LSAddPollOptionV2",
"addPollVote": "LSAddPollVote",
"addPollVoteV2": "LSAddPollVoteV2",
"addPollForThread": "LSAddPollForThread",
"deleteReaction": "LSDeleteReaction",
"updateThreadMuteSetting": "LSUpdateThreadMuteSetting",
"insertAttachment": "LSInsertAttachment",
"updateExtraAttachmentColumns": "LSUpdateExtraAttachmentColumns",
"moveThreadToE2EECutoverFolder": "LSMoveThreadToE2EECutoverFolder",
"handleFailedTask": "LSHandleFailedTask",
}
func SPToDepMap(sp []string) map[string]string {
m := make(map[string]string, 0)
for _, d := range sp {
depName, ok := SPTable[d]
if !ok {
badGlobalLog.Warn().Str("dependency", d).Msg("Unknown dependency in sp")
continue
}
m[d] = depName
}
return m
}