{
  "protocol": "local",
  "imports": [
    {
      "path": "github.com/keybase/client/go/protocol/gregor1",
      "type": "idl",
      "import_as": "gregor1"
    },
    {
      "path": "github.com/keybase/client/go/protocol/keybase1",
      "type": "idl",
      "import_as": "keybase1"
    },
    {
      "path": "common.avdl",
      "type": "idl"
    }
  ],
  "types": [
    {
      "type": "record",
      "name": "MessageText",
      "fields": [
        {
          "type": "string",
          "name": "body"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageConversationMetadata",
      "fields": [
        {
          "type": "string",
          "name": "conversationTitle"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageEdit",
      "fields": [
        {
          "type": "MessageID",
          "name": "messageID"
        },
        {
          "type": "string",
          "name": "body"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageDelete",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "MessageID"
          },
          "name": "messageIDs"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageHeadline",
      "fields": [
        {
          "type": "string",
          "name": "headline"
        }
      ]
    },
    {
      "type": "record",
      "name": "AssetMetadataImage",
      "fields": [
        {
          "type": "int",
          "name": "width"
        },
        {
          "type": "int",
          "name": "height"
        }
      ]
    },
    {
      "type": "record",
      "name": "AssetMetadataVideo",
      "fields": [
        {
          "type": "int",
          "name": "width"
        },
        {
          "type": "int",
          "name": "height"
        },
        {
          "type": "int",
          "name": "durationMs"
        }
      ]
    },
    {
      "type": "record",
      "name": "AssetMetadataAudio",
      "fields": [
        {
          "type": "int",
          "name": "durationMs"
        }
      ]
    },
    {
      "type": "enum",
      "name": "AssetMetadataType",
      "symbols": [
        "NONE_0",
        "IMAGE_1",
        "VIDEO_2",
        "AUDIO_3"
      ],
      "go": "nostring"
    },
    {
      "type": "variant",
      "name": "AssetMetadata",
      "switch": {
        "type": "AssetMetadataType",
        "name": "assetType"
      },
      "cases": [
        {
          "label": {
            "name": "IMAGE",
            "def": false
          },
          "body": "AssetMetadataImage"
        },
        {
          "label": {
            "name": "VIDEO",
            "def": false
          },
          "body": "AssetMetadataVideo"
        },
        {
          "label": {
            "name": "AUDIO",
            "def": false
          },
          "body": "AssetMetadataAudio"
        }
      ]
    },
    {
      "type": "enum",
      "name": "AssetTag",
      "symbols": [
        "PRIMARY_0"
      ],
      "go": "nostring"
    },
    {
      "type": "record",
      "name": "Asset",
      "fields": [
        {
          "type": "string",
          "name": "filename"
        },
        {
          "type": "string",
          "name": "region"
        },
        {
          "type": "string",
          "name": "endpoint"
        },
        {
          "type": "string",
          "name": "bucket"
        },
        {
          "type": "string",
          "name": "path"
        },
        {
          "type": "int",
          "name": "size"
        },
        {
          "type": "string",
          "name": "mimeType"
        },
        {
          "type": "Hash",
          "name": "encHash"
        },
        {
          "type": "bytes",
          "name": "key"
        },
        {
          "type": "bytes",
          "name": "verifyKey"
        },
        {
          "type": "string",
          "name": "title"
        },
        {
          "type": "bytes",
          "name": "nonce"
        },
        {
          "type": "AssetMetadata",
          "name": "metadata"
        },
        {
          "type": "AssetTag",
          "name": "tag"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageAttachment",
      "fields": [
        {
          "type": "Asset",
          "name": "object"
        },
        {
          "type": [
            null,
            "Asset"
          ],
          "name": "preview"
        },
        {
          "type": {
            "type": "array",
            "items": "Asset"
          },
          "name": "previews"
        },
        {
          "type": "bytes",
          "name": "metadata"
        },
        {
          "type": "boolean",
          "name": "uploaded"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessageAttachmentUploaded",
      "fields": [
        {
          "type": "MessageID",
          "name": "messageID"
        },
        {
          "type": "Asset",
          "name": "object"
        },
        {
          "type": {
            "type": "array",
            "items": "Asset"
          },
          "name": "previews"
        },
        {
          "type": "bytes",
          "name": "metadata"
        }
      ]
    },
    {
      "type": "variant",
      "name": "MessageBody",
      "switch": {
        "type": "MessageType",
        "name": "messageType"
      },
      "cases": [
        {
          "label": {
            "name": "TEXT",
            "def": false
          },
          "body": "MessageText"
        },
        {
          "label": {
            "name": "ATTACHMENT",
            "def": false
          },
          "body": "MessageAttachment"
        },
        {
          "label": {
            "name": "EDIT",
            "def": false
          },
          "body": "MessageEdit"
        },
        {
          "label": {
            "name": "DELETE",
            "def": false
          },
          "body": "MessageDelete"
        },
        {
          "label": {
            "name": "METADATA",
            "def": false
          },
          "body": "MessageConversationMetadata"
        },
        {
          "label": {
            "name": "HEADLINE",
            "def": false
          },
          "body": "MessageHeadline"
        },
        {
          "label": {
            "name": "ATTACHMENTUPLOADED",
            "def": false
          },
          "body": "MessageAttachmentUploaded"
        }
      ]
    },
    {
      "type": "enum",
      "name": "OutboxStateType",
      "symbols": [
        "SENDING_0",
        "ERROR_1"
      ]
    },
    {
      "type": "enum",
      "name": "OutboxErrorType",
      "symbols": [
        "MISC_0",
        "OFFLINE_1",
        "IDENTIFY_2",
        "TOOLONG_3"
      ]
    },
    {
      "type": "record",
      "name": "OutboxStateError",
      "fields": [
        {
          "type": "string",
          "name": "message"
        },
        {
          "type": "OutboxErrorType",
          "name": "typ"
        }
      ]
    },
    {
      "type": "variant",
      "name": "OutboxState",
      "switch": {
        "type": "OutboxStateType",
        "name": "state"
      },
      "cases": [
        {
          "label": {
            "name": "SENDING",
            "def": false
          },
          "body": "int"
        },
        {
          "label": {
            "name": "ERROR",
            "def": false
          },
          "body": "OutboxStateError"
        }
      ]
    },
    {
      "type": "record",
      "name": "OutboxRecord",
      "fields": [
        {
          "type": "OutboxState",
          "name": "state"
        },
        {
          "type": "OutboxID",
          "name": "outboxID"
        },
        {
          "type": "ConversationID",
          "name": "convID"
        },
        {
          "type": "gregor1.Time",
          "name": "ctime"
        },
        {
          "type": "MessagePlaintext",
          "name": "Msg",
          "lint": "ignore"
        },
        {
          "type": "keybase1.TLFIdentifyBehavior",
          "name": "identifyBehavior"
        }
      ]
    },
    {
      "type": "record",
      "name": "Inbox",
      "fields": [
        {
          "type": "InboxVers",
          "name": "version"
        },
        {
          "type": {
            "type": "array",
            "items": "Conversation"
          },
          "name": "convsUnverified"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationLocal"
          },
          "name": "convs"
        },
        {
          "type": [
            null,
            "Pagination"
          ],
          "name": "pagination"
        }
      ]
    },
    {
      "type": "enum",
      "name": "HeaderPlaintextVersion",
      "symbols": [
        "V1_1",
        "V2_2",
        "V3_3",
        "V4_4",
        "V5_5",
        "V6_6",
        "V7_7",
        "V8_8",
        "V9_9",
        "V10_10"
      ]
    },
    {
      "type": "record",
      "name": "HeaderPlaintextMetaInfo",
      "fields": [
        {
          "type": "boolean",
          "name": "crit"
        }
      ]
    },
    {
      "type": "record",
      "name": "HeaderPlaintextUnsupported",
      "fields": [
        {
          "type": "HeaderPlaintextMetaInfo",
          "name": "mi"
        }
      ]
    },
    {
      "type": "record",
      "name": "HeaderPlaintextV1",
      "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": "Hash",
          "name": "bodyHash"
        },
        {
          "type": [
            null,
            "OutboxInfo"
          ],
          "name": "outboxInfo"
        },
        {
          "type": [
            null,
            "OutboxID"
          ],
          "name": "outboxID"
        },
        {
          "type": [
            null,
            "SignatureInfo"
          ],
          "name": "headerSignature"
        }
      ]
    },
    {
      "type": "variant",
      "name": "HeaderPlaintext",
      "switch": {
        "type": "HeaderPlaintextVersion",
        "name": "version"
      },
      "cases": [
        {
          "label": {
            "name": "V1",
            "def": false
          },
          "body": "HeaderPlaintextV1"
        },
        {
          "label": {
            "name": "V2",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V3",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V4",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V5",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V6",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V7",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V8",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V9",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V10",
            "def": false
          },
          "body": "HeaderPlaintextUnsupported"
        }
      ]
    },
    {
      "type": "enum",
      "name": "BodyPlaintextVersion",
      "symbols": [
        "V1_1",
        "V2_2",
        "V3_3",
        "V4_4",
        "V5_5",
        "V6_6",
        "V7_7",
        "V8_8",
        "V9_9",
        "V10_10"
      ]
    },
    {
      "type": "record",
      "name": "BodyPlaintextMetaInfo",
      "fields": [
        {
          "type": "boolean",
          "name": "crit"
        }
      ]
    },
    {
      "type": "record",
      "name": "BodyPlaintextUnsupported",
      "fields": [
        {
          "type": "BodyPlaintextMetaInfo",
          "name": "mi"
        }
      ]
    },
    {
      "type": "record",
      "name": "BodyPlaintextV1",
      "fields": [
        {
          "type": "MessageBody",
          "name": "messageBody"
        }
      ]
    },
    {
      "type": "variant",
      "name": "BodyPlaintext",
      "switch": {
        "type": "BodyPlaintextVersion",
        "name": "version"
      },
      "cases": [
        {
          "label": {
            "name": "V1",
            "def": false
          },
          "body": "BodyPlaintextV1"
        },
        {
          "label": {
            "name": "V2",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V3",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V4",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V5",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V6",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V7",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V8",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V9",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        },
        {
          "label": {
            "name": "V10",
            "def": false
          },
          "body": "BodyPlaintextUnsupported"
        }
      ]
    },
    {
      "type": "record",
      "name": "MessagePlaintext",
      "fields": [
        {
          "type": "MessageClientHeader",
          "name": "clientHeader"
        },
        {
          "type": "MessageBody",
          "name": "messageBody"
        }
      ]
    },
    {
      "type": "enum",
      "name": "MessageUnboxedState",
      "symbols": [
        "VALID_1",
        "ERROR_2",
        "OUTBOX_3"
      ]
    },
    {
      "type": "record",
      "name": "MessageUnboxedValid",
      "fields": [
        {
          "type": "MessageClientHeaderVerified",
          "name": "clientHeader"
        },
        {
          "type": "MessageServerHeader",
          "name": "serverHeader"
        },
        {
          "type": "MessageBody",
          "name": "messageBody"
        },
        {
          "type": "string",
          "name": "senderUsername"
        },
        {
          "type": "string",
          "name": "senderDeviceName"
        },
        {
          "type": "string",
          "name": "senderDeviceType"
        },
        {
          "type": "Hash",
          "name": "bodyHash"
        },
        {
          "type": "Hash",
          "name": "headerHash"
        },
        {
          "type": [
            null,
            "SignatureInfo"
          ],
          "name": "headerSignature"
        },
        {
          "type": [
            null,
            "bytes"
          ],
          "name": "verificationKey"
        },
        {
          "type": [
            null,
            "gregor1.Time"
          ],
          "name": "senderDeviceRevokedAt"
        }
      ]
    },
    {
      "type": "enum",
      "name": "MessageUnboxedErrorType",
      "symbols": [
        "MISC_0",
        "BADVERSION_CRITICAL_1",
        "BADVERSION_2",
        "IDENTIFY_3"
      ]
    },
    {
      "type": "record",
      "name": "MessageUnboxedError",
      "fields": [
        {
          "type": "MessageUnboxedErrorType",
          "name": "errType"
        },
        {
          "type": "string",
          "name": "errMsg"
        },
        {
          "type": "MessageID",
          "name": "messageID"
        },
        {
          "type": "MessageType",
          "name": "messageType"
        },
        {
          "type": "gregor1.Time",
          "name": "ctime"
        }
      ]
    },
    {
      "type": "variant",
      "name": "MessageUnboxed",
      "switch": {
        "type": "MessageUnboxedState",
        "name": "state"
      },
      "cases": [
        {
          "label": {
            "name": "VALID",
            "def": false
          },
          "body": "MessageUnboxedValid"
        },
        {
          "label": {
            "name": "ERROR",
            "def": false
          },
          "body": "MessageUnboxedError"
        },
        {
          "label": {
            "name": "OUTBOX",
            "def": false
          },
          "body": "OutboxRecord"
        }
      ]
    },
    {
      "type": "record",
      "name": "UnreadFirstNumLimit",
      "fields": [
        {
          "type": "int",
          "name": "NumRead",
          "lint": "ignore"
        },
        {
          "type": "int",
          "name": "AtLeast",
          "lint": "ignore"
        },
        {
          "type": "int",
          "name": "AtMost",
          "lint": "ignore"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationInfoLocal",
      "fields": [
        {
          "type": "ConversationID",
          "name": "id"
        },
        {
          "type": "ConversationIDTriple",
          "name": "triple"
        },
        {
          "type": "string",
          "name": "tlfName"
        },
        {
          "type": "string",
          "name": "topicName"
        },
        {
          "type": "TLFVisibility",
          "name": "visibility"
        },
        {
          "type": "ConversationStatus",
          "name": "status"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "writerNames"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "readerNames"
        },
        {
          "type": [
            null,
            "ConversationFinalizeInfo"
          ],
          "name": "finalizeInfo"
        }
      ]
    },
    {
      "type": "enum",
      "name": "ConversationErrorType",
      "symbols": [
        "MISC_0",
        "MISSINGINFO_1",
        "SELFREKEYNEEDED_2",
        "OTHERREKEYNEEDED_3",
        "IDENTIFY_4",
        "LOCALMAXMESSAGENOTFOUND_5"
      ]
    },
    {
      "type": "record",
      "name": "ConversationErrorLocal",
      "fields": [
        {
          "type": "ConversationErrorType",
          "name": "typ"
        },
        {
          "type": "string",
          "name": "message"
        },
        {
          "type": "Conversation",
          "name": "remoteConv"
        },
        {
          "type": "boolean",
          "name": "permanent"
        },
        {
          "type": "string",
          "name": "unverifiedTLFName"
        },
        {
          "type": [
            null,
            "ConversationErrorRekey"
          ],
          "name": "rekeyInfo"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationErrorRekey",
      "fields": [
        {
          "type": "string",
          "name": "tlfName"
        },
        {
          "type": "boolean",
          "name": "tlfPublic"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "rekeyers"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "writerNames"
        },
        {
          "type": {
            "type": "array",
            "items": "string"
          },
          "name": "readerNames"
        }
      ]
    },
    {
      "type": "record",
      "name": "ConversationLocal",
      "fields": [
        {
          "type": [
            null,
            "ConversationErrorLocal"
          ],
          "name": "error"
        },
        {
          "type": "ConversationInfoLocal",
          "name": "info"
        },
        {
          "type": "ConversationReaderInfo",
          "name": "readerInfo"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationMetadata"
          },
          "name": "supersedes"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationMetadata"
          },
          "name": "supersededBy"
        },
        {
          "type": {
            "type": "array",
            "items": "MessageUnboxed"
          },
          "name": "maxMessages"
        },
        {
          "type": "boolean",
          "name": "isEmpty"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "NonblockFetchRes",
      "fields": [
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "ThreadView",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "MessageUnboxed"
          },
          "name": "messages"
        },
        {
          "type": [
            null,
            "Pagination"
          ],
          "name": "pagination"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetThreadQuery",
      "fields": [
        {
          "type": "boolean",
          "name": "markAsRead"
        },
        {
          "type": {
            "type": "array",
            "items": "MessageType"
          },
          "name": "messageTypes"
        },
        {
          "type": "boolean",
          "name": "disableResolveSupersedes"
        },
        {
          "type": [
            null,
            "gregor1.Time"
          ],
          "name": "before"
        },
        {
          "type": [
            null,
            "gregor1.Time"
          ],
          "name": "after"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetThreadLocalRes",
      "fields": [
        {
          "type": "ThreadView",
          "name": "thread"
        },
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetInboxLocalRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "Conversation"
          },
          "name": "conversationsUnverified"
        },
        {
          "type": [
            null,
            "Pagination"
          ],
          "name": "pagination"
        },
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetInboxLocalQuery",
      "fields": [
        {
          "type": [
            null,
            "string"
          ],
          "name": "tlfName"
        },
        {
          "type": [
            null,
            "string"
          ],
          "name": "topicName"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationID"
          },
          "name": "convIDs"
        },
        {
          "type": [
            null,
            "TopicType"
          ],
          "name": "topicType"
        },
        {
          "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": "boolean",
          "name": "unreadOnly"
        },
        {
          "type": "boolean",
          "name": "readOnly"
        },
        {
          "type": "boolean",
          "name": "computeActiveList"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetInboxAndUnboxLocalRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "ConversationLocal"
          },
          "name": "conversations"
        },
        {
          "type": [
            null,
            "Pagination"
          ],
          "name": "pagination"
        },
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "PostLocalRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": "MessageID",
          "name": "messageID"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "PostLocalNonblockRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": "OutboxID",
          "name": "outboxID"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "SetConversationStatusLocalRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "NewConversationLocalRes",
      "fields": [
        {
          "type": "ConversationLocal",
          "name": "conv"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetInboxSummaryForCLILocalQuery",
      "fields": [
        {
          "type": "TopicType",
          "name": "topicType"
        },
        {
          "type": "string",
          "name": "after"
        },
        {
          "type": "string",
          "name": "before"
        },
        {
          "type": "TLFVisibility",
          "name": "visibility"
        },
        {
          "type": {
            "type": "array",
            "items": "ConversationStatus"
          },
          "name": "status"
        },
        {
          "type": "boolean",
          "name": "unreadFirst"
        },
        {
          "type": "UnreadFirstNumLimit",
          "name": "unreadFirstLimit"
        },
        {
          "type": "int",
          "name": "activitySortedLimit"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetInboxSummaryForCLILocalRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "ConversationLocal"
          },
          "name": "conversations"
        },
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetConversationForCLILocalQuery",
      "fields": [
        {
          "type": "boolean",
          "name": "markAsRead"
        },
        {
          "type": {
            "type": "array",
            "items": "MessageType"
          },
          "name": "MessageTypes",
          "lint": "ignore"
        },
        {
          "type": [
            null,
            "string"
          ],
          "name": "Since",
          "lint": "ignore"
        },
        {
          "type": "UnreadFirstNumLimit",
          "name": "limit"
        },
        {
          "type": "ConversationLocal",
          "name": "conv",
          "lint": "ignore"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetConversationForCLILocalRes",
      "fields": [
        {
          "type": "ConversationLocal",
          "name": "conversation"
        },
        {
          "type": {
            "type": "array",
            "items": "MessageUnboxed"
          },
          "name": "messages"
        },
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        }
      ]
    },
    {
      "type": "record",
      "name": "GetMessagesLocalRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "MessageUnboxed"
          },
          "name": "messages"
        },
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "LocalSource",
      "fields": [
        {
          "type": "keybase1.Stream",
          "name": "source"
        },
        {
          "type": "string",
          "name": "filename"
        },
        {
          "type": "int",
          "name": "size"
        }
      ]
    },
    {
      "type": "record",
      "name": "LocalFileSource",
      "fields": [
        {
          "type": "string",
          "name": "filename"
        }
      ]
    },
    {
      "type": "record",
      "name": "DownloadAttachmentLocalRes",
      "fields": [
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    },
    {
      "type": "record",
      "name": "MakePreviewRes",
      "fields": [
        {
          "type": "string",
          "name": "mimeType"
        },
        {
          "type": [
            null,
            "string"
          ],
          "name": "filename"
        },
        {
          "type": [
            null,
            "AssetMetadata"
          ],
          "name": "metadata"
        },
        {
          "type": [
            null,
            "AssetMetadata"
          ],
          "name": "baseMetadata"
        }
      ]
    },
    {
      "type": "record",
      "name": "MarkAsReadLocalRes",
      "fields": [
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        }
      ]
    },
    {
      "type": "record",
      "name": "FindConversationsLocalRes",
      "fields": [
        {
          "type": {
            "type": "array",
            "items": "ConversationLocal"
          },
          "name": "conversations"
        },
        {
          "type": "boolean",
          "name": "offline"
        },
        {
          "type": {
            "type": "array",
            "items": "RateLimit"
          },
          "name": "rateLimits"
        },
        {
          "type": {
            "type": "array",
            "items": "keybase1.TLFIdentifyFailure"
          },
          "name": "identifyFailures"
        }
      ]
    }
  ],
  "messages": {
    "getThreadLocal": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "query",
          "type": [
            null,
            "GetThreadQuery"
          ]
        },
        {
          "name": "pagination",
          "type": [
            null,
            "Pagination"
          ]
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "GetThreadLocalRes"
    },
    "getCachedThread": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "query",
          "type": [
            null,
            "GetThreadQuery"
          ]
        },
        {
          "name": "pagination",
          "type": [
            null,
            "Pagination"
          ]
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "GetThreadLocalRes"
    },
    "getThreadNonblock": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "query",
          "type": [
            null,
            "GetThreadQuery"
          ]
        },
        {
          "name": "pagination",
          "type": [
            null,
            "Pagination"
          ]
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "NonblockFetchRes"
    },
    "getInboxAndUnboxLocal": {
      "request": [
        {
          "name": "query",
          "type": [
            null,
            "GetInboxLocalQuery"
          ]
        },
        {
          "name": "pagination",
          "type": [
            null,
            "Pagination"
          ]
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "GetInboxAndUnboxLocalRes"
    },
    "getInboxNonblockLocal": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "maxUnbox",
          "type": [
            null,
            "int"
          ]
        },
        {
          "name": "query",
          "type": [
            null,
            "GetInboxLocalQuery"
          ]
        },
        {
          "name": "pagination",
          "type": [
            null,
            "Pagination"
          ]
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "NonblockFetchRes"
    },
    "postLocal": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "msg",
          "type": "MessagePlaintext"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "PostLocalRes"
    },
    "postLocalNonblock": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "msg",
          "type": "MessagePlaintext"
        },
        {
          "name": "clientPrev",
          "type": "MessageID"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "PostLocalNonblockRes"
    },
    "postTextNonblock": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "conv",
          "type": "ConversationIDTriple"
        },
        {
          "name": "tlfName",
          "type": "string"
        },
        {
          "name": "tlfPublic",
          "type": "boolean"
        },
        {
          "name": "body",
          "type": "string"
        },
        {
          "name": "clientPrev",
          "type": "MessageID"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "PostLocalNonblockRes"
    },
    "postDeleteNonblock": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "conv",
          "type": "ConversationIDTriple"
        },
        {
          "name": "tlfName",
          "type": "string"
        },
        {
          "name": "tlfPublic",
          "type": "boolean"
        },
        {
          "name": "supersedes",
          "type": "MessageID"
        },
        {
          "name": "clientPrev",
          "type": "MessageID"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "PostLocalNonblockRes"
    },
    "postEditNonblock": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "conv",
          "type": "ConversationIDTriple"
        },
        {
          "name": "tlfName",
          "type": "string"
        },
        {
          "name": "tlfPublic",
          "type": "boolean"
        },
        {
          "name": "supersedes",
          "type": "MessageID"
        },
        {
          "name": "body",
          "type": "string"
        },
        {
          "name": "clientPrev",
          "type": "MessageID"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "PostLocalNonblockRes"
    },
    "SetConversationStatusLocal": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "status",
          "type": "ConversationStatus"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "SetConversationStatusLocalRes",
      "lint": "ignore"
    },
    "newConversationLocal": {
      "request": [
        {
          "name": "tlfName",
          "type": "string"
        },
        {
          "name": "topicType",
          "type": "TopicType"
        },
        {
          "name": "tlfVisibility",
          "type": "TLFVisibility"
        },
        {
          "name": "topicName",
          "type": [
            null,
            "string"
          ]
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "NewConversationLocalRes"
    },
    "getInboxSummaryForCLILocal": {
      "request": [
        {
          "name": "query",
          "type": "GetInboxSummaryForCLILocalQuery"
        }
      ],
      "response": "GetInboxSummaryForCLILocalRes"
    },
    "getConversationForCLILocal": {
      "request": [
        {
          "name": "query",
          "type": "GetConversationForCLILocalQuery"
        }
      ],
      "response": "GetConversationForCLILocalRes"
    },
    "GetMessagesLocal": {
      "request": [
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "messageIDs",
          "type": {
            "type": "array",
            "items": "MessageID"
          }
        },
        {
          "name": "disableResolveSupersedes",
          "type": "boolean"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "GetMessagesLocalRes",
      "lint": "ignore"
    },
    "postAttachmentLocal": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "clientHeader",
          "type": "MessageClientHeader"
        },
        {
          "name": "attachment",
          "type": "LocalSource"
        },
        {
          "name": "preview",
          "type": [
            null,
            "MakePreviewRes"
          ]
        },
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "metadata",
          "type": "bytes"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "PostLocalRes"
    },
    "postFileAttachmentLocal": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "clientHeader",
          "type": "MessageClientHeader"
        },
        {
          "name": "attachment",
          "type": "LocalFileSource"
        },
        {
          "name": "preview",
          "type": [
            null,
            "MakePreviewRes"
          ]
        },
        {
          "name": "title",
          "type": "string"
        },
        {
          "name": "metadata",
          "type": "bytes"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "PostLocalRes"
    },
    "DownloadAttachmentLocal": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "messageID",
          "type": "MessageID"
        },
        {
          "name": "sink",
          "type": "keybase1.Stream"
        },
        {
          "name": "preview",
          "type": "boolean"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "DownloadAttachmentLocalRes",
      "lint": "ignore"
    },
    "DownloadFileAttachmentLocal": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "messageID",
          "type": "MessageID"
        },
        {
          "name": "filename",
          "type": "string"
        },
        {
          "name": "preview",
          "type": "boolean"
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "DownloadAttachmentLocalRes",
      "lint": "ignore"
    },
    "makePreview": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "attachment",
          "type": "LocalFileSource"
        },
        {
          "name": "outputDir",
          "type": "string"
        }
      ],
      "response": "MakePreviewRes"
    },
    "CancelPost": {
      "request": [
        {
          "name": "outboxID",
          "type": "OutboxID"
        }
      ],
      "response": null,
      "lint": "ignore"
    },
    "RetryPost": {
      "request": [
        {
          "name": "outboxID",
          "type": "OutboxID"
        }
      ],
      "response": null,
      "lint": "ignore"
    },
    "markAsReadLocal": {
      "request": [
        {
          "name": "sessionID",
          "type": "int"
        },
        {
          "name": "conversationID",
          "type": "ConversationID"
        },
        {
          "name": "msgID",
          "type": "MessageID"
        }
      ],
      "response": "MarkAsReadLocalRes"
    },
    "findConversationsLocal": {
      "request": [
        {
          "name": "tlfName",
          "type": "string"
        },
        {
          "name": "visibility",
          "type": "TLFVisibility"
        },
        {
          "name": "topicType",
          "type": "TopicType"
        },
        {
          "name": "topicName",
          "type": "string"
        },
        {
          "name": "oneChatPerTLF",
          "type": [
            null,
            "bool"
          ]
        },
        {
          "name": "identifyBehavior",
          "type": "keybase1.TLFIdentifyBehavior"
        }
      ],
      "response": "FindConversationsLocalRes"
    }
  },
  "namespace": "chat.1"
}