JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://suporte.inspire4u.com.br/schemas/eksp/v1/context.schema.json",
  "title": "Contexto ao vivo do cliente",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "object",
      "required": [
        "customer_external_id",
        "generated_at",
        "fields"
      ],
      "properties": {
        "customer_external_id": {
          "type": "string"
        },
        "generated_at": {
          "type": "string",
          "format": "date-time"
        },
        "summary": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 500
        },
        "subscription": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "plan": {
              "type": "string"
            },
            "status": {
              "type": "string"
            },
            "mrr_cents": {
              "type": "integer"
            },
            "currency": {
              "type": "string"
            },
            "renews_at": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "key",
              "label",
              "value"
            ],
            "properties": {
              "key": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "value": {
                "type": [
                  "string",
                  "number",
                  "boolean"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "ok",
                  "info",
                  "warning",
                  "critical"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "invoices": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "status"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "amount_cents": {
                "type": "integer"
              },
              "status": {
                "type": "string",
                "enum": [
                  "paid",
                  "open",
                  "overdue",
                  "void",
                  "refunded"
                ]
              },
              "due_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "orders": {
          "type": "array"
        },
        "feature_flags": {
          "type": "object"
        },
        "usage_summary": {
          "type": [
            "object",
            "null"
          ]
        },
        "incidents": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "title"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "severity": {
                "type": "string"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "links": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "label",
              "url"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}

Encontrou algo para melhorar? Escreva para master@inspire4u.com.br.