{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/talkie-ai/json-schema/talkie-ai-call-details-schema.json",
  "title": "CallDetails",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/talkie-ai-openapi.yaml#/components/schemas/CallDetails",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "phoneNumber": {
      "type": "string"
    },
    "callDuration": {
      "type": "number"
    },
    "conversationStart": {
      "type": "number",
      "format": "timestamp"
    },
    "conversationEnd": {
      "type": "number",
      "format": "timestamp"
    },
    "channel": {
      "type": "string",
      "enum": [
        "voice",
        "text",
        "sms"
      ]
    },
    "direction": {
      "type": "string",
      "enum": [
        "incoming",
        "outgoing"
      ]
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Question"
      }
    },
    "recognizedIntents": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecognizedIntent"
      }
    },
    "transcript": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Transcript"
      }
    }
  },
  "$defs": {
    "Question": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "format": "uuid"
        },
        "timestamp": {
          "type": "number",
          "format": "timestamp"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "RecognizedIntent": {
      "type": "object",
      "properties": {
        "questionId": {
          "type": "string",
          "format": "uuid"
        },
        "timestamp": {
          "type": "number",
          "format": "timestamp"
        },
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "Transcript": {
      "type": "object",
      "properties": {
        "questionId": {
          "type": "string",
          "format": "uuid"
        },
        "timestamp": {
          "type": "number",
          "format": "timestamp"
        },
        "actor": {
          "type": "string",
          "pattern": "bot | customer"
        },
        "text": {
          "type": "string"
        }
      }
    }
  }
}