From c3a4c27985a9946bcaab643221038ea97d2380e7 Mon Sep 17 00:00:00 2001 From: Song Gao Date: Tue, 6 Dec 2016 10:31:44 -0800 Subject: [PATCH] Revert "fix avdl names for chat since it's not released yet" --- go/chat/inboxsource.go | 2 +- go/chat/sender_test.go | 12 +++--- go/client/chat_cli_fetchers.go | 2 +- go/kbtest/chat.go | 10 ++--- go/protocol/chat1/common.go | 2 +- go/protocol/chat1/extras.go | 4 +- go/protocol/chat1/gregor.go | 12 +++--- go/protocol/chat1/local.go | 38 ++++++++--------- go/protocol/chat1/notify.go | 4 +- go/protocol/chat1/remote.go | 10 ++--- go/protocol/keybase1/tlf.go | 4 +- go/protocol/keybase1/tlf_keys.go | 8 ++-- go/service/chat_local.go | 10 ++--- protocol/avdl/chat1/common.avdl | 17 ++++---- protocol/avdl/chat1/gregor.avdl | 18 +++++--- protocol/avdl/chat1/local.avdl | 39 +++++++++++------ protocol/avdl/chat1/notify.avdl | 3 +- protocol/avdl/chat1/remote.avdl | 9 ++-- protocol/avdl/keybase1/tlf.avdl | 3 +- protocol/avdl/keybase1/tlf_keys.avdl | 12 ++++-- protocol/js/flow-types-chat.js | 48 ++++++++++----------- protocol/js/flow-types.js | 10 ++--- protocol/json/chat1/common.json | 3 +- protocol/json/chat1/gregor.json | 18 +++++--- protocol/json/chat1/local.json | 51 ++++++++++++++--------- protocol/json/chat1/notify.json | 5 ++- protocol/json/chat1/remote.json | 15 ++++--- protocol/json/keybase1/tlf.json | 5 ++- protocol/json/keybase1/tlf_keys.json | 12 ++++-- shared/constants/types/flow-types-chat.js | 48 ++++++++++----------- shared/constants/types/flow-types.js | 10 ++--- 31 files changed, 251 insertions(+), 193 deletions(-) diff --git a/go/chat/inboxsource.go b/go/chat/inboxsource.go index 962501d58392..8511d07314b5 100644 --- a/go/chat/inboxsource.go +++ b/go/chat/inboxsource.go @@ -85,7 +85,7 @@ func (s *RemoteInboxSource) Read(ctx context.Context, uid gregor1.UID, } // The *rquery.TlfID is trusted source of TLF ID here since it's derived // from the TLF name in the query. - if !signedTlfID.Eq(*rquery.TlfID) || !signedTlfID.Eq(convLocal.Info.Triple.TlfID) { + if !signedTlfID.Eq(*rquery.TlfID) || !signedTlfID.Eq(convLocal.Info.Triple.Tlfid) { return Inbox{}, ib.RateLimit, errors.New("server returned conversations for different TLF than query") } } diff --git a/go/chat/sender_test.go b/go/chat/sender_test.go index 5be2a56a68dc..680918e6ccab 100644 --- a/go/chat/sender_test.go +++ b/go/chat/sender_test.go @@ -98,11 +98,11 @@ func TestNonblockChannel(t *testing.T) { res, err := ri.NewConversationRemote2(context.TODO(), chat1.NewConversationRemote2Arg{ IdTriple: chat1.ConversationIDTriple{ - TlfID: []byte{4, 5, 6}, + Tlfid: []byte{4, 5, 6}, TopicType: 0, TopicID: []byte{0}, }, - TlfMessage: chat1.MessageBoxed{ + TLFMessage: chat1.MessageBoxed{ ClientHeader: chat1.MessageClientHeader{ TlfName: u.Username, TlfPublic: false, @@ -165,11 +165,11 @@ func TestNonblockTimer(t *testing.T) { res, err := ri.NewConversationRemote2(context.TODO(), chat1.NewConversationRemote2Arg{ IdTriple: chat1.ConversationIDTriple{ - TlfID: []byte{4, 5, 6}, + Tlfid: []byte{4, 5, 6}, TopicType: 0, TopicID: []byte{0}, }, - TlfMessage: chat1.MessageBoxed{ + TLFMessage: chat1.MessageBoxed{ ClientHeader: chat1.MessageClientHeader{ TlfName: u.Username, TlfPublic: false, @@ -296,11 +296,11 @@ func TestFailing(t *testing.T) { res, err := ri.NewConversationRemote2(context.TODO(), chat1.NewConversationRemote2Arg{ IdTriple: chat1.ConversationIDTriple{ - TlfID: []byte{4, 5, 6}, + Tlfid: []byte{4, 5, 6}, TopicType: 0, TopicID: []byte{0}, }, - TlfMessage: chat1.MessageBoxed{ + TLFMessage: chat1.MessageBoxed{ ClientHeader: chat1.MessageClientHeader{ TlfName: u.Username, TlfPublic: false, diff --git a/go/client/chat_cli_fetchers.go b/go/client/chat_cli_fetchers.go index 412ab348f10c..d4b540175764 100644 --- a/go/client/chat_cli_fetchers.go +++ b/go/client/chat_cli_fetchers.go @@ -44,7 +44,7 @@ func (f chatCLIConversationFetcher) fetch(ctx context.Context, g *libkb.GlobalCo if conversationInfo == nil { return chat1.ConversationLocal{}, nil, nil } - f.query.ConversationID = conversationInfo.Id + f.query.ConversationId = conversationInfo.Id gcfclres, err := chatClient.GetConversationForCLILocal(ctx, f.query) if err != nil { diff --git a/go/kbtest/chat.go b/go/kbtest/chat.go index 76f1f978e6f5..63cdff6ff9d3 100644 --- a/go/kbtest/chat.go +++ b/go/kbtest/chat.go @@ -195,7 +195,7 @@ func (m *ChatRemoteMock) GetInboxRemote(ctx context.Context, arg chat1.GetInboxR if arg.Query.ConvID != nil && !conv.Metadata.ConversationID.Eq(*arg.Query.ConvID) { continue } - if arg.Query.TlfID != nil && !conv.Metadata.IdTriple.TlfID.Eq(*arg.Query.TlfID) { + if arg.Query.TlfID != nil && !conv.Metadata.IdTriple.Tlfid.Eq(*arg.Query.TlfID) { continue } if arg.Query.TopicType != nil && conv.Metadata.IdTriple.TopicType != *arg.Query.TopicType { @@ -230,7 +230,7 @@ func (m *ChatRemoteMock) GetInboxRemote(ctx context.Context, arg chat1.GetInboxR func (m *ChatRemoteMock) GetInboxByTLFIDRemote(ctx context.Context, tlfID chat1.TLFID) (res chat1.GetInboxByTLFIDRemoteRes, err error) { for _, conv := range m.world.conversations { - if tlfID.Eq(conv.Metadata.IdTriple.TlfID) { + if tlfID.Eq(conv.Metadata.IdTriple.Tlfid) { convToAppend := *conv convToAppend.ReaderInfo = m.makeReaderInfo(convToAppend.Metadata.ConversationID) res.Convs = []chat1.Conversation{convToAppend} @@ -325,14 +325,14 @@ func (m *ChatRemoteMock) NewConversationRemote(ctx context.Context, arg chat1.Co func (m *ChatRemoteMock) NewConversationRemote2(ctx context.Context, arg chat1.NewConversationRemote2Arg) (res chat1.NewConversationRemoteRes, err error) { for _, conv := range m.world.conversations { - if conv.Metadata.IdTriple.TlfID.Eq(arg.IdTriple.TlfID) && + if conv.Metadata.IdTriple.Tlfid.Eq(arg.IdTriple.Tlfid) && conv.Metadata.IdTriple.TopicID.String() == arg.IdTriple.TopicID.String() && conv.Metadata.IdTriple.TopicType == arg.IdTriple.TopicType { // Identical triple return res, libkb.ChatConvExistsError{ConvID: conv.Metadata.ConversationID} } if arg.IdTriple.TopicType == chat1.TopicType_CHAT && - conv.Metadata.IdTriple.TlfID.Eq(arg.IdTriple.TlfID) && + conv.Metadata.IdTriple.Tlfid.Eq(arg.IdTriple.Tlfid) && conv.Metadata.IdTriple.TopicType == arg.IdTriple.TopicType { // Existing CHAT conv return res, libkb.ChatConvExistsError{ConvID: conv.Metadata.ConversationID} @@ -341,7 +341,7 @@ func (m *ChatRemoteMock) NewConversationRemote2(ctx context.Context, arg chat1.N res.ConvID = arg.IdTriple.ToConversationID([2]byte{0, 0}) - first := m.insertMsgAndSort(res.ConvID, arg.TlfMessage) + first := m.insertMsgAndSort(res.ConvID, arg.TLFMessage) m.world.conversations = append(m.world.conversations, &chat1.Conversation{ Metadata: chat1.ConversationMetadata{ IdTriple: arg.IdTriple, diff --git a/go/protocol/chat1/common.go b/go/protocol/chat1/common.go index 0203f075f758..0aa3b5f78188 100644 --- a/go/protocol/chat1/common.go +++ b/go/protocol/chat1/common.go @@ -144,7 +144,7 @@ type GetInboxQuery struct { } type ConversationIDTriple struct { - TlfID TLFID `codec:"tlfID" json:"tlfID"` + Tlfid TLFID `codec:"tlfid" json:"tlfid"` TopicType TopicType `codec:"topicType" json:"topicType"` TopicID TopicID `codec:"topicID" json:"topicID"` } diff --git a/go/protocol/chat1/extras.go b/go/protocol/chat1/extras.go index e2b4ae318d82..c4431086ec04 100644 --- a/go/protocol/chat1/extras.go +++ b/go/protocol/chat1/extras.go @@ -102,7 +102,7 @@ func (t TopicID) String() string { } func (me ConversationIDTriple) Eq(other ConversationIDTriple) bool { - return me.TlfID.Eq(other.TlfID) && + return me.Tlfid.Eq(other.Tlfid) && bytes.Equal([]byte(me.TopicID), []byte(other.TopicID)) && me.TopicType == other.TopicType } @@ -170,7 +170,7 @@ var ConversationStatusGregorRevMap = map[string]ConversationStatus{ func (t ConversationIDTriple) Hash() []byte { h := sha256.New() - h.Write(t.TlfID) + h.Write(t.Tlfid) h.Write(t.TopicID) h.Write([]byte(strconv.Itoa(int(t.TopicType)))) hash := h.Sum(nil) diff --git a/go/protocol/chat1/gregor.go b/go/protocol/chat1/gregor.go index 56c3d555bfdb..991da7b8323a 100644 --- a/go/protocol/chat1/gregor.go +++ b/go/protocol/chat1/gregor.go @@ -8,18 +8,18 @@ import ( ) type GenericPayload struct { - Action string `codec:"action" json:"action"` + Action string `codec:"Action" json:"Action"` } type NewConversationPayload struct { - Action string `codec:"action" json:"action"` + Action string `codec:"Action" json:"Action"` ConvID ConversationID `codec:"convID" json:"convID"` InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"` UnreadUpdate *UnreadUpdate `codec:"unreadUpdate,omitempty" json:"unreadUpdate,omitempty"` } type NewMessagePayload struct { - Action string `codec:"action" json:"action"` + Action string `codec:"Action" json:"Action"` ConvID ConversationID `codec:"convID" json:"convID"` Message MessageBoxed `codec:"message" json:"message"` InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"` @@ -27,7 +27,7 @@ type NewMessagePayload struct { } type ReadMessagePayload struct { - Action string `codec:"action" json:"action"` + Action string `codec:"Action" json:"Action"` ConvID ConversationID `codec:"convID" json:"convID"` MsgID MessageID `codec:"msgID" json:"msgID"` InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"` @@ -35,7 +35,7 @@ type ReadMessagePayload struct { } type SetStatusPayload struct { - Action string `codec:"action" json:"action"` + Action string `codec:"Action" json:"Action"` ConvID ConversationID `codec:"convID" json:"convID"` Status ConversationStatus `codec:"status" json:"status"` InboxVers InboxVers `codec:"inboxVers" json:"inboxVers"` @@ -44,7 +44,7 @@ type SetStatusPayload struct { type UnreadUpdate struct { ConvID ConversationID `codec:"convID" json:"convID"` - UnreadMessages int `codec:"unreadMessages" json:"unreadMessages"` + UnreadMessages int `codec:"UnreadMessages" json:"UnreadMessages"` } type GregorInterface interface { diff --git a/go/protocol/chat1/local.go b/go/protocol/chat1/local.go index 6545ac8b999d..146fe55d56b5 100644 --- a/go/protocol/chat1/local.go +++ b/go/protocol/chat1/local.go @@ -278,7 +278,7 @@ type OutboxRecord struct { State OutboxState `codec:"state" json:"state"` OutboxID OutboxID `codec:"outboxID" json:"outboxID"` ConvID ConversationID `codec:"convID" json:"convID"` - Msg MessagePlaintext `codec:"msg" json:"msg"` + Msg MessagePlaintext `codec:"Msg" json:"Msg"` } type HeaderPlaintextVersion int @@ -516,9 +516,9 @@ func NewMessageUnboxedWithOutbox(v OutboxRecord) MessageUnboxed { } type UnreadFirstNumLimit struct { - NumRead int `codec:"numRead" json:"numRead"` - AtLeast int `codec:"atLeast" json:"atLeast"` - AtMost int `codec:"atMost" json:"atMost"` + NumRead int `codec:"NumRead" json:"NumRead"` + AtLeast int `codec:"AtLeast" json:"AtLeast"` + AtMost int `codec:"AtMost" json:"AtMost"` } type ConversationInfoLocal struct { @@ -624,10 +624,10 @@ type GetInboxSummaryForCLILocalRes struct { type GetConversationForCLILocalQuery struct { MarkAsRead bool `codec:"markAsRead" json:"markAsRead"` - MessageTypes []MessageType `codec:"messageTypes" json:"messageTypes"` - Since *string `codec:"since,omitempty" json:"since,omitempty"` + MessageTypes []MessageType `codec:"MessageTypes" json:"MessageTypes"` + Since *string `codec:"Since,omitempty" json:"Since,omitempty"` Limit UnreadFirstNumLimit `codec:"limit" json:"limit"` - ConversationID ConversationID `codec:"conversationID" json:"conversationID"` + ConversationId ConversationID `codec:"conversationId" json:"conversationId"` } type GetConversationForCLILocalRes struct { @@ -875,7 +875,7 @@ func LocalProtocol(i LocalInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "setConversationStatusLocal": { + "SetConversationStatusLocal": { MakeArg: func() interface{} { ret := make([]SetConversationStatusLocalArg, 1) return &ret @@ -939,7 +939,7 @@ func LocalProtocol(i LocalInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "getMessagesLocal": { + "GetMessagesLocal": { MakeArg: func() interface{} { ret := make([]GetMessagesLocalArg, 1) return &ret @@ -987,7 +987,7 @@ func LocalProtocol(i LocalInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "downloadAttachmentLocal": { + "DownloadAttachmentLocal": { MakeArg: func() interface{} { ret := make([]DownloadAttachmentLocalArg, 1) return &ret @@ -1003,7 +1003,7 @@ func LocalProtocol(i LocalInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "downloadFileAttachmentLocal": { + "DownloadFileAttachmentLocal": { MakeArg: func() interface{} { ret := make([]DownloadFileAttachmentLocalArg, 1) return &ret @@ -1019,7 +1019,7 @@ func LocalProtocol(i LocalInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "cancelPost": { + "CancelPost": { MakeArg: func() interface{} { ret := make([]CancelPostArg, 1) return &ret @@ -1035,7 +1035,7 @@ func LocalProtocol(i LocalInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "retryPost": { + "RetryPost": { MakeArg: func() interface{} { ret := make([]RetryPostArg, 1) return &ret @@ -1101,7 +1101,7 @@ func (c LocalClient) PostLocalNonblock(ctx context.Context, __arg PostLocalNonbl } func (c LocalClient) SetConversationStatusLocal(ctx context.Context, __arg SetConversationStatusLocalArg) (res SetConversationStatusLocalRes, err error) { - err = c.Cli.Call(ctx, "chat.1.local.setConversationStatusLocal", []interface{}{__arg}, &res) + err = c.Cli.Call(ctx, "chat.1.local.SetConversationStatusLocal", []interface{}{__arg}, &res) return } @@ -1123,7 +1123,7 @@ func (c LocalClient) GetConversationForCLILocal(ctx context.Context, query GetCo } func (c LocalClient) GetMessagesLocal(ctx context.Context, __arg GetMessagesLocalArg) (res GetMessagesLocalRes, err error) { - err = c.Cli.Call(ctx, "chat.1.local.getMessagesLocal", []interface{}{__arg}, &res) + err = c.Cli.Call(ctx, "chat.1.local.GetMessagesLocal", []interface{}{__arg}, &res) return } @@ -1138,24 +1138,24 @@ func (c LocalClient) PostFileAttachmentLocal(ctx context.Context, __arg PostFile } func (c LocalClient) DownloadAttachmentLocal(ctx context.Context, __arg DownloadAttachmentLocalArg) (res DownloadAttachmentLocalRes, err error) { - err = c.Cli.Call(ctx, "chat.1.local.downloadAttachmentLocal", []interface{}{__arg}, &res) + err = c.Cli.Call(ctx, "chat.1.local.DownloadAttachmentLocal", []interface{}{__arg}, &res) return } func (c LocalClient) DownloadFileAttachmentLocal(ctx context.Context, __arg DownloadFileAttachmentLocalArg) (res DownloadAttachmentLocalRes, err error) { - err = c.Cli.Call(ctx, "chat.1.local.downloadFileAttachmentLocal", []interface{}{__arg}, &res) + err = c.Cli.Call(ctx, "chat.1.local.DownloadFileAttachmentLocal", []interface{}{__arg}, &res) return } func (c LocalClient) CancelPost(ctx context.Context, outboxID OutboxID) (err error) { __arg := CancelPostArg{OutboxID: outboxID} - err = c.Cli.Call(ctx, "chat.1.local.cancelPost", []interface{}{__arg}, nil) + err = c.Cli.Call(ctx, "chat.1.local.CancelPost", []interface{}{__arg}, nil) return } func (c LocalClient) RetryPost(ctx context.Context, outboxID OutboxID) (err error) { __arg := RetryPostArg{OutboxID: outboxID} - err = c.Cli.Call(ctx, "chat.1.local.retryPost", []interface{}{__arg}, nil) + err = c.Cli.Call(ctx, "chat.1.local.RetryPost", []interface{}{__arg}, nil) return } diff --git a/go/protocol/chat1/notify.go b/go/protocol/chat1/notify.go index 9734a86f4eaf..d130b24a4214 100644 --- a/go/protocol/chat1/notify.go +++ b/go/protocol/chat1/notify.go @@ -206,7 +206,7 @@ func NotifyChatProtocol(i NotifyChatInterface) rpc.Protocol { return rpc.Protocol{ Name: "chat.1.NotifyChat", Methods: map[string]rpc.ServeHandlerDescription{ - "newChatActivity": { + "NewChatActivity": { MakeArg: func() interface{} { ret := make([]NewChatActivityArg, 1) return &ret @@ -231,6 +231,6 @@ type NotifyChatClient struct { } func (c NotifyChatClient) NewChatActivity(ctx context.Context, __arg NewChatActivityArg) (err error) { - err = c.Cli.Notify(ctx, "chat.1.NotifyChat.newChatActivity", []interface{}{__arg}) + err = c.Cli.Notify(ctx, "chat.1.NotifyChat.NewChatActivity", []interface{}{__arg}) return } diff --git a/go/protocol/chat1/remote.go b/go/protocol/chat1/remote.go index 57989cc4a6f2..0e7305868c18 100644 --- a/go/protocol/chat1/remote.go +++ b/go/protocol/chat1/remote.go @@ -103,7 +103,7 @@ type NewConversationRemoteArg struct { type NewConversationRemote2Arg struct { IdTriple ConversationIDTriple `codec:"idTriple" json:"idTriple"` - TlfMessage MessageBoxed `codec:"tlfMessage" json:"tlfMessage"` + TLFMessage MessageBoxed `codec:"TLFMessage" json:"TLFMessage"` } type GetMessagesRemoteArg struct { @@ -269,7 +269,7 @@ func RemoteProtocol(i RemoteInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "setConversationStatus": { + "SetConversationStatus": { MakeArg: func() interface{} { ret := make([]SetConversationStatusArg, 1) return &ret @@ -301,7 +301,7 @@ func RemoteProtocol(i RemoteInterface) rpc.Protocol { }, MethodType: rpc.MethodCall, }, - "getUnreadUpdateFull": { + "GetUnreadUpdateFull": { MakeArg: func() interface{} { ret := make([]GetUnreadUpdateFullArg, 1) return &ret @@ -394,7 +394,7 @@ func (c RemoteClient) MarkAsRead(ctx context.Context, __arg MarkAsReadArg) (res } func (c RemoteClient) SetConversationStatus(ctx context.Context, __arg SetConversationStatusArg) (res SetConversationStatusRes, err error) { - err = c.Cli.Call(ctx, "chat.1.remote.setConversationStatus", []interface{}{__arg}, &res) + err = c.Cli.Call(ctx, "chat.1.remote.SetConversationStatus", []interface{}{__arg}, &res) return } @@ -406,7 +406,7 @@ func (c RemoteClient) TlfFinalize(ctx context.Context, tlfID TLFID) (err error) func (c RemoteClient) GetUnreadUpdateFull(ctx context.Context, inboxVers InboxVers) (res UnreadUpdateFull, err error) { __arg := GetUnreadUpdateFullArg{InboxVers: inboxVers} - err = c.Cli.Call(ctx, "chat.1.remote.getUnreadUpdateFull", []interface{}{__arg}, &res) + err = c.Cli.Call(ctx, "chat.1.remote.GetUnreadUpdateFull", []interface{}{__arg}, &res) return } diff --git a/go/protocol/keybase1/tlf.go b/go/protocol/keybase1/tlf.go index 5ac70dc8fb75..b52bc93c2891 100644 --- a/go/protocol/keybase1/tlf.go +++ b/go/protocol/keybase1/tlf.go @@ -33,7 +33,7 @@ func TlfProtocol(i TlfInterface) rpc.Protocol { return rpc.Protocol{ Name: "keybase.1.tlf", Methods: map[string]rpc.ServeHandlerDescription{ - "cryptKeys": { + "CryptKeys": { MakeArg: func() interface{} { ret := make([]CryptKeysArg, 1) return &ret @@ -92,7 +92,7 @@ type TlfClient struct { // CryptKeys returns TLF crypt keys from all generations. func (c TlfClient) CryptKeys(ctx context.Context, query TLFQuery) (res GetTLFCryptKeysRes, err error) { __arg := CryptKeysArg{Query: query} - err = c.Cli.Call(ctx, "keybase.1.tlf.cryptKeys", []interface{}{__arg}, &res) + err = c.Cli.Call(ctx, "keybase.1.tlf.CryptKeys", []interface{}{__arg}, &res) return } diff --git a/go/protocol/keybase1/tlf_keys.go b/go/protocol/keybase1/tlf_keys.go index c230dcf67f05..3d79929f0b5a 100644 --- a/go/protocol/keybase1/tlf_keys.go +++ b/go/protocol/keybase1/tlf_keys.go @@ -30,8 +30,8 @@ var TLFIdentifyBehaviorRevMap = map[TLFIdentifyBehavior]string{ type CanonicalTlfName string type CryptKey struct { - KeyGeneration int `codec:"keyGeneration" json:"keyGeneration"` - Key Bytes32 `codec:"key" json:"key"` + KeyGeneration int `codec:"KeyGeneration" json:"KeyGeneration"` + Key Bytes32 `codec:"Key" json:"Key"` } type TLFBreak struct { @@ -45,7 +45,7 @@ type TLFIdentifyFailure struct { type GetTLFCryptKeysRes struct { NameIDBreaks CanonicalTLFNameAndIDWithBreaks `codec:"nameIDBreaks" json:"nameIDBreaks"` - CryptKeys []CryptKey `codec:"cryptKeys" json:"cryptKeys"` + CryptKeys []CryptKey `codec:"CryptKeys" json:"CryptKeys"` } type TLFQuery struct { @@ -55,7 +55,7 @@ type TLFQuery struct { type CanonicalTLFNameAndIDWithBreaks struct { TlfID TLFID `codec:"tlfID" json:"tlfID"` - CanonicalName CanonicalTlfName `codec:"canonicalName" json:"canonicalName"` + CanonicalName CanonicalTlfName `codec:"CanonicalName" json:"CanonicalName"` Breaks TLFBreak `codec:"breaks" json:"breaks"` } diff --git a/go/service/chat_local.go b/go/service/chat_local.go index b425c5b3840d..d45a75ee07a5 100644 --- a/go/service/chat_local.go +++ b/go/service/chat_local.go @@ -189,7 +189,7 @@ func (h *chatLocalHandler) NewConversationLocal(ctx context.Context, arg chat1.N } triple := chat1.ConversationIDTriple{ - TlfID: tlfID, + Tlfid: tlfID, TopicType: arg.TopicType, TopicID: make(chat1.TopicID, 16), } @@ -209,7 +209,7 @@ func (h *chatLocalHandler) NewConversationLocal(ctx context.Context, arg chat1.N var ncrres chat1.NewConversationRemoteRes ncrres, reserr = h.remoteClient().NewConversationRemote2(ctx, chat1.NewConversationRemote2Arg{ IdTriple: triple, - TlfMessage: *firstMessageBoxed, + TLFMessage: *firstMessageBoxed, }) if ncrres.RateLimit != nil { res.RateLimits = append(res.RateLimits, *ncrres.RateLimit) @@ -413,12 +413,12 @@ func (h *chatLocalHandler) GetConversationForCLILocal(ctx context.Context, arg c ibres, err := h.GetInboxAndUnboxLocal(ctx, chat1.GetInboxAndUnboxLocalArg{ Query: &chat1.GetInboxLocalQuery{ - ConvID: &arg.ConversationID, + ConvID: &arg.ConversationId, }, IdentifyBehavior: keybase1.TLFIdentifyBehavior_CHAT_CLI, }) if err != nil { - return chat1.GetConversationForCLILocalRes{}, fmt.Errorf("getting conversation %v error: %v", arg.ConversationID, err) + return chat1.GetConversationForCLILocalRes{}, fmt.Errorf("getting conversation %v error: %v", arg.ConversationId, err) } rlimits = append(rlimits, ibres.RateLimits...) if len(ibres.Conversations) != 1 { @@ -444,7 +444,7 @@ func (h *chatLocalHandler) GetConversationForCLILocal(ctx context.Context, arg c } tv, err := h.GetThreadLocal(ctx, chat1.GetThreadLocalArg{ - ConversationID: arg.ConversationID, + ConversationID: arg.ConversationId, Query: &query, IdentifyBehavior: keybase1.TLFIdentifyBehavior_CHAT_CLI, }) diff --git a/protocol/avdl/chat1/common.avdl b/protocol/avdl/chat1/common.avdl index 239b5e7ba1b2..5546c76d0d0e 100644 --- a/protocol/avdl/chat1/common.avdl +++ b/protocol/avdl/chat1/common.avdl @@ -3,14 +3,14 @@ protocol common { import idl "github.com/keybase/client/go/protocol/gregor1" as gregor1; - @typedef("bytes") record ThreadID {} - @typedef("uint") @lint("ignore") record MessageID {} - @typedef("bytes") record TopicID {} - @typedef("bytes") record ConversationID {} - @typedef("bytes") record TLFID {} - @typedef("bytes") record Hash {} + @typedef("bytes") record ThreadID {} + @typedef("uint") @lint("ignore") record MessageID {} + @typedef("bytes") record TopicID {} + @typedef("bytes") record ConversationID {} + @typedef("bytes") record TLFID {} + @typedef("bytes") record Hash {} @typedef("uint64") @lint("ignore") record InboxVers {} - @typedef("bytes") record OutboxID {} + @typedef("bytes") record OutboxID {} enum MessageType { NONE_0, @@ -87,7 +87,8 @@ protocol common { } record ConversationIDTriple { - TLFID tlfID; + @lint("ignore") + TLFID tlfid; TopicType topicType; TopicID topicID; } diff --git a/protocol/avdl/chat1/gregor.avdl b/protocol/avdl/chat1/gregor.avdl index 1cbaf38ba8c4..8bf61a5eeff5 100644 --- a/protocol/avdl/chat1/gregor.avdl +++ b/protocol/avdl/chat1/gregor.avdl @@ -2,18 +2,21 @@ protocol gregor { record GenericPayload { - string action; + @lint("ignore") + string Action; } record NewConversationPayload { - string action; + @lint("ignore") + string Action; ConversationID convID; InboxVers inboxVers; union { null, UnreadUpdate } unreadUpdate; } record NewMessagePayload { - string action; + @lint("ignore") + string Action; ConversationID convID; MessageBoxed message; InboxVers inboxVers; @@ -21,7 +24,8 @@ protocol gregor { } record ReadMessagePayload { - string action; + @lint("ignore") + string Action; ConversationID convID; MessageID msgID; InboxVers inboxVers; @@ -29,7 +33,8 @@ protocol gregor { } record SetStatusPayload { - string action; + @lint("ignore") + string Action; ConversationID convID; ConversationStatus status; InboxVers inboxVers; @@ -40,7 +45,8 @@ protocol gregor { ConversationID convID; // The count of unread messages to display // Counts only visible types of messages deserving of a badge, no EDITs - int unreadMessages; + @lint("ignore") + int UnreadMessages; } } diff --git a/protocol/avdl/chat1/local.avdl b/protocol/avdl/chat1/local.avdl index 1f760b59e296..f748496e5386 100644 --- a/protocol/avdl/chat1/local.avdl +++ b/protocol/avdl/chat1/local.avdl @@ -70,7 +70,8 @@ protocol local { OutboxState state; OutboxID outboxID; ConversationID convID; - MessagePlaintext msg; + @lint("ignore") + MessagePlaintext Msg; } enum HeaderPlaintextVersion { @@ -163,10 +164,13 @@ protocol local { // By definition, one could use a same non-zero number for both AtLeast and // AtMost to precisely control the number of items returned. record UnreadFirstNumLimit { - int numRead; + @lint("ignore") + int NumRead; - int atLeast; - int atMost; + @lint("ignore") + int AtLeast; + @lint("ignore") + int AtMost; } record ConversationInfoLocal { @@ -267,7 +271,8 @@ protocol local { array identifyFailures; } - SetConversationStatusLocalRes setConversationStatusLocal(ConversationID conversationID, ConversationStatus status, keybase1.TLFIdentifyBehavior identifyBehavior); + @lint("ignore") + SetConversationStatusLocalRes SetConversationStatusLocal(ConversationID conversationID, ConversationStatus status, keybase1.TLFIdentifyBehavior identifyBehavior); record SetConversationStatusLocalRes { array rateLimits; array identifyFailures; @@ -304,13 +309,16 @@ protocol local { GetConversationForCLILocalRes getConversationForCLILocal(GetConversationForCLILocalQuery query); record GetConversationForCLILocalQuery { boolean markAsRead; - array messageTypes; + @lint("ignore") + array MessageTypes; - union { null, string } since; + @lint("ignore") + union { null, string } Since; UnreadFirstNumLimit limit; - ConversationID conversationID; + @lint("ignore") + ConversationID conversationId; } record GetConversationForCLILocalRes { ConversationLocal conversation; @@ -319,7 +327,8 @@ protocol local { } // Get messages by ID. - GetMessagesLocalRes getMessagesLocal(ConversationID conversationID, array messageIDs, keybase1.TLFIdentifyBehavior identifyBehavior); + @lint("ignore") + GetMessagesLocalRes GetMessagesLocal(ConversationID conversationID, array messageIDs, keybase1.TLFIdentifyBehavior identifyBehavior); record GetMessagesLocalRes { array messages; array rateLimits; @@ -351,14 +360,18 @@ protocol local { } // Download an attachment from a message into sink stream. - DownloadAttachmentLocalRes downloadAttachmentLocal(int sessionID, ConversationID conversationID, MessageID messageID, keybase1.Stream sink, boolean preview, keybase1.TLFIdentifyBehavior identifyBehavior); + @lint("ignore") + DownloadAttachmentLocalRes DownloadAttachmentLocal(int sessionID, ConversationID conversationID, MessageID messageID, keybase1.Stream sink, boolean preview, keybase1.TLFIdentifyBehavior identifyBehavior); // Download an attachment from a message into a local file. // Filename must be writable by the service. - DownloadAttachmentLocalRes downloadFileAttachmentLocal(int sessionID, ConversationID conversationID, MessageID messageID, string filename, boolean preview, keybase1.TLFIdentifyBehavior identifyBehavior); + @lint("ignore") + DownloadAttachmentLocalRes DownloadFileAttachmentLocal(int sessionID, ConversationID conversationID, MessageID messageID, string filename, boolean preview, keybase1.TLFIdentifyBehavior identifyBehavior); - void cancelPost(OutboxID outboxID); - void retryPost(OutboxID outboxID); + @lint("ignore") + void CancelPost(OutboxID outboxID); + @lint("ignore") + void RetryPost(OutboxID outboxID); MarkAsReadRes markAsReadLocal(int sessionID, ConversationID conversationID, MessageID msgID); diff --git a/protocol/avdl/chat1/notify.avdl b/protocol/avdl/chat1/notify.avdl index d19fcbc19303..e1a84df786e1 100644 --- a/protocol/avdl/chat1/notify.avdl +++ b/protocol/avdl/chat1/notify.avdl @@ -51,5 +51,6 @@ protocol NotifyChat { } @notify("") - void newChatActivity(keybase1.UID uid, ChatActivity activity); + @lint("ignore") + void NewChatActivity(keybase1.UID uid, ChatActivity activity); } diff --git a/protocol/avdl/chat1/remote.avdl b/protocol/avdl/chat1/remote.avdl index 124f67bff0e8..97bb093bcb4d 100644 --- a/protocol/avdl/chat1/remote.avdl +++ b/protocol/avdl/chat1/remote.avdl @@ -71,19 +71,22 @@ protocol remote { NewConversationRemoteRes newConversationRemote(ConversationIDTriple idTriple); // on duplication of idTriple, and error is returned and the conversation ID of the existing conversation is returned. - NewConversationRemoteRes newConversationRemote2(ConversationIDTriple idTriple, MessageBoxed tlfMessage); + @lint("ignore") + NewConversationRemoteRes newConversationRemote2(ConversationIDTriple idTriple, MessageBoxed TLFMessage); GetMessagesRemoteRes getMessagesRemote(ConversationID conversationID, array messageIDs); MarkAsReadRes markAsRead(ConversationID conversationID, MessageID msgID); - SetConversationStatusRes setConversationStatus(ConversationID conversationID, ConversationStatus status); + @lint("ignore") + SetConversationStatusRes SetConversationStatus(ConversationID conversationID, ConversationStatus status); // tlfFinalize is an endpoint for kbfstlfd to notify Gregor that a TLF ID has been finalized. // Gregor keeps an internal record of these TLF IDs, so that it can always return the latest // conversation per TLF ID on GetInboxRemote. void tlfFinalize(TLFID tlfID); - UnreadUpdateFull getUnreadUpdateFull(InboxVers inboxVers); + @lint("ignore") + UnreadUpdateFull GetUnreadUpdateFull(InboxVers inboxVers); // The full set of updates of all convs in a single user's inbox record UnreadUpdateFull { // Set if this update should be ignored because the requester was already up to date diff --git a/protocol/avdl/keybase1/tlf.avdl b/protocol/avdl/keybase1/tlf.avdl index 49bf2f3a98cb..356bfb33b3c0 100644 --- a/protocol/avdl/keybase1/tlf.avdl +++ b/protocol/avdl/keybase1/tlf.avdl @@ -7,7 +7,8 @@ protocol tlf { /** CryptKeys returns TLF crypt keys from all generations. */ - GetTLFCryptKeysRes cryptKeys(TLFQuery query); + @lint("ignore") + GetTLFCryptKeysRes CryptKeys(TLFQuery query); /** * tlfCanonicalID returns the canonical name and TLFID for tlfName. diff --git a/protocol/avdl/keybase1/tlf_keys.avdl b/protocol/avdl/keybase1/tlf_keys.avdl index 41b278665a25..b906a8009972 100644 --- a/protocol/avdl/keybase1/tlf_keys.avdl +++ b/protocol/avdl/keybase1/tlf_keys.avdl @@ -17,8 +17,10 @@ protocol tlfKeys { record CanonicalTlfName {} record CryptKey { - int keyGeneration; - Bytes32 key; + @lint("ignore") + int KeyGeneration; + @lint("ignore") + Bytes32 Key; } record TLFBreak { @@ -35,7 +37,8 @@ protocol tlfKeys { // crypt keys of all generations for this TLF, in order, starting from // FirstValidKeyGen - array cryptKeys; + @lint("ignore") + array CryptKeys; } record TLFQuery { @@ -51,7 +54,8 @@ protocol tlfKeys { record CanonicalTLFNameAndIDWithBreaks { TLFID tlfID; - CanonicalTlfName canonicalName; + @lint("ignore") + CanonicalTlfName CanonicalName; TLFBreak breaks; } diff --git a/protocol/js/flow-types-chat.js b/protocol/js/flow-types-chat.js index b7ceca509f4e..c6725edbc342 100644 --- a/protocol/js/flow-types-chat.js +++ b/protocol/js/flow-types-chat.js @@ -116,7 +116,7 @@ export const NotifyChatChatActivityType = { } export function localCancelPostRpc (request: Exact) { - engineRpcOutgoing({...request, method: 'chat.1.local.cancelPost'}) + engineRpcOutgoing({...request, method: 'chat.1.local.CancelPost'}) } export function localCancelPostRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact): ChannelMap<*> { @@ -128,7 +128,7 @@ export function localCancelPostRpcPromise (request: $Exact void} & {param: localDownloadAttachmentLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.downloadAttachmentLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.DownloadAttachmentLocal'}) } export function localDownloadAttachmentLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localDownloadAttachmentLocalRpcParam}>): ChannelMap<*> { @@ -140,7 +140,7 @@ export function localDownloadAttachmentLocalRpcPromise (request: $Exact void} & {param: localDownloadFileAttachmentLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.downloadFileAttachmentLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.DownloadFileAttachmentLocal'}) } export function localDownloadFileAttachmentLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localDownloadFileAttachmentLocalRpcParam}>): ChannelMap<*> { @@ -200,7 +200,7 @@ export function localGetInboxSummaryForCLILocalRpcPromise (request: $Exact void} & {param: localGetMessagesLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.getMessagesLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.GetMessagesLocal'}) } export function localGetMessagesLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localGetMessagesLocalRpcParam}>): ChannelMap<*> { @@ -296,7 +296,7 @@ export function localPostLocalRpcPromise (request: $Exact) { - engineRpcOutgoing({...request, method: 'chat.1.local.retryPost'}) + engineRpcOutgoing({...request, method: 'chat.1.local.RetryPost'}) } export function localRetryPostRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact): ChannelMap<*> { @@ -308,7 +308,7 @@ export function localRetryPostRpcPromise (request: $Exact void} & {param: localSetConversationStatusLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.setConversationStatusLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.SetConversationStatusLocal'}) } export function localSetConversationStatusLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localSetConversationStatusLocalRpcParam}>): ChannelMap<*> { @@ -368,7 +368,7 @@ export function remoteGetThreadRemoteRpcPromise (request: $Exact void} & {param: remoteGetUnreadUpdateFullRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.remote.getUnreadUpdateFull'}) + engineRpcOutgoing({...request, method: 'chat.1.remote.GetUnreadUpdateFull'}) } export function remoteGetUnreadUpdateFullRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: remoteGetUnreadUpdateFullRpcParam}>): ChannelMap<*> { @@ -440,7 +440,7 @@ export function remoteS3SignRpcPromise (request: $Exact void} & {param: remoteSetConversationStatusRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.remote.setConversationStatus'}) + engineRpcOutgoing({...request, method: 'chat.1.remote.SetConversationStatus'}) } export function remoteSetConversationStatusRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: remoteSetConversationStatusRpcParam}>): ChannelMap<*> { @@ -514,7 +514,7 @@ export type Conversation = { export type ConversationID = bytes export type ConversationIDTriple = { - tlfID: TLFID, + tlfid: TLFID, topicType: TopicType, topicID: TopicID, } @@ -572,15 +572,15 @@ export type FailedMessageInfo = { } export type GenericPayload = { - action: string, + Action: string, } export type GetConversationForCLILocalQuery = { markAsRead: boolean, - messageTypes?: ?Array, - since?: ?string, + MessageTypes?: ?Array, + Since?: ?string, limit: UnreadFirstNumLimit, - conversationID: ConversationID, + conversationId: ConversationID, } export type GetConversationForCLILocalRes = { @@ -877,7 +877,7 @@ export type NewConversationLocalRes = { } export type NewConversationPayload = { - action: string, + Action: string, convID: ConversationID, inboxVers: InboxVers, unreadUpdate?: ?UnreadUpdate, @@ -889,7 +889,7 @@ export type NewConversationRemoteRes = { } export type NewMessagePayload = { - action: string, + Action: string, convID: ConversationID, message: MessageBoxed, inboxVers: InboxVers, @@ -912,7 +912,7 @@ export type OutboxRecord = { state: OutboxState, outboxID: OutboxID, convID: ConversationID, - msg: MessagePlaintext, + Msg: MessagePlaintext, } export type OutboxState = @@ -959,7 +959,7 @@ export type ReadMessageInfo = { } export type ReadMessagePayload = { - action: string, + Action: string, convID: ConversationID, msgID: MessageID, inboxVers: InboxVers, @@ -991,7 +991,7 @@ export type SetStatusInfo = { } export type SetStatusPayload = { - action: string, + Action: string, convID: ConversationID, status: ConversationStatus, inboxVers: InboxVers, @@ -1031,14 +1031,14 @@ export type TopicType = | 2 // DEV_2 export type UnreadFirstNumLimit = { - numRead: int, - atLeast: int, - atMost: int, + NumRead: int, + AtLeast: int, + AtMost: int, } export type UnreadUpdate = { convID: ConversationID, - unreadMessages: int, + UnreadMessages: int, } export type UnreadUpdateFull = { @@ -1198,7 +1198,7 @@ export type remoteMarkAsReadRpcParam = Exact<{ export type remoteNewConversationRemote2RpcParam = Exact<{ idTriple: ConversationIDTriple, - tlfMessage: MessageBoxed + TLFMessage: MessageBoxed }> export type remoteNewConversationRemoteRpcParam = Exact<{ @@ -1359,7 +1359,7 @@ export type incomingCallMapType = Exact<{ }>, response: CommonResponseHandler ) => void, - 'keybase.1.NotifyChat.newChatActivity'?: ( + 'keybase.1.NotifyChat.NewChatActivity'?: ( params: Exact<{ uid: keybase1.UID, activity: ChatActivity diff --git a/protocol/js/flow-types.js b/protocol/js/flow-types.js index 210b212289bb..1d0585c561eb 100644 --- a/protocol/js/flow-types.js +++ b/protocol/js/flow-types.js @@ -2339,7 +2339,7 @@ export function tlfCompleteAndCanonicalizePrivateTlfNameRpcPromise (request: $Ex } export function tlfCryptKeysRpc (request: Exact void} & {param: tlfCryptKeysRpcParam}>) { - engineRpcOutgoing({...request, method: 'keybase.1.tlf.cryptKeys'}) + engineRpcOutgoing({...request, method: 'keybase.1.tlf.CryptKeys'}) } export function tlfCryptKeysRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: tlfCryptKeysRpcParam}>): ChannelMap<*> { @@ -2693,7 +2693,7 @@ export type Bytes32 = any export type CanonicalTLFNameAndIDWithBreaks = { tlfID: TLFID, - canonicalName: CanonicalTlfName, + CanonicalName: CanonicalTlfName, breaks: TLFBreak, } @@ -2786,8 +2786,8 @@ export type ConfirmResult = { } export type CryptKey = { - keyGeneration: int, - key: Bytes32, + KeyGeneration: int, + Key: Bytes32, } export type Cryptocurrency = { @@ -3064,7 +3064,7 @@ export type GetPassphraseRes = { export type GetTLFCryptKeysRes = { nameIDBreaks: CanonicalTLFNameAndIDWithBreaks, - cryptKeys?: ?Array, + CryptKeys?: ?Array, } export type HasServerKeysRes = { diff --git a/protocol/json/chat1/common.json b/protocol/json/chat1/common.json index 585726712338..215c59adb5fb 100644 --- a/protocol/json/chat1/common.json +++ b/protocol/json/chat1/common.json @@ -224,7 +224,8 @@ "fields": [ { "type": "TLFID", - "name": "tlfID" + "name": "tlfid", + "lint": "ignore" }, { "type": "TopicType", diff --git a/protocol/json/chat1/gregor.json b/protocol/json/chat1/gregor.json index 2fc62a8a46af..b7dfd2459e13 100644 --- a/protocol/json/chat1/gregor.json +++ b/protocol/json/chat1/gregor.json @@ -8,7 +8,8 @@ "fields": [ { "type": "string", - "name": "action" + "name": "Action", + "lint": "ignore" } ] }, @@ -18,7 +19,8 @@ "fields": [ { "type": "string", - "name": "action" + "name": "Action", + "lint": "ignore" }, { "type": "ConversationID", @@ -43,7 +45,8 @@ "fields": [ { "type": "string", - "name": "action" + "name": "Action", + "lint": "ignore" }, { "type": "ConversationID", @@ -72,7 +75,8 @@ "fields": [ { "type": "string", - "name": "action" + "name": "Action", + "lint": "ignore" }, { "type": "ConversationID", @@ -101,7 +105,8 @@ "fields": [ { "type": "string", - "name": "action" + "name": "Action", + "lint": "ignore" }, { "type": "ConversationID", @@ -134,7 +139,8 @@ }, { "type": "int", - "name": "unreadMessages" + "name": "UnreadMessages", + "lint": "ignore" } ] } diff --git a/protocol/json/chat1/local.json b/protocol/json/chat1/local.json index 2fcbb7f4fb7f..d53bdf5fbafa 100644 --- a/protocol/json/chat1/local.json +++ b/protocol/json/chat1/local.json @@ -251,7 +251,8 @@ }, { "type": "MessagePlaintext", - "name": "msg" + "name": "Msg", + "lint": "ignore" } ] }, @@ -498,15 +499,18 @@ "fields": [ { "type": "int", - "name": "numRead" + "name": "NumRead", + "lint": "ignore" }, { "type": "int", - "name": "atLeast" + "name": "AtLeast", + "lint": "ignore" }, { "type": "int", - "name": "atMost" + "name": "AtMost", + "lint": "ignore" } ] }, @@ -957,14 +961,16 @@ "type": "array", "items": "MessageType" }, - "name": "messageTypes" + "name": "MessageTypes", + "lint": "ignore" }, { "type": [ null, "string" ], - "name": "since" + "name": "Since", + "lint": "ignore" }, { "type": "UnreadFirstNumLimit", @@ -972,7 +978,8 @@ }, { "type": "ConversationID", - "name": "conversationID" + "name": "conversationId", + "lint": "ignore" } ] }, @@ -1188,7 +1195,7 @@ ], "response": "PostLocalNonblockRes" }, - "setConversationStatusLocal": { + "SetConversationStatusLocal": { "request": [ { "name": "conversationID", @@ -1203,7 +1210,8 @@ "type": "keybase1.TLFIdentifyBehavior" } ], - "response": "SetConversationStatusLocalRes" + "response": "SetConversationStatusLocalRes", + "lint": "ignore" }, "newConversationLocal": { "request": [ @@ -1251,7 +1259,7 @@ ], "response": "GetConversationForCLILocalRes" }, - "getMessagesLocal": { + "GetMessagesLocal": { "request": [ { "name": "conversationID", @@ -1269,7 +1277,8 @@ "type": "keybase1.TLFIdentifyBehavior" } ], - "response": "GetMessagesLocalRes" + "response": "GetMessagesLocalRes", + "lint": "ignore" }, "postAttachmentLocal": { "request": [ @@ -1351,7 +1360,7 @@ ], "response": "PostLocalRes" }, - "downloadAttachmentLocal": { + "DownloadAttachmentLocal": { "request": [ { "name": "sessionID", @@ -1378,9 +1387,10 @@ "type": "keybase1.TLFIdentifyBehavior" } ], - "response": "DownloadAttachmentLocalRes" + "response": "DownloadAttachmentLocalRes", + "lint": "ignore" }, - "downloadFileAttachmentLocal": { + "DownloadFileAttachmentLocal": { "request": [ { "name": "sessionID", @@ -1407,25 +1417,28 @@ "type": "keybase1.TLFIdentifyBehavior" } ], - "response": "DownloadAttachmentLocalRes" + "response": "DownloadAttachmentLocalRes", + "lint": "ignore" }, - "cancelPost": { + "CancelPost": { "request": [ { "name": "outboxID", "type": "OutboxID" } ], - "response": null + "response": null, + "lint": "ignore" }, - "retryPost": { + "RetryPost": { "request": [ { "name": "outboxID", "type": "OutboxID" } ], - "response": null + "response": null, + "lint": "ignore" }, "markAsReadLocal": { "request": [ diff --git a/protocol/json/chat1/notify.json b/protocol/json/chat1/notify.json index dcd7c4fe155c..408abe79e620 100644 --- a/protocol/json/chat1/notify.json +++ b/protocol/json/chat1/notify.json @@ -150,7 +150,7 @@ } ], "messages": { - "newChatActivity": { + "NewChatActivity": { "request": [ { "name": "uid", @@ -162,7 +162,8 @@ } ], "response": null, - "notify": "" + "notify": "", + "lint": "ignore" } }, "namespace": "chat.1" diff --git a/protocol/json/chat1/remote.json b/protocol/json/chat1/remote.json index 7720b52a1d55..79fbc9163aee 100644 --- a/protocol/json/chat1/remote.json +++ b/protocol/json/chat1/remote.json @@ -334,11 +334,12 @@ "type": "ConversationIDTriple" }, { - "name": "tlfMessage", + "name": "TLFMessage", "type": "MessageBoxed" } ], - "response": "NewConversationRemoteRes" + "response": "NewConversationRemoteRes", + "lint": "ignore" }, "getMessagesRemote": { "request": [ @@ -369,7 +370,7 @@ ], "response": "MarkAsReadRes" }, - "setConversationStatus": { + "SetConversationStatus": { "request": [ { "name": "conversationID", @@ -380,7 +381,8 @@ "type": "ConversationStatus" } ], - "response": "SetConversationStatusRes" + "response": "SetConversationStatusRes", + "lint": "ignore" }, "tlfFinalize": { "request": [ @@ -391,14 +393,15 @@ ], "response": null }, - "getUnreadUpdateFull": { + "GetUnreadUpdateFull": { "request": [ { "name": "inboxVers", "type": "InboxVers" } ], - "response": "UnreadUpdateFull" + "response": "UnreadUpdateFull", + "lint": "ignore" }, "getS3Params": { "request": [ diff --git a/protocol/json/keybase1/tlf.json b/protocol/json/keybase1/tlf.json index d5d0e9272b30..f3344853f52f 100644 --- a/protocol/json/keybase1/tlf.json +++ b/protocol/json/keybase1/tlf.json @@ -8,7 +8,7 @@ ], "types": [], "messages": { - "cryptKeys": { + "CryptKeys": { "request": [ { "name": "query", @@ -16,7 +16,8 @@ } ], "response": "GetTLFCryptKeysRes", - "doc": "CryptKeys returns TLF crypt keys from all generations." + "doc": "CryptKeys returns TLF crypt keys from all generations.", + "lint": "ignore" }, "publicCanonicalTLFNameAndID": { "request": [ diff --git a/protocol/json/keybase1/tlf_keys.json b/protocol/json/keybase1/tlf_keys.json index 3b7b68545b54..88a5d7b27544 100644 --- a/protocol/json/keybase1/tlf_keys.json +++ b/protocol/json/keybase1/tlf_keys.json @@ -33,11 +33,13 @@ "fields": [ { "type": "int", - "name": "keyGeneration" + "name": "KeyGeneration", + "lint": "ignore" }, { "type": "Bytes32", - "name": "key" + "name": "Key", + "lint": "ignore" } ] }, @@ -84,7 +86,8 @@ "type": "array", "items": "CryptKey" }, - "name": "cryptKeys" + "name": "CryptKeys", + "lint": "ignore" } ] }, @@ -112,7 +115,8 @@ }, { "type": "CanonicalTlfName", - "name": "canonicalName" + "name": "CanonicalName", + "lint": "ignore" }, { "type": "TLFBreak", diff --git a/shared/constants/types/flow-types-chat.js b/shared/constants/types/flow-types-chat.js index b7ceca509f4e..c6725edbc342 100644 --- a/shared/constants/types/flow-types-chat.js +++ b/shared/constants/types/flow-types-chat.js @@ -116,7 +116,7 @@ export const NotifyChatChatActivityType = { } export function localCancelPostRpc (request: Exact) { - engineRpcOutgoing({...request, method: 'chat.1.local.cancelPost'}) + engineRpcOutgoing({...request, method: 'chat.1.local.CancelPost'}) } export function localCancelPostRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact): ChannelMap<*> { @@ -128,7 +128,7 @@ export function localCancelPostRpcPromise (request: $Exact void} & {param: localDownloadAttachmentLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.downloadAttachmentLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.DownloadAttachmentLocal'}) } export function localDownloadAttachmentLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localDownloadAttachmentLocalRpcParam}>): ChannelMap<*> { @@ -140,7 +140,7 @@ export function localDownloadAttachmentLocalRpcPromise (request: $Exact void} & {param: localDownloadFileAttachmentLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.downloadFileAttachmentLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.DownloadFileAttachmentLocal'}) } export function localDownloadFileAttachmentLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localDownloadFileAttachmentLocalRpcParam}>): ChannelMap<*> { @@ -200,7 +200,7 @@ export function localGetInboxSummaryForCLILocalRpcPromise (request: $Exact void} & {param: localGetMessagesLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.getMessagesLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.GetMessagesLocal'}) } export function localGetMessagesLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localGetMessagesLocalRpcParam}>): ChannelMap<*> { @@ -296,7 +296,7 @@ export function localPostLocalRpcPromise (request: $Exact) { - engineRpcOutgoing({...request, method: 'chat.1.local.retryPost'}) + engineRpcOutgoing({...request, method: 'chat.1.local.RetryPost'}) } export function localRetryPostRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact): ChannelMap<*> { @@ -308,7 +308,7 @@ export function localRetryPostRpcPromise (request: $Exact void} & {param: localSetConversationStatusLocalRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.local.setConversationStatusLocal'}) + engineRpcOutgoing({...request, method: 'chat.1.local.SetConversationStatusLocal'}) } export function localSetConversationStatusLocalRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: localSetConversationStatusLocalRpcParam}>): ChannelMap<*> { @@ -368,7 +368,7 @@ export function remoteGetThreadRemoteRpcPromise (request: $Exact void} & {param: remoteGetUnreadUpdateFullRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.remote.getUnreadUpdateFull'}) + engineRpcOutgoing({...request, method: 'chat.1.remote.GetUnreadUpdateFull'}) } export function remoteGetUnreadUpdateFullRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: remoteGetUnreadUpdateFullRpcParam}>): ChannelMap<*> { @@ -440,7 +440,7 @@ export function remoteS3SignRpcPromise (request: $Exact void} & {param: remoteSetConversationStatusRpcParam}>) { - engineRpcOutgoing({...request, method: 'chat.1.remote.setConversationStatus'}) + engineRpcOutgoing({...request, method: 'chat.1.remote.SetConversationStatus'}) } export function remoteSetConversationStatusRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: remoteSetConversationStatusRpcParam}>): ChannelMap<*> { @@ -514,7 +514,7 @@ export type Conversation = { export type ConversationID = bytes export type ConversationIDTriple = { - tlfID: TLFID, + tlfid: TLFID, topicType: TopicType, topicID: TopicID, } @@ -572,15 +572,15 @@ export type FailedMessageInfo = { } export type GenericPayload = { - action: string, + Action: string, } export type GetConversationForCLILocalQuery = { markAsRead: boolean, - messageTypes?: ?Array, - since?: ?string, + MessageTypes?: ?Array, + Since?: ?string, limit: UnreadFirstNumLimit, - conversationID: ConversationID, + conversationId: ConversationID, } export type GetConversationForCLILocalRes = { @@ -877,7 +877,7 @@ export type NewConversationLocalRes = { } export type NewConversationPayload = { - action: string, + Action: string, convID: ConversationID, inboxVers: InboxVers, unreadUpdate?: ?UnreadUpdate, @@ -889,7 +889,7 @@ export type NewConversationRemoteRes = { } export type NewMessagePayload = { - action: string, + Action: string, convID: ConversationID, message: MessageBoxed, inboxVers: InboxVers, @@ -912,7 +912,7 @@ export type OutboxRecord = { state: OutboxState, outboxID: OutboxID, convID: ConversationID, - msg: MessagePlaintext, + Msg: MessagePlaintext, } export type OutboxState = @@ -959,7 +959,7 @@ export type ReadMessageInfo = { } export type ReadMessagePayload = { - action: string, + Action: string, convID: ConversationID, msgID: MessageID, inboxVers: InboxVers, @@ -991,7 +991,7 @@ export type SetStatusInfo = { } export type SetStatusPayload = { - action: string, + Action: string, convID: ConversationID, status: ConversationStatus, inboxVers: InboxVers, @@ -1031,14 +1031,14 @@ export type TopicType = | 2 // DEV_2 export type UnreadFirstNumLimit = { - numRead: int, - atLeast: int, - atMost: int, + NumRead: int, + AtLeast: int, + AtMost: int, } export type UnreadUpdate = { convID: ConversationID, - unreadMessages: int, + UnreadMessages: int, } export type UnreadUpdateFull = { @@ -1198,7 +1198,7 @@ export type remoteMarkAsReadRpcParam = Exact<{ export type remoteNewConversationRemote2RpcParam = Exact<{ idTriple: ConversationIDTriple, - tlfMessage: MessageBoxed + TLFMessage: MessageBoxed }> export type remoteNewConversationRemoteRpcParam = Exact<{ @@ -1359,7 +1359,7 @@ export type incomingCallMapType = Exact<{ }>, response: CommonResponseHandler ) => void, - 'keybase.1.NotifyChat.newChatActivity'?: ( + 'keybase.1.NotifyChat.NewChatActivity'?: ( params: Exact<{ uid: keybase1.UID, activity: ChatActivity diff --git a/shared/constants/types/flow-types.js b/shared/constants/types/flow-types.js index 210b212289bb..1d0585c561eb 100644 --- a/shared/constants/types/flow-types.js +++ b/shared/constants/types/flow-types.js @@ -2339,7 +2339,7 @@ export function tlfCompleteAndCanonicalizePrivateTlfNameRpcPromise (request: $Ex } export function tlfCryptKeysRpc (request: Exact void} & {param: tlfCryptKeysRpcParam}>) { - engineRpcOutgoing({...request, method: 'keybase.1.tlf.cryptKeys'}) + engineRpcOutgoing({...request, method: 'keybase.1.tlf.CryptKeys'}) } export function tlfCryptKeysRpcChannelMap (channelConfig: ChannelConfig<*>, request: $Exact void} & {param: tlfCryptKeysRpcParam}>): ChannelMap<*> { @@ -2693,7 +2693,7 @@ export type Bytes32 = any export type CanonicalTLFNameAndIDWithBreaks = { tlfID: TLFID, - canonicalName: CanonicalTlfName, + CanonicalName: CanonicalTlfName, breaks: TLFBreak, } @@ -2786,8 +2786,8 @@ export type ConfirmResult = { } export type CryptKey = { - keyGeneration: int, - key: Bytes32, + KeyGeneration: int, + Key: Bytes32, } export type Cryptocurrency = { @@ -3064,7 +3064,7 @@ export type GetPassphraseRes = { export type GetTLFCryptKeysRes = { nameIDBreaks: CanonicalTLFNameAndIDWithBreaks, - cryptKeys?: ?Array, + CryptKeys?: ?Array, } export type HasServerKeysRes = {