{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "conversation",
  "type": "object",
  "properties": {
    "source_alias": {
      "description": "A user-customizable label for grouping feedbacks",
      "type": "string"
    },
    "kind": {
      "description": "Group all data for this specific kind of conversation",
      "type": "object",
      "properties": {
        "name": {
          "description": "Kind of conversation",
          "type": "string",
          "enum": [
            "support_ticket",
            "issue",
            "social_media_post",
            "complaint"
          ]
        },
        "fields": {
          "description": "Object containing all relevant fields for this kind of conversation",
          "type": "object"
        }
      },
      "required": [
        "name",
        "fields"
      ],
      "additionalProperties": false
    },
    "batch_id": {
      "description": "ID of the batch which this conversation belongs to (optional)",
      "type": "string"
    },
    "archived": {
      "description": "True if the message is archived in the source",
      "type": "boolean"
    },
    "archived_at": {
      "description": "If the message is archived, when it happened",
      "type": "string",
      "format": "date-time"
    },
    "additional_fields": {
      "description": "Additional fields are fields that can be mapped to custom fields.",
      "type": "object",
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "integer"
          },
          {
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          {
            "type": "array",
            "items": {
              "type": "boolean"
            }
          }
        ]
      }
    }
  },
  "required": [
    "kind"
  ],
  "additionalProperties": false
}
