{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usebondery-com/json-schema/usebondery-com-interaction-schema.json",
  "title": "Interaction",
  "description": "Interaction read model",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usebondery-com-openapi.yaml#/components/schemas/Interaction",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier"
    },
    "userId": {
      "type": "string",
      "description": "Owner account identifier"
    },
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
      "description": "When the interaction happened"
    },
    "description": {
      "description": "Free-text notes about the interaction",
      "type": [
        "string",
        "null"
      ]
    },
    "participants": {
      "description": "People who took part, as objects or contact ids",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "avatar": {
                "description": "Avatar image URL, or null when unset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "firstName": {
                "type": "string",
                "description": "Given name"
              },
              "headline": {
                "description": "Short role or description line",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "description": "Contact identifier"
              },
              "lastName": {
                "description": "Family name",
                "type": [
                  "string",
                  "null"
                ]
              },
              "location": {
                "description": "Free-text location",
                "type": [
                  "string",
                  "null"
                ]
              },
              "middleName": {
                "description": "Middle name",
                "type": [
                  "string",
                  "null"
                ]
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
                "description": "Last update time as ISO 8601 with timezone offset"
              }
            },
            "required": [
              "avatar",
              "firstName",
              "headline",
              "id",
              "lastName",
              "location",
              "middleName"
            ],
            "additionalProperties": false
          }
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "title": {
      "description": "Short summary line",
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "Call",
        "Coffee",
        "Email",
        "Meal",
        "Meeting",
        "Networking event",
        "Note",
        "Other",
        "Party/Social",
        "Text/Messaging",
        "Competition/Hackathon",
        "Custom"
      ],
      "description": "Interaction category"
    },
    "createdAt": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
      "description": "Creation time as ISO 8601 with timezone offset"
    },
    "updatedAt": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{1,9})?(?:Z|[+-]\\d{2}:\\d{2})$",
      "description": "Last update time as ISO 8601 with timezone offset"
    }
  },
  "required": [
    "id",
    "userId",
    "date",
    "description",
    "title",
    "type",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": false
}