{
  "protocol": "common",
  "imports": [
    {
      "path": "github.com/keybase/client/go/protocol/gregor1",
      "type": "idl",
      "import_as": "gregor1"
    }
  ],
  "types": [
    {
      "type": "record",
      "name": "ThreadID",
      "fields": [],
      "typedef": "bytes"
    },
    {
      "type": "record",
      "name": "MessageID",
      "fields": [],
      "typedef": "uint",
      "lint": "ignore"
    },
    {
      "type": "record",
      "name": "TopicID",
      "fields": [],
      "typedef": "bytes"
    },
    {
      "type": "record",
      "name": "ConversationID",
      "fields": [],
      "typedef": "bytes"
    },
    {
      "type": "record",
      "name": "TLFID",
      "fields": [],
      "typedef": "bytes"
    },
    {
      "type": "record",
      "name": "Hash",
      "fields": [],
      "typedef": "bytes"
    },
    {
      "type": "record",
      "name": "InboxVers",
      "fields": [],
      "typedef": "uint64",
      "lint": "ignore"
    },
    {
      "type": "record",
      "name": "OutboxID",
      "fields": [],
      "typedef": "bytes"
    },
    {
      "type": "enum",
      "name": "MessageType",
      "symbols": [
        "NONE_0",
        "TEXT_1",
        "ATTACHMENT_2",
        "EDIT_3",
        "DELETE_4",
        "METADATA_5",
        "TLFNAME_6",
        "HEADLINE_7",
        "ATTACHMENTUPLOADED_8"
      ],
      "go": "nostring"
    },
    {
      "type": "enum",
      "name": "TopicType",
      "symbols": [
        "NONE_0",
        "CHAT_1",
        "DEV_2"
      ],
      "go": "nostring"
    },
    {
      "type": "enum",
      "name": "ConversationStatus",
      "symbols": [
        "UNFILED_0",
        "FAVORITE_1",
        "IGNORED_2",
        "BLOCKED_3",
        "MUTED_4"
      ]
    },
    {
      "type": "record",
      "name": "Pagination",
      "fields": [
        {
          "type": "bytes",
          "name": "next"
        },
        {
          "type": "bytes",
          "name": "previous"
        },
        {
          "type": "int",
          "name": "num"
        },
        {
          "type": "boolean",
          "name": "last"
        }
      ]
    },
    {
      "type": "record",
      "name": "RateLimit",
      "fields": [
        {
          "type": "string",
          "name": "name"
        },
        {
          "type": "int",
          "name": "callsRemaining"
        },
        {
          "type": "int",
          "name": "windowReset"
        },
        {
          "type": "int",
          "name": "maxCalls"
        }
      ]
    },
    {
      "type": "enum",
      "name": "TLFVisibility",
      "symbols": [
        "ANY_0",
        "PUBLIC_1",
        "PRIVATE_2"
      ]
    },
    {
      "type": "record",
      "name": "GetInboxQuery",
      "fields": [
        {
          "type": [
            null,
            "ConversationID"
          ],
          "name": "convID"
        },
        {
          "type": [
            null,
            "TopicType"
          ],
          "name": "topicType"
        },
        {
          "type": [
            null,
            "TLFID"
          ],
          "name": "tlfID"
        },
        {
          "type": [
            null,
            "TLFVisibility"
          ],
          "name": "tlfVisibility"
        },
        {
          "type": [
            null,
            "gregor1.Time"
          ],
          "name": "before"
        },
        {
          "type": [
            null,
            "gregor1.Time"
          ],
          "name": "after"
        },
        {
          "type": [
            null,
            "boolean"
          ],
          "name": "oneChatTypePerTLF"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationStatus"
          },
          "name": "status"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationID"
          },
          "name": "convIDs"
        },
        {
          "type": "boolean",
          "name": "unreadOnly"
        },
        {
          "type": "boolean",
          "name": "readOnly"
        },
        {
          "type": "boolean",
          "name": "computeActiveList"
        },
        {
          "type": "boolean",
          "name": "summarizeMaxMsgs"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationIDTriple",
      "fields": [
        {
          "type": "TLFID",
          "name": "tlfid",
          "lint": "ignore"
        },
        {
          "type": "TopicType",
          "name": "topicType"
        },
        {
          "type": "TopicID",
          "name": "topicID"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationFinalizeInfo",
      "fields": [
        {
          "type": "string",
          "name": "resetUser"
        },
        {
          "type": "string",
          "name": "resetDate"
        },
        {
          "type": "string",
          "name": "resetFull"
        },
        {
          "type": "gregor1.Time",
          "name": "resetTimestamp"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationResolveInfo",
      "fields": [
        {
          "type": "string",
          "name": "newTLFName"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationMetadata",
      "fields": [
        {
          "type": "ConversationIDTriple",
          "name": "idTriple"
        },
        {
          "type": "ConversationID",
          "name": "conversationID"
        },
        {
          "type": "TLFVisibility",
          "name": "visibility"
        },
        {
          "type": "ConversationStatus",
          "name": "status"
        },
        {
          "type": [
            null,
            "ConversationFinalizeInfo"
          ],
          "name": "finalizeInfo"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationMetadata"
          },
          "name": "supersedes"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationMetadata"
          },
          "name": "supersededBy"
        },
        {
          "type": {
            "type": "array",
            "items": "gregor1.UID"
          },
          "name": "activeList"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationReaderInfo",
      "fields": [
        {
          "type": "gregor1.Time",
          "name": "mtime"
        },
        {
          "type": "MessageID",
          "name": "readMsgid"
        },
        {
          "type": "MessageID",
          "name": "maxMsgid"
        }
      ]
    },
    {
      "type": "record",
      "name": "Conversation",
      "fields": [
        {
          "type": "ConversationMetadata",
          "name": "metadata"
        },
        {
          "type": [
            null,
            "ConversationReaderInfo"
          ],
          "name": "readerInfo"
        },
        {
          "type": {
            "type": "array",
            "items": "MessageBoxed"
          },
          "name": "maxMsgs"
        },
        {
          "type": {
            "type": "array",
            "items": "MessageSummary"
          },
          "name": "maxMsgSummaries"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageSummary",
      "fields": [
        {
          "type": "MessageID",
          "name": "msgID"
        },
        {
          "type": "MessageType",
          "name": "messageType"
        },
        {
          "type": "string",
          "name": "tlfName"
        },
        {
          "type": "boolean",
          "name": "tlfPublic"
        },
        {
          "type": "gregor1.Time",
          "name": "ctime"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageServerHeader",
      "fields": [
        {
          "type": "MessageID",
          "name": "messageID"
        },
        {
          "type": "MessageID",
          "name": "supersededBy"
        },
        {
          "type": "gregor1.Time",
          "name": "ctime"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessagePreviousPointer",
      "fields": [
        {
          "type": "MessageID",
          "name": "id"
        },
        {
          "type": "Hash",
          "name": "hash"
        }
      ]
    },
    {
      "type": "record",
      "name": "OutboxInfo",
      "fields": [
        {
          "type": "MessageID",
          "name": "prev"
        },
        {
          "type": "gregor1.Time",
          "name": "composeTime"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageClientHeader",
      "fields": [
        {
          "type": "ConversationIDTriple",
          "name": "conv"
        },
        {
          "type": "string",
          "name": "tlfName"
        },
        {
          "type": "boolean",
          "name": "tlfPublic"
        },
        {
          "type": "MessageType",
          "name": "messageType"
        },
        {
          "type": "MessageID",
          "name": "supersedes"
        },
        {
          "type": {
            "type": "array",
            "items": "MessageID"
          },
          "name": "deletes"
        },
        {
          "type": {
            "type": "array",
            "items": "MessagePreviousPointer"
          },
          "name": "prev"
        },
        {
          "type": "gregor1.UID",
          "name": "sender"
        },
        {
          "type": "gregor1.DeviceID",
          "name": "senderDevice"
        },
        {
          "type": [
            null,
            "MerkleRoot"
          ],
          "name": "merkleRoot"
        },
        {
          "type": [
            null,
            "OutboxID"
          ],
          "name": "outboxID"
        },
        {
          "type": [
            null,
            "OutboxInfo"
          ],
          "name": "outboxInfo"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageClientHeaderVerified",
      "fields": [
        {
          "type": "ConversationIDTriple",
          "name": "conv"
        },
        {
          "type": "string",
          "name": "tlfName"
        },
        {
          "type": "boolean",
          "name": "tlfPublic"
        },
        {
          "type": "MessageType",
          "name": "messageType"
        },
        {
          "type": {
            "type": "array",
            "items": "MessagePreviousPointer"
          },
          "name": "prev"
        },
        {
          "type": "gregor1.UID",
          "name": "sender"
        },
        {
          "type": "gregor1.DeviceID",
          "name": "senderDevice"
        },
        {
          "type": [
            null,
            "OutboxID"
          ],
          "name": "outboxID"
        },
        {
          "type": [
            null,
            "OutboxInfo"
          ],
          "name": "outboxInfo"
        }
      ]
    },
    {
      "type": "record",
      "name": "EncryptedData",
      "fields": [
        {
          "type": "int",
          "name": "v"
        },
        {
          "type": "bytes",
          "name": "e"
        },
        {
          "type": "bytes",
          "name": "n"
        }
      ]
    },
    {
      "type": "record",
      "name": "SignEncryptedData",
      "fields": [
        {
          "type": "int",
          "name": "v"
        },
        {
          "type": "bytes",
          "name": "e"
        },
        {
          "type": "bytes",
          "name": "n"
        }
      ]
    },
    {
      "type": "record",
      "name": "SealedData",
      "fields": [
        {
          "type": "int",
          "name": "v"
        },
        {
          "type": "bytes",
          "name": "e"
        },
        {
          "type": "bytes",
          "name": "n"
        }
      ]
    },
    {
      "type": "record",
      "name": "SignatureInfo",
      "fields": [
        {
          "type": "int",
          "name": "v"
        },
        {
          "type": "bytes",
          "name": "s"
        },
        {
          "type": "bytes",
          "name": "k"
        }
      ]
    },
    {
      "type": "record",
      "name": "MerkleRoot",
      "fields": [
        {
          "type": "long",
          "name": "seqno"
        },
        {
          "type": "bytes",
          "name": "hash"
        }
      ]
    },
    {
      "type": "enum",
      "name": "InboxResType",
      "symbols": [
        "VERSIONHIT_0",
        "FULL_1"
      ]
    },
    {
      "type": "record",
      "name": "InboxViewFull",
      "fields": [
        {
          "type": "InboxVers",
          "name": "vers"
        },
        {
          "type": {
            "type": "array",
            "items": "Conversation"
          },
          "name": "conversations"
        },
        {
          "type": [
            null,
            "Pagination"
          ],
          "name": "pagination"
        }
      ]
    },
    {
      "type": "variant",
      "name": "InboxView",
      "switch": {
        "type": "InboxResType",
        "name": "rtype"
      },
      "cases": [
        {
          "label": {
            "name": "VERSIONHIT",
            "def": false
          },
          "body": null
        },
        {
          "label": {
            "name": "FULL",
            "def": false
          },
          "body": "InboxViewFull"
        }
      ]
    }
  ],
  "messages": {},
  "namespace": "chat.1"
}