{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/klokin-io/json-schema/klokin-io-shift-schema.json",
  "title": "Shift",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klokin-io-openapi.yml#/components/schemas/Shift",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "scheduleId": {
      "type": "string",
      "format": "uuid"
    },
    "employeeId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "null = open (unassigned) shift"
    },
    "employeeName": {
      "type": "string"
    },
    "storeId": {
      "type": "string",
      "format": "uuid"
    },
    "startsAt": {
      "type": "string",
      "format": "date-time"
    },
    "endsAt": {
      "type": "string",
      "format": "date-time"
    },
    "breakMinutes": {
      "type": "integer"
    },
    "type": {
      "type": "string",
      "enum": [
        "regular",
        "substitution",
        "on_call"
      ]
    },
    "substitutedEmployeeId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "templateId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}