{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookit-n-go/json-schema/bookit-n-go-trip-list-response-schema.json",
  "title": "TripListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookit-n-go-trips-api-openapi.yml#/components/schemas/TripListResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Trip"
      }
    }
  },
  "$defs": {
    "Trip": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "createdAt",
        "updatedAt",
        "items"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TripItem"
          }
        }
      }
    },
    "TripItem": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "bookingId",
        "kind",
        "createdAt",
        "bookingStatus",
        "servicing"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "bookingId": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "HOTEL",
            "FLIGHT"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "bookingStatus": {
          "type": "string",
          "enum": [
            "PENDING",
            "CONFIRMED",
            "FAILED",
            "CANCELLED",
            "UNKNOWN"
          ]
        },
        "servicing": {
          "$ref": "#/$defs/TripItemServicing"
        }
      }
    },
    "TripItemServicing": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "cancellation"
      ],
      "properties": {
        "cancellation": {
          "type": "string",
          "enum": [
            "SUPPORTED",
            "UNSUPPORTED",
            "UNAVAILABLE"
          ]
        }
      }
    }
  }
}