{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/evidujzdarma-cz/json-schema/evidujzdarma-cz-account-schema.json",
  "title": "Account",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/evidujzdarma-cz-openapi.json#/components/schemas/Account",
  "type": "object",
  "properties": {
    "environment": {
      "type": "string",
      "enum": [
        "test",
        "live"
      ]
    },
    "eetMode": {
      "type": "string",
      "enum": [
        "playground",
        "production"
      ]
    },
    "eicMasked": {
      "type": [
        "string",
        "null"
      ]
    },
    "certificate": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "valid",
            "expired",
            "missing",
            "not_verified"
          ]
        },
        "validTo": {
          "type": [
            "string",
            "null"
          ]
        },
        "daysLeft": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "status",
        "validTo",
        "daysLeft"
      ],
      "additionalProperties": false
    },
    "integration": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "sales:write",
              "sales:read",
              "refunds:write",
              "units:read",
              "closings:read",
              "webhooks:manage"
            ]
          }
        },
        "unitIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "required": [
        "id",
        "name",
        "scopes",
        "unitIds"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "environment",
    "eetMode",
    "eicMasked",
    "certificate",
    "integration"
  ],
  "additionalProperties": false
}