{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://dellasale.com/ucp/schemas/business/company-info.json",
  "title": "Dellasale Company Info",
  "$ref": "#/$defs/CompanyInfo",
  "$defs": {
    "Meta": {
      "type": "object",
      "required": ["ucp-agent"],
      "properties": {
        "ucp-agent": {
          "type": "object",
          "required": ["profile"],
          "properties": {
            "profile": { "type": "string", "format": "uri" }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "UcpEnvelope": {
      "type": "object",
      "required": ["version", "status", "capabilities"],
      "properties": {
        "version": { "const": "2026-08-25" },
        "status": { "enum": ["success", "error"] },
        "capabilities": { "type": "object" }
      },
      "additionalProperties": true
    },
    "CompanyInfo": {
      "type": "object",
      "required": ["name", "website", "description", "languages", "service_regions", "last_updated"],
      "properties": {
        "name": { "type": "string", "minLength": 1 },
        "website": { "type": "string", "format": "uri" },
        "description": { "type": "string", "minLength": 1 },
        "languages": { "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true },
        "service_regions": { "type": "array", "items": { "type": "string" }, "minItems": 1, "uniqueItems": true },
        "last_updated": { "type": "string", "format": "date" }
      },
      "additionalProperties": false
    },
    "GetCompanyInfoRequest": {
      "type": "object",
      "required": ["meta"],
      "properties": {
        "meta": { "$ref": "#/$defs/Meta" },
        "locale": { "type": "string", "default": "pt-BR" }
      },
      "additionalProperties": false
    },
    "GetCompanyInfoResponse": {
      "type": "object",
      "required": ["ucp", "company"],
      "properties": {
        "ucp": { "$ref": "#/$defs/UcpEnvelope" },
        "company": { "$ref": "#/$defs/CompanyInfo" },
        "messages": { "type": "array", "items": { "type": "object" } }
      },
      "additionalProperties": false
    }
  }
}
