-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
contacts.go
133 lines (116 loc) · 8.29 KB
/
contacts.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
package table
type LSVerifyContactRowExists struct {
ContactId int64 `index:"0" json:",omitempty"`
ContactIdType ContactIDType `index:"1" json:",omitempty"`
ProfilePictureUrl string `index:"2" json:",omitempty"`
Name string `index:"3" json:",omitempty"`
ContactType int64 `index:"4" json:",omitempty"`
ProfilePictureFallbackUrl string `index:"5" json:",omitempty"`
ProfilePictureUrlExpirationTimestampMs int64 `index:"6" json:",omitempty"`
UrlExpirationTimestampMs int64 `index:"7" json:",omitempty"`
NormalizedNameForSearch string `index:"8" json:",omitempty"`
IsMemorialized bool `index:"9" json:",omitempty"`
IsBlocked bool `index:"10" json:",omitempty"`
BlockedByViewerStatus int64 `index:"11" json:",omitempty"`
CanViewerMessage bool `index:"12" json:",omitempty"`
IsSelf bool `index:"13" json:",omitempty"`
AuthorityLevel int64 `index:"14" json:",omitempty"`
Capabilities int64 `index:"15" json:",omitempty"`
Capabilities2 int64 `index:"16" json:",omitempty"`
WorkForeignEntityType int64 `index:"17" json:",omitempty"` // TODO enum
Gender Gender `index:"18" json:",omitempty"`
ContactViewerRelationship ContactViewerRelationship `index:"19" json:",omitempty"`
SecondaryName string `index:"20" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
func (vcre *LSVerifyContactRowExists) GetUsername() string {
return vcre.SecondaryName
}
func (vcre *LSVerifyContactRowExists) GetName() string {
return vcre.Name
}
func (vcre *LSVerifyContactRowExists) GetAvatarURL() string {
return vcre.ProfilePictureUrl
}
func (vcre *LSVerifyContactRowExists) GetFBID() int64 { return vcre.ContactId }
type LSDeleteThenInsertContact struct {
Id int64 `index:"0" json:",omitempty"`
ProfilePictureUrl string `index:"2" json:",omitempty"`
ProfilePictureFallbackUrl string `index:"3" json:",omitempty"`
ProfilePictureUrlExpirationTimestampMs int64 `index:"4" json:",omitempty"`
ProfilePictureLargeUrl string `index:"5" json:",omitempty"`
ProfilePictureLargeFallbackUrl string `index:"6" json:",omitempty"`
ProfilePictureLargeUrlExpirationTimestampMs int64 `index:"7" json:",omitempty"`
Name string `index:"9" json:",omitempty"`
NormalizedNameForSearch string `index:"10" json:",omitempty"`
IsMessengerUser bool `index:"11" json:",omitempty"`
IsMemorialized bool `index:"12" json:",omitempty"`
BlockedByViewerStatus int64 `index:"14" json:",omitempty"`
Rank float64 `index:"17" json:",omitempty"`
FirstName string `index:"18" json:",omitempty"`
ContactType int64 `index:"19" json:",omitempty"` // TODO enum
ContactTypeExact int64 `index:"20" json:",omitempty"` // TODO enum
AuthorityLevel int64 `index:"21" json:",omitempty"`
MessengerCallLogThirdPartyId string `index:"22" json:",omitempty"`
ProfileRingColor int64 `index:"23" json:",omitempty"`
RequiresMultiway bool `index:"24" json:",omitempty"`
BlockedSinceTimestampMs int64 `index:"25" json:",omitempty"`
CanViewerMessage bool `index:"26" json:",omitempty"`
ProfileRingColorExpirationTimestampMs int64 `index:"27" json:",omitempty"`
PhoneNumber int64 `index:"28" json:",omitempty"`
EmailAddress string `index:"29" json:",omitempty"`
WorkCompanyId int64 `index:"30" json:",omitempty"`
WorkCompanyName string `index:"31" json:",omitempty"`
WorkJobTitle string `index:"32" json:",omitempty"`
NormalizedSearchTerms string `index:"33" json:",omitempty"`
DeviceContactId int64 `index:"34" json:",omitempty"`
IsManagedByViewer bool `index:"35" json:",omitempty"`
WorkForeignEntityType int64 `index:"36" json:",omitempty"`
Capabilities int64 `index:"37" json:",omitempty"`
Capabilities2 int64 `index:"38" json:",omitempty"`
ContactViewerRelationship ContactViewerRelationship `index:"39" json:",omitempty"`
Gender Gender `index:"40" json:",omitempty"`
SecondaryName string `index:"41" json:",omitempty"`
ContactReachabilityStatusType int64 `index:"43" json:",omitempty"` // TODO enum
RestrictionType int64 `index:"44" json:",omitempty"` // TODO enum
WaConnectStatus int64 `index:"45" json:",omitempty"`
FbUnblockedSinceTimestampMs int64 `index:"46" json:",omitempty"`
PageType int64 `index:"47" json:",omitempty"`
// TODO figure out where this is
//ProfileRingState int64 `index:"0" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
func (ls *LSDeleteThenInsertContact) GetUsername() string {
return ls.SecondaryName
}
func (ls *LSDeleteThenInsertContact) GetName() string {
return ls.Name
}
func (ls *LSDeleteThenInsertContact) GetAvatarURL() string {
if ls.ProfilePictureLargeUrl != "" {
return ls.ProfilePictureLargeUrl
}
return ls.ProfilePictureUrl
}
func (ls *LSDeleteThenInsertContact) GetFBID() int64 {
return ls.Id
}
type LSDeleteThenInsertContactPresence struct {
ContactId int64 `index:"0" json:",omitempty"`
Status int64 `index:"1" json:",omitempty"` // make enum ?
LastActiveTimestampMs int64 `index:"2" json:",omitempty"`
ExpirationTimestampMs int64 `index:"3" json:",omitempty"`
Capabilities int64 `index:"4" json:",omitempty"`
PublishId string `index:"5" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}
type LSDeleteThenInsertIGContactInfo struct {
ContactId int64 `index:"0" json:",omitempty"`
IgId string `index:"1" json:",omitempty"`
LinkedFbid int64 `index:"2" json:",omitempty"`
IgFollowStatus int64 `index:"4" json:",omitempty"` // TODO enum?
VerificationStatus int64 `index:"5" json:",omitempty"` // TODO enum?
E2eeEligibility int64 `index:"6" json:",omitempty"`
SupportsE2eeSpamdStorage bool `index:"7" json:",omitempty"`
Unrecognized map[int]any `json:",omitempty"`
}