From b51c00a9107200c5d893b85d901b3031a46b02c1 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 8 Apr 2020 13:18:10 -0400 Subject: [PATCH] Update AVDL compiled types --- types/chat1/api.go | 128 ++++- types/chat1/chat_ui.go | 117 +++- types/chat1/common.go | 74 +++ types/chat1/emoji.go | 361 +++++++++++++ types/chat1/gregor.go | 10 - types/chat1/local.go | 689 ++++++++++++++++++++---- types/chat1/notify.go | 20 +- types/chat1/remote.go | 160 +++++- types/keybase1/block.go | 104 ++++ types/keybase1/common.go | 109 +++- types/keybase1/config.go | 22 +- types/keybase1/constants.go | 33 ++ types/keybase1/identify3_ui.go | 58 +- types/keybase1/identify_ui.go | 50 +- types/keybase1/incoming-share.go | 86 +++ types/keybase1/invite_friends.go | 54 ++ types/keybase1/network_stats.go | 66 +++ types/keybase1/notify_badges.go | 76 +-- types/keybase1/notify_ctl.go | 4 + types/keybase1/notify_invite_friends.go | 4 + types/keybase1/notify_runtimestats.go | 70 +++ types/keybase1/prove_common.go | 28 +- types/keybase1/saltpack_ui.go | 2 + types/keybase1/simple_fs.go | 127 ++++- types/keybase1/teams.go | 663 ++++++++++++++++++++--- types/keybase1/teamsearch.go | 45 +- types/keybase1/upk.go | 4 +- types/keybase1/user.go | 134 +++-- types/keybase1/usersearch.go | 56 +- types/stellar1/common.go | 2 + 30 files changed, 2915 insertions(+), 441 deletions(-) create mode 100644 types/chat1/emoji.go create mode 100644 types/keybase1/incoming-share.go create mode 100644 types/keybase1/invite_friends.go create mode 100644 types/keybase1/network_stats.go create mode 100644 types/keybase1/notify_invite_friends.go diff --git a/types/chat1/api.go b/types/chat1/api.go index 86adab0..cec335b 100644 --- a/types/chat1/api.go +++ b/types/chat1/api.go @@ -139,9 +139,119 @@ func (o MsgFlipContent) DeepCopy() MsgFlipContent { } } +type EmojiContent struct { + Alias string `codec:"alias" json:"alias"` + IsCrossTeam bool `codec:"isCrossTeam" json:"isCrossTeam"` + ConvID *ConvIDStr `codec:"convID,omitempty" json:"convID,omitempty"` + MessageID *MessageID `codec:"messageID,omitempty" json:"messageID,omitempty"` +} + +func (o EmojiContent) DeepCopy() EmojiContent { + return EmojiContent{ + Alias: o.Alias, + IsCrossTeam: o.IsCrossTeam, + ConvID: (func(x *ConvIDStr) *ConvIDStr { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.ConvID), + MessageID: (func(x *MessageID) *MessageID { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.MessageID), + } +} + +type MsgTextContent struct { + Body string `codec:"body" json:"body"` + Payments []TextPayment `codec:"payments" json:"payments"` + ReplyTo *MessageID `codec:"replyTo,omitempty" json:"replyTo,omitempty"` + ReplyToUID *string `codec:"replyToUID,omitempty" json:"replyToUID,omitempty"` + UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` + TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` + LiveLocation *LiveLocation `codec:"liveLocation,omitempty" json:"liveLocation,omitempty"` + Emojis []EmojiContent `codec:"emojis" json:"emojis"` +} + +func (o MsgTextContent) DeepCopy() MsgTextContent { + return MsgTextContent{ + Body: o.Body, + Payments: (func(x []TextPayment) []TextPayment { + if x == nil { + return nil + } + ret := make([]TextPayment, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Payments), + ReplyTo: (func(x *MessageID) *MessageID { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.ReplyTo), + ReplyToUID: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.ReplyToUID), + UserMentions: (func(x []KnownUserMention) []KnownUserMention { + if x == nil { + return nil + } + ret := make([]KnownUserMention, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.UserMentions), + TeamMentions: (func(x []KnownTeamMention) []KnownTeamMention { + if x == nil { + return nil + } + ret := make([]KnownTeamMention, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.TeamMentions), + LiveLocation: (func(x *LiveLocation) *LiveLocation { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.LiveLocation), + Emojis: (func(x []EmojiContent) []EmojiContent { + if x == nil { + return nil + } + ret := make([]EmojiContent, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Emojis), + } +} + type MsgContent struct { TypeName string `codec:"typeName" json:"type"` - Text *MessageText `codec:"text,omitempty" json:"text,omitempty"` + Text *MsgTextContent `codec:"text,omitempty" json:"text,omitempty"` Attachment *MessageAttachment `codec:"attachment,omitempty" json:"attachment,omitempty"` Edit *MessageEdit `codec:"edit,omitempty" json:"edit,omitempty"` Reaction *MessageReaction `codec:"reaction,omitempty" json:"reaction,omitempty"` @@ -159,7 +269,7 @@ type MsgContent struct { func (o MsgContent) DeepCopy() MsgContent { return MsgContent{ TypeName: o.TypeName, - Text: (func(x *MessageText) *MessageText { + Text: (func(x *MsgTextContent) *MsgTextContent { if x == nil { return nil } @@ -269,7 +379,7 @@ type MsgSummary struct { IsEphemeral bool `codec:"isEphemeral,omitempty" json:"is_ephemeral,omitempty"` IsEphemeralExpired bool `codec:"isEphemeralExpired,omitempty" json:"is_ephemeral_expired,omitempty"` ETime gregor1.Time `codec:"eTime,omitempty" json:"e_time,omitempty"` - Reactions *ReactionMap `codec:"reactions,omitempty" json:"reactions,omitempty"` + Reactions *UIReactionMap `codec:"reactions,omitempty" json:"reactions,omitempty"` HasPairwiseMacs bool `codec:"hasPairwiseMacs,omitempty" json:"has_pairwise_macs,omitempty"` AtMentionUsernames []string `codec:"atMentionUsernames,omitempty" json:"at_mention_usernames,omitempty"` ChannelMention string `codec:"channelMention,omitempty" json:"channel_mention,omitempty"` @@ -304,7 +414,7 @@ func (o MsgSummary) DeepCopy() MsgSummary { IsEphemeral: o.IsEphemeral, IsEphemeralExpired: o.IsEphemeralExpired, ETime: o.ETime.DeepCopy(), - Reactions: (func(x *ReactionMap) *ReactionMap { + Reactions: (func(x *UIReactionMap) *UIReactionMap { if x == nil { return nil } @@ -897,17 +1007,17 @@ func (o GetResetConvMembersRes) DeepCopy() GetResetConvMembersRes { } type DeviceInfo struct { - DeviceID keybase1.DeviceID `codec:"deviceID" json:"id"` - DeviceDescription string `codec:"deviceDescription" json:"description"` - DeviceType string `codec:"deviceType" json:"type"` - DeviceCtime int64 `codec:"deviceCtime" json:"ctime"` + DeviceID keybase1.DeviceID `codec:"deviceID" json:"id"` + DeviceDescription string `codec:"deviceDescription" json:"description"` + DeviceType keybase1.DeviceTypeV2 `codec:"deviceType" json:"type"` + DeviceCtime int64 `codec:"deviceCtime" json:"ctime"` } func (o DeviceInfo) DeepCopy() DeviceInfo { return DeviceInfo{ DeviceID: o.DeviceID.DeepCopy(), DeviceDescription: o.DeviceDescription, - DeviceType: o.DeviceType, + DeviceType: o.DeviceType.DeepCopy(), DeviceCtime: o.DeviceCtime, } } diff --git a/types/chat1/chat_ui.go b/types/chat1/chat_ui.go index 31bdfa6..34d256a 100644 --- a/types/chat1/chat_ui.go +++ b/types/chat1/chat_ui.go @@ -536,6 +536,7 @@ type InboxUIItem struct { IsDefaultConv bool `codec:"isDefaultConv" json:"isDefaultConv"` Name string `codec:"name" json:"name"` Snippet string `codec:"snippet" json:"snippet"` + SnippetDecorated string `codec:"snippetDecorated" json:"snippetDecorated"` SnippetDecoration SnippetDecoration `codec:"snippetDecoration" json:"snippetDecoration"` Channel string `codec:"channel" json:"channel"` Headline string `codec:"headline" json:"headline"` @@ -578,6 +579,7 @@ func (o InboxUIItem) DeepCopy() InboxUIItem { IsDefaultConv: o.IsDefaultConv, Name: o.Name, Snippet: o.Snippet, + SnippetDecorated: o.SnippetDecorated, SnippetDecoration: o.SnippetDecoration.DeepCopy(), Channel: o.Channel, Headline: o.Headline, @@ -888,6 +890,50 @@ func (o UIMessageUnfurlInfo) DeepCopy() UIMessageUnfurlInfo { } } +type UIReactionDesc struct { + Decorated string `codec:"decorated" json:"decorated"` + Users map[string]Reaction `codec:"users" json:"users"` +} + +func (o UIReactionDesc) DeepCopy() UIReactionDesc { + return UIReactionDesc{ + Decorated: o.Decorated, + Users: (func(x map[string]Reaction) map[string]Reaction { + if x == nil { + return nil + } + ret := make(map[string]Reaction, len(x)) + for k, v := range x { + kCopy := k + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Users), + } +} + +type UIReactionMap struct { + Reactions map[string]UIReactionDesc `codec:"reactions" json:"reactions"` +} + +func (o UIReactionMap) DeepCopy() UIReactionMap { + return UIReactionMap{ + Reactions: (func(x map[string]UIReactionDesc) map[string]UIReactionDesc { + if x == nil { + return nil + } + ret := make(map[string]UIReactionDesc, len(x)) + for k, v := range x { + kCopy := k + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Reactions), + } +} + type UIMessageValid struct { MessageID MessageID `codec:"messageID" json:"messageID"` Ctime gregor1.Time `codec:"ctime" json:"ctime"` @@ -897,7 +943,7 @@ type UIMessageValid struct { BodySummary string `codec:"bodySummary" json:"bodySummary"` SenderUsername string `codec:"senderUsername" json:"senderUsername"` SenderDeviceName string `codec:"senderDeviceName" json:"senderDeviceName"` - SenderDeviceType string `codec:"senderDeviceType" json:"senderDeviceType"` + SenderDeviceType keybase1.DeviceTypeV2 `codec:"senderDeviceType" json:"senderDeviceType"` SenderUID gregor1.UID `codec:"senderUID" json:"senderUID"` SenderDeviceID gregor1.DeviceID `codec:"senderDeviceID" json:"senderDeviceID"` Superseded bool `codec:"superseded" json:"superseded"` @@ -910,7 +956,7 @@ type UIMessageValid struct { IsEphemeralExpired bool `codec:"isEphemeralExpired" json:"isEphemeralExpired"` ExplodedBy *string `codec:"explodedBy,omitempty" json:"explodedBy,omitempty"` Etime gregor1.Time `codec:"etime" json:"etime"` - Reactions ReactionMap `codec:"reactions" json:"reactions"` + Reactions UIReactionMap `codec:"reactions" json:"reactions"` HasPairwiseMacs bool `codec:"hasPairwiseMacs" json:"hasPairwiseMacs"` PaymentInfos []UIPaymentInfo `codec:"paymentInfos" json:"paymentInfos"` RequestInfo *UIRequestInfo `codec:"requestInfo,omitempty" json:"requestInfo,omitempty"` @@ -946,7 +992,7 @@ func (o UIMessageValid) DeepCopy() UIMessageValid { BodySummary: o.BodySummary, SenderUsername: o.SenderUsername, SenderDeviceName: o.SenderDeviceName, - SenderDeviceType: o.SenderDeviceType, + SenderDeviceType: o.SenderDeviceType.DeepCopy(), SenderUID: o.SenderUID.DeepCopy(), SenderDeviceID: o.SenderDeviceID.DeepCopy(), Superseded: o.Superseded, @@ -1067,6 +1113,7 @@ type UIMessageOutbox struct { IsEphemeral bool `codec:"isEphemeral" json:"isEphemeral"` FlipGameID *FlipGameIDStr `codec:"flipGameID,omitempty" json:"flipGameID,omitempty"` ReplyTo *UIMessage `codec:"replyTo,omitempty" json:"replyTo,omitempty"` + Supersedes MessageID `codec:"supersedes" json:"supersedes"` Filename string `codec:"filename" json:"filename"` Title string `codec:"title" json:"title"` Preview *MakePreviewRes `codec:"preview,omitempty" json:"preview,omitempty"` @@ -1102,8 +1149,9 @@ func (o UIMessageOutbox) DeepCopy() UIMessageOutbox { tmp := (*x).DeepCopy() return &tmp })(o.ReplyTo), - Filename: o.Filename, - Title: o.Title, + Supersedes: o.Supersedes.DeepCopy(), + Filename: o.Filename, + Title: o.Title, Preview: (func(x *MakePreviewRes) *MakePreviewRes { if x == nil { return nil @@ -1417,6 +1465,7 @@ const ( UITextDecorationTyp_LINK UITextDecorationTyp = 4 UITextDecorationTyp_MAILTO UITextDecorationTyp = 5 UITextDecorationTyp_KBFSPATH UITextDecorationTyp = 6 + UITextDecorationTyp_EMOJI UITextDecorationTyp = 7 ) func (o UITextDecorationTyp) DeepCopy() UITextDecorationTyp { return o } @@ -1429,6 +1478,7 @@ var UITextDecorationTypMap = map[string]UITextDecorationTyp{ "LINK": 4, "MAILTO": 5, "KBFSPATH": 6, + "EMOJI": 7, } var UITextDecorationTypRevMap = map[UITextDecorationTyp]string{ @@ -1439,6 +1489,7 @@ var UITextDecorationTypRevMap = map[UITextDecorationTyp]string{ 4: "LINK", 5: "MAILTO", 6: "KBFSPATH", + 7: "EMOJI", } func (e UITextDecorationTyp) String() string { @@ -1565,6 +1616,7 @@ type UITextDecoration struct { Link__ *UILinkDecoration `codec:"link,omitempty" json:"link,omitempty"` Mailto__ *UILinkDecoration `codec:"mailto,omitempty" json:"mailto,omitempty"` Kbfspath__ *KBFSPath `codec:"kbfspath,omitempty" json:"kbfspath,omitempty"` + Emoji__ *Emoji `codec:"emoji,omitempty" json:"emoji,omitempty"` } func (o *UITextDecoration) Typ() (ret UITextDecorationTyp, err error) { @@ -1604,6 +1656,11 @@ func (o *UITextDecoration) Typ() (ret UITextDecorationTyp, err error) { err = errors.New("unexpected nil value for Kbfspath__") return ret, err } + case UITextDecorationTyp_EMOJI: + if o.Emoji__ == nil { + err = errors.New("unexpected nil value for Emoji__") + return ret, err + } } return o.Typ__, nil } @@ -1678,6 +1735,16 @@ func (o UITextDecoration) Kbfspath() (res KBFSPath) { return *o.Kbfspath__ } +func (o UITextDecoration) Emoji() (res Emoji) { + if o.Typ__ != UITextDecorationTyp_EMOJI { + panic("wrong case accessed") + } + if o.Emoji__ == nil { + return + } + return *o.Emoji__ +} + func NewUITextDecorationWithPayment(v TextPayment) UITextDecoration { return UITextDecoration{ Typ__: UITextDecorationTyp_PAYMENT, @@ -1727,6 +1794,13 @@ func NewUITextDecorationWithKbfspath(v KBFSPath) UITextDecoration { } } +func NewUITextDecorationWithEmoji(v Emoji) UITextDecoration { + return UITextDecoration{ + Typ__: UITextDecorationTyp_EMOJI, + Emoji__: &v, + } +} + func (o UITextDecoration) DeepCopy() UITextDecoration { return UITextDecoration{ Typ__: o.Typ__.DeepCopy(), @@ -1779,6 +1853,13 @@ func (o UITextDecoration) DeepCopy() UITextDecoration { tmp := (*x).DeepCopy() return &tmp })(o.Kbfspath__), + Emoji__: (func(x *Emoji) *Emoji { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Emoji__), } } @@ -1917,7 +1998,8 @@ func (o UIChatSearchConvHits) DeepCopy() UIChatSearchConvHits { } type UIChatSearchTeamHits struct { - Hits []keybase1.TeamSearchItem `codec:"hits" json:"hits"` + Hits []keybase1.TeamSearchItem `codec:"hits" json:"hits"` + SuggestedMatches bool `codec:"suggestedMatches" json:"suggestedMatches"` } func (o UIChatSearchTeamHits) DeepCopy() UIChatSearchTeamHits { @@ -1933,6 +2015,29 @@ func (o UIChatSearchTeamHits) DeepCopy() UIChatSearchTeamHits { } return ret })(o.Hits), + SuggestedMatches: o.SuggestedMatches, + } +} + +type UIChatSearchBotHits struct { + Hits []keybase1.FeaturedBot `codec:"hits" json:"hits"` + SuggestedMatches bool `codec:"suggestedMatches" json:"suggestedMatches"` +} + +func (o UIChatSearchBotHits) DeepCopy() UIChatSearchBotHits { + return UIChatSearchBotHits{ + Hits: (func(x []keybase1.FeaturedBot) []keybase1.FeaturedBot { + if x == nil { + return nil + } + ret := make([]keybase1.FeaturedBot, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Hits), + SuggestedMatches: o.SuggestedMatches, } } diff --git a/types/chat1/common.go b/types/chat1/common.go index 85ac9d3..a89dde9 100644 --- a/types/chat1/common.go +++ b/types/chat1/common.go @@ -310,6 +310,8 @@ const ( TopicType_CHAT TopicType = 1 TopicType_DEV TopicType = 2 TopicType_KBFSFILEEDIT TopicType = 3 + TopicType_EMOJI TopicType = 4 + TopicType_EMOJICROSS TopicType = 5 ) func (o TopicType) DeepCopy() TopicType { return o } @@ -319,6 +321,8 @@ var TopicTypeMap = map[string]TopicType{ "CHAT": 1, "DEV": 2, "KBFSFILEEDIT": 3, + "EMOJI": 4, + "EMOJICROSS": 5, } var TopicTypeRevMap = map[TopicType]string{ @@ -326,6 +330,8 @@ var TopicTypeRevMap = map[TopicType]string{ 1: "CHAT", 2: "DEV", 3: "KBFSFILEEDIT", + 4: "EMOJI", + 5: "EMOJICROSS", } type TeamType int @@ -626,6 +632,32 @@ func (o RateLimit) DeepCopy() RateLimit { } } +type InboxParticipantsMode int + +const ( + InboxParticipantsMode_ALL InboxParticipantsMode = 0 + InboxParticipantsMode_SKIP_TEAMS InboxParticipantsMode = 1 +) + +func (o InboxParticipantsMode) DeepCopy() InboxParticipantsMode { return o } + +var InboxParticipantsModeMap = map[string]InboxParticipantsMode{ + "ALL": 0, + "SKIP_TEAMS": 1, +} + +var InboxParticipantsModeRevMap = map[InboxParticipantsMode]string{ + 0: "ALL", + 1: "SKIP_TEAMS", +} + +func (e InboxParticipantsMode) String() string { + if v, ok := InboxParticipantsModeRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + type GetInboxQuery struct { ConvID *ConversationID `codec:"convID,omitempty" json:"convID,omitempty"` TopicType *TopicType `codec:"topicType,omitempty" json:"topicType,omitempty"` @@ -644,6 +676,7 @@ type GetInboxQuery struct { ReadOnly bool `codec:"readOnly" json:"readOnly"` ComputeActiveList bool `codec:"computeActiveList" json:"computeActiveList"` SummarizeMaxMsgs bool `codec:"summarizeMaxMsgs" json:"summarizeMaxMsgs"` + ParticipantsMode InboxParticipantsMode `codec:"participantsMode" json:"participantsMode"` SkipBgLoads bool `codec:"skipBgLoads" json:"skipBgLoads"` AllowUnseenQuery bool `codec:"allowUnseenQuery" json:"allowUnseenQuery"` } @@ -765,6 +798,7 @@ func (o GetInboxQuery) DeepCopy() GetInboxQuery { ReadOnly: o.ReadOnly, ComputeActiveList: o.ComputeActiveList, SummarizeMaxMsgs: o.SummarizeMaxMsgs, + ParticipantsMode: o.ParticipantsMode.DeepCopy(), SkipBgLoads: o.SkipBgLoads, AllowUnseenQuery: o.AllowUnseenQuery, } @@ -958,6 +992,7 @@ type ConversationReaderInfo struct { MaxMsgid MessageID `codec:"maxMsgid" json:"maxMsgid"` Status ConversationMemberStatus `codec:"status" json:"status"` UntrustedTeamRole keybase1.TeamRole `codec:"untrustedTeamRole" json:"untrustedTeamRole"` + LastSendTime gregor1.Time `codec:"l" json:"l"` Journeycard *ConversationJourneycardInfo `codec:"jc,omitempty" json:"jc,omitempty"` } @@ -968,6 +1003,7 @@ func (o ConversationReaderInfo) DeepCopy() ConversationReaderInfo { MaxMsgid: o.MaxMsgid.DeepCopy(), Status: o.Status.DeepCopy(), UntrustedTeamRole: o.UntrustedTeamRole.DeepCopy(), + LastSendTime: o.LastSendTime.DeepCopy(), Journeycard: (func(x *ConversationJourneycardInfo) *ConversationJourneycardInfo { if x == nil { return nil @@ -1958,6 +1994,7 @@ const ( GetThreadReason_KBFSFILEACTIVITY GetThreadReason = 8 GetThreadReason_COINFLIP GetThreadReason = 9 GetThreadReason_BOTCOMMANDS GetThreadReason = 10 + GetThreadReason_EMOJISOURCE GetThreadReason = 11 ) func (o GetThreadReason) DeepCopy() GetThreadReason { return o } @@ -1974,6 +2011,7 @@ var GetThreadReasonMap = map[string]GetThreadReason{ "KBFSFILEACTIVITY": 8, "COINFLIP": 9, "BOTCOMMANDS": 10, + "EMOJISOURCE": 11, } var GetThreadReasonRevMap = map[GetThreadReason]string{ @@ -1988,6 +2026,7 @@ var GetThreadReasonRevMap = map[GetThreadReason]string{ 8: "KBFSFILEACTIVITY", 9: "COINFLIP", 10: "BOTCOMMANDS", + 11: "EMOJISOURCE", } func (e GetThreadReason) String() string { @@ -2044,6 +2083,8 @@ type SearchOpts struct { ConvID *ConversationID `codec:"convID,omitempty" json:"convID,omitempty"` MaxNameConvs int `codec:"maxNameConvs" json:"maxNameConvs"` MaxTeams int `codec:"maxTeams" json:"maxTeams"` + MaxBots int `codec:"maxBots" json:"maxBots"` + SkipBotCache bool `codec:"skipBotCache" json:"skipBotCache"` } func (o SearchOpts) DeepCopy() SearchOpts { @@ -2077,6 +2118,8 @@ func (o SearchOpts) DeepCopy() SearchOpts { })(o.ConvID), MaxNameConvs: o.MaxNameConvs, MaxTeams: o.MaxTeams, + MaxBots: o.MaxBots, + SkipBotCache: o.SkipBotCache, } } @@ -2388,6 +2431,7 @@ type Asset struct { Size int64 `codec:"size" json:"size"` MimeType string `codec:"mimeType" json:"mimeType"` EncHash Hash `codec:"encHash" json:"encHash"` + PtHash Hash `codec:"ptHash" json:"ptHash"` Key []byte `codec:"key" json:"key"` VerifyKey []byte `codec:"verifyKey" json:"verifyKey"` Title string `codec:"title" json:"title"` @@ -2406,6 +2450,7 @@ func (o Asset) DeepCopy() Asset { Size: o.Size, MimeType: o.MimeType, EncHash: o.EncHash.DeepCopy(), + PtHash: o.PtHash.DeepCopy(), Key: (func(x []byte) []byte { if x == nil { return nil @@ -2472,3 +2517,32 @@ func (o TeamMember) DeepCopy() TeamMember { Status: o.Status.DeepCopy(), } } + +type LastActiveStatus int + +const ( + LastActiveStatus_NONE LastActiveStatus = 0 + LastActiveStatus_ACTIVE LastActiveStatus = 1 + LastActiveStatus_RECENTLY_ACTIVE LastActiveStatus = 2 +) + +func (o LastActiveStatus) DeepCopy() LastActiveStatus { return o } + +var LastActiveStatusMap = map[string]LastActiveStatus{ + "NONE": 0, + "ACTIVE": 1, + "RECENTLY_ACTIVE": 2, +} + +var LastActiveStatusRevMap = map[LastActiveStatus]string{ + 0: "NONE", + 1: "ACTIVE", + 2: "RECENTLY_ACTIVE", +} + +func (e LastActiveStatus) String() string { + if v, ok := LastActiveStatusRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} diff --git a/types/chat1/emoji.go b/types/chat1/emoji.go new file mode 100644 index 0000000..f56954a --- /dev/null +++ b/types/chat1/emoji.go @@ -0,0 +1,361 @@ +// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler) +// Input file: ../client/protocol/avdl/chat1/emoji.avdl + +package chat1 + +import ( + gregor1 "samhofi.us/x/keybase/types/gregor1" + "errors" + "fmt" +) + +type EmojiLoadSourceTyp int + +const ( + EmojiLoadSourceTyp_HTTPSRV EmojiLoadSourceTyp = 0 + EmojiLoadSourceTyp_STR EmojiLoadSourceTyp = 1 +) + +func (o EmojiLoadSourceTyp) DeepCopy() EmojiLoadSourceTyp { return o } + +var EmojiLoadSourceTypMap = map[string]EmojiLoadSourceTyp{ + "HTTPSRV": 0, + "STR": 1, +} + +var EmojiLoadSourceTypRevMap = map[EmojiLoadSourceTyp]string{ + 0: "HTTPSRV", + 1: "STR", +} + +func (e EmojiLoadSourceTyp) String() string { + if v, ok := EmojiLoadSourceTypRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + +type EmojiLoadSource struct { + Typ__ EmojiLoadSourceTyp `codec:"typ" json:"typ"` + Httpsrv__ *string `codec:"httpsrv,omitempty" json:"httpsrv,omitempty"` + Str__ *string `codec:"str,omitempty" json:"str,omitempty"` +} + +func (o *EmojiLoadSource) Typ() (ret EmojiLoadSourceTyp, err error) { + switch o.Typ__ { + case EmojiLoadSourceTyp_HTTPSRV: + if o.Httpsrv__ == nil { + err = errors.New("unexpected nil value for Httpsrv__") + return ret, err + } + case EmojiLoadSourceTyp_STR: + if o.Str__ == nil { + err = errors.New("unexpected nil value for Str__") + return ret, err + } + } + return o.Typ__, nil +} + +func (o EmojiLoadSource) Httpsrv() (res string) { + if o.Typ__ != EmojiLoadSourceTyp_HTTPSRV { + panic("wrong case accessed") + } + if o.Httpsrv__ == nil { + return + } + return *o.Httpsrv__ +} + +func (o EmojiLoadSource) Str() (res string) { + if o.Typ__ != EmojiLoadSourceTyp_STR { + panic("wrong case accessed") + } + if o.Str__ == nil { + return + } + return *o.Str__ +} + +func NewEmojiLoadSourceWithHttpsrv(v string) EmojiLoadSource { + return EmojiLoadSource{ + Typ__: EmojiLoadSourceTyp_HTTPSRV, + Httpsrv__: &v, + } +} + +func NewEmojiLoadSourceWithStr(v string) EmojiLoadSource { + return EmojiLoadSource{ + Typ__: EmojiLoadSourceTyp_STR, + Str__: &v, + } +} + +func (o EmojiLoadSource) DeepCopy() EmojiLoadSource { + return EmojiLoadSource{ + Typ__: o.Typ__.DeepCopy(), + Httpsrv__: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.Httpsrv__), + Str__: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.Str__), + } +} + +type EmojiRemoteSourceTyp int + +const ( + EmojiRemoteSourceTyp_MESSAGE EmojiRemoteSourceTyp = 0 + EmojiRemoteSourceTyp_STOCKALIAS EmojiRemoteSourceTyp = 1 +) + +func (o EmojiRemoteSourceTyp) DeepCopy() EmojiRemoteSourceTyp { return o } + +var EmojiRemoteSourceTypMap = map[string]EmojiRemoteSourceTyp{ + "MESSAGE": 0, + "STOCKALIAS": 1, +} + +var EmojiRemoteSourceTypRevMap = map[EmojiRemoteSourceTyp]string{ + 0: "MESSAGE", + 1: "STOCKALIAS", +} + +func (e EmojiRemoteSourceTyp) String() string { + if v, ok := EmojiRemoteSourceTypRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + +type EmojiMessage struct { + ConvID ConversationID `codec:"convID" json:"convID"` + MsgID MessageID `codec:"msgID" json:"msgID"` + IsAlias bool `codec:"isAlias" json:"isAlias"` +} + +func (o EmojiMessage) DeepCopy() EmojiMessage { + return EmojiMessage{ + ConvID: o.ConvID.DeepCopy(), + MsgID: o.MsgID.DeepCopy(), + IsAlias: o.IsAlias, + } +} + +type EmojiStockAlias struct { + Text string `codec:"text" json:"text"` + Username string `codec:"username" json:"username"` + Time gregor1.Time `codec:"time" json:"time"` +} + +func (o EmojiStockAlias) DeepCopy() EmojiStockAlias { + return EmojiStockAlias{ + Text: o.Text, + Username: o.Username, + Time: o.Time.DeepCopy(), + } +} + +type EmojiRemoteSource struct { + Typ__ EmojiRemoteSourceTyp `codec:"typ" json:"typ"` + Message__ *EmojiMessage `codec:"message,omitempty" json:"message,omitempty"` + Stockalias__ *EmojiStockAlias `codec:"stockalias,omitempty" json:"stockalias,omitempty"` +} + +func (o *EmojiRemoteSource) Typ() (ret EmojiRemoteSourceTyp, err error) { + switch o.Typ__ { + case EmojiRemoteSourceTyp_MESSAGE: + if o.Message__ == nil { + err = errors.New("unexpected nil value for Message__") + return ret, err + } + case EmojiRemoteSourceTyp_STOCKALIAS: + if o.Stockalias__ == nil { + err = errors.New("unexpected nil value for Stockalias__") + return ret, err + } + } + return o.Typ__, nil +} + +func (o EmojiRemoteSource) Message() (res EmojiMessage) { + if o.Typ__ != EmojiRemoteSourceTyp_MESSAGE { + panic("wrong case accessed") + } + if o.Message__ == nil { + return + } + return *o.Message__ +} + +func (o EmojiRemoteSource) Stockalias() (res EmojiStockAlias) { + if o.Typ__ != EmojiRemoteSourceTyp_STOCKALIAS { + panic("wrong case accessed") + } + if o.Stockalias__ == nil { + return + } + return *o.Stockalias__ +} + +func NewEmojiRemoteSourceWithMessage(v EmojiMessage) EmojiRemoteSource { + return EmojiRemoteSource{ + Typ__: EmojiRemoteSourceTyp_MESSAGE, + Message__: &v, + } +} + +func NewEmojiRemoteSourceWithStockalias(v EmojiStockAlias) EmojiRemoteSource { + return EmojiRemoteSource{ + Typ__: EmojiRemoteSourceTyp_STOCKALIAS, + Stockalias__: &v, + } +} + +func (o EmojiRemoteSource) DeepCopy() EmojiRemoteSource { + return EmojiRemoteSource{ + Typ__: o.Typ__.DeepCopy(), + Message__: (func(x *EmojiMessage) *EmojiMessage { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Message__), + Stockalias__: (func(x *EmojiStockAlias) *EmojiStockAlias { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Stockalias__), + } +} + +type HarvestedEmoji struct { + Alias string `codec:"alias" json:"alias"` + IsBig bool `codec:"isBig" json:"isBig"` + IsCrossTeam bool `codec:"isCrossTeam" json:"isCrossTeam"` + Source EmojiRemoteSource `codec:"source" json:"source"` +} + +func (o HarvestedEmoji) DeepCopy() HarvestedEmoji { + return HarvestedEmoji{ + Alias: o.Alias, + IsBig: o.IsBig, + IsCrossTeam: o.IsCrossTeam, + Source: o.Source.DeepCopy(), + } +} + +type EmojiCreationInfo struct { + Username string `codec:"username" json:"username"` + Time gregor1.Time `codec:"time" json:"time"` +} + +func (o EmojiCreationInfo) DeepCopy() EmojiCreationInfo { + return EmojiCreationInfo{ + Username: o.Username, + Time: o.Time.DeepCopy(), + } +} + +type Emoji struct { + Alias string `codec:"alias" json:"alias"` + IsBig bool `codec:"isBig" json:"isBig"` + IsReacji bool `codec:"isReacji" json:"isReacji"` + IsCrossTeam bool `codec:"isCrossTeam" json:"isCrossTeam"` + Source EmojiLoadSource `codec:"source" json:"source"` + RemoteSource EmojiRemoteSource `codec:"remoteSource" json:"remoteSource"` + CreationInfo *EmojiCreationInfo `codec:"creationInfo,omitempty" json:"creationInfo,omitempty"` +} + +func (o Emoji) DeepCopy() Emoji { + return Emoji{ + Alias: o.Alias, + IsBig: o.IsBig, + IsReacji: o.IsReacji, + IsCrossTeam: o.IsCrossTeam, + Source: o.Source.DeepCopy(), + RemoteSource: o.RemoteSource.DeepCopy(), + CreationInfo: (func(x *EmojiCreationInfo) *EmojiCreationInfo { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.CreationInfo), + } +} + +type EmojiGroup struct { + Name string `codec:"name" json:"name"` + Emojis []Emoji `codec:"emojis" json:"emojis"` +} + +func (o EmojiGroup) DeepCopy() EmojiGroup { + return EmojiGroup{ + Name: o.Name, + Emojis: (func(x []Emoji) []Emoji { + if x == nil { + return nil + } + ret := make([]Emoji, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Emojis), + } +} + +type UserEmojis struct { + Emojis []EmojiGroup `codec:"emojis" json:"emojis"` +} + +func (o UserEmojis) DeepCopy() UserEmojis { + return UserEmojis{ + Emojis: (func(x []EmojiGroup) []EmojiGroup { + if x == nil { + return nil + } + ret := make([]EmojiGroup, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Emojis), + } +} + +type EmojiStorage struct { + Mapping map[string]EmojiRemoteSource `codec:"mapping" json:"mapping"` +} + +func (o EmojiStorage) DeepCopy() EmojiStorage { + return EmojiStorage{ + Mapping: (func(x map[string]EmojiRemoteSource) map[string]EmojiRemoteSource { + if x == nil { + return nil + } + ret := make(map[string]EmojiRemoteSource, len(x)) + for k, v := range x { + kCopy := k + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Mapping), + } +} diff --git a/types/chat1/gregor.go b/types/chat1/gregor.go index 9acf74d..7246420 100644 --- a/types/chat1/gregor.go +++ b/types/chat1/gregor.go @@ -453,16 +453,6 @@ func (o UpdateConversations) DeepCopy() UpdateConversations { } } -type TeamChannelUpdate struct { - TeamID TLFID `codec:"teamID" json:"teamID"` -} - -func (o TeamChannelUpdate) DeepCopy() TeamChannelUpdate { - return TeamChannelUpdate{ - TeamID: o.TeamID.DeepCopy(), - } -} - type SetConvRetentionUpdate struct { InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"` ConvID ConversationID `codec:"convID" json:"convID"` diff --git a/types/chat1/local.go b/types/chat1/local.go index 2860468..f0bee87 100644 --- a/types/chat1/local.go +++ b/types/chat1/local.go @@ -194,13 +194,14 @@ func (o LiveLocation) DeepCopy() LiveLocation { } type MessageText struct { - Body string `codec:"body" json:"body"` - Payments []TextPayment `codec:"payments" json:"payments"` - ReplyTo *MessageID `codec:"replyTo,omitempty" json:"replyTo,omitempty"` - ReplyToUID *gregor1.UID `codec:"replyToUID,omitempty" json:"replyToUID,omitempty"` - UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` - TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` - LiveLocation *LiveLocation `codec:"liveLocation,omitempty" json:"liveLocation,omitempty"` + Body string `codec:"body" json:"body"` + Payments []TextPayment `codec:"payments" json:"payments"` + ReplyTo *MessageID `codec:"replyTo,omitempty" json:"replyTo,omitempty"` + ReplyToUID *gregor1.UID `codec:"replyToUID,omitempty" json:"replyToUID,omitempty"` + UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` + TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` + LiveLocation *LiveLocation `codec:"liveLocation,omitempty" json:"liveLocation,omitempty"` + Emojis map[string]HarvestedEmoji `codec:"emojis" json:"emojis"` } func (o MessageText) DeepCopy() MessageText { @@ -260,6 +261,18 @@ func (o MessageText) DeepCopy() MessageText { tmp := (*x).DeepCopy() return &tmp })(o.LiveLocation), + Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { + if x == nil { + return nil + } + ret := make(map[string]HarvestedEmoji, len(x)) + for k, v := range x { + kCopy := k + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Emojis), } } @@ -274,10 +287,11 @@ func (o MessageConversationMetadata) DeepCopy() MessageConversationMetadata { } type MessageEdit struct { - MessageID MessageID `codec:"messageID" json:"messageID"` - Body string `codec:"body" json:"body"` - UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` - TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` + MessageID MessageID `codec:"messageID" json:"messageID"` + Body string `codec:"body" json:"body"` + UserMentions []KnownUserMention `codec:"userMentions" json:"userMentions"` + TeamMentions []KnownTeamMention `codec:"teamMentions" json:"teamMentions"` + Emojis map[string]HarvestedEmoji `codec:"emojis" json:"emojis"` } func (o MessageEdit) DeepCopy() MessageEdit { @@ -306,6 +320,18 @@ func (o MessageEdit) DeepCopy() MessageEdit { } return ret })(o.TeamMentions), + Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { + if x == nil { + return nil + } + ret := make(map[string]HarvestedEmoji, len(x)) + for k, v := range x { + kCopy := k + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Emojis), } } @@ -399,6 +425,7 @@ const ( MessageSystemType_CHANGERETENTION MessageSystemType = 6 MessageSystemType_BULKADDTOCONV MessageSystemType = 7 MessageSystemType_SBSRESOLVE MessageSystemType = 8 + MessageSystemType_NEWCHANNEL MessageSystemType = 9 ) func (o MessageSystemType) DeepCopy() MessageSystemType { return o } @@ -413,6 +440,7 @@ var MessageSystemTypeMap = map[string]MessageSystemType{ "CHANGERETENTION": 6, "BULKADDTOCONV": 7, "SBSRESOLVE": 8, + "NEWCHANNEL": 9, } var MessageSystemTypeRevMap = map[MessageSystemType]string{ @@ -425,6 +453,7 @@ var MessageSystemTypeRevMap = map[MessageSystemType]string{ 6: "CHANGERETENTION", 7: "BULKADDTOCONV", 8: "SBSRESOLVE", + 9: "NEWCHANNEL", } func (e MessageSystemType) String() string { @@ -435,17 +464,11 @@ func (e MessageSystemType) String() string { } type MessageSystemAddedToTeam struct { - Team string `codec:"team" json:"team"` - Adder string `codec:"adder" json:"adder"` - Addee string `codec:"addee" json:"addee"` - Role keybase1.TeamRole `codec:"role" json:"role"` - BulkAdds []string `codec:"bulkAdds" json:"bulkAdds"` - Owners []string `codec:"owners" json:"owners"` - Admins []string `codec:"admins" json:"admins"` - Writers []string `codec:"writers" json:"writers"` - Readers []string `codec:"readers" json:"readers"` - Bots []string `codec:"bots" json:"bots"` - RestrictedBots []string `codec:"restrictedBots" json:"restrictedBots"` + Team string `codec:"team" json:"team"` + Adder string `codec:"adder" json:"adder"` + Addee string `codec:"addee" json:"addee"` + Role keybase1.TeamRole `codec:"role" json:"role"` + BulkAdds []string `codec:"bulkAdds" json:"bulkAdds"` } func (o MessageSystemAddedToTeam) DeepCopy() MessageSystemAddedToTeam { @@ -465,72 +488,6 @@ func (o MessageSystemAddedToTeam) DeepCopy() MessageSystemAddedToTeam { } return ret })(o.BulkAdds), - Owners: (func(x []string) []string { - if x == nil { - return nil - } - ret := make([]string, len(x)) - for i, v := range x { - vCopy := v - ret[i] = vCopy - } - return ret - })(o.Owners), - Admins: (func(x []string) []string { - if x == nil { - return nil - } - ret := make([]string, len(x)) - for i, v := range x { - vCopy := v - ret[i] = vCopy - } - return ret - })(o.Admins), - Writers: (func(x []string) []string { - if x == nil { - return nil - } - ret := make([]string, len(x)) - for i, v := range x { - vCopy := v - ret[i] = vCopy - } - return ret - })(o.Writers), - Readers: (func(x []string) []string { - if x == nil { - return nil - } - ret := make([]string, len(x)) - for i, v := range x { - vCopy := v - ret[i] = vCopy - } - return ret - })(o.Readers), - Bots: (func(x []string) []string { - if x == nil { - return nil - } - ret := make([]string, len(x)) - for i, v := range x { - vCopy := v - ret[i] = vCopy - } - return ret - })(o.Bots), - RestrictedBots: (func(x []string) []string { - if x == nil { - return nil - } - ret := make([]string, len(x)) - for i, v := range x { - vCopy := v - ret[i] = vCopy - } - return ret - })(o.RestrictedBots), } } @@ -672,6 +629,20 @@ func (o MessageSystemSbsResolve) DeepCopy() MessageSystemSbsResolve { } } +type MessageSystemNewChannel struct { + Creator string `codec:"creator" json:"creator"` + NameAtCreation string `codec:"nameAtCreation" json:"nameAtCreation"` + ConvID ConversationID `codec:"convID" json:"convID"` +} + +func (o MessageSystemNewChannel) DeepCopy() MessageSystemNewChannel { + return MessageSystemNewChannel{ + Creator: o.Creator, + NameAtCreation: o.NameAtCreation, + ConvID: o.ConvID.DeepCopy(), + } +} + type MessageSystem struct { SystemType__ MessageSystemType `codec:"systemType" json:"systemType"` Addedtoteam__ *MessageSystemAddedToTeam `codec:"addedtoteam,omitempty" json:"addedtoteam,omitempty"` @@ -683,6 +654,7 @@ type MessageSystem struct { Changeretention__ *MessageSystemChangeRetention `codec:"changeretention,omitempty" json:"changeretention,omitempty"` Bulkaddtoconv__ *MessageSystemBulkAddToConv `codec:"bulkaddtoconv,omitempty" json:"bulkaddtoconv,omitempty"` Sbsresolve__ *MessageSystemSbsResolve `codec:"sbsresolve,omitempty" json:"sbsresolve,omitempty"` + Newchannel__ *MessageSystemNewChannel `codec:"newchannel,omitempty" json:"newchannel,omitempty"` } func (o *MessageSystem) SystemType() (ret MessageSystemType, err error) { @@ -732,6 +704,11 @@ func (o *MessageSystem) SystemType() (ret MessageSystemType, err error) { err = errors.New("unexpected nil value for Sbsresolve__") return ret, err } + case MessageSystemType_NEWCHANNEL: + if o.Newchannel__ == nil { + err = errors.New("unexpected nil value for Newchannel__") + return ret, err + } } return o.SystemType__, nil } @@ -826,6 +803,16 @@ func (o MessageSystem) Sbsresolve() (res MessageSystemSbsResolve) { return *o.Sbsresolve__ } +func (o MessageSystem) Newchannel() (res MessageSystemNewChannel) { + if o.SystemType__ != MessageSystemType_NEWCHANNEL { + panic("wrong case accessed") + } + if o.Newchannel__ == nil { + return + } + return *o.Newchannel__ +} + func NewMessageSystemWithAddedtoteam(v MessageSystemAddedToTeam) MessageSystem { return MessageSystem{ SystemType__: MessageSystemType_ADDEDTOTEAM, @@ -889,6 +876,13 @@ func NewMessageSystemWithSbsresolve(v MessageSystemSbsResolve) MessageSystem { } } +func NewMessageSystemWithNewchannel(v MessageSystemNewChannel) MessageSystem { + return MessageSystem{ + SystemType__: MessageSystemType_NEWCHANNEL, + Newchannel__: &v, + } +} + func (o MessageSystem) DeepCopy() MessageSystem { return MessageSystem{ SystemType__: o.SystemType__.DeepCopy(), @@ -955,6 +949,13 @@ func (o MessageSystem) DeepCopy() MessageSystem { tmp := (*x).DeepCopy() return &tmp })(o.Sbsresolve__), + Newchannel__: (func(x *MessageSystemNewChannel) *MessageSystemNewChannel { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Newchannel__), } } @@ -1102,14 +1103,35 @@ func (o MessageLeave) DeepCopy() MessageLeave { } type MessageReaction struct { - MessageID MessageID `codec:"m" json:"m"` - Body string `codec:"b" json:"b"` + MessageID MessageID `codec:"m" json:"m"` + Body string `codec:"b" json:"b"` + TargetUID *gregor1.UID `codec:"t,omitempty" json:"t,omitempty"` + Emojis map[string]HarvestedEmoji `codec:"e" json:"e"` } func (o MessageReaction) DeepCopy() MessageReaction { return MessageReaction{ MessageID: o.MessageID.DeepCopy(), Body: o.Body, + TargetUID: (func(x *gregor1.UID) *gregor1.UID { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.TargetUID), + Emojis: (func(x map[string]HarvestedEmoji) map[string]HarvestedEmoji { + if x == nil { + return nil + } + ret := make(map[string]HarvestedEmoji, len(x)) + for k, v := range x { + kCopy := k + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Emojis), } } @@ -2816,6 +2838,7 @@ type MessagePlaintext struct { ClientHeader MessageClientHeader `codec:"clientHeader" json:"clientHeader"` MessageBody MessageBody `codec:"messageBody" json:"messageBody"` SupersedesOutboxID *OutboxID `codec:"supersedesOutboxID,omitempty" json:"supersedesOutboxID,omitempty"` + Emojis []HarvestedEmoji `codec:"emojis" json:"emojis"` } func (o MessagePlaintext) DeepCopy() MessagePlaintext { @@ -2829,6 +2852,17 @@ func (o MessagePlaintext) DeepCopy() MessagePlaintext { tmp := (*x).DeepCopy() return &tmp })(o.SupersedesOutboxID), + Emojis: (func(x []HarvestedEmoji) []HarvestedEmoji { + if x == nil { + return nil + } + ret := make([]HarvestedEmoji, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Emojis), } } @@ -2838,7 +2872,7 @@ type MessageUnboxedValid struct { MessageBody MessageBody `codec:"messageBody" json:"messageBody"` SenderUsername string `codec:"senderUsername" json:"senderUsername"` SenderDeviceName string `codec:"senderDeviceName" json:"senderDeviceName"` - SenderDeviceType string `codec:"senderDeviceType" json:"senderDeviceType"` + SenderDeviceType keybase1.DeviceTypeV2 `codec:"senderDeviceType" json:"senderDeviceType"` BodyHash Hash `codec:"bodyHash" json:"bodyHash"` HeaderHash Hash `codec:"headerHash" json:"headerHash"` HeaderSignature *SignatureInfo `codec:"headerSignature,omitempty" json:"headerSignature,omitempty"` @@ -2851,6 +2885,7 @@ type MessageUnboxedValid struct { ChannelNameMentions []ChannelNameMention `codec:"channelNameMentions" json:"channelNameMentions"` Reactions ReactionMap `codec:"reactions" json:"reactions"` Unfurls map[MessageID]UnfurlResult `codec:"unfurls" json:"unfurls"` + Emojis []HarvestedEmoji `codec:"emojis" json:"emojis"` ReplyTo *MessageUnboxed `codec:"replyTo,omitempty" json:"replyTo,omitempty"` BotUsername string `codec:"botUsername" json:"botUsername"` } @@ -2862,7 +2897,7 @@ func (o MessageUnboxedValid) DeepCopy() MessageUnboxedValid { MessageBody: o.MessageBody.DeepCopy(), SenderUsername: o.SenderUsername, SenderDeviceName: o.SenderDeviceName, - SenderDeviceType: o.SenderDeviceType, + SenderDeviceType: o.SenderDeviceType.DeepCopy(), BodyHash: o.BodyHash.DeepCopy(), HeaderHash: o.HeaderHash.DeepCopy(), HeaderSignature: (func(x *SignatureInfo) *SignatureInfo { @@ -2949,6 +2984,17 @@ func (o MessageUnboxedValid) DeepCopy() MessageUnboxedValid { } return ret })(o.Unfurls), + Emojis: (func(x []HarvestedEmoji) []HarvestedEmoji { + if x == nil { + return nil + } + ret := make([]HarvestedEmoji, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Emojis), ReplyTo: (func(x *MessageUnboxed) *MessageUnboxed { if x == nil { return nil @@ -3007,7 +3053,7 @@ type MessageUnboxedError struct { IsCritical bool `codec:"isCritical" json:"isCritical"` SenderUsername string `codec:"senderUsername" json:"senderUsername"` SenderDeviceName string `codec:"senderDeviceName" json:"senderDeviceName"` - SenderDeviceType string `codec:"senderDeviceType" json:"senderDeviceType"` + SenderDeviceType keybase1.DeviceTypeV2 `codec:"senderDeviceType" json:"senderDeviceType"` MessageID MessageID `codec:"messageID" json:"messageID"` MessageType MessageType `codec:"messageType" json:"messageType"` Ctime gregor1.Time `codec:"ctime" json:"ctime"` @@ -3027,7 +3073,7 @@ func (o MessageUnboxedError) DeepCopy() MessageUnboxedError { IsCritical: o.IsCritical, SenderUsername: o.SenderUsername, SenderDeviceName: o.SenderDeviceName, - SenderDeviceType: o.SenderDeviceType, + SenderDeviceType: o.SenderDeviceType.DeepCopy(), MessageID: o.MessageID.DeepCopy(), MessageType: o.MessageType.DeepCopy(), Ctime: o.Ctime.DeepCopy(), @@ -4366,6 +4412,98 @@ func (o SetConversationStatusLocalRes) DeepCopy() SetConversationStatusLocalRes } } +type NewConversationsLocalRes struct { + Results []NewConversationsLocalResult `codec:"results" json:"results"` + RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` + IdentifyFailures []keybase1.TLFIdentifyFailure `codec:"identifyFailures" json:"identifyFailures"` +} + +func (o NewConversationsLocalRes) DeepCopy() NewConversationsLocalRes { + return NewConversationsLocalRes{ + Results: (func(x []NewConversationsLocalResult) []NewConversationsLocalResult { + if x == nil { + return nil + } + ret := make([]NewConversationsLocalResult, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Results), + RateLimits: (func(x []RateLimit) []RateLimit { + if x == nil { + return nil + } + ret := make([]RateLimit, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.RateLimits), + IdentifyFailures: (func(x []keybase1.TLFIdentifyFailure) []keybase1.TLFIdentifyFailure { + if x == nil { + return nil + } + ret := make([]keybase1.TLFIdentifyFailure, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.IdentifyFailures), + } +} + +type NewConversationsLocalResult struct { + Result *NewConversationLocalRes `codec:"result,omitempty" json:"result,omitempty"` + Err *string `codec:"err,omitempty" json:"err,omitempty"` +} + +func (o NewConversationsLocalResult) DeepCopy() NewConversationsLocalResult { + return NewConversationsLocalResult{ + Result: (func(x *NewConversationLocalRes) *NewConversationLocalRes { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Result), + Err: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.Err), + } +} + +type NewConversationLocalArgument struct { + TlfName string `codec:"tlfName" json:"tlfName"` + TopicType TopicType `codec:"topicType" json:"topicType"` + TlfVisibility keybase1.TLFVisibility `codec:"tlfVisibility" json:"tlfVisibility"` + TopicName *string `codec:"topicName,omitempty" json:"topicName,omitempty"` + MembersType ConversationMembersType `codec:"membersType" json:"membersType"` +} + +func (o NewConversationLocalArgument) DeepCopy() NewConversationLocalArgument { + return NewConversationLocalArgument{ + TlfName: o.TlfName, + TopicType: o.TopicType.DeepCopy(), + TlfVisibility: o.TlfVisibility.DeepCopy(), + TopicName: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.TopicName), + MembersType: o.MembersType.DeepCopy(), + } +} + type NewConversationLocalRes struct { Conv ConversationLocal `codec:"conv" json:"conv"` UiConv InboxUIItem `codec:"uiConv" json:"uiConv"` @@ -5121,6 +5259,74 @@ func (o GetTLFConversationsLocalRes) DeepCopy() GetTLFConversationsLocalRes { } } +type GetChannelMembershipsLocalRes struct { + Channels []ChannelNameMention `codec:"channels" json:"channels"` + Offline bool `codec:"offline" json:"offline"` + RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` +} + +func (o GetChannelMembershipsLocalRes) DeepCopy() GetChannelMembershipsLocalRes { + return GetChannelMembershipsLocalRes{ + Channels: (func(x []ChannelNameMention) []ChannelNameMention { + if x == nil { + return nil + } + ret := make([]ChannelNameMention, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Channels), + Offline: o.Offline, + RateLimits: (func(x []RateLimit) []RateLimit { + if x == nil { + return nil + } + ret := make([]RateLimit, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.RateLimits), + } +} + +type GetMutualTeamsLocalRes struct { + TeamIDs []keybase1.TeamID `codec:"teamIDs" json:"teamIDs"` + Offline bool `codec:"offline" json:"offline"` + RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` +} + +func (o GetMutualTeamsLocalRes) DeepCopy() GetMutualTeamsLocalRes { + return GetMutualTeamsLocalRes{ + TeamIDs: (func(x []keybase1.TeamID) []keybase1.TeamID { + if x == nil { + return nil + } + ret := make([]keybase1.TeamID, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.TeamIDs), + Offline: o.Offline, + RateLimits: (func(x []RateLimit) []RateLimit { + if x == nil { + return nil + } + ret := make([]RateLimit, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.RateLimits), + } +} + type SetAppNotificationSettingsLocalRes struct { Offline bool `codec:"offline" json:"offline"` RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"` @@ -5291,6 +5497,34 @@ func (o SearchInboxRes) DeepCopy() SearchInboxRes { } } +type SimpleSearchInboxConvNamesHit struct { + Name string `codec:"name" json:"name"` + ConvID ConversationID `codec:"convID" json:"convID"` + IsTeam bool `codec:"isTeam" json:"isTeam"` + Parts []string `codec:"parts" json:"parts"` + TlfName string `codec:"tlfName" json:"tlfName"` +} + +func (o SimpleSearchInboxConvNamesHit) DeepCopy() SimpleSearchInboxConvNamesHit { + return SimpleSearchInboxConvNamesHit{ + Name: o.Name, + ConvID: o.ConvID.DeepCopy(), + IsTeam: o.IsTeam, + Parts: (func(x []string) []string { + if x == nil { + return nil + } + ret := make([]string, len(x)) + for i, v := range x { + vCopy := v + ret[i] = vCopy + } + return ret + })(o.Parts), + TlfName: o.TlfName, + } +} + type ProfileSearchConvStats struct { Err string `codec:"err" json:"err"` ConvName string `codec:"convName" json:"convName"` @@ -5886,3 +6120,270 @@ func (e SnippetDecoration) String() string { } return fmt.Sprintf("%v", int(e)) } + +type WelcomeMessageDisplay struct { + Set bool `codec:"set" json:"set"` + Display string `codec:"display" json:"display"` + Raw string `codec:"raw" json:"raw"` +} + +func (o WelcomeMessageDisplay) DeepCopy() WelcomeMessageDisplay { + return WelcomeMessageDisplay{ + Set: o.Set, + Display: o.Display, + Raw: o.Raw, + } +} + +type WelcomeMessage struct { + Set bool `codec:"set" json:"set"` + Raw string `codec:"raw" json:"raw"` +} + +func (o WelcomeMessage) DeepCopy() WelcomeMessage { + return WelcomeMessage{ + Set: o.Set, + Raw: o.Raw, + } +} + +type GetDefaultTeamChannelsLocalRes struct { + Convs []InboxUIItem `codec:"convs" json:"convs"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o GetDefaultTeamChannelsLocalRes) DeepCopy() GetDefaultTeamChannelsLocalRes { + return GetDefaultTeamChannelsLocalRes{ + Convs: (func(x []InboxUIItem) []InboxUIItem { + if x == nil { + return nil + } + ret := make([]InboxUIItem, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Convs), + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type SetDefaultTeamChannelsLocalRes struct { + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o SetDefaultTeamChannelsLocalRes) DeepCopy() SetDefaultTeamChannelsLocalRes { + return SetDefaultTeamChannelsLocalRes{ + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type LastActiveTimeAll struct { + Teams map[TLFIDStr]gregor1.Time `codec:"teams" json:"teams"` + Channels map[ConvIDStr]gregor1.Time `codec:"channels" json:"channels"` +} + +func (o LastActiveTimeAll) DeepCopy() LastActiveTimeAll { + return LastActiveTimeAll{ + Teams: (func(x map[TLFIDStr]gregor1.Time) map[TLFIDStr]gregor1.Time { + if x == nil { + return nil + } + ret := make(map[TLFIDStr]gregor1.Time, len(x)) + for k, v := range x { + kCopy := k.DeepCopy() + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Teams), + Channels: (func(x map[ConvIDStr]gregor1.Time) map[ConvIDStr]gregor1.Time { + if x == nil { + return nil + } + ret := make(map[ConvIDStr]gregor1.Time, len(x)) + for k, v := range x { + kCopy := k.DeepCopy() + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Channels), + } +} + +type LastActiveStatusAll struct { + Teams map[TLFIDStr]LastActiveStatus `codec:"teams" json:"teams"` + Channels map[ConvIDStr]LastActiveStatus `codec:"channels" json:"channels"` +} + +func (o LastActiveStatusAll) DeepCopy() LastActiveStatusAll { + return LastActiveStatusAll{ + Teams: (func(x map[TLFIDStr]LastActiveStatus) map[TLFIDStr]LastActiveStatus { + if x == nil { + return nil + } + ret := make(map[TLFIDStr]LastActiveStatus, len(x)) + for k, v := range x { + kCopy := k.DeepCopy() + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Teams), + Channels: (func(x map[ConvIDStr]LastActiveStatus) map[ConvIDStr]LastActiveStatus { + if x == nil { + return nil + } + ret := make(map[ConvIDStr]LastActiveStatus, len(x)) + for k, v := range x { + kCopy := k.DeepCopy() + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Channels), + } +} + +type AddEmojiRes struct { + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o AddEmojiRes) DeepCopy() AddEmojiRes { + return AddEmojiRes{ + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type AddEmojisRes struct { + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` + SuccessFilenames []string `codec:"successFilenames" json:"successFilenames"` + FailedFilenames map[string]string `codec:"failedFilenames" json:"failedFilenames"` +} + +func (o AddEmojisRes) DeepCopy() AddEmojisRes { + return AddEmojisRes{ + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + SuccessFilenames: (func(x []string) []string { + if x == nil { + return nil + } + ret := make([]string, len(x)) + for i, v := range x { + vCopy := v + ret[i] = vCopy + } + return ret + })(o.SuccessFilenames), + FailedFilenames: (func(x map[string]string) map[string]string { + if x == nil { + return nil + } + ret := make(map[string]string, len(x)) + for k, v := range x { + kCopy := k + vCopy := v + ret[kCopy] = vCopy + } + return ret + })(o.FailedFilenames), + } +} + +type AddEmojiAliasRes struct { + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` + ErrorString *string `codec:"errorString,omitempty" json:"errorString,omitempty"` +} + +func (o AddEmojiAliasRes) DeepCopy() AddEmojiAliasRes { + return AddEmojiAliasRes{ + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + ErrorString: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.ErrorString), + } +} + +type RemoveEmojiRes struct { + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o RemoveEmojiRes) DeepCopy() RemoveEmojiRes { + return RemoveEmojiRes{ + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type UserEmojiRes struct { + Emojis UserEmojis `codec:"emojis" json:"emojis"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o UserEmojiRes) DeepCopy() UserEmojiRes { + return UserEmojiRes{ + Emojis: o.Emojis.DeepCopy(), + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type EmojiFetchOpts struct { + GetCreationInfo bool `codec:"getCreationInfo" json:"getCreationInfo"` + GetAliases bool `codec:"getAliases" json:"getAliases"` + OnlyInTeam bool `codec:"onlyInTeam" json:"onlyInTeam"` +} + +func (o EmojiFetchOpts) DeepCopy() EmojiFetchOpts { + return EmojiFetchOpts{ + GetCreationInfo: o.GetCreationInfo, + GetAliases: o.GetAliases, + OnlyInTeam: o.OnlyInTeam, + } +} diff --git a/types/chat1/notify.go b/types/chat1/notify.go index 1a85501..92f0484 100644 --- a/types/chat1/notify.go +++ b/types/chat1/notify.go @@ -323,8 +323,8 @@ func (o EphemeralPurgeNotifInfo) DeepCopy() EphemeralPurgeNotifInfo { } type ReactionUpdate struct { - Reactions ReactionMap `codec:"reactions" json:"reactions"` - TargetMsgID MessageID `codec:"targetMsgID" json:"targetMsgID"` + Reactions UIReactionMap `codec:"reactions" json:"reactions"` + TargetMsgID MessageID `codec:"targetMsgID" json:"targetMsgID"` } func (o ReactionUpdate) DeepCopy() ReactionUpdate { @@ -757,20 +757,16 @@ func (o ChatActivity) DeepCopy() ChatActivity { } type TyperInfo struct { - Uid keybase1.UID `codec:"uid" json:"uid"` - Username string `codec:"username" json:"username"` - DeviceID keybase1.DeviceID `codec:"deviceID" json:"deviceID"` - DeviceName string `codec:"deviceName" json:"deviceName"` - DeviceType string `codec:"deviceType" json:"deviceType"` + Uid keybase1.UID `codec:"uid" json:"uid"` + Username string `codec:"username" json:"username"` + DeviceID keybase1.DeviceID `codec:"deviceID" json:"deviceID"` } func (o TyperInfo) DeepCopy() TyperInfo { return TyperInfo{ - Uid: o.Uid.DeepCopy(), - Username: o.Username, - DeviceID: o.DeviceID.DeepCopy(), - DeviceName: o.DeviceName, - DeviceType: o.DeviceType, + Uid: o.Uid.DeepCopy(), + Username: o.Username, + DeviceID: o.DeviceID.DeepCopy(), } } diff --git a/types/chat1/remote.go b/types/chat1/remote.go index 9c05253..0e0ecb6 100644 --- a/types/chat1/remote.go +++ b/types/chat1/remote.go @@ -231,8 +231,10 @@ func (o NewConversationRemoteRes) DeepCopy() NewConversationRemoteRes { } type GetMessagesRemoteRes struct { - Msgs []MessageBoxed `codec:"msgs" json:"msgs"` - RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` + Msgs []MessageBoxed `codec:"msgs" json:"msgs"` + MembersType ConversationMembersType `codec:"membersType" json:"membersType"` + Visibility keybase1.TLFVisibility `codec:"visibility" json:"visibility"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` } func (o GetMessagesRemoteRes) DeepCopy() GetMessagesRemoteRes { @@ -248,6 +250,8 @@ func (o GetMessagesRemoteRes) DeepCopy() GetMessagesRemoteRes { } return ret })(o.Msgs), + MembersType: o.MembersType.DeepCopy(), + Visibility: o.Visibility.DeepCopy(), RateLimit: (func(x *RateLimit) *RateLimit { if x == nil { return nil @@ -1247,3 +1251,155 @@ func (o BotInfoHash) DeepCopy() BotInfoHash { return append([]byte{}, x...) })(o) } + +type GetDefaultTeamChannelsRes struct { + Convs []ConversationID `codec:"convs" json:"convs"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o GetDefaultTeamChannelsRes) DeepCopy() GetDefaultTeamChannelsRes { + return GetDefaultTeamChannelsRes{ + Convs: (func(x []ConversationID) []ConversationID { + if x == nil { + return nil + } + ret := make([]ConversationID, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Convs), + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type SetDefaultTeamChannelsRes struct { + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o SetDefaultTeamChannelsRes) DeepCopy() SetDefaultTeamChannelsRes { + return SetDefaultTeamChannelsRes{ + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type GetRecentJoinsRes struct { + NumJoins int `codec:"numJoins" json:"numJoins"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o GetRecentJoinsRes) DeepCopy() GetRecentJoinsRes { + return GetRecentJoinsRes{ + NumJoins: o.NumJoins, + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type RefreshParticipantsRemoteRes struct { + HashMatch bool `codec:"hashMatch" json:"hashMatch"` + Uids []gregor1.UID `codec:"uids" json:"uids"` + Hash string `codec:"hash" json:"hash"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o RefreshParticipantsRemoteRes) DeepCopy() RefreshParticipantsRemoteRes { + return RefreshParticipantsRemoteRes{ + HashMatch: o.HashMatch, + Uids: (func(x []gregor1.UID) []gregor1.UID { + if x == nil { + return nil + } + ret := make([]gregor1.UID, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Uids), + Hash: o.Hash, + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type GetLastActiveAtRes struct { + LastActiveAt gregor1.Time `codec:"lastActiveAt" json:"lastActiveAt"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o GetLastActiveAtRes) DeepCopy() GetLastActiveAtRes { + return GetLastActiveAtRes{ + LastActiveAt: o.LastActiveAt.DeepCopy(), + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} + +type ResetConversationMember struct { + ConvID ConversationID `codec:"convID" json:"convID"` + Uid gregor1.UID `codec:"uid" json:"uid"` +} + +func (o ResetConversationMember) DeepCopy() ResetConversationMember { + return ResetConversationMember{ + ConvID: o.ConvID.DeepCopy(), + Uid: o.Uid.DeepCopy(), + } +} + +type GetResetConversationsRes struct { + ResetConvs []ResetConversationMember `codec:"resetConvs" json:"resetConvs"` + RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"` +} + +func (o GetResetConversationsRes) DeepCopy() GetResetConversationsRes { + return GetResetConversationsRes{ + ResetConvs: (func(x []ResetConversationMember) []ResetConversationMember { + if x == nil { + return nil + } + ret := make([]ResetConversationMember, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.ResetConvs), + RateLimit: (func(x *RateLimit) *RateLimit { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.RateLimit), + } +} diff --git a/types/keybase1/block.go b/types/keybase1/block.go index cb1b2c3..0478f3b 100644 --- a/types/keybase1/block.go +++ b/types/keybase1/block.go @@ -57,6 +57,38 @@ func (o GetBlockRes) DeepCopy() GetBlockRes { } } +type GetBlockSizesRes struct { + Sizes []int `codec:"sizes" json:"sizes"` + Statuses []BlockStatus `codec:"statuses" json:"statuses"` +} + +func (o GetBlockSizesRes) DeepCopy() GetBlockSizesRes { + return GetBlockSizesRes{ + Sizes: (func(x []int) []int { + if x == nil { + return nil + } + ret := make([]int, len(x)) + for i, v := range x { + vCopy := v + ret[i] = vCopy + } + return ret + })(o.Sizes), + Statuses: (func(x []BlockStatus) []BlockStatus { + if x == nil { + return nil + } + ret := make([]BlockStatus, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Statuses), + } +} + type BlockRefNonce [8]byte func (o BlockRefNonce) DeepCopy() BlockRefNonce { @@ -151,3 +183,75 @@ type BlockPingResponse struct { func (o BlockPingResponse) DeepCopy() BlockPingResponse { return BlockPingResponse{} } + +type UsageStatRecord struct { + Write int64 `codec:"write" json:"write"` + Archive int64 `codec:"archive" json:"archive"` + Read int64 `codec:"read" json:"read"` + MdWrite int64 `codec:"mdWrite" json:"mdWrite"` + GitWrite int64 `codec:"gitWrite" json:"gitWrite"` + GitArchive int64 `codec:"gitArchive" json:"gitArchive"` +} + +func (o UsageStatRecord) DeepCopy() UsageStatRecord { + return UsageStatRecord{ + Write: o.Write, + Archive: o.Archive, + Read: o.Read, + MdWrite: o.MdWrite, + GitWrite: o.GitWrite, + GitArchive: o.GitArchive, + } +} + +type UsageStat struct { + Bytes UsageStatRecord `codec:"bytes" json:"bytes"` + Blocks UsageStatRecord `codec:"blocks" json:"blocks"` + Mtime Time `codec:"mtime" json:"mtime"` +} + +func (o UsageStat) DeepCopy() UsageStat { + return UsageStat{ + Bytes: o.Bytes.DeepCopy(), + Blocks: o.Blocks.DeepCopy(), + Mtime: o.Mtime.DeepCopy(), + } +} + +type FolderUsageStat struct { + FolderID string `codec:"folderID" json:"folderID"` + Stats UsageStat `codec:"stats" json:"stats"` +} + +func (o FolderUsageStat) DeepCopy() FolderUsageStat { + return FolderUsageStat{ + FolderID: o.FolderID, + Stats: o.Stats.DeepCopy(), + } +} + +type BlockQuotaInfo struct { + Folders []FolderUsageStat `codec:"folders" json:"folders"` + Total UsageStat `codec:"total" json:"total"` + Limit int64 `codec:"limit" json:"limit"` + GitLimit int64 `codec:"gitLimit" json:"gitLimit"` +} + +func (o BlockQuotaInfo) DeepCopy() BlockQuotaInfo { + return BlockQuotaInfo{ + Folders: (func(x []FolderUsageStat) []FolderUsageStat { + if x == nil { + return nil + } + ret := make([]FolderUsageStat, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Folders), + Total: o.Total.DeepCopy(), + Limit: o.Limit, + GitLimit: o.GitLimit, + } +} diff --git a/types/keybase1/common.go b/types/keybase1/common.go index 128329f..4a26a95 100644 --- a/types/keybase1/common.go +++ b/types/keybase1/common.go @@ -26,6 +26,12 @@ func (o DurationSec) DeepCopy() DurationSec { return o } +type DurationMsec float64 + +func (o DurationMsec) DeepCopy() DurationMsec { + return o +} + type StringKVPair struct { Key string `codec:"key" json:"key"` Value string `codec:"value" json:"value"` @@ -432,7 +438,7 @@ type PublicKey struct { ParentID string `codec:"parentID" json:"parentID"` DeviceID DeviceID `codec:"deviceID" json:"deviceID"` DeviceDescription string `codec:"deviceDescription" json:"deviceDescription"` - DeviceType string `codec:"deviceType" json:"deviceType"` + DeviceType DeviceTypeV2 `codec:"deviceType" json:"deviceType"` CTime Time `codec:"cTime" json:"cTime"` ETime Time `codec:"eTime" json:"eTime"` IsRevoked bool `codec:"isRevoked" json:"isRevoked"` @@ -458,7 +464,7 @@ func (o PublicKey) DeepCopy() PublicKey { ParentID: o.ParentID, DeviceID: o.DeviceID.DeepCopy(), DeviceDescription: o.DeviceDescription, - DeviceType: o.DeviceType, + DeviceType: o.DeviceType.DeepCopy(), CTime: o.CTime.DeepCopy(), ETime: o.ETime.DeepCopy(), IsRevoked: o.IsRevoked, @@ -504,21 +510,21 @@ func (o User) DeepCopy() User { } type Device struct { - Type string `codec:"type" json:"type"` - Name string `codec:"name" json:"name"` - DeviceID DeviceID `codec:"deviceID" json:"deviceID"` - DeviceNumberOfType int `codec:"deviceNumberOfType" json:"deviceNumberOfType"` - CTime Time `codec:"cTime" json:"cTime"` - MTime Time `codec:"mTime" json:"mTime"` - LastUsedTime Time `codec:"lastUsedTime" json:"lastUsedTime"` - EncryptKey KID `codec:"encryptKey" json:"encryptKey"` - VerifyKey KID `codec:"verifyKey" json:"verifyKey"` - Status int `codec:"status" json:"status"` + Type DeviceTypeV2 `codec:"type" json:"type"` + Name string `codec:"name" json:"name"` + DeviceID DeviceID `codec:"deviceID" json:"deviceID"` + DeviceNumberOfType int `codec:"deviceNumberOfType" json:"deviceNumberOfType"` + CTime Time `codec:"cTime" json:"cTime"` + MTime Time `codec:"mTime" json:"mTime"` + LastUsedTime Time `codec:"lastUsedTime" json:"lastUsedTime"` + EncryptKey KID `codec:"encryptKey" json:"encryptKey"` + VerifyKey KID `codec:"verifyKey" json:"verifyKey"` + Status int `codec:"status" json:"status"` } func (o Device) DeepCopy() Device { return Device{ - Type: o.Type, + Type: o.Type.DeepCopy(), Name: o.Name, DeviceID: o.DeviceID.DeepCopy(), DeviceNumberOfType: o.DeviceNumberOfType, @@ -557,6 +563,12 @@ func (e DeviceType) String() string { return fmt.Sprintf("%v", int(e)) } +type DeviceTypeV2 string + +func (o DeviceTypeV2) DeepCopy() DeviceTypeV2 { + return o +} + type Stream struct { Fd int `codec:"fd" json:"fd"` } @@ -1061,6 +1073,24 @@ func (e OfflineAvailability) String() string { return fmt.Sprintf("%v", int(e)) } +type UserReacji struct { + Name string `codec:"name" json:"name"` + CustomAddr *string `codec:"customAddr,omitempty" json:"customAddr,omitempty"` +} + +func (o UserReacji) DeepCopy() UserReacji { + return UserReacji{ + Name: o.Name, + CustomAddr: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.CustomAddr), + } +} + type ReacjiSkinTone int func (o ReacjiSkinTone) DeepCopy() ReacjiSkinTone { @@ -1068,19 +1098,19 @@ func (o ReacjiSkinTone) DeepCopy() ReacjiSkinTone { } type UserReacjis struct { - TopReacjis []string `codec:"topReacjis" json:"topReacjis"` + TopReacjis []UserReacji `codec:"topReacjis" json:"topReacjis"` SkinTone ReacjiSkinTone `codec:"skinTone" json:"skinTone"` } func (o UserReacjis) DeepCopy() UserReacjis { return UserReacjis{ - TopReacjis: (func(x []string) []string { + TopReacjis: (func(x []UserReacji) []UserReacji { if x == nil { return nil } - ret := make([]string, len(x)) + ret := make([]UserReacji, len(x)) for i, v := range x { - vCopy := v + vCopy := v.DeepCopy() ret[i] = vCopy } return ret @@ -1088,3 +1118,48 @@ func (o UserReacjis) DeepCopy() UserReacjis { SkinTone: o.SkinTone.DeepCopy(), } } + +type WotStatusType int + +const ( + WotStatusType_NONE WotStatusType = 0 + WotStatusType_PROPOSED WotStatusType = 1 + WotStatusType_ACCEPTED WotStatusType = 2 + WotStatusType_REJECTED WotStatusType = 3 + WotStatusType_REVOKED WotStatusType = 4 +) + +func (o WotStatusType) DeepCopy() WotStatusType { return o } + +var WotStatusTypeMap = map[string]WotStatusType{ + "NONE": 0, + "PROPOSED": 1, + "ACCEPTED": 2, + "REJECTED": 3, + "REVOKED": 4, +} + +var WotStatusTypeRevMap = map[WotStatusType]string{ + 0: "NONE", + 1: "PROPOSED", + 2: "ACCEPTED", + 3: "REJECTED", + 4: "REVOKED", +} + +func (e WotStatusType) String() string { + if v, ok := WotStatusTypeRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + +type GenericError struct { + Message string `codec:"message" json:"message"` +} + +func (o GenericError) DeepCopy() GenericError { + return GenericError{ + Message: o.Message, + } +} diff --git a/types/keybase1/config.go b/types/keybase1/config.go index 3700dca..a94aff5 100644 --- a/types/keybase1/config.go +++ b/types/keybase1/config.go @@ -9,11 +9,12 @@ import ( ) type CurrentStatus struct { - Configured bool `codec:"configured" json:"configured"` - Registered bool `codec:"registered" json:"registered"` - LoggedIn bool `codec:"loggedIn" json:"loggedIn"` - SessionIsValid bool `codec:"sessionIsValid" json:"sessionIsValid"` - User *User `codec:"user,omitempty" json:"user,omitempty"` + Configured bool `codec:"configured" json:"configured"` + Registered bool `codec:"registered" json:"registered"` + LoggedIn bool `codec:"loggedIn" json:"loggedIn"` + SessionIsValid bool `codec:"sessionIsValid" json:"sessionIsValid"` + User *User `codec:"user,omitempty" json:"user,omitempty"` + DeviceName string `codec:"deviceName" json:"deviceName"` } func (o CurrentStatus) DeepCopy() CurrentStatus { @@ -29,6 +30,7 @@ func (o CurrentStatus) DeepCopy() CurrentStatus { tmp := (*x).DeepCopy() return &tmp })(o.User), + DeviceName: o.DeviceName, } } @@ -331,6 +333,7 @@ type KbServiceStatus struct { Pid string `codec:"pid" json:"pid"` Log string `codec:"log" json:"log"` EkLog string `codec:"ekLog" json:"ekLog"` + PerfLog string `codec:"perfLog" json:"perfLog"` } func (o KbServiceStatus) DeepCopy() KbServiceStatus { @@ -340,6 +343,7 @@ func (o KbServiceStatus) DeepCopy() KbServiceStatus { Pid: o.Pid, Log: o.Log, EkLog: o.EkLog, + PerfLog: o.PerfLog, } } @@ -349,6 +353,7 @@ type KBFSStatus struct { Running bool `codec:"running" json:"running"` Pid string `codec:"pid" json:"pid"` Log string `codec:"log" json:"log"` + PerfLog string `codec:"perfLog" json:"perfLog"` Mount string `codec:"mount" json:"mount"` } @@ -359,6 +364,7 @@ func (o KBFSStatus) DeepCopy() KBFSStatus { Running: o.Running, Pid: o.Pid, Log: o.Log, + PerfLog: o.PerfLog, Mount: o.Mount, } } @@ -398,12 +404,14 @@ func (o StartStatus) DeepCopy() StartStatus { } type GitStatus struct { - Log string `codec:"log" json:"log"` + Log string `codec:"log" json:"log"` + PerfLog string `codec:"perfLog" json:"perfLog"` } func (o GitStatus) DeepCopy() GitStatus { return GitStatus{ - Log: o.Log, + Log: o.Log, + PerfLog: o.PerfLog, } } diff --git a/types/keybase1/constants.go b/types/keybase1/constants.go index e5b63f1..8f34d2e 100644 --- a/types/keybase1/constants.go +++ b/types/keybase1/constants.go @@ -12,6 +12,7 @@ type StatusCode int const ( StatusCode_SCOk StatusCode = 0 StatusCode_SCInputError StatusCode = 100 + StatusCode_SCAssertionParseError StatusCode = 101 StatusCode_SCLoginRequired StatusCode = 201 StatusCode_SCBadSession StatusCode = 202 StatusCode_SCBadLoginUserNotFound StatusCode = 203 @@ -34,11 +35,13 @@ const ( StatusCode_SCWrongCryptoFormat StatusCode = 279 StatusCode_SCDecryptionError StatusCode = 280 StatusCode_SCInvalidAddress StatusCode = 281 + StatusCode_SCWrongCryptoMsgType StatusCode = 282 StatusCode_SCNoSession StatusCode = 283 StatusCode_SCAccountReset StatusCode = 290 StatusCode_SCIdentifiesFailed StatusCode = 295 StatusCode_SCNoSpaceOnDevice StatusCode = 297 StatusCode_SCMerkleClientError StatusCode = 299 + StatusCode_SCMerkleUpdateRoot StatusCode = 300 StatusCode_SCBadEmail StatusCode = 472 StatusCode_SCRateLimit StatusCode = 602 StatusCode_SCBadSignupUsernameTaken StatusCode = 701 @@ -69,6 +72,7 @@ const ( StatusCode_SCKeyDuplicateUpdate StatusCode = 921 StatusCode_SCSibkeyAlreadyExists StatusCode = 922 StatusCode_SCDecryptionKeyNotFound StatusCode = 924 + StatusCode_SCVerificationKeyNotFound StatusCode = 925 StatusCode_SCKeyNoPGPEncryption StatusCode = 927 StatusCode_SCKeyNoNaClEncryption StatusCode = 928 StatusCode_SCKeySyncedPGPNotFound StatusCode = 929 @@ -102,6 +106,7 @@ const ( StatusCode_SCGenericAPIError StatusCode = 1600 StatusCode_SCAPINetworkError StatusCode = 1601 StatusCode_SCTimeout StatusCode = 1602 + StatusCode_SCKBFSClientTimeout StatusCode = 1603 StatusCode_SCProofError StatusCode = 1701 StatusCode_SCIdentificationExpired StatusCode = 1702 StatusCode_SCSelfNotFound StatusCode = 1703 @@ -143,6 +148,7 @@ const ( StatusCode_SCChatStalePreviousState StatusCode = 2518 StatusCode_SCChatEphemeralRetentionPolicyViolatedError StatusCode = 2519 StatusCode_SCChatUsersAlreadyInConversationError StatusCode = 2520 + StatusCode_SCChatBadConversationError StatusCode = 2521 StatusCode_SCTeamBadMembership StatusCode = 2604 StatusCode_SCTeamSelfNotOwner StatusCode = 2607 StatusCode_SCTeamNotFound StatusCode = 2614 @@ -153,6 +159,7 @@ const ( StatusCode_SCNoOp StatusCode = 2638 StatusCode_SCTeamInviteBadCancel StatusCode = 2645 StatusCode_SCTeamInviteBadToken StatusCode = 2646 + StatusCode_SCTeamBadNameReservedDB StatusCode = 2650 StatusCode_SCTeamTarDuplicate StatusCode = 2663 StatusCode_SCTeamTarNotFound StatusCode = 2664 StatusCode_SCTeamMemberExists StatusCode = 2665 @@ -243,6 +250,10 @@ const ( StatusCode_SCTeambotKeyOldBoxedGeneration StatusCode = 3801 StatusCode_SCTeambotKeyBadGeneration StatusCode = 3802 StatusCode_SCAirdropRegisterFailedMisc StatusCode = 4207 + StatusCode_SCSimpleFSNameExists StatusCode = 5101 + StatusCode_SCSimpleFSDirNotEmpty StatusCode = 5102 + StatusCode_SCSimpleFSNotExist StatusCode = 5103 + StatusCode_SCSimpleFSNoAccess StatusCode = 5104 ) func (o StatusCode) DeepCopy() StatusCode { return o } @@ -250,6 +261,7 @@ func (o StatusCode) DeepCopy() StatusCode { return o } var StatusCodeMap = map[string]StatusCode{ "SCOk": 0, "SCInputError": 100, + "SCAssertionParseError": 101, "SCLoginRequired": 201, "SCBadSession": 202, "SCBadLoginUserNotFound": 203, @@ -272,11 +284,13 @@ var StatusCodeMap = map[string]StatusCode{ "SCWrongCryptoFormat": 279, "SCDecryptionError": 280, "SCInvalidAddress": 281, + "SCWrongCryptoMsgType": 282, "SCNoSession": 283, "SCAccountReset": 290, "SCIdentifiesFailed": 295, "SCNoSpaceOnDevice": 297, "SCMerkleClientError": 299, + "SCMerkleUpdateRoot": 300, "SCBadEmail": 472, "SCRateLimit": 602, "SCBadSignupUsernameTaken": 701, @@ -307,6 +321,7 @@ var StatusCodeMap = map[string]StatusCode{ "SCKeyDuplicateUpdate": 921, "SCSibkeyAlreadyExists": 922, "SCDecryptionKeyNotFound": 924, + "SCVerificationKeyNotFound": 925, "SCKeyNoPGPEncryption": 927, "SCKeyNoNaClEncryption": 928, "SCKeySyncedPGPNotFound": 929, @@ -340,6 +355,7 @@ var StatusCodeMap = map[string]StatusCode{ "SCGenericAPIError": 1600, "SCAPINetworkError": 1601, "SCTimeout": 1602, + "SCKBFSClientTimeout": 1603, "SCProofError": 1701, "SCIdentificationExpired": 1702, "SCSelfNotFound": 1703, @@ -381,6 +397,7 @@ var StatusCodeMap = map[string]StatusCode{ "SCChatStalePreviousState": 2518, "SCChatEphemeralRetentionPolicyViolatedError": 2519, "SCChatUsersAlreadyInConversationError": 2520, + "SCChatBadConversationError": 2521, "SCTeamBadMembership": 2604, "SCTeamSelfNotOwner": 2607, "SCTeamNotFound": 2614, @@ -391,6 +408,7 @@ var StatusCodeMap = map[string]StatusCode{ "SCNoOp": 2638, "SCTeamInviteBadCancel": 2645, "SCTeamInviteBadToken": 2646, + "SCTeamBadNameReservedDB": 2650, "SCTeamTarDuplicate": 2663, "SCTeamTarNotFound": 2664, "SCTeamMemberExists": 2665, @@ -481,11 +499,16 @@ var StatusCodeMap = map[string]StatusCode{ "SCTeambotKeyOldBoxedGeneration": 3801, "SCTeambotKeyBadGeneration": 3802, "SCAirdropRegisterFailedMisc": 4207, + "SCSimpleFSNameExists": 5101, + "SCSimpleFSDirNotEmpty": 5102, + "SCSimpleFSNotExist": 5103, + "SCSimpleFSNoAccess": 5104, } var StatusCodeRevMap = map[StatusCode]string{ 0: "SCOk", 100: "SCInputError", + 101: "SCAssertionParseError", 201: "SCLoginRequired", 202: "SCBadSession", 203: "SCBadLoginUserNotFound", @@ -508,11 +531,13 @@ var StatusCodeRevMap = map[StatusCode]string{ 279: "SCWrongCryptoFormat", 280: "SCDecryptionError", 281: "SCInvalidAddress", + 282: "SCWrongCryptoMsgType", 283: "SCNoSession", 290: "SCAccountReset", 295: "SCIdentifiesFailed", 297: "SCNoSpaceOnDevice", 299: "SCMerkleClientError", + 300: "SCMerkleUpdateRoot", 472: "SCBadEmail", 602: "SCRateLimit", 701: "SCBadSignupUsernameTaken", @@ -543,6 +568,7 @@ var StatusCodeRevMap = map[StatusCode]string{ 921: "SCKeyDuplicateUpdate", 922: "SCSibkeyAlreadyExists", 924: "SCDecryptionKeyNotFound", + 925: "SCVerificationKeyNotFound", 927: "SCKeyNoPGPEncryption", 928: "SCKeyNoNaClEncryption", 929: "SCKeySyncedPGPNotFound", @@ -576,6 +602,7 @@ var StatusCodeRevMap = map[StatusCode]string{ 1600: "SCGenericAPIError", 1601: "SCAPINetworkError", 1602: "SCTimeout", + 1603: "SCKBFSClientTimeout", 1701: "SCProofError", 1702: "SCIdentificationExpired", 1703: "SCSelfNotFound", @@ -617,6 +644,7 @@ var StatusCodeRevMap = map[StatusCode]string{ 2518: "SCChatStalePreviousState", 2519: "SCChatEphemeralRetentionPolicyViolatedError", 2520: "SCChatUsersAlreadyInConversationError", + 2521: "SCChatBadConversationError", 2604: "SCTeamBadMembership", 2607: "SCTeamSelfNotOwner", 2614: "SCTeamNotFound", @@ -627,6 +655,7 @@ var StatusCodeRevMap = map[StatusCode]string{ 2638: "SCNoOp", 2645: "SCTeamInviteBadCancel", 2646: "SCTeamInviteBadToken", + 2650: "SCTeamBadNameReservedDB", 2663: "SCTeamTarDuplicate", 2664: "SCTeamTarNotFound", 2665: "SCTeamMemberExists", @@ -717,6 +746,10 @@ var StatusCodeRevMap = map[StatusCode]string{ 3801: "SCTeambotKeyOldBoxedGeneration", 3802: "SCTeambotKeyBadGeneration", 4207: "SCAirdropRegisterFailedMisc", + 5101: "SCSimpleFSNameExists", + 5102: "SCSimpleFSDirNotEmpty", + 5103: "SCSimpleFSNotExist", + 5104: "SCSimpleFSNoAccess", } func (e StatusCode) String() string { diff --git a/types/keybase1/identify3_ui.go b/types/keybase1/identify3_ui.go index 1b3f34a..f12d5ca 100644 --- a/types/keybase1/identify3_ui.go +++ b/types/keybase1/identify3_ui.go @@ -128,21 +128,22 @@ func (o Identify3RowMeta) DeepCopy() Identify3RowMeta { } type Identify3Row struct { - GuiID Identify3GUIID `codec:"guiID" json:"guiID"` - Key string `codec:"key" json:"key"` - Value string `codec:"value" json:"value"` - Priority int `codec:"priority" json:"priority"` - SiteURL string `codec:"siteURL" json:"siteURL"` - SiteIcon []SizedImage `codec:"siteIcon" json:"siteIcon"` - SiteIconFull []SizedImage `codec:"siteIconFull" json:"siteIconFull"` - SiteIconWhite []SizedImage `codec:"siteIconWhite" json:"siteIconWhite"` - ProofURL string `codec:"proofURL" json:"proofURL"` - SigID SigID `codec:"sigID" json:"sigID"` - Ctime Time `codec:"ctime" json:"ctime"` - State Identify3RowState `codec:"state" json:"state"` - Metas []Identify3RowMeta `codec:"metas" json:"metas"` - Color Identify3RowColor `codec:"color" json:"color"` - Kid *KID `codec:"kid,omitempty" json:"kid,omitempty"` + GuiID Identify3GUIID `codec:"guiID" json:"guiID"` + Key string `codec:"key" json:"key"` + Value string `codec:"value" json:"value"` + Priority int `codec:"priority" json:"priority"` + SiteURL string `codec:"siteURL" json:"siteURL"` + SiteIcon []SizedImage `codec:"siteIcon" json:"siteIcon"` + SiteIconDarkmode []SizedImage `codec:"siteIconDarkmode" json:"siteIconDarkmode"` + SiteIconFull []SizedImage `codec:"siteIconFull" json:"siteIconFull"` + SiteIconFullDarkmode []SizedImage `codec:"siteIconFullDarkmode" json:"siteIconFullDarkmode"` + ProofURL string `codec:"proofURL" json:"proofURL"` + SigID SigID `codec:"sigID" json:"sigID"` + Ctime Time `codec:"ctime" json:"ctime"` + State Identify3RowState `codec:"state" json:"state"` + Metas []Identify3RowMeta `codec:"metas" json:"metas"` + Color Identify3RowColor `codec:"color" json:"color"` + Kid *KID `codec:"kid,omitempty" json:"kid,omitempty"` } func (o Identify3Row) DeepCopy() Identify3Row { @@ -163,6 +164,17 @@ func (o Identify3Row) DeepCopy() Identify3Row { } return ret })(o.SiteIcon), + SiteIconDarkmode: (func(x []SizedImage) []SizedImage { + if x == nil { + return nil + } + ret := make([]SizedImage, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.SiteIconDarkmode), SiteIconFull: (func(x []SizedImage) []SizedImage { if x == nil { return nil @@ -174,7 +186,7 @@ func (o Identify3Row) DeepCopy() Identify3Row { } return ret })(o.SiteIconFull), - SiteIconWhite: (func(x []SizedImage) []SizedImage { + SiteIconFullDarkmode: (func(x []SizedImage) []SizedImage { if x == nil { return nil } @@ -184,7 +196,7 @@ func (o Identify3Row) DeepCopy() Identify3Row { ret[i] = vCopy } return ret - })(o.SiteIconWhite), + })(o.SiteIconFullDarkmode), ProofURL: o.ProofURL, SigID: o.SigID.DeepCopy(), Ctime: o.Ctime.DeepCopy(), @@ -210,3 +222,15 @@ func (o Identify3Row) DeepCopy() Identify3Row { })(o.Kid), } } + +type Identify3Summary struct { + GuiID Identify3GUIID `codec:"guiID" json:"guiID"` + NumProofsToCheck int `codec:"numProofsToCheck" json:"numProofsToCheck"` +} + +func (o Identify3Summary) DeepCopy() Identify3Summary { + return Identify3Summary{ + GuiID: o.GuiID.DeepCopy(), + NumProofsToCheck: o.NumProofsToCheck, + } +} diff --git a/types/keybase1/identify_ui.go b/types/keybase1/identify_ui.go index e8118f9..2cfd290 100644 --- a/types/keybase1/identify_ui.go +++ b/types/keybase1/identify_ui.go @@ -337,37 +337,33 @@ func (o UserTeamShowcase) DeepCopy() UserTeamShowcase { } type UserCard struct { - Following int `codec:"following" json:"following"` - Followers int `codec:"followers" json:"followers"` - Uid UID `codec:"uid" json:"uid"` - FullName string `codec:"fullName" json:"fullName"` - Location string `codec:"location" json:"location"` - Bio string `codec:"bio" json:"bio"` - BioDecorated string `codec:"bioDecorated" json:"bioDecorated"` - Website string `codec:"website" json:"website"` - Twitter string `codec:"twitter" json:"twitter"` - YouFollowThem bool `codec:"youFollowThem" json:"youFollowThem"` - TheyFollowYou bool `codec:"theyFollowYou" json:"theyFollowYou"` - TeamShowcase []UserTeamShowcase `codec:"teamShowcase" json:"teamShowcase"` - RegisteredForAirdrop bool `codec:"registeredForAirdrop" json:"registeredForAirdrop"` - StellarHidden bool `codec:"stellarHidden" json:"stellarHidden"` - Blocked bool `codec:"blocked" json:"blocked"` - HidFromFollowers bool `codec:"hidFromFollowers" json:"hidFromFollowers"` + UnverifiedNumFollowing int `codec:"unverifiedNumFollowing" json:"unverifiedNumFollowing"` + UnverifiedNumFollowers int `codec:"unverifiedNumFollowers" json:"unverifiedNumFollowers"` + Uid UID `codec:"uid" json:"uid"` + FullName string `codec:"fullName" json:"fullName"` + Location string `codec:"location" json:"location"` + Bio string `codec:"bio" json:"bio"` + BioDecorated string `codec:"bioDecorated" json:"bioDecorated"` + Website string `codec:"website" json:"website"` + Twitter string `codec:"twitter" json:"twitter"` + TeamShowcase []UserTeamShowcase `codec:"teamShowcase" json:"teamShowcase"` + RegisteredForAirdrop bool `codec:"registeredForAirdrop" json:"registeredForAirdrop"` + StellarHidden bool `codec:"stellarHidden" json:"stellarHidden"` + Blocked bool `codec:"blocked" json:"blocked"` + HidFromFollowers bool `codec:"hidFromFollowers" json:"hidFromFollowers"` } func (o UserCard) DeepCopy() UserCard { return UserCard{ - Following: o.Following, - Followers: o.Followers, - Uid: o.Uid.DeepCopy(), - FullName: o.FullName, - Location: o.Location, - Bio: o.Bio, - BioDecorated: o.BioDecorated, - Website: o.Website, - Twitter: o.Twitter, - YouFollowThem: o.YouFollowThem, - TheyFollowYou: o.TheyFollowYou, + UnverifiedNumFollowing: o.UnverifiedNumFollowing, + UnverifiedNumFollowers: o.UnverifiedNumFollowers, + Uid: o.Uid.DeepCopy(), + FullName: o.FullName, + Location: o.Location, + Bio: o.Bio, + BioDecorated: o.BioDecorated, + Website: o.Website, + Twitter: o.Twitter, TeamShowcase: (func(x []UserTeamShowcase) []UserTeamShowcase { if x == nil { return nil diff --git a/types/keybase1/incoming-share.go b/types/keybase1/incoming-share.go new file mode 100644 index 0000000..a4c1760 --- /dev/null +++ b/types/keybase1/incoming-share.go @@ -0,0 +1,86 @@ +// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler) +// Input file: ../client/protocol/avdl/keybase1/incoming-share.avdl + +package keybase1 + +import ( + "fmt" +) + +type IncomingShareType int + +const ( + IncomingShareType_FILE IncomingShareType = 0 + IncomingShareType_TEXT IncomingShareType = 1 + IncomingShareType_IMAGE IncomingShareType = 2 + IncomingShareType_VIDEO IncomingShareType = 3 +) + +func (o IncomingShareType) DeepCopy() IncomingShareType { return o } + +var IncomingShareTypeMap = map[string]IncomingShareType{ + "FILE": 0, + "TEXT": 1, + "IMAGE": 2, + "VIDEO": 3, +} + +var IncomingShareTypeRevMap = map[IncomingShareType]string{ + 0: "FILE", + 1: "TEXT", + 2: "IMAGE", + 3: "VIDEO", +} + +func (e IncomingShareType) String() string { + if v, ok := IncomingShareTypeRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + +type IncomingShareItem struct { + Type IncomingShareType `codec:"type" json:"type"` + OriginalPath string `codec:"originalPath" json:"originalPath"` + OriginalSize int `codec:"originalSize" json:"originalSize"` + ScaledPath *string `codec:"scaledPath,omitempty" json:"scaledPath,omitempty"` + ScaledSize *int `codec:"scaledSize,omitempty" json:"scaledSize,omitempty"` + ThumbnailPath *string `codec:"thumbnailPath,omitempty" json:"thumbnailPath,omitempty"` + Content *string `codec:"content,omitempty" json:"content,omitempty"` +} + +func (o IncomingShareItem) DeepCopy() IncomingShareItem { + return IncomingShareItem{ + Type: o.Type.DeepCopy(), + OriginalPath: o.OriginalPath, + OriginalSize: o.OriginalSize, + ScaledPath: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.ScaledPath), + ScaledSize: (func(x *int) *int { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.ScaledSize), + ThumbnailPath: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.ThumbnailPath), + Content: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.Content), + } +} diff --git a/types/keybase1/invite_friends.go b/types/keybase1/invite_friends.go new file mode 100644 index 0000000..0470a74 --- /dev/null +++ b/types/keybase1/invite_friends.go @@ -0,0 +1,54 @@ +// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler) +// Input file: ../client/protocol/avdl/keybase1/invite_friends.avdl + +package keybase1 + +type InviteCounts struct { + InviteCount int `codec:"inviteCount" json:"inviteCount"` + PercentageChange float64 `codec:"percentageChange" json:"percentageChange"` + ShowNumInvites bool `codec:"showNumInvites" json:"showNumInvites"` + ShowFire bool `codec:"showFire" json:"showFire"` +} + +func (o InviteCounts) DeepCopy() InviteCounts { + return InviteCounts{ + InviteCount: o.InviteCount, + PercentageChange: o.PercentageChange, + ShowNumInvites: o.ShowNumInvites, + ShowFire: o.ShowFire, + } +} + +type EmailInvites struct { + CommaSeparatedEmailsFromUser *string `codec:"commaSeparatedEmailsFromUser,omitempty" json:"commaSeparatedEmailsFromUser,omitempty"` + EmailsFromContacts *[]EmailAddress `codec:"emailsFromContacts,omitempty" json:"emailsFromContacts,omitempty"` +} + +func (o EmailInvites) DeepCopy() EmailInvites { + return EmailInvites{ + CommaSeparatedEmailsFromUser: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.CommaSeparatedEmailsFromUser), + EmailsFromContacts: (func(x *[]EmailAddress) *[]EmailAddress { + if x == nil { + return nil + } + tmp := (func(x []EmailAddress) []EmailAddress { + if x == nil { + return nil + } + ret := make([]EmailAddress, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })((*x)) + return &tmp + })(o.EmailsFromContacts), + } +} diff --git a/types/keybase1/network_stats.go b/types/keybase1/network_stats.go new file mode 100644 index 0000000..466158a --- /dev/null +++ b/types/keybase1/network_stats.go @@ -0,0 +1,66 @@ +// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler) +// Input file: ../client/protocol/avdl/keybase1/network_stats.avdl + +package keybase1 + +import ( + "fmt" +) + +type NetworkSource int + +const ( + NetworkSource_LOCAL NetworkSource = 0 + NetworkSource_REMOTE NetworkSource = 1 +) + +func (o NetworkSource) DeepCopy() NetworkSource { return o } + +var NetworkSourceMap = map[string]NetworkSource{ + "LOCAL": 0, + "REMOTE": 1, +} + +var NetworkSourceRevMap = map[NetworkSource]string{ + 0: "LOCAL", + 1: "REMOTE", +} + +func (e NetworkSource) String() string { + if v, ok := NetworkSourceRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + +type InstrumentationStat struct { + Tag string `codec:"t" json:"tag"` + NumCalls int `codec:"n" json:"numCalls"` + Ctime Time `codec:"c" json:"ctime"` + Mtime Time `codec:"m" json:"mtime"` + AvgDur DurationMsec `codec:"ad" json:"avgDur"` + MaxDur DurationMsec `codec:"xd" json:"maxDur"` + MinDur DurationMsec `codec:"nd" json:"minDur"` + TotalDur DurationMsec `codec:"td" json:"totalDur"` + AvgSize int64 `codec:"as" json:"avgSize"` + MaxSize int64 `codec:"xs" json:"maxSize"` + MinSize int64 `codec:"ns" json:"minSize"` + TotalSize int64 `codec:"ts" json:"totalSize"` +} + +func (o InstrumentationStat) DeepCopy() InstrumentationStat { + return InstrumentationStat{ + Tag: o.Tag, + NumCalls: o.NumCalls, + Ctime: o.Ctime.DeepCopy(), + Mtime: o.Mtime.DeepCopy(), + AvgDur: o.AvgDur.DeepCopy(), + MaxDur: o.MaxDur.DeepCopy(), + MinDur: o.MinDur.DeepCopy(), + TotalDur: o.TotalDur.DeepCopy(), + AvgSize: o.AvgSize, + MaxSize: o.MaxSize, + MinSize: o.MinSize, + TotalSize: o.TotalSize, + } +} diff --git a/types/keybase1/notify_badges.go b/types/keybase1/notify_badges.go index 0a450e8..4c7a425 100644 --- a/types/keybase1/notify_badges.go +++ b/types/keybase1/notify_badges.go @@ -74,6 +74,20 @@ func (o ResetState) DeepCopy() ResetState { } } +type WotUpdate struct { + Voucher string `codec:"voucher" json:"voucher"` + Vouchee string `codec:"vouchee" json:"vouchee"` + Status WotStatusType `codec:"status" json:"status"` +} + +func (o WotUpdate) DeepCopy() WotUpdate { + return WotUpdate{ + Voucher: o.Voucher, + Vouchee: o.Vouchee, + Status: o.Status.DeepCopy(), + } +} + type BadgeState struct { NewTlfs int `codec:"newTlfs" json:"newTlfs"` RekeysNeeded int `codec:"rekeysNeeded" json:"rekeysNeeded"` @@ -82,27 +96,33 @@ type BadgeState struct { HomeTodoItems int `codec:"homeTodoItems" json:"homeTodoItems"` UnverifiedEmails int `codec:"unverifiedEmails" json:"unverifiedEmails"` UnverifiedPhones int `codec:"unverifiedPhones" json:"unverifiedPhones"` + SmallTeamBadgeCount int `codec:"smallTeamBadgeCount" json:"smallTeamBadgeCount"` + BigTeamBadgeCount int `codec:"bigTeamBadgeCount" json:"bigTeamBadgeCount"` + NewTeamAccessRequestCount int `codec:"newTeamAccessRequestCount" json:"newTeamAccessRequestCount"` NewDevices []DeviceID `codec:"newDevices" json:"newDevices"` RevokedDevices []DeviceID `codec:"revokedDevices" json:"revokedDevices"` Conversations []BadgeConversationInfo `codec:"conversations" json:"conversations"` NewGitRepoGlobalUniqueIDs []string `codec:"newGitRepoGlobalUniqueIDs" json:"newGitRepoGlobalUniqueIDs"` NewTeams []TeamID `codec:"newTeams" json:"newTeams"` DeletedTeams []DeletedTeamInfo `codec:"deletedTeams" json:"deletedTeams"` - NewTeamAccessRequests []TeamID `codec:"newTeamAccessRequests" json:"newTeamAccessRequests"` TeamsWithResetUsers []TeamMemberOutReset `codec:"teamsWithResetUsers" json:"teamsWithResetUsers"` UnreadWalletAccounts []WalletAccountInfo `codec:"unreadWalletAccounts" json:"unreadWalletAccounts"` + WotUpdates map[string]WotUpdate `codec:"wotUpdates" json:"wotUpdates"` ResetState ResetState `codec:"resetState" json:"resetState"` } func (o BadgeState) DeepCopy() BadgeState { return BadgeState{ - NewTlfs: o.NewTlfs, - RekeysNeeded: o.RekeysNeeded, - NewFollowers: o.NewFollowers, - InboxVers: o.InboxVers, - HomeTodoItems: o.HomeTodoItems, - UnverifiedEmails: o.UnverifiedEmails, - UnverifiedPhones: o.UnverifiedPhones, + NewTlfs: o.NewTlfs, + RekeysNeeded: o.RekeysNeeded, + NewFollowers: o.NewFollowers, + InboxVers: o.InboxVers, + HomeTodoItems: o.HomeTodoItems, + UnverifiedEmails: o.UnverifiedEmails, + UnverifiedPhones: o.UnverifiedPhones, + SmallTeamBadgeCount: o.SmallTeamBadgeCount, + BigTeamBadgeCount: o.BigTeamBadgeCount, + NewTeamAccessRequestCount: o.NewTeamAccessRequestCount, NewDevices: (func(x []DeviceID) []DeviceID { if x == nil { return nil @@ -169,17 +189,6 @@ func (o BadgeState) DeepCopy() BadgeState { } return ret })(o.DeletedTeams), - NewTeamAccessRequests: (func(x []TeamID) []TeamID { - if x == nil { - return nil - } - ret := make([]TeamID, len(x)) - for i, v := range x { - vCopy := v.DeepCopy() - ret[i] = vCopy - } - return ret - })(o.NewTeamAccessRequests), TeamsWithResetUsers: (func(x []TeamMemberOutReset) []TeamMemberOutReset { if x == nil { return nil @@ -202,31 +211,32 @@ func (o BadgeState) DeepCopy() BadgeState { } return ret })(o.UnreadWalletAccounts), + WotUpdates: (func(x map[string]WotUpdate) map[string]WotUpdate { + if x == nil { + return nil + } + ret := make(map[string]WotUpdate, len(x)) + for k, v := range x { + kCopy := k + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.WotUpdates), ResetState: o.ResetState.DeepCopy(), } } type BadgeConversationInfo struct { ConvID ChatConversationID `codec:"convID" json:"convID"` - BadgeCounts map[DeviceType]int `codec:"badgeCounts" json:"badgeCounts"` + BadgeCount int `codec:"badgeCount" json:"badgeCount"` UnreadMessages int `codec:"unreadMessages" json:"unreadMessages"` } func (o BadgeConversationInfo) DeepCopy() BadgeConversationInfo { return BadgeConversationInfo{ - ConvID: o.ConvID.DeepCopy(), - BadgeCounts: (func(x map[DeviceType]int) map[DeviceType]int { - if x == nil { - return nil - } - ret := make(map[DeviceType]int, len(x)) - for k, v := range x { - kCopy := k.DeepCopy() - vCopy := v - ret[kCopy] = vCopy - } - return ret - })(o.BadgeCounts), + ConvID: o.ConvID.DeepCopy(), + BadgeCount: o.BadgeCount, UnreadMessages: o.UnreadMessages, } } diff --git a/types/keybase1/notify_ctl.go b/types/keybase1/notify_ctl.go index a937a7d..3078f98 100644 --- a/types/keybase1/notify_ctl.go +++ b/types/keybase1/notify_ctl.go @@ -26,6 +26,8 @@ type NotificationChannels struct { Teambot bool `codec:"teambot" json:"teambot"` Chatkbfsedits bool `codec:"chatkbfsedits" json:"chatkbfsedits"` Chatdev bool `codec:"chatdev" json:"chatdev"` + Chatemoji bool `codec:"chatemoji" json:"chatemoji"` + Chatemojicross bool `codec:"chatemojicross" json:"chatemojicross"` Deviceclone bool `codec:"deviceclone" json:"deviceclone"` Chatattachments bool `codec:"chatattachments" json:"chatattachments"` Wallet bool `codec:"wallet" json:"wallet"` @@ -59,6 +61,8 @@ func (o NotificationChannels) DeepCopy() NotificationChannels { Teambot: o.Teambot, Chatkbfsedits: o.Chatkbfsedits, Chatdev: o.Chatdev, + Chatemoji: o.Chatemoji, + Chatemojicross: o.Chatemojicross, Deviceclone: o.Deviceclone, Chatattachments: o.Chatattachments, Wallet: o.Wallet, diff --git a/types/keybase1/notify_invite_friends.go b/types/keybase1/notify_invite_friends.go new file mode 100644 index 0000000..ff01baa --- /dev/null +++ b/types/keybase1/notify_invite_friends.go @@ -0,0 +1,4 @@ +// Auto-generated to Go types using avdl-compiler v1.4.6 (https://github.com/keybase/node-avdl-compiler) +// Input file: ../client/protocol/avdl/keybase1/notify_invite_friends.avdl + +package keybase1 diff --git a/types/keybase1/notify_runtimestats.go b/types/keybase1/notify_runtimestats.go index 99906ff..a877ce4 100644 --- a/types/keybase1/notify_runtimestats.go +++ b/types/keybase1/notify_runtimestats.go @@ -104,9 +104,68 @@ func (o ProcessRuntimeStats) DeepCopy() ProcessRuntimeStats { } } +type PerfEventType int + +const ( + PerfEventType_NETWORK PerfEventType = 0 + PerfEventType_TEAMBOXAUDIT PerfEventType = 1 + PerfEventType_TEAMAUDIT PerfEventType = 2 + PerfEventType_USERCHAIN PerfEventType = 3 + PerfEventType_TEAMCHAIN PerfEventType = 4 + PerfEventType_CLEARCONV PerfEventType = 5 + PerfEventType_CLEARINBOX PerfEventType = 6 + PerfEventType_TEAMTREELOAD PerfEventType = 7 +) + +func (o PerfEventType) DeepCopy() PerfEventType { return o } + +var PerfEventTypeMap = map[string]PerfEventType{ + "NETWORK": 0, + "TEAMBOXAUDIT": 1, + "TEAMAUDIT": 2, + "USERCHAIN": 3, + "TEAMCHAIN": 4, + "CLEARCONV": 5, + "CLEARINBOX": 6, + "TEAMTREELOAD": 7, +} + +var PerfEventTypeRevMap = map[PerfEventType]string{ + 0: "NETWORK", + 1: "TEAMBOXAUDIT", + 2: "TEAMAUDIT", + 3: "USERCHAIN", + 4: "TEAMCHAIN", + 5: "CLEARCONV", + 6: "CLEARINBOX", + 7: "TEAMTREELOAD", +} + +func (e PerfEventType) String() string { + if v, ok := PerfEventTypeRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + +type PerfEvent struct { + Message string `codec:"message" json:"message"` + Ctime Time `codec:"ctime" json:"ctime"` + EventType PerfEventType `codec:"eventType" json:"eventType"` +} + +func (o PerfEvent) DeepCopy() PerfEvent { + return PerfEvent{ + Message: o.Message, + Ctime: o.Ctime.DeepCopy(), + EventType: o.EventType.DeepCopy(), + } +} + type RuntimeStats struct { ProcessStats []ProcessRuntimeStats `codec:"processStats" json:"processStats"` DbStats []DbStats `codec:"dbStats" json:"dbStats"` + PerfEvents []PerfEvent `codec:"perfEvents" json:"perfEvents"` ConvLoaderActive bool `codec:"convLoaderActive" json:"convLoaderActive"` SelectiveSyncActive bool `codec:"selectiveSyncActive" json:"selectiveSyncActive"` } @@ -135,6 +194,17 @@ func (o RuntimeStats) DeepCopy() RuntimeStats { } return ret })(o.DbStats), + PerfEvents: (func(x []PerfEvent) []PerfEvent { + if x == nil { + return nil + } + ret := make([]PerfEvent, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.PerfEvents), ConvLoaderActive: o.ConvLoaderActive, SelectiveSyncActive: o.SelectiveSyncActive, } diff --git a/types/keybase1/prove_common.go b/types/keybase1/prove_common.go index b263e16..b53886e 100644 --- a/types/keybase1/prove_common.go +++ b/types/keybase1/prove_common.go @@ -314,25 +314,10 @@ func (o ParamProofUsernameConfig) DeepCopy() ParamProofUsernameConfig { } } -type ParamProofLogoConfig struct { - SvgBlack string `codec:"svgBlack" json:"svg_black"` - SvgFull string `codec:"svgFull" json:"svg_full"` - SvgWhite string `codec:"svgWhite" json:"svg_white"` -} - -func (o ParamProofLogoConfig) DeepCopy() ParamProofLogoConfig { - return ParamProofLogoConfig{ - SvgBlack: o.SvgBlack, - SvgFull: o.SvgFull, - SvgWhite: o.SvgWhite, - } -} - type ParamProofServiceConfig struct { Version int `codec:"version" json:"version"` Domain string `codec:"domain" json:"domain"` DisplayName string `codec:"displayName" json:"display_name"` - Logo *ParamProofLogoConfig `codec:"logo,omitempty" json:"logo,omitempty"` Description string `codec:"description" json:"description"` UsernameConfig ParamProofUsernameConfig `codec:"usernameConfig" json:"username"` BrandColor string `codec:"brandColor" json:"brand_color"` @@ -345,16 +330,9 @@ type ParamProofServiceConfig struct { func (o ParamProofServiceConfig) DeepCopy() ParamProofServiceConfig { return ParamProofServiceConfig{ - Version: o.Version, - Domain: o.Domain, - DisplayName: o.DisplayName, - Logo: (func(x *ParamProofLogoConfig) *ParamProofLogoConfig { - if x == nil { - return nil - } - tmp := (*x).DeepCopy() - return &tmp - })(o.Logo), + Version: o.Version, + Domain: o.Domain, + DisplayName: o.DisplayName, Description: o.Description, UsernameConfig: o.UsernameConfig.DeepCopy(), BrandColor: o.BrandColor, diff --git a/types/keybase1/saltpack_ui.go b/types/keybase1/saltpack_ui.go index 39748b8..60685ec 100644 --- a/types/keybase1/saltpack_ui.go +++ b/types/keybase1/saltpack_ui.go @@ -54,6 +54,7 @@ func (e SaltpackSenderType) String() string { type SaltpackSender struct { Uid UID `codec:"uid" json:"uid"` Username string `codec:"username" json:"username"` + Fullname string `codec:"fullname" json:"fullname"` SenderType SaltpackSenderType `codec:"senderType" json:"senderType"` } @@ -61,6 +62,7 @@ func (o SaltpackSender) DeepCopy() SaltpackSender { return SaltpackSender{ Uid: o.Uid.DeepCopy(), Username: o.Username, + Fullname: o.Fullname, SenderType: o.SenderType.DeepCopy(), } } diff --git a/types/keybase1/simple_fs.go b/types/keybase1/simple_fs.go index 0fb7701..88d1ac8 100644 --- a/types/keybase1/simple_fs.go +++ b/types/keybase1/simple_fs.go @@ -744,30 +744,34 @@ func (o WriteArgs) DeepCopy() WriteArgs { } type CopyArgs struct { - OpID OpID `codec:"opID" json:"opID"` - Src Path `codec:"src" json:"src"` - Dest Path `codec:"dest" json:"dest"` + OpID OpID `codec:"opID" json:"opID"` + Src Path `codec:"src" json:"src"` + Dest Path `codec:"dest" json:"dest"` + OverwriteExistingFiles bool `codec:"overwriteExistingFiles" json:"overwriteExistingFiles"` } func (o CopyArgs) DeepCopy() CopyArgs { return CopyArgs{ - OpID: o.OpID.DeepCopy(), - Src: o.Src.DeepCopy(), - Dest: o.Dest.DeepCopy(), + OpID: o.OpID.DeepCopy(), + Src: o.Src.DeepCopy(), + Dest: o.Dest.DeepCopy(), + OverwriteExistingFiles: o.OverwriteExistingFiles, } } type MoveArgs struct { - OpID OpID `codec:"opID" json:"opID"` - Src Path `codec:"src" json:"src"` - Dest Path `codec:"dest" json:"dest"` + OpID OpID `codec:"opID" json:"opID"` + Src Path `codec:"src" json:"src"` + Dest Path `codec:"dest" json:"dest"` + OverwriteExistingFiles bool `codec:"overwriteExistingFiles" json:"overwriteExistingFiles"` } func (o MoveArgs) DeepCopy() MoveArgs { return MoveArgs{ - OpID: o.OpID.DeepCopy(), - Src: o.Src.DeepCopy(), - Dest: o.Dest.DeepCopy(), + OpID: o.OpID.DeepCopy(), + Src: o.Src.DeepCopy(), + Dest: o.Dest.DeepCopy(), + OverwriteExistingFiles: o.OverwriteExistingFiles, } } @@ -1286,12 +1290,14 @@ func (e KbfsOnlineStatus) String() string { type FSSettings struct { SpaceAvailableNotificationThreshold int64 `codec:"spaceAvailableNotificationThreshold" json:"spaceAvailableNotificationThreshold"` SfmiBannerDismissed bool `codec:"sfmiBannerDismissed" json:"sfmiBannerDismissed"` + SyncOnCellular bool `codec:"syncOnCellular" json:"syncOnCellular"` } func (o FSSettings) DeepCopy() FSSettings { return FSSettings{ SpaceAvailableNotificationThreshold: o.SpaceAvailableNotificationThreshold, SfmiBannerDismissed: o.SfmiBannerDismissed, + SyncOnCellular: o.SyncOnCellular, } } @@ -1351,6 +1357,7 @@ const ( SubscriptionTopic_FILES_TAB_BADGE SubscriptionTopic = 4 SubscriptionTopic_OVERALL_SYNC_STATUS SubscriptionTopic = 5 SubscriptionTopic_SETTINGS SubscriptionTopic = 6 + SubscriptionTopic_UPLOAD_STATUS SubscriptionTopic = 7 ) func (o SubscriptionTopic) DeepCopy() SubscriptionTopic { return o } @@ -1363,6 +1370,7 @@ var SubscriptionTopicMap = map[string]SubscriptionTopic{ "FILES_TAB_BADGE": 4, "OVERALL_SYNC_STATUS": 5, "SETTINGS": 6, + "UPLOAD_STATUS": 7, } var SubscriptionTopicRevMap = map[SubscriptionTopic]string{ @@ -1373,6 +1381,7 @@ var SubscriptionTopicRevMap = map[SubscriptionTopic]string{ 4: "FILES_TAB_BADGE", 5: "OVERALL_SYNC_STATUS", 6: "SETTINGS", + 7: "UPLOAD_STATUS", } func (e SubscriptionTopic) String() string { @@ -1480,6 +1489,28 @@ func (o DownloadStatus) DeepCopy() DownloadStatus { } } +type UploadState struct { + UploadID string `codec:"uploadID" json:"uploadID"` + TargetPath KBFSPath `codec:"targetPath" json:"targetPath"` + Error *string `codec:"error,omitempty" json:"error,omitempty"` + Canceled bool `codec:"canceled" json:"canceled"` +} + +func (o UploadState) DeepCopy() UploadState { + return UploadState{ + UploadID: o.UploadID, + TargetPath: o.TargetPath.DeepCopy(), + Error: (func(x *string) *string { + if x == nil { + return nil + } + tmp := (*x) + return &tmp + })(o.Error), + Canceled: o.Canceled, + } +} + type FilesTabBadge int const ( @@ -1563,3 +1594,75 @@ func (o GUIFileContext) DeepCopy() GUIFileContext { Url: o.Url, } } + +type SimpleFSSearchHit struct { + Path string `codec:"path" json:"path"` +} + +func (o SimpleFSSearchHit) DeepCopy() SimpleFSSearchHit { + return SimpleFSSearchHit{ + Path: o.Path, + } +} + +type SimpleFSSearchResults struct { + Hits []SimpleFSSearchHit `codec:"hits" json:"hits"` + NextResult int `codec:"nextResult" json:"nextResult"` +} + +func (o SimpleFSSearchResults) DeepCopy() SimpleFSSearchResults { + return SimpleFSSearchResults{ + Hits: (func(x []SimpleFSSearchHit) []SimpleFSSearchHit { + if x == nil { + return nil + } + ret := make([]SimpleFSSearchHit, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Hits), + NextResult: o.NextResult, + } +} + +type IndexProgressRecord struct { + EndEstimate Time `codec:"endEstimate" json:"endEstimate"` + BytesTotal int64 `codec:"bytesTotal" json:"bytesTotal"` + BytesSoFar int64 `codec:"bytesSoFar" json:"bytesSoFar"` +} + +func (o IndexProgressRecord) DeepCopy() IndexProgressRecord { + return IndexProgressRecord{ + EndEstimate: o.EndEstimate.DeepCopy(), + BytesTotal: o.BytesTotal, + BytesSoFar: o.BytesSoFar, + } +} + +type SimpleFSIndexProgress struct { + OverallProgress IndexProgressRecord `codec:"overallProgress" json:"overallProgress"` + CurrFolder Folder `codec:"currFolder" json:"currFolder"` + CurrProgress IndexProgressRecord `codec:"currProgress" json:"currProgress"` + FoldersLeft []Folder `codec:"foldersLeft" json:"foldersLeft"` +} + +func (o SimpleFSIndexProgress) DeepCopy() SimpleFSIndexProgress { + return SimpleFSIndexProgress{ + OverallProgress: o.OverallProgress.DeepCopy(), + CurrFolder: o.CurrFolder.DeepCopy(), + CurrProgress: o.CurrProgress.DeepCopy(), + FoldersLeft: (func(x []Folder) []Folder { + if x == nil { + return nil + } + ret := make([]Folder, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.FoldersLeft), + } +} diff --git a/types/keybase1/teams.go b/types/keybase1/teams.go index 1e11087..4275ae6 100644 --- a/types/keybase1/teams.go +++ b/types/keybase1/teams.go @@ -283,6 +283,12 @@ func (o TeamInviteID) DeepCopy() TeamInviteID { return o } +type TeamInviteMaxUses int + +func (o TeamInviteMaxUses) DeepCopy() TeamInviteMaxUses { + return o +} + type ReaderKeyMask struct { Application TeamApplication `codec:"application" json:"application"` Generation PerTeamKeyGeneration `codec:"generation" json:"generation"` @@ -494,6 +500,7 @@ type TeamMemberDetails struct { FullName FullName `codec:"fullName" json:"fullName"` NeedsPUK bool `codec:"needsPUK" json:"needsPUK"` Status TeamMemberStatus `codec:"status" json:"status"` + JoinTime *Time `codec:"joinTime,omitempty" json:"joinTime,omitempty"` } func (o TeamMemberDetails) DeepCopy() TeamMemberDetails { @@ -503,6 +510,13 @@ func (o TeamMemberDetails) DeepCopy() TeamMemberDetails { FullName: o.FullName.DeepCopy(), NeedsPUK: o.NeedsPUK, Status: o.Status.DeepCopy(), + JoinTime: (func(x *Time) *Time { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.JoinTime), } } @@ -617,12 +631,82 @@ func (o TeamDetails) DeepCopy() TeamDetails { } } +type TeamMemberRole struct { + Uid UID `codec:"uid" json:"uid"` + Username string `codec:"username" json:"username"` + FullName FullName `codec:"fullName" json:"fullName"` + Role TeamRole `codec:"role" json:"role"` +} + +func (o TeamMemberRole) DeepCopy() TeamMemberRole { + return TeamMemberRole{ + Uid: o.Uid.DeepCopy(), + Username: o.Username, + FullName: o.FullName.DeepCopy(), + Role: o.Role.DeepCopy(), + } +} + +type UntrustedTeamInfo struct { + Name TeamName `codec:"name" json:"name"` + InTeam bool `codec:"inTeam" json:"inTeam"` + Open bool `codec:"open" json:"open"` + Description string `codec:"description" json:"description"` + PublicAdmins []string `codec:"publicAdmins" json:"publicAdmins"` + NumMembers int `codec:"numMembers" json:"numMembers"` + PublicMembers []TeamMemberRole `codec:"publicMembers" json:"publicMembers"` +} + +func (o UntrustedTeamInfo) DeepCopy() UntrustedTeamInfo { + return UntrustedTeamInfo{ + Name: o.Name.DeepCopy(), + InTeam: o.InTeam, + Open: o.Open, + Description: o.Description, + PublicAdmins: (func(x []string) []string { + if x == nil { + return nil + } + ret := make([]string, len(x)) + for i, v := range x { + vCopy := v + ret[i] = vCopy + } + return ret + })(o.PublicAdmins), + NumMembers: o.NumMembers, + PublicMembers: (func(x []TeamMemberRole) []TeamMemberRole { + if x == nil { + return nil + } + ret := make([]TeamMemberRole, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.PublicMembers), + } +} + type UserVersionPercentForm string func (o UserVersionPercentForm) DeepCopy() UserVersionPercentForm { return o } +type TeamUsedInvite struct { + InviteID TeamInviteID `codec:"inviteID" json:"inviteID"` + Uv UserVersionPercentForm `codec:"uv" json:"uv"` +} + +func (o TeamUsedInvite) DeepCopy() TeamUsedInvite { + return TeamUsedInvite{ + InviteID: o.InviteID.DeepCopy(), + Uv: o.Uv.DeepCopy(), + } +} + type TeamChangeReq struct { Owners []UserVersion `codec:"owners" json:"owners"` Admins []UserVersion `codec:"admins" json:"admins"` @@ -632,6 +716,7 @@ type TeamChangeReq struct { RestrictedBots map[UserVersion]TeamBotSettings `codec:"restrictedBots" json:"restrictedBots"` None []UserVersion `codec:"none" json:"none"` CompletedInvites map[TeamInviteID]UserVersionPercentForm `codec:"completedInvites" json:"completedInvites"` + UsedInvites []TeamUsedInvite `codec:"usedInvites" json:"usedInvites"` } func (o TeamChangeReq) DeepCopy() TeamChangeReq { @@ -726,6 +811,17 @@ func (o TeamChangeReq) DeepCopy() TeamChangeReq { } return ret })(o.CompletedInvites), + UsedInvites: (func(x []TeamUsedInvite) []TeamUsedInvite { + if x == nil { + return nil + } + ret := make([]TeamUsedInvite, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.UsedInvites), } } @@ -1492,25 +1588,27 @@ func (o AuditHistory) DeepCopy() AuditHistory { type TeamInviteCategory int const ( - TeamInviteCategory_NONE TeamInviteCategory = 0 - TeamInviteCategory_UNKNOWN TeamInviteCategory = 1 - TeamInviteCategory_KEYBASE TeamInviteCategory = 2 - TeamInviteCategory_EMAIL TeamInviteCategory = 3 - TeamInviteCategory_SBS TeamInviteCategory = 4 - TeamInviteCategory_SEITAN TeamInviteCategory = 5 - TeamInviteCategory_PHONE TeamInviteCategory = 6 + TeamInviteCategory_NONE TeamInviteCategory = 0 + TeamInviteCategory_UNKNOWN TeamInviteCategory = 1 + TeamInviteCategory_KEYBASE TeamInviteCategory = 2 + TeamInviteCategory_EMAIL TeamInviteCategory = 3 + TeamInviteCategory_SBS TeamInviteCategory = 4 + TeamInviteCategory_SEITAN TeamInviteCategory = 5 + TeamInviteCategory_PHONE TeamInviteCategory = 6 + TeamInviteCategory_INVITELINK TeamInviteCategory = 7 ) func (o TeamInviteCategory) DeepCopy() TeamInviteCategory { return o } var TeamInviteCategoryMap = map[string]TeamInviteCategory{ - "NONE": 0, - "UNKNOWN": 1, - "KEYBASE": 2, - "EMAIL": 3, - "SBS": 4, - "SEITAN": 5, - "PHONE": 6, + "NONE": 0, + "UNKNOWN": 1, + "KEYBASE": 2, + "EMAIL": 3, + "SBS": 4, + "SEITAN": 5, + "PHONE": 6, + "INVITELINK": 7, } var TeamInviteCategoryRevMap = map[TeamInviteCategory]string{ @@ -1521,6 +1619,7 @@ var TeamInviteCategoryRevMap = map[TeamInviteCategory]string{ 4: "SBS", 5: "SEITAN", 6: "PHONE", + 7: "INVITELINK", } func (e TeamInviteCategory) String() string { @@ -1624,12 +1723,20 @@ func (o TeamInviteName) DeepCopy() TeamInviteName { return o } +type TeamInviteDisplayName string + +func (o TeamInviteDisplayName) DeepCopy() TeamInviteDisplayName { + return o +} + type TeamInvite struct { - Role TeamRole `codec:"role" json:"role"` - Id TeamInviteID `codec:"id" json:"id"` - Type TeamInviteType `codec:"type" json:"type"` - Name TeamInviteName `codec:"name" json:"name"` - Inviter UserVersion `codec:"inviter" json:"inviter"` + Role TeamRole `codec:"role" json:"role"` + Id TeamInviteID `codec:"id" json:"id"` + Type TeamInviteType `codec:"type" json:"type"` + Name TeamInviteName `codec:"name" json:"name"` + Inviter UserVersion `codec:"inviter" json:"inviter"` + MaxUses *TeamInviteMaxUses `codec:"maxUses,omitempty" json:"maxUses,omitempty"` + Etime *UnixTime `codec:"etime,omitempty" json:"etime,omitempty"` } func (o TeamInvite) DeepCopy() TeamInvite { @@ -1639,32 +1746,58 @@ func (o TeamInvite) DeepCopy() TeamInvite { Type: o.Type.DeepCopy(), Name: o.Name.DeepCopy(), Inviter: o.Inviter.DeepCopy(), + MaxUses: (func(x *TeamInviteMaxUses) *TeamInviteMaxUses { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.MaxUses), + Etime: (func(x *UnixTime) *UnixTime { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Etime), } } type AnnotatedTeamInvite struct { - Role TeamRole `codec:"role" json:"role"` - Id TeamInviteID `codec:"id" json:"id"` - Type TeamInviteType `codec:"type" json:"type"` - Name TeamInviteName `codec:"name" json:"name"` - Uv UserVersion `codec:"uv" json:"uv"` - Inviter UserVersion `codec:"inviter" json:"inviter"` - InviterUsername string `codec:"inviterUsername" json:"inviterUsername"` - TeamName string `codec:"teamName" json:"teamName"` - Status TeamMemberStatus `codec:"status" json:"status"` + Invite TeamInvite `codec:"invite" json:"invite"` + DisplayName TeamInviteDisplayName `codec:"displayName" json:"displayName"` + InviterUsername string `codec:"inviterUsername" json:"inviterUsername"` + InviteeUv UserVersion `codec:"inviteeUv" json:"inviteeUv"` + TeamName string `codec:"teamName" json:"teamName"` + Status *TeamMemberStatus `codec:"status,omitempty" json:"status,omitempty"` + UsedInvites []AnnotatedTeamUsedInviteLogPoint `codec:"usedInvites" json:"usedInvites"` } func (o AnnotatedTeamInvite) DeepCopy() AnnotatedTeamInvite { return AnnotatedTeamInvite{ - Role: o.Role.DeepCopy(), - Id: o.Id.DeepCopy(), - Type: o.Type.DeepCopy(), - Name: o.Name.DeepCopy(), - Uv: o.Uv.DeepCopy(), - Inviter: o.Inviter.DeepCopy(), + Invite: o.Invite.DeepCopy(), + DisplayName: o.DisplayName.DeepCopy(), InviterUsername: o.InviterUsername, + InviteeUv: o.InviteeUv.DeepCopy(), TeamName: o.TeamName, - Status: o.Status.DeepCopy(), + Status: (func(x *TeamMemberStatus) *TeamMemberStatus { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Status), + UsedInvites: (func(x []AnnotatedTeamUsedInviteLogPoint) []AnnotatedTeamUsedInviteLogPoint { + if x == nil { + return nil + } + ret := make([]AnnotatedTeamUsedInviteLogPoint, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.UsedInvites), } } @@ -1752,6 +1885,7 @@ type TeamSigChainState struct { StubbedLinks map[Seqno]bool `codec:"stubbedLinks" json:"stubbedLinks"` ActiveInvites map[TeamInviteID]TeamInvite `codec:"activeInvites" json:"activeInvites"` ObsoleteInvites map[TeamInviteID]TeamInvite `codec:"obsoleteInvites" json:"obsoleteInvites"` + UsedInvites map[TeamInviteID][]TeamUsedInviteLogPoint `codec:"usedInvites" json:"usedInvites"` Open bool `codec:"open" json:"open"` OpenTeamJoinAs TeamRole `codec:"openTeamJoinAs" json:"openTeamJoinAs"` Bots map[UserVersion]TeamBotSettings `codec:"bots" json:"bots"` @@ -1897,6 +2031,28 @@ func (o TeamSigChainState) DeepCopy() TeamSigChainState { } return ret })(o.ObsoleteInvites), + UsedInvites: (func(x map[TeamInviteID][]TeamUsedInviteLogPoint) map[TeamInviteID][]TeamUsedInviteLogPoint { + if x == nil { + return nil + } + ret := make(map[TeamInviteID][]TeamUsedInviteLogPoint, len(x)) + for k, v := range x { + kCopy := k.DeepCopy() + vCopy := (func(x []TeamUsedInviteLogPoint) []TeamUsedInviteLogPoint { + if x == nil { + return nil + } + ret := make([]TeamUsedInviteLogPoint, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(v) + ret[kCopy] = vCopy + } + return ret + })(o.UsedInvites), Open: o.Open, OpenTeamJoinAs: o.OpenTeamJoinAs.DeepCopy(), Bots: (func(x map[UserVersion]TeamBotSettings) map[UserVersion]TeamBotSettings { @@ -1986,6 +2142,30 @@ func (o UserLogPoint) DeepCopy() UserLogPoint { } } +type AnnotatedTeamUsedInviteLogPoint struct { + Username string `codec:"username" json:"username"` + TeamUsedInviteLogPoint TeamUsedInviteLogPoint `codec:"teamUsedInviteLogPoint" json:"teamUsedInviteLogPoint"` +} + +func (o AnnotatedTeamUsedInviteLogPoint) DeepCopy() AnnotatedTeamUsedInviteLogPoint { + return AnnotatedTeamUsedInviteLogPoint{ + Username: o.Username, + TeamUsedInviteLogPoint: o.TeamUsedInviteLogPoint.DeepCopy(), + } +} + +type TeamUsedInviteLogPoint struct { + Uv UserVersion `codec:"uv" json:"uv"` + LogPoint int `codec:"logPoint" json:"logPoint"` +} + +func (o TeamUsedInviteLogPoint) DeepCopy() TeamUsedInviteLogPoint { + return TeamUsedInviteLogPoint{ + Uv: o.Uv.DeepCopy(), + LogPoint: o.LogPoint, + } +} + type SubteamLogPoint struct { Name TeamName `codec:"name" json:"name"` Seqno Seqno `codec:"seqno" json:"seqno"` @@ -2101,7 +2281,7 @@ type TeamChangeRow struct { MembershipChanged bool `codec:"membershipChanged" json:"membership_changed"` LatestSeqno Seqno `codec:"latestSeqno" json:"latest_seqno"` LatestHiddenSeqno Seqno `codec:"latestHiddenSeqno" json:"latest_hidden_seqno"` - LatestOffchainSeqno Seqno `codec:"latestOffchainSeqno" json:"latest_offchain_seqno"` + LatestOffchainSeqno Seqno `codec:"latestOffchainSeqno" json:"latest_offchain_version"` ImplicitTeam bool `codec:"implicitTeam" json:"implicit_team"` Misc bool `codec:"misc" json:"misc"` RemovedResetUsers bool `codec:"removedResetUsers" json:"removed_reset_users"` @@ -2230,6 +2410,12 @@ func (o SeitanIKey) DeepCopy() SeitanIKey { return o } +type SeitanIKeyInvitelink string + +func (o SeitanIKeyInvitelink) DeepCopy() SeitanIKeyInvitelink { + return o +} + type SeitanPubKey string func (o SeitanPubKey) DeepCopy() SeitanPubKey { @@ -2245,20 +2431,23 @@ func (o SeitanIKeyV2) DeepCopy() SeitanIKeyV2 { type SeitanKeyAndLabelVersion int const ( - SeitanKeyAndLabelVersion_V1 SeitanKeyAndLabelVersion = 1 - SeitanKeyAndLabelVersion_V2 SeitanKeyAndLabelVersion = 2 + SeitanKeyAndLabelVersion_V1 SeitanKeyAndLabelVersion = 1 + SeitanKeyAndLabelVersion_V2 SeitanKeyAndLabelVersion = 2 + SeitanKeyAndLabelVersion_Invitelink SeitanKeyAndLabelVersion = 3 ) func (o SeitanKeyAndLabelVersion) DeepCopy() SeitanKeyAndLabelVersion { return o } var SeitanKeyAndLabelVersionMap = map[string]SeitanKeyAndLabelVersion{ - "V1": 1, - "V2": 2, + "V1": 1, + "V2": 2, + "Invitelink": 3, } var SeitanKeyAndLabelVersionRevMap = map[SeitanKeyAndLabelVersion]string{ 1: "V1", 2: "V2", + 3: "Invitelink", } func (e SeitanKeyAndLabelVersion) String() string { @@ -2269,9 +2458,10 @@ func (e SeitanKeyAndLabelVersion) String() string { } type SeitanKeyAndLabel struct { - V__ SeitanKeyAndLabelVersion `codec:"v" json:"v"` - V1__ *SeitanKeyAndLabelVersion1 `codec:"v1,omitempty" json:"v1,omitempty"` - V2__ *SeitanKeyAndLabelVersion2 `codec:"v2,omitempty" json:"v2,omitempty"` + V__ SeitanKeyAndLabelVersion `codec:"v" json:"v"` + V1__ *SeitanKeyAndLabelVersion1 `codec:"v1,omitempty" json:"v1,omitempty"` + V2__ *SeitanKeyAndLabelVersion2 `codec:"v2,omitempty" json:"v2,omitempty"` + Invitelink__ *SeitanKeyAndLabelInvitelink `codec:"invitelink,omitempty" json:"invitelink,omitempty"` } func (o *SeitanKeyAndLabel) V() (ret SeitanKeyAndLabelVersion, err error) { @@ -2286,6 +2476,11 @@ func (o *SeitanKeyAndLabel) V() (ret SeitanKeyAndLabelVersion, err error) { err = errors.New("unexpected nil value for V2__") return ret, err } + case SeitanKeyAndLabelVersion_Invitelink: + if o.Invitelink__ == nil { + err = errors.New("unexpected nil value for Invitelink__") + return ret, err + } } return o.V__, nil } @@ -2310,6 +2505,16 @@ func (o SeitanKeyAndLabel) V2() (res SeitanKeyAndLabelVersion2) { return *o.V2__ } +func (o SeitanKeyAndLabel) Invitelink() (res SeitanKeyAndLabelInvitelink) { + if o.V__ != SeitanKeyAndLabelVersion_Invitelink { + panic("wrong case accessed") + } + if o.Invitelink__ == nil { + return + } + return *o.Invitelink__ +} + func NewSeitanKeyAndLabelWithV1(v SeitanKeyAndLabelVersion1) SeitanKeyAndLabel { return SeitanKeyAndLabel{ V__: SeitanKeyAndLabelVersion_V1, @@ -2324,6 +2529,13 @@ func NewSeitanKeyAndLabelWithV2(v SeitanKeyAndLabelVersion2) SeitanKeyAndLabel { } } +func NewSeitanKeyAndLabelWithInvitelink(v SeitanKeyAndLabelInvitelink) SeitanKeyAndLabel { + return SeitanKeyAndLabel{ + V__: SeitanKeyAndLabelVersion_Invitelink, + Invitelink__: &v, + } +} + func NewSeitanKeyAndLabelDefault(v SeitanKeyAndLabelVersion) SeitanKeyAndLabel { return SeitanKeyAndLabel{ V__: v, @@ -2347,6 +2559,13 @@ func (o SeitanKeyAndLabel) DeepCopy() SeitanKeyAndLabel { tmp := (*x).DeepCopy() return &tmp })(o.V2__), + Invitelink__: (func(x *SeitanKeyAndLabelInvitelink) *SeitanKeyAndLabelInvitelink { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Invitelink__), } } @@ -2374,20 +2593,35 @@ func (o SeitanKeyAndLabelVersion2) DeepCopy() SeitanKeyAndLabelVersion2 { } } +type SeitanKeyAndLabelInvitelink struct { + I SeitanIKeyInvitelink `codec:"i" json:"i"` + L SeitanKeyLabel `codec:"l" json:"l"` +} + +func (o SeitanKeyAndLabelInvitelink) DeepCopy() SeitanKeyAndLabelInvitelink { + return SeitanKeyAndLabelInvitelink{ + I: o.I.DeepCopy(), + L: o.L.DeepCopy(), + } +} + type SeitanKeyLabelType int const ( - SeitanKeyLabelType_SMS SeitanKeyLabelType = 1 + SeitanKeyLabelType_SMS SeitanKeyLabelType = 1 + SeitanKeyLabelType_GENERIC SeitanKeyLabelType = 2 ) func (o SeitanKeyLabelType) DeepCopy() SeitanKeyLabelType { return o } var SeitanKeyLabelTypeMap = map[string]SeitanKeyLabelType{ - "SMS": 1, + "SMS": 1, + "GENERIC": 2, } var SeitanKeyLabelTypeRevMap = map[SeitanKeyLabelType]string{ 1: "SMS", + 2: "GENERIC", } func (e SeitanKeyLabelType) String() string { @@ -2398,8 +2632,9 @@ func (e SeitanKeyLabelType) String() string { } type SeitanKeyLabel struct { - T__ SeitanKeyLabelType `codec:"t" json:"t"` - Sms__ *SeitanKeyLabelSms `codec:"sms,omitempty" json:"sms,omitempty"` + T__ SeitanKeyLabelType `codec:"t" json:"t"` + Sms__ *SeitanKeyLabelSms `codec:"sms,omitempty" json:"sms,omitempty"` + Generic__ *SeitanKeyLabelGeneric `codec:"generic,omitempty" json:"generic,omitempty"` } func (o *SeitanKeyLabel) T() (ret SeitanKeyLabelType, err error) { @@ -2409,6 +2644,11 @@ func (o *SeitanKeyLabel) T() (ret SeitanKeyLabelType, err error) { err = errors.New("unexpected nil value for Sms__") return ret, err } + case SeitanKeyLabelType_GENERIC: + if o.Generic__ == nil { + err = errors.New("unexpected nil value for Generic__") + return ret, err + } } return o.T__, nil } @@ -2423,6 +2663,16 @@ func (o SeitanKeyLabel) Sms() (res SeitanKeyLabelSms) { return *o.Sms__ } +func (o SeitanKeyLabel) Generic() (res SeitanKeyLabelGeneric) { + if o.T__ != SeitanKeyLabelType_GENERIC { + panic("wrong case accessed") + } + if o.Generic__ == nil { + return + } + return *o.Generic__ +} + func NewSeitanKeyLabelWithSms(v SeitanKeyLabelSms) SeitanKeyLabel { return SeitanKeyLabel{ T__: SeitanKeyLabelType_SMS, @@ -2430,6 +2680,13 @@ func NewSeitanKeyLabelWithSms(v SeitanKeyLabelSms) SeitanKeyLabel { } } +func NewSeitanKeyLabelWithGeneric(v SeitanKeyLabelGeneric) SeitanKeyLabel { + return SeitanKeyLabel{ + T__: SeitanKeyLabelType_GENERIC, + Generic__: &v, + } +} + func NewSeitanKeyLabelDefault(t SeitanKeyLabelType) SeitanKeyLabel { return SeitanKeyLabel{ T__: t, @@ -2446,6 +2703,13 @@ func (o SeitanKeyLabel) DeepCopy() SeitanKeyLabel { tmp := (*x).DeepCopy() return &tmp })(o.Sms__), + Generic__: (func(x *SeitanKeyLabelGeneric) *SeitanKeyLabelGeneric { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Generic__), } } @@ -2461,6 +2725,16 @@ func (o SeitanKeyLabelSms) DeepCopy() SeitanKeyLabelSms { } } +type SeitanKeyLabelGeneric struct { + L string `codec:"l" json:"l"` +} + +func (o SeitanKeyLabelGeneric) DeepCopy() SeitanKeyLabelGeneric { + return SeitanKeyLabelGeneric{ + L: o.L, + } +} + type TeamSeitanRequest struct { InviteID TeamInviteID `codec:"inviteID" json:"invite_id"` Uid UID `codec:"uid" json:"uid"` @@ -2901,14 +3175,18 @@ func (o TeamAddMembersResult) DeepCopy() TeamAddMembersResult { } type TeamJoinRequest struct { - Name string `codec:"name" json:"name"` - Username string `codec:"username" json:"username"` + Name string `codec:"name" json:"name"` + Username string `codec:"username" json:"username"` + FullName FullName `codec:"fullName" json:"fullName"` + Ctime UnixTime `codec:"ctime" json:"ctime"` } func (o TeamJoinRequest) DeepCopy() TeamJoinRequest { return TeamJoinRequest{ Name: o.Name, Username: o.Username, + FullName: o.FullName.DeepCopy(), + Ctime: o.Ctime.DeepCopy(), } } @@ -3107,15 +3385,15 @@ func (o TeamAndMemberShowcase) DeepCopy() TeamAndMemberShowcase { } type UserRolePair struct { - AssertionOrEmail string `codec:"assertionOrEmail" json:"assertionOrEmail"` - Role TeamRole `codec:"role" json:"role"` - BotSettings *TeamBotSettings `codec:"botSettings,omitempty" json:"botSettings,omitempty"` + Assertion string `codec:"assertion" json:"assertion"` + Role TeamRole `codec:"role" json:"role"` + BotSettings *TeamBotSettings `codec:"botSettings,omitempty" json:"botSettings,omitempty"` } func (o UserRolePair) DeepCopy() UserRolePair { return UserRolePair{ - AssertionOrEmail: o.AssertionOrEmail, - Role: o.Role.DeepCopy(), + Assertion: o.Assertion, + Role: o.Role.DeepCopy(), BotSettings: (func(x *TeamBotSettings) *TeamBotSettings { if x == nil { return nil @@ -3126,36 +3404,92 @@ func (o UserRolePair) DeepCopy() UserRolePair { } } -type BulkRes struct { - Invited []string `codec:"invited" json:"invited"` - AlreadyInvited []string `codec:"alreadyInvited" json:"alreadyInvited"` - Malformed []string `codec:"malformed" json:"malformed"` +type TeamMemberToRemove struct { + Username string `codec:"username" json:"username"` + Email string `codec:"email" json:"email"` + InviteID TeamInviteID `codec:"inviteID" json:"inviteID"` + AllowInaction bool `codec:"allowInaction" json:"allowInaction"` } -func (o BulkRes) DeepCopy() BulkRes { - return BulkRes{ - Invited: (func(x []string) []string { +func (o TeamMemberToRemove) DeepCopy() TeamMemberToRemove { + return TeamMemberToRemove{ + Username: o.Username, + Email: o.Email, + InviteID: o.InviteID.DeepCopy(), + AllowInaction: o.AllowInaction, + } +} + +type TeamRemoveMembersResult struct { + Failures []TeamMemberToRemove `codec:"failures" json:"failures"` +} + +func (o TeamRemoveMembersResult) DeepCopy() TeamRemoveMembersResult { + return TeamRemoveMembersResult{ + Failures: (func(x []TeamMemberToRemove) []TeamMemberToRemove { if x == nil { return nil } - ret := make([]string, len(x)) + ret := make([]TeamMemberToRemove, len(x)) for i, v := range x { - vCopy := v + vCopy := v.DeepCopy() ret[i] = vCopy } return ret - })(o.Invited), - AlreadyInvited: (func(x []string) []string { + })(o.Failures), + } +} + +type TeamEditMembersResult struct { + Failures []UserRolePair `codec:"failures" json:"failures"` +} + +func (o TeamEditMembersResult) DeepCopy() TeamEditMembersResult { + return TeamEditMembersResult{ + Failures: (func(x []UserRolePair) []UserRolePair { if x == nil { return nil } - ret := make([]string, len(x)) + ret := make([]UserRolePair, len(x)) for i, v := range x { - vCopy := v + vCopy := v.DeepCopy() ret[i] = vCopy } return ret - })(o.AlreadyInvited), + })(o.Failures), + } +} + +type UntrustedTeamExistsResult struct { + Exists bool `codec:"exists" json:"exists"` + Status StatusCode `codec:"status" json:"status"` +} + +func (o UntrustedTeamExistsResult) DeepCopy() UntrustedTeamExistsResult { + return UntrustedTeamExistsResult{ + Exists: o.Exists, + Status: o.Status.DeepCopy(), + } +} + +type Invitelink struct { + Ikey SeitanIKeyInvitelink `codec:"ikey" json:"ikey"` + Url string `codec:"url" json:"url"` +} + +func (o Invitelink) DeepCopy() Invitelink { + return Invitelink{ + Ikey: o.Ikey.DeepCopy(), + Url: o.Url, + } +} + +type BulkRes struct { + Malformed []string `codec:"malformed" json:"malformed"` +} + +func (o BulkRes) DeepCopy() BulkRes { + return BulkRes{ Malformed: (func(x []string) []string { if x == nil { return nil @@ -3170,6 +3504,43 @@ func (o BulkRes) DeepCopy() BulkRes { } } +type InviteLinkDetails struct { + InviteID TeamInviteID `codec:"inviteID" json:"inviteID"` + InviterUID UID `codec:"inviterUID" json:"inviterUID"` + InviterUsername string `codec:"inviterUsername" json:"inviterUsername"` + InviterResetOrDel bool `codec:"inviterResetOrDel" json:"inviterResetOrDel"` + TeamID TeamID `codec:"teamID" json:"teamID"` + TeamDesc string `codec:"teamDesc" json:"teamDesc"` + TeamName TeamName `codec:"teamName" json:"teamName"` + TeamNumMembers int `codec:"teamNumMembers" json:"teamNumMembers"` + TeamAvatars map[AvatarFormat]AvatarUrl `codec:"teamAvatars" json:"teamAvatars"` +} + +func (o InviteLinkDetails) DeepCopy() InviteLinkDetails { + return InviteLinkDetails{ + InviteID: o.InviteID.DeepCopy(), + InviterUID: o.InviterUID.DeepCopy(), + InviterUsername: o.InviterUsername, + InviterResetOrDel: o.InviterResetOrDel, + TeamID: o.TeamID.DeepCopy(), + TeamDesc: o.TeamDesc, + TeamName: o.TeamName.DeepCopy(), + TeamNumMembers: o.TeamNumMembers, + TeamAvatars: (func(x map[AvatarFormat]AvatarUrl) map[AvatarFormat]AvatarUrl { + if x == nil { + return nil + } + ret := make(map[AvatarFormat]AvatarUrl, len(x)) + for k, v := range x { + kCopy := k.DeepCopy() + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.TeamAvatars), + } +} + type ImplicitTeamUserSet struct { KeybaseUsers []string `codec:"keybaseUsers" json:"keybaseUsers"` UnresolvedUsers []SocialAssertion `codec:"unresolvedUsers" json:"unresolvedUsers"` @@ -3486,7 +3857,6 @@ type AnnotatedTeam struct { Members []AnnotatedTeamMemberDetails `codec:"members" json:"members"` Invites []AnnotatedTeamInvite `codec:"invites" json:"invites"` JoinRequests []TeamJoinRequest `codec:"joinRequests" json:"joinRequests"` - UserIsShowcasing bool `codec:"userIsShowcasing" json:"userIsShowcasing"` TarsDisabled bool `codec:"tarsDisabled" json:"tarsDisabled"` Settings TeamSettings `codec:"settings" json:"settings"` Showcase TeamShowcase `codec:"showcase" json:"showcase"` @@ -3530,9 +3900,156 @@ func (o AnnotatedTeam) DeepCopy() AnnotatedTeam { } return ret })(o.JoinRequests), - UserIsShowcasing: o.UserIsShowcasing, - TarsDisabled: o.TarsDisabled, - Settings: o.Settings.DeepCopy(), - Showcase: o.Showcase.DeepCopy(), + TarsDisabled: o.TarsDisabled, + Settings: o.Settings.DeepCopy(), + Showcase: o.Showcase.DeepCopy(), + } +} + +type AnnotatedSubteamMemberDetails struct { + TeamName TeamName `codec:"teamName" json:"teamName"` + TeamID TeamID `codec:"teamID" json:"teamID"` + Details TeamMemberDetails `codec:"details" json:"details"` + Role TeamRole `codec:"role" json:"role"` +} + +func (o AnnotatedSubteamMemberDetails) DeepCopy() AnnotatedSubteamMemberDetails { + return AnnotatedSubteamMemberDetails{ + TeamName: o.TeamName.DeepCopy(), + TeamID: o.TeamID.DeepCopy(), + Details: o.Details.DeepCopy(), + Role: o.Role.DeepCopy(), + } +} + +type TeamTreeMembershipValue struct { + Role TeamRole `codec:"role" json:"role"` + JoinTime *Time `codec:"joinTime,omitempty" json:"joinTime,omitempty"` +} + +func (o TeamTreeMembershipValue) DeepCopy() TeamTreeMembershipValue { + return TeamTreeMembershipValue{ + Role: o.Role.DeepCopy(), + JoinTime: (func(x *Time) *Time { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.JoinTime), + } +} + +type TeamTreeMembershipStatus int + +const ( + TeamTreeMembershipStatus_OK TeamTreeMembershipStatus = 0 + TeamTreeMembershipStatus_ERROR TeamTreeMembershipStatus = 1 +) + +func (o TeamTreeMembershipStatus) DeepCopy() TeamTreeMembershipStatus { return o } + +var TeamTreeMembershipStatusMap = map[string]TeamTreeMembershipStatus{ + "OK": 0, + "ERROR": 1, +} + +var TeamTreeMembershipStatusRevMap = map[TeamTreeMembershipStatus]string{ + 0: "OK", + 1: "ERROR", +} + +func (e TeamTreeMembershipStatus) String() string { + if v, ok := TeamTreeMembershipStatusRevMap[e]; ok { + return v + } + return fmt.Sprintf("%v", int(e)) +} + +type TeamTreeMembershipResult struct { + S__ TeamTreeMembershipStatus `codec:"s" json:"s"` + Ok__ *TeamTreeMembershipValue `codec:"ok,omitempty" json:"ok,omitempty"` + Error__ *GenericError `codec:"error,omitempty" json:"error,omitempty"` +} + +func (o *TeamTreeMembershipResult) S() (ret TeamTreeMembershipStatus, err error) { + switch o.S__ { + case TeamTreeMembershipStatus_OK: + if o.Ok__ == nil { + err = errors.New("unexpected nil value for Ok__") + return ret, err + } + case TeamTreeMembershipStatus_ERROR: + if o.Error__ == nil { + err = errors.New("unexpected nil value for Error__") + return ret, err + } + } + return o.S__, nil +} + +func (o TeamTreeMembershipResult) Ok() (res TeamTreeMembershipValue) { + if o.S__ != TeamTreeMembershipStatus_OK { + panic("wrong case accessed") + } + if o.Ok__ == nil { + return + } + return *o.Ok__ +} + +func (o TeamTreeMembershipResult) Error() (res GenericError) { + if o.S__ != TeamTreeMembershipStatus_ERROR { + panic("wrong case accessed") + } + if o.Error__ == nil { + return + } + return *o.Error__ +} + +func NewTeamTreeMembershipResultWithOk(v TeamTreeMembershipValue) TeamTreeMembershipResult { + return TeamTreeMembershipResult{ + S__: TeamTreeMembershipStatus_OK, + Ok__: &v, + } +} + +func NewTeamTreeMembershipResultWithError(v GenericError) TeamTreeMembershipResult { + return TeamTreeMembershipResult{ + S__: TeamTreeMembershipStatus_ERROR, + Error__: &v, + } +} + +func (o TeamTreeMembershipResult) DeepCopy() TeamTreeMembershipResult { + return TeamTreeMembershipResult{ + S__: o.S__.DeepCopy(), + Ok__: (func(x *TeamTreeMembershipValue) *TeamTreeMembershipValue { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Ok__), + Error__: (func(x *GenericError) *GenericError { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.Error__), + } +} + +type TeamTreeMembership struct { + TeamName TeamName `codec:"teamName" json:"teamName"` + Result TeamTreeMembershipResult `codec:"result" json:"result"` +} + +func (o TeamTreeMembership) DeepCopy() TeamTreeMembership { + return TeamTreeMembership{ + TeamName: o.TeamName.DeepCopy(), + Result: o.Result.DeepCopy(), } } diff --git a/types/keybase1/teamsearch.go b/types/keybase1/teamsearch.go index a9d6415..4c49829 100644 --- a/types/keybase1/teamsearch.go +++ b/types/keybase1/teamsearch.go @@ -4,13 +4,13 @@ package keybase1 type TeamSearchItem struct { - Id TeamID `codec:"id" json:"id"` - Name string `codec:"name" json:"name"` - Description *string `codec:"description,omitempty" json:"description,omitempty"` - MemberCount int `codec:"memberCount" json:"memberCount"` - LastActive Time `codec:"lastActive" json:"lastActive"` - InTeam bool `codec:"inTeam" json:"inTeam"` - PublicAdmins []string `codec:"publicAdmins" json:"publicAdmins"` + Id TeamID `codec:"id" json:"id"` + Name string `codec:"name" json:"name"` + Description *string `codec:"description,omitempty" json:"description,omitempty"` + MemberCount int `codec:"memberCount" json:"memberCount"` + LastActive Time `codec:"lastActive" json:"lastActive"` + IsDemoted bool `codec:"isDemoted" json:"isDemoted"` + InTeam bool `codec:"inTeam" json:"inTeam"` } func (o TeamSearchItem) DeepCopy() TeamSearchItem { @@ -26,18 +26,41 @@ func (o TeamSearchItem) DeepCopy() TeamSearchItem { })(o.Description), MemberCount: o.MemberCount, LastActive: o.LastActive.DeepCopy(), + IsDemoted: o.IsDemoted, InTeam: o.InTeam, - PublicAdmins: (func(x []string) []string { + } +} + +type TeamSearchExport struct { + Items map[TeamID]TeamSearchItem `codec:"items" json:"items"` + Suggested []TeamID `codec:"suggested" json:"suggested"` +} + +func (o TeamSearchExport) DeepCopy() TeamSearchExport { + return TeamSearchExport{ + Items: (func(x map[TeamID]TeamSearchItem) map[TeamID]TeamSearchItem { + if x == nil { + return nil + } + ret := make(map[TeamID]TeamSearchItem, len(x)) + for k, v := range x { + kCopy := k.DeepCopy() + vCopy := v.DeepCopy() + ret[kCopy] = vCopy + } + return ret + })(o.Items), + Suggested: (func(x []TeamID) []TeamID { if x == nil { return nil } - ret := make([]string, len(x)) + ret := make([]TeamID, len(x)) for i, v := range x { - vCopy := v + vCopy := v.DeepCopy() ret[i] = vCopy } return ret - })(o.PublicAdmins), + })(o.Suggested), } } diff --git a/types/keybase1/upk.go b/types/keybase1/upk.go index 3148b11..2d773e9 100644 --- a/types/keybase1/upk.go +++ b/types/keybase1/upk.go @@ -165,7 +165,7 @@ type PublicKeyV2NaCl struct { Parent *KID `codec:"parent,omitempty" json:"parent,omitempty"` DeviceID DeviceID `codec:"deviceID" json:"deviceID"` DeviceDescription string `codec:"deviceDescription" json:"deviceDescription"` - DeviceType string `codec:"deviceType" json:"deviceType"` + DeviceType DeviceTypeV2 `codec:"deviceType" json:"deviceType"` } func (o PublicKeyV2NaCl) DeepCopy() PublicKeyV2NaCl { @@ -180,7 +180,7 @@ func (o PublicKeyV2NaCl) DeepCopy() PublicKeyV2NaCl { })(o.Parent), DeviceID: o.DeviceID.DeepCopy(), DeviceDescription: o.DeviceDescription, - DeviceType: o.DeviceType, + DeviceType: o.DeviceType.DeepCopy(), } } diff --git a/types/keybase1/user.go b/types/keybase1/user.go index 47b3ab9..04fb95e 100644 --- a/types/keybase1/user.go +++ b/types/keybase1/user.go @@ -88,28 +88,48 @@ func (o Proofs) DeepCopy() Proofs { } type UserSummary struct { - Uid UID `codec:"uid" json:"uid"` - Username string `codec:"username" json:"username"` - Thumbnail string `codec:"thumbnail" json:"thumbnail"` - IdVersion int `codec:"idVersion" json:"idVersion"` - FullName string `codec:"fullName" json:"fullName"` - Bio string `codec:"bio" json:"bio"` - Proofs Proofs `codec:"proofs" json:"proofs"` - SigIDDisplay string `codec:"sigIDDisplay" json:"sigIDDisplay"` - TrackTime Time `codec:"trackTime" json:"trackTime"` + Uid UID `codec:"uid" json:"uid"` + Username string `codec:"username" json:"username"` + FullName string `codec:"fullName" json:"fullName"` + LinkID *LinkID `codec:"linkID,omitempty" json:"linkID,omitempty"` } func (o UserSummary) DeepCopy() UserSummary { return UserSummary{ - Uid: o.Uid.DeepCopy(), - Username: o.Username, - Thumbnail: o.Thumbnail, - IdVersion: o.IdVersion, - FullName: o.FullName, - Bio: o.Bio, - Proofs: o.Proofs.DeepCopy(), - SigIDDisplay: o.SigIDDisplay, - TrackTime: o.TrackTime.DeepCopy(), + Uid: o.Uid.DeepCopy(), + Username: o.Username, + FullName: o.FullName, + LinkID: (func(x *LinkID) *LinkID { + if x == nil { + return nil + } + tmp := (*x).DeepCopy() + return &tmp + })(o.LinkID), + } +} + +type UserSummarySet struct { + Users []UserSummary `codec:"users" json:"users"` + Time Time `codec:"time" json:"time"` + Version int `codec:"version" json:"version"` +} + +func (o UserSummarySet) DeepCopy() UserSummarySet { + return UserSummarySet{ + Users: (func(x []UserSummary) []UserSummary { + if x == nil { + return nil + } + ret := make([]UserSummary, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.Users), + Time: o.Time.DeepCopy(), + Version: o.Version, } } @@ -169,50 +189,6 @@ func (o UserSettings) DeepCopy() UserSettings { } } -type UserSummary2 struct { - Uid UID `codec:"uid" json:"uid"` - Username string `codec:"username" json:"username"` - Thumbnail string `codec:"thumbnail" json:"thumbnail"` - FullName string `codec:"fullName" json:"fullName"` - IsFollower bool `codec:"isFollower" json:"isFollower"` - IsFollowee bool `codec:"isFollowee" json:"isFollowee"` -} - -func (o UserSummary2) DeepCopy() UserSummary2 { - return UserSummary2{ - Uid: o.Uid.DeepCopy(), - Username: o.Username, - Thumbnail: o.Thumbnail, - FullName: o.FullName, - IsFollower: o.IsFollower, - IsFollowee: o.IsFollowee, - } -} - -type UserSummary2Set struct { - Users []UserSummary2 `codec:"users" json:"users"` - Time Time `codec:"time" json:"time"` - Version int `codec:"version" json:"version"` -} - -func (o UserSummary2Set) DeepCopy() UserSummary2Set { - return UserSummary2Set{ - Users: (func(x []UserSummary2) []UserSummary2 { - if x == nil { - return nil - } - ret := make([]UserSummary2, len(x)) - for i, v := range x { - vCopy := v.DeepCopy() - ret[i] = vCopy - } - return ret - })(o.Users), - Time: o.Time.DeepCopy(), - Version: o.Version, - } -} - type InterestingPerson struct { Uid UID `codec:"uid" json:"uid"` Username string `codec:"username" json:"username"` @@ -263,15 +239,16 @@ func (o ProofSuggestionsRes) DeepCopy() ProofSuggestionsRes { } type ProofSuggestion struct { - Key string `codec:"key" json:"key"` - BelowFold bool `codec:"belowFold" json:"belowFold"` - ProfileText string `codec:"profileText" json:"profileText"` - ProfileIcon []SizedImage `codec:"profileIcon" json:"profileIcon"` - ProfileIconWhite []SizedImage `codec:"profileIconWhite" json:"profileIconWhite"` - PickerText string `codec:"pickerText" json:"pickerText"` - PickerSubtext string `codec:"pickerSubtext" json:"pickerSubtext"` - PickerIcon []SizedImage `codec:"pickerIcon" json:"pickerIcon"` - Metas []Identify3RowMeta `codec:"metas" json:"metas"` + Key string `codec:"key" json:"key"` + BelowFold bool `codec:"belowFold" json:"belowFold"` + ProfileText string `codec:"profileText" json:"profileText"` + ProfileIcon []SizedImage `codec:"profileIcon" json:"profileIcon"` + ProfileIconDarkmode []SizedImage `codec:"profileIconDarkmode" json:"profileIconDarkmode"` + PickerText string `codec:"pickerText" json:"pickerText"` + PickerSubtext string `codec:"pickerSubtext" json:"pickerSubtext"` + PickerIcon []SizedImage `codec:"pickerIcon" json:"pickerIcon"` + PickerIconDarkmode []SizedImage `codec:"pickerIconDarkmode" json:"pickerIconDarkmode"` + Metas []Identify3RowMeta `codec:"metas" json:"metas"` } func (o ProofSuggestion) DeepCopy() ProofSuggestion { @@ -290,7 +267,7 @@ func (o ProofSuggestion) DeepCopy() ProofSuggestion { } return ret })(o.ProfileIcon), - ProfileIconWhite: (func(x []SizedImage) []SizedImage { + ProfileIconDarkmode: (func(x []SizedImage) []SizedImage { if x == nil { return nil } @@ -300,7 +277,7 @@ func (o ProofSuggestion) DeepCopy() ProofSuggestion { ret[i] = vCopy } return ret - })(o.ProfileIconWhite), + })(o.ProfileIconDarkmode), PickerText: o.PickerText, PickerSubtext: o.PickerSubtext, PickerIcon: (func(x []SizedImage) []SizedImage { @@ -314,6 +291,17 @@ func (o ProofSuggestion) DeepCopy() ProofSuggestion { } return ret })(o.PickerIcon), + PickerIconDarkmode: (func(x []SizedImage) []SizedImage { + if x == nil { + return nil + } + ret := make([]SizedImage, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.PickerIconDarkmode), Metas: (func(x []Identify3RowMeta) []Identify3RowMeta { if x == nil { return nil diff --git a/types/keybase1/usersearch.go b/types/keybase1/usersearch.go index 3c66adf..9341314 100644 --- a/types/keybase1/usersearch.go +++ b/types/keybase1/usersearch.go @@ -167,15 +167,16 @@ func (o APIUserSearchResult) DeepCopy() APIUserSearchResult { } type NonUserDetails struct { - IsNonUser bool `codec:"isNonUser" json:"isNonUser"` - AssertionValue string `codec:"assertionValue" json:"assertionValue"` - AssertionKey string `codec:"assertionKey" json:"assertionKey"` - Description string `codec:"description" json:"description"` - Contact *ProcessedContact `codec:"contact,omitempty" json:"contact,omitempty"` - Service *APIUserServiceResult `codec:"service,omitempty" json:"service,omitempty"` - SiteIcon []SizedImage `codec:"siteIcon" json:"siteIcon"` - SiteIconFull []SizedImage `codec:"siteIconFull" json:"siteIconFull"` - SiteIconWhite []SizedImage `codec:"siteIconWhite" json:"siteIconWhite"` + IsNonUser bool `codec:"isNonUser" json:"isNonUser"` + AssertionValue string `codec:"assertionValue" json:"assertionValue"` + AssertionKey string `codec:"assertionKey" json:"assertionKey"` + Description string `codec:"description" json:"description"` + Contact *ProcessedContact `codec:"contact,omitempty" json:"contact,omitempty"` + Service *APIUserServiceResult `codec:"service,omitempty" json:"service,omitempty"` + SiteIcon []SizedImage `codec:"siteIcon" json:"siteIcon"` + SiteIconDarkmode []SizedImage `codec:"siteIconDarkmode" json:"siteIconDarkmode"` + SiteIconFull []SizedImage `codec:"siteIconFull" json:"siteIconFull"` + SiteIconFullDarkmode []SizedImage `codec:"siteIconFullDarkmode" json:"siteIconFullDarkmode"` } func (o NonUserDetails) DeepCopy() NonUserDetails { @@ -209,6 +210,17 @@ func (o NonUserDetails) DeepCopy() NonUserDetails { } return ret })(o.SiteIcon), + SiteIconDarkmode: (func(x []SizedImage) []SizedImage { + if x == nil { + return nil + } + ret := make([]SizedImage, len(x)) + for i, v := range x { + vCopy := v.DeepCopy() + ret[i] = vCopy + } + return ret + })(o.SiteIconDarkmode), SiteIconFull: (func(x []SizedImage) []SizedImage { if x == nil { return nil @@ -220,7 +232,7 @@ func (o NonUserDetails) DeepCopy() NonUserDetails { } return ret })(o.SiteIconFull), - SiteIconWhite: (func(x []SizedImage) []SizedImage { + SiteIconFullDarkmode: (func(x []SizedImage) []SizedImage { if x == nil { return nil } @@ -230,6 +242,28 @@ func (o NonUserDetails) DeepCopy() NonUserDetails { ret[i] = vCopy } return ret - })(o.SiteIconWhite), + })(o.SiteIconFullDarkmode), + } +} + +type EmailOrPhoneNumberSearchResult struct { + Input string `codec:"input" json:"input"` + Assertion string `codec:"assertion" json:"assertion"` + AssertionValue string `codec:"assertionValue" json:"assertionValue"` + AssertionKey string `codec:"assertionKey" json:"assertionKey"` + FoundUser bool `codec:"foundUser" json:"foundUser"` + Username string `codec:"username" json:"username"` + FullName string `codec:"fullName" json:"fullName"` +} + +func (o EmailOrPhoneNumberSearchResult) DeepCopy() EmailOrPhoneNumberSearchResult { + return EmailOrPhoneNumberSearchResult{ + Input: o.Input, + Assertion: o.Assertion, + AssertionValue: o.AssertionValue, + AssertionKey: o.AssertionKey, + FoundUser: o.FoundUser, + Username: o.Username, + FullName: o.FullName, } } diff --git a/types/stellar1/common.go b/types/stellar1/common.go index 533fb2e..2793237 100644 --- a/types/stellar1/common.go +++ b/types/stellar1/common.go @@ -85,6 +85,7 @@ type Asset struct { AuthEndpoint string `codec:"authEndpoint" json:"authEndpoint"` DepositReqAuth bool `codec:"depositReqAuth" json:"depositReqAuth"` WithdrawReqAuth bool `codec:"withdrawReqAuth" json:"withdrawReqAuth"` + UseSep24 bool `codec:"useSep24" json:"useSep24"` } func (o Asset) DeepCopy() Asset { @@ -106,6 +107,7 @@ func (o Asset) DeepCopy() Asset { AuthEndpoint: o.AuthEndpoint, DepositReqAuth: o.DepositReqAuth, WithdrawReqAuth: o.WithdrawReqAuth, + UseSep24: o.UseSep24, } }