{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tale-dev/json-schema/tale-dev-conversation-mirror-schema.json",
  "title": "ConversationMirror",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tale-dev-conversations-api-openapi.yml#/components/schemas/ConversationMirror",
  "type": "object",
  "required": [
    "conversationId",
    "externalId",
    "externalContactId",
    "contactId",
    "contactStatus",
    "version",
    "sourceDeleted",
    "status",
    "subject",
    "createdAt"
  ],
  "properties": {
    "conversationId": {
      "type": "string"
    },
    "externalId": {
      "type": "string",
      "description": "The source conversation’s own id"
    },
    "externalContactId": {
      "type": "string",
      "description": "The bound contact’s current external id"
    },
    "contactId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The bound contact row — `GET /api/v1/contacts/{id}` takes it; null when none is linked"
    },
    "contactStatus": {
      "type": "string",
      "enum": [
        "active",
        "trashed",
        "missing"
      ],
      "description": "`trashed`: the contact was deleted and the mirror takes no more content until it is restored"
    },
    "version": {
      "type": "integer",
      "description": "The stored source revision; -1 before the first snapshot applied"
    },
    "sourceDeleted": {
      "type": "boolean",
      "description": "The source tore the mirror down with a `deleted` snapshot"
    },
    "status": {
      "type": "string",
      "description": "The Inbox conversation’s status"
    },
    "subject": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "integer",
      "minimum": 0,
      "description": "Epoch milliseconds"
    }
  }
}