{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "domains": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "hostname": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "state": {
            "type": "string",
            "enum": [
              "awaiting-dns",
              "provisioning",
              "active",
              "attention",
              "suspended"
            ]
          },
          "issue": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": ["code", "message"]
              },
              {
                "type": "null"
              }
            ]
          },
          "records": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": ["CNAME", "TXT"]
                },
                "name": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "found": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "matches": {
                  "type": "boolean"
                }
              },
              "required": ["type", "name", "value", "found", "matches"]
            }
          },
          "cloudflare": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "hostnameStatus": {
                    "type": "string"
                  },
                  "certificateStatus": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "validationErrors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "verificationErrors": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "certificateExpiresAt": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "certificateExpiresAtMs": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "hostnameStatus",
                  "certificateStatus",
                  "validationErrors",
                  "verificationErrors",
                  "certificateExpiresAt"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "checkedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "checkedAtMs": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "nextCheckAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "nextCheckAtMs": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "createdAtMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "next": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "hostname",
          "url",
          "state",
          "issue",
          "records",
          "cloudflare",
          "checkedAt",
          "nextCheckAt",
          "createdAt",
          "next"
        ]
      }
    }
  },
  "required": ["domains"],
  "additionalProperties": {},
  "title": "Custom domains"
}
