{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telnyx/json-schema/telnyx-record-type-metadata-response-schema.json",
  "title": "RecordTypeMetadataResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telnyx-session-analysis-api-openapi.yml#/components/schemas/RecordTypeMetadataResponse",
  "properties": {
    "aliases": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "child_relationships": {
      "items": {
        "$ref": "#/$defs/ChildRelationshipInfo"
      },
      "type": "array"
    },
    "event": {
      "type": "string"
    },
    "meta": {
      "$ref": "#/$defs/RelationshipMetadata"
    },
    "parent_relationships": {
      "items": {
        "$ref": "#/$defs/ParentRelationshipInfo"
      },
      "type": "array"
    },
    "product": {
      "type": "string"
    },
    "record_type": {
      "type": "string"
    }
  },
  "required": [
    "record_type",
    "aliases",
    "product",
    "event",
    "child_relationships",
    "parent_relationships",
    "examples",
    "meta"
  ],
  "type": "object",
  "$defs": {
    "ChildRelationshipInfo": {
      "properties": {
        "child_event": {
          "type": "string"
        },
        "child_product": {
          "type": "string"
        },
        "child_record_type": {
          "type": "string"
        },
        "cost_rollup": {
          "type": "boolean"
        },
        "description": {
          "type": "string"
        },
        "relationship_type": {
          "type": "string"
        },
        "traversal_enabled": {
          "type": "boolean"
        },
        "via": {
          "$ref": "#/$defs/MetadataFieldMapping"
        }
      },
      "required": [
        "relationship_type",
        "via",
        "cost_rollup",
        "traversal_enabled",
        "description",
        "child_product",
        "child_event",
        "child_record_type"
      ],
      "type": "object"
    },
    "MetadataFieldMapping": {
      "properties": {
        "local_field": {
          "type": "string"
        },
        "parent_field": {
          "type": "string"
        }
      },
      "required": [
        "local_field",
        "parent_field"
      ],
      "type": "object"
    },
    "ParentRelationshipInfo": {
      "properties": {
        "cost_rollup": {
          "type": "boolean"
        },
        "description": {
          "type": "string"
        },
        "parent_event": {
          "type": "string"
        },
        "parent_product": {
          "type": "string"
        },
        "parent_record_type": {
          "type": "string"
        },
        "relationship_type": {
          "type": "string"
        },
        "traversal_enabled": {
          "type": "boolean"
        },
        "via": {
          "$ref": "#/$defs/MetadataFieldMapping"
        }
      },
      "required": [
        "relationship_type",
        "via",
        "cost_rollup",
        "traversal_enabled",
        "description",
        "parent_product",
        "parent_event",
        "parent_record_type"
      ],
      "type": "object"
    },
    "RelationshipMetadata": {
      "properties": {
        "max_recommended_depth": {
          "type": "integer"
        },
        "total_children": {
          "type": "integer"
        },
        "total_parents": {
          "type": "integer"
        },
        "total_siblings": {
          "type": "integer"
        }
      },
      "required": [
        "total_children",
        "total_siblings",
        "total_parents",
        "max_recommended_depth"
      ],
      "type": "object"
    }
  }
}