{
  "protocol": "remote",
  "imports": [
    {
      "path": "github.com/keybase/client/go/protocol/gregor1",
      "type": "idl",
      "import_as": "gregor1"
    }
  ],
  "types": [
    {
      "type": "record",
      "name": "MessageBoxed",
      "fields": [
        {
          "type": "MessageBoxedVersion",
          "name": "version"
        },
        {
          "type": [
            null,
            "MessageServerHeader"
          ],
          "name": "serverHeader"
        },
        {
          "type": "MessageClientHeader",
          "name": "clientHeader"
        },
        {
          "type": "SealedData",
          "name": "headerCiphertext"
        },
        {
          "type": "EncryptedData",
          "name": "bodyCiphertext"
        },
        {
          "type": "bytes",
          "name": "verifyKey"
        },
        {
          "type": "int",
          "name": "keyGeneration"
        }
      ]
    },
    {
      "type": "enum",
      "name": "MessageBoxedVersion",
      "symbols": [
        "VNONE_0",
        "V1_1",
        "V2_2"
      ]
    },
    {
      "type": "record",
      "name": "ThreadViewBoxed",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "MessageBoxed"
          },
          "name": "messages"
        },
        {
          "type": [
            null,
            "Pagination"
          ],
          "name": "pagination"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetInboxRemoteRes",
      "fields": [
        {
          "type": "InboxView",
          "name": "inbox"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetInboxByTLFIDRemoteRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "Conversation"
          },
          "name": "convs"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetThreadRemoteRes",
      "fields": [
        {
          "type": "ThreadViewBoxed",
          "name": "thread"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetConversationMetadataRemoteRes",
      "fields": [
        {
          "type": "Conversation",
          "name": "conv"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "PostRemoteRes",
      "fields": [
        {
          "type": "MessageServerHeader",
          "name": "msgHeader"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "NewConversationRemoteRes",
      "fields": [
        {
          "type": "ConversationID",
          "name": "convID"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetMessagesRemoteRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "MessageBoxed"
          },
          "name": "msgs"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "MarkAsReadRes",
      "fields": [
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "SetConversationStatusRes",
      "fields": [
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetPublicConversationsRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "Conversation"
          },
          "name": "conversations"
        },
        {
          "type": [
            null,
            "RateLimit"
          ],
          "name": "rateLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "UnreadUpdateFull",
      "fields": [
        {
          "type": "boolean",
          "name": "ignore"
        },
        {
          "type": "InboxVers",
          "name": "inboxVers"
        },
        {
          "type": {
            "type": "array",
            "items": "UnreadUpdate"
          },
          "name": "updates"
        }
      ]
    },
    {
      "type": "record",
      "name": "S3Params",
      "fields": [
        {
          "type": "string",
          "name": "bucket"
        },
        {
          "type": "string",
          "name": "objectKey"
        },
        {
          "type": "string",
          "name": "accessKey"
        },
        {
          "type": "string",
          "name": "acl"
        },
        {
          "type": "string",
          "name": "regionName"
        },
        {
          "type": "string",
          "name": "regionEndpoint"
        },
        {
          "type": "string",
          "name": "regionBucketEndpoint"
        }
      ]
    },
    {
      "type": "enum",
      "name": "SyncInboxResType",
      "symbols": [
        "CURRENT_0",
        "INCREMENTAL_1",
        "CLEAR_2"
      ]
    },
    {
      "type": "record",
      "name": "SyncIncrementalRes",
      "fields": [
        {
          "type": "InboxVers",
          "name": "vers"
        },
        {
          "type": {
            "type": "array",
            "items": "Conversation"
          },
          "name": "convs"
        }
      ]
    },
    {
      "type": "record",
      "name": "ServerCacheVers",
      "fields": [
        {
          "type": "int",
          "name": "inboxVers"
        },
        {
          "type": "int",
          "name": "bodiesVers"
        }
      ]
    },
    {
      "type": "variant",
      "name": "SyncInboxRes",
      "switch": {
        "type": "SyncInboxResType",
        "name": "typ"
      },
      "cases": [
        {
          "label": {
            "name": "CURRENT",
            "def": false
          },
          "body": null
        },
        {
          "label": {
            "name": "INCREMENTAL",
            "def": false
          },
          "body": "SyncIncrementalRes"
        },
        {
          "label": {
            "name": "CLEAR",
            "def": false
          },
          "body": null
        }
      ]
    },
    {
      "type": "record",
      "name": "SyncChatRes",
      "fields": [
        {
          "type": "ServerCacheVers",
          "name": "cacheVers"
        },
        {
          "type": "SyncInboxRes",
          "name": "inboxRes"
        }
      ]
    },
    {
      "type": "enum",
      "name": "SyncAllNotificationType",
      "symbols": [
        "STATE_0",
        "INCREMENTAL_1"
      ]
    },
    {
      "type": "variant",
      "name": "SyncAllNotificationRes",
      "switch": {
        "type": "SyncAllNotificationType",
        "name": "typ"
      },
      "cases": [
        {
          "label": {
            "name": "STATE",
            "def": false
          },
          "body": "gregor1.State"
        },
        {
          "label": {
            "name": "INCREMENTAL",
            "def": false
          },
          "body": "gregor1.SyncResult"
        }
      ]
    },
    {
      "type": "record",
      "name": "SyncAllResult",
      "fields": [
        {
          "type": "gregor1.AuthResult",
          "name": "auth"
        },
        {
          "type": "SyncChatRes",
          "name": "chat"
        },
        {
          "type": "SyncAllNotificationRes",
          "name": "notification"
        },
        {
          "type": "UnreadUpdateFull",
          "name": "badge"
        }
      ]
    }
  ],
  "messages": {
    "getInboxRemote": {
      "request": [
        {
          "name": "vers",
          "type": "InboxVers"
        },
        {
          "name": "query",
          "type": [
            null,
            "GetInboxQuery"
          ]
        },
        {
          "name": "pagination",
          "type": [
            null,
            "Pagination"
          ]
        }
      ],
      "response": "GetInboxRemoteRes"
    },
    "getThreadRemote": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "query",
          "type": [
            null,
            "GetThreadQuery"
          ]
        },
        {
          "name": "pagination",
          "type": [
            null,
            "Pagination"
          ]
        }
      ],
      "response": "GetThreadRemoteRes"
    },
    "getPublicConversations": {
      "request": [
        {
          "name": "tlfID",
          "type": "TLFID"
        },
        {
          "name": "topicType",
          "type": "TopicType"
        },
        {
          "name": "summarizeMaxMsgs",
          "type": "boolean"
        }
      ],
      "response": "GetPublicConversationsRes"
    },
    "postRemote": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "messageBoxed",
          "type": "MessageBoxed"
        }
      ],
      "response": "PostRemoteRes"
    },
    "newConversationRemote": {
      "request": [
        {
          "name": "idTriple",
          "type": "ConversationIDTriple"
        }
      ],
      "response": "NewConversationRemoteRes"
    },
    "newConversationRemote2": {
      "request": [
        {
          "name": "idTriple",
          "type": "ConversationIDTriple"
        },
        {
          "name": "TLFMessage",
          "type": "MessageBoxed"
        }
      ],
      "response": "NewConversationRemoteRes",
      "lint": "ignore"
    },
    "getMessagesRemote": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "messageIDs",
          "type": {
            "type": "array",
            "items": "MessageID"
          }
        }
      ],
      "response": "GetMessagesRemoteRes"
    },
    "markAsRead": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "msgID",
          "type": "MessageID"
        }
      ],
      "response": "MarkAsReadRes"
    },
    "SetConversationStatus": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "status",
          "type": "ConversationStatus"
        }
      ],
      "response": "SetConversationStatusRes",
      "lint": "ignore"
    },
    "GetUnreadUpdateFull": {
      "request": [
        {
          "name": "inboxVers",
          "type": "InboxVers"
        }
      ],
      "response": "UnreadUpdateFull",
      "lint": "ignore"
    },
    "getS3Params": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        }
      ],
      "response": "S3Params"
    },
    "s3Sign": {
      "request": [
        {
          "name": "version",
          "type": "int"
        },
        {
          "name": "payload",
          "type": "bytes"
        }
      ],
      "response": "bytes"
    },
    "getInboxVersion": {
      "request": [
        {
          "name": "uid",
          "type": "gregor1.UID"
        }
      ],
      "response": "InboxVers"
    },
    "syncInbox": {
      "request": [
        {
          "name": "vers",
          "type": "InboxVers"
        }
      ],
      "response": "SyncInboxRes"
    },
    "syncChat": {
      "request": [
        {
          "name": "vers",
          "type": "InboxVers"
        }
      ],
      "response": "SyncChatRes"
    },
    "syncAll": {
      "request": [
        {
          "name": "uid",
          "type": "gregor1.UID"
        },
        {
          "name": "deviceID",
          "type": "gregor1.DeviceID"
        },
        {
          "name": "session",
          "type": "gregor1.SessionToken"
        },
        {
          "name": "inboxVers",
          "type": "InboxVers"
        },
        {
          "name": "ctime",
          "type": "gregor1.Time"
        }
      ],
      "response": "SyncAllResult"
    },
    "tlfFinalize": {
      "request": [
        {
          "name": "tlfID",
          "type": "TLFID"
        },
        {
          "name": "resetUser",
          "type": "string"
        },
        {
          "name": "resetDate",
          "type": "string"
        },
        {
          "name": "resetTimestamp",
          "type": "gregor1.Time"
        },
        {
          "name": "resetFull",
          "type": "string"
        }
      ],
      "response": null
    },
    "tlfResolve": {
      "request": [
        {
          "name": "tlfID",
          "type": "TLFID"
        },
        {
          "name": "resolvedWriters",
          "type": {
            "type": "array",
            "items": "gregor1.UID"
          }
        },
        {
          "name": "resolvedReaders",
          "type": {
            "type": "array",
            "items": "gregor1.UID"
          }
        }
      ],
      "response": null
    },
    "publishReadMessage": {
      "request": [
        {
          "name": "uid",
          "type": "gregor1.UID"
        },
        {
          "name": "convID",
          "type": "ConversationID"
        },
        {
          "name": "msgID",
          "type": "MessageID"
        }
      ],
      "response": null
    },
    "publishSetConversationStatus": {
      "request": [
        {
          "name": "uid",
          "type": "gregor1.UID"
        },
        {
          "name": "convID",
          "type": "ConversationID"
        },
        {
          "name": "status",
          "type": "ConversationStatus"
        }
      ],
      "response": null
    }
  },
  "namespace": "chat.1"
}