{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/taktovka-com/json-schema/taktovka-com-me-schema.json",
  "title": "Me",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/taktovka-com-openapi.json#/components/schemas/Me",
  "type": "object",
  "properties": {
    "company": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "country": {
          "type": "string",
          "enum": [
            "SK",
            "CZ"
          ]
        },
        "currency": {
          "type": "string",
          "enum": [
            "EUR",
            "CZK"
          ]
        },
        "locale": {
          "type": "string"
        },
        "tz": {
          "type": "string",
          "description": "IANA time zone of the company"
        },
        "plan": {
          "type": "string",
          "enum": [
            "free",
            "kaviaren",
            "restauracia",
            "siet",
            "enterprise"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "country",
        "currency",
        "locale",
        "tz",
        "plan"
      ],
      "additionalProperties": false
    },
    "key": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "company:read",
              "people:read",
              "people:contact",
              "schedules:read",
              "attendance:read",
              "absences:read",
              "absences:kinds",
              "leave:read"
            ]
          }
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 instant"
        },
        "expires_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time",
              "description": "ISO 8601 instant"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "id",
        "name",
        "scopes",
        "created_at",
        "expires_at"
      ],
      "additionalProperties": false
    },
    "rate_limit": {
      "type": "object",
      "properties": {
        "per_second": {
          "type": "integer"
        },
        "burst": {
          "type": "integer"
        }
      },
      "required": [
        "per_second",
        "burst"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "company",
    "key",
    "rate_limit"
  ],
  "additionalProperties": false
}