{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deliveries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Resource identifier returned by the operation."
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "accepted",
              "unknown",
              "cancelled",
              "failed"
            ],
            "description": "Saved lifecycle or evidence state, as enumerated for this record."
          },
          "providerState": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "delivered",
                  "bounced",
                  "complained",
                  "failed",
                  "suppressed"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "windowEnd": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "errorCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "state",
          "providerState",
          "windowEnd",
          "createdAt",
          "updatedAt",
          "errorCode"
        ],
        "additionalProperties": false
      }
    },
    "capacity": {
      "type": "object",
      "properties": {
        "used": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "limit": {
          "type": "number",
          "const": 100
        },
        "unresolved": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "blocked": {
          "type": "boolean"
        }
      },
      "required": [
        "used",
        "limit",
        "unresolved",
        "blocked"
      ],
      "additionalProperties": false
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "deliveries",
    "capacity",
    "nextCursor"
  ],
  "additionalProperties": {}
}
